@skbkontur/react-ui 6.4.1-8cb58.0 → 6.4.2-static-css.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/CHANGELOG.md +25 -0
- package/README.md +97 -0
- package/components/Autocomplete/Autocomplete.d.ts +0 -1
- package/components/Autocomplete/Autocomplete.js +13 -4
- package/components/Autocomplete/Autocomplete.js.map +1 -1
- package/components/Autocomplete/Autocomplete.styles.d.ts +4 -4
- package/components/Autocomplete/Autocomplete.styles.js +5 -16
- package/components/Autocomplete/Autocomplete.styles.js.map +1 -1
- package/components/Button/Button.d.ts +15 -1
- package/components/Button/Button.js +162 -76
- package/components/Button/Button.js.map +1 -1
- package/components/Button/Button.styles.d.ts +107 -91
- package/components/Button/Button.styles.js +108 -255
- package/components/Button/Button.styles.js.map +1 -1
- package/components/Button/ButtonArrow.d.ts +2 -3
- package/components/Button/ButtonArrow.js +8 -10
- package/components/Button/ButtonArrow.js.map +1 -1
- package/components/Button/ButtonIcon.js +7 -17
- package/components/Button/ButtonIcon.js.map +1 -1
- package/components/Button/ButtonIcon.styles.d.ts +15 -15
- package/components/Button/ButtonIcon.styles.js +16 -51
- package/components/Button/ButtonIcon.styles.js.map +1 -1
- package/components/Calendar/Calendar.d.ts +0 -1
- package/components/Calendar/Calendar.js +3 -3
- package/components/Calendar/Calendar.js.map +1 -1
- package/components/Calendar/Calendar.styles.d.ts +5 -5
- package/components/Calendar/Calendar.styles.js +6 -20
- package/components/Calendar/Calendar.styles.js.map +1 -1
- package/components/Calendar/CalendarDay.js +11 -7
- package/components/Calendar/CalendarDay.js.map +1 -1
- package/components/Calendar/DayCellView.js +1 -3
- package/components/Calendar/DayCellView.js.map +1 -1
- package/components/Calendar/DayCellView.styles.d.ts +10 -8
- package/components/Calendar/DayCellView.styles.js +11 -29
- package/components/Calendar/DayCellView.styles.js.map +1 -1
- package/components/Calendar/Month.js +6 -10
- package/components/Calendar/Month.js.map +1 -1
- package/components/Calendar/MonthView.js +7 -7
- package/components/Calendar/MonthView.js.map +1 -1
- package/components/Calendar/MonthView.styles.d.ts +12 -12
- package/components/Calendar/MonthView.styles.js +13 -45
- package/components/Calendar/MonthView.styles.js.map +1 -1
- package/components/Center/Center.d.ts +0 -1
- package/components/Center/Center.js +1 -1
- package/components/Center/Center.js.map +1 -1
- package/components/Center/Center.styles.d.ts +7 -6
- package/components/Center/Center.styles.js +8 -25
- package/components/Center/Center.styles.js.map +1 -1
- package/components/Checkbox/Checkbox.d.ts +8 -1
- package/components/Checkbox/Checkbox.js +57 -26
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Checkbox.styles.d.ts +33 -30
- package/components/Checkbox/Checkbox.styles.js +35 -95
- package/components/Checkbox/Checkbox.styles.js.map +1 -1
- package/components/DateInput/DateFragmentsView.d.ts +0 -2
- package/components/DateInput/DateFragmentsView.js +10 -7
- package/components/DateInput/DateFragmentsView.js.map +1 -1
- package/components/DateInput/DateFragmentsView.styles.d.ts +8 -6
- package/components/DateInput/DateFragmentsView.styles.js +9 -26
- package/components/DateInput/DateFragmentsView.styles.js.map +1 -1
- package/components/DateInput/DateInput.d.ts +0 -2
- package/components/DateInput/DateInput.js +6 -8
- package/components/DateInput/DateInput.js.map +1 -1
- package/components/DateInput/DateInput.styles.d.ts +10 -11
- package/components/DateInput/DateInput.styles.js +11 -28
- package/components/DateInput/DateInput.styles.js.map +1 -1
- package/components/DatePicker/DatePicker.d.ts +0 -1
- package/components/DatePicker/DatePicker.js +2 -2
- package/components/DatePicker/DatePicker.js.map +1 -1
- package/components/DatePicker/DatePicker.styles.d.ts +4 -4
- package/components/DatePicker/DatePicker.styles.js +5 -16
- package/components/DatePicker/DatePicker.styles.js.map +1 -1
- package/components/DatePicker/MobilePicker.styles.d.ts +3 -2
- package/components/DatePicker/MobilePicker.styles.js +4 -13
- package/components/DatePicker/MobilePicker.styles.js.map +1 -1
- package/components/DatePicker/getMobilePickerTheme.js +27 -9
- package/components/DatePicker/getMobilePickerTheme.js.map +1 -1
- package/components/DateRangePicker/DateRangePicker.d.ts +4 -4
- package/components/DateRangePicker/DateRangePicker.js +26 -28
- package/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/components/DateRangePicker/DateRangePicker.styles.d.ts +20 -14
- package/components/DateRangePicker/DateRangePicker.styles.js +25 -49
- package/components/DateRangePicker/DateRangePicker.styles.js.map +1 -1
- package/components/DateRangePicker/DateRangePickerTheme.js +30 -10
- package/components/DateRangePicker/DateRangePickerTheme.js.map +1 -1
- package/components/Dropdown/getDropdownTheme.d.ts +11 -0
- package/components/Dropdown/getDropdownTheme.js +23 -4
- package/components/Dropdown/getDropdownTheme.js.map +1 -1
- package/components/DropdownMenu/getDropdownMenuTheme.js +9 -2
- package/components/DropdownMenu/getDropdownMenuTheme.js.map +1 -1
- package/components/FileUploader/FileUploader.d.ts +2 -1
- package/components/FileUploader/FileUploader.js +50 -45
- package/components/FileUploader/FileUploader.js.map +1 -1
- package/components/FileUploader/FileUploader.styles.d.ts +69 -68
- package/components/FileUploader/FileUploader.styles.js +71 -214
- package/components/FileUploader/FileUploader.styles.js.map +1 -1
- package/components/FileUploader/FileUploaderFile.js +28 -30
- package/components/FileUploader/FileUploaderFile.js.map +1 -1
- package/components/FileUploader/FileUploaderFile.styles.d.ts +57 -57
- package/components/FileUploader/FileUploaderFile.styles.js +58 -180
- package/components/FileUploader/FileUploaderFile.styles.js.map +1 -1
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.js +17 -19
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.js.map +1 -1
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.d.ts +31 -31
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.js +32 -99
- package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.js.map +1 -1
- package/components/FileUploader/FileUploaderFileStatusIcon.js +2 -4
- package/components/FileUploader/FileUploaderFileStatusIcon.js.map +1 -1
- package/components/FileUploader/FileUploaderFileTypeIcon.js +47 -52
- package/components/FileUploader/FileUploaderFileTypeIcon.js.map +1 -1
- package/components/FileUploader/FileUploaderFileTypeIcon.styles.d.ts +14 -0
- package/components/FileUploader/FileUploaderFileTypeIcon.styles.js +16 -0
- package/components/FileUploader/FileUploaderFileTypeIcon.styles.js.map +1 -0
- package/components/FxInput/FxInput.d.ts +1 -1
- package/components/FxInput/FxInput.js +6 -2
- package/components/FxInput/FxInput.js.map +1 -1
- package/components/FxInput/FxInput.styles.d.ts +4 -0
- package/components/FxInput/FxInput.styles.js +6 -0
- package/components/FxInput/FxInput.styles.js.map +1 -0
- package/components/FxInput/FxInputRestoreBtn.js +23 -15
- package/components/FxInput/FxInputRestoreBtn.js.map +1 -1
- package/components/FxInput/FxInputRestoreBtn.styles.d.ts +6 -0
- package/components/FxInput/FxInputRestoreBtn.styles.js +8 -0
- package/components/FxInput/FxInputRestoreBtn.styles.js.map +1 -0
- package/components/GlobalLoader/GlobalLoaderView.js +30 -14
- package/components/GlobalLoader/GlobalLoaderView.js.map +1 -1
- package/components/GlobalLoader/GlobalLoaderView.styles.d.ts +22 -16
- package/components/GlobalLoader/GlobalLoaderView.styles.js +22 -67
- package/components/GlobalLoader/GlobalLoaderView.styles.js.map +1 -1
- package/components/Group/Group.d.ts +0 -1
- package/components/Group/Group.js +2 -3
- package/components/Group/Group.js.map +1 -1
- package/components/Group/Group.styles.d.ts +7 -7
- package/components/Group/Group.styles.js +8 -28
- package/components/Group/Group.styles.js.map +1 -1
- package/components/Hint/Hint.d.ts +10 -2
- package/components/Hint/Hint.js +47 -19
- package/components/Hint/Hint.js.map +1 -1
- package/components/Hint/Hint.styles.d.ts +4 -4
- package/components/Hint/Hint.styles.js +5 -16
- package/components/Hint/Hint.styles.js.map +1 -1
- package/components/Hint/HintDelayController.d.ts +11 -0
- package/components/Hint/HintDelayController.js +50 -0
- package/components/Hint/HintDelayController.js.map +1 -0
- package/components/Input/Input.d.ts +0 -1
- package/components/Input/Input.js +13 -13
- package/components/Input/Input.js.map +1 -1
- package/components/Input/Input.styles.d.ts +20 -20
- package/components/Input/Input.styles.js +21 -66
- package/components/Input/Input.styles.js.map +1 -1
- package/components/Input/InputLayout/InputLayout.styles.d.ts +26 -17
- package/components/Input/InputLayout/InputLayout.styles.js +27 -57
- package/components/Input/InputLayout/InputLayout.styles.js.map +1 -1
- package/components/Input/InputLayout/InputLayoutAsideCounter.js +8 -8
- package/components/Input/InputLayout/InputLayoutAsideCounter.js.map +1 -1
- package/components/Input/InputLayout/InputLayoutAsideIcon.js +19 -25
- package/components/Input/InputLayout/InputLayoutAsideIcon.js.map +1 -1
- package/components/Input/InputLayout/InputLayoutAsideText.js +4 -4
- package/components/Input/InputLayout/InputLayoutAsideText.js.map +1 -1
- package/components/Kebab/Kebab.d.ts +0 -1
- package/components/Kebab/Kebab.js +2 -2
- package/components/Kebab/Kebab.js.map +1 -1
- package/components/Kebab/Kebab.styles.d.ts +10 -10
- package/components/Kebab/Kebab.styles.js +11 -34
- package/components/Kebab/Kebab.styles.js.map +1 -1
- package/components/Link/Link.d.ts +0 -1
- package/components/Link/Link.js +23 -18
- package/components/Link/Link.js.map +1 -1
- package/components/Link/Link.styles.d.ts +23 -23
- package/components/Link/Link.styles.js +25 -81
- package/components/Link/Link.styles.js.map +1 -1
- package/components/Link/LinkIcon.js +4 -6
- package/components/Link/LinkIcon.js.map +1 -1
- package/components/Loader/Loader.d.ts +0 -2
- package/components/Loader/Loader.js +2 -3
- package/components/Loader/Loader.js.map +1 -1
- package/components/Loader/Loader.styles.d.ts +7 -7
- package/components/Loader/Loader.styles.js +8 -25
- package/components/Loader/Loader.styles.js.map +1 -1
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.js +15 -21
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.js.map +1 -1
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.d.ts +3 -2
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.js +5 -13
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.js.map +1 -1
- package/components/MaskedInput/MaskedInput.styles.d.ts +3 -3
- package/components/MaskedInput/MaskedInput.styles.js +5 -14
- package/components/MaskedInput/MaskedInput.styles.js.map +1 -1
- package/components/MaskedInput/MaskedInputLegacy.js +4 -6
- package/components/MaskedInput/MaskedInputLegacy.js.map +1 -1
- package/components/MaskedInputV2/MaskedInputV2.js +4 -6
- package/components/MaskedInputV2/MaskedInputV2.js.map +1 -1
- package/components/MaskedInputV2/MaskedInputV2.styles.d.ts +3 -3
- package/components/MaskedInputV2/MaskedInputV2.styles.js +5 -14
- package/components/MaskedInputV2/MaskedInputV2.styles.js.map +1 -1
- package/components/MaskedInputV2/internal/MaskOverlay.js +8 -8
- package/components/MaskedInputV2/internal/MaskOverlay.js.map +1 -1
- package/components/MaskedInputV2/internal/MaskedCore.js +7 -5
- package/components/MaskedInputV2/internal/MaskedCore.js.map +1 -1
- package/components/MaskedInputV2/internal/MaskedInternal.styles.d.ts +7 -7
- package/components/MaskedInputV2/internal/MaskedInternal.styles.js +9 -25
- package/components/MaskedInputV2/internal/MaskedInternal.styles.js.map +1 -1
- package/components/MenuFooter/MenuFooter.js +10 -12
- package/components/MenuFooter/MenuFooter.js.map +1 -1
- package/components/MenuFooter/MenuFooter.styles.d.ts +9 -9
- package/components/MenuFooter/MenuFooter.styles.js +10 -32
- package/components/MenuFooter/MenuFooter.styles.js.map +1 -1
- package/components/MenuHeader/MenuHeader.js +9 -11
- package/components/MenuHeader/MenuHeader.js.map +1 -1
- package/components/MenuHeader/MenuHeader.styles.d.ts +9 -9
- package/components/MenuHeader/MenuHeader.styles.js +10 -32
- package/components/MenuHeader/MenuHeader.styles.js.map +1 -1
- package/components/MenuItem/MenuItem.d.ts +0 -1
- package/components/MenuItem/MenuItem.js +21 -21
- package/components/MenuItem/MenuItem.js.map +1 -1
- package/components/MenuItem/MenuItem.mixins.d.ts +6 -0
- package/components/MenuItem/MenuItem.mixins.js +7 -1
- package/components/MenuItem/MenuItem.mixins.js.map +1 -1
- package/components/MenuItem/MenuItem.styles.d.ts +26 -26
- package/components/MenuItem/MenuItem.styles.js +28 -85
- package/components/MenuItem/MenuItem.styles.js.map +1 -1
- package/components/MenuSeparator/MenuSeparator.js +4 -6
- package/components/MenuSeparator/MenuSeparator.js.map +1 -1
- package/components/MenuSeparator/MenuSeparator.styles.d.ts +4 -4
- package/components/MenuSeparator/MenuSeparator.styles.js +5 -16
- package/components/MenuSeparator/MenuSeparator.styles.js.map +1 -1
- package/components/MiniModal/MiniModal.styles.d.ts +10 -10
- package/components/MiniModal/MiniModal.styles.js +11 -35
- package/components/MiniModal/MiniModal.styles.js.map +1 -1
- package/components/MiniModal/MiniModalBody.js +3 -3
- package/components/MiniModal/MiniModalBody.js.map +1 -1
- package/components/MiniModal/MiniModalFooter.js +4 -6
- package/components/MiniModal/MiniModalFooter.js.map +1 -1
- package/components/MiniModal/MiniModalHeader.js +4 -6
- package/components/MiniModal/MiniModalHeader.js.map +1 -1
- package/components/MiniModal/MiniModalIndent.js +2 -4
- package/components/MiniModal/MiniModalIndent.js.map +1 -1
- package/components/MiniModal/getMiniModalTheme.js +39 -13
- package/components/MiniModal/getMiniModalTheme.js.map +1 -1
- package/components/Modal/Modal.d.ts +0 -1
- package/components/Modal/Modal.js +8 -8
- package/components/Modal/Modal.js.map +1 -1
- package/components/Modal/Modal.styles.d.ts +50 -50
- package/components/Modal/Modal.styles.js +52 -161
- package/components/Modal/Modal.styles.js.map +1 -1
- package/components/Modal/ModalBody.d.ts +0 -1
- package/components/Modal/ModalBody.js +7 -7
- package/components/Modal/ModalBody.js.map +1 -1
- package/components/Modal/ModalClose.js +7 -9
- package/components/Modal/ModalClose.js.map +1 -1
- package/components/Modal/ModalFooter.js +3 -3
- package/components/Modal/ModalFooter.js.map +1 -1
- package/components/Modal/ModalHeader.js +3 -3
- package/components/Modal/ModalHeader.js.map +1 -1
- package/components/Modal/ModalSeparator.js +4 -6
- package/components/Modal/ModalSeparator.js.map +1 -1
- package/components/Paging/Paging.d.ts +0 -2
- package/components/Paging/Paging.js +32 -37
- package/components/Paging/Paging.js.map +1 -1
- package/components/Paging/Paging.styles.d.ts +31 -31
- package/components/Paging/Paging.styles.js +32 -97
- package/components/Paging/Paging.styles.js.map +1 -1
- package/components/PasswordInput/PasswordInput.d.ts +0 -2
- package/components/PasswordInput/PasswordInput.js +6 -11
- package/components/PasswordInput/PasswordInput.js.map +1 -1
- package/components/PasswordInput/PasswordInput.styles.d.ts +10 -10
- package/components/PasswordInput/PasswordInput.styles.js +11 -34
- package/components/PasswordInput/PasswordInput.styles.js.map +1 -1
- package/components/Radio/Radio.d.ts +8 -1
- package/components/Radio/Radio.js +59 -28
- package/components/Radio/Radio.js.map +1 -1
- package/components/Radio/Radio.styles.d.ts +33 -30
- package/components/Radio/Radio.styles.js +35 -95
- package/components/Radio/Radio.styles.js.map +1 -1
- package/components/RadioGroup/RadioGroup.d.ts +0 -1
- package/components/RadioGroup/RadioGroup.js +1 -2
- package/components/RadioGroup/RadioGroup.js.map +1 -1
- package/components/RadioGroup/RadioGroup.styles.d.ts +5 -5
- package/components/RadioGroup/RadioGroup.styles.js +6 -22
- package/components/RadioGroup/RadioGroup.styles.js.map +1 -1
- package/components/ScrollContainer/ScrollBar.d.ts +1 -3
- package/components/ScrollContainer/ScrollBar.js +9 -14
- package/components/ScrollContainer/ScrollBar.js.map +1 -1
- package/components/ScrollContainer/ScrollContainer.d.ts +0 -1
- package/components/ScrollContainer/ScrollContainer.js +1 -1
- package/components/ScrollContainer/ScrollContainer.js.map +1 -1
- package/components/ScrollContainer/ScrollContainer.styles.d.ts +13 -13
- package/components/ScrollContainer/ScrollContainer.styles.js +15 -43
- package/components/ScrollContainer/ScrollContainer.styles.js.map +1 -1
- package/components/Select/Select.d.ts +0 -1
- package/components/Select/Select.js +12 -12
- package/components/Select/Select.js.map +1 -1
- package/components/Select/Select.styles.d.ts +17 -17
- package/components/Select/Select.styles.js +18 -55
- package/components/Select/Select.styles.js.map +1 -1
- package/components/Select/selectTheme.js +31 -7
- package/components/Select/selectTheme.js.map +1 -1
- package/components/SidePage/SidePage.d.ts +0 -2
- package/components/SidePage/SidePage.js +8 -10
- package/components/SidePage/SidePage.js.map +1 -1
- package/components/SidePage/SidePage.styles.d.ts +49 -49
- package/components/SidePage/SidePage.styles.js +50 -156
- package/components/SidePage/SidePage.styles.js.map +1 -1
- package/components/SidePage/SidePageBody.d.ts +0 -1
- package/components/SidePage/SidePageBody.js +7 -8
- package/components/SidePage/SidePageBody.js.map +1 -1
- package/components/SidePage/SidePageCloseButton.js +6 -8
- package/components/SidePage/SidePageCloseButton.js.map +1 -1
- package/components/SidePage/SidePageContainer.d.ts +0 -2
- package/components/SidePage/SidePageContainer.js +11 -13
- package/components/SidePage/SidePageContainer.js.map +1 -1
- package/components/SidePage/SidePageFooter.d.ts +0 -2
- package/components/SidePage/SidePageFooter.js +11 -13
- package/components/SidePage/SidePageFooter.js.map +1 -1
- package/components/SidePage/SidePageHeader.d.ts +0 -1
- package/components/SidePage/SidePageHeader.js +10 -10
- package/components/SidePage/SidePageHeader.js.map +1 -1
- package/components/Spinner/Spinner.d.ts +0 -2
- package/components/Spinner/Spinner.js +7 -10
- package/components/Spinner/Spinner.js.map +1 -1
- package/components/Spinner/Spinner.styles.d.ts +12 -12
- package/components/Spinner/Spinner.styles.js +13 -41
- package/components/Spinner/Spinner.styles.js.map +1 -1
- package/components/Sticky/Sticky.d.ts +0 -1
- package/components/Sticky/Sticky.js +1 -1
- package/components/Sticky/Sticky.js.map +1 -1
- package/components/Sticky/Sticky.styles.d.ts +7 -6
- package/components/Sticky/Sticky.styles.js +8 -25
- package/components/Sticky/Sticky.styles.js.map +1 -1
- package/components/Switcher/Switcher.d.ts +0 -1
- package/components/Switcher/Switcher.js +6 -6
- package/components/Switcher/Switcher.js.map +1 -1
- package/components/Switcher/Switcher.styles.d.ts +11 -11
- package/components/Switcher/Switcher.styles.js +12 -37
- package/components/Switcher/Switcher.styles.js.map +1 -1
- package/components/Switcher/switcherTheme.js +12 -4
- package/components/Switcher/switcherTheme.js.map +1 -1
- package/components/Tabs/Indicator.d.ts +0 -1
- package/components/Tabs/Indicator.js +2 -2
- package/components/Tabs/Indicator.js.map +1 -1
- package/components/Tabs/Indicator.styles.d.ts +7 -7
- package/components/Tabs/Indicator.styles.js +8 -25
- package/components/Tabs/Indicator.styles.js.map +1 -1
- package/components/Tabs/Tab.d.ts +0 -2
- package/components/Tabs/Tab.js +19 -24
- package/components/Tabs/Tab.js.map +1 -1
- package/components/Tabs/Tab.styles.d.ts +27 -27
- package/components/Tabs/Tab.styles.js +30 -99
- package/components/Tabs/Tab.styles.js.map +1 -1
- package/components/Tabs/Tabs.d.ts +0 -2
- package/components/Tabs/Tabs.js +24 -29
- package/components/Tabs/Tabs.js.map +1 -1
- package/components/Tabs/Tabs.styles.d.ts +6 -6
- package/components/Tabs/Tabs.styles.js +8 -25
- package/components/Tabs/Tabs.styles.js.map +1 -1
- package/components/Textarea/Textarea.d.ts +0 -2
- package/components/Textarea/Textarea.js +17 -24
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.styles.d.ts +26 -22
- package/components/Textarea/Textarea.styles.js +27 -71
- package/components/Textarea/Textarea.styles.js.map +1 -1
- package/components/Textarea/TextareaCounter.js +22 -14
- package/components/Textarea/TextareaCounter.js.map +1 -1
- package/components/TimePicker/TimePicker.styles.d.ts +11 -11
- package/components/TimePicker/TimePicker.styles.js +12 -37
- package/components/TimePicker/TimePicker.styles.js.map +1 -1
- package/components/TimePicker/TimePickerItems.js +6 -6
- package/components/TimePicker/TimePickerItems.js.map +1 -1
- package/components/TimePicker/TimePickerPopup.js +1 -1
- package/components/TimePicker/TimePickerPopup.js.map +1 -1
- package/components/Toast/Toast.d.ts +0 -1
- package/components/Toast/Toast.js +9 -6
- package/components/Toast/Toast.js.map +1 -1
- package/components/Toast/Toast.styles.d.ts +6 -5
- package/components/Toast/Toast.styles.js +7 -22
- package/components/Toast/Toast.styles.js.map +1 -1
- package/components/Toast/ToastView.d.ts +0 -1
- package/components/Toast/ToastView.js +9 -17
- package/components/Toast/ToastView.js.map +1 -1
- package/components/Toast/ToastView.styles.d.ts +19 -17
- package/components/Toast/ToastView.styles.js +20 -65
- package/components/Toast/ToastView.styles.js.map +1 -1
- package/components/Toggle/Toggle.d.ts +1 -1
- package/components/Toggle/Toggle.js +55 -39
- package/components/Toggle/Toggle.js.map +1 -1
- package/components/Toggle/Toggle.styles.d.ts +47 -46
- package/components/Toggle/Toggle.styles.js +48 -143
- package/components/Toggle/Toggle.styles.js.map +1 -1
- package/components/Token/Token.d.ts +0 -2
- package/components/Token/Token.js +5 -10
- package/components/Token/Token.js.map +1 -1
- package/components/Token/Token.styles.d.ts +20 -19
- package/components/Token/Token.styles.js +22 -62
- package/components/Token/Token.styles.js.map +1 -1
- package/components/Token/TokenView.js +8 -10
- package/components/Token/TokenView.js.map +1 -1
- package/components/TokenInput/TextWidthHelper.d.ts +0 -1
- package/components/TokenInput/TextWidthHelper.js +4 -4
- package/components/TokenInput/TextWidthHelper.js.map +1 -1
- package/components/TokenInput/TokenInput.d.ts +1 -2
- package/components/TokenInput/TokenInput.js +20 -22
- package/components/TokenInput/TokenInput.js.map +1 -1
- package/components/TokenInput/TokenInput.styles.d.ts +21 -20
- package/components/TokenInput/TokenInput.styles.js +22 -66
- package/components/TokenInput/TokenInput.styles.js.map +1 -1
- package/components/Tooltip/Tooltip.d.ts +0 -1
- package/components/Tooltip/Tooltip.js +12 -12
- package/components/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/Tooltip.styles.d.ts +11 -10
- package/components/Tooltip/Tooltip.styles.js +12 -34
- package/components/Tooltip/Tooltip.styles.js.map +1 -1
- package/index.d.ts +4 -0
- package/index.js +12 -0
- package/index.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.js +7 -9
- package/internal/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +11 -12
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.js +12 -35
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.js.map +1 -1
- package/internal/CloseButtonIcon/CloseButtonIcon.d.ts +21 -11
- package/internal/CloseButtonIcon/CloseButtonIcon.js +28 -13
- package/internal/CloseButtonIcon/CloseButtonIcon.js.map +1 -1
- package/internal/CloseButtonIcon/CloseButtonIcon.styles.d.ts +8 -8
- package/internal/CloseButtonIcon/CloseButtonIcon.styles.js +9 -23
- package/internal/CloseButtonIcon/CloseButtonIcon.styles.js.map +1 -1
- package/internal/CommonWrapper/CommonWrapper.d.ts +5 -1
- package/internal/CommonWrapper/CommonWrapper.js +107 -6
- package/internal/CommonWrapper/CommonWrapper.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView.d.ts +1 -2
- package/internal/CustomComboBox/ComboBoxView.js +8 -7
- package/internal/CustomComboBox/ComboBoxView.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.styles.d.ts +5 -3
- package/internal/CustomComboBox/CustomComboBox.styles.js +6 -16
- package/internal/CustomComboBox/CustomComboBox.styles.js.map +1 -1
- package/internal/DateSelect/DateSelect.d.ts +0 -1
- package/internal/DateSelect/DateSelect.js +2 -2
- package/internal/DateSelect/DateSelect.js.map +1 -1
- package/internal/DateSelect/DateSelect.styles.d.ts +5 -5
- package/internal/DateSelect/DateSelect.styles.js +7 -19
- package/internal/DateSelect/DateSelect.styles.js.map +1 -1
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.d.ts +15 -1
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js +36 -15
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js.map +1 -1
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.d.ts +5 -0
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.js +7 -0
- package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.js.map +1 -0
- package/internal/InputLikeText/InputLikeText.d.ts +0 -1
- package/internal/InputLikeText/InputLikeText.js +21 -17
- package/internal/InputLikeText/InputLikeText.js.map +1 -1
- package/internal/InputLikeText/InputLikeText.styles.d.ts +7 -7
- package/internal/InputLikeText/InputLikeText.styles.js +8 -28
- package/internal/InputLikeText/InputLikeText.styles.js.map +1 -1
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +0 -1
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js +14 -14
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -1
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -2
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js +4 -13
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js.map +1 -1
- package/internal/MaskCharLowLine/MaskCharLowLine.styles.d.ts +3 -2
- package/internal/MaskCharLowLine/MaskCharLowLine.styles.js +4 -13
- package/internal/MaskCharLowLine/MaskCharLowLine.styles.js.map +1 -1
- package/internal/Menu/Menu.d.ts +0 -1
- package/internal/Menu/Menu.js +9 -9
- package/internal/Menu/Menu.js.map +1 -1
- package/internal/Menu/Menu.styles.d.ts +15 -15
- package/internal/Menu/Menu.styles.js +16 -49
- package/internal/Menu/Menu.styles.js.map +1 -1
- package/internal/MenuMessage/MenuMessage.js +10 -10
- package/internal/MenuMessage/MenuMessage.js.map +1 -1
- package/internal/MenuMessage/MenuMessage.styles.d.ts +10 -10
- package/internal/MenuMessage/MenuMessage.styles.js +11 -39
- package/internal/MenuMessage/MenuMessage.styles.js.map +1 -1
- package/internal/MobilePopup/MobilePopup.d.ts +0 -1
- package/internal/MobilePopup/MobilePopup.js +23 -11
- package/internal/MobilePopup/MobilePopup.js.map +1 -1
- package/internal/MobilePopup/MobilePopup.styles.d.ts +16 -16
- package/internal/MobilePopup/MobilePopup.styles.js +17 -55
- package/internal/MobilePopup/MobilePopup.styles.js.map +1 -1
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +0 -1
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js +5 -5
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js.map +1 -1
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +6 -6
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js +7 -23
- package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js.map +1 -1
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.d.ts +0 -1
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js +10 -10
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js.map +1 -1
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.d.ts +13 -13
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js +14 -45
- package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js.map +1 -1
- package/internal/NativeDateInput/NativeDateInput.d.ts +0 -1
- package/internal/NativeDateInput/NativeDateInput.js +1 -1
- package/internal/NativeDateInput/NativeDateInput.js.map +1 -1
- package/internal/NativeDateInput/NativeDateInput.styles.d.ts +3 -2
- package/internal/NativeDateInput/NativeDateInput.styles.js +4 -13
- package/internal/NativeDateInput/NativeDateInput.styles.js.map +1 -1
- package/internal/NativeTimeInput/NativeTimeInput.js +1 -2
- package/internal/NativeTimeInput/NativeTimeInput.js.map +1 -1
- package/internal/NativeTimeInput/NativeTimeInput.styles.d.ts +3 -2
- package/internal/NativeTimeInput/NativeTimeInput.styles.js +4 -13
- package/internal/NativeTimeInput/NativeTimeInput.styles.js.map +1 -1
- package/internal/Popup/Popup.d.ts +0 -1
- package/internal/Popup/Popup.js +5 -5
- package/internal/Popup/Popup.js.map +1 -1
- package/internal/Popup/Popup.styles.d.ts +21 -21
- package/internal/Popup/Popup.styles.js +22 -67
- package/internal/Popup/Popup.styles.js.map +1 -1
- package/internal/Popup/PopupPin.d.ts +0 -1
- package/internal/Popup/PopupPin.js +1 -1
- package/internal/Popup/PopupPin.js.map +1 -1
- package/internal/Popup/PopupPin.styles.d.ts +9 -8
- package/internal/Popup/PopupPin.styles.js +10 -31
- package/internal/Popup/PopupPin.styles.js.map +1 -1
- package/internal/PopupMenu/PopupMenu.d.ts +0 -1
- package/internal/PopupMenu/PopupMenu.js +1 -1
- package/internal/PopupMenu/PopupMenu.js.map +1 -1
- package/internal/PopupMenu/PopupMenu.styles.d.ts +4 -3
- package/internal/PopupMenu/PopupMenu.styles.js +5 -16
- package/internal/PopupMenu/PopupMenu.styles.js.map +1 -1
- package/internal/RenderContainer/RenderInnerContainer.js +4 -2
- package/internal/RenderContainer/RenderInnerContainer.js.map +1 -1
- package/internal/ResizeDetector/ResizeDetector.d.ts +0 -1
- package/internal/ResizeDetector/ResizeDetector.js +1 -1
- package/internal/ResizeDetector/ResizeDetector.js.map +1 -1
- package/internal/ResizeDetector/ResizeDetector.styles.d.ts +7 -6
- package/internal/ResizeDetector/ResizeDetector.styles.js +8 -25
- package/internal/ResizeDetector/ResizeDetector.styles.js.map +1 -1
- package/internal/SpinnerIcon/SpinnerIcon.js +2 -2
- package/internal/SpinnerIcon/SpinnerIcon.js.map +1 -1
- package/internal/SpinnerIcon/SpinnerIcon.styles.d.ts +6 -5
- package/internal/SpinnerIcon/SpinnerIcon.styles.js +7 -22
- package/internal/SpinnerIcon/SpinnerIcon.styles.js.map +1 -1
- package/internal/TextWidthHelper/TextWidthHelper.d.ts +0 -1
- package/internal/TextWidthHelper/TextWidthHelper.js +1 -1
- package/internal/TextWidthHelper/TextWidthHelper.js.map +1 -1
- package/internal/TextWidthHelper/TextWidthHelper.styles.d.ts +4 -3
- package/internal/TextWidthHelper/TextWidthHelper.styles.js +5 -16
- package/internal/TextWidthHelper/TextWidthHelper.styles.js.map +1 -1
- package/internal/TimeInput/TimeFragments.js +19 -15
- package/internal/TimeInput/TimeFragments.js.map +1 -1
- package/internal/TimeInput/TimeFragments.styles.d.ts +19 -31
- package/internal/TimeInput/TimeFragments.styles.js +20 -76
- package/internal/TimeInput/TimeFragments.styles.js.map +1 -1
- package/internal/TimeInput/TimeInput.js +4 -4
- package/internal/TimeInput/TimeInput.js.map +1 -1
- package/internal/TimeInput/TimeInput.styles.d.ts +6 -6
- package/internal/TimeInput/TimeInput.styles.js +7 -22
- package/internal/TimeInput/TimeInput.styles.js.map +1 -1
- package/internal/icons2022/BaseIcon.js +8 -1
- package/internal/icons2022/BaseIcon.js.map +1 -1
- package/internal/icons2022/BaseIcon.styles.d.ts +5 -2
- package/internal/icons2022/BaseIcon.styles.js +6 -14
- package/internal/icons2022/BaseIcon.styles.js.map +1 -1
- package/internal/icons2022/LoadingIcon.js +3 -5
- package/internal/icons2022/LoadingIcon.js.map +1 -1
- package/internal/themes/BasicTheme.d.ts +10 -0
- package/internal/themes/BasicTheme.js +17 -6
- package/internal/themes/BasicTheme.js.map +1 -1
- package/internal/themes/DarkTheme6_0.js +62 -342
- package/internal/themes/DarkTheme6_0.js.map +1 -1
- package/internal/themes/DarkTheme6_1.js +11 -3
- package/internal/themes/DarkTheme6_1.js.map +1 -1
- package/internal/themes/DarkTheme6_4.js +11 -1
- package/internal/themes/DarkTheme6_4.js.map +1 -1
- package/lib/Upgrades.d.ts +12 -2
- package/lib/Upgrades.js +12 -16
- package/lib/Upgrades.js.map +1 -1
- package/lib/classNames.generated.d.ts +1235 -0
- package/lib/classNames.generated.js +1233 -0
- package/lib/classNames.generated.js.map +1 -0
- package/lib/globalObject.js +4 -1
- package/lib/globalObject.js.map +1 -1
- package/lib/renderEnvironment/RenderEnvironmentContext.d.ts +38 -6
- package/lib/renderEnvironment/RenderEnvironmentContext.js +21 -19
- package/lib/renderEnvironment/RenderEnvironmentContext.js.map +1 -1
- package/lib/renderEnvironment/RenderEnvironmentDecorator.js +6 -3
- package/lib/renderEnvironment/RenderEnvironmentDecorator.js.map +1 -1
- package/lib/styles/baselineCompensation.d.ts +63 -0
- package/lib/styles/baselineCompensation.js +122 -0
- package/lib/styles/baselineCompensation.js.map +1 -0
- package/lib/theming/Emotion.d.ts +43 -9
- package/lib/theming/Emotion.js +70 -35
- package/lib/theming/Emotion.js.map +1 -1
- package/lib/theming/declaredTheme.d.ts +43 -0
- package/lib/theming/declaredTheme.js +56 -0
- package/lib/theming/declaredTheme.js.map +1 -0
- package/lib/theming/hashString.d.ts +19 -0
- package/lib/theming/hashString.js +52 -0
- package/lib/theming/hashString.js.map +1 -0
- package/lib/theming/staticStyles.d.ts +17 -0
- package/lib/theming/staticStyles.js +8 -0
- package/lib/theming/staticStyles.js.map +1 -0
- package/lib/theming/staticThemeDelta.d.ts +17 -0
- package/lib/theming/staticThemeDelta.js +37 -0
- package/lib/theming/staticThemeDelta.js.map +1 -0
- package/lib/theming/staticThemeVars.d.ts +21 -0
- package/lib/theming/staticThemeVars.js +35 -0
- package/lib/theming/staticThemeVars.js.map +1 -0
- package/lib/theming/themeCssVarsClass.d.ts +89 -0
- package/lib/theming/themeCssVarsClass.js +253 -0
- package/lib/theming/themeCssVarsClass.js.map +1 -0
- package/lib/theming/themeCssVarsDelta.d.ts +13 -0
- package/lib/theming/themeCssVarsDelta.js +67 -0
- package/lib/theming/themeCssVarsDelta.js.map +1 -0
- package/lib/theming/themeToCssVars.d.ts +47 -0
- package/lib/theming/themeToCssVars.js +861 -0
- package/lib/theming/themeToCssVars.js.map +1 -0
- package/package.json +47 -6
- package/react-ui-tailwind.css +544 -0
- package/react-ui-themes.css +8628 -0
- package/react-ui-token-map.json +9029 -0
- package/react-ui.css +7776 -0
- package/react-ui.layer.css +7778 -0
- package/themes/dark-6-0.css +1439 -0
- package/themes/dark-6-0.scoped.css +1439 -0
- package/themes/dark-6-1.css +1439 -0
- package/themes/dark-6-1.scoped.css +1439 -0
- package/themes/dark.css +1439 -0
- package/themes/dark.scoped.css +1439 -0
- package/themes/light-6-0.css +1437 -0
- package/themes/light-6-0.scoped.css +1437 -0
- package/themes/light-6-1.css +1437 -0
- package/themes/light-6-1.scoped.css +1437 -0
- package/themes/light.css +1437 -0
- package/themes/light.scoped.css +1437 -0
- package/components/Button/Button.mixins.d.ts +0 -4
- package/components/Button/Button.mixins.js +0 -21
- package/components/Button/Button.mixins.js.map +0 -1
- package/components/Checkbox/Checkbox.mixins.d.ts +0 -4
- package/components/Checkbox/Checkbox.mixins.js +0 -18
- package/components/Checkbox/Checkbox.mixins.js.map +0 -1
- package/components/FileUploader/FileUploader.mixins.d.ts +0 -1
- package/components/FileUploader/FileUploader.mixins.js +0 -4
- package/components/FileUploader/FileUploader.mixins.js.map +0 -1
- package/components/Link/Link.mixins.d.ts +0 -2
- package/components/Link/Link.mixins.js +0 -7
- package/components/Link/Link.mixins.js.map +0 -1
- package/components/MenuFooter/MenuFooter.mixins.d.ts +0 -2
- package/components/MenuFooter/MenuFooter.mixins.js +0 -8
- package/components/MenuFooter/MenuFooter.mixins.js.map +0 -1
- package/components/MenuHeader/MenuHeader.mixins.d.ts +0 -2
- package/components/MenuHeader/MenuHeader.mixins.js +0 -8
- package/components/MenuHeader/MenuHeader.mixins.js.map +0 -1
- package/components/Radio/Radio.mixins.d.ts +0 -7
- package/components/Radio/Radio.mixins.js +0 -30
- package/components/Radio/Radio.mixins.js.map +0 -1
- package/components/Tabs/helpers.d.ts +0 -6
- package/components/Tabs/helpers.js +0 -25
- package/components/Tabs/helpers.js.map +0 -1
- package/components/Textarea/Textarea.mixins.d.ts +0 -2
- package/components/Textarea/Textarea.mixins.js +0 -7
- package/components/Textarea/Textarea.mixins.js.map +0 -1
- package/components/Toggle/Toggle.mixins.d.ts +0 -8
- package/components/Toggle/Toggle.mixins.js +0 -32
- package/components/Toggle/Toggle.mixins.js.map +0 -1
- package/components/Token/Token.mixins.d.ts +0 -1
- package/components/Token/Token.mixins.js +0 -4
- package/components/Token/Token.mixins.js.map +0 -1
- package/components/TokenInput/TokenInput.mixins.d.ts +0 -2
- package/components/TokenInput/TokenInput.mixins.js +0 -7
- package/components/TokenInput/TokenInput.mixins.js.map +0 -1
- package/lib/chars.d.ts +0 -8
- package/lib/chars.js +0 -9
- package/lib/chars.js.map +0 -1
- package/lib/styles/Mixins.d.ts +0 -2
- package/lib/styles/Mixins.js +0 -7
- package/lib/styles/Mixins.js.map +0 -1
- package/lib/styles/UiFont.d.ts +0 -3
- package/lib/styles/UiFont.js +0 -18
- package/lib/styles/UiFont.js.map +0 -1
- package/lib/styles/getLabGrotesqueBaselineCompensation.d.ts +0 -1
- package/lib/styles/getLabGrotesqueBaselineCompensation.js +0 -10
- package/lib/styles/getLabGrotesqueBaselineCompensation.js.map +0 -1
- package/lib/theming/AnimationKeyframes.d.ts +0 -7
- package/lib/theming/AnimationKeyframes.js +0 -24
- package/lib/theming/AnimationKeyframes.js.map +0 -1
- package/lib/theming/useTheme.d.ts +0 -2
- package/lib/theming/useTheme.js +0 -6
- package/lib/theming/useTheme.js.map +0 -1
- package/typings/stylis-plugin-extra-scope.d.ts +0 -3
|
@@ -21,8 +21,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
21
21
|
import React, { useContext, useRef, useState } from 'react';
|
|
22
22
|
import { LocaleContext } from '../../../lib/locale/index.js';
|
|
23
23
|
import { pluralize } from '../../../lib/pluralize.js';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
24
|
+
import { useStyles } from '../../../lib/renderEnvironment/index.js';
|
|
25
|
+
import { concatClassNames as cx } from '../../../lib/theming/Emotion.js';
|
|
26
26
|
import { FileUploaderControlContext } from '../FileUploaderControlContext.js';
|
|
27
27
|
import { FileUploaderFileStatus } from '../fileUtils.js';
|
|
28
28
|
import { useControlLocale } from '../hooks/useControlLocale.js';
|
|
@@ -34,11 +34,9 @@ export var FileUploaderFileDataTids = {
|
|
|
34
34
|
export var FileUploaderFileList = function (props) {
|
|
35
35
|
var renderFile = props.renderFile, size = props.size, _a = props.view, view = _a === void 0 ? 'row' : _a, _b = props.validationSummary, validationSummary = _b === void 0 ? 'auto' : _b, _c = props.validationSummaryStart, validationSummaryStart = _c === void 0 ? 5 : _c, withValidationTooltip = props.withValidationTooltip, validationTooltipPosition = props.validationTooltipPosition, withWarningIcon = props.withWarningIcon, _d = props.disabled, disabled = _d === void 0 ? false : _d, onRemove = props.onRemove;
|
|
36
36
|
var files = useContext(FileUploaderControlContext).files;
|
|
37
|
-
var cx = useEmotion().cx;
|
|
38
37
|
var jsStyles = useStyles(getJsStyles);
|
|
39
38
|
var jsRowStyles = useStyles(getJsRowStyles);
|
|
40
39
|
var jsTileStyles = useStyles(getJsTileStyles);
|
|
41
|
-
var theme = useContext(ThemeContext);
|
|
42
40
|
var locale = useControlLocale();
|
|
43
41
|
var langCode = useContext(LocaleContext).langCode;
|
|
44
42
|
var _e = useState(null), focusedByTab = _e[0], setFocusedByTab = _e[1];
|
|
@@ -67,14 +65,14 @@ export var FileUploaderFileList = function (props) {
|
|
|
67
65
|
var isTileView = view === 'tile';
|
|
68
66
|
var jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;
|
|
69
67
|
var fileWrapperClass = useFileUploaderSize(size, {
|
|
70
|
-
small: jsViewStyles.fileWrapperSmall(
|
|
71
|
-
medium: jsViewStyles.fileWrapperMedium(
|
|
72
|
-
large: jsViewStyles.fileWrapperLarge(
|
|
68
|
+
small: jsViewStyles.fileWrapperSmall(),
|
|
69
|
+
medium: jsViewStyles.fileWrapperMedium(),
|
|
70
|
+
large: jsViewStyles.fileWrapperLarge(),
|
|
73
71
|
});
|
|
74
72
|
var summaryClass = useFileUploaderSize(size, {
|
|
75
|
-
small: jsStyles.summarySmall(
|
|
76
|
-
medium: jsStyles.summaryMedium(
|
|
77
|
-
large: jsStyles.summaryLarge(
|
|
73
|
+
small: jsStyles.summarySmall(),
|
|
74
|
+
medium: jsStyles.summaryMedium(),
|
|
75
|
+
large: jsStyles.summaryLarge(),
|
|
78
76
|
});
|
|
79
77
|
var renderSummary = function () {
|
|
80
78
|
if (validationSummary === 'disabled') {
|
|
@@ -88,17 +86,17 @@ export var FileUploaderFileList = function (props) {
|
|
|
88
86
|
if (!(warningLength + errorLength)) {
|
|
89
87
|
return null;
|
|
90
88
|
}
|
|
91
|
-
return (React.createElement("div", { className: cx(jsStyles.summary(
|
|
92
|
-
errorLength > 0 && (React.createElement("span", { className: jsStyles.summaryErrorText(
|
|
89
|
+
return (React.createElement("div", { className: cx(jsStyles.summary(), summaryClass) },
|
|
90
|
+
errorLength > 0 && (React.createElement("span", { className: jsStyles.summaryErrorText() },
|
|
93
91
|
errorLength,
|
|
94
92
|
"\u00A0",
|
|
95
93
|
pluralize.apply(void 0, __spreadArray([langCode, errorLength], locale.errors, false)))),
|
|
96
|
-
warningLength > 0 && (React.createElement("span", { className: jsStyles.summaryWarningText(
|
|
94
|
+
warningLength > 0 && (React.createElement("span", { className: jsStyles.summaryWarningText() },
|
|
97
95
|
warningLength,
|
|
98
96
|
"\u00A0",
|
|
99
97
|
pluralize.apply(void 0, __spreadArray([langCode, warningLength], locale.warnings, false))))));
|
|
100
98
|
};
|
|
101
|
-
return (React.createElement("div", { "data-tid": FileUploaderFileDataTids.fileList, className: jsViewStyles.fileListWrapper(
|
|
99
|
+
return (React.createElement("div", { "data-tid": FileUploaderFileDataTids.fileList, className: jsViewStyles.fileListWrapper() },
|
|
102
100
|
renderSummary(),
|
|
103
101
|
files.map(function (file, idx) {
|
|
104
102
|
var _a, _b, _c, _d, _e;
|
|
@@ -107,16 +105,16 @@ export var FileUploaderFileList = function (props) {
|
|
|
107
105
|
var hasHover = hovered === file.id;
|
|
108
106
|
var hasError = file.status === FileUploaderFileStatus.Error;
|
|
109
107
|
var hasWarning = file.status === FileUploaderFileStatus.Warning;
|
|
110
|
-
var fileWrapperClassNames = cx(jsStyles.fileWrapper(
|
|
111
|
-
_b[jsStyles.errorFile(
|
|
112
|
-
_b[jsViewStyles.errorFileFocus(
|
|
108
|
+
var fileWrapperClassNames = cx(jsStyles.fileWrapper(), fileWrapperClass, __assign(__assign(__assign(__assign((_a = {}, _a[jsStyles.fileWrapperFocus()] = hasFocus, _a[jsStyles.fileWrapperHover()] = hasHover, _a), (hasError && (_b = {},
|
|
109
|
+
_b[jsStyles.errorFile()] = !isTileView || hasHover,
|
|
110
|
+
_b[jsViewStyles.errorFileFocus()] = hasFocus,
|
|
113
111
|
_b))), (!isTileView &&
|
|
114
112
|
hasError && (_c = {},
|
|
115
113
|
_c[jsStyles.removeBorderTopRadius()] = ((_f = files[idx - 1]) === null || _f === void 0 ? void 0 : _f.status) === FileUploaderFileStatus.Error,
|
|
116
114
|
_c[jsStyles.removeBorderBottomRadius()] = ((_g = files[idx + 1]) === null || _g === void 0 ? void 0 : _g.status) === FileUploaderFileStatus.Error,
|
|
117
115
|
_c))), (hasWarning && (_d = {},
|
|
118
|
-
_d[jsStyles.warningFile(
|
|
119
|
-
_d[jsViewStyles.warningFileFocus(
|
|
116
|
+
_d[jsStyles.warningFile()] = !isTileView || hasHover,
|
|
117
|
+
_d[jsViewStyles.warningFileFocus()] = hasFocus,
|
|
120
118
|
_d))), (!isTileView &&
|
|
121
119
|
hasWarning && (_e = {},
|
|
122
120
|
_e[jsStyles.removeBorderTopRadius()] = ((_h = files[idx - 1]) === null || _h === void 0 ? void 0 : _h.status) === FileUploaderFileStatus.Warning,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderFileList.js","sourceRoot":"","sources":["FileUploaderFileList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEp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qBAAqB,EAChC,YAAY,EAAE,cAAM,OAAA,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAzB,CAAyB,EAC7C,YAAY,EAAE,cAAM,OAAA,gBAAgB,EAAE,EAAlB,CAAkB,EACtC,OAAO,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,EAAxB,CAAwB,EACvC,MAAM,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAArB,CAAqB;gBAEnC,6BAAK,SAAS,EAAE,YAAY,CAAC,IAAI,EAAE,IAAG,WAAW,CAAO,CACpD,CACP,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,mBAAmB,GAAG,sBAAsB,CAAC;AAClE,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC","sourcesContent":["import React, { useContext, useRef, useState } from 'react';\n\nimport type { PopupPositionsType, ShortPopupPositionsType } from '../../../internal/Popup/index.js';\nimport { LocaleContext } from '../../../lib/locale/index.js';\nimport { pluralize } from '../../../lib/pluralize.js';\nimport { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { FileUploaderControlContext } from '../FileUploaderControlContext.js';\nimport type { FileUploaderFileProps } from '../FileUploaderFile.js';\nimport { FileUploaderFileStatus, type FileUploaderValidationSummary, type FileUploaderView } from '../fileUtils.js';\nimport { useControlLocale } from '../hooks/useControlLocale.js';\nimport { useFileUploaderSize } from '../hooks/useFileUploaderSize.js';\nimport { getJsRowStyles, getJsStyles, getJsTileStyles } from './FileUploaderFileList.styles.js';\n\ninterface FileUploaderFileListProps {\n renderFile: (props: FileUploaderFileProps) => React.ReactNode;\n size: SizeProp;\n view?: FileUploaderView;\n validationSummary?: FileUploaderValidationSummary;\n validationSummaryStart?: number;\n onRemove(fileId: string): void;\n withValidationTooltip?: boolean;\n validationTooltipPosition?: ShortPopupPositionsType | PopupPositionsType;\n withWarningIcon?: boolean;\n disabled?: boolean;\n}\n\nexport const FileUploaderFileDataTids = {\n fileList: 'FileUploader__fileList',\n} as const;\n\nexport const FileUploaderFileList = (props: FileUploaderFileListProps): React.ReactElement => {\n const {\n renderFile,\n size,\n view = 'row',\n validationSummary = 'auto',\n validationSummaryStart = 5,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n disabled = false,\n onRemove,\n } = props;\n const { files } = useContext(FileUploaderControlContext);\n const { cx } = useEmotion();\n const jsStyles = useStyles(getJsStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n const jsTileStyles = useStyles(getJsTileStyles);\n const theme = useContext(ThemeContext);\n const locale = useControlLocale();\n const { langCode } = useContext(LocaleContext);\n\n const [focusedByTab, setFocusedByTab] = useState<string | null>(null);\n const [hovered, setHovered] = useState<string | null>(null);\n const mouseIsOverRef = useRef(false);\n\n const handleMouseEnter = (index: string | null) => {\n setHovered(index);\n mouseIsOverRef.current = true;\n };\n\n const handleMouseLeave = () => {\n setHovered(null);\n mouseIsOverRef.current = false;\n };\n\n const handleRemoveItem = (index: string) => {\n onRemove(index);\n if (hovered === index && mouseIsOverRef.current) {\n const currentIndex = files.findIndex((file) => file.id === index);\n if (currentIndex !== -1 && files[currentIndex + 1]) {\n setHovered(files[currentIndex + 1].id);\n } else {\n setHovered(null);\n }\n }\n };\n\n const isTileView = view === 'tile';\n const jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;\n\n const fileWrapperClass = useFileUploaderSize(size, {\n small: jsViewStyles.fileWrapperSmall(theme),\n medium: jsViewStyles.fileWrapperMedium(theme),\n large: jsViewStyles.fileWrapperLarge(theme),\n });\n\n const summaryClass = useFileUploaderSize(size, {\n small: jsStyles.summarySmall(theme),\n medium: jsStyles.summaryMedium(theme),\n large: jsStyles.summaryLarge(theme),\n });\n\n const renderSummary = () => {\n if (validationSummary === 'disabled') {\n return null;\n }\n\n const warningLength = files.filter((file) => file.status === FileUploaderFileStatus.Warning).length;\n const errorLength = files.filter((file) => file.status === FileUploaderFileStatus.Error).length;\n\n if (validationSummary === 'auto' && files.length < validationSummaryStart) {\n return null;\n }\n\n if (!(warningLength + errorLength)) {\n return null;\n }\n\n return (\n <div className={cx(jsStyles.summary(theme), summaryClass)}>\n {errorLength > 0 && (\n <span className={jsStyles.summaryErrorText(theme)}>\n {errorLength} {pluralize(langCode, errorLength, ...locale.errors)}\n </span>\n )}\n {warningLength > 0 && (\n <span className={jsStyles.summaryWarningText(theme)}>\n {warningLength} {pluralize(langCode, warningLength, ...locale.warnings)}\n </span>\n )}\n </div>\n );\n };\n\n return (\n <div data-tid={FileUploaderFileDataTids.fileList} className={jsViewStyles.fileListWrapper(theme)}>\n {renderSummary()}\n {files.map((file, idx) => {\n const hasFocus = focusedByTab === file.id;\n const hasHover = hovered === file.id;\n const hasError = file.status === FileUploaderFileStatus.Error;\n const hasWarning = file.status === FileUploaderFileStatus.Warning;\n\n const fileWrapperClassNames = cx(jsStyles.fileWrapper(theme), fileWrapperClass, {\n [jsStyles.fileWrapperFocus(theme)]: hasFocus,\n [jsStyles.fileWrapperHover(theme)]: hasHover,\n ...(hasError && {\n [jsStyles.errorFile(theme)]: !isTileView || hasHover,\n [jsViewStyles.errorFileFocus(theme)]: hasFocus,\n }),\n ...(!isTileView &&\n hasError && {\n [jsStyles.removeBorderTopRadius()]: files[idx - 1]?.status === FileUploaderFileStatus.Error,\n [jsStyles.removeBorderBottomRadius()]: files[idx + 1]?.status === FileUploaderFileStatus.Error,\n }),\n ...(hasWarning && {\n [jsStyles.warningFile(theme)]: !isTileView || hasHover,\n [jsViewStyles.warningFileFocus(theme)]: hasFocus,\n }),\n ...(!isTileView &&\n hasWarning && {\n [jsStyles.removeBorderTopRadius()]: files[idx - 1]?.status === FileUploaderFileStatus.Warning,\n [jsStyles.removeBorderBottomRadius()]: files[idx + 1]?.status === FileUploaderFileStatus.Warning,\n }),\n });\n\n const fileProps: FileUploaderFileProps = {\n file,\n multiple: true,\n size,\n view,\n disabled,\n hovered: hasHover,\n focused: hasFocus,\n onRemove: handleRemoveItem,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n };\n\n const fileElement = renderFile(fileProps);\n\n return (\n <div\n key={file.id}\n className={fileWrapperClassNames}\n onMouseEnter={() => handleMouseEnter(file.id)}\n onMouseLeave={() => handleMouseLeave()}\n onFocus={() => setFocusedByTab(file.id)}\n onBlur={() => setFocusedByTab(null)}\n >\n <div className={jsViewStyles.file()}>{fileElement}</div>\n </div>\n );\n })}\n </div>\n );\n};\n\nFileUploaderFileList.__KONTUR_REACT_UI__ = 'FileUploaderFileList';\nFileUploaderFileList.displayName = 'FileUploaderFileList';\n"]}
|
|
1
|
+
{"version":3,"file":"FileUploaderFileList.js","sourceRoot":"","sources":["FileUploaderFileList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,gBAAgB,IAAI,EAAE,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAA6D,MAAM,iBAAiB,CAAC;AACpH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAehG,MAAM,CAAC,IAAM,wBAAwB,GAAG;IACtC,QAAQ,EAAE,wBAAwB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,GAAC,QAAQ,CAAC,wBAAwB,EAAE,IAAG,CAAA,MAAA,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,0CAAE,MAAM,MAAK,sBAAsB,CAAC,OAAO;mBACjG,CAAC,EACJ,CAAC;YAEH,IAAM,SAAS,GAA0B;gBACvC,IAAI,MAAA;gBACJ,QAAQ,EAAE,IAAI;gBACd,IAAI,MAAA;gBACJ,IAAI,MAAA;gBACJ,QAAQ,UAAA;gBACR,OAAO,EAAE,QAAQ;gBACjB,OAAO,EAAE,QAAQ;gBACjB,QAAQ,EAAE,gBAAgB;gBAC1B,qBAAqB,uBAAA;gBACrB,yBAAyB,2BAAA;gBACzB,eAAe,iBAAA;aAChB,CAAC;YAEF,IAAM,WAAW,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;YAE1C,OAAO,CACL,6BACE,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,SAAS,EAAE,qBAAqB,EAChC,YAAY,EAAE,cAAM,OAAA,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAzB,CAAyB,EAC7C,YAAY,EAAE,cAAM,OAAA,gBAAgB,EAAE,EAAlB,CAAkB,EACtC,OAAO,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,EAAxB,CAAwB,EACvC,MAAM,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAArB,CAAqB;gBAEnC,6BAAK,SAAS,EAAE,YAAY,CAAC,IAAI,EAAE,IAAG,WAAW,CAAO,CACpD,CACP,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,mBAAmB,GAAG,sBAAsB,CAAC;AAClE,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC","sourcesContent":["import React, { useContext, useRef, useState } from 'react';\n\nimport type { PopupPositionsType, ShortPopupPositionsType } from '../../../internal/Popup/index.js';\nimport { LocaleContext } from '../../../lib/locale/index.js';\nimport { pluralize } from '../../../lib/pluralize.js';\nimport { useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { concatClassNames as cx } from '../../../lib/theming/Emotion.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { FileUploaderControlContext } from '../FileUploaderControlContext.js';\nimport type { FileUploaderFileProps } from '../FileUploaderFile.js';\nimport { FileUploaderFileStatus, type FileUploaderValidationSummary, type FileUploaderView } from '../fileUtils.js';\nimport { useControlLocale } from '../hooks/useControlLocale.js';\nimport { useFileUploaderSize } from '../hooks/useFileUploaderSize.js';\nimport { getJsRowStyles, getJsStyles, getJsTileStyles } from './FileUploaderFileList.styles.js';\n\ninterface FileUploaderFileListProps {\n renderFile: (props: FileUploaderFileProps) => React.ReactNode;\n size: SizeProp;\n view?: FileUploaderView;\n validationSummary?: FileUploaderValidationSummary;\n validationSummaryStart?: number;\n onRemove(fileId: string): void;\n withValidationTooltip?: boolean;\n validationTooltipPosition?: ShortPopupPositionsType | PopupPositionsType;\n withWarningIcon?: boolean;\n disabled?: boolean;\n}\n\nexport const FileUploaderFileDataTids = {\n fileList: 'FileUploader__fileList',\n} as const;\n\nexport const FileUploaderFileList = (props: FileUploaderFileListProps): React.ReactElement => {\n const {\n renderFile,\n size,\n view = 'row',\n validationSummary = 'auto',\n validationSummaryStart = 5,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n disabled = false,\n onRemove,\n } = props;\n const { files } = useContext(FileUploaderControlContext);\n const jsStyles = useStyles(getJsStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n const jsTileStyles = useStyles(getJsTileStyles);\n const locale = useControlLocale();\n const { langCode } = useContext(LocaleContext);\n\n const [focusedByTab, setFocusedByTab] = useState<string | null>(null);\n const [hovered, setHovered] = useState<string | null>(null);\n const mouseIsOverRef = useRef(false);\n\n const handleMouseEnter = (index: string | null) => {\n setHovered(index);\n mouseIsOverRef.current = true;\n };\n\n const handleMouseLeave = () => {\n setHovered(null);\n mouseIsOverRef.current = false;\n };\n\n const handleRemoveItem = (index: string) => {\n onRemove(index);\n if (hovered === index && mouseIsOverRef.current) {\n const currentIndex = files.findIndex((file) => file.id === index);\n if (currentIndex !== -1 && files[currentIndex + 1]) {\n setHovered(files[currentIndex + 1].id);\n } else {\n setHovered(null);\n }\n }\n };\n\n const isTileView = view === 'tile';\n const jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;\n\n const fileWrapperClass = useFileUploaderSize(size, {\n small: jsViewStyles.fileWrapperSmall(),\n medium: jsViewStyles.fileWrapperMedium(),\n large: jsViewStyles.fileWrapperLarge(),\n });\n\n const summaryClass = useFileUploaderSize(size, {\n small: jsStyles.summarySmall(),\n medium: jsStyles.summaryMedium(),\n large: jsStyles.summaryLarge(),\n });\n\n const renderSummary = () => {\n if (validationSummary === 'disabled') {\n return null;\n }\n\n const warningLength = files.filter((file) => file.status === FileUploaderFileStatus.Warning).length;\n const errorLength = files.filter((file) => file.status === FileUploaderFileStatus.Error).length;\n\n if (validationSummary === 'auto' && files.length < validationSummaryStart) {\n return null;\n }\n\n if (!(warningLength + errorLength)) {\n return null;\n }\n\n return (\n <div className={cx(jsStyles.summary(), summaryClass)}>\n {errorLength > 0 && (\n <span className={jsStyles.summaryErrorText()}>\n {errorLength} {pluralize(langCode, errorLength, ...locale.errors)}\n </span>\n )}\n {warningLength > 0 && (\n <span className={jsStyles.summaryWarningText()}>\n {warningLength} {pluralize(langCode, warningLength, ...locale.warnings)}\n </span>\n )}\n </div>\n );\n };\n\n return (\n <div data-tid={FileUploaderFileDataTids.fileList} className={jsViewStyles.fileListWrapper()}>\n {renderSummary()}\n {files.map((file, idx) => {\n const hasFocus = focusedByTab === file.id;\n const hasHover = hovered === file.id;\n const hasError = file.status === FileUploaderFileStatus.Error;\n const hasWarning = file.status === FileUploaderFileStatus.Warning;\n\n const fileWrapperClassNames = cx(jsStyles.fileWrapper(), fileWrapperClass, {\n [jsStyles.fileWrapperFocus()]: hasFocus,\n [jsStyles.fileWrapperHover()]: hasHover,\n ...(hasError && {\n [jsStyles.errorFile()]: !isTileView || hasHover,\n [jsViewStyles.errorFileFocus()]: hasFocus,\n }),\n ...(!isTileView &&\n hasError && {\n [jsStyles.removeBorderTopRadius()]: files[idx - 1]?.status === FileUploaderFileStatus.Error,\n [jsStyles.removeBorderBottomRadius()]: files[idx + 1]?.status === FileUploaderFileStatus.Error,\n }),\n ...(hasWarning && {\n [jsStyles.warningFile()]: !isTileView || hasHover,\n [jsViewStyles.warningFileFocus()]: hasFocus,\n }),\n ...(!isTileView &&\n hasWarning && {\n [jsStyles.removeBorderTopRadius()]: files[idx - 1]?.status === FileUploaderFileStatus.Warning,\n [jsStyles.removeBorderBottomRadius()]: files[idx + 1]?.status === FileUploaderFileStatus.Warning,\n }),\n });\n\n const fileProps: FileUploaderFileProps = {\n file,\n multiple: true,\n size,\n view,\n disabled,\n hovered: hasHover,\n focused: hasFocus,\n onRemove: handleRemoveItem,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n };\n\n const fileElement = renderFile(fileProps);\n\n return (\n <div\n key={file.id}\n className={fileWrapperClassNames}\n onMouseEnter={() => handleMouseEnter(file.id)}\n onMouseLeave={() => handleMouseLeave()}\n onFocus={() => setFocusedByTab(file.id)}\n onBlur={() => setFocusedByTab(null)}\n >\n <div className={jsViewStyles.file()}>{fileElement}</div>\n </div>\n );\n })}\n </div>\n );\n};\n\nFileUploaderFileList.__KONTUR_REACT_UI__ = 'FileUploaderFileList';\nFileUploaderFileList.displayName = 'FileUploaderFileList';\n"]}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
summary(t: Theme): string;
|
|
11
|
-
summaryErrorText(t: Theme): string;
|
|
12
|
-
summaryWarningText(t: Theme): string;
|
|
13
|
-
summarySmall(t: Theme): string;
|
|
14
|
-
summaryMedium(t: Theme): string;
|
|
15
|
-
summaryLarge(t: Theme): string;
|
|
1
|
+
/** Правила — в `FileUploaderFileList.css`; здесь только имена классов. */
|
|
2
|
+
export declare const getJsRowStyles: (ignored?: unknown) => import("../../../lib/theming/staticStyles.js").StaticStyles<{
|
|
3
|
+
file: string;
|
|
4
|
+
fileListWrapper: string;
|
|
5
|
+
fileWrapperSmall: string;
|
|
6
|
+
fileWrapperMedium: string;
|
|
7
|
+
fileWrapperLarge: string;
|
|
8
|
+
errorFileFocus: string;
|
|
9
|
+
warningFileFocus: string;
|
|
16
10
|
}>;
|
|
17
|
-
export declare const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
export declare const getJsStyles: (ignored?: unknown) => import("../../../lib/theming/staticStyles.js").StaticStyles<{
|
|
12
|
+
fileWrapper: string;
|
|
13
|
+
fileWrapperFocus: string;
|
|
14
|
+
fileWrapperHover: string;
|
|
15
|
+
warningFile: string;
|
|
16
|
+
errorFile: string;
|
|
17
|
+
removeBorderTopRadius: string;
|
|
18
|
+
removeBorderBottomRadius: string;
|
|
19
|
+
summary: string;
|
|
20
|
+
summaryErrorText: string;
|
|
21
|
+
summaryWarningText: string;
|
|
22
|
+
summarySmall: string;
|
|
23
|
+
summaryMedium: string;
|
|
24
|
+
summaryLarge: string;
|
|
25
25
|
}>;
|
|
26
|
-
export declare const getJsTileStyles: import("../../../lib/theming/
|
|
27
|
-
file
|
|
28
|
-
fileListWrapper
|
|
29
|
-
fileWrapperSmall
|
|
30
|
-
fileWrapperMedium
|
|
31
|
-
fileWrapperLarge
|
|
32
|
-
errorFileFocus
|
|
33
|
-
warningFileFocus
|
|
26
|
+
export declare const getJsTileStyles: (ignored?: unknown) => import("../../../lib/theming/staticStyles.js").StaticStyles<{
|
|
27
|
+
file: string;
|
|
28
|
+
fileListWrapper: string;
|
|
29
|
+
fileWrapperSmall: string;
|
|
30
|
+
fileWrapperMedium: string;
|
|
31
|
+
fileWrapperLarge: string;
|
|
32
|
+
errorFileFocus: string;
|
|
33
|
+
warningFileFocus: string;
|
|
34
34
|
}>;
|
|
@@ -1,103 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
fileWrapperFocus: function (t) {
|
|
13
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: ", " solid ", ";\n box-shadow: 0 0 0 1px ", ";\n "], ["\n border: ", " solid ", ";\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderBorderWidth, t.fileUploaderBorderColorFocus, t.fileUploaderBorderColorFocus);
|
|
14
|
-
},
|
|
15
|
-
fileWrapperHover: function (t) {
|
|
16
|
-
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: ", ";\n border-color: ", ";\n "], ["\n background: ", ";\n border-color: ", ";\n "])), t.fileUploaderHoveredBg, t.fileUploaderHoveredBorderColor);
|
|
17
|
-
},
|
|
18
|
-
warningFile: function (t) {
|
|
19
|
-
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n border-radius: ", ";\n }\n &::before {\n background: ", ";\n }\n "], ["\n background: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n border-radius: ", ";\n }\n &::before {\n background: ", ";\n }\n "])), t.fileUploaderWarningBgColor, t.fileUploaderValidationTextColor, t.fileUploaderWarningBgHoverColor, t.fileUploaderBorderRadius, t.fileUploaderWarningBgColor);
|
|
20
|
-
},
|
|
21
|
-
errorFile: function (t) {
|
|
22
|
-
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n border-radius: ", ";\n }\n &::before {\n background: ", ";\n }\n "], ["\n background: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n border-radius: ", ";\n }\n &::before {\n background: ", ";\n }\n "])), t.fileUploaderErrorBgColor, t.fileUploaderValidationTextColor, t.fileUploaderErrorBgHoverColor, t.fileUploaderBorderRadius, t.fileUploaderErrorBgColor);
|
|
23
|
-
},
|
|
24
|
-
removeBorderTopRadius: function () {
|
|
25
|
-
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n &::before {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n "], ["\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n &::before {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n "])));
|
|
26
|
-
},
|
|
27
|
-
removeBorderBottomRadius: function () {
|
|
28
|
-
return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n &::before {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n "], ["\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n &::before {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n "])));
|
|
29
|
-
},
|
|
30
|
-
summary: function (t) {
|
|
31
|
-
return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n border-bottom: 1px solid ", ";\n margin-bottom: ", ";\n order: -1;\n width: 100%;\n box-sizing: border-box;\n "], ["\n display: flex;\n border-bottom: 1px solid ", ";\n margin-bottom: ", ";\n order: -1;\n width: 100%;\n box-sizing: border-box;\n "])), t.tabColorHover, t.fileUploaderListGap);
|
|
32
|
-
},
|
|
33
|
-
summaryErrorText: function (t) {
|
|
34
|
-
return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n "], ["\n color: ", ";\n margin-right: ", ";\n "])), t.fileUploaderErrorTextColor, t.fileUploaderListSummaryTextGap);
|
|
35
|
-
},
|
|
36
|
-
summaryWarningText: function (t) {
|
|
37
|
-
return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.fileUploaderWarningTextColor);
|
|
38
|
-
},
|
|
39
|
-
summarySmall: function (t) {
|
|
40
|
-
return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "])), t.fileUploaderFontSizeSmall, t.fileUploaderLineHeightSmall, t.fileUploaderPaddingYSmall, t.fileUploaderPaddingXSmall);
|
|
41
|
-
},
|
|
42
|
-
summaryMedium: function (t) {
|
|
43
|
-
return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "])), t.fileUploaderFontSizeMedium, t.fileUploaderLineHeightMedium, t.fileUploaderPaddingYMedium, t.fileUploaderPaddingXMedium);
|
|
44
|
-
},
|
|
45
|
-
summaryLarge: function (t) {
|
|
46
|
-
return css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "])), t.fileUploaderFontSizeLarge, t.fileUploaderLineHeightLarge, t.fileUploaderPaddingYLarge, t.fileUploaderPaddingXLarge);
|
|
47
|
-
},
|
|
48
|
-
};
|
|
1
|
+
import { staticStyles } from '../../../lib/theming/staticStyles.js';
|
|
2
|
+
/** Правила — в `FileUploaderFileList.css`; здесь только имена классов. */
|
|
3
|
+
export var getJsRowStyles = staticStyles({
|
|
4
|
+
file: 'react-ui-FileUploaderFileList-JsRow-file',
|
|
5
|
+
fileListWrapper: 'react-ui-FileUploaderFileList-JsRow-fileListWrapper',
|
|
6
|
+
fileWrapperSmall: 'react-ui-FileUploaderFileList-JsRow-fileWrapperSmall',
|
|
7
|
+
fileWrapperMedium: 'react-ui-FileUploaderFileList-JsRow-fileWrapperMedium',
|
|
8
|
+
fileWrapperLarge: 'react-ui-FileUploaderFileList-JsRow-fileWrapperLarge',
|
|
9
|
+
errorFileFocus: 'react-ui-FileUploaderFileList-JsRow-errorFileFocus',
|
|
10
|
+
warningFileFocus: 'react-ui-FileUploaderFileList-JsRow-warningFileFocus',
|
|
49
11
|
});
|
|
50
|
-
export var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
fileWrapperLarge: function (t) {
|
|
66
|
-
return css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), t.fileUploaderPaddingYLarge, t.fileUploaderPaddingXLarge);
|
|
67
|
-
},
|
|
68
|
-
errorFileFocus: function (t) {
|
|
69
|
-
return css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "], ["\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderErrorBgHoverColor, t.fileUploaderBorderWidth, t.fileUploaderBorderColorError, t.fileUploaderBorderRadius, t.fileUploaderBorderColorError);
|
|
70
|
-
},
|
|
71
|
-
warningFileFocus: function (t) {
|
|
72
|
-
return css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "], ["\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderWarningBgHoverColor, t.fileUploaderBorderWidth, t.fileUploaderBorderColorWarning, t.fileUploaderBorderRadius, t.fileUploaderBorderColorWarning);
|
|
73
|
-
},
|
|
74
|
-
};
|
|
12
|
+
export var getJsStyles = staticStyles({
|
|
13
|
+
fileWrapper: 'react-ui-FileUploaderFileList-Js-fileWrapper',
|
|
14
|
+
fileWrapperFocus: 'react-ui-FileUploaderFileList-Js-fileWrapperFocus',
|
|
15
|
+
fileWrapperHover: 'react-ui-FileUploaderFileList-Js-fileWrapperHover',
|
|
16
|
+
warningFile: 'react-ui-FileUploaderFileList-Js-warningFile',
|
|
17
|
+
errorFile: 'react-ui-FileUploaderFileList-Js-errorFile',
|
|
18
|
+
removeBorderTopRadius: 'react-ui-FileUploaderFileList-Js-removeBorderTopRadius',
|
|
19
|
+
removeBorderBottomRadius: 'react-ui-FileUploaderFileList-Js-removeBorderBottomRadius',
|
|
20
|
+
summary: 'react-ui-FileUploaderFileList-Js-summary',
|
|
21
|
+
summaryErrorText: 'react-ui-FileUploaderFileList-Js-summaryErrorText',
|
|
22
|
+
summaryWarningText: 'react-ui-FileUploaderFileList-Js-summaryWarningText',
|
|
23
|
+
summarySmall: 'react-ui-FileUploaderFileList-Js-summarySmall',
|
|
24
|
+
summaryMedium: 'react-ui-FileUploaderFileList-Js-summaryMedium',
|
|
25
|
+
summaryLarge: 'react-ui-FileUploaderFileList-Js-summaryLarge',
|
|
75
26
|
});
|
|
76
|
-
export var getJsTileStyles =
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
fileWrapperSmall: function (t) {
|
|
86
|
-
return css(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n padding: ", ";\n width: ", ";\n "], ["\n padding: ", ";\n width: ", ";\n "])), t.fileUploaderTileFilePaddingSmall, t.fileUploaderTileWidthSmall);
|
|
87
|
-
},
|
|
88
|
-
fileWrapperMedium: function (t) {
|
|
89
|
-
return css(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n padding: ", ";\n width: ", ";\n height: ", ";\n "], ["\n padding: ", ";\n width: ", ";\n height: ", ";\n "])), t.fileUploaderTileFilePaddingMedium, t.fileUploaderTileWidthMedium, t.fileUploaderTileHeightMedium);
|
|
90
|
-
},
|
|
91
|
-
fileWrapperLarge: function (t) {
|
|
92
|
-
return css(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n padding: ", ";\n width: ", ";\n height: ", ";\n "], ["\n padding: ", ";\n width: ", ";\n height: ", ";\n "])), t.fileUploaderTileFilePaddingLarge, t.fileUploaderTileWidthLarge, t.fileUploaderTileHeightLarge);
|
|
93
|
-
},
|
|
94
|
-
errorFileFocus: function (t) {
|
|
95
|
-
return css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "], ["\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderBorderWidth, t.fileUploaderBorderColorError, t.fileUploaderBorderRadius, t.fileUploaderBorderColorError);
|
|
96
|
-
},
|
|
97
|
-
warningFileFocus: function (t) {
|
|
98
|
-
return css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "], ["\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderBorderWidth, t.fileUploaderBorderColorWarning, t.fileUploaderBorderRadius, t.fileUploaderBorderColorWarning);
|
|
99
|
-
},
|
|
100
|
-
};
|
|
27
|
+
export var getJsTileStyles = staticStyles({
|
|
28
|
+
file: 'react-ui-FileUploaderFileList-JsTile-file',
|
|
29
|
+
fileListWrapper: 'react-ui-FileUploaderFileList-JsTile-fileListWrapper',
|
|
30
|
+
fileWrapperSmall: 'react-ui-FileUploaderFileList-JsTile-fileWrapperSmall',
|
|
31
|
+
fileWrapperMedium: 'react-ui-FileUploaderFileList-JsTile-fileWrapperMedium',
|
|
32
|
+
fileWrapperLarge: 'react-ui-FileUploaderFileList-JsTile-fileWrapperLarge',
|
|
33
|
+
errorFileFocus: 'react-ui-FileUploaderFileList-JsTile-errorFileFocus',
|
|
34
|
+
warningFileFocus: 'react-ui-FileUploaderFileList-JsTile-warningFileFocus',
|
|
101
35
|
});
|
|
102
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27;
|
|
103
36
|
//# sourceMappingURL=FileUploaderFileList.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderFileList.styles.js","sourceRoot":"","sources":["FileUploaderFileList.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,MAAM,CAAC,IAAM,WAAW,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAChD,OAAO;QACL,WAAW,YAAC,CAAQ;YAClB,OAAO,GAAG,2sBAAA,mMAOS,EAA0B,qBACjC,EAAyB,sPAShB,EAA0B,uBACjC,EAAyB,2JAMtC,KAjBkB,CAAC,CAAC,wBAAwB,EACjC,CAAC,CAAC,uBAAuB,EAShB,CAAC,CAAC,wBAAwB,EACjC,CAAC,CAAC,uBAAuB,EAMrC;QACJ,CAAC;QAED,gBAAgB,YAAC,CAAQ;YACvB,OAAO,GAAG,oJAAA,oBACE,EAAyB,SAAU,EAA8B,mCACnD,EAA8B,WACvD,KAFW,CAAC,CAAC,uBAAuB,EAAU,CAAC,CAAC,4BAA4B,EACnD,CAAC,CAAC,4BAA4B,EACtD;QACJ,CAAC;QAED,gBAAgB,YAAC,CAAQ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iBAAiB,YAAC,CAAQ;YACxB,OAAO,GAAG,oJAAA,qBACG,EAAmC,oBACrC,EAA6B,qBAC5B,EAA8B,WACzC,KAHY,CAAC,CAAC,iCAAiC,EACrC,CAAC,CAAC,2BAA2B,EAC5B,CAAC,CAAC,4BAA4B,EACxC;QACJ,CAAC;QAED,gBAAgB,YAAC,CAAQ;YACvB,OAAO,GAAG,oJAAA,qBACG,EAAkC,oBACpC,EAA4B,qBAC3B,EAA6B,WACxC,KAHY,CAAC,CAAC,gCAAgC,EACpC,CAAC,CAAC,0BAA0B,EAC3B,CAAC,CAAC,2BAA2B,EACvC;QACJ,CAAC;QAED,cAAc,YAAC,CAAQ;YACrB,OAAO,GAAG,+LAAA,oBACE,EAAyB,SAAU,EAA8B,4BAC1D,EAA0B,8CACnB,EAA8B,WACvD,KAHW,CAAC,CAAC,uBAAuB,EAAU,CAAC,CAAC,4BAA4B,EAC1D,CAAC,CAAC,wBAAwB,EACnB,CAAC,CAAC,4BAA4B,EACtD;QACJ,CAAC;QAED,gBAAgB,YAAC,CAAQ;YACvB,OAAO,GAAG,+LAAA,oBACE,EAAyB,SAAU,EAAgC,4BAC5D,EAA0B,8CACnB,EAAgC,WACzD,KAHW,CAAC,CAAC,uBAAuB,EAAU,CAAC,CAAC,8BAA8B,EAC5D,CAAC,CAAC,wBAAwB,EACnB,CAAC,CAAC,8BAA8B,EACxD;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../../lib/theming/Emotion.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\n\nexport const getJsStyles = memoizeGetStyles(({ css }: Emotion) => {\n return {\n fileWrapper(t: Theme) {\n return css`\n position: relative;\n width: 100%;\n height: max-content;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n border-radius: ${t.fileUploaderBorderRadius};\n border: ${t.fileUploaderBorderWidth} solid transparent;\n box-shadow: 0 0 0 1px transparent;\n cursor: pointer;\n\n &::before {\n position: absolute;\n content: ' ';\n width: 100%;\n height: 100%;\n border-radius: ${t.fileUploaderBorderRadius};\n border: ${t.fileUploaderBorderWidth} solid transparent;\n box-shadow: 0 0 0 1px transparent;\n top: -1px;\n left: -1px;\n z-index: -1;\n }\n `;\n },\n\n fileWrapperFocus(t: Theme) {\n return css`\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorFocus};\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorFocus};\n `;\n },\n\n fileWrapperHover(t: Theme) {\n return css`\n background: ${t.fileUploaderHoveredBg};\n border-color: ${t.fileUploaderHoveredBorderColor};\n `;\n },\n\n warningFile(t: Theme) {\n return css`\n background: ${t.fileUploaderWarningBgColor};\n color: ${t.fileUploaderValidationTextColor};\n &:hover {\n background: ${t.fileUploaderWarningBgHoverColor};\n border-radius: ${t.fileUploaderBorderRadius};\n }\n &::before {\n background: ${t.fileUploaderWarningBgColor};\n }\n `;\n },\n\n errorFile(t: Theme) {\n return css`\n background: ${t.fileUploaderErrorBgColor};\n color: ${t.fileUploaderValidationTextColor};\n &:hover {\n background: ${t.fileUploaderErrorBgHoverColor};\n border-radius: ${t.fileUploaderBorderRadius};\n }\n &::before {\n background: ${t.fileUploaderErrorBgColor};\n }\n `;\n },\n\n removeBorderTopRadius() {\n return css`\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n &::before {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n `;\n },\n\n removeBorderBottomRadius() {\n return css`\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n &::before {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n `;\n },\n\n summary(t: Theme) {\n return css`\n display: flex;\n border-bottom: 1px solid ${t.tabColorHover};\n margin-bottom: ${t.fileUploaderListGap};\n order: -1;\n width: 100%;\n box-sizing: border-box;\n `;\n },\n\n summaryErrorText(t: Theme) {\n return css`\n color: ${t.fileUploaderErrorTextColor};\n margin-right: ${t.fileUploaderListSummaryTextGap};\n `;\n },\n\n summaryWarningText(t: Theme) {\n return css`\n color: ${t.fileUploaderWarningTextColor};\n `;\n },\n\n summarySmall(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeSmall};\n line-height: ${t.fileUploaderLineHeightSmall};\n padding: ${t.fileUploaderPaddingYSmall} ${t.fileUploaderPaddingXSmall};\n `;\n },\n\n summaryMedium(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeMedium};\n line-height: ${t.fileUploaderLineHeightMedium};\n padding: ${t.fileUploaderPaddingYMedium} ${t.fileUploaderPaddingXMedium};\n `;\n },\n\n summaryLarge(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeLarge};\n line-height: ${t.fileUploaderLineHeightLarge};\n padding: ${t.fileUploaderPaddingYLarge} ${t.fileUploaderPaddingXLarge};\n `;\n },\n };\n});\n\nexport const getJsRowStyles = memoizeGetStyles(({ css }: Emotion) => {\n return {\n file() {\n return css`\n width: 100%;\n `;\n },\n\n fileListWrapper(t: Theme) {\n return css`\n display: block;\n width: 100%;\n margin-top: ${t.fileUploaderListGap};\n `;\n },\n\n fileWrapperSmall(t: Theme) {\n return css`\n padding: ${t.fileUploaderPaddingYSmall} ${t.fileUploaderPaddingXSmall};\n `;\n },\n\n fileWrapperMedium(t: Theme) {\n return css`\n padding: ${t.fileUploaderPaddingYMedium} ${t.fileUploaderPaddingXMedium};\n `;\n },\n\n fileWrapperLarge(t: Theme) {\n return css`\n padding: ${t.fileUploaderPaddingYLarge} ${t.fileUploaderPaddingXLarge};\n `;\n },\n\n errorFileFocus(t: Theme) {\n return css`\n background: ${t.fileUploaderErrorBgHoverColor};\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorError};\n border-radius: ${t.fileUploaderBorderRadius} !important;\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorError};\n `;\n },\n\n warningFileFocus(t: Theme) {\n return css`\n background: ${t.fileUploaderWarningBgHoverColor};\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorWarning};\n border-radius: ${t.fileUploaderBorderRadius} !important;\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorWarning};\n `;\n },\n };\n});\n\nexport const getJsTileStyles = memoizeGetStyles(({ css }: Emotion) => {\n return {\n file() {\n return css`\n width: 100%;\n height: 100%;\n `;\n },\n\n fileListWrapper() {\n return css`\n display: contents;\n `;\n },\n\n fileWrapperSmall(t: Theme) {\n return css`\n padding: ${t.fileUploaderTileFilePaddingSmall};\n width: ${t.fileUploaderTileWidthSmall};\n `;\n },\n\n fileWrapperMedium(t: Theme) {\n return css`\n padding: ${t.fileUploaderTileFilePaddingMedium};\n width: ${t.fileUploaderTileWidthMedium};\n height: ${t.fileUploaderTileHeightMedium};\n `;\n },\n\n fileWrapperLarge(t: Theme) {\n return css`\n padding: ${t.fileUploaderTileFilePaddingLarge};\n width: ${t.fileUploaderTileWidthLarge};\n height: ${t.fileUploaderTileHeightLarge};\n `;\n },\n\n errorFileFocus(t: Theme) {\n return css`\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorError};\n border-radius: ${t.fileUploaderBorderRadius} !important;\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorError};\n `;\n },\n\n warningFileFocus(t: Theme) {\n return css`\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorWarning};\n border-radius: ${t.fileUploaderBorderRadius} !important;\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorWarning};\n `;\n },\n };\n});\n"]}
|
|
1
|
+
{"version":3,"file":"FileUploaderFileList.styles.js","sourceRoot":"","sources":["FileUploaderFileList.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,CAAC,IAAM,cAAc,GAAG,YAAY,CAAC;IACzC,IAAI,EAAE,0CAA0C;IAChD,eAAe,EAAE,qDAAqD;IACtE,gBAAgB,EAAE,sDAAsD;IACxE,iBAAiB,EAAE,uDAAuD;IAC1E,gBAAgB,EAAE,sDAAsD;IACxE,cAAc,EAAE,oDAAoD;IACpE,gBAAgB,EAAE,sDAAsD;CACzE,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,WAAW,GAAG,YAAY,CAAC;IACtC,WAAW,EAAE,8CAA8C;IAC3D,gBAAgB,EAAE,mDAAmD;IACrE,gBAAgB,EAAE,mDAAmD;IACrE,WAAW,EAAE,8CAA8C;IAC3D,SAAS,EAAE,4CAA4C;IACvD,qBAAqB,EAAE,wDAAwD;IAC/E,wBAAwB,EAAE,2DAA2D;IACrF,OAAO,EAAE,0CAA0C;IACnD,gBAAgB,EAAE,mDAAmD;IACrE,kBAAkB,EAAE,qDAAqD;IACzE,YAAY,EAAE,+CAA+C;IAC7D,aAAa,EAAE,gDAAgD;IAC/D,YAAY,EAAE,+CAA+C;CAC9D,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,eAAe,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,2CAA2C;IACjD,eAAe,EAAE,sDAAsD;IACvE,gBAAgB,EAAE,uDAAuD;IACzE,iBAAiB,EAAE,wDAAwD;IAC3E,gBAAgB,EAAE,uDAAuD;IACzE,cAAc,EAAE,qDAAqD;IACrE,gBAAgB,EAAE,uDAAuD;CAC1E,CAAC,CAAC","sourcesContent":["import { staticStyles } from '../../../lib/theming/staticStyles.js';\n\n/** Правила — в `FileUploaderFileList.css`; здесь только имена классов. */\nexport const getJsRowStyles = staticStyles({\n file: 'react-ui-FileUploaderFileList-JsRow-file',\n fileListWrapper: 'react-ui-FileUploaderFileList-JsRow-fileListWrapper',\n fileWrapperSmall: 'react-ui-FileUploaderFileList-JsRow-fileWrapperSmall',\n fileWrapperMedium: 'react-ui-FileUploaderFileList-JsRow-fileWrapperMedium',\n fileWrapperLarge: 'react-ui-FileUploaderFileList-JsRow-fileWrapperLarge',\n errorFileFocus: 'react-ui-FileUploaderFileList-JsRow-errorFileFocus',\n warningFileFocus: 'react-ui-FileUploaderFileList-JsRow-warningFileFocus',\n});\n\nexport const getJsStyles = staticStyles({\n fileWrapper: 'react-ui-FileUploaderFileList-Js-fileWrapper',\n fileWrapperFocus: 'react-ui-FileUploaderFileList-Js-fileWrapperFocus',\n fileWrapperHover: 'react-ui-FileUploaderFileList-Js-fileWrapperHover',\n warningFile: 'react-ui-FileUploaderFileList-Js-warningFile',\n errorFile: 'react-ui-FileUploaderFileList-Js-errorFile',\n removeBorderTopRadius: 'react-ui-FileUploaderFileList-Js-removeBorderTopRadius',\n removeBorderBottomRadius: 'react-ui-FileUploaderFileList-Js-removeBorderBottomRadius',\n summary: 'react-ui-FileUploaderFileList-Js-summary',\n summaryErrorText: 'react-ui-FileUploaderFileList-Js-summaryErrorText',\n summaryWarningText: 'react-ui-FileUploaderFileList-Js-summaryWarningText',\n summarySmall: 'react-ui-FileUploaderFileList-Js-summarySmall',\n summaryMedium: 'react-ui-FileUploaderFileList-Js-summaryMedium',\n summaryLarge: 'react-ui-FileUploaderFileList-Js-summaryLarge',\n});\n\nexport const getJsTileStyles = staticStyles({\n file: 'react-ui-FileUploaderFileList-JsTile-file',\n fileListWrapper: 'react-ui-FileUploaderFileList-JsTile-fileListWrapper',\n fileWrapperSmall: 'react-ui-FileUploaderFileList-JsTile-fileWrapperSmall',\n fileWrapperMedium: 'react-ui-FileUploaderFileList-JsTile-fileWrapperMedium',\n fileWrapperLarge: 'react-ui-FileUploaderFileList-JsTile-fileWrapperLarge',\n errorFileFocus: 'react-ui-FileUploaderFileList-JsTile-errorFileFocus',\n warningFileFocus: 'react-ui-FileUploaderFileList-JsTile-warningFileFocus',\n});\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { LoadingIcon } from '../../internal/icons2022/LoadingIcon.js';
|
|
3
3
|
import { useStyles } from '../../lib/renderEnvironment/index.js';
|
|
4
|
-
import { ThemeContext } from '../../lib/theming/ThemeContext.js';
|
|
5
4
|
import { useResponsiveLayout } from '../ResponsiveLayout/index.js';
|
|
6
5
|
import { getJsRowStyles, getJsTileStyles } from './FileUploaderFile.styles.js';
|
|
7
6
|
import { FileUploaderFileStatus } from './fileUtils.js';
|
|
@@ -9,10 +8,9 @@ import { DeleteIcon } from './icons/DeleteIcon.js';
|
|
|
9
8
|
export var FileUploaderFileStatusIcon = function (_a) {
|
|
10
9
|
var hovered = _a.hovered, isTileView = _a.isTileView, disabled = _a.disabled, focusedByTab = _a.focusedByTab, isInvalid = _a.isInvalid, status = _a.status, size = _a.size, hasValidation = _a.hasValidation;
|
|
11
10
|
var isMobile = useResponsiveLayout().isMobile;
|
|
12
|
-
var theme = useContext(ThemeContext);
|
|
13
11
|
var jsTileStyles = useStyles(getJsTileStyles);
|
|
14
12
|
var jsRowStyles = useStyles(getJsRowStyles);
|
|
15
|
-
var iconClassNames = isTileView ? jsTileStyles.iconColor(
|
|
13
|
+
var iconClassNames = isTileView ? jsTileStyles.iconColor() : jsRowStyles.iconColor();
|
|
16
14
|
var iconDelete = React.createElement(DeleteIcon, { size: size, className: iconClassNames });
|
|
17
15
|
if (status === FileUploaderFileStatus.Loading) {
|
|
18
16
|
return hovered || isTileView ? iconDelete : React.createElement(LoadingIcon, { size: size });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploaderFileStatusIcon.js","sourceRoot":"","sources":["FileUploaderFileStatusIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"FileUploaderFileStatusIcon.js","sourceRoot":"","sources":["FileUploaderFileStatusIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B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\nimport { LoadingIcon } from '../../internal/icons2022/LoadingIcon.js';\nimport { useStyles } from '../../lib/renderEnvironment/index.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { useResponsiveLayout } from '../ResponsiveLayout/index.js';\nimport { getJsRowStyles, getJsTileStyles } from './FileUploaderFile.styles.js';\nimport { FileUploaderFileStatus } from './fileUtils.js';\nimport { DeleteIcon } from './icons/DeleteIcon.js';\n\ninterface FileUploaderFileStatusIconProps {\n hovered: boolean;\n isTileView?: boolean;\n disabled?: boolean;\n focusedByTab: boolean;\n isInvalid: boolean;\n status: FileUploaderFileStatus;\n size: SizeProp;\n hasValidation?: boolean;\n}\n\nexport const FileUploaderFileStatusIcon: React.FunctionComponent<FileUploaderFileStatusIconProps> = ({\n hovered,\n isTileView,\n disabled,\n focusedByTab,\n isInvalid,\n status,\n size,\n hasValidation,\n}) => {\n const { isMobile } = useResponsiveLayout();\n const jsTileStyles = useStyles(getJsTileStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n\n const iconClassNames = isTileView ? jsTileStyles.iconColor() : jsRowStyles.iconColor();\n const iconDelete = <DeleteIcon size={size} className={iconClassNames} />;\n\n if (status === FileUploaderFileStatus.Loading) {\n return hovered || isTileView ? iconDelete : <LoadingIcon size={size} />;\n }\n if (disabled || (!isMobile && !hovered && !focusedByTab)) {\n return null;\n }\n if (isInvalid || hasValidation) {\n return iconDelete;\n }\n // TODO - IF-2270 - добавить логику для действий по наведению и клику, пока только удаление\n return iconDelete;\n};\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useStyles } from '../../lib/renderEnvironment/index.js';
|
|
3
|
+
import { getStyles } from './FileUploaderFileTypeIcon.styles.js';
|
|
3
4
|
import { ArchiveIcon as RowViewArchiveIcon } from './icons/row/ArchiveIcon.js';
|
|
4
5
|
import { DocTextIcon as RowViewDocTextIcon } from './icons/row/DocTextIcon.js';
|
|
5
6
|
import { FolderIcon as RowViewFolderIcon } from './icons/row/FolderIcon.js';
|
|
@@ -23,58 +24,52 @@ import { TextIcon as TileViewTextIcon } from './icons/tile/TextIcon.js';
|
|
|
23
24
|
import { ValidationErrorIcon as TileValidationErrorIcon } from './icons/tile/ValidationErrorIcon.js';
|
|
24
25
|
import { ValidationWarningIcon as TileValidationWarningIcon } from './icons/tile/ValidationWarningIcon.js';
|
|
25
26
|
export var FileUploaderFileTypeIcon = function (_a) {
|
|
26
|
-
var
|
|
27
|
-
var
|
|
27
|
+
var _b, _c;
|
|
28
|
+
var size = _a.size, type = _a.type, _d = _a.view, view = _d === void 0 ? 'row' : _d;
|
|
29
|
+
var styles = useStyles(getStyles);
|
|
28
30
|
var isTileView = view === 'tile';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return React.createElement(TileViewTableIcon, { size: size, color: theme.fileUploaderFileTypeTableIconColor });
|
|
45
|
-
case 'text':
|
|
46
|
-
return React.createElement(TileViewTextIcon, { size: size, color: theme.fileUploaderFileTypeTextIconColor });
|
|
47
|
-
case 'archive':
|
|
48
|
-
return React.createElement(TileViewArchiveIcon, { size: size, color: theme.fileUploaderFileTypeArchiveIconColor });
|
|
49
|
-
case 'folder':
|
|
50
|
-
return React.createElement(TileViewFolderIcon, { size: size, color: theme.fileUploaderFileTypeFolderIconColor });
|
|
51
|
-
default:
|
|
52
|
-
return React.createElement(TileViewDocTextIcon, { size: size, color: theme.fileUploaderFileTypeUnknownIconColor });
|
|
31
|
+
// Цвет приходит классом, а не пропом `color`: значение темы иначе уехало бы в
|
|
32
|
+
// инлайновый `style` каждой иконки. Набор типов закрытый, поэтому класс на
|
|
33
|
+
// каждый — тот же приём, что у `CloseButtonIcon`.
|
|
34
|
+
var icons = isTileView
|
|
35
|
+
? {
|
|
36
|
+
error: TileValidationErrorIcon,
|
|
37
|
+
warning: TileValidationWarningIcon,
|
|
38
|
+
pdf: TileViewPdfIcon,
|
|
39
|
+
code: TileViewMarkupIcon,
|
|
40
|
+
picture: TileViewPictureIcon,
|
|
41
|
+
presentation: TileViewPresentationIcon,
|
|
42
|
+
table: TileViewTableIcon,
|
|
43
|
+
text: TileViewTextIcon,
|
|
44
|
+
archive: TileViewArchiveIcon,
|
|
45
|
+
folder: TileViewFolderIcon,
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
47
|
+
: {
|
|
48
|
+
error: RowValidationErrorIcon,
|
|
49
|
+
warning: RowValidationWarningIcon,
|
|
50
|
+
pdf: RowViewPdfIcon,
|
|
51
|
+
code: RowViewMarkupIcon,
|
|
52
|
+
picture: RowViewPictureIcon,
|
|
53
|
+
presentation: RowViewPresentationIcon,
|
|
54
|
+
table: RowViewTableIcon,
|
|
55
|
+
text: RowViewTextIcon,
|
|
56
|
+
archive: RowViewArchiveIcon,
|
|
57
|
+
folder: RowViewFolderIcon,
|
|
58
|
+
};
|
|
59
|
+
var colorClassNames = {
|
|
60
|
+
error: styles.errorIcon(),
|
|
61
|
+
warning: styles.warningIcon(),
|
|
62
|
+
pdf: styles.pdfIcon(),
|
|
63
|
+
code: styles.codeIcon(),
|
|
64
|
+
picture: styles.pictureIcon(),
|
|
65
|
+
presentation: styles.presentationIcon(),
|
|
66
|
+
table: styles.tableIcon(),
|
|
67
|
+
text: styles.textIcon(),
|
|
68
|
+
archive: styles.archiveIcon(),
|
|
69
|
+
folder: styles.folderIcon(),
|
|
70
|
+
};
|
|
71
|
+
var Icon = (_b = icons[type]) !== null && _b !== void 0 ? _b : (isTileView ? TileViewDocTextIcon : RowViewDocTextIcon);
|
|
72
|
+
var colorClassName = (_c = colorClassNames[type]) !== null && _c !== void 0 ? _c : styles.unknownIcon();
|
|
73
|
+
return React.createElement(Icon, { size: size, className: colorClassName });
|
|
79
74
|
};
|
|
80
75
|
//# sourceMappingURL=FileUploaderFileTypeIcon.js.map
|