@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
|
@@ -1,147 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
import { memoizeGetStyles } from '../../lib/theming/Emotion.js';
|
|
1
|
+
import { staticStyles } from '../../lib/theming/staticStyles.js';
|
|
6
2
|
import { globalClasses } from './Toggle.classes.js';
|
|
7
|
-
import { buttonSizeMixin, captionSizeMixin, containerSizeMixin, disabledTextColorMixin, handleMixin, inputSizeMixin, subcaptionMixin, toggleSizeMixin, } from './Toggle.mixins.js';
|
|
8
3
|
export { globalClasses };
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
containerSmall: function (t) {
|
|
58
|
-
return css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), containerSizeMixin(t.toggleBorderRadiusSmall));
|
|
59
|
-
},
|
|
60
|
-
containerMedium: function (t) {
|
|
61
|
-
return css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), containerSizeMixin(t.toggleBorderRadiusMedium));
|
|
62
|
-
},
|
|
63
|
-
containerLarge: function (t) {
|
|
64
|
-
return css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), containerSizeMixin(t.toggleBorderRadiusLarge));
|
|
65
|
-
},
|
|
66
|
-
containerDisabled: function (t) {
|
|
67
|
-
return css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n background: ", ";\n box-shadow: inset 0 0 0 1px ", ";\n "], ["\n background: ", ";\n box-shadow: inset 0 0 0 1px ", ";\n "])), t.toggleBgDisabled, t.toggleBorderColorDisabled);
|
|
68
|
-
},
|
|
69
|
-
focused: function (t) {
|
|
70
|
-
return css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n box-shadow:\n 0 0 0 1px ", ",\n 0 0 0 ", " ", ";\n "], ["\n box-shadow:\n 0 0 0 1px ", ",\n 0 0 0 ", " ", ";\n "])), t.toggleOutlineColorFocus, t.toggleOutlineWidth, t.toggleFocusShadowColor);
|
|
71
|
-
},
|
|
72
|
-
isWarning: function (t) {
|
|
73
|
-
return css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n box-shadow:\n 0 0 0 1px ", ",\n 0 0 0 ", " ", ";\n "], ["\n box-shadow:\n 0 0 0 1px ", ",\n 0 0 0 ", " ", ";\n "])), t.toggleOutlineColorFocus, t.toggleOutlineWidth, t.toggleShadowColorWarning);
|
|
74
|
-
},
|
|
75
|
-
isError: function (t) {
|
|
76
|
-
return css(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n box-shadow:\n 0 0 0 1px ", ",\n 0 0 0 ", " ", ";\n "], ["\n box-shadow:\n 0 0 0 1px ", ",\n 0 0 0 ", " ", ";\n "])), t.toggleOutlineColorFocus, t.toggleOutlineWidth, t.toggleShadowColorError);
|
|
77
|
-
},
|
|
78
|
-
button: function (t) {
|
|
79
|
-
return css(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n position: absolute;\n left: 0;\n top: 0;\n background: ", ";\n line-height: ", ";\n "], ["\n position: absolute;\n left: 0;\n top: 0;\n background: ", ";\n line-height: ", ";\n "])), t.toggleBaseBg, t.toggleHeightSmall);
|
|
80
|
-
},
|
|
81
|
-
buttonSmall: function (t) {
|
|
82
|
-
return css(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), buttonSizeMixin(t.labGrotesqueBaselineCompensation, t.toggleFontSizeSmall, t.toggleHeightSmall, t.toggleWidthSmall, t.toggleBorderRadiusSmall, t.toggleButtonOffsetY));
|
|
83
|
-
},
|
|
84
|
-
buttonMedium: function (t) {
|
|
85
|
-
return css(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), buttonSizeMixin(t.labGrotesqueBaselineCompensation, t.toggleFontSizeMedium, t.toggleHeightMedium, t.toggleWidthMedium, t.toggleBorderRadiusMedium, t.toggleButtonOffsetY));
|
|
86
|
-
},
|
|
87
|
-
buttonLarge: function (t) {
|
|
88
|
-
return css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), buttonSizeMixin(t.labGrotesqueBaselineCompensation, t.toggleFontSizeLarge, t.toggleHeightLarge, t.toggleWidthLarge, t.toggleBorderRadiusLarge, t.toggleButtonOffsetY));
|
|
89
|
-
},
|
|
90
|
-
buttonRight: function () {
|
|
91
|
-
return css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n right: 0;\n left: auto;\n "], ["\n right: 0;\n left: auto;\n "])));
|
|
92
|
-
},
|
|
93
|
-
disabled: function () {
|
|
94
|
-
return css(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n cursor: default;\n "], ["\n cursor: default;\n "])));
|
|
95
|
-
},
|
|
96
|
-
rootLeft: function () {
|
|
97
|
-
return css(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n flex-direction: row-reverse;\n "], ["\n flex-direction: row-reverse;\n "])));
|
|
98
|
-
},
|
|
99
|
-
caption: function (t) {
|
|
100
|
-
return css(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n color: ", ";\n padding: 0 0 0 ", ";\n "], ["\n color: ", ";\n padding: 0 0 0 ", ";\n "])), t.toggleTextColor, t.toggleCaptionGap);
|
|
101
|
-
},
|
|
102
|
-
captionSmall: function (t) {
|
|
103
|
-
return css(templateObject_31 || (templateObject_31 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), captionSizeMixin(t.toggleFontSizeSmall, t.toggleHeightSmall));
|
|
104
|
-
},
|
|
105
|
-
captionMedium: function (t) {
|
|
106
|
-
return css(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), captionSizeMixin(t.toggleFontSizeMedium, t.toggleHeightMedium));
|
|
107
|
-
},
|
|
108
|
-
captionLarge: function (t) {
|
|
109
|
-
return css(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), captionSizeMixin(t.toggleFontSizeLarge, t.toggleHeightLarge));
|
|
110
|
-
},
|
|
111
|
-
disabledCaption: function (t) {
|
|
112
|
-
return css(templateObject_34 || (templateObject_34 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.textColorDisabled);
|
|
113
|
-
},
|
|
114
|
-
captionLeft: function (t) {
|
|
115
|
-
return css(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n color: ", ";\n padding: 0 ", " 0 0;\n "], ["\n color: ", ";\n padding: 0 ", " 0 0;\n "])), t.toggleTextColor, t.toggleCaptionGap);
|
|
116
|
-
},
|
|
117
|
-
captionWrapper: function () {
|
|
118
|
-
return css(templateObject_36 || (templateObject_36 = __makeTemplateObject(["\n display: inline-block;\n "], ["\n display: inline-block;\n "])));
|
|
119
|
-
},
|
|
120
|
-
captionWrapperGap: function (t) {
|
|
121
|
-
return css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["\n padding: 0 0 0 ", ";\n "], ["\n padding: 0 0 0 ", ";\n "])), t.toggleCaptionGap);
|
|
122
|
-
},
|
|
123
|
-
captionWrapperGapLeft: function (t) {
|
|
124
|
-
return css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["\n padding: 0 ", " 0 0;\n "], ["\n padding: 0 ", " 0 0;\n "])), t.toggleCaptionGap);
|
|
125
|
-
},
|
|
126
|
-
captionNoGap: function () {
|
|
127
|
-
return css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["\n padding: 0;\n "], ["\n padding: 0;\n "])));
|
|
128
|
-
},
|
|
129
|
-
subcaption: function (t) {
|
|
130
|
-
return css(templateObject_40 || (templateObject_40 = __makeTemplateObject(["\n margin-top: 2px;\n color: ", ";\n "], ["\n margin-top: 2px;\n color: ", ";\n "])), t.toggleCommentTextColor);
|
|
131
|
-
},
|
|
132
|
-
subcaptionDisabled: function (t) {
|
|
133
|
-
return css(templateObject_41 || (templateObject_41 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), disabledTextColorMixin(t.textColorDisabled));
|
|
134
|
-
},
|
|
135
|
-
subcaptionSmall: function (t) {
|
|
136
|
-
return css(templateObject_42 || (templateObject_42 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), subcaptionMixin(t.toggleCommentFontSizeSmall, t.toggleCommentLineHeightSmall));
|
|
137
|
-
},
|
|
138
|
-
subcaptionMedium: function (t) {
|
|
139
|
-
return css(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), subcaptionMixin(t.toggleCommentFontSizeMedium, t.toggleCommentLineHeightMedium));
|
|
140
|
-
},
|
|
141
|
-
subcaptionLarge: function (t) {
|
|
142
|
-
return css(templateObject_44 || (templateObject_44 = __makeTemplateObject(["\n ", ";\n "], ["\n ", ";\n "])), subcaptionMixin(t.toggleCommentFontSizeLarge, t.toggleCommentLineHeightLarge));
|
|
143
|
-
},
|
|
144
|
-
});
|
|
4
|
+
/** Правила — в `Toggle.css`; здесь только имена классов. */
|
|
5
|
+
export var getStyles = staticStyles({
|
|
6
|
+
root: 'react-ui-Toggle-root',
|
|
7
|
+
rootSmall: 'react-ui-Toggle-rootSmall',
|
|
8
|
+
rootMedium: 'react-ui-Toggle-rootMedium',
|
|
9
|
+
rootLarge: 'react-ui-Toggle-rootLarge',
|
|
10
|
+
disableAnimation: 'react-ui-Toggle-disableAnimation',
|
|
11
|
+
handle: 'react-ui-Toggle-handle',
|
|
12
|
+
handleSmall: 'react-ui-Toggle-handleSmall',
|
|
13
|
+
handleMedium: 'react-ui-Toggle-handleMedium',
|
|
14
|
+
handleLarge: 'react-ui-Toggle-handleLarge',
|
|
15
|
+
handleDisabled: 'react-ui-Toggle-handleDisabled',
|
|
16
|
+
input: 'react-ui-Toggle-input',
|
|
17
|
+
inputSmall: 'react-ui-Toggle-inputSmall',
|
|
18
|
+
inputMedium: 'react-ui-Toggle-inputMedium',
|
|
19
|
+
inputLarge: 'react-ui-Toggle-inputLarge',
|
|
20
|
+
container: 'react-ui-Toggle-container',
|
|
21
|
+
containerSmall: 'react-ui-Toggle-containerSmall',
|
|
22
|
+
containerMedium: 'react-ui-Toggle-containerMedium',
|
|
23
|
+
containerLarge: 'react-ui-Toggle-containerLarge',
|
|
24
|
+
containerDisabled: 'react-ui-Toggle-containerDisabled',
|
|
25
|
+
buttonSmall: 'react-ui-Toggle-buttonSmall',
|
|
26
|
+
buttonMedium: 'react-ui-Toggle-buttonMedium',
|
|
27
|
+
buttonLarge: 'react-ui-Toggle-buttonLarge',
|
|
28
|
+
disabled: 'react-ui-Toggle-disabled',
|
|
29
|
+
rootLeft: 'react-ui-Toggle-rootLeft',
|
|
30
|
+
captionSmall: 'react-ui-Toggle-captionSmall',
|
|
31
|
+
captionMedium: 'react-ui-Toggle-captionMedium',
|
|
32
|
+
captionLarge: 'react-ui-Toggle-captionLarge',
|
|
33
|
+
captionWrapper: 'react-ui-Toggle-captionWrapper',
|
|
34
|
+
captionWrapperGap: 'react-ui-Toggle-captionWrapperGap',
|
|
35
|
+
captionWrapperGapLeft: 'react-ui-Toggle-captionWrapperGapLeft',
|
|
36
|
+
subcaption: 'react-ui-Toggle-subcaption',
|
|
37
|
+
subcaptionDisabled: 'react-ui-Toggle-subcaptionDisabled',
|
|
38
|
+
subcaptionSmall: 'react-ui-Toggle-subcaptionSmall',
|
|
39
|
+
subcaptionMedium: 'react-ui-Toggle-subcaptionMedium',
|
|
40
|
+
subcaptionLarge: 'react-ui-Toggle-subcaptionLarge',
|
|
41
|
+
caption: 'react-ui-Toggle-caption',
|
|
42
|
+
captionLeft: 'react-ui-Toggle-captionLeft',
|
|
43
|
+
disabledCaption: 'react-ui-Toggle-disabledCaption',
|
|
44
|
+
captionNoGap: 'react-ui-Toggle-captionNoGap',
|
|
45
|
+
button: 'react-ui-Toggle-button',
|
|
46
|
+
buttonRight: 'react-ui-Toggle-buttonRight',
|
|
47
|
+
isWarning: 'react-ui-Toggle-isWarning',
|
|
48
|
+
isError: 'react-ui-Toggle-isError',
|
|
49
|
+
focused: 'react-ui-Toggle-focused',
|
|
50
|
+
buttonBaselineCompensation: 'react-ui-Toggle-buttonBaselineCompensation',
|
|
145
51
|
});
|
|
146
|
-
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, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40, templateObject_41, templateObject_42, templateObject_43, templateObject_44;
|
|
147
52
|
//# sourceMappingURL=Toggle.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.styles.js","sourceRoot":"","sources":["Toggle.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,MAAM,CAAC,IAAM,SAAS,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QAC/D,IAAI,YAAC,CAAQ;YACX,OAAO,GAAG,khBAAA,iaAeG,EAAoB,0BACf,EAAe,kBAEhC,KAHY,aAAa,CAAC,MAAM,EACf,CAAC,CAAC,aAAa,EAE/B;QACJ,CAAC;QACD,SAAS,YAAC,CAAQ;YAChB,OAAO,GAAG,wF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KADG,eAAe,CAAC,CAAC,CAAC,0BAA0B,EAAE,CAAC,CAAC,4BAA4B,CAAC,EAC/E;QACJ,CAAC;QACD,gBAAgB,YAAC,CAAQ;YACvB,OAAO,GAAG,0FAAA,UACN,EAA+E,SAClF,KADG,eAAe,CAAC,CAAC,CAAC,2BAA2B,EAAE,CAAC,CAAC,6BAA6B,CAAC,EACjF;QACJ,CAAC;QACD,eAAe,YAAC,CAAQ;YACtB,OAAO,GAAG,0FAAA,UACN,EAA6E,SAChF,KADG,eAAe,CAAC,CAAC,CAAC,0BAA0B,EAAE,CAAC,CAAC,4BAA4B,CAAC,EAC/E;QACJ,CAAC;KACF,CAAC;AA3X8D,CA2X9D,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';\nimport { globalClasses } from './Toggle.classes.js';\nimport {\n buttonSizeMixin,\n captionSizeMixin,\n containerSizeMixin,\n disabledTextColorMixin,\n handleMixin,\n inputSizeMixin,\n subcaptionMixin,\n toggleSizeMixin,\n} from './Toggle.mixins.js';\n\nexport { globalClasses };\n\nexport const getStyles = memoizeGetStyles(({ css }: Emotion) => ({\n root(t: Theme) {\n return css`\n display: inline-flex;\n cursor: pointer;\n align-items: baseline;\n position: relative;\n\n &::before {\n // non-breaking space.\n // makes a correct space for absolutely positioned button,\n // and also height and baseline for toggle without caption.\n content: '\\\\00A0';\n display: inline-block;\n flex: 0 0 auto;\n }\n\n &:hover .${globalClasses.handle} {\n background: ${t.toggleBgHover};\n }\n `;\n },\n rootSmall(t: Theme) {\n return css`\n ${toggleSizeMixin(t.toggleFontSizeSmall, t.toggleHeightSmall, t.toggleWidthSmall)};\n `;\n },\n rootMedium(t: Theme) {\n return css`\n ${toggleSizeMixin(t.toggleFontSizeMedium, t.toggleHeightMedium, t.toggleWidthMedium)};\n `;\n },\n rootLarge(t: Theme) {\n return css`\n ${toggleSizeMixin(t.toggleFontSizeLarge, t.toggleHeightLarge, t.toggleWidthLarge)};\n `;\n },\n\n disableAnimation() {\n return css`\n &,\n * {\n transition: none !important;\n }\n `;\n },\n\n handle(t: Theme) {\n return css`\n bottom: ${t.toggleBorderWidth};\n left: ${t.toggleHandleLeft};\n position: absolute;\n top: ${t.toggleHandleTop};\n `;\n },\n handleSmall(t: Theme) {\n return css`\n ${handleMixin(t.toggleHandleSizeSmall, t.toggleHandleBorderRadiusSmall)};\n `;\n },\n handleMedium(t: Theme) {\n return css`\n ${handleMixin(t.toggleHandleSizeMedium, t.toggleHandleBorderRadiusMedium)};\n `;\n },\n handleLarge(t: Theme) {\n return css`\n ${handleMixin(t.toggleHandleSizeLarge, t.toggleHandleBorderRadiusLarge)};\n `;\n },\n\n handleDisabled(t: Theme) {\n return css`\n background: ${t.toggleDisabledHandleBg} !important; // override root hover/active styles\n `;\n },\n\n input(t: Theme) {\n return css`\n position: absolute;\n opacity: 0;\n\n &:enabled {\n ~ .${globalClasses.container}, ~ .${globalClasses.handle} {\n transition: 0.2s ease-in;\n }\n :not(:checked) {\n ~ .${globalClasses.container} {\n background: ${t.toggleContainerBg};\n box-shadow: ${t.toggleContainerBoxShadow};\n }\n ~ .${globalClasses.handle} {\n background: ${t.toggleHandleBg};\n box-shadow: ${t.toggleHandleBoxShadow};\n }\n }\n :checked {\n ~ .${globalClasses.container} {\n background: ${t.toggleContainerBgChecked};\n box-shadow: ${t.toggleContainerBoxShadowChecked};\n }\n ~ .${globalClasses.handle} {\n background: ${t.toggleHandleBgChecked};\n box-shadow: ${t.toggleHandleBoxShadowChecked};\n }\n }\n }\n &:enabled:hover {\n :not(:checked) {\n ~ .${globalClasses.container} {\n background: ${t.toggleContainerBgHover};\n box-shadow: ${t.toggleContainerBoxShadowHover};\n }\n ~ .${globalClasses.handle} {\n background: ${t.toggleHandleBgHover};\n box-shadow: ${t.toggleHandleBoxShadowHover};\n }\n }\n :checked {\n ~ .${globalClasses.container} {\n background: ${t.toggleContainerBgCheckedHover};\n box-shadow: ${t.toggleContainerBoxShadowCheckedHover};\n }\n ~ .${globalClasses.handle} {\n background: ${t.toggleHandleBgCheckedHover};\n box-shadow: ${t.toggleHandleBoxShadowCheckedHover};\n }\n }\n }\n &:disabled {\n :not(:checked) {\n ~ .${globalClasses.container} {\n background: ${t.toggleContainerBgDisabled};\n box-shadow: ${t.toggleContainerBoxShadowDisabled};\n }\n ~ .${globalClasses.handle} {\n background: ${t.toggleHandleBgDisabled} !important;\n box-shadow: ${t.toggleHandleBoxShadowDisabled};\n }\n }\n :checked {\n ~ .${globalClasses.container} {\n background: ${t.toggleContainerBgDisabledChecked};\n box-shadow: ${t.toggleContainerBoxShadowDisabledChecked};\n }\n ~ .${globalClasses.handle} {\n background: ${t.toggleHandleBgDisabledChecked} !important;\n box-shadow: ${t.toggleHandleBoxShadowDisabledChecked};\n }\n }\n }\n `;\n },\n inputSmall(t: Theme) {\n return css`\n ${inputSizeMixin(t.toggleHeightSmall, t.toggleWidthSmall)};\n `;\n },\n inputMedium(t: Theme) {\n return css`\n ${inputSizeMixin(t.toggleHeightMedium, t.toggleWidthMedium)};\n `;\n },\n inputLarge(t: Theme) {\n return css`\n ${inputSizeMixin(t.toggleHeightLarge, t.toggleWidthLarge)};\n `;\n },\n\n container(t: Theme) {\n return css`\n box-shadow: inset 0 0 0 ${t.toggleBorderWidth} ${t.toggleBorderColor};\n height: 100%;\n overflow: hidden;\n position: absolute;\n width: 100%;\n /* fixes overflow issue in Safari: https://bugs.webkit.org/show_bug.cgi?id=98538 */\n z-index: 0;\n `;\n },\n containerSmall(t: Theme) {\n return css`\n ${containerSizeMixin(t.toggleBorderRadiusSmall)};\n `;\n },\n containerMedium(t: Theme) {\n return css`\n ${containerSizeMixin(t.toggleBorderRadiusMedium)};\n `;\n },\n containerLarge(t: Theme) {\n return css`\n ${containerSizeMixin(t.toggleBorderRadiusLarge)};\n `;\n },\n\n containerDisabled(t: Theme) {\n return css`\n background: ${t.toggleBgDisabled};\n box-shadow: inset 0 0 0 1px ${t.toggleBorderColorDisabled};\n `;\n },\n\n focused(t: Theme) {\n return css`\n box-shadow:\n 0 0 0 1px ${t.toggleOutlineColorFocus},\n 0 0 0 ${t.toggleOutlineWidth} ${t.toggleFocusShadowColor};\n `;\n },\n\n isWarning(t: Theme) {\n return css`\n box-shadow:\n 0 0 0 1px ${t.toggleOutlineColorFocus},\n 0 0 0 ${t.toggleOutlineWidth} ${t.toggleShadowColorWarning};\n `;\n },\n\n isError(t: Theme) {\n return css`\n box-shadow:\n 0 0 0 1px ${t.toggleOutlineColorFocus},\n 0 0 0 ${t.toggleOutlineWidth} ${t.toggleShadowColorError};\n `;\n },\n\n button(t: Theme) {\n return css`\n position: absolute;\n left: 0;\n top: 0;\n background: ${t.toggleBaseBg};\n line-height: ${t.toggleHeightSmall};\n `;\n },\n buttonSmall(t: Theme) {\n return css`\n ${buttonSizeMixin(\n t.labGrotesqueBaselineCompensation,\n t.toggleFontSizeSmall,\n t.toggleHeightSmall,\n t.toggleWidthSmall,\n t.toggleBorderRadiusSmall,\n t.toggleButtonOffsetY,\n )};\n `;\n },\n buttonMedium(t: Theme) {\n return css`\n ${buttonSizeMixin(\n t.labGrotesqueBaselineCompensation,\n t.toggleFontSizeMedium,\n t.toggleHeightMedium,\n t.toggleWidthMedium,\n t.toggleBorderRadiusMedium,\n t.toggleButtonOffsetY,\n )};\n `;\n },\n buttonLarge(t: Theme) {\n return css`\n ${buttonSizeMixin(\n t.labGrotesqueBaselineCompensation,\n t.toggleFontSizeLarge,\n t.toggleHeightLarge,\n t.toggleWidthLarge,\n t.toggleBorderRadiusLarge,\n t.toggleButtonOffsetY,\n )};\n `;\n },\n\n buttonRight() {\n return css`\n right: 0;\n left: auto;\n `;\n },\n\n disabled() {\n return css`\n cursor: default;\n `;\n },\n\n rootLeft() {\n return css`\n flex-direction: row-reverse;\n `;\n },\n\n caption(t: Theme) {\n return css`\n color: ${t.toggleTextColor};\n padding: 0 0 0 ${t.toggleCaptionGap};\n `;\n },\n captionSmall(t: Theme) {\n return css`\n ${captionSizeMixin(t.toggleFontSizeSmall, t.toggleHeightSmall)};\n `;\n },\n captionMedium(t: Theme) {\n return css`\n ${captionSizeMixin(t.toggleFontSizeMedium, t.toggleHeightMedium)};\n `;\n },\n captionLarge(t: Theme) {\n return css`\n ${captionSizeMixin(t.toggleFontSizeLarge, t.toggleHeightLarge)};\n `;\n },\n\n disabledCaption(t: Theme) {\n return css`\n color: ${t.textColorDisabled};\n `;\n },\n\n captionLeft(t: Theme) {\n return css`\n color: ${t.toggleTextColor};\n padding: 0 ${t.toggleCaptionGap} 0 0;\n `;\n },\n\n captionWrapper() {\n return css`\n display: inline-block;\n `;\n },\n\n captionWrapperGap(t: Theme) {\n return css`\n padding: 0 0 0 ${t.toggleCaptionGap};\n `;\n },\n\n captionWrapperGapLeft(t: Theme) {\n return css`\n padding: 0 ${t.toggleCaptionGap} 0 0;\n `;\n },\n\n captionNoGap() {\n return css`\n padding: 0;\n `;\n },\n\n subcaption(t: Theme) {\n return css`\n margin-top: 2px;\n color: ${t.toggleCommentTextColor};\n `;\n },\n\n subcaptionDisabled(t: Theme) {\n return css`\n ${disabledTextColorMixin(t.textColorDisabled)};\n `;\n },\n\n subcaptionSmall(t: Theme) {\n return css`\n ${subcaptionMixin(t.toggleCommentFontSizeSmall, t.toggleCommentLineHeightSmall)};\n `;\n },\n subcaptionMedium(t: Theme) {\n return css`\n ${subcaptionMixin(t.toggleCommentFontSizeMedium, t.toggleCommentLineHeightMedium)};\n `;\n },\n subcaptionLarge(t: Theme) {\n return css`\n ${subcaptionMixin(t.toggleCommentFontSizeLarge, t.toggleCommentLineHeightLarge)};\n `;\n },\n}));\n"]}
|
|
1
|
+
{"version":3,"file":"Toggle.styles.js","sourceRoot":"","sources":["Toggle.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB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C1C,SAAS,EAAE,2BAA2B;IACtC,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,yBAAyB;IAClC,0BAA0B,EAAE,4CAA4C;CACzE,CAAC,CAAC","sourcesContent":["import { staticStyles } from '../../lib/theming/staticStyles.js';\nimport { globalClasses } from './Toggle.classes.js';\n\nexport { globalClasses };\n\n/** Правила — в `Toggle.css`; здесь только имена классов. */\nexport const getStyles = staticStyles({\n root: 'react-ui-Toggle-root',\n rootSmall: 'react-ui-Toggle-rootSmall',\n rootMedium: 'react-ui-Toggle-rootMedium',\n rootLarge: 'react-ui-Toggle-rootLarge',\n disableAnimation: 'react-ui-Toggle-disableAnimation',\n handle: 'react-ui-Toggle-handle',\n handleSmall: 'react-ui-Toggle-handleSmall',\n handleMedium: 'react-ui-Toggle-handleMedium',\n handleLarge: 'react-ui-Toggle-handleLarge',\n handleDisabled: 'react-ui-Toggle-handleDisabled',\n input: 'react-ui-Toggle-input',\n inputSmall: 'react-ui-Toggle-inputSmall',\n inputMedium: 'react-ui-Toggle-inputMedium',\n inputLarge: 'react-ui-Toggle-inputLarge',\n container: 'react-ui-Toggle-container',\n containerSmall: 'react-ui-Toggle-containerSmall',\n containerMedium: 'react-ui-Toggle-containerMedium',\n containerLarge: 'react-ui-Toggle-containerLarge',\n containerDisabled: 'react-ui-Toggle-containerDisabled',\n buttonSmall: 'react-ui-Toggle-buttonSmall',\n buttonMedium: 'react-ui-Toggle-buttonMedium',\n buttonLarge: 'react-ui-Toggle-buttonLarge',\n disabled: 'react-ui-Toggle-disabled',\n rootLeft: 'react-ui-Toggle-rootLeft',\n captionSmall: 'react-ui-Toggle-captionSmall',\n captionMedium: 'react-ui-Toggle-captionMedium',\n captionLarge: 'react-ui-Toggle-captionLarge',\n captionWrapper: 'react-ui-Toggle-captionWrapper',\n captionWrapperGap: 'react-ui-Toggle-captionWrapperGap',\n captionWrapperGapLeft: 'react-ui-Toggle-captionWrapperGapLeft',\n subcaption: 'react-ui-Toggle-subcaption',\n subcaptionDisabled: 'react-ui-Toggle-subcaptionDisabled',\n subcaptionSmall: 'react-ui-Toggle-subcaptionSmall',\n subcaptionMedium: 'react-ui-Toggle-subcaptionMedium',\n subcaptionLarge: 'react-ui-Toggle-subcaptionLarge',\n caption: 'react-ui-Toggle-caption',\n captionLeft: 'react-ui-Toggle-captionLeft',\n disabledCaption: 'react-ui-Toggle-disabledCaption',\n captionNoGap: 'react-ui-Toggle-captionNoGap',\n button: 'react-ui-Toggle-button',\n buttonRight: 'react-ui-Toggle-buttonRight',\n isWarning: 'react-ui-Toggle-isWarning',\n isError: 'react-ui-Toggle-isError',\n focused: 'react-ui-Toggle-focused',\n buttonBaselineCompensation: 'react-ui-Toggle-buttonBaselineCompensation',\n});\n"]}
|
|
@@ -41,10 +41,8 @@ export declare const TokenDataTids: {
|
|
|
41
41
|
export declare class Token extends React.Component<TokenProps> {
|
|
42
42
|
static __KONTUR_REACT_UI__: string;
|
|
43
43
|
static displayName: string;
|
|
44
|
-
private emotion;
|
|
45
44
|
private cx;
|
|
46
45
|
private styles;
|
|
47
|
-
private theme;
|
|
48
46
|
getRootNode: TGetRootNode;
|
|
49
47
|
private setRootNode;
|
|
50
48
|
private readonly locale;
|
|
@@ -38,7 +38,6 @@ import { locale } from '../../lib/locale/decorators.js';
|
|
|
38
38
|
import { reactGetTextContent } from '../../lib/reactGetTextContent.js';
|
|
39
39
|
import { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';
|
|
40
40
|
import { rootNode } from '../../lib/rootNode/index.js';
|
|
41
|
-
import { ThemeContext } from '../../lib/theming/ThemeContext.js';
|
|
42
41
|
import { emptyHandler } from '../../lib/utils.js';
|
|
43
42
|
import { TokenLocaleHelper } from './locale/index.js';
|
|
44
43
|
import { getStyles } from './Token.styles.js';
|
|
@@ -66,19 +65,15 @@ var Token = /** @class */ (function (_super) {
|
|
|
66
65
|
return _this;
|
|
67
66
|
}
|
|
68
67
|
Token.prototype.render = function () {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return
|
|
72
|
-
_this.theme = theme;
|
|
73
|
-
return _this.renderMain();
|
|
74
|
-
}));
|
|
68
|
+
this.styles = getStyles();
|
|
69
|
+
// Тема больше не нужна: значения приходят CSS-переменными.
|
|
70
|
+
return this.renderMain();
|
|
75
71
|
};
|
|
76
72
|
Token.prototype.renderMain = function () {
|
|
77
73
|
var _a = this.props, size = _a.size, children = _a.children, isActive = _a.isActive, error = _a.error, warning = _a.warning, disabled = _a.disabled, ariaDescribedby = _a["aria-describedby"], _b = _a.onClick, onClick = _b === void 0 ? emptyHandler : _b, _c = _a.onDoubleClick, onDoubleClick = _c === void 0 ? emptyHandler : _c, _d = _a.onMouseEnter, onMouseEnter = _d === void 0 ? emptyHandler : _d, _e = _a.onMouseLeave, onMouseLeave = _e === void 0 ? emptyHandler : _e, _f = _a.onFocus, onFocus = _f === void 0 ? emptyHandler : _f, _g = _a.onBlur, onBlur = _g === void 0 ? emptyHandler : _g;
|
|
78
|
-
var theme = this.theme;
|
|
79
74
|
var removeButtonAriaLabel = this.locale.removeButtonAriaLabel + ' ' + reactGetTextContent(children);
|
|
80
|
-
var icon = (React.createElement(CloseButtonIcon, { side: 16,
|
|
81
|
-
var classNames = this.cx(this.styles.tokenIdle(
|
|
75
|
+
var icon = (React.createElement(CloseButtonIcon, { side: 16, colorClassName: this.styles.closeButtonIcon(), "aria-label": removeButtonAriaLabel, tabbable: false }));
|
|
76
|
+
var classNames = this.cx(this.styles.tokenIdle(), !isActive && !warning && !error && !disabled && this.styles.tokenHover(), isActive && this.styles.tokenActive(), warning && this.styles.tokenWarning(), error && this.styles.tokenError(), disabled && this.styles.tokenDisabled());
|
|
82
77
|
var textholder = React.createElement("span", { className: this.styles.text() }, children);
|
|
83
78
|
var closeButton = (React.createElement("span", { onClick: this.onRemoveClick, "data-tid": TokenDataTids.removeIcon }, icon));
|
|
84
79
|
return (React.createElement(CommonWrapper, __assign({ rootNodeRef: this.setRootNode }, this.props, getVisualStateDataAttributes({ disabled: disabled })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.js","sourceRoot":"","sources":["Token.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Token.js","sourceRoot":"","sources":["Token.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEpF,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AAClH,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA+B3C,MAAM,CAAC,IAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,aAAa;IACnB,UAAU,EAAE,mBAAmB;CACvB,CAAC;AAEX;;;GAGG;AAIH;IAA2B,yBAA2B;IAAtD;;QAmFU,mBAAa,GAAG,UAAC,KAAgD;YACjE,IAAA,KAAwC,KAAI,CAAC,KAAK,EAAhD,QAAQ,cAAA,EAAE,gBAAuB,EAAvB,QAAQ,mBAAG,YAAY,KAAe,CAAC;YAEzD,IAAI,QAAQ,EAAE,CAAC;gBACb,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,OAAO;YACT,CA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O,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EACrC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EACjC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CACxC,CAAC;QAEF,IAAM,UAAU,GAAG,8BAAM,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAG,QAAQ,CAAQ,CAAC;QAE1E,IAAM,WAAW,GAAG,CAClB,8BAAM,OAAO,EAAE,IAAI,CAAC,aAAa,cAAY,aAAa,CAAC,UAAU,IAClE,IAAI,CACA,CACR,CAAC;QAEF,OAAO,CACL,oBAAC,aAAa,aAAC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAM,IAAI,CAAC,KAAK,EAAM,4BAA4B,CAAC,EAAE,QAAQ,UAAA,EAAE,CAAC;YAC1G,oBAAC,SAAS,IACR,SAAS,EAAE,UAAU,EACrB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,WAAW,cACd,aAAa,CAAC,IAAI,sBACV,eAAe,EACjC,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,IAEb,UAAU,CACD,CACE,CACjB,CAAC;IACJ,CAAC;IAhFa,yBAAmB,GAAG,OAAO,AAAV,CAAW;IAC9B,iBAAW,GAAG,OAAO,AAAV,CAAW;IAFzB,KAAK;QAHjB,qBAAqB;QACrB,QAAQ;QACR,MAAM,CAAC,OAAO,EAAE,iBAAiB,CAAC;OACtB,KAAK,CA6FjB;IAAD,YAAC;CAAA,AA7FD,CAA2B,KAAK,CAAC,SAAS,GA6FzC;SA7FY,KAAK","sourcesContent":["import type { AriaAttributes } from 'react';\nimport React from 'react';\n\nimport { CloseButtonIcon } from '../../internal/CloseButtonIcon/CloseButtonIcon.js';\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes.js';\nimport { locale } from '../../lib/locale/decorators.js';\nimport { reactGetTextContent } from '../../lib/reactGetTextContent.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport type { ClassNames } from '../../lib/theming/Emotion.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { emptyHandler } from '../../lib/utils.js';\nimport type { TokenLocale } from './locale/index.js';\nimport { TokenLocaleHelper } from './locale/index.js';\nimport { getStyles } from './Token.styles.js';\nimport { TokenView } from './TokenView.js';\n\nexport type TokenSize = SizeProp;\n\nexport interface TokenProps extends Pick<AriaAttributes, 'aria-describedby'>, CommonProps {\n /** Делает токен активным. */\n isActive?: boolean;\n /** Меняет визуальное отображение токена на состояние «ошибка». Может быть полезен при разработке собственной валидации, если вы не используете пакет [React UI Validations](https://tech.skbkontur.ru/kontur-ui/?path=/docs/react-ui-validations_displaying-getting-started--docs). */\n error?: boolean;\n /** Меняет визуальное отображение токена на состояние «предупреждение». Может быть полезен при разработке собственной валидации, если вы не используете пакет [React UI Validations](https://tech.skbkontur.ru/kontur-ui/?path=/docs/react-ui-validations_displaying-getting-started--docs). */\n warning?: boolean;\n /** Блокирует токен. */\n disabled?: boolean;\n /** Размер токена. */\n size?: TokenSize;\n /** Задаёт функцию, которая вызывается при клике на токен. */\n onClick?: React.MouseEventHandler<HTMLDivElement>;\n /** Задаёт функцию, которая вызывается при двойном клике на токен. */\n onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;\n /** Задаёт функцию, которая вызывается, когда токен удаляется. */\n onRemove?: React.MouseEventHandler<HTMLElement>;\n /** Задаёт функцию, которая вызывается при наведении мышкой (событие `onmouseenter`). */\n onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;\n /** Задаёт функцию, которая вызывается при уходе мышки с объекта (событие `onmouseleave`). */\n onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;\n /** Задаёт функцию, которая вызывается, когда токен получает фокус. */\n onFocus?: React.FocusEventHandler<HTMLDivElement>;\n /** Задаёт функцию, которая вызывается, когда токен теряет фокус. */\n onBlur?: React.FocusEventHandler<HTMLDivElement>;\n}\n\nexport const TokenDataTids = {\n root: 'Token__root',\n removeIcon: 'Token__removeIcon',\n} as const;\n\n/** Токены — это значение заданного формата внутри поля ввода. Например, номера телефонов, почты, ИНН, СНИЛС, статусы, группы и другие.\n *\n * Используется как значение внутри `TokenInput`.\n */\n@withRenderEnvironment\n@rootNode\n@locale('Token', TokenLocaleHelper)\nexport class Token extends React.Component<TokenProps> {\n public static __KONTUR_REACT_UI__ = 'Token';\n public static displayName = 'Token';\n\n private cx!: ClassNames;\n private styles!: ReturnType<typeof getStyles>;\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n private readonly locale!: TokenLocale;\n\n public render(): React.JSX.Element {\n this.styles = getStyles();\n\n // Тема больше не нужна: значения приходят CSS-переменными.\n return this.renderMain();\n }\n\n private renderMain() {\n const {\n size,\n children,\n isActive,\n error,\n warning,\n disabled,\n 'aria-describedby': ariaDescribedby,\n onClick = emptyHandler,\n onDoubleClick = emptyHandler,\n onMouseEnter = emptyHandler,\n onMouseLeave = emptyHandler,\n onFocus = emptyHandler,\n onBlur = emptyHandler,\n } = this.props;\n\n const removeButtonAriaLabel = this.locale.removeButtonAriaLabel + ' ' + reactGetTextContent(children);\n\n const icon = (\n <CloseButtonIcon\n side={16}\n colorClassName={this.styles.closeButtonIcon()}\n aria-label={removeButtonAriaLabel}\n tabbable={false}\n />\n );\n\n const classNames = this.cx(\n this.styles.tokenIdle(),\n !isActive && !warning && !error && !disabled && this.styles.tokenHover(),\n isActive && this.styles.tokenActive(),\n warning && this.styles.tokenWarning(),\n error && this.styles.tokenError(),\n disabled && this.styles.tokenDisabled(),\n );\n\n const textholder = <span className={this.styles.text()}>{children}</span>;\n\n const closeButton = (\n <span onClick={this.onRemoveClick} data-tid={TokenDataTids.removeIcon}>\n {icon}\n </span>\n );\n\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props} {...getVisualStateDataAttributes({ disabled })}>\n <TokenView\n className={classNames}\n size={size}\n closeButton={closeButton}\n data-tid={TokenDataTids.root}\n aria-describedby={ariaDescribedby}\n onClick={onClick}\n onDoubleClick={onDoubleClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onFocus={onFocus}\n onBlur={onBlur}\n >\n {textholder}\n </TokenView>\n </CommonWrapper>\n );\n }\n\n private onRemoveClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n const { disabled, onRemove = emptyHandler } = this.props;\n\n if (disabled) {\n event.preventDefault();\n return;\n }\n\n onRemove(event);\n };\n}\n"]}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import type { Theme } from '../../lib/theming/Theme.js';
|
|
2
1
|
export declare const globalClasses: {
|
|
3
2
|
removeIcon: string;
|
|
4
3
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
/** Правила — в `Token.css`; здесь только имена классов. */
|
|
5
|
+
export declare const getStyles: (ignored?: unknown) => import("../../lib/theming/staticStyles.js").StaticStyles<{
|
|
6
|
+
token: string;
|
|
7
|
+
tokenSmall: string;
|
|
8
|
+
tokenMedium: string;
|
|
9
|
+
tokenLarge: string;
|
|
10
|
+
closeButtonIcon: string;
|
|
11
|
+
tokenIdle: string;
|
|
12
|
+
tokenHover: string;
|
|
13
|
+
tokenActive: string;
|
|
14
|
+
tokenError: string;
|
|
15
|
+
tokenWarning: string;
|
|
16
|
+
tokenDisabled: string;
|
|
17
|
+
text: string;
|
|
18
|
+
removeIcon: string;
|
|
19
|
+
helperText: string;
|
|
20
|
+
helperContainer: string;
|
|
21
|
+
helperContainerSmall: string;
|
|
22
|
+
helperContainerMedium: string;
|
|
23
|
+
helperContainerLarge: string;
|
|
23
24
|
}>;
|
|
@@ -1,67 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
import { memoizeGetStyles, prefix } from '../../lib/theming/Emotion.js';
|
|
6
|
-
import { tokenSizeMixin } from './Token.mixins.js';
|
|
1
|
+
import { prefix } from '../../lib/theming/Emotion.js';
|
|
2
|
+
import { staticStyles } from '../../lib/theming/staticStyles.js';
|
|
7
3
|
export var globalClasses = prefix('token')({
|
|
8
4
|
removeIcon: 'remove-icon',
|
|
9
5
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
tokenActive: function (t) {
|
|
32
|
-
return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border: solid ", " ", ";\n "], ["\n color: ", ";\n background: ", ";\n border: solid ", " ", ";\n "])), t.tokenColorActive, t.tokenBgActive, t.tokenBorderWidth, t.tokenBorderColorActive);
|
|
33
|
-
},
|
|
34
|
-
tokenError: function (t) {
|
|
35
|
-
return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n border: solid ", " ", ";\n box-shadow: 0 0 0 ", " ", ";\n "], ["\n border: solid ", " ", ";\n box-shadow: 0 0 0 ", " ", ";\n "])), t.tokenBorderWidth, t.tokenBorderColorError, t.tokenOutlineWidth, t.tokenBorderColorError);
|
|
36
|
-
},
|
|
37
|
-
tokenWarning: function (t) {
|
|
38
|
-
return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n border: solid ", " ", ";\n box-shadow: 0 0 0 ", " ", ";\n "], ["\n border: solid ", " ", ";\n box-shadow: 0 0 0 ", " ", ";\n "])), t.tokenBorderWidth, t.tokenBorderColorWarning, t.tokenOutlineWidth, t.tokenBorderColorWarning);
|
|
39
|
-
},
|
|
40
|
-
tokenDisabled: function (t) {
|
|
41
|
-
return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n user-select: text;\n cursor: text;\n color: ", ";\n pointer-events: none;\n border: solid 1px ", ";\n\n .", " {\n visibility: hidden;\n }\n "], ["\n user-select: text;\n cursor: text;\n color: ", ";\n pointer-events: none;\n border: solid 1px ", ";\n\n .", " {\n visibility: hidden;\n }\n "])), t.tokenTextColorDisabled, t.tokenBorderColorDisabled, globalClasses.removeIcon);
|
|
42
|
-
},
|
|
43
|
-
text: function () {
|
|
44
|
-
return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n display: inline-block;\n "], ["\n display: inline-block;\n "])));
|
|
45
|
-
},
|
|
46
|
-
removeIcon: function (t) {
|
|
47
|
-
return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n height: ", ";\n width: ", ";\n flex-shrink: 0;\n padding: ", " ", ";\n box-sizing: ", ";\n margin-left: ", ";\n transition: none;\n fill: currentColor;\n opacity: 0.5;\n line-height: 0;\n display: inline-block;\n\n &:hover {\n opacity: 1;\n }\n "], ["\n height: ", ";\n width: ", ";\n flex-shrink: 0;\n padding: ", " ", ";\n box-sizing: ", ";\n margin-left: ", ";\n transition: none;\n fill: currentColor;\n opacity: 0.5;\n line-height: 0;\n display: inline-block;\n\n &:hover {\n opacity: 1;\n }\n "])), t.tokenRemoveIconSize, t.tokenRemoveIconSize, t.tokenRemoveIconPaddingY, t.tokenRemoveIconPaddingX, t.tokenRemoveIconBoxSizing, t.tokenRemoveIconGap);
|
|
48
|
-
},
|
|
49
|
-
helperText: function () {
|
|
50
|
-
return css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n max-width: 100%;\n word-break: break-all;\n\n // don't collapse spaces\n // so they get counted in width\n white-space: pre-wrap;\n "], ["\n max-width: 100%;\n word-break: break-all;\n\n // don't collapse spaces\n // so they get counted in width\n white-space: pre-wrap;\n "])));
|
|
51
|
-
},
|
|
52
|
-
helperContainer: function () {
|
|
53
|
-
return css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: flex;\n position: absolute;\n visibility: hidden;\n "], ["\n display: flex;\n position: absolute;\n visibility: hidden;\n "])));
|
|
54
|
-
},
|
|
55
|
-
helperContainerSmall: function (t) {
|
|
56
|
-
return css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n left: ", ";\n right: ", ";\n "], ["\n left: ", ";\n right: ", ";\n "])), t.tokenInputPaddingXSmall, t.tokenInputPaddingXSmall);
|
|
57
|
-
},
|
|
58
|
-
helperContainerMedium: function (t) {
|
|
59
|
-
return css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n left: ", ";\n right: ", ";\n "], ["\n left: ", ";\n right: ", ";\n "])), t.tokenInputPaddingXMedium, t.tokenInputPaddingXMedium);
|
|
60
|
-
},
|
|
61
|
-
helperContainerLarge: function (t) {
|
|
62
|
-
return css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n left: ", ";\n right: ", ";\n "], ["\n left: ", ";\n right: ", ";\n "])), t.tokenInputPaddingXLarge, t.tokenInputPaddingXLarge);
|
|
63
|
-
},
|
|
64
|
-
});
|
|
6
|
+
/** Правила — в `Token.css`; здесь только имена классов. */
|
|
7
|
+
export var getStyles = staticStyles({
|
|
8
|
+
token: 'react-ui-Token-token',
|
|
9
|
+
tokenSmall: 'react-ui-Token-tokenSmall',
|
|
10
|
+
tokenMedium: 'react-ui-Token-tokenMedium',
|
|
11
|
+
tokenLarge: 'react-ui-Token-tokenLarge',
|
|
12
|
+
closeButtonIcon: 'react-ui-Token-closeButtonIcon',
|
|
13
|
+
tokenIdle: 'react-ui-Token-tokenIdle',
|
|
14
|
+
tokenHover: 'react-ui-Token-tokenHover',
|
|
15
|
+
tokenActive: 'react-ui-Token-tokenActive',
|
|
16
|
+
tokenError: 'react-ui-Token-tokenError',
|
|
17
|
+
tokenWarning: 'react-ui-Token-tokenWarning',
|
|
18
|
+
tokenDisabled: 'react-ui-Token-tokenDisabled',
|
|
19
|
+
text: 'react-ui-Token-text',
|
|
20
|
+
removeIcon: 'react-ui-Token-removeIcon',
|
|
21
|
+
helperText: 'react-ui-Token-helperText',
|
|
22
|
+
helperContainer: 'react-ui-Token-helperContainer',
|
|
23
|
+
helperContainerSmall: 'react-ui-Token-helperContainerSmall',
|
|
24
|
+
helperContainerMedium: 'react-ui-Token-helperContainerMedium',
|
|
25
|
+
helperContainerLarge: 'react-ui-Token-helperContainerLarge',
|
|
65
26
|
});
|
|
66
|
-
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;
|
|
67
27
|
//# sourceMappingURL=Token.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.styles.js","sourceRoot":"","sources":["Token.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Token.styles.js","sourceRoot":"","sources":["Token.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3C,UAAU,EAAE,aAAa;CAC1B,CAAC,CAAC;AAEH,2DAA2D;AAC3D,MAAM,CAAC,IAAM,SAAS,GAAG,YAAY,CAAC;IACpC,KAAK,EAAE,sBAAsB;IAC7B,UAAU,EAAE,2BAA2B;IACvC,WAAW,EAAE,4BAA4B;IACzC,UAAU,EAAE,2BAA2B;IACvC,eAAe,EAAE,gCAAgC;IACjD,SAAS,EAAE,0BAA0B;IACrC,UAAU,EAAE,2BAA2B;IACvC,WAAW,EAAE,4BAA4B;IACzC,UAAU,EAAE,2BAA2B;IACvC,YAAY,EAAE,6BAA6B;IAC3C,aAAa,EAAE,8BAA8B;IAC7C,IAAI,EAAE,qBAAqB;IAC3B,UAAU,EAAE,2BAA2B;IACvC,UAAU,EAAE,2BAA2B;IACvC,eAAe,EAAE,gCAAgC;IACjD,oBAAoB,EAAE,qCAAqC;IAC3D,qBAAqB,EAAE,sCAAsC;IAC7D,oBAAoB,EAAE,qCAAqC;CAC5D,CAAC,CAAC","sourcesContent":["import { prefix } from '../../lib/theming/Emotion.js';\nimport { staticStyles } from '../../lib/theming/staticStyles.js';\n\nexport const globalClasses = prefix('token')({\n removeIcon: 'remove-icon',\n});\n\n/** Правила — в `Token.css`; здесь только имена классов. */\nexport const getStyles = staticStyles({\n token: 'react-ui-Token-token',\n tokenSmall: 'react-ui-Token-tokenSmall',\n tokenMedium: 'react-ui-Token-tokenMedium',\n tokenLarge: 'react-ui-Token-tokenLarge',\n closeButtonIcon: 'react-ui-Token-closeButtonIcon',\n tokenIdle: 'react-ui-Token-tokenIdle',\n tokenHover: 'react-ui-Token-tokenHover',\n tokenActive: 'react-ui-Token-tokenActive',\n tokenError: 'react-ui-Token-tokenError',\n tokenWarning: 'react-ui-Token-tokenWarning',\n tokenDisabled: 'react-ui-Token-tokenDisabled',\n text: 'react-ui-Token-text',\n removeIcon: 'react-ui-Token-removeIcon',\n helperText: 'react-ui-Token-helperText',\n helperContainer: 'react-ui-Token-helperContainer',\n helperContainerSmall: 'react-ui-Token-helperContainerSmall',\n helperContainerMedium: 'react-ui-Token-helperContainerMedium',\n helperContainerLarge: 'react-ui-Token-helperContainerLarge',\n});\n"]}
|
|
@@ -20,32 +20,30 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import React, { forwardRef
|
|
23
|
+
import React, { forwardRef } from 'react';
|
|
24
24
|
import { CommonWrapper } from '../../internal/CommonWrapper/index.js';
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
25
|
+
import { useStyles } from '../../lib/renderEnvironment/index.js';
|
|
26
|
+
import { concatClassNames as cx } from '../../lib/theming/Emotion.js';
|
|
27
27
|
import { getStyles, globalClasses } from './Token.styles.js';
|
|
28
28
|
export var TokenView = forwardRef(function (props, ref) {
|
|
29
29
|
var _a;
|
|
30
30
|
var _b = props.size, size = _b === void 0 ? 'small' : _b, children = props.children, closeButton = props.closeButton, hideCloseButton = props.hideCloseButton, className = props.className, rest = __rest(props, ["size", "children", "closeButton", "hideCloseButton", "className"]);
|
|
31
|
-
var cx = useEmotion().cx;
|
|
32
31
|
var styles = useStyles(getStyles);
|
|
33
|
-
var theme = useContext(ThemeContext);
|
|
34
32
|
var getSizeClassName = function (size) {
|
|
35
33
|
switch (size) {
|
|
36
34
|
case 'large':
|
|
37
|
-
return styles.tokenLarge(
|
|
35
|
+
return styles.tokenLarge();
|
|
38
36
|
case 'medium':
|
|
39
|
-
return styles.tokenMedium(
|
|
37
|
+
return styles.tokenMedium();
|
|
40
38
|
case 'small':
|
|
41
39
|
default:
|
|
42
|
-
return styles.tokenSmall(
|
|
40
|
+
return styles.tokenSmall();
|
|
43
41
|
}
|
|
44
42
|
};
|
|
45
|
-
var closeButtonNode = hideCloseButton ? null : (React.createElement("span", { className: cx(styles.removeIcon(
|
|
43
|
+
var closeButtonNode = hideCloseButton ? null : (React.createElement("span", { className: cx(styles.removeIcon(), globalClasses.removeIcon) }, closeButton));
|
|
46
44
|
return (React.createElement(CommonWrapper, __assign({}, props, { ref: ref }),
|
|
47
45
|
React.createElement("div", __assign({}, rest, { className: cx(getSizeClassName(size), (_a = {},
|
|
48
|
-
_a[styles.token(
|
|
46
|
+
_a[styles.token()] = true,
|
|
49
47
|
_a)) }),
|
|
50
48
|
children,
|
|
51
49
|
closeButtonNode)));
|