@skbkontur/react-ui 0.0.0-66a28a30fb → 0.0.0-68e286f9fe
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 +98 -0
- package/README.md +1 -1
- package/cjs/components/Autocomplete/Autocomplete.d.ts +0 -22
- package/cjs/components/Autocomplete/Autocomplete.js +2 -40
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Button/Button.styles.js +2 -1
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Calendar/CalendarDay.js +18 -2
- package/cjs/components/Calendar/CalendarDay.js.map +1 -1
- package/cjs/components/Calendar/DayCellView.js +7 -15
- package/cjs/components/Calendar/DayCellView.js.map +1 -1
- package/cjs/components/Checkbox/Checkbox.d.ts +0 -12
- package/cjs/components/Checkbox/Checkbox.js +1 -14
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/ComboBox/ComboBox.d.ts +7 -1
- package/cjs/components/ComboBox/ComboBox.js +8 -1
- package/cjs/components/ComboBox/ComboBox.js.map +1 -1
- package/cjs/components/ComboBox/ComboBox.md +2 -2
- package/cjs/components/CurrencyInput/CurrencyInput.d.ts +1 -24
- package/cjs/components/CurrencyInput/CurrencyInput.js +2 -29
- package/cjs/components/CurrencyInput/CurrencyInput.js.map +1 -1
- package/cjs/components/CurrencyLabel/CurrencyLabel.js +21 -27
- package/cjs/components/CurrencyLabel/CurrencyLabel.js.map +1 -1
- package/cjs/components/DateInput/DateInput.d.ts +1 -0
- package/cjs/components/DateInput/DateInput.js +37 -14
- package/cjs/components/DateInput/DateInput.js.map +1 -1
- package/cjs/components/DateInput/helpers/InternalDateMediator.d.ts +1 -1
- package/cjs/components/DateInput/helpers/InternalDateMediator.js +10 -1
- package/cjs/components/DateInput/helpers/InternalDateMediator.js.map +1 -1
- package/cjs/components/DatePicker/DatePicker.d.ts +4 -33
- package/cjs/components/DatePicker/DatePicker.js +5 -60
- package/cjs/components/DatePicker/DatePicker.js.map +1 -1
- package/cjs/components/DateRangePicker/DateRangePicker.d.ts +3 -1
- package/cjs/components/DateRangePicker/DateRangePicker.js +61 -23
- package/cjs/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/cjs/components/DateRangePicker/DateRangePicker.styles.d.ts +0 -1
- package/cjs/components/DateRangePicker/DateRangePicker.styles.js +13 -18
- package/cjs/components/DateRangePicker/DateRangePicker.styles.js.map +1 -1
- package/cjs/components/DateRangePicker/DateRangePickerInput.js +4 -8
- package/cjs/components/DateRangePicker/DateRangePickerInput.js.map +1 -1
- package/cjs/components/DateRangePicker/helpers/validateDateRangePicker.js +17 -17
- package/cjs/components/DateRangePicker/helpers/validateDateRangePicker.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.d.ts +0 -47
- package/cjs/components/Dropdown/Dropdown.js +2 -83
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/DropdownMenu/DropdownMenu.md +8 -8
- package/cjs/components/FileUploader/FileUploader.js +14 -2
- package/cjs/components/FileUploader/FileUploader.js.map +1 -1
- package/cjs/components/FxInput/FxInput.d.ts +1 -6
- package/cjs/components/FxInput/FxInput.js +1 -7
- package/cjs/components/FxInput/FxInput.js.map +1 -1
- package/cjs/components/Gapped/Gapped.d.ts +0 -15
- package/cjs/components/Gapped/Gapped.js +1 -25
- package/cjs/components/Gapped/Gapped.js.map +1 -1
- package/cjs/components/Group/Group.d.ts +3 -4
- package/cjs/components/Group/Group.js +90 -40
- package/cjs/components/Group/Group.js.map +1 -1
- package/cjs/components/Group/Group.md +4 -4
- package/cjs/components/Group/Group.styles.d.ts +1 -0
- package/cjs/components/Group/Group.styles.js +12 -6
- package/cjs/components/Group/Group.styles.js.map +1 -1
- package/cjs/components/Input/Input.md +4 -5
- package/cjs/components/Input/InputLayout/InputLayout.d.ts +1 -0
- package/cjs/components/Input/InputLayout/InputLayout.js +4 -2
- package/cjs/components/Input/InputLayout/InputLayout.js.map +1 -1
- package/cjs/components/Kebab/Kebab.d.ts +0 -1
- package/cjs/components/Kebab/Kebab.js +1 -26
- package/cjs/components/Kebab/Kebab.js.map +1 -1
- package/cjs/components/Kebab/Kebab.md +32 -32
- package/cjs/components/Link/Link.js +5 -0
- package/cjs/components/Link/Link.js.map +1 -1
- package/cjs/components/Link/Link.mixins.js +1 -2
- package/cjs/components/Link/Link.mixins.js.map +1 -1
- package/cjs/components/Link/Link.styles.js +3 -2
- package/cjs/components/Link/Link.styles.js.map +1 -1
- package/cjs/components/Loader/Loader.d.ts +4 -36
- package/cjs/components/Loader/Loader.js +3 -58
- package/cjs/components/Loader/Loader.js.map +1 -1
- package/cjs/components/MenuItem/MenuItem.d.ts +0 -12
- package/cjs/components/MenuItem/MenuItem.js +1 -22
- package/cjs/components/MenuItem/MenuItem.js.map +1 -1
- package/cjs/components/MenuItem/MenuItem.md +6 -6
- package/cjs/components/MiniModal/MiniModal.styles.d.ts +1 -0
- package/cjs/components/MiniModal/MiniModal.styles.js +14 -7
- package/cjs/components/MiniModal/MiniModal.styles.js.map +1 -1
- package/cjs/components/MiniModal/MiniModalBody.js +17 -2
- package/cjs/components/MiniModal/MiniModalBody.js.map +1 -1
- package/cjs/components/Modal/Modal.styles.d.ts +1 -1
- package/cjs/components/Modal/Modal.styles.js +6 -6
- package/cjs/components/Modal/Modal.styles.js.map +1 -1
- package/cjs/components/Modal/ModalSeparator.js +1 -1
- package/cjs/components/Modal/ModalSeparator.js.map +1 -1
- package/cjs/components/Paging/Paging.d.ts +0 -1
- package/cjs/components/Paging/Paging.js +2 -28
- package/cjs/components/Paging/Paging.js.map +1 -1
- package/cjs/components/PasswordInput/PasswordInput.d.ts +0 -7
- package/cjs/components/PasswordInput/PasswordInput.js +1 -11
- package/cjs/components/PasswordInput/PasswordInput.js.map +1 -1
- package/cjs/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/cjs/components/RadioGroup/RadioGroup.js +18 -1
- package/cjs/components/RadioGroup/RadioGroup.js.map +1 -1
- package/cjs/components/RadioGroup/RadioGroup.styles.d.ts +1 -0
- package/cjs/components/RadioGroup/RadioGroup.styles.js +10 -4
- package/cjs/components/RadioGroup/RadioGroup.styles.js.map +1 -1
- package/cjs/components/ScrollContainer/ScrollContainer.d.ts +0 -9
- package/cjs/components/ScrollContainer/ScrollContainer.js +1 -11
- package/cjs/components/ScrollContainer/ScrollContainer.js.map +1 -1
- package/cjs/components/Select/Select.d.ts +3 -0
- package/cjs/components/Select/Select.js +4 -1
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.md +3 -3
- package/cjs/components/SidePage/SidePage.js +1 -1
- package/cjs/components/SidePage/SidePage.js.map +1 -1
- package/cjs/components/SidePage/SidePageHeader.js +4 -1
- package/cjs/components/SidePage/SidePageHeader.js.map +1 -1
- package/cjs/components/SingleToast/SingleToast.d.ts +3 -3
- package/cjs/components/SingleToast/SingleToast.js.map +1 -1
- package/cjs/components/Spinner/Spinner.d.ts +0 -18
- package/cjs/components/Spinner/Spinner.js +1 -32
- package/cjs/components/Spinner/Spinner.js.map +1 -1
- package/cjs/components/Sticky/Sticky.d.ts +3 -13
- package/cjs/components/Sticky/Sticky.js +12 -19
- package/cjs/components/Sticky/Sticky.js.map +1 -1
- package/cjs/components/Switcher/Switcher.d.ts +4 -21
- package/cjs/components/Switcher/Switcher.js +11 -21
- package/cjs/components/Switcher/Switcher.js.map +1 -1
- package/cjs/components/Switcher/Switcher.styles.d.ts +1 -0
- package/cjs/components/Switcher/Switcher.styles.js +17 -9
- package/cjs/components/Switcher/Switcher.styles.js.map +1 -1
- package/cjs/components/Textarea/Textarea.d.ts +6 -45
- package/cjs/components/Textarea/Textarea.js +16 -58
- package/cjs/components/Textarea/Textarea.js.map +1 -1
- package/cjs/components/Textarea/Textarea.styles.js +2 -1
- package/cjs/components/Textarea/Textarea.styles.js.map +1 -1
- package/cjs/components/Textarea/TextareaCounter.js +2 -13
- package/cjs/components/Textarea/TextareaCounter.js.map +1 -1
- package/cjs/components/Toast/Toast.d.ts +8 -6
- package/cjs/components/Toast/Toast.js +18 -4
- package/cjs/components/Toast/Toast.js.map +1 -1
- package/cjs/components/Toast/ToastStatic.d.ts +3 -2
- package/cjs/components/Toast/ToastStatic.js.map +1 -1
- package/cjs/components/Toast/ToastView.d.ts +1 -15
- package/cjs/components/Toast/ToastView.js +3 -23
- package/cjs/components/Toast/ToastView.js.map +1 -1
- package/cjs/components/Toggle/Toggle.d.ts +0 -10
- package/cjs/components/Toggle/Toggle.js +1 -12
- package/cjs/components/Toggle/Toggle.js.map +1 -1
- package/cjs/components/Token/Token.md +0 -83
- package/cjs/components/TokenInput/TokenInput.d.ts +2 -2
- package/cjs/components/TokenInput/TokenInput.js +2 -1
- package/cjs/components/TokenInput/TokenInput.js.map +1 -1
- package/cjs/components/TokenInput/TokenInput.md +2 -33
- package/cjs/components/TokenInput/TokenInputMenu.d.ts +12 -3
- package/cjs/components/TokenInput/TokenInputMenu.js +23 -1
- package/cjs/components/TokenInput/TokenInputMenu.js.map +1 -1
- package/cjs/components/Tooltip/Tooltip.d.ts +2 -3
- package/cjs/components/Tooltip/Tooltip.js +7 -9
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/components/Tooltip/Tooltip.md +8 -8
- package/cjs/components/TooltipMenu/TooltipMenu.md +12 -12
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js.map +1 -1
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.d.ts +1 -0
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.js +16 -7
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +3 -0
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.js +27 -9
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.js.map +1 -1
- package/cjs/internal/ComponentTable.js +2 -3
- package/cjs/internal/ComponentTable.js.map +1 -1
- package/cjs/internal/CustomComboBox/ComboBoxView.d.ts +6 -2
- package/cjs/internal/CustomComboBox/ComboBoxView.js +37 -2
- package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
- package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +4 -2
- package/cjs/internal/CustomComboBox/CustomComboBox.js +4 -1
- package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
- package/cjs/internal/DateSelect/DateSelect.d.ts +0 -10
- package/cjs/internal/DateSelect/DateSelect.js +12 -18
- package/cjs/internal/DateSelect/DateSelect.js.map +1 -1
- package/cjs/internal/InputLikeText/InputLikeText.styles.d.ts +1 -0
- package/cjs/internal/InputLikeText/InputLikeText.styles.js +12 -4
- package/cjs/internal/InputLikeText/InputLikeText.styles.js.map +1 -1
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +36 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js +233 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js +10 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js.map +1 -0
- package/cjs/internal/Popup/Popup.d.ts +41 -60
- package/cjs/internal/Popup/Popup.js +27 -78
- package/cjs/internal/Popup/Popup.js.map +1 -1
- package/cjs/internal/Popup/PopupPin.d.ts +23 -33
- package/cjs/internal/Popup/PopupPin.js +2 -35
- package/cjs/internal/Popup/PopupPin.js.map +1 -1
- package/cjs/internal/RenderContainer/RenderInnerContainer.d.ts +0 -6
- package/cjs/internal/RenderContainer/RenderInnerContainer.js +0 -9
- package/cjs/internal/RenderContainer/RenderInnerContainer.js.map +1 -1
- package/cjs/internal/RenderLayer/RenderLayer.d.ts +0 -3
- package/cjs/internal/RenderLayer/RenderLayer.js +2 -12
- package/cjs/internal/RenderLayer/RenderLayer.js.map +1 -1
- package/cjs/internal/ThemePlayground/Playground.js +16 -16
- package/cjs/internal/ThemePlayground/Playground.js.map +1 -1
- package/cjs/internal/ThemePlayground/SizesGroup.js +4 -4
- package/cjs/internal/ThemePlayground/SizesGroup.js.map +1 -1
- package/cjs/internal/ThemePlayground/ThemeContextPlayground.js +1 -1
- package/cjs/internal/ThemePlayground/ThemeContextPlayground.js.map +1 -1
- package/cjs/internal/ThemePlayground/VariableValue.js +4 -4
- package/cjs/internal/ThemePlayground/VariableValue.js.map +1 -1
- package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/cjs/internal/ZIndex/ZIndex.d.ts +1 -3
- package/cjs/internal/ZIndex/ZIndex.js +5 -2
- package/cjs/internal/ZIndex/ZIndex.js.map +1 -1
- package/cjs/internal/themes/BasicTheme.d.ts +4 -0
- package/cjs/internal/themes/BasicTheme.js +6 -2
- package/cjs/internal/themes/BasicTheme.js.map +1 -1
- package/cjs/internal/themes/DarkTheme5_2.js +1 -1
- package/cjs/internal/themes/DarkTheme5_2.js.map +1 -1
- package/cjs/internal/themes/DarkTheme5_3.d.ts +1 -0
- package/cjs/internal/themes/DarkTheme5_3.js +13 -0
- package/cjs/internal/themes/DarkTheme5_3.js.map +1 -0
- package/cjs/internal/themes/LightTheme5_3.d.ts +1 -0
- package/cjs/internal/themes/LightTheme5_3.js +13 -0
- package/cjs/internal/themes/LightTheme5_3.js.map +1 -0
- package/cjs/lib/date/InternalDateGetter.d.ts +1 -1
- package/cjs/lib/date/InternalDateGetter.js +8 -1
- package/cjs/lib/date/InternalDateGetter.js.map +1 -1
- package/cjs/lib/featureFlagsContext/FeatureFlagsHelpers.d.ts +5 -0
- package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +5 -0
- package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js +11 -1
- package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
- package/cjs/lib/forwardRefAndName.d.ts +1 -1
- package/cjs/lib/forwardRefAndName.js +0 -1
- package/cjs/lib/forwardRefAndName.js.map +1 -1
- package/cjs/lib/getMenuPositions.d.ts +21 -1
- package/cjs/lib/getMenuPositions.js +45 -8
- package/cjs/lib/getMenuPositions.js.map +1 -1
- package/cjs/lib/theming/ThemeVersions.d.ts +1 -1
- package/cjs/lib/theming/ThemeVersions.js.map +1 -1
- package/cjs/lib/theming/themes/DarkTheme.d.ts +1 -0
- package/cjs/lib/theming/themes/DarkTheme.js +4 -2
- package/cjs/lib/theming/themes/DarkTheme.js.map +1 -1
- package/cjs/lib/theming/themes/LightTheme.d.ts +1 -0
- package/cjs/lib/theming/themes/LightTheme.js +4 -2
- package/cjs/lib/theming/themes/LightTheme.js.map +1 -1
- package/cjs/lib/utils.d.ts +4 -0
- package/cjs/lib/utils.js +5 -1
- package/cjs/lib/utils.js.map +1 -1
- package/components/Autocomplete/Autocomplete/Autocomplete.js +3 -23
- package/components/Autocomplete/Autocomplete/Autocomplete.js.map +1 -1
- package/components/Autocomplete/Autocomplete.d.ts +0 -22
- package/components/Button/Button.styles/Button.styles.js +1 -1
- package/components/Button/Button.styles/Button.styles.js.map +1 -1
- package/components/Calendar/CalendarDay/CalendarDay.js +9 -2
- package/components/Calendar/CalendarDay/CalendarDay.js.map +1 -1
- package/components/Calendar/DayCellView/DayCellView.js +6 -10
- package/components/Calendar/DayCellView/DayCellView.js.map +1 -1
- package/components/Checkbox/Checkbox/Checkbox.js +0 -11
- package/components/Checkbox/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Checkbox.d.ts +0 -12
- package/components/ComboBox/ComboBox/ComboBox.js +2 -1
- package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
- package/components/ComboBox/ComboBox.d.ts +7 -1
- package/components/ComboBox/ComboBox.md +2 -2
- package/components/CurrencyInput/CurrencyInput/CurrencyInput.js +9 -36
- package/components/CurrencyInput/CurrencyInput/CurrencyInput.js.map +1 -1
- package/components/CurrencyInput/CurrencyInput.d.ts +1 -24
- package/components/CurrencyLabel/CurrencyLabel/CurrencyLabel.js +10 -22
- package/components/CurrencyLabel/CurrencyLabel/CurrencyLabel.js.map +1 -1
- package/components/DateInput/DateInput/DateInput.js +25 -16
- package/components/DateInput/DateInput/DateInput.js.map +1 -1
- package/components/DateInput/DateInput.d.ts +1 -0
- package/components/DateInput/helpers/InternalDateMediator/InternalDateMediator.js +2 -2
- package/components/DateInput/helpers/InternalDateMediator/InternalDateMediator.js.map +1 -1
- package/components/DateInput/helpers/InternalDateMediator.d.ts +1 -1
- package/components/DatePicker/DatePicker/DatePicker.js +1 -32
- package/components/DatePicker/DatePicker/DatePicker.js.map +1 -1
- package/components/DatePicker/DatePicker.d.ts +4 -33
- package/components/DateRangePicker/DateRangePicker/DateRangePicker.js +41 -22
- package/components/DateRangePicker/DateRangePicker/DateRangePicker.js.map +1 -1
- package/components/DateRangePicker/DateRangePicker.d.ts +3 -1
- package/components/DateRangePicker/DateRangePicker.styles/DateRangePicker.styles.js +12 -15
- package/components/DateRangePicker/DateRangePicker.styles/DateRangePicker.styles.js.map +1 -1
- package/components/DateRangePicker/DateRangePicker.styles.d.ts +0 -1
- package/components/DateRangePicker/DateRangePickerInput/DateRangePickerInput.js +5 -8
- package/components/DateRangePicker/DateRangePickerInput/DateRangePickerInput.js.map +1 -1
- package/components/DateRangePicker/helpers/validateDateRangePicker/validateDateRangePicker.js +16 -15
- package/components/DateRangePicker/helpers/validateDateRangePicker/validateDateRangePicker.js.map +1 -1
- package/components/Dropdown/Dropdown/Dropdown.js +1 -47
- package/components/Dropdown/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.d.ts +0 -47
- package/components/DropdownMenu/DropdownMenu.md +8 -8
- package/components/FileUploader/FileUploader/FileUploader.js +7 -2
- package/components/FileUploader/FileUploader/FileUploader.js.map +1 -1
- package/components/FxInput/FxInput/FxInput.js +1 -5
- package/components/FxInput/FxInput/FxInput.js.map +1 -1
- package/components/FxInput/FxInput.d.ts +1 -6
- package/components/Gapped/Gapped/Gapped.js +1 -15
- package/components/Gapped/Gapped/Gapped.js.map +1 -1
- package/components/Gapped/Gapped.d.ts +0 -15
- package/components/Group/Group/Group.js +64 -28
- package/components/Group/Group/Group.js.map +1 -1
- package/components/Group/Group.d.ts +3 -4
- package/components/Group/Group.md +4 -4
- package/components/Group/Group.styles/Group.styles.js +9 -6
- package/components/Group/Group.styles/Group.styles.js.map +1 -1
- package/components/Group/Group.styles.d.ts +1 -0
- package/components/Input/Input.md +4 -5
- package/components/Input/InputLayout/InputLayout/InputLayout.js +5 -2
- package/components/Input/InputLayout/InputLayout/InputLayout.js.map +1 -1
- package/components/Input/InputLayout/InputLayout.d.ts +1 -0
- package/components/Kebab/Kebab/Kebab.js +2 -20
- package/components/Kebab/Kebab/Kebab.js.map +1 -1
- package/components/Kebab/Kebab.d.ts +0 -1
- package/components/Kebab/Kebab.md +32 -32
- package/components/Link/Link/Link.js +4 -0
- package/components/Link/Link/Link.js.map +1 -1
- package/components/Link/Link.mixins/Link.mixins.js +1 -1
- package/components/Link/Link.mixins/Link.mixins.js.map +1 -1
- package/components/Link/Link.styles/Link.styles.js +1 -1
- package/components/Link/Link.styles/Link.styles.js.map +1 -1
- package/components/Loader/Loader/Loader.js +0 -33
- package/components/Loader/Loader/Loader.js.map +1 -1
- package/components/Loader/Loader.d.ts +4 -36
- package/components/MenuItem/MenuItem/MenuItem.js +1 -12
- package/components/MenuItem/MenuItem/MenuItem.js.map +1 -1
- package/components/MenuItem/MenuItem.d.ts +0 -12
- package/components/MenuItem/MenuItem.md +6 -6
- package/components/MiniModal/MiniModal.styles/MiniModal.styles.js +10 -7
- package/components/MiniModal/MiniModal.styles/MiniModal.styles.js.map +1 -1
- package/components/MiniModal/MiniModal.styles.d.ts +1 -0
- package/components/MiniModal/MiniModalBody/MiniModalBody.js +13 -5
- package/components/MiniModal/MiniModalBody/MiniModalBody.js.map +1 -1
- package/components/Modal/Modal.styles/Modal.styles.js +3 -3
- package/components/Modal/Modal.styles/Modal.styles.js.map +1 -1
- package/components/Modal/Modal.styles.d.ts +1 -1
- package/components/Modal/ModalSeparator/ModalSeparator.js +1 -1
- package/components/Modal/ModalSeparator/ModalSeparator.js.map +1 -1
- package/components/Paging/Paging/Paging.js +1 -22
- package/components/Paging/Paging/Paging.js.map +1 -1
- package/components/Paging/Paging.d.ts +0 -1
- package/components/PasswordInput/PasswordInput/PasswordInput.js +1 -7
- package/components/PasswordInput/PasswordInput/PasswordInput.js.map +1 -1
- package/components/PasswordInput/PasswordInput.d.ts +0 -7
- package/components/RadioGroup/RadioGroup/RadioGroup.js +23 -17
- package/components/RadioGroup/RadioGroup/RadioGroup.js.map +1 -1
- package/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/components/RadioGroup/RadioGroup.styles/RadioGroup.styles.js +7 -4
- package/components/RadioGroup/RadioGroup.styles/RadioGroup.styles.js.map +1 -1
- package/components/RadioGroup/RadioGroup.styles.d.ts +1 -0
- package/components/ScrollContainer/ScrollContainer/ScrollContainer.js +1 -9
- package/components/ScrollContainer/ScrollContainer/ScrollContainer.js.map +1 -1
- package/components/ScrollContainer/ScrollContainer.d.ts +0 -9
- package/components/Select/Select/Select.js +3 -2
- package/components/Select/Select/Select.js.map +1 -1
- package/components/Select/Select.d.ts +3 -0
- package/components/Select/Select.md +3 -3
- package/components/SidePage/SidePage/SidePage.js +1 -1
- package/components/SidePage/SidePage/SidePage.js.map +1 -1
- package/components/SidePage/SidePageHeader/SidePageHeader.js +6 -1
- package/components/SidePage/SidePageHeader/SidePageHeader.js.map +1 -1
- package/components/SingleToast/SingleToast/SingleToast.js.map +1 -1
- package/components/SingleToast/SingleToast.d.ts +3 -3
- package/components/Spinner/Spinner/Spinner.js +1 -18
- package/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/components/Spinner/Spinner.d.ts +0 -18
- package/components/Sticky/Sticky/Sticky.js +10 -14
- package/components/Sticky/Sticky/Sticky.js.map +1 -1
- package/components/Sticky/Sticky.d.ts +3 -13
- package/components/Switcher/Switcher/Switcher.js +19 -16
- package/components/Switcher/Switcher/Switcher.js.map +1 -1
- package/components/Switcher/Switcher.d.ts +4 -21
- package/components/Switcher/Switcher.styles/Switcher.styles.js +12 -9
- package/components/Switcher/Switcher.styles/Switcher.styles.js.map +1 -1
- package/components/Switcher/Switcher.styles.d.ts +1 -0
- package/components/Textarea/Textarea/Textarea.js +12 -46
- package/components/Textarea/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.d.ts +6 -45
- package/components/Textarea/Textarea.styles/Textarea.styles.js +1 -1
- package/components/Textarea/Textarea.styles/Textarea.styles.js.map +1 -1
- package/components/Textarea/TextareaCounter/TextareaCounter.js +1 -11
- package/components/Textarea/TextareaCounter/TextareaCounter.js.map +1 -1
- package/components/Toast/Toast/Toast.js +8 -10
- package/components/Toast/Toast/Toast.js.map +1 -1
- package/components/Toast/Toast.d.ts +8 -6
- package/components/Toast/ToastStatic/ToastStatic.js.map +1 -1
- package/components/Toast/ToastStatic.d.ts +3 -2
- package/components/Toast/ToastView/ToastView.js +3 -17
- package/components/Toast/ToastView/ToastView.js.map +1 -1
- package/components/Toast/ToastView.d.ts +1 -15
- package/components/Toggle/Toggle/Toggle.js +1 -10
- package/components/Toggle/Toggle/Toggle.js.map +1 -1
- package/components/Toggle/Toggle.d.ts +0 -10
- package/components/Token/Token.md +0 -83
- package/components/TokenInput/TokenInput/TokenInput.js +2 -1
- package/components/TokenInput/TokenInput/TokenInput.js.map +1 -1
- package/components/TokenInput/TokenInput.d.ts +2 -2
- package/components/TokenInput/TokenInput.md +2 -33
- package/components/TokenInput/TokenInputMenu/TokenInputMenu.js +16 -6
- package/components/TokenInput/TokenInputMenu/TokenInputMenu.js.map +1 -1
- package/components/TokenInput/TokenInputMenu.d.ts +12 -3
- package/components/Tooltip/Tooltip/Tooltip.js +8 -7
- package/components/Tooltip/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/Tooltip.d.ts +2 -3
- package/components/Tooltip/Tooltip.md +8 -8
- package/components/TooltipMenu/TooltipMenu.md +12 -12
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon/ClearCrossIcon.js +21 -7
- package/internal/ClearCrossIcon/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.d.ts +1 -0
- package/internal/ClearCrossIcon/ClearCrossIcon.styles/ClearCrossIcon.styles.js +14 -5
- package/internal/ClearCrossIcon/ClearCrossIcon.styles/ClearCrossIcon.styles.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +3 -0
- package/internal/ComponentTable/ComponentTable.js +0 -2
- package/internal/ComponentTable/ComponentTable.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js +59 -27
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView.d.ts +6 -2
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +2 -1
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.d.ts +4 -2
- package/internal/DateSelect/DateSelect/DateSelect.js +3 -10
- package/internal/DateSelect/DateSelect/DateSelect.js.map +1 -1
- package/internal/DateSelect/DateSelect.d.ts +0 -10
- package/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js +7 -4
- package/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js.map +1 -1
- package/internal/InputLikeText/InputLikeText.styles.d.ts +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/InternalTextareaWithLayout.js +244 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/package.json +6 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +36 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/InternalTextareaWithLayout.styles.js +8 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/InternalTextareaWithLayout.styles.js.map +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/package.json +6 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -0
- package/internal/Popup/Popup/Popup.js +13 -66
- package/internal/Popup/Popup/Popup.js.map +1 -1
- package/internal/Popup/Popup.d.ts +41 -60
- package/internal/Popup/PopupPin/PopupPin.js +1 -34
- package/internal/Popup/PopupPin/PopupPin.js.map +1 -1
- package/internal/Popup/PopupPin.d.ts +23 -33
- package/internal/RenderContainer/RenderInnerContainer/RenderInnerContainer.js +0 -8
- package/internal/RenderContainer/RenderInnerContainer/RenderInnerContainer.js.map +1 -1
- package/internal/RenderContainer/RenderInnerContainer.d.ts +0 -6
- package/internal/RenderLayer/RenderLayer/RenderLayer.js +3 -11
- package/internal/RenderLayer/RenderLayer/RenderLayer.js.map +1 -1
- package/internal/RenderLayer/RenderLayer.d.ts +0 -3
- package/internal/ThemePlayground/Playground/Playground.js +13 -13
- package/internal/ThemePlayground/Playground/Playground.js.map +1 -1
- package/internal/ThemePlayground/SizesGroup/SizesGroup.js +4 -4
- package/internal/ThemePlayground/SizesGroup/SizesGroup.js.map +1 -1
- package/internal/ThemePlayground/ThemeContextPlayground/ThemeContextPlayground.js +2 -2
- package/internal/ThemePlayground/ThemeContextPlayground/ThemeContextPlayground.js.map +1 -1
- package/internal/ThemePlayground/VariableValue/VariableValue.js +4 -4
- package/internal/ThemePlayground/VariableValue/VariableValue.js.map +1 -1
- package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/internal/ZIndex/ZIndex/ZIndex.js +8 -10
- package/internal/ZIndex/ZIndex/ZIndex.js.map +1 -1
- package/internal/ZIndex/ZIndex.d.ts +1 -3
- package/internal/themes/BasicTheme/BasicTheme.js +4 -0
- package/internal/themes/BasicTheme/BasicTheme.js.map +1 -1
- package/internal/themes/BasicTheme.d.ts +4 -0
- package/internal/themes/DarkTheme5_2/DarkTheme5_2.js +3 -3
- package/internal/themes/DarkTheme5_2/DarkTheme5_2.js.map +1 -1
- package/internal/themes/DarkTheme5_3/DarkTheme5_3.js +16 -0
- package/internal/themes/DarkTheme5_3/DarkTheme5_3.js.map +1 -0
- package/internal/themes/DarkTheme5_3/package.json +6 -0
- package/internal/themes/DarkTheme5_3.d.ts +1 -0
- package/internal/themes/LightTheme5_3/LightTheme5_3.js +16 -0
- package/internal/themes/LightTheme5_3/LightTheme5_3.js.map +1 -0
- package/internal/themes/LightTheme5_3/package.json +6 -0
- package/internal/themes/LightTheme5_3.d.ts +1 -0
- package/lib/date/InternalDateGetter/InternalDateGetter.js +4 -1
- package/lib/date/InternalDateGetter/InternalDateGetter.js.map +1 -1
- package/lib/date/InternalDateGetter.d.ts +1 -1
- package/lib/featureFlagsContext/FeatureFlagsHelpers.d.ts +5 -0
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js +6 -1
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +5 -0
- package/lib/forwardRefAndName/forwardRefAndName.js.map +1 -1
- package/lib/forwardRefAndName.d.ts +1 -1
- package/lib/getMenuPositions/getMenuPositions.js +33 -4
- package/lib/getMenuPositions/getMenuPositions.js.map +1 -1
- package/lib/getMenuPositions.d.ts +21 -1
- package/lib/theming/ThemeVersions/ThemeVersions.js.map +1 -1
- package/lib/theming/ThemeVersions.d.ts +1 -1
- package/lib/theming/themes/DarkTheme/DarkTheme.js +3 -1
- package/lib/theming/themes/DarkTheme/DarkTheme.js.map +1 -1
- package/lib/theming/themes/DarkTheme.d.ts +1 -0
- package/lib/theming/themes/LightTheme/LightTheme.js +3 -1
- package/lib/theming/themes/LightTheme/LightTheme.js.map +1 -1
- package/lib/theming/themes/LightTheme.d.ts +1 -0
- package/lib/utils/utils.js +2 -0
- package/lib/utils/utils.js.map +1 -1
- package/lib/utils.d.ts +4 -0
- package/package.json +7 -11
- package/cjs/lib/SSRSafe.d.ts +0 -2
- package/cjs/lib/SSRSafe.js +0 -5
- package/cjs/lib/SSRSafe.js.map +0 -1
- package/lib/SSRSafe/SSRSafe.js +0 -4
- package/lib/SSRSafe/SSRSafe.js.map +0 -1
- package/lib/SSRSafe/package.json +0 -6
- package/lib/SSRSafe.d.ts +0 -2
|
@@ -11,7 +11,7 @@ var _CommonWrapper = require("../CommonWrapper");
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _ClearCrossIcon = require("./ClearCrossIcon.styles");
|
|
14
|
-
var _CrossIcon = require("./CrossIcon");var _excluded = ["size", "style"];
|
|
14
|
+
var _CrossIcon = require("./CrossIcon");var _excluded = ["size", "style", "data-tid"];
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -22,17 +22,23 @@ var _CrossIcon = require("./CrossIcon");var _excluded = ["size", "style"];
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
var ClearCrossIcon = exports.ClearCrossIcon = function ClearCrossIcon(_ref)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
{var _ref$size = _ref.size,size = _ref$size === void 0 ? 'small' : _ref$size,style = _ref.style,dataTid = _ref['data-tid'],rest = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
26
32
|
var theme = _react.default.useContext(_ThemeContext.ThemeContext);
|
|
27
|
-
var
|
|
33
|
+
var getSizeClassNames = function getSizeClassNames(size) {
|
|
28
34
|
switch (size) {
|
|
29
35
|
case 'large':
|
|
30
|
-
return _ClearCrossIcon.styles.clearCrossLarge(theme);
|
|
36
|
+
return { button: _ClearCrossIcon.styles.clearCrossLarge(theme), span: _ClearCrossIcon.styles.relativeWidthLarge(theme) };
|
|
31
37
|
case 'medium':
|
|
32
|
-
return _ClearCrossIcon.styles.clearCrossMedium(theme);
|
|
38
|
+
return { button: _ClearCrossIcon.styles.clearCrossMedium(theme), span: _ClearCrossIcon.styles.relativeWidthMedium(theme) };
|
|
33
39
|
case 'small':
|
|
34
40
|
default:
|
|
35
|
-
return _ClearCrossIcon.styles.clearCrossSmall(theme);
|
|
41
|
+
return { button: _ClearCrossIcon.styles.clearCrossSmall(theme), span: _ClearCrossIcon.styles.relativeWidthSmall(theme) };
|
|
36
42
|
}
|
|
37
43
|
};
|
|
38
44
|
|
|
@@ -50,14 +56,16 @@ var ClearCrossIcon = exports.ClearCrossIcon = function ClearCrossIcon(_ref) {var
|
|
|
50
56
|
|
|
51
57
|
return /*#__PURE__*/(
|
|
52
58
|
_react.default.createElement(_CommonWrapper.CommonWrapper, rest, /*#__PURE__*/
|
|
59
|
+
_react.default.createElement("span", { className: getSizeClassNames(size).span }, /*#__PURE__*/
|
|
53
60
|
_react.default.createElement("button", (0, _extends2.default)({
|
|
61
|
+
"data-tid": dataTid,
|
|
54
62
|
type: "button",
|
|
55
63
|
tabIndex: -1,
|
|
56
64
|
className: (0, _Emotion.cx)(
|
|
57
65
|
_ClearCrossIcon.styles.root(theme),
|
|
58
66
|
// Todo: use &:focus-visible on root instead styles.focus. It supported on Chrome >= 86, Firefox >= 4, Safari >= 15.4
|
|
59
67
|
focusedByTab && _ClearCrossIcon.styles.focus(theme),
|
|
60
|
-
|
|
68
|
+
getSizeClassNames(size).button
|
|
61
69
|
),
|
|
62
70
|
style: style,
|
|
63
71
|
onFocus: handleFocus,
|
|
@@ -66,6 +74,7 @@ var ClearCrossIcon = exports.ClearCrossIcon = function ClearCrossIcon(_ref) {var
|
|
|
66
74
|
|
|
67
75
|
_react.default.createElement(_CrossIcon.CrossIcon, { size: size, focusable: true })
|
|
68
76
|
)
|
|
77
|
+
)
|
|
69
78
|
));
|
|
70
79
|
|
|
71
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_globalObject","_Emotion","_keyListener","_ThemeContext","_CommonWrapper","_ClearCrossIcon","_CrossIcon","_excluded","ClearCrossIcon","exports","_ref","_ref$size","size","style","rest","_objectWithoutPropertiesLoose2","default","theme","React","useContext","ThemeContext","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_globalObject","_Emotion","_keyListener","_ThemeContext","_CommonWrapper","_ClearCrossIcon","_CrossIcon","_excluded","ClearCrossIcon","exports","_ref","_ref$size","size","style","dataTid","rest","_objectWithoutPropertiesLoose2","default","theme","React","useContext","ThemeContext","getSizeClassNames","button","styles","clearCrossLarge","span","relativeWidthLarge","clearCrossMedium","relativeWidthMedium","clearCrossSmall","relativeWidthSmall","_React$useState","useState","focusedByTab","setFocusedByTab","handleFocus","globalObject","requestAnimationFrame","keyListener","isTabPressed","handleBlur","createElement","CommonWrapper","className","_extends2","type","tabIndex","cx","root","focus","onFocus","onBlur","CrossIcon","focusable","__KONTUR_REACT_UI__","displayName"],"sources":["ClearCrossIcon.tsx"],"sourcesContent":["import type { AriaAttributes } from 'react';\nimport React from 'react';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport { cx } from '../../lib/theming/Emotion';\nimport { keyListener } from '../../lib/events/keyListener';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport type { CommonProps } from '../CommonWrapper';\nimport { CommonWrapper } from '../CommonWrapper';\nimport type { SizeProp } from '../../lib/types/props';\nimport type { TokenSize } from '../../components/Token';\n\nimport { styles } from './ClearCrossIcon.styles';\nimport { CrossIcon } from './CrossIcon';\n\nexport interface ClearCrossIconProps\n extends Pick<AriaAttributes, 'aria-label'>,\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n CommonProps {\n /** Ширина и высота иконки крестика\n * @default small */\n size?: SizeProp;\n 'data-tid'?: string;\n}\n\nexport const ClearCrossIcon: React.FunctionComponent<ClearCrossIconProps> = ({\n size = 'small',\n style,\n 'data-tid': dataTid,\n ...rest\n}) => {\n const theme = React.useContext(ThemeContext);\n const getSizeClassNames = (size: TokenSize) => {\n switch (size) {\n case 'large':\n return { button: styles.clearCrossLarge(theme), span: styles.relativeWidthLarge(theme) };\n case 'medium':\n return { button: styles.clearCrossMedium(theme), span: styles.relativeWidthMedium(theme) };\n case 'small':\n default:\n return { button: styles.clearCrossSmall(theme), span: styles.relativeWidthSmall(theme) };\n }\n };\n\n const [focusedByTab, setFocusedByTab] = React.useState<boolean>(false);\n\n const handleFocus = () => {\n // focus event fires before keyDown eventlistener so we should check tabPressed in async way\n globalObject.requestAnimationFrame?.(() => {\n if (keyListener.isTabPressed) {\n setFocusedByTab(true);\n }\n });\n };\n const handleBlur = () => setFocusedByTab(false);\n\n return (\n <CommonWrapper {...rest}>\n <span className={getSizeClassNames(size).span}>\n <button\n data-tid={dataTid}\n type=\"button\"\n tabIndex={-1}\n className={cx(\n styles.root(theme),\n // Todo: use &:focus-visible on root instead styles.focus. It supported on Chrome >= 86, Firefox >= 4, Safari >= 15.4\n focusedByTab && styles.focus(theme),\n getSizeClassNames(size).button,\n )}\n style={style}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...rest}\n >\n <CrossIcon size={size} focusable />\n </button>\n </span>\n </CommonWrapper>\n );\n};\n\nClearCrossIcon.__KONTUR_REACT_UI__ = 'ClearCrossIcon';\nClearCrossIcon.displayName = 'ClearCrossIcon';\n"],"mappings":";AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;;AAEA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;;AAEA,IAAAK,cAAA,GAAAL,OAAA;;;;AAIA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA,gBAAwC,IAAAQ,SAAA;;;;;;;;;;;;AAYjC,IA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zC,IAAIC,wBAAW,CAACC,YAAY,EAAE;QAC5BL,eAAe,CAAC,IAAI,CAAC;MACvB;IACF,CAAC,CAAC;EACJ,CAAC;EACD,IAAMM,UAAU,GAAG,SAAbA,UAAUA,CAAA,UAASN,eAAe,CAAC,KAAK,CAAC;;EAE/C;IACEtC,MAAA,CAAAoB,OAAA,CAAAyB,aAAA,CAACtC,cAAA,CAAAuC,aAAa,EAAK5B,IAAI;IACrBlB,MAAA,CAAAoB,OAAA,CAAAyB,aAAA,WAAME,SAAS,EAAEtB,iBAAiB,CAACV,IAAI,CAAC,CAACc,IAAK;IAC5C7B,MAAA,CAAAoB,OAAA,CAAAyB,aAAA,eAAAG,SAAA,CAAA5B,OAAA;MACE,YAAUH,OAAQ;MAClBgC,IAAI,EAAC,QAAQ;MACbC,QAAQ,EAAE,CAAC,CAAE;MACbH,SAAS,EAAE,IAAAI,WAAE;QACXxB,sBAAM,CAACyB,IAAI,CAAC/B,KAAK,CAAC;QAClB;QACAgB,YAAY,IAAIV,sBAAM,CAAC0B,KAAK,CAAChC,KAAK,CAAC;QACnCI,iBAAiB,CAACV,IAAI,CAAC,CAACW;MAC1B,CAAE;MACFV,KAAK,EAAEA,KAAM;MACbsC,OAAO,EAAEf,WAAY;MACrBgB,MAAM,EAAEX,UAAW;IACf1B,IAAI;;IAERlB,MAAA,CAAAoB,OAAA,CAAAyB,aAAA,CAACpC,UAAA,CAAA+C,SAAS,IAACzC,IAAI,EAAEA,IAAK,EAAC0C,SAAS,QAAE;IAC5B;IACJ;IACO,CAAC;;AAEpB,CAAC;;AAED9C,cAAc,CAAC+C,mBAAmB,GAAG,gBAAgB;AACrD/C,cAAc,CAACgD,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -5,4 +5,7 @@ export declare const styles: {
|
|
|
5
5
|
clearCrossSmall(t: Theme): string;
|
|
6
6
|
clearCrossMedium(t: Theme): string;
|
|
7
7
|
clearCrossLarge(t: Theme): string;
|
|
8
|
+
relativeWidthSmall(t: Theme): string;
|
|
9
|
+
relativeWidthMedium(t: Theme): string;
|
|
10
|
+
relativeWidthLarge(t: Theme): string;
|
|
8
11
|
};
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.styles = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _Emotion = require("../../lib/theming/Emotion");
|
|
2
2
|
|
|
3
|
-
var _Mixins = require("../../lib/styles/Mixins");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
3
|
+
var _Mixins = require("../../lib/styles/Mixins");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
4
4
|
|
|
5
5
|
var styles = exports.styles = (0, _Emotion.memoizeStyle)({
|
|
6
6
|
root: function root(t) {
|
|
7
|
-
return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n ", "\n color: ", ";\n cursor: pointer;\n transition: color ", " ", ";\n &:hover {\n color: ", ";\n }\n display: flex;\n justify-content: center;\n align-items: center;\n "])),
|
|
7
|
+
return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n ", "\n color: ", ";\n cursor: pointer;\n transition: color ", " ", ";\n &:hover {\n color: ", ";\n }\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n right: -", "px;\n top: -", "px;\n "])),
|
|
8
8
|
(0, _Mixins.resetButton)(),
|
|
9
9
|
t.clearCrossIconColor,
|
|
10
10
|
|
|
11
11
|
t.transitionDuration, t.transitionTimingFunction,
|
|
12
12
|
|
|
13
|
-
t.clearCrossIconHoverColor
|
|
13
|
+
t.clearCrossIconHoverColor,
|
|
14
|
+
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
parseInt(t.inputBorderWidth),
|
|
20
|
+
parseInt(t.inputBorderWidth));
|
|
18
21
|
|
|
19
22
|
},
|
|
20
23
|
|
|
@@ -25,27 +28,42 @@ var styles = exports.styles = (0, _Emotion.memoizeStyle)({
|
|
|
25
28
|
},
|
|
26
29
|
|
|
27
30
|
clearCrossSmall: function clearCrossSmall(t) {
|
|
28
|
-
return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n width: ", ";\n height: ", ";\n
|
|
31
|
+
return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n width: ", ";\n height: ", ";\n border-radius: ", ";\n "])),
|
|
29
32
|
t.clearCrossIconWidthSmall,
|
|
30
33
|
t.clearCrossIconHeightSmall,
|
|
31
|
-
t.clearCrossIconRightMarginSmall,
|
|
32
34
|
t.clearCrossIconBorderRadiusSmall);
|
|
33
35
|
|
|
34
36
|
},
|
|
35
37
|
clearCrossMedium: function clearCrossMedium(t) {
|
|
36
|
-
return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n width: ", ";\n height: ", ";\n
|
|
38
|
+
return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n width: ", ";\n height: ", ";\n border-radius: ", ";\n "])),
|
|
37
39
|
t.clearCrossIconWidthMedium,
|
|
38
40
|
t.clearCrossIconHeightMedium,
|
|
39
|
-
t.clearCrossIconRightMarginMedium,
|
|
40
41
|
t.clearCrossIconBorderRadiusMedium);
|
|
41
42
|
|
|
42
43
|
},
|
|
43
44
|
clearCrossLarge: function clearCrossLarge(t) {
|
|
44
|
-
return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n width: ", ";\n height: ", ";\n
|
|
45
|
+
return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n width: ", ";\n height: ", ";\n border-radius: ", ";\n "])),
|
|
45
46
|
t.clearCrossIconWidthLarge,
|
|
46
47
|
t.clearCrossIconHeightLarge,
|
|
47
|
-
t.clearCrossIconRightMarginLarge,
|
|
48
48
|
t.clearCrossIconBorderRadiusLarge);
|
|
49
49
|
|
|
50
|
+
},
|
|
51
|
+
relativeWidthSmall: function relativeWidthSmall(t) {
|
|
52
|
+
return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n display: inline-block;\n width: ", ";\n "])),
|
|
53
|
+
|
|
54
|
+
t.inputIconSizeSmall);
|
|
55
|
+
|
|
56
|
+
},
|
|
57
|
+
relativeWidthMedium: function relativeWidthMedium(t) {
|
|
58
|
+
return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n display: inline-block;\n width: ", ";\n "])),
|
|
59
|
+
|
|
60
|
+
t.inputIconSizeMedium);
|
|
61
|
+
|
|
62
|
+
},
|
|
63
|
+
relativeWidthLarge: function relativeWidthLarge(t) {
|
|
64
|
+
return (0, _Emotion.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteralLoose2.default)(["\n display: inline-block;\n width: ", ";\n "])),
|
|
65
|
+
|
|
66
|
+
t.inputIconSizeLarge);
|
|
67
|
+
|
|
50
68
|
}
|
|
51
69
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Emotion","require","_Mixins","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","styles","exports","memoizeStyle","root","t","css","_taggedTemplateLiteralLoose2","default","resetButton","clearCrossIconColor","transitionDuration","transitionTimingFunction","clearCrossIconHoverColor","focus","clearCrossSmall","clearCrossIconWidthSmall","clearCrossIconHeightSmall","
|
|
1
|
+
{"version":3,"names":["_Emotion","require","_Mixins","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","styles","exports","memoizeStyle","root","t","css","_taggedTemplateLiteralLoose2","default","resetButton","clearCrossIconColor","transitionDuration","transitionTimingFunction","clearCrossIconHoverColor","parseInt","inputBorderWidth","focus","clearCrossSmall","clearCrossIconWidthSmall","clearCrossIconHeightSmall","clearCrossIconBorderRadiusSmall","clearCrossMedium","clearCrossIconWidthMedium","clearCrossIconHeightMedium","clearCrossIconBorderRadiusMedium","clearCrossLarge","clearCrossIconWidthLarge","clearCrossIconHeightLarge","clearCrossIconBorderRadiusLarge","relativeWidthSmall","inputIconSizeSmall","relativeWidthMedium","inputIconSizeMedium","relativeWidthLarge","inputIconSizeLarge"],"sources":["ClearCrossIcon.styles.tsx"],"sourcesContent":["import { css, memoizeStyle } from '../../lib/theming/Emotion';\nimport type { Theme } from '../../lib/theming/Theme';\nimport { resetButton } from '../../lib/styles/Mixins';\n\nexport const styles = memoizeStyle({\n root(t: Theme) {\n return css`\n ${resetButton()}\n color: ${t.clearCrossIconColor};\n cursor: pointer;\n transition: color ${t.transitionDuration} ${t.transitionTimingFunction};\n &:hover {\n color: ${t.clearCrossIconHoverColor};\n }\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n right: -${parseInt(t.inputBorderWidth)}px;\n top: -${parseInt(t.inputBorderWidth)}px;\n `;\n },\n\n focus(t: Theme) {\n return css`\n color: ${t.clearCrossIconHoverColor};\n `;\n },\n\n clearCrossSmall(t: Theme) {\n return css`\n width: ${t.clearCrossIconWidthSmall};\n height: ${t.clearCrossIconHeightSmall};\n border-radius: ${t.clearCrossIconBorderRadiusSmall};\n `;\n },\n clearCrossMedium(t: Theme) {\n return css`\n width: ${t.clearCrossIconWidthMedium};\n height: ${t.clearCrossIconHeightMedium};\n border-radius: ${t.clearCrossIconBorderRadiusMedium};\n `;\n },\n clearCrossLarge(t: Theme) {\n return css`\n width: ${t.clearCrossIconWidthLarge};\n height: ${t.clearCrossIconHeightLarge};\n border-radius: ${t.clearCrossIconBorderRadiusLarge};\n `;\n },\n relativeWidthSmall(t: Theme) {\n return css`\n display: inline-block;\n width: ${t.inputIconSizeSmall};\n `;\n },\n relativeWidthMedium(t: Theme) {\n return css`\n display: inline-block;\n width: ${t.inputIconSizeMedium};\n `;\n },\n relativeWidthLarge(t: Theme) {\n return css`\n display: inline-block;\n width: ${t.inputIconSizeLarge};\n `;\n },\n});\n"],"mappings":"oRAAA,IAAAA,QAAA,GAAAC,OAAA;;AAEA,IAAAC,OAAA,GAAAD,OAAA,4BAAsD,IAAAE,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;;AAE/C,IAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG,IAAAE,qBAAY,EAAC;EACjCC,IAAI,WAAAA,KAACC,CAAQ,EAAE;IACb,WAAOC,YAAG,EAAAb,eAAA,KAAAA,eAAA,OAAAc,4BAAA,CAAAC,OAAA;IACN,IAAAC,mBAAW,EAAC,CAAC;IACNJ,CAAC,CAACK,mBAAmB;;IAEVL,CAAC,CAACM,kBAAkB,EAAIN,CAAC,CAACO,wBAAwB;;IAE3DP,CAAC,CAACQ,wBAAwB;;;;;;IAM3BC,QAAQ,CAACT,CAAC,CAACU,gBAAgB,CAAC;IAC9BD,QAAQ,CAACT,CAAC,CAACU,gBAAgB,CAAC;;EAExC,CAAC;;EAEDC,KAAK,WAAAA,MAACX,CAAQ,EAAE;IACd,WAAOC,YAAG,EAAAZ,gBAAA,KAAAA,gBAAA,OAAAa,4BAAA,CAAAC,OAAA;IACCH,CAAC,CAACQ,wBAAwB;;EAEvC,CAAC;;EAEDI,eAAe,WAAAA,gBAACZ,CAAQ,EAAE;IACxB,WAAOC,YAAG,EAAAX,gBAAA,KAAAA,gBAAA,OAAAY,4BAAA,CAAAC,OAAA;IACCH,CAAC,CAACa,wBAAwB;IACzBb,CAAC,CAACc,yBAAyB;IACpBd,CAAC,CAACe,+BAA+B;;EAEtD,CAAC;EACDC,gBAAgB,WAAAA,iBAAChB,CAAQ,EAAE;IACzB,WAAOC,YAAG,EAAAV,gBAAA,KAAAA,gBAAA,OAAAW,4BAAA,CAAAC,OAAA;IACCH,CAAC,CAACiB,yBAAyB;IAC1BjB,CAAC,CAACkB,0BAA0B;IACrBlB,CAAC,CAACmB,gCAAgC;;EAEvD,CAAC;EACDC,eAAe,WAAAA,gBAACpB,CAAQ,EAAE;IACxB,WAAOC,YAAG,EAAAT,gBAAA,KAAAA,gBAAA,OAAAU,4BAAA,CAAAC,OAAA;IACCH,CAAC,CAACqB,wBAAwB;IACzBrB,CAAC,CAACsB,yBAAyB;IACpBtB,CAAC,CAACuB,+BAA+B;;EAEtD,CAAC;EACDC,kBAAkB,WAAAA,mBAACxB,CAAQ,EAAE;IAC3B,WAAOC,YAAG,EAAAR,gBAAA,KAAAA,gBAAA,OAAAS,4BAAA,CAAAC,OAAA;;IAECH,CAAC,CAACyB,kBAAkB;;EAEjC,CAAC;EACDC,mBAAmB,WAAAA,oBAAC1B,CAAQ,EAAE;IAC5B,WAAOC,YAAG,EAAAP,gBAAA,KAAAA,gBAAA,OAAAQ,4BAAA,CAAAC,OAAA;;IAECH,CAAC,CAAC2B,mBAAmB;;EAElC,CAAC;EACDC,kBAAkB,WAAAA,mBAAC5B,CAAQ,EAAE;IAC3B,WAAOC,YAAG,EAAAN,gBAAA,KAAAA,gBAAA,OAAAO,4BAAA,CAAAC,OAAA;;IAECH,CAAC,CAAC6B,kBAAkB;;EAEjC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -28,7 +28,7 @@ var renderPropsDesc = function renderPropsDesc(props) {
|
|
|
28
28
|
node, " ", index + 1 < nodes.length ? ', ' : null
|
|
29
29
|
));}
|
|
30
30
|
);
|
|
31
|
-
};
|
|
31
|
+
};var
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
@@ -48,8 +48,7 @@ var renderPropsDesc = function renderPropsDesc(props) {
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
var ComponentTable = exports.ComponentTable = /*#__PURE__*/function (_React$Component) {function ComponentTable() {var _this;for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;_this.
|
|
51
|
+
ComponentTable = exports.ComponentTable = /*#__PURE__*/function (_React$Component) {function ComponentTable() {var _this;for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;_this.
|
|
53
52
|
|
|
54
53
|
|
|
55
54
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_utils","_createPropsGetter","renderPropsDesc","props","Object","keys","map","key","value","React","isValidElement","createElement","JSON","stringify","node","index","nodes","default","length","ComponentTable","exports","_React$Component","_this","_len","arguments","args","Array","_key","call","apply","concat","getProps","createPropsGetter","defaultProps","_inheritsLoose2","_proto","prototype","render","_this$props","_this$props$rows","rows","_this$props$cols","cols","Component","_this$getProps","presetProps","presetState","style","borderSpacing","marginBottom","captionSide","_ref","i","_ref$props","colProps","whiteSpace","_ref2","rowIndex","_ref2$props","rowProps","_ref2$state","state","rowState","_ref3","colIndex","_ref3$props","_ref3$state","colState","_extends2","ref","isFunctionalComponent","undefined","el","setState"],"sources":["ComponentTable.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { DefaultizeProps } from '../lib/utils';\nimport { isFunctionalComponent } from '../lib/utils';\nimport { createPropsGetter } from '../lib/createPropsGetter';\n\n// TODO We should output state too\nconst renderPropsDesc = <P extends Record<string, any>>(props: P): React.ReactNode => {\n return Object.keys(props)\n .map((key) => {\n const value = props[key];\n switch (typeof value) {\n case 'boolean':\n return value ? key : `${key}: false`;\n case 'string':\n return `${key}: \"${value}\"`;\n case 'object':\n if (React.isValidElement(value)) {\n return React.createElement('span', {}, [`${key}: `, value]);\n }\n return `${key}: ${JSON.stringify(value)}`;\n default:\n return `${key}: ${value}`;\n }\n })\n .map((node, index, nodes) => (\n <span key={index}>\n {node} {index + 1 < nodes.length ? ', ' : null}\n </span>\n ));\n};\n\ninterface StatePropsObject<P, S> {\n props?: Partial<P>;\n state?: Partial<S>;\n}\nexport type StatePropsCombinations<P, S> = Array<StatePropsObject<P, S>>;\n\nexport type StateType<C> = C extends React.Component<any, infer S> | React.ComponentClass<any, infer S> ? S : never;\n\nexport interface ComponentTableProps<C, P, S> {\n rows?: StatePropsCombinations<P, S>;\n cols?: StatePropsCombinations<P, S>;\n presetProps?: DefaultizeProps<C, P>;\n presetState?: Partial<S>;\n Component: C;\n}\n\ntype DefaultProps<C, P, S> = Required<Pick<ComponentTableProps<C, P, S>, 'presetProps' | 'presetState'>>;\n\
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_utils","_createPropsGetter","renderPropsDesc","props","Object","keys","map","key","value","React","isValidElement","createElement","JSON","stringify","node","index","nodes","default","length","ComponentTable","exports","_React$Component","_this","_len","arguments","args","Array","_key","call","apply","concat","getProps","createPropsGetter","defaultProps","_inheritsLoose2","_proto","prototype","render","_this$props","_this$props$rows","rows","_this$props$cols","cols","Component","_this$getProps","presetProps","presetState","style","borderSpacing","marginBottom","captionSide","_ref","i","_ref$props","colProps","whiteSpace","_ref2","rowIndex","_ref2$props","rowProps","_ref2$state","state","rowState","_ref3","colIndex","_ref3$props","_ref3$state","colState","_extends2","ref","isFunctionalComponent","undefined","el","setState"],"sources":["ComponentTable.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { DefaultizeProps } from '../lib/utils';\nimport { isFunctionalComponent } from '../lib/utils';\nimport { createPropsGetter } from '../lib/createPropsGetter';\n\n// TODO We should output state too\nconst renderPropsDesc = <P extends Record<string, any>>(props: P): React.ReactNode => {\n return Object.keys(props)\n .map((key) => {\n const value = props[key];\n switch (typeof value) {\n case 'boolean':\n return value ? key : `${key}: false`;\n case 'string':\n return `${key}: \"${value}\"`;\n case 'object':\n if (React.isValidElement(value)) {\n return React.createElement('span', {}, [`${key}: `, value]);\n }\n return `${key}: ${JSON.stringify(value)}`;\n default:\n return `${key}: ${value}`;\n }\n })\n .map((node, index, nodes) => (\n <span key={index}>\n {node} {index + 1 < nodes.length ? ', ' : null}\n </span>\n ));\n};\n\ninterface StatePropsObject<P, S> {\n props?: Partial<P>;\n state?: Partial<S>;\n}\nexport type StatePropsCombinations<P, S> = Array<StatePropsObject<P, S>>;\n\nexport type StateType<C> = C extends React.Component<any, infer S> | React.ComponentClass<any, infer S> ? S : never;\n\nexport interface ComponentTableProps<C, P, S> {\n rows?: StatePropsCombinations<P, S>;\n cols?: StatePropsCombinations<P, S>;\n presetProps?: DefaultizeProps<C, P>;\n presetState?: Partial<S>;\n Component: C;\n}\n\ntype DefaultProps<C, P, S> = Required<Pick<ComponentTableProps<C, P, S>, 'presetProps' | 'presetState'>>;\n\nexport class ComponentTable<\n T extends React.Component<any, any, any>,\n C extends React.ComponentType<any>,\n P extends React.ComponentProps<C>,\n> extends React.Component<\n ComponentTableProps<C extends React.ComponentClass<P, any> ? React.ClassType<P, T, C> : C, P, StateType<C>>\n> {\n public static defaultProps: DefaultProps<unknown, Record<string | number | symbol, unknown>, unknown> = {\n presetProps: {},\n presetState: {},\n };\n\n private getProps = createPropsGetter(ComponentTable.defaultProps);\n\n public render() {\n const { rows = [], cols = [], Component } = this.props;\n const { presetProps, presetState } = this.getProps();\n return (\n <table style={{ borderSpacing: 10, marginBottom: 20 }}>\n <caption style={{ captionSide: 'bottom' }}>{renderPropsDesc(presetProps)}</caption>\n <thead>\n <tr>\n <th />\n {cols.map(({ props: colProps = {} }, i) => (\n <th style={{ whiteSpace: 'nowrap' }} key={i}>\n {renderPropsDesc(colProps)}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map(({ props: rowProps = {}, state: rowState = {} }, rowIndex) => (\n <tr key={rowIndex}>\n <td style={{ whiteSpace: 'nowrap' }}>{renderPropsDesc(rowProps)}</td>\n {cols.map(({ props: colProps = {}, state: colState = {} }, colIndex) => (\n <td key={colIndex}>\n {/* @ts-expect-error: Defaultized props incompatible with JSX.LibraryManagedAttributes so just ignore it */}\n <Component\n {...presetProps}\n {...rowProps}\n {...colProps}\n ref={\n // NOTE Call setState from outside is bad practice, but here it needed for test state combinations\n isFunctionalComponent(Component)\n ? undefined\n : (el: React.Component<P, StateType<C>>) =>\n el &&\n el.setState((state: StateType<C>) => ({\n ...state,\n ...presetState,\n ...rowState,\n ...colState,\n }))\n }\n />\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n }\n}\n"],"mappings":"oVAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;;;AAGA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;;AAEA;AACA,IAAMG,eAAe,GAAG,SAAlBA,eAAeA,CAAmCC,KAAQ,EAAsB;EACpF,OAAOC,MAAM,CAACC,IAAI,CAACF,KAAK,CAAC;EACtBG,GAAG,CAAC,UAACC,GAAG,EAAK;IACZ,IAAMC,KAAK,GAAGL,KAAK,CAACI,GAAG,CAAC;IACxB,QAAQ,OAAOC,KAAK;MAClB,KAAK,SAAS;QACZ,OAAOA,KAAK,GAAGD,GAAG,GAAMA,GAAG,YAAS;MACtC,KAAK,QAAQ;QACX,OAAUA,GAAG,YAAMC,KAAK;MAC1B,KAAK,QAAQ;QACX,kBAAIC,cAAK,CAACC,cAAc,CAACF,KAAK,CAAC,EAAE;UAC/B,oBAAOC,cAAK,CAACE,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAIJ,GAAG,SAAMC,KAAK,CAAC,CAAC;QAC7D;QACA,OAAUD,GAAG,UAAKK,IAAI,CAACC,SAAS,CAACL,KAAK,CAAC;MACzC;QACE,OAAUD,GAAG,UAAKC,KAAK;IAC3B;EACF,CAAC,CAAC;EACDF,GAAG,CAAC,UAACQ,IAAI,EAAEC,KAAK,EA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AK,EAAE,EAAEQ,UAAU,EAAE,QAAQ,CAAC,CAAE,IAAErD,eAAe,CAACyD,QAAQ,CAAM,CAAC;UACpEjB,IAAI,CAACpC,GAAG,CAAC,UAAAyD,KAAA,EAAiDC,QAAQ,OAAAC,WAAA,GAAAF,KAAA,CAAtD5D,KAAK,CAAEmD,QAAQ,GAAAW,WAAA,cAAG,CAAC,CAAC,GAAAA,WAAA,CAAAC,WAAA,GAAAH,KAAA,CAAEF,KAAK,CAAEM,QAAQ,GAAAD,WAAA,cAAG,CAAC,CAAC,GAAAA,WAAA;cACrDrE,MAAA,CAAAoB,OAAA,CAAAN,aAAA,SAAIJ,GAAG,EAAEyD,QAAS;;cAEhBnE,MAAA,CAAAoB,OAAA,CAAAN,aAAA,CAACgC,SAAS,MAAAyB,SAAA,CAAAnD,OAAA;cACJ4B,WAAW;cACXc,QAAQ;cACRL,QAAQ;gBACZe,GAAG;gBACD;gBACA,IAAAC,4BAAqB,EAAC3B,SAAS,CAAC;gBAC5B4B,SAAS;gBACT,UAACC,EAAoC;oBACnCA,EAAE;oBACFA,EAAE,CAACC,QAAQ,CAAC,UAACZ,KAAmB,cAAAO,SAAA,CAAAnD,OAAA;sBAC3B4C,KAAK;sBACLf,WAAW;sBACXgB,QAAQ;sBACRK,QAAQ;oBACX,CAAC,GACV;;cACF;cACC,CAAC;UACN;UACC,CAAC;MACN;MACI;MACF,CAAC;;EAEZ,CAAC,QAAAhD,cAAA,GA1DOV,cAAK,CAACkC,SAAS,EAJZxB,cAAc,CAOXc,YAAY,GAA8E,EACtGY,WAAW,EAAE,CAAC,CAAC,EACfC,WAAW,EAAE,CAAC,CAAC,CACjB,CAAC","ignoreList":[]}
|
|
@@ -7,8 +7,9 @@ import type { Menu } from '../Menu';
|
|
|
7
7
|
import type { MenuItemState } from '../../components/MenuItem';
|
|
8
8
|
import type { Nullable } from '../../typings/utility-types';
|
|
9
9
|
import type { CommonProps } from '../CommonWrapper';
|
|
10
|
-
import type { ComboBoxExtendedItem } from '../../components/ComboBox';
|
|
10
|
+
import type { ComboBoxExtendedItem, ComboBoxViewMode } from '../../components/ComboBox';
|
|
11
11
|
import type { SizeProp } from '../../lib/types/props';
|
|
12
|
+
import { InternalTextareaWithLayout } from '../InternalTextareaWithLayout/InternalTextareaWithLayout';
|
|
12
13
|
import { ComboBoxRequestStatus } from './CustomComboBoxTypes';
|
|
13
14
|
interface ComboBoxViewProps<T> extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>, Pick<HTMLAttributes<HTMLElement>, 'id'>, CommonProps {
|
|
14
15
|
align?: 'left' | 'center' | 'right';
|
|
@@ -68,9 +69,10 @@ interface ComboBoxViewProps<T> extends Pick<AriaAttributes, 'aria-describedby' |
|
|
|
68
69
|
renderAddButton?: (query?: string) => React.ReactNode;
|
|
69
70
|
repeatRequest?: () => void;
|
|
70
71
|
requestStatus?: ComboBoxRequestStatus;
|
|
71
|
-
refInput?: (input: Nullable<Input>) => void;
|
|
72
|
+
refInput?: (input: Nullable<Input | InternalTextareaWithLayout>) => void;
|
|
72
73
|
refMenu?: (menu: Nullable<Menu>) => void;
|
|
73
74
|
refInputLikeText?: (inputLikeText: Nullable<InputLikeText>) => void;
|
|
75
|
+
viewMode?: ComboBoxViewMode;
|
|
74
76
|
}
|
|
75
77
|
type DefaultProps<T> = Required<Pick<ComboBoxViewProps<T>, 'renderItem' | 'renderValue' | 'renderAddButton' | 'repeatRequest' | 'requestStatus' | 'onClickOutside' | 'onFocusOutside' | 'size' | 'width' | 'showClearIcon'>>;
|
|
76
78
|
export declare const ComboBoxViewIds: {
|
|
@@ -106,6 +108,8 @@ export declare class ComboBoxView<T> extends React.Component<ComboBoxViewProps<T
|
|
|
106
108
|
private renderMobileMenu;
|
|
107
109
|
private getParent;
|
|
108
110
|
private renderAddButton;
|
|
111
|
+
private resolveComboboxMode;
|
|
112
|
+
private extractMultilineModeProps;
|
|
109
113
|
private renderInput;
|
|
110
114
|
private handleMobileFocus;
|
|
111
115
|
private handleItemSelect;
|
|
@@ -25,6 +25,8 @@ var _LoadingIcon = require("../icons2022/LoadingIcon");
|
|
|
25
25
|
var _Popup = require("../Popup");
|
|
26
26
|
var _getMenuPositions = require("../../lib/getMenuPositions");
|
|
27
27
|
var _ZIndex = require("../ZIndex");
|
|
28
|
+
var _InternalTextareaWithLayout = require("../InternalTextareaWithLayout/InternalTextareaWithLayout");
|
|
29
|
+
|
|
28
30
|
|
|
29
31
|
var _ArrowDownIcon = require("./ArrowDownIcon");
|
|
30
32
|
var _ComboBoxMenu = require("./ComboBoxMenu");
|
|
@@ -114,6 +116,7 @@ var _getComboBoxTheme = require("./getComboBoxTheme");var _class, _ComboBoxView;
|
|
|
114
116
|
|
|
115
117
|
|
|
116
118
|
|
|
119
|
+
|
|
117
120
|
|
|
118
121
|
|
|
119
122
|
var ComboBoxViewIds = exports.ComboBoxViewIds = {
|
|
@@ -287,7 +290,7 @@ ComboBoxView = exports.ComboBoxView = (0, _decorator.responsiveLayout)(_class =
|
|
|
287
290
|
renderMobileMenu = function () {
|
|
288
291
|
var rightIcon = null;
|
|
289
292
|
|
|
290
|
-
var _this$props2 = _this.props,loading = _this$props2.loading,items = _this$props2.items,opened = _this$props2.opened,onFocus = _this$props2.onFocus,onInputValueChange = _this$props2.onInputValueChange,placeholder = _this$props2.placeholder,textValue = _this$props2.textValue;
|
|
293
|
+
var _this$props2 = _this.props,loading = _this$props2.loading,items = _this$props2.items,opened = _this$props2.opened,onFocus = _this$props2.onFocus,onInputValueChange = _this$props2.onInputValueChange,onInputKeyDown = _this$props2.onInputKeyDown,placeholder = _this$props2.placeholder,textValue = _this$props2.textValue;
|
|
291
294
|
if (loading && items && !!items.length) {
|
|
292
295
|
rightIcon = _this.renderSpinner();
|
|
293
296
|
}
|
|
@@ -298,6 +301,7 @@ ComboBoxView = exports.ComboBoxView = (0, _decorator.responsiveLayout)(_class =
|
|
|
298
301
|
width: '100%',
|
|
299
302
|
onFocus: onFocus,
|
|
300
303
|
onValueChange: onInputValueChange,
|
|
304
|
+
onKeyDown: onInputKeyDown,
|
|
301
305
|
value: textValue,
|
|
302
306
|
placeholder: placeholder,
|
|
303
307
|
rightIcon: rightIcon
|
|
@@ -324,6 +328,37 @@ ComboBoxView = exports.ComboBoxView = (0, _decorator.responsiveLayout)(_class =
|
|
|
324
328
|
return _this.getProps().renderAddButton(_this.props.textValue);
|
|
325
329
|
};_this.
|
|
326
330
|
|
|
331
|
+
resolveComboboxMode = function () {
|
|
332
|
+
if (!_this.props.viewMode) {
|
|
333
|
+
return 'singleLine';
|
|
334
|
+
}
|
|
335
|
+
if (typeof _this.props.viewMode === 'string') {
|
|
336
|
+
return _this.props.viewMode;
|
|
337
|
+
}
|
|
338
|
+
return _this.props.viewMode.mode;
|
|
339
|
+
};_this.
|
|
340
|
+
|
|
341
|
+
extractMultilineModeProps = function () {
|
|
342
|
+
if (!_this.props.viewMode || typeof _this.props.viewMode === 'string') {
|
|
343
|
+
return {};
|
|
344
|
+
}
|
|
345
|
+
return { maxRows: _this.props.viewMode.maxRows };
|
|
346
|
+
};_this.
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
327
362
|
|
|
328
363
|
|
|
329
364
|
|
|
@@ -459,4 +494,4 @@ ComboBoxView = exports.ComboBoxView = (0, _decorator.responsiveLayout)(_class =
|
|
|
459
494
|
|
|
460
495
|
refMobileInput = function (input) {
|
|
461
496
|
_this.mobileInput = input;
|
|
462
|
-
};return _this;}(0, _inheritsLoose2.default)(ComboBoxView, _React$Component);var _proto = ComboBoxView.prototype;_proto.componentDidMount = function componentDidMount() {this.updateAnchorElement();if (this.props.autoFocus && this.props.onFocus) {this.props.onFocus();}};_proto.updateAnchorElement = function updateAnchorElement() {var parent = this.getParent();var anchorElement = this.state.anchorElement;if (anchorElement !== parent) {this.setState({ anchorElement: parent });}};_proto.componentDidUpdate = function componentDidUpdate(prevProps) {var input = this.input,props = this.props;this.updateAnchorElement();if (props.editing && !prevProps.editing && input) {input.focus();}};_proto.render = function render() {var _this2 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this2.theme = (0, _getComboBoxTheme.getComboBoxTheme)(theme);return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Provider, { value: _this2.theme }, _this2.renderMain());});};_proto.renderMain = function renderMain() {var _this$props4 = this.props,onMouseEnter = _this$props4.onMouseEnter,onMouseLeave = _this$props4.onMouseLeave,onMouseOver = _this$props4.onMouseOver,opened = _this$props4.opened;var _this$getProps3 = this.getProps(),onClickOutside = _this$getProps3.onClickOutside,onFocusOutside = _this$getProps3.onFocusOutside,width = _this$getProps3.width;var isMobile = this.isMobileLayout;var input = this.renderInput();return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, this.props, /*#__PURE__*/_react.default.createElement(_RenderLayer.RenderLayer, { onClickOutside: onClickOutside, onFocusOutside: onFocusOutside, active: opened }, /*#__PURE__*/_react.default.createElement("span", { "data-tid": _CustomComboBox2.CustomComboBoxDataTids.comboBoxView, style: { width: width }, className: _CustomComboBox.styles.root(), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, ref: this.setRootNode }, input, isMobile ? this.renderMobileMenu() : this.renderMenu())));};_proto.renderInput = function renderInput() {var isMobile = this.isMobileLayout;var _this$props5 = this.props,id = _this$props5.id,align = _this$props5.align,borderless = _this$props5.borderless,disabled = _this$props5.disabled,editing = _this$props5.editing,error = _this$props5.error,onFocus = _this$props5.onFocus,onInputBlur = _this$props5.onInputBlur,onInputValueChange = _this$props5.onInputValueChange,onInputFocus = _this$props5.onInputFocus,onInputClick = _this$props5.onInputClick,onInputKeyDown = _this$props5.onInputKeyDown,placeholder = _this$props5.placeholder,textValue = _this$props5.textValue,value = _this$props5.value,warning = _this$props5.warning,refInputLikeText = _this$props5.refInputLikeText,leftIcon = _this$props5.leftIcon,inputMode = _this$props5.inputMode,size = _this$props5.size,ariaDescribedby = _this$props5['aria-describedby'],ariaLabel = _this$props5['aria-label'],showClearIcon = _this$props5.showClearIcon;var _this$getProps4 = this.getProps(),renderValue = _this$getProps4.renderValue;var rightIcon = this.getRightIcon();
|
|
497
|
+
};return _this;}(0, _inheritsLoose2.default)(ComboBoxView, _React$Component);var _proto = ComboBoxView.prototype;_proto.componentDidMount = function componentDidMount() {this.updateAnchorElement();if (this.props.autoFocus && this.props.onFocus) {this.props.onFocus();}};_proto.updateAnchorElement = function updateAnchorElement() {var parent = this.getParent();var anchorElement = this.state.anchorElement;if (anchorElement !== parent) {this.setState({ anchorElement: parent });}};_proto.componentDidUpdate = function componentDidUpdate(prevProps) {var input = this.input,props = this.props;this.updateAnchorElement();if (props.editing && !prevProps.editing && input) {input.focus();}};_proto.render = function render() {var _this2 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this2.theme = (0, _getComboBoxTheme.getComboBoxTheme)(theme);return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Provider, { value: _this2.theme }, _this2.renderMain());});};_proto.renderMain = function renderMain() {var _this$props4 = this.props,onMouseEnter = _this$props4.onMouseEnter,onMouseLeave = _this$props4.onMouseLeave,onMouseOver = _this$props4.onMouseOver,opened = _this$props4.opened;var _this$getProps3 = this.getProps(),onClickOutside = _this$getProps3.onClickOutside,onFocusOutside = _this$getProps3.onFocusOutside,width = _this$getProps3.width;var isMobile = this.isMobileLayout;var input = this.renderInput();return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, this.props, /*#__PURE__*/_react.default.createElement(_RenderLayer.RenderLayer, { onClickOutside: onClickOutside, onFocusOutside: onFocusOutside, active: opened }, /*#__PURE__*/_react.default.createElement("span", { "data-tid": _CustomComboBox2.CustomComboBoxDataTids.comboBoxView, style: { width: width }, className: _CustomComboBox.styles.root(), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, ref: this.setRootNode }, input, isMobile ? this.renderMobileMenu() : this.renderMenu())));};_proto.renderInput = function renderInput() {var isMobile = this.isMobileLayout;var _this$props5 = this.props,id = _this$props5.id,align = _this$props5.align,borderless = _this$props5.borderless,disabled = _this$props5.disabled,editing = _this$props5.editing,error = _this$props5.error,onFocus = _this$props5.onFocus,onInputBlur = _this$props5.onInputBlur,onInputValueChange = _this$props5.onInputValueChange,onInputFocus = _this$props5.onInputFocus,onInputClick = _this$props5.onInputClick,onInputKeyDown = _this$props5.onInputKeyDown,placeholder = _this$props5.placeholder,textValue = _this$props5.textValue,value = _this$props5.value,warning = _this$props5.warning,refInputLikeText = _this$props5.refInputLikeText,leftIcon = _this$props5.leftIcon,inputMode = _this$props5.inputMode,size = _this$props5.size,ariaDescribedby = _this$props5['aria-describedby'],ariaLabel = _this$props5['aria-label'],showClearIcon = _this$props5.showClearIcon;var _this$getProps4 = this.getProps(),renderValue = _this$getProps4.renderValue;var rightIcon = this.getRightIcon();var editingStateProps = { id: id, align: align, borderless: borderless, disabled: disabled, error: error, maxLength: this.props.maxLength, onBlur: isMobile ? undefined : onInputBlur, onValueChange: onInputValueChange, onFocus: onInputFocus, onClick: isMobile ? this.handleMobileFocus : onInputClick, leftIcon: leftIcon, rightIcon: rightIcon, value: textValue || '', onKeyDown: onInputKeyDown, placeholder: placeholder, width: '100%', size: size, ref: this.refInput, warning: warning, inputMode: inputMode, autoComplete: 'off', 'aria-describedby': ariaDescribedby, 'aria-controls': this.menuId, 'aria-label': ariaLabel, showClearIcon: showClearIcon };var multilineTextareaProps = (0, _extends2.default)({ autoResize: true, rows: 1, extraRow: false }, this.extractMultilineModeProps());if (this.resolveComboboxMode() === 'multiline') {return /*#__PURE__*/_react.default.createElement(_InternalTextareaWithLayout.InternalTextareaWithLayout, (0, _extends2.default)({}, editingStateProps, multilineTextareaProps));}if (editing) {if (this.resolveComboboxMode() === 'multilineEditing') {return /*#__PURE__*/_react.default.createElement(_InternalTextareaWithLayout.InternalTextareaWithLayout, (0, _extends2.default)({}, editingStateProps, multilineTextareaProps));}return /*#__PURE__*/_react.default.createElement(_Input.Input, editingStateProps);}return /*#__PURE__*/_react.default.createElement(_InputLikeText.InputLikeText, { id: id, align: align, borderless: borderless, error: error, onFocus: onFocus, leftIcon: leftIcon, rightIcon: rightIcon, disabled: disabled, warning: warning, placeholder: placeholder, size: size, width: "100%", ref: refInputLikeText, "aria-describedby": ariaDescribedby, "aria-controls": this.menuId, showClearIcon: showClearIcon, onClearCrossClick: this.props.onClearCrossClick }, (0, _utils.isNonNullable)(value) && renderValue ? renderValue(value) : null);};return ComboBoxView;}(_react.default.Component), _ComboBoxView.__KONTUR_REACT_UI__ = 'ComboBoxView', _ComboBoxView.displayName = 'ComboBoxView', _ComboBoxView.defaultProps = { renderItem: function renderItem(item) {return item;}, renderValue: function renderValue(item) {return item;}, renderAddButton: function renderAddButton() {return null;}, repeatRequest: function repeatRequest() {return undefined;}, requestStatus: _CustomComboBoxTypes.ComboBoxRequestStatus.Unknown, onClickOutside: function onClickOutside() {/**/}, onFocusOutside: function onFocusOutside() {/**/}, size: 'small', width: 250, showClearIcon: 'never' }, _ComboBoxView)) || _class) || _class;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_utils","_Input","_InputLikeText","_RenderLayer","_Spinner","_CommonWrapper","_MobilePopup","_decorator","_rootNode","_createPropsGetter","_ThemeContext","_LoadingIcon","_Popup","_getMenuPositions","_ZIndex","_ArrowDownIcon","_ComboBoxMenu","_CustomComboBoxTypes","_CustomComboBox","_CustomComboBox2","_getComboBoxTheme","_class","_ComboBoxView","ComboBoxViewIds","exports","menu","ComboBoxView","responsiveLayout","rootNode","_React$Component","_this$props$value","_this","_len","arguments","length","args","Array","_key","call","apply","concat","getProps","createPropsGetter","defaultProps","mobileInput","dropdownContainerRef","React","createRef","menuId","getRandomID","state","anchorElement","clearCrossShowed","props","showClearIcon","value","toString","getComboBoxMenu","_this$props","items","loading","opened","refMenu","maxMenuHeight","renderTotalCount","renderNotFound","totalCount","size","_this$getProps","repeatRequest","requestStatus","renderItem","itemWrapper","default","createElement","ComboBoxMenu","hasMargin","onValueChange","handleItemSelect","renderAddButton","isMobile","isMobileLayout","renderMenu","_this$getProps2","menuPos","menuAlign","Popup","hasShadow","minWidth","priority","ZIndex","priorities","PopupMenu","positions","getMenuPositions","disablePortal","margin","parseInt","theme","menuOffsetY","ref","renderMobileMenu","rightIcon","_this$props2","onFocus","onInputValueChange","placeholder","textValue","renderSpinner","inputProps","autoComplete","autoFocus","width","MobilePopup","headerChildComponent","Input","_extends2","refMobileInput","onCloseRequest","onMobileClose","getParent","getRootNode","handleMobileFocus","_this$mobileInput","onInputClick","focus","item","refInput","input","className","styles","spinnerWrapper","Spinner","type","caption","dimmed","getRightIcon","_this$props3","drawArrow","LoadingIcon","ArrowDownIcon","_inheritsLoose2","_proto","prototype","componentDidMount","updateAnchorElement","parent","setState","componentDidUpdate","prevProps","editing","render","_this2","ThemeContext","Consumer","getComboBoxTheme","Provider","renderMain","_this$props4","onMouseEnter","onMouseLeave","onMouseOver","_this$getProps3","onClickOutside","onFocusOutside","renderInput","CommonWrapper","RenderLayer","active","CustomComboBoxDataTids","comboBoxView","style","root","setRootNode","_this$props5","id","align","borderless","disabled","error","onInputBlur","onInputFocus","onInputKeyDown","warning","refInputLikeText","leftIcon","inputMode","ariaDescribedby","ariaLabel","_this$getProps4","renderValue","maxLength","onBlur","undefined","onClick","onKeyDown","InputLikeText","onClearCrossClick","isNonNullable","Component","__KONTUR_REACT_UI__","displayName","ComboBoxRequestStatus","Unknown"],"sources":["ComboBoxView.tsx"],"sourcesContent":["import type { AriaAttributes, HTMLAttributes } from 'react';\nimport React from 'react';\n\nimport { getRandomID, isNonNullable } from '../../lib/utils';\nimport type { InputIconType, InputProps, ShowClearIcon } from '../../components/Input';\nimport { Input } from '../../components/Input';\nimport { InputLikeText } from '../InputLikeText';\nimport type { Menu } from '../Menu';\nimport type { MenuItemState } from '../../components/MenuItem';\nimport { RenderLayer } from '../RenderLayer';\nimport { Spinner } from '../../components/Spinner';\nimport type { Nullable } from '../../typings/utility-types';\nimport type { CommonProps } from '../CommonWrapper';\nimport { CommonWrapper } from '../CommonWrapper';\nimport { MobilePopup } from '../MobilePopup';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport type { TSetRootNode } from '../../lib/rootNode';\nimport { rootNode, getRootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport type { Theme } from '../../lib/theming/Theme';\nimport { LoadingIcon } from '../icons2022/LoadingIcon';\nimport type { ComboBoxExtendedItem } from '../../components/ComboBox';\nimport type { SizeProp } from '../../lib/types/props';\nimport { Popup } from '../Popup';\nimport { getMenuPositions } from '../../lib/getMenuPositions';\nimport { ZIndex } from '../ZIndex';\n\nimport { ArrowDownIcon } from './ArrowDownIcon';\nimport { ComboBoxMenu } from './ComboBoxMenu';\nimport { ComboBoxRequestStatus } from './CustomComboBoxTypes';\nimport { styles } from './CustomComboBox.styles';\nimport { CustomComboBoxDataTids } from './CustomComboBox';\nimport { getComboBoxTheme } from './getComboBoxTheme';\n\ninterface ComboBoxViewProps<T>\n extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>,\n Pick<HTMLAttributes<HTMLElement>, 'id'>,\n CommonProps {\n align?: 'left' | 'center' | 'right';\n autoFocus?: boolean;\n borderless?: boolean;\n disablePortal?: boolean;\n disabled?: boolean;\n editing?: boolean;\n /**\n * Cостояние валидации при ошибке.\n */\n error?: boolean;\n items?: Nullable<Array<ComboBoxExtendedItem<T>>>;\n loading?: boolean;\n /**\n * Позволяет вручную задать текущую позицию выпадающего окна\n */\n menuPos?: 'top' | 'bottom';\n menuAlign?: 'left' | 'right';\n opened?: boolean;\n drawArrow?: boolean;\n placeholder?: string;\n size?: SizeProp;\n textValue?: string;\n totalCount?: number;\n value?: Nullable<T>;\n showClearIcon?: ShowClearIcon;\n /**\n * Cостояние валидации при предупреждении.\n */\n warning?: boolean;\n width?: string | number;\n maxLength?: number;\n maxMenuHeight?: number | string;\n leftIcon?: InputIconType;\n rightIcon?: InputIconType;\n inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];\n\n onValueChange?: (value: T) => void;\n onClickOutside?: (e: Event) => void;\n onFocus?: () => void;\n onMobileClose?: () => void;\n onFocusOutside?: () => void;\n onInputBlur?: () => void;\n onInputValueChange?: (value: string) => void;\n onInputFocus?: () => void;\n onInputClick?: () => void;\n onClearCrossClick?: () => void;\n onInputKeyDown?: (e: React.KeyboardEvent) => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n renderItem?: (item: T, state: MenuItemState) => React.ReactNode;\n itemWrapper?: (item: T) => React.ComponentType;\n renderNotFound?: () => React.ReactNode;\n renderTotalCount?: (found: number, total: number) => React.ReactNode;\n renderValue?: (item: T) => React.ReactNode;\n renderAddButton?: (query?: string) => React.ReactNode;\n repeatRequest?: () => void;\n requestStatus?: ComboBoxRequestStatus;\n refInput?: (input: Nullable<Input>) => void;\n refMenu?: (menu: Nullable<Menu>) => void;\n refInputLikeText?: (inputLikeText: Nullable<InputLikeText>) => void;\n}\n\ntype DefaultProps<T> = Required<\n Pick<\n ComboBoxViewProps<T>,\n | 'renderItem'\n | 'renderValue'\n | 'renderAddButton'\n | 'repeatRequest'\n | 'requestStatus'\n | 'onClickOutside'\n | 'onFocusOutside'\n | 'size'\n | 'width'\n | 'showClearIcon'\n >\n>;\n\nexport const ComboBoxViewIds = {\n menu: 'ComboBoxView__menu',\n};\n\ninterface ComboBoxViewState {\n anchorElement: Nullable<Element>;\n clearCrossShowed: boolean;\n}\n\n@responsiveLayout\n@rootNode\nexport class ComboBoxView<T> extends React.Component<ComboBoxViewProps<T>, ComboBoxViewState> {\n public static __KONTUR_REACT_UI__ = 'ComboBoxView';\n public static displayName = 'ComboBoxView';\n\n public static defaultProps: DefaultProps<unknown> = {\n renderItem: (item: any) => item,\n renderValue: (item: any) => item,\n renderAddButton: () => null,\n repeatRequest: () => undefined,\n requestStatus: ComboBoxRequestStatus.Unknown,\n onClickOutside: () => {\n /**/\n },\n onFocusOutside: () => {\n /**/\n },\n size: 'small',\n width: 250,\n showClearIcon: 'never',\n };\n\n private getProps = createPropsGetter(ComboBoxView.defaultProps);\n\n private input: Nullable<Input>;\n private setRootNode!: TSetRootNode;\n private mobileInput: Nullable<Input> = null;\n private isMobileLayout!: boolean;\n private dropdownContainerRef = React.createRef<Popup>();\n private theme!: Theme;\n private menuId = ComboBoxViewIds.menu + getRandomID();\n\n public state = {\n anchorElement: null,\n clearCrossShowed: this.props.showClearIcon === 'always' && !!this.props.value?.toString(),\n };\n\n public componentDidMount() {\n this.updateAnchorElement();\n\n if (this.props.autoFocus && this.props.onFocus) {\n this.props.onFocus();\n }\n }\n\n updateAnchorElement() {\n const parent = this.getParent();\n const anchorElement = this.state.anchorElement;\n\n if (anchorElement !== parent) {\n this.setState({\n anchorElement: parent,\n });\n }\n }\n\n public componentDidUpdate(prevProps: ComboBoxViewProps<T>) {\n const { input, props } = this;\n\n this.updateAnchorElement();\n\n if (props.editing && !prevProps.editing && input) {\n input.focus();\n }\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = getComboBoxTheme(theme);\n return <ThemeContext.Provider value={this.theme}>{this.renderMain()}</ThemeContext.Provider>;\n }}\n </ThemeContext.Consumer>\n );\n }\n\n public renderMain() {\n const { onMouseEnter, onMouseLeave, onMouseOver, opened } = this.props;\n const { onClickOutside, onFocusOutside, width } = this.getProps();\n\n const isMobile = this.isMobileLayout;\n\n const input = this.renderInput();\n\n return (\n <CommonWrapper {...this.props}>\n <RenderLayer onClickOutside={onClickOutside} onFocusOutside={onFocusOutside} active={opened}>\n <span\n data-tid={CustomComboBoxDataTids.comboBoxView}\n style={{ width }}\n className={styles.root()}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n ref={this.setRootNode}\n >\n {input}\n {isMobile ? this.renderMobileMenu() : this.renderMenu()}\n </span>\n </RenderLayer>\n </CommonWrapper>\n );\n }\n\n private getComboBoxMenu = () => {\n const { items, loading, opened, refMenu, maxMenuHeight, renderTotalCount, renderNotFound, totalCount, size } =\n this.props;\n\n const { repeatRequest, requestStatus, renderItem, itemWrapper } = this.getProps();\n return (\n <ComboBoxMenu\n hasMargin={false}\n menuId={this.menuId}\n items={items}\n loading={loading}\n maxMenuHeight={maxMenuHeight}\n onValueChange={this.handleItemSelect}\n opened={opened}\n refMenu={refMenu}\n renderTotalCount={renderTotalCount}\n renderItem={renderItem}\n renderNotFound={renderNotFound}\n itemWrapper={itemWrapper}\n renderAddButton={this.renderAddButton}\n repeatRequest={repeatRequest}\n requestStatus={requestStatus}\n totalCount={totalCount}\n isMobile={this.isMobileLayout}\n size={size}\n />\n );\n };\n\n private renderMenu = () => {\n const { opened, menuPos, menuAlign } = this.getProps();\n const { anchorElement } = this.state;\n\n return (\n opened &&\n anchorElement && (\n <Popup\n opened\n hasShadow\n minWidth=\"100%\"\n anchorElement={anchorElement}\n priority={ZIndex.priorities.PopupMenu}\n positions={getMenuPositions(menuPos, menuAlign)}\n disablePortal={this.props.disablePortal}\n margin={parseInt(this.theme.menuOffsetY) - 1}\n ref={this.dropdownContainerRef}\n >\n {this.getComboBoxMenu()}\n </Popup>\n )\n );\n };\n\n private renderMobileMenu = () => {\n let rightIcon = null;\n\n const { loading, items, opened, onFocus, onInputValueChange, placeholder, textValue } = this.props;\n if (loading && items && !!items.length) {\n rightIcon = this.renderSpinner();\n }\n\n const inputProps: InputProps = {\n autoComplete: 'off',\n autoFocus: true,\n width: '100%',\n onFocus,\n onValueChange: onInputValueChange,\n value: textValue,\n placeholder,\n rightIcon,\n };\n\n return (\n opened && (\n <MobilePopup\n headerChildComponent={<Input ref={this.refMobileInput} {...inputProps} />}\n onCloseRequest={this.props.onMobileClose}\n opened\n >\n {this.getComboBoxMenu()}\n </MobilePopup>\n )\n );\n };\n\n private getParent = () => {\n return getRootNode(this);\n };\n\n private renderAddButton = (): React.ReactNode => {\n return this.getProps().renderAddButton(this.props.textValue);\n };\n\n private renderInput(): React.ReactNode {\n const isMobile = this.isMobileLayout;\n\n const {\n id,\n align,\n borderless,\n disabled,\n editing,\n error,\n onFocus,\n onInputBlur,\n onInputValueChange,\n onInputFocus,\n onInputClick,\n onInputKeyDown,\n placeholder,\n textValue,\n value,\n warning,\n refInputLikeText,\n leftIcon,\n inputMode,\n size,\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n showClearIcon,\n } = this.props;\n\n const { renderValue } = this.getProps();\n\n const rightIcon = this.getRightIcon();\n\n if (editing) {\n return (\n <Input\n id={id}\n align={align}\n borderless={borderless}\n disabled={disabled}\n error={error}\n maxLength={this.props.maxLength}\n onBlur={isMobile ? undefined : onInputBlur}\n onValueChange={onInputValueChange}\n onFocus={onInputFocus}\n onClick={isMobile ? this.handleMobileFocus : onInputClick}\n leftIcon={leftIcon}\n rightIcon={rightIcon}\n value={textValue || ''}\n onKeyDown={onInputKeyDown}\n placeholder={placeholder}\n width=\"100%\"\n size={size}\n ref={this.refInput}\n warning={warning}\n inputMode={inputMode}\n autoComplete=\"off\"\n aria-describedby={ariaDescribedby}\n aria-controls={this.menuId}\n aria-label={ariaLabel}\n showClearIcon={showClearIcon}\n />\n );\n }\n\n return (\n <InputLikeText\n id={id}\n align={align}\n borderless={borderless}\n error={error}\n onFocus={onFocus}\n leftIcon={leftIcon}\n rightIcon={rightIcon}\n disabled={disabled}\n warning={warning}\n placeholder={placeholder}\n size={size}\n width=\"100%\"\n ref={refInputLikeText}\n aria-describedby={ariaDescribedby}\n aria-controls={this.menuId}\n showClearIcon={showClearIcon}\n onClearCrossClick={this.props.onClearCrossClick}\n >\n {isNonNullable(value) && renderValue ? renderValue(value) : null}\n </InputLikeText>\n );\n }\n\n private handleMobileFocus = () => {\n this.props.onInputClick?.();\n\n this.mobileInput?.focus();\n };\n\n private handleItemSelect = (item: T) => {\n if (this.props.onValueChange) {\n this.props.onValueChange(item);\n }\n\n if (this.isMobileLayout) {\n this.props.onMobileClose?.();\n }\n };\n\n private refInput = (input: Nullable<Input>) => {\n if (this.props.refInput) {\n this.props.refInput(input);\n }\n this.input = input;\n };\n\n private renderSpinner = () => (\n <span className={styles.spinnerWrapper()}>\n <Spinner type=\"mini\" caption=\"\" dimmed />\n </span>\n );\n\n private getRightIcon = () => {\n const { loading, items, drawArrow, rightIcon, size } = this.props;\n\n if (loading && items && !!items.length) {\n return <LoadingIcon size={size} />;\n }\n\n if (rightIcon || drawArrow) {\n return rightIcon || <ArrowDownIcon size={size} />;\n }\n\n return null;\n };\n\n private refMobileInput = (input: Nullable<Input>) => {\n this.mobileInput = input;\n };\n}\n"],"mappings":";AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;;AAEA,IAAAC,MAAA,GAAAD,OAAA;;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;;;AAGA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;;;AAGA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;;AAEA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,kBAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;;AAEA,IAAAY,YAAA,GAAAZ,OAAA;;;AAGA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,iBAAA,GAAAd,OAAA;AACA,IAAAe,OAAA,GAAAf,OAAA;;AAEA,IAAAgB,cAAA,GAAAhB,OAAA;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ner","_CommonWrapper","_MobilePopup","_decorator","_rootNode","_createPropsGetter","_ThemeContext","_LoadingIcon","_Popup","_getMenuPositions","_ZIndex","_InternalTextareaWithLayout","_ArrowDownIcon","_ComboBoxMenu","_CustomComboBoxTypes","_CustomComboBox","_CustomComboBox2","_getComboBoxTheme","_class","_ComboBoxView","ComboBoxViewIds","exports","menu","ComboBoxView","responsiveLayout","rootNode","_React$Component","_this$props$value","_this","_len","arguments","length","args","Array","_key","call","apply","concat","getProps","createPropsGetter","defaultProps","mobileInput","dropdownContainerRef","React","createRef","menuId","getRandomID","state","anchorElement","clearCrossShowed","props","showClearIcon","value","toString","getComboBoxMenu","_this$props","items","loading","opened","refMenu","maxMenuHeight","renderTotalCount","renderNotFound","totalCount","size","_this$getProps","repeatRequest","requestStatus","renderItem","itemWrapper","default","createElement","ComboBoxMenu","hasMargin","onValueChange","handleItemSelect","renderAddButton","isMobile","isMobileLayout","renderMenu","_this$getProps2","menuPos","menuAlign","Popup","hasShadow","minWidth","priority","ZIndex","priorities","PopupMenu","positions","getMenuPositions","disablePortal","margin","parseInt","theme","menuOffsetY","ref","renderMobileMenu","rightIcon","_this$props2","onFocus","onInputValueChange","onInputKeyDown","placeholder","textValue","renderSpinner","inputProps","autoComplete","autoFocus","width","onKeyDown","MobilePopup","headerChildComponent","Input","_extends2","refMobileInput","onCloseRequest","onMobileClose","getParent","getRootNode","resolveComboboxMode","viewMode","mode","extractMultilineModeProps","maxRows","handleMobileFocus","_this$mobileInput","onInputClick","focus","item","refInput","input","className","styles","spinnerWrapper","Spinner","type","caption","dimmed","getRightIcon","_this$props3","drawArrow","LoadingIcon","ArrowDownIcon","_inheritsLoose2","_proto","prototype","componentDidMount","updateAnchorElement","parent","setState","componentDidUpdate","prevProps","editing","render","_this2","ThemeContext","Consumer","getComboBoxTheme","Provider","renderMain","_this$props4","onMouseEnter","onMouseLeave","onMouseOver","_this$getProps3","onClickOutside","onFocusOutside","renderInput","CommonWrapper","RenderLayer","active","CustomComboBoxDataTids","comboBoxView","style","root","setRootNode","_this$props5","id","align","borderless","disabled","error","onInputBlur","onInputFocus","warning","refInputLikeText","leftIcon","inputMode","ariaDescribedby","ariaLabel","_this$getProps4","renderValue","editingStateProps","maxLength","onBlur","undefined","onClick","multilineTextareaProps","autoResize","rows","extraRow","InternalTextareaWithLayout","InputLikeText","onClearCrossClick","isNonNullable","Component","__KONTUR_REACT_UI__","displayName","ComboBoxRequestStatus","Unknown"],"sources":["ComboBoxView.tsx"],"sourcesContent":["import type { AriaAttributes, HTMLAttributes } from 'react';\nimport React from 'react';\n\nimport { getRandomID, isNonNullable } from '../../lib/utils';\nimport type { InputIconType, InputProps, ShowClearIcon } from '../../components/Input';\nimport { Input } from '../../components/Input';\nimport { InputLikeText } from '../InputLikeText';\nimport type { Menu } from '../Menu';\nimport type { MenuItemState } from '../../components/MenuItem';\nimport { RenderLayer } from '../RenderLayer';\nimport { Spinner } from '../../components/Spinner';\nimport type { Nullable } from '../../typings/utility-types';\nimport type { CommonProps } from '../CommonWrapper';\nimport { CommonWrapper } from '../CommonWrapper';\nimport { MobilePopup } from '../MobilePopup';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport type { TSetRootNode } from '../../lib/rootNode';\nimport { rootNode, getRootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport type { Theme } from '../../lib/theming/Theme';\nimport { LoadingIcon } from '../icons2022/LoadingIcon';\nimport type { ComboBoxExtendedItem, ComboBoxViewMode } from '../../components/ComboBox';\nimport type { SizeProp } from '../../lib/types/props';\nimport { Popup } from '../Popup';\nimport { getMenuPositions } from '../../lib/getMenuPositions';\nimport { ZIndex } from '../ZIndex';\nimport { InternalTextareaWithLayout } from '../InternalTextareaWithLayout/InternalTextareaWithLayout';\nimport type { TextareaProps } from '../../components/Textarea';\n\nimport { ArrowDownIcon } from './ArrowDownIcon';\nimport { ComboBoxMenu } from './ComboBoxMenu';\nimport { ComboBoxRequestStatus } from './CustomComboBoxTypes';\nimport { styles } from './CustomComboBox.styles';\nimport { CustomComboBoxDataTids } from './CustomComboBox';\nimport { getComboBoxTheme } from './getComboBoxTheme';\n\ninterface ComboBoxViewProps<T>\n extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>,\n Pick<HTMLAttributes<HTMLElement>, 'id'>,\n CommonProps {\n align?: 'left' | 'center' | 'right';\n autoFocus?: boolean;\n borderless?: boolean;\n disablePortal?: boolean;\n disabled?: boolean;\n editing?: boolean;\n /**\n * Cостояние валидации при ошибке.\n */\n error?: boolean;\n items?: Nullable<Array<ComboBoxExtendedItem<T>>>;\n loading?: boolean;\n /**\n * Позволяет вручную задать текущую позицию выпадающего окна\n */\n menuPos?: 'top' | 'bottom';\n menuAlign?: 'left' | 'right';\n opened?: boolean;\n drawArrow?: boolean;\n placeholder?: string;\n size?: SizeProp;\n textValue?: string;\n totalCount?: number;\n value?: Nullable<T>;\n showClearIcon?: ShowClearIcon;\n /**\n * Cостояние валидации при предупреждении.\n */\n warning?: boolean;\n width?: string | number;\n maxLength?: number;\n maxMenuHeight?: number | string;\n leftIcon?: InputIconType;\n rightIcon?: InputIconType;\n inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];\n\n onValueChange?: (value: T) => void;\n onClickOutside?: (e: Event) => void;\n onFocus?: () => void;\n onMobileClose?: () => void;\n onFocusOutside?: () => void;\n onInputBlur?: () => void;\n onInputValueChange?: (value: string) => void;\n onInputFocus?: () => void;\n onInputClick?: () => void;\n onClearCrossClick?: () => void;\n onInputKeyDown?: (e: React.KeyboardEvent) => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n renderItem?: (item: T, state: MenuItemState) => React.ReactNode;\n itemWrapper?: (item: T) => React.ComponentType;\n renderNotFound?: () => React.ReactNode;\n renderTotalCount?: (found: number, total: number) => React.ReactNode;\n renderValue?: (item: T) => React.ReactNode;\n renderAddButton?: (query?: string) => React.ReactNode;\n repeatRequest?: () => void;\n requestStatus?: ComboBoxRequestStatus;\n refInput?: (input: Nullable<Input | InternalTextareaWithLayout>) => void;\n refMenu?: (menu: Nullable<Menu>) => void;\n refInputLikeText?: (inputLikeText: Nullable<InputLikeText>) => void;\n viewMode?: ComboBoxViewMode;\n}\n\ntype DefaultProps<T> = Required<\n Pick<\n ComboBoxViewProps<T>,\n | 'renderItem'\n | 'renderValue'\n | 'renderAddButton'\n | 'repeatRequest'\n | 'requestStatus'\n | 'onClickOutside'\n | 'onFocusOutside'\n | 'size'\n | 'width'\n | 'showClearIcon'\n >\n>;\n\nexport const ComboBoxViewIds = {\n menu: 'ComboBoxView__menu',\n};\n\ninterface ComboBoxViewState {\n anchorElement: Nullable<Element>;\n clearCrossShowed: boolean;\n}\n\n@responsiveLayout\n@rootNode\nexport class ComboBoxView<T> extends React.Component<ComboBoxViewProps<T>, ComboBoxViewState> {\n public static __KONTUR_REACT_UI__ = 'ComboBoxView';\n public static displayName = 'ComboBoxView';\n\n public static defaultProps: DefaultProps<unknown> = {\n renderItem: (item: any) => item,\n renderValue: (item: any) => item,\n renderAddButton: () => null,\n repeatRequest: () => undefined,\n requestStatus: ComboBoxRequestStatus.Unknown,\n onClickOutside: () => {\n /**/\n },\n onFocusOutside: () => {\n /**/\n },\n size: 'small',\n width: 250,\n showClearIcon: 'never',\n };\n\n private getProps = createPropsGetter(ComboBoxView.defaultProps);\n\n private input: Nullable<Input | InternalTextareaWithLayout>;\n private setRootNode!: TSetRootNode;\n private mobileInput: Nullable<Input> = null;\n private isMobileLayout!: boolean;\n private dropdownContainerRef = React.createRef<Popup>();\n private theme!: Theme;\n private menuId = ComboBoxViewIds.menu + getRandomID();\n\n public state = {\n anchorElement: null,\n clearCrossShowed: this.props.showClearIcon === 'always' && !!this.props.value?.toString(),\n };\n\n public componentDidMount() {\n this.updateAnchorElement();\n\n if (this.props.autoFocus && this.props.onFocus) {\n this.props.onFocus();\n }\n }\n\n updateAnchorElement() {\n const parent = this.getParent();\n const anchorElement = this.state.anchorElement;\n\n if (anchorElement !== parent) {\n this.setState({\n anchorElement: parent,\n });\n }\n }\n\n public componentDidUpdate(prevProps: ComboBoxViewProps<T>) {\n const { input, props } = this;\n\n this.updateAnchorElement();\n\n if (props.editing && !prevProps.editing && input) {\n input.focus();\n }\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = getComboBoxTheme(theme);\n return <ThemeContext.Provider value={this.theme}>{this.renderMain()}</ThemeContext.Provider>;\n }}\n </ThemeContext.Consumer>\n );\n }\n\n public renderMain() {\n const { onMouseEnter, onMouseLeave, onMouseOver, opened } = this.props;\n const { onClickOutside, onFocusOutside, width } = this.getProps();\n\n const isMobile = this.isMobileLayout;\n\n const input = this.renderInput();\n\n return (\n <CommonWrapper {...this.props}>\n <RenderLayer onClickOutside={onClickOutside} onFocusOutside={onFocusOutside} active={opened}>\n <span\n data-tid={CustomComboBoxDataTids.comboBoxView}\n style={{ width }}\n className={styles.root()}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n ref={this.setRootNode}\n >\n {input}\n {isMobile ? this.renderMobileMenu() : this.renderMenu()}\n </span>\n </RenderLayer>\n </CommonWrapper>\n );\n }\n\n private getComboBoxMenu = () => {\n const { items, loading, opened, refMenu, maxMenuHeight, renderTotalCount, renderNotFound, totalCount, size } =\n this.props;\n\n const { repeatRequest, requestStatus, renderItem, itemWrapper } = this.getProps();\n return (\n <ComboBoxMenu\n hasMargin={false}\n menuId={this.menuId}\n items={items}\n loading={loading}\n maxMenuHeight={maxMenuHeight}\n onValueChange={this.handleItemSelect}\n opened={opened}\n refMenu={refMenu}\n renderTotalCount={renderTotalCount}\n renderItem={renderItem}\n renderNotFound={renderNotFound}\n itemWrapper={itemWrapper}\n renderAddButton={this.renderAddButton}\n repeatRequest={repeatRequest}\n requestStatus={requestStatus}\n totalCount={totalCount}\n isMobile={this.isMobileLayout}\n size={size}\n />\n );\n };\n\n private renderMenu = () => {\n const { opened, menuPos, menuAlign } = this.getProps();\n const { anchorElement } = this.state;\n\n return (\n opened &&\n anchorElement && (\n <Popup\n opened\n hasShadow\n minWidth=\"100%\"\n anchorElement={anchorElement}\n priority={ZIndex.priorities.PopupMenu}\n positions={getMenuPositions(menuPos, menuAlign)}\n disablePortal={this.props.disablePortal}\n margin={parseInt(this.theme.menuOffsetY) - 1}\n ref={this.dropdownContainerRef}\n >\n {this.getComboBoxMenu()}\n </Popup>\n )\n );\n };\n\n private renderMobileMenu = () => {\n let rightIcon = null;\n\n const { loading, items, opened, onFocus, onInputValueChange, onInputKeyDown, placeholder, textValue } = this.props;\n if (loading && items && !!items.length) {\n rightIcon = this.renderSpinner();\n }\n\n const inputProps: InputProps = {\n autoComplete: 'off',\n autoFocus: true,\n width: '100%',\n onFocus,\n onValueChange: onInputValueChange,\n onKeyDown: onInputKeyDown,\n value: textValue,\n placeholder,\n rightIcon,\n };\n\n return (\n opened && (\n <MobilePopup\n headerChildComponent={<Input ref={this.refMobileInput} {...inputProps} />}\n onCloseRequest={this.props.onMobileClose}\n opened\n >\n {this.getComboBoxMenu()}\n </MobilePopup>\n )\n );\n };\n\n private getParent = () => {\n return getRootNode(this);\n };\n\n private renderAddButton = (): React.ReactNode => {\n return this.getProps().renderAddButton(this.props.textValue);\n };\n\n private resolveComboboxMode = (): string => {\n if (!this.props.viewMode) {\n return 'singleLine';\n }\n if (typeof this.props.viewMode === 'string') {\n return this.props.viewMode;\n }\n return this.props.viewMode.mode;\n };\n\n private extractMultilineModeProps = (): Pick<TextareaProps, 'maxRows'> => {\n if (!this.props.viewMode || typeof this.props.viewMode === 'string') {\n return {};\n }\n return { maxRows: this.props.viewMode.maxRows };\n };\n\n private renderInput(): React.ReactNode {\n const isMobile = this.isMobileLayout;\n\n const {\n id,\n align,\n borderless,\n disabled,\n editing,\n error,\n onFocus,\n onInputBlur,\n onInputValueChange,\n onInputFocus,\n onInputClick,\n onInputKeyDown,\n placeholder,\n textValue,\n value,\n warning,\n refInputLikeText,\n leftIcon,\n inputMode,\n size,\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n showClearIcon,\n } = this.props;\n\n const { renderValue } = this.getProps();\n\n const rightIcon = this.getRightIcon();\n\n const editingStateProps = {\n id,\n align,\n borderless,\n disabled,\n error,\n maxLength: this.props.maxLength,\n onBlur: isMobile ? undefined : onInputBlur,\n onValueChange: onInputValueChange,\n onFocus: onInputFocus,\n onClick: isMobile ? this.handleMobileFocus : onInputClick,\n leftIcon,\n rightIcon,\n value: textValue || '',\n onKeyDown: onInputKeyDown,\n placeholder,\n width: '100%',\n size,\n ref: this.refInput,\n warning,\n inputMode,\n autoComplete: 'off',\n 'aria-describedby': ariaDescribedby,\n 'aria-controls': this.menuId,\n 'aria-label': ariaLabel,\n showClearIcon,\n };\n\n const multilineTextareaProps = {\n autoResize: true,\n rows: 1,\n extraRow: false,\n ...this.extractMultilineModeProps(),\n };\n\n if (this.resolveComboboxMode() === 'multiline') {\n return <InternalTextareaWithLayout {...editingStateProps} {...multilineTextareaProps} />;\n }\n\n if (editing) {\n if (this.resolveComboboxMode() === 'multilineEditing') {\n return <InternalTextareaWithLayout {...editingStateProps} {...multilineTextareaProps} />;\n }\n return <Input {...editingStateProps} />;\n }\n\n return (\n <InputLikeText\n id={id}\n align={align}\n borderless={borderless}\n error={error}\n onFocus={onFocus}\n leftIcon={leftIcon}\n rightIcon={rightIcon}\n disabled={disabled}\n warning={warning}\n placeholder={placeholder}\n size={size}\n width=\"100%\"\n ref={refInputLikeText}\n aria-describedby={ariaDescribedby}\n aria-controls={this.menuId}\n showClearIcon={showClearIcon}\n onClearCrossClick={this.props.onClearCrossClick}\n >\n {isNonNullable(value) && renderValue ? renderValue(value) : null}\n </InputLikeText>\n );\n }\n\n private handleMobileFocus = () => {\n this.props.onInputClick?.();\n\n this.mobileInput?.focus();\n };\n\n private handleItemSelect = (item: T) => {\n if (this.props.onValueChange) {\n this.props.onValueChange(item);\n }\n\n if (this.isMobileLayout) {\n this.props.onMobileClose?.();\n }\n };\n\n private refInput = (input: Nullable<Input | InternalTextareaWithLayout>) => {\n if (this.props.refInput) {\n this.props.refInput(input);\n }\n this.input = input;\n };\n\n private renderSpinner = () => (\n <span className={styles.spinnerWrapper()}>\n <Spinner type=\"mini\" caption=\"\" dimmed />\n </span>\n );\n\n private getRightIcon = () => {\n const { loading, items, drawArrow, rightIcon, size } = this.props;\n\n if (loading && items && !!items.length) {\n return <LoadingIcon size={size} />;\n }\n\n if (rightIcon || drawArrow) {\n return rightIcon || <ArrowDownIcon size={size} />;\n }\n\n return null;\n };\n\n private refMobileInput = (input: Nullable<Input>) => {\n this.mobileInput = input;\n };\n}\n"],"mappings":";AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;;AAEA,IAAAC,MAAA,GAAAD,OAAA;;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;;;AAGA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;;;AAGA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;;AAEA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,kBAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;;AAEA,IAAAY,YAAA,GAAAZ,OAAA;;;AAGA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,iBAAA,GAAAd,OAAA;AACA,IAAAe,OAAA,GAAAf,OAAA;AACA,IAAAgB,2BAAA,GAAAhB,OAAA;;;AAGA,IAAAiB,cAAA,GAAAjB,OAAA;AACA,IAAAkB,aAAA,GAAAlB,OAAA;AACA,IAAAmB,oBAAA,GAAAnB,OAAA;AACA,IAAAoB,eAAA,GAAApB,OAAA;AACA,IAAAqB,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type { Menu } from '../Menu';
|
|
|
6
6
|
import type { InputLikeText } from '../InputLikeText';
|
|
7
7
|
import type { MenuItemState } from '../../components/MenuItem';
|
|
8
8
|
import type { CommonProps } from '../CommonWrapper';
|
|
9
|
-
import type { ComboBoxExtendedItem } from '../../components/ComboBox';
|
|
9
|
+
import type { ComboBoxExtendedItem, ComboBoxViewMode } from '../../components/ComboBox';
|
|
10
10
|
import type { SizeProp } from '../../lib/types/props';
|
|
11
|
+
import type { InternalTextareaWithLayout } from '../InternalTextareaWithLayout/InternalTextareaWithLayout';
|
|
11
12
|
import { ComboBoxRequestStatus } from './CustomComboBoxTypes';
|
|
12
13
|
export * from './tids';
|
|
13
14
|
export interface CustomComboBoxProps<T> extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>, Pick<HTMLAttributes<HTMLElement>, 'id'>, CommonProps {
|
|
@@ -60,6 +61,7 @@ export interface CustomComboBoxProps<T> extends Pick<AriaAttributes, 'aria-descr
|
|
|
60
61
|
itemToValue: (item: T) => string | number;
|
|
61
62
|
getItems: (query: string) => Promise<Array<ComboBoxExtendedItem<T>>>;
|
|
62
63
|
inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];
|
|
64
|
+
viewMode?: ComboBoxViewMode;
|
|
63
65
|
}
|
|
64
66
|
export interface CustomComboBoxState<T> {
|
|
65
67
|
editing: boolean;
|
|
@@ -90,7 +92,7 @@ export declare class CustomComboBox<T> extends React.PureComponent<CustomComboBo
|
|
|
90
92
|
static __KONTUR_REACT_UI__: string;
|
|
91
93
|
static displayName: string;
|
|
92
94
|
state: CustomComboBoxState<T>;
|
|
93
|
-
input: Nullable<Input>;
|
|
95
|
+
input: Nullable<Input | InternalTextareaWithLayout>;
|
|
94
96
|
menu: Nullable<Menu>;
|
|
95
97
|
inputLikeText: Nullable<InputLikeText>;
|
|
96
98
|
requestId: number;
|