@skbkontur/react-ui 5.0.8 → 5.0.9
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 +8 -0
- package/cjs/components/Autocomplete/__creevey__/Autocomplete.creevey.mts +239 -0
- package/cjs/components/Button/__creevey__/Button.creevey.mts +251 -0
- package/cjs/components/Calendar/__creevey__/Calendar.creevey.mts +74 -0
- package/cjs/components/Checkbox/__creevey__/Checkbox.creevey.mts +243 -0
- package/cjs/components/ComboBox/__creevey__/ComboBox.creevey.mts +541 -0
- package/cjs/components/CurrencyInput/__creevey__/CurrencyInput.creevey.mts +81 -0
- package/cjs/components/DateInput/__creevey__/DateInput.creevey.mts +156 -0
- package/cjs/components/DatePicker/__creevey__/DatePicker.creevey.mts +209 -0
- package/cjs/components/Dropdown/__creevey__/Dropdown.creevey.mts +184 -0
- package/cjs/components/DropdownMenu/__creevey__/DropdownMenu.creevey.mts +263 -0
- package/cjs/components/FxInput/__creevey__/FxInput.creevey.mts +21 -0
- package/cjs/components/Group/__creevey__/Group.creevey.mts +19 -0
- package/cjs/components/Hint/__creevey__/Hint.creevey.mts +68 -0
- package/cjs/components/Input/__creevey__/Input.creevey.mts +239 -0
- package/cjs/components/Kebab/__creevey__/Kebab.creevey.mts +147 -0
- package/cjs/components/Link/__creevey__/Link.creevey.mts +162 -0
- package/cjs/components/Loader/__creevey__/Loader.creevey.mts +35 -0
- package/cjs/components/MaskedInput/__creevey__/MaskedInput.creevey.mts +216 -0
- package/cjs/components/Modal/Modal.js +7 -10
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Modal/ModalContext.d.ts +3 -3
- package/cjs/components/Modal/ModalContext.js.map +1 -1
- package/cjs/components/Modal/ModalFooter.js +2 -2
- package/cjs/components/Modal/ModalFooter.js.map +1 -1
- package/cjs/components/Modal/ModalHeader.js +1 -1
- package/cjs/components/Modal/ModalHeader.js.map +1 -1
- package/cjs/components/Modal/__creevey__/Modal.creevey.mts +281 -0
- package/cjs/components/Paging/__creevey__/Paging.creevey.mts +97 -0
- package/cjs/components/PasswordInput/__creevey__/PasswordInput.creevey.mts +38 -0
- package/cjs/components/Radio/__creevey__/Radio.creevey.mts +28 -0
- package/cjs/components/RadioGroup/__creevey__/RadioGroup.creevey.mts +86 -0
- package/cjs/components/ScrollContainer/__creevey__/ScrollContainer.creevey.mts +247 -0
- package/cjs/components/Select/Select.d.ts +1 -6
- package/cjs/components/Select/Select.js +7 -10
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/__creevey__/Select.creevey.mts +293 -0
- package/cjs/components/Select/tids.d.ts +5 -0
- package/cjs/components/Select/tids.js +5 -0
- package/cjs/components/Select/tids.js.map +1 -0
- package/cjs/components/SidePage/__creevey__/SidePage.creevey.mts +319 -0
- package/cjs/components/Sticky/__creevey__/Sticky.creevey.mts +98 -0
- package/cjs/components/Switcher/__creevey__/Switcher.creevey.mts +24 -0
- package/cjs/components/Tabs/__creevey__/Tabs.creevey.mts +239 -0
- package/cjs/components/Textarea/__creevey__/Textarea.creevey.mts +177 -0
- package/cjs/components/Toast/__creevey__/Toast.creevey.mts +54 -0
- package/cjs/components/Toggle/__creevey__/Toggle.creevey.mts +87 -0
- package/cjs/components/TokenInput/__creevey__/TokenInput.creevey.mts +414 -0
- package/cjs/components/Tooltip/__creevey__/Tooltip.creevey.mts +533 -0
- package/cjs/components/TooltipMenu/__creevey__/TooltipMenu.creevey.mts +131 -0
- package/cjs/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.mts +48 -0
- package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +1 -3
- package/cjs/internal/CustomComboBox/CustomComboBox.js +4 -6
- package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
- package/cjs/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.mts +30 -0
- package/cjs/internal/CustomComboBox/tids.d.ts +3 -0
- package/cjs/internal/CustomComboBox/tids.js +3 -0
- package/cjs/internal/CustomComboBox/tids.js.map +1 -0
- package/cjs/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.mts +25 -0
- package/cjs/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.mts +83 -0
- package/cjs/internal/Menu/__creevey__/Menu.creevey.mts +90 -0
- package/cjs/internal/PopupMenu/PopupMenu.d.ts +1 -5
- package/cjs/internal/PopupMenu/PopupMenu.js +8 -10
- package/cjs/internal/PopupMenu/PopupMenu.js.map +1 -1
- package/cjs/internal/PopupMenu/__creevey__/PopupMenu.creevey.mts +37 -0
- package/cjs/internal/PopupMenu/tids.d.ts +4 -0
- package/cjs/internal/PopupMenu/tids.js +4 -0
- package/cjs/internal/PopupMenu/tids.js.map +1 -0
- package/cjs/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.mts +68 -0
- package/cjs/internal/ThemeShowcase/VariablesCollector.js +1 -0
- package/cjs/internal/ThemeShowcase/VariablesCollector.js.map +1 -1
- package/cjs/internal/ZIndex/__creevey__/ZIndex.creevey.mts +228 -0
- package/cjs/lib/delay.d.ts +1 -0
- package/cjs/lib/delay.js +3 -0
- package/cjs/lib/delay.js.map +1 -0
- package/cjs/lib/utils.d.ts +3 -3
- package/cjs/lib/utils.js +5 -4
- package/cjs/lib/utils.js.map +1 -1
- package/components/Autocomplete/__creevey__/Autocomplete.creevey.mts +239 -0
- package/components/Button/__creevey__/Button.creevey.mts +251 -0
- package/components/Calendar/__creevey__/Calendar.creevey.mts +74 -0
- package/components/Checkbox/__creevey__/Checkbox.creevey.mts +243 -0
- package/components/ComboBox/__creevey__/ComboBox.creevey.mts +541 -0
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey.mts +81 -0
- package/components/DateInput/__creevey__/DateInput.creevey.mts +156 -0
- package/components/DatePicker/__creevey__/DatePicker.creevey.mts +209 -0
- package/components/Dropdown/__creevey__/Dropdown.creevey.mts +184 -0
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey.mts +263 -0
- package/components/FxInput/__creevey__/FxInput.creevey.mts +21 -0
- package/components/Group/__creevey__/Group.creevey.mts +19 -0
- package/components/Hint/__creevey__/Hint.creevey.mts +68 -0
- package/components/Input/__creevey__/Input.creevey.mts +239 -0
- package/components/Kebab/__creevey__/Kebab.creevey.mts +147 -0
- package/components/Link/__creevey__/Link.creevey.mts +162 -0
- package/components/Loader/__creevey__/Loader.creevey.mts +35 -0
- package/components/MaskedInput/__creevey__/MaskedInput.creevey.mts +216 -0
- package/components/Modal/Modal/Modal.js +4 -16
- package/components/Modal/Modal/Modal.js.map +1 -1
- package/components/Modal/ModalContext/ModalContext.js.map +1 -1
- package/components/Modal/ModalContext.d.ts +3 -3
- package/components/Modal/ModalFooter/ModalFooter.js +2 -2
- package/components/Modal/ModalFooter/ModalFooter.js.map +1 -1
- package/components/Modal/ModalHeader/ModalHeader.js +1 -1
- package/components/Modal/ModalHeader/ModalHeader.js.map +1 -1
- package/components/Modal/__creevey__/Modal.creevey.mts +281 -0
- package/components/Paging/__creevey__/Paging.creevey.mts +97 -0
- package/components/PasswordInput/__creevey__/PasswordInput.creevey.mts +38 -0
- package/components/Radio/__creevey__/Radio.creevey.mts +28 -0
- package/components/RadioGroup/__creevey__/RadioGroup.creevey.mts +86 -0
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey.mts +247 -0
- package/components/Select/Select/Select.js +2 -5
- package/components/Select/Select/Select.js.map +1 -1
- package/components/Select/Select.d.ts +1 -6
- package/components/Select/__creevey__/Select.creevey.mts +293 -0
- package/components/Select/tids/package.json +6 -0
- package/components/Select/tids/tids.js +5 -0
- package/components/Select/tids/tids.js.map +1 -0
- package/components/Select/tids.d.ts +5 -0
- package/components/SidePage/__creevey__/SidePage.creevey.mts +319 -0
- package/components/Sticky/__creevey__/Sticky.creevey.mts +98 -0
- package/components/Switcher/__creevey__/Switcher.creevey.mts +24 -0
- package/components/Tabs/__creevey__/Tabs.creevey.mts +239 -0
- package/components/Textarea/__creevey__/Textarea.creevey.mts +177 -0
- package/components/Toast/__creevey__/Toast.creevey.mts +54 -0
- package/components/Toggle/__creevey__/Toggle.creevey.mts +87 -0
- package/components/TokenInput/__creevey__/TokenInput.creevey.mts +414 -0
- package/components/Tooltip/__creevey__/Tooltip.creevey.mts +533 -0
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey.mts +131 -0
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.mts +48 -0
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +1 -3
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.d.ts +1 -3
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.mts +30 -0
- package/internal/CustomComboBox/tids/package.json +6 -0
- package/internal/CustomComboBox/tids/tids.js +3 -0
- package/internal/CustomComboBox/tids/tids.js.map +1 -0
- package/internal/CustomComboBox/tids.d.ts +3 -0
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.mts +25 -0
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.mts +83 -0
- package/internal/Menu/__creevey__/Menu.creevey.mts +90 -0
- package/internal/PopupMenu/PopupMenu/PopupMenu.js +2 -4
- package/internal/PopupMenu/PopupMenu/PopupMenu.js.map +1 -1
- package/internal/PopupMenu/PopupMenu.d.ts +1 -5
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey.mts +37 -0
- package/internal/PopupMenu/tids/package.json +6 -0
- package/internal/PopupMenu/tids/tids.js +4 -0
- package/internal/PopupMenu/tids/tids.js.map +1 -0
- package/internal/PopupMenu/tids.d.ts +4 -0
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.mts +68 -0
- package/internal/ThemeShowcase/VariablesCollector/VariablesCollector.js +2 -0
- package/internal/ThemeShowcase/VariablesCollector/VariablesCollector.js.map +1 -1
- package/internal/ZIndex/__creevey__/ZIndex.creevey.mts +228 -0
- package/lib/delay/delay.js +6 -0
- package/lib/delay/delay.js.map +1 -0
- package/lib/delay/package.json +6 -0
- package/lib/delay.d.ts +1 -0
- package/lib/utils/utils.js +3 -7
- package/lib/utils/utils.js.map +1 -1
- package/lib/utils.d.ts +3 -3
- package/package.json +6 -5
- package/cjs/components/Autocomplete/__creevey__/Autocomplete.creevey.js +0 -239
- package/cjs/components/Autocomplete/__creevey__/Autocomplete.creevey.js.map +0 -1
- package/cjs/components/Button/__creevey__/Button.creevey.js +0 -250
- package/cjs/components/Button/__creevey__/Button.creevey.js.map +0 -1
- package/cjs/components/Calendar/__creevey__/Calendar.creevey.js +0 -74
- package/cjs/components/Calendar/__creevey__/Calendar.creevey.js.map +0 -1
- package/cjs/components/Checkbox/__creevey__/Checkbox.creevey.js +0 -242
- package/cjs/components/Checkbox/__creevey__/Checkbox.creevey.js.map +0 -1
- package/cjs/components/ComboBox/__creevey__/ComboBox.creevey.js +0 -540
- package/cjs/components/ComboBox/__creevey__/ComboBox.creevey.js.map +0 -1
- package/cjs/components/CurrencyInput/__creevey__/CurrencyInput.creevey.js +0 -81
- package/cjs/components/CurrencyInput/__creevey__/CurrencyInput.creevey.js.map +0 -1
- package/cjs/components/DateInput/__creevey__/DateInput.creevey.js +0 -155
- package/cjs/components/DateInput/__creevey__/DateInput.creevey.js.map +0 -1
- package/cjs/components/DatePicker/__creevey__/DatePicker.creevey.js +0 -209
- package/cjs/components/DatePicker/__creevey__/DatePicker.creevey.js.map +0 -1
- package/cjs/components/Dropdown/__creevey__/Dropdown.creevey.js +0 -184
- package/cjs/components/Dropdown/__creevey__/Dropdown.creevey.js.map +0 -1
- package/cjs/components/DropdownMenu/__creevey__/DropdownMenu.creevey.js +0 -262
- package/cjs/components/DropdownMenu/__creevey__/DropdownMenu.creevey.js.map +0 -1
- package/cjs/components/FxInput/__creevey__/FxInput.creevey.js +0 -21
- package/cjs/components/FxInput/__creevey__/FxInput.creevey.js.map +0 -1
- package/cjs/components/Group/__creevey__/Group.creevey.js +0 -19
- package/cjs/components/Group/__creevey__/Group.creevey.js.map +0 -1
- package/cjs/components/Hint/__creevey__/Hint.creevey.js +0 -68
- package/cjs/components/Hint/__creevey__/Hint.creevey.js.map +0 -1
- package/cjs/components/Input/__creevey__/Input.creevey.js +0 -239
- package/cjs/components/Input/__creevey__/Input.creevey.js.map +0 -1
- package/cjs/components/Kebab/__creevey__/Kebab.creevey.js +0 -146
- package/cjs/components/Kebab/__creevey__/Kebab.creevey.js.map +0 -1
- package/cjs/components/Link/__creevey__/Link.creevey.js +0 -161
- package/cjs/components/Link/__creevey__/Link.creevey.js.map +0 -1
- package/cjs/components/Loader/__creevey__/Loader.creevey.js +0 -34
- package/cjs/components/Loader/__creevey__/Loader.creevey.js.map +0 -1
- package/cjs/components/MaskedInput/__creevey__/MaskedInput.creevey.js +0 -219
- package/cjs/components/MaskedInput/__creevey__/MaskedInput.creevey.js.map +0 -1
- package/cjs/components/Modal/__creevey__/Modal.creevey.js +0 -258
- package/cjs/components/Modal/__creevey__/Modal.creevey.js.map +0 -1
- package/cjs/components/Paging/__creevey__/Paging.creevey.js +0 -96
- package/cjs/components/Paging/__creevey__/Paging.creevey.js.map +0 -1
- package/cjs/components/PasswordInput/__creevey__/PasswordInput.creevey.js +0 -38
- package/cjs/components/PasswordInput/__creevey__/PasswordInput.creevey.js.map +0 -1
- package/cjs/components/Radio/__creevey__/Radio.creevey.js +0 -27
- package/cjs/components/Radio/__creevey__/Radio.creevey.js.map +0 -1
- package/cjs/components/RadioGroup/__creevey__/RadioGroup.creevey.js +0 -85
- package/cjs/components/RadioGroup/__creevey__/RadioGroup.creevey.js.map +0 -1
- package/cjs/components/ScrollContainer/__creevey__/ScrollContainer.creevey.js +0 -247
- package/cjs/components/ScrollContainer/__creevey__/ScrollContainer.creevey.js.map +0 -1
- package/cjs/components/Select/__creevey__/Select.creevey.js +0 -284
- package/cjs/components/Select/__creevey__/Select.creevey.js.map +0 -1
- package/cjs/components/SidePage/__creevey__/SidePage.creevey.js +0 -313
- package/cjs/components/SidePage/__creevey__/SidePage.creevey.js.map +0 -1
- package/cjs/components/Sticky/__creevey__/Sticky.creevey.js +0 -98
- package/cjs/components/Sticky/__creevey__/Sticky.creevey.js.map +0 -1
- package/cjs/components/Switcher/__creevey__/Switcher.creevey.js +0 -24
- package/cjs/components/Switcher/__creevey__/Switcher.creevey.js.map +0 -1
- package/cjs/components/Tabs/__creevey__/Tabs.creevey.js +0 -238
- package/cjs/components/Tabs/__creevey__/Tabs.creevey.js.map +0 -1
- package/cjs/components/Textarea/__creevey__/Textarea.creevey.js +0 -176
- package/cjs/components/Textarea/__creevey__/Textarea.creevey.js.map +0 -1
- package/cjs/components/Toast/__creevey__/Toast.creevey.js +0 -54
- package/cjs/components/Toast/__creevey__/Toast.creevey.js.map +0 -1
- package/cjs/components/Toggle/__creevey__/Toggle.creevey.js +0 -87
- package/cjs/components/Toggle/__creevey__/Toggle.creevey.js.map +0 -1
- package/cjs/components/TokenInput/__creevey__/TokenInput.creevey.js +0 -413
- package/cjs/components/TokenInput/__creevey__/TokenInput.creevey.js.map +0 -1
- package/cjs/components/Tooltip/__creevey__/Tooltip.creevey.js +0 -534
- package/cjs/components/Tooltip/__creevey__/Tooltip.creevey.js.map +0 -1
- package/cjs/components/TooltipMenu/__creevey__/TooltipMenu.creevey.js +0 -130
- package/cjs/components/TooltipMenu/__creevey__/TooltipMenu.creevey.js.map +0 -1
- package/cjs/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.js +0 -47
- package/cjs/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.js.map +0 -1
- package/cjs/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.js +0 -30
- package/cjs/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.js.map +0 -1
- package/cjs/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.js +0 -25
- package/cjs/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.js.map +0 -1
- package/cjs/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.js +0 -83
- package/cjs/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.js.map +0 -1
- package/cjs/internal/Menu/__creevey__/Menu.creevey.js +0 -90
- package/cjs/internal/Menu/__creevey__/Menu.creevey.js.map +0 -1
- package/cjs/internal/PopupMenu/__creevey__/PopupMenu.creevey.js +0 -37
- package/cjs/internal/PopupMenu/__creevey__/PopupMenu.creevey.js.map +0 -1
- package/cjs/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.js +0 -68
- package/cjs/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.js.map +0 -1
- package/cjs/internal/ZIndex/__creevey__/ZIndex.creevey.js +0 -228
- package/cjs/internal/ZIndex/__creevey__/ZIndex.creevey.js.map +0 -1
- package/cjs/lib/styles/HoldSelectionColor.d.ts +0 -1
- package/cjs/lib/styles/HoldSelectionColor.js +0 -9
- package/cjs/lib/styles/HoldSelectionColor.js.map +0 -1
- package/components/Autocomplete/__creevey__/Autocomplete.creevey/Autocomplete.creevey.js +0 -506
- package/components/Autocomplete/__creevey__/Autocomplete.creevey/Autocomplete.creevey.js.map +0 -1
- package/components/Autocomplete/__creevey__/Autocomplete.creevey/package.json +0 -6
- package/components/Autocomplete/__creevey__/Autocomplete.creevey.d.ts +0 -1
- package/components/Button/__creevey__/Button.creevey/Button.creevey.js +0 -396
- package/components/Button/__creevey__/Button.creevey/Button.creevey.js.map +0 -1
- package/components/Button/__creevey__/Button.creevey/package.json +0 -6
- package/components/Button/__creevey__/Button.creevey.d.ts +0 -1
- package/components/Calendar/__creevey__/Calendar.creevey/Calendar.creevey.js +0 -138
- package/components/Calendar/__creevey__/Calendar.creevey/Calendar.creevey.js.map +0 -1
- package/components/Calendar/__creevey__/Calendar.creevey/package.json +0 -6
- package/components/Calendar/__creevey__/Calendar.creevey.d.ts +0 -1
- package/components/Checkbox/__creevey__/Checkbox.creevey/Checkbox.creevey.js +0 -487
- package/components/Checkbox/__creevey__/Checkbox.creevey/Checkbox.creevey.js.map +0 -1
- package/components/Checkbox/__creevey__/Checkbox.creevey/package.json +0 -6
- package/components/Checkbox/__creevey__/Checkbox.creevey.d.ts +0 -1
- package/components/ComboBox/__creevey__/ComboBox.creevey/ComboBox.creevey.js +0 -1043
- package/components/ComboBox/__creevey__/ComboBox.creevey/ComboBox.creevey.js.map +0 -1
- package/components/ComboBox/__creevey__/ComboBox.creevey/package.json +0 -6
- package/components/ComboBox/__creevey__/ComboBox.creevey.d.ts +0 -1
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey/CurrencyInput.creevey.js +0 -114
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey/CurrencyInput.creevey.js.map +0 -1
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey/package.json +0 -6
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey.d.ts +0 -1
- package/components/DateInput/__creevey__/DateInput.creevey/DateInput.creevey.js +0 -367
- package/components/DateInput/__creevey__/DateInput.creevey/DateInput.creevey.js.map +0 -1
- package/components/DateInput/__creevey__/DateInput.creevey/package.json +0 -6
- package/components/DateInput/__creevey__/DateInput.creevey.d.ts +0 -1
- package/components/DatePicker/__creevey__/DatePicker.creevey/DatePicker.creevey.js +0 -395
- package/components/DatePicker/__creevey__/DatePicker.creevey/DatePicker.creevey.js.map +0 -1
- package/components/DatePicker/__creevey__/DatePicker.creevey/package.json +0 -6
- package/components/DatePicker/__creevey__/DatePicker.creevey.d.ts +0 -1
- package/components/Dropdown/__creevey__/Dropdown.creevey/Dropdown.creevey.js +0 -417
- package/components/Dropdown/__creevey__/Dropdown.creevey/Dropdown.creevey.js.map +0 -1
- package/components/Dropdown/__creevey__/Dropdown.creevey/package.json +0 -6
- package/components/Dropdown/__creevey__/Dropdown.creevey.d.ts +0 -1
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey/DropdownMenu.creevey.js +0 -534
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey/DropdownMenu.creevey.js.map +0 -1
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey/package.json +0 -6
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey.d.ts +0 -1
- package/components/FxInput/__creevey__/FxInput.creevey/FxInput.creevey.js +0 -62
- package/components/FxInput/__creevey__/FxInput.creevey/FxInput.creevey.js.map +0 -1
- package/components/FxInput/__creevey__/FxInput.creevey/package.json +0 -6
- package/components/FxInput/__creevey__/FxInput.creevey.d.ts +0 -1
- package/components/Group/__creevey__/Group.creevey/Group.creevey.js +0 -48
- package/components/Group/__creevey__/Group.creevey/Group.creevey.js.map +0 -1
- package/components/Group/__creevey__/Group.creevey/package.json +0 -6
- package/components/Group/__creevey__/Group.creevey.d.ts +0 -1
- package/components/Hint/__creevey__/Hint.creevey/Hint.creevey.js +0 -127
- package/components/Hint/__creevey__/Hint.creevey/Hint.creevey.js.map +0 -1
- package/components/Hint/__creevey__/Hint.creevey/package.json +0 -6
- package/components/Hint/__creevey__/Hint.creevey.d.ts +0 -1
- package/components/Input/__creevey__/Input.creevey/Input.creevey.js +0 -517
- package/components/Input/__creevey__/Input.creevey/Input.creevey.js.map +0 -1
- package/components/Input/__creevey__/Input.creevey/package.json +0 -6
- package/components/Input/__creevey__/Input.creevey.d.ts +0 -1
- package/components/Kebab/__creevey__/Kebab.creevey/Kebab.creevey.js +0 -278
- package/components/Kebab/__creevey__/Kebab.creevey/Kebab.creevey.js.map +0 -1
- package/components/Kebab/__creevey__/Kebab.creevey/package.json +0 -6
- package/components/Kebab/__creevey__/Kebab.creevey.d.ts +0 -1
- package/components/Link/__creevey__/Link.creevey/Link.creevey.js +0 -238
- package/components/Link/__creevey__/Link.creevey/Link.creevey.js.map +0 -1
- package/components/Link/__creevey__/Link.creevey/package.json +0 -6
- package/components/Link/__creevey__/Link.creevey.d.ts +0 -1
- package/components/Loader/__creevey__/Loader.creevey/Loader.creevey.js +0 -129
- package/components/Loader/__creevey__/Loader.creevey/Loader.creevey.js.map +0 -1
- package/components/Loader/__creevey__/Loader.creevey/package.json +0 -6
- package/components/Loader/__creevey__/Loader.creevey.d.ts +0 -1
- package/components/MaskedInput/__creevey__/MaskedInput.creevey/MaskedInput.creevey.js +0 -405
- package/components/MaskedInput/__creevey__/MaskedInput.creevey/MaskedInput.creevey.js.map +0 -1
- package/components/MaskedInput/__creevey__/MaskedInput.creevey/package.json +0 -6
- package/components/MaskedInput/__creevey__/MaskedInput.creevey.d.ts +0 -1
- package/components/Modal/__creevey__/Modal.creevey/Modal.creevey.js +0 -565
- package/components/Modal/__creevey__/Modal.creevey/Modal.creevey.js.map +0 -1
- package/components/Modal/__creevey__/Modal.creevey/package.json +0 -6
- package/components/Modal/__creevey__/Modal.creevey.d.ts +0 -1
- package/components/Paging/__creevey__/Paging.creevey/Paging.creevey.js +0 -190
- package/components/Paging/__creevey__/Paging.creevey/Paging.creevey.js.map +0 -1
- package/components/Paging/__creevey__/Paging.creevey/package.json +0 -6
- package/components/Paging/__creevey__/Paging.creevey.d.ts +0 -1
- package/components/PasswordInput/__creevey__/PasswordInput.creevey/PasswordInput.creevey.js +0 -83
- package/components/PasswordInput/__creevey__/PasswordInput.creevey/PasswordInput.creevey.js.map +0 -1
- package/components/PasswordInput/__creevey__/PasswordInput.creevey/package.json +0 -6
- package/components/PasswordInput/__creevey__/PasswordInput.creevey.d.ts +0 -1
- package/components/Radio/__creevey__/Radio.creevey/Radio.creevey.js +0 -56
- package/components/Radio/__creevey__/Radio.creevey/Radio.creevey.js.map +0 -1
- package/components/Radio/__creevey__/Radio.creevey/package.json +0 -6
- package/components/Radio/__creevey__/Radio.creevey.d.ts +0 -1
- package/components/RadioGroup/__creevey__/RadioGroup.creevey/RadioGroup.creevey.js +0 -167
- package/components/RadioGroup/__creevey__/RadioGroup.creevey/RadioGroup.creevey.js.map +0 -1
- package/components/RadioGroup/__creevey__/RadioGroup.creevey/package.json +0 -6
- package/components/RadioGroup/__creevey__/RadioGroup.creevey.d.ts +0 -1
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey/ScrollContainer.creevey.js +0 -488
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey/ScrollContainer.creevey.js.map +0 -1
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey/package.json +0 -6
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey.d.ts +0 -1
- package/components/Select/__creevey__/Select.creevey/Select.creevey.js +0 -541
- package/components/Select/__creevey__/Select.creevey/Select.creevey.js.map +0 -1
- package/components/Select/__creevey__/Select.creevey/package.json +0 -6
- package/components/Select/__creevey__/Select.creevey.d.ts +0 -1
- package/components/SidePage/__creevey__/SidePage.creevey/SidePage.creevey.js +0 -697
- package/components/SidePage/__creevey__/SidePage.creevey/SidePage.creevey.js.map +0 -1
- package/components/SidePage/__creevey__/SidePage.creevey/package.json +0 -6
- package/components/SidePage/__creevey__/SidePage.creevey.d.ts +0 -1
- package/components/Sticky/__creevey__/Sticky.creevey/Sticky.creevey.js +0 -215
- package/components/Sticky/__creevey__/Sticky.creevey/Sticky.creevey.js.map +0 -1
- package/components/Sticky/__creevey__/Sticky.creevey/package.json +0 -6
- package/components/Sticky/__creevey__/Sticky.creevey.d.ts +0 -1
- package/components/Switcher/__creevey__/Switcher.creevey/Switcher.creevey.js +0 -58
- package/components/Switcher/__creevey__/Switcher.creevey/Switcher.creevey.js.map +0 -1
- package/components/Switcher/__creevey__/Switcher.creevey/package.json +0 -6
- package/components/Switcher/__creevey__/Switcher.creevey.d.ts +0 -1
- package/components/Tabs/__creevey__/Tabs.creevey/Tabs.creevey.js +0 -391
- package/components/Tabs/__creevey__/Tabs.creevey/Tabs.creevey.js.map +0 -1
- package/components/Tabs/__creevey__/Tabs.creevey/package.json +0 -6
- package/components/Tabs/__creevey__/Tabs.creevey.d.ts +0 -1
- package/components/Textarea/__creevey__/Textarea.creevey/Textarea.creevey.js +0 -404
- package/components/Textarea/__creevey__/Textarea.creevey/Textarea.creevey.js.map +0 -1
- package/components/Textarea/__creevey__/Textarea.creevey/package.json +0 -6
- package/components/Textarea/__creevey__/Textarea.creevey.d.ts +0 -1
- package/components/Toast/__creevey__/Toast.creevey/Toast.creevey.js +0 -70
- package/components/Toast/__creevey__/Toast.creevey/Toast.creevey.js.map +0 -1
- package/components/Toast/__creevey__/Toast.creevey/package.json +0 -6
- package/components/Toast/__creevey__/Toast.creevey.d.ts +0 -1
- package/components/Toggle/__creevey__/Toggle.creevey/Toggle.creevey.js +0 -195
- package/components/Toggle/__creevey__/Toggle.creevey/Toggle.creevey.js.map +0 -1
- package/components/Toggle/__creevey__/Toggle.creevey/package.json +0 -6
- package/components/Toggle/__creevey__/Toggle.creevey.d.ts +0 -1
- package/components/TokenInput/__creevey__/TokenInput.creevey/TokenInput.creevey.js +0 -635
- package/components/TokenInput/__creevey__/TokenInput.creevey/TokenInput.creevey.js.map +0 -1
- package/components/TokenInput/__creevey__/TokenInput.creevey/package.json +0 -6
- package/components/TokenInput/__creevey__/TokenInput.creevey.d.ts +0 -1
- package/components/Tooltip/__creevey__/Tooltip.creevey/Tooltip.creevey.js +0 -1171
- package/components/Tooltip/__creevey__/Tooltip.creevey/Tooltip.creevey.js.map +0 -1
- package/components/Tooltip/__creevey__/Tooltip.creevey/package.json +0 -6
- package/components/Tooltip/__creevey__/Tooltip.creevey.d.ts +0 -1
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey/TooltipMenu.creevey.js +0 -277
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey/TooltipMenu.creevey.js.map +0 -1
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey/package.json +0 -6
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey.d.ts +0 -1
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey/CloseButtonIcon.creevey.js +0 -78
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey/CloseButtonIcon.creevey.js.map +0 -1
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey/package.json +0 -6
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.d.ts +0 -1
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey/ComboBoxView.creevey.js +0 -58
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey/ComboBoxView.creevey.js.map +0 -1
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey/package.json +0 -6
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.d.ts +0 -1
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey/FileUploaderFile.creevey.js +0 -41
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey/FileUploaderFile.creevey.js.map +0 -1
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey/package.json +0 -6
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.d.ts +0 -1
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey/HideBodyVerticalScroll.creevey.js +0 -199
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey/HideBodyVerticalScroll.creevey.js.map +0 -1
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey/package.json +0 -6
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.d.ts +0 -1
- package/internal/Menu/__creevey__/Menu.creevey/Menu.creevey.js +0 -196
- package/internal/Menu/__creevey__/Menu.creevey/Menu.creevey.js.map +0 -1
- package/internal/Menu/__creevey__/Menu.creevey/package.json +0 -6
- package/internal/Menu/__creevey__/Menu.creevey.d.ts +0 -1
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey/PopupMenu.creevey.js +0 -69
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey/PopupMenu.creevey.js.map +0 -1
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey/package.json +0 -6
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey.d.ts +0 -1
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey/ThemeProvider.creevey.js +0 -145
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey/ThemeProvider.creevey.js.map +0 -1
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey/package.json +0 -6
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.d.ts +0 -1
- package/internal/ZIndex/__creevey__/ZIndex.creevey/ZIndex.creevey.js +0 -550
- package/internal/ZIndex/__creevey__/ZIndex.creevey/ZIndex.creevey.js.map +0 -1
- package/internal/ZIndex/__creevey__/ZIndex.creevey/package.json +0 -6
- package/internal/ZIndex/__creevey__/ZIndex.creevey.d.ts +0 -1
- package/lib/styles/HoldSelectionColor/HoldSelectionColor.js +0 -8
- package/lib/styles/HoldSelectionColor/HoldSelectionColor.js.map +0 -1
- package/lib/styles/HoldSelectionColor/package.json +0 -6
- package/lib/styles/HoldSelectionColor.d.ts +0 -1
- /package/{cjs/components/Autocomplete/__creevey__/Autocomplete.creevey.d.ts → components/Autocomplete/__creevey__/Autocomplete.creevey.d.mts} +0 -0
- /package/{cjs/components/Button/__creevey__/Button.creevey.d.ts → components/Button/__creevey__/Button.creevey.d.mts} +0 -0
- /package/{cjs/components/Calendar/__creevey__/Calendar.creevey.d.ts → components/Calendar/__creevey__/Calendar.creevey.d.mts} +0 -0
- /package/{cjs/components/Checkbox/__creevey__/Checkbox.creevey.d.ts → components/Checkbox/__creevey__/Checkbox.creevey.d.mts} +0 -0
- /package/{cjs/components/ComboBox/__creevey__/ComboBox.creevey.d.ts → components/ComboBox/__creevey__/ComboBox.creevey.d.mts} +0 -0
- /package/{cjs/components/CurrencyInput/__creevey__/CurrencyInput.creevey.d.ts → components/CurrencyInput/__creevey__/CurrencyInput.creevey.d.mts} +0 -0
- /package/{cjs/components/DateInput/__creevey__/DateInput.creevey.d.ts → components/DateInput/__creevey__/DateInput.creevey.d.mts} +0 -0
- /package/{cjs/components/DatePicker/__creevey__/DatePicker.creevey.d.ts → components/DatePicker/__creevey__/DatePicker.creevey.d.mts} +0 -0
- /package/{cjs/components/Dropdown/__creevey__/Dropdown.creevey.d.ts → components/Dropdown/__creevey__/Dropdown.creevey.d.mts} +0 -0
- /package/{cjs/components/DropdownMenu/__creevey__/DropdownMenu.creevey.d.ts → components/DropdownMenu/__creevey__/DropdownMenu.creevey.d.mts} +0 -0
- /package/{cjs/components/FxInput/__creevey__/FxInput.creevey.d.ts → components/FxInput/__creevey__/FxInput.creevey.d.mts} +0 -0
- /package/{cjs/components/Group/__creevey__/Group.creevey.d.ts → components/Group/__creevey__/Group.creevey.d.mts} +0 -0
- /package/{cjs/components/Hint/__creevey__/Hint.creevey.d.ts → components/Hint/__creevey__/Hint.creevey.d.mts} +0 -0
- /package/{cjs/components/Input/__creevey__/Input.creevey.d.ts → components/Input/__creevey__/Input.creevey.d.mts} +0 -0
- /package/{cjs/components/Kebab/__creevey__/Kebab.creevey.d.ts → components/Kebab/__creevey__/Kebab.creevey.d.mts} +0 -0
- /package/{cjs/components/Link/__creevey__/Link.creevey.d.ts → components/Link/__creevey__/Link.creevey.d.mts} +0 -0
- /package/{cjs/components/Loader/__creevey__/Loader.creevey.d.ts → components/Loader/__creevey__/Loader.creevey.d.mts} +0 -0
- /package/{cjs/components/MaskedInput/__creevey__/MaskedInput.creevey.d.ts → components/MaskedInput/__creevey__/MaskedInput.creevey.d.mts} +0 -0
- /package/{cjs/components/Modal/__creevey__/Modal.creevey.d.ts → components/Modal/__creevey__/Modal.creevey.d.mts} +0 -0
- /package/{cjs/components/Paging/__creevey__/Paging.creevey.d.ts → components/Paging/__creevey__/Paging.creevey.d.mts} +0 -0
- /package/{cjs/components/PasswordInput/__creevey__/PasswordInput.creevey.d.ts → components/PasswordInput/__creevey__/PasswordInput.creevey.d.mts} +0 -0
- /package/{cjs/components/Radio/__creevey__/Radio.creevey.d.ts → components/Radio/__creevey__/Radio.creevey.d.mts} +0 -0
- /package/{cjs/components/RadioGroup/__creevey__/RadioGroup.creevey.d.ts → components/RadioGroup/__creevey__/RadioGroup.creevey.d.mts} +0 -0
- /package/{cjs/components/ScrollContainer/__creevey__/ScrollContainer.creevey.d.ts → components/ScrollContainer/__creevey__/ScrollContainer.creevey.d.mts} +0 -0
- /package/{cjs/components/Select/__creevey__/Select.creevey.d.ts → components/Select/__creevey__/Select.creevey.d.mts} +0 -0
- /package/{cjs/components/SidePage/__creevey__/SidePage.creevey.d.ts → components/SidePage/__creevey__/SidePage.creevey.d.mts} +0 -0
- /package/{cjs/components/Sticky/__creevey__/Sticky.creevey.d.ts → components/Sticky/__creevey__/Sticky.creevey.d.mts} +0 -0
- /package/{cjs/components/Switcher/__creevey__/Switcher.creevey.d.ts → components/Switcher/__creevey__/Switcher.creevey.d.mts} +0 -0
- /package/{cjs/components/Tabs/__creevey__/Tabs.creevey.d.ts → components/Tabs/__creevey__/Tabs.creevey.d.mts} +0 -0
- /package/{cjs/components/Textarea/__creevey__/Textarea.creevey.d.ts → components/Textarea/__creevey__/Textarea.creevey.d.mts} +0 -0
- /package/{cjs/components/Toast/__creevey__/Toast.creevey.d.ts → components/Toast/__creevey__/Toast.creevey.d.mts} +0 -0
- /package/{cjs/components/Toggle/__creevey__/Toggle.creevey.d.ts → components/Toggle/__creevey__/Toggle.creevey.d.mts} +0 -0
- /package/{cjs/components/TokenInput/__creevey__/TokenInput.creevey.d.ts → components/TokenInput/__creevey__/TokenInput.creevey.d.mts} +0 -0
- /package/{cjs/components/Tooltip/__creevey__/Tooltip.creevey.d.ts → components/Tooltip/__creevey__/Tooltip.creevey.d.mts} +0 -0
- /package/{cjs/components/TooltipMenu/__creevey__/TooltipMenu.creevey.d.ts → components/TooltipMenu/__creevey__/TooltipMenu.creevey.d.mts} +0 -0
- /package/{cjs/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.d.ts → internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.d.mts} +0 -0
- /package/{cjs/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.d.ts → internal/CustomComboBox/__creevey__/ComboBoxView.creevey.d.mts} +0 -0
- /package/{cjs/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.d.ts → internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.d.mts} +0 -0
- /package/{cjs/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.d.ts → internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.d.mts} +0 -0
- /package/{cjs/internal/Menu/__creevey__/Menu.creevey.d.ts → internal/Menu/__creevey__/Menu.creevey.d.mts} +0 -0
- /package/{cjs/internal/PopupMenu/__creevey__/PopupMenu.creevey.d.ts → internal/PopupMenu/__creevey__/PopupMenu.creevey.d.mts} +0 -0
- /package/{cjs/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.d.ts → internal/ThemePlayground/__creevey__/ThemeProvider.creevey.d.mts} +0 -0
- /package/{cjs/internal/ZIndex/__creevey__/ZIndex.creevey.d.ts → internal/ZIndex/__creevey__/ZIndex.creevey.d.mts} +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
import { Key } from 'selenium-webdriver';
|
|
3
|
+
|
|
4
|
+
const clickThenTAB = (clickDataTid: string) => {
|
|
5
|
+
test(clickDataTid, async (context) => {
|
|
6
|
+
await context.webdriver
|
|
7
|
+
.actions({
|
|
8
|
+
bridge: true,
|
|
9
|
+
})
|
|
10
|
+
.click(context.webdriver.findElement({ css: `[data-tid="${clickDataTid}"] input` }))
|
|
11
|
+
.pause(500)
|
|
12
|
+
.perform();
|
|
13
|
+
const firstFocus = await context.takeScreenshot();
|
|
14
|
+
await context.webdriver
|
|
15
|
+
.actions({
|
|
16
|
+
bridge: true,
|
|
17
|
+
})
|
|
18
|
+
.sendKeys(Key.TAB)
|
|
19
|
+
.pause(500)
|
|
20
|
+
.perform();
|
|
21
|
+
const secondFocus = await context.takeScreenshot();
|
|
22
|
+
|
|
23
|
+
await context.matchImages({ firstFocus, secondFocus });
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
kind('CloseButtonIcon', () => {
|
|
28
|
+
story('Tabbable', ({ setStoryParameters }) => {
|
|
29
|
+
setStoryParameters({
|
|
30
|
+
skip: {
|
|
31
|
+
'do not pass on teamcity': { in: ['firefox2022', 'firefox2022Dark'] },
|
|
32
|
+
'only available in theme2022': { in: /^(?!\b.*2022.*\b)/ },
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
clickThenTAB('notTabbable');
|
|
36
|
+
clickThenTAB('tabbable');
|
|
37
|
+
});
|
|
38
|
+
story('Side', ({ setStoryParameters }) => {
|
|
39
|
+
setStoryParameters({
|
|
40
|
+
skip: { 'only available in theme2022': { in: /^(?!\b.*2022.*\b)/ } },
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
story('VerticalAlign', ({ setStoryParameters }) => {
|
|
44
|
+
setStoryParameters({
|
|
45
|
+
skip: { 'only available in theme2022': { in: /^(?!\b.*2022.*\b)/ } },
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -15,6 +15,7 @@ import { ReactUIFeatureFlagsContext, getFullReactUIFlagsContext } from "../../..
|
|
|
15
15
|
import { ComboBoxRequestStatus } from "../CustomComboBoxTypes";
|
|
16
16
|
import { reducer } from "../CustomComboBoxReducer";
|
|
17
17
|
import { ComboBoxView } from "../ComboBoxView";
|
|
18
|
+
export * from "../tids";
|
|
18
19
|
export var DELAY_BEFORE_SHOW_LOADER = 300;
|
|
19
20
|
export var LOADER_SHOW_TIME = 1000;
|
|
20
21
|
export var DefaultState = {
|
|
@@ -31,9 +32,6 @@ export var DefaultState = {
|
|
|
31
32
|
requestStatus: ComboBoxRequestStatus.Unknown,
|
|
32
33
|
size: 'small'
|
|
33
34
|
};
|
|
34
|
-
export var CustomComboBoxDataTids = {
|
|
35
|
-
comboBoxView: 'ComboBoxView__root'
|
|
36
|
-
};
|
|
37
35
|
export var CustomComboBox = responsiveLayout(_class = rootNode(_class = (_CustomComboBox = /*#__PURE__*/function (_React$PureComponent) {
|
|
38
36
|
function CustomComboBox() {
|
|
39
37
|
var _this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReactDOM","globalObject","CancelationError","taskWithDelay","fixClickFocusIE","CommonWrapper","responsiveLayout","rootNode","ReactUIFeatureFlagsContext","getFullReactUIFlagsContext","ComboBoxRequestStatus","reducer","ComboBoxView","DELAY_BEFORE_SHOW_LOADER","LOADER_SHOW_TIME","DefaultState","inputChanged","editing","items","loading","opened","focused","textValue","repeatRequest","undefined","requestStatus","Unknown","size","CustomComboBoxDataTids","comboBoxView","CustomComboBox","_class","_CustomComboBox","_React$PureComponent","_this","_len","arguments","length","args","Array","_key","call","apply","concat","state","requestId","cancelationToken","cancelLoaderDelay","focus","props","disabled","input","inputLikeText","selectInputText","selectAll","blur","handleBlur","dispatch","action","sync","updateState","effects","nextState","setState","stateAndEffect","_ref","forEach","handleEffect","version","search","flushSync","effect","getState","getProps","handleValueChange","value","type","keepFocus","isMobileLayout","handleFocus","handleMobileClose","handleInputBlur","handleClickOutside","e","close","setTimeout","handleInputClick","_inheritsLoose","_proto","prototype","_search","_asyncToGenerator","_regeneratorRuntime","mark","_callee","query","_this2","getItems","cancelPromise","expectingId","wrap","_callee$","_context","prev","next","Promise","_","reject","loaderShowDelay","resolve","cancelLoader","race","sent","t0","code","finish","stop","_x","cancelSearch","open","render","_this3","viewProps","align","borderless","disablePortal","error","drawArrow","menuPos","menuAlign","placeholder","totalCount","warning","id","width","maxLength","maxMenuHeight","leftIcon","rightIcon","inputMode","onValueChange","onClickOutside","onFocus","onMobileClose","onFocusOutside","onInputBlur","onInputValueChange","onInputFocus","onInputClick","onInputKeyDown","event","persist","onMouseEnter","onMouseOver","onMouseLeave","renderItem","renderNotFound","itemWrapper","renderValue","renderTotalCount","renderAddButton","refInput","refMenu","menu","refInputLikeText","createElement","Consumer","flags","featureFlags","_extends","ref","setRootNode","componentDidMount","autoFocus","componentDidUpdate","prevProps","prevState","fixValueChange","comboBoxAllowValueChangeInEditingState","reset","PureComponent","__KONTUR_REACT_UI__","displayName"],"sources":["CustomComboBox.tsx"],"sourcesContent":["import React, { AriaAttributes, HTMLAttributes } from 'react';\nimport ReactDOM from 'react-dom';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport { Nullable } from '../../typings/utility-types';\nimport { Input, InputIconType } from '../../components/Input';\nimport { Menu } from '../Menu';\nimport { InputLikeText } from '../InputLikeText';\nimport { MenuItemState } from '../../components/MenuItem';\nimport { CancelationError, taskWithDelay } from '../../lib/utils';\nimport { fixClickFocusIE } from '../../lib/events/fixClickFocusIE';\nimport { CommonProps, CommonWrapper } from '../CommonWrapper';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { ComboBoxExtendedItem } from '../../components/ComboBox';\nimport { SizeProp } from '../../lib/types/props';\nimport {\n ReactUIFeatureFlags,\n ReactUIFeatureFlagsContext,\n getFullReactUIFlagsContext,\n} from '../../lib/featureFlagsContext';\n\nimport { ComboBoxRequestStatus } from './CustomComboBoxTypes';\nimport { CustomComboBoxAction, CustomComboBoxEffect, reducer } from './CustomComboBoxReducer';\nimport { ComboBoxView } from './ComboBoxView';\n\nexport interface CustomComboBoxProps<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 /**\n * Cостояние валидации при ошибке.\n */\n error?: boolean;\n maxLength?: number;\n /**\n * Позволяет вручную задать текущую позицию выпадающего окна\n */\n menuPos?: 'top' | 'bottom';\n menuAlign?: 'left' | 'right';\n drawArrow?: boolean;\n leftIcon?: InputIconType;\n rightIcon?: InputIconType;\n searchOnFocus?: boolean;\n onValueChange?: (value: T) => void;\n onInputValueChange?: (value: string) => Nullable<string> | void;\n onUnexpectedInput?: (value: string) => void | null | T;\n onFocus?: () => void;\n onBlur?: () => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n onInputKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;\n placeholder?: string;\n size?: SizeProp;\n totalCount?: number;\n value?: Nullable<T>;\n /**\n * Cостояние валидации при предупреждении.\n */\n warning?: boolean;\n width?: string | number;\n maxMenuHeight?: number | string;\n renderNotFound?: () => React.ReactNode;\n renderTotalCount?: (found: number, total: number) => React.ReactNode;\n renderItem: (item: T, state?: MenuItemState) => React.ReactNode;\n itemWrapper?: (item: T) => React.ComponentType;\n renderValue: (value: T) => React.ReactNode;\n renderAddButton?: (query?: string) => React.ReactNode;\n valueToString: (value: T) => string;\n itemToValue: (item: T) => string | number;\n getItems: (query: string) => Promise<Array<ComboBoxExtendedItem<T>>>;\n inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];\n}\n\nexport interface CustomComboBoxState<T> {\n editing: boolean;\n loading: boolean;\n opened: boolean;\n textValue: string;\n items: Nullable<Array<ComboBoxExtendedItem<T>>>;\n inputChanged: boolean;\n focused: boolean;\n repeatRequest: () => void;\n requestStatus: ComboBoxRequestStatus;\n}\n\nexport const DELAY_BEFORE_SHOW_LOADER = 300;\nexport const LOADER_SHOW_TIME = 1000;\n\nexport const DefaultState = {\n inputChanged: false,\n editing: false,\n items: null,\n loading: false,\n opened: false,\n focused: false,\n textValue: '',\n repeatRequest: () => undefined,\n requestStatus: ComboBoxRequestStatus.Unknown,\n size: 'small',\n};\n\nexport const CustomComboBoxDataTids = {\n comboBoxView: 'ComboBoxView__root',\n} as const;\n\n@responsiveLayout\n@rootNode\nexport class CustomComboBox<T> extends React.PureComponent<CustomComboBoxProps<T>, CustomComboBoxState<T>> {\n public static __KONTUR_REACT_UI__ = 'CustomComboBox';\n public static displayName = 'CustomComboBox';\n\n public state: CustomComboBoxState<T> = DefaultState;\n public input: Nullable<Input>;\n public menu: Nullable<Menu>;\n public inputLikeText: Nullable<InputLikeText>;\n public requestId = 0;\n public loaderShowDelay: Nullable<Promise<void>>;\n private focused = false;\n private cancelationToken: Nullable<(reason?: Error) => void> = null;\n private isMobileLayout!: boolean;\n private featureFlags!: ReactUIFeatureFlags;\n\n private reducer = reducer;\n public cancelLoaderDelay: () => void = () => null;\n\n /**\n * @public\n */\n public focus = () => {\n if (this.props.disabled) {\n return;\n }\n\n if (this.input) {\n this.input.focus();\n } else if (this.inputLikeText) {\n this.inputLikeText.focus();\n }\n };\n\n /**\n * @public\n */\n public selectInputText = () => {\n if (this.props.disabled) {\n return;\n }\n if (this.input) {\n this.input.selectAll();\n }\n };\n\n /**\n * @public\n */\n public blur = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.handleBlur();\n };\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public async search(query: string = this.state.textValue) {\n const { getItems } = this.props;\n\n const cancelPromise: Promise<never> = new Promise((_, reject) => (this.cancelationToken = reject));\n this.requestId += 1;\n const expectingId = this.requestId;\n\n if (!this.loaderShowDelay) {\n this.loaderShowDelay = new Promise<void>((resolve) => {\n const cancelLoader = taskWithDelay(() => {\n this.dispatch({ type: 'RequestItems' });\n globalObject.setTimeout(resolve, LOADER_SHOW_TIME);\n }, DELAY_BEFORE_SHOW_LOADER);\n\n cancelPromise.catch(() => cancelLoader());\n\n this.cancelLoaderDelay = () => {\n cancelLoader();\n resolve();\n };\n });\n }\n\n try {\n const items = await Promise.race([getItems(query), cancelPromise]);\n if (this.state.loading) {\n await Promise.race([this.loaderShowDelay, cancelPromise]);\n }\n if (expectingId === this.requestId) {\n this.dispatch({\n type: 'ReceiveItems',\n items,\n });\n }\n } catch (error) {\n if (error && error.code === 'CancelationError') {\n this.dispatch({ type: 'CancelRequest' });\n } else if (expectingId === this.requestId) {\n this.dispatch({\n type: 'RequestFailure',\n repeatRequest: () => {\n this.search(query);\n if (this.input) {\n this.input.focus();\n }\n },\n });\n }\n } finally {\n if (expectingId === this.requestId) {\n if (!this.state.loading) {\n this.cancelLoaderDelay();\n }\n this.cancelationToken = null;\n this.loaderShowDelay = null;\n }\n }\n }\n\n /**\n * @public\n */\n public cancelSearch() {\n if (this.cancelationToken) {\n this.cancelationToken(new CancelationError());\n }\n }\n\n /**\n * @public\n */\n public open() {\n this.dispatch({ type: 'Open' });\n }\n\n /**\n * @public\n */\n public close() {\n this.dispatch({ type: 'Close' });\n }\n\n public render() {\n const viewProps = {\n align: this.props.align,\n borderless: this.props.borderless,\n disabled: this.props.disabled,\n disablePortal: this.props.disablePortal,\n editing: this.state.editing,\n error: this.props.error,\n items: this.state.items,\n loading: this.state.loading,\n opened: this.state.opened,\n drawArrow: this.props.drawArrow,\n menuPos: this.props.menuPos,\n menuAlign: this.props.menuAlign,\n placeholder: this.props.placeholder,\n size: this.props.size,\n textValue: this.state.textValue,\n totalCount: this.props.totalCount,\n value: this.props.value,\n warning: this.props.warning,\n 'aria-describedby': this.props['aria-describedby'],\n 'aria-label': this.props['aria-label'],\n id: this.props.id,\n width: this.props.width,\n maxLength: this.props.maxLength,\n maxMenuHeight: this.props.maxMenuHeight,\n leftIcon: this.props.leftIcon,\n rightIcon: this.props.rightIcon,\n inputMode: this.props.inputMode,\n\n onValueChange: this.handleValueChange,\n onClickOutside: this.handleClickOutside,\n onFocus: this.handleFocus,\n onMobileClose: this.handleMobileClose,\n onFocusOutside: this.handleBlur,\n onInputBlur: this.handleInputBlur,\n onInputValueChange: (value: string) => this.dispatch({ type: 'TextChange', value }),\n onInputFocus: this.handleFocus,\n onInputClick: this.handleInputClick,\n onInputKeyDown: (event: React.KeyboardEvent) => {\n event.persist();\n this.dispatch({ type: 'KeyPress', event });\n },\n onMouseEnter: this.props.onMouseEnter,\n onMouseOver: this.props.onMouseOver,\n onMouseLeave: this.props.onMouseLeave,\n renderItem: this.props.renderItem,\n renderNotFound: this.props.renderNotFound,\n itemWrapper: this.props.itemWrapper,\n renderValue: this.props.renderValue,\n renderTotalCount: this.props.renderTotalCount,\n renderAddButton: this.props.renderAddButton,\n repeatRequest: this.state.repeatRequest,\n requestStatus: this.state.requestStatus,\n\n refInput: (input: Nullable<Input>) => {\n this.input = input;\n },\n refMenu: (menu: Nullable<Menu>) => {\n this.menu = menu;\n },\n refInputLikeText: (inputLikeText: Nullable<InputLikeText>) => {\n this.inputLikeText = inputLikeText;\n },\n };\n\n return (\n <ReactUIFeatureFlagsContext.Consumer>\n {(flags) => {\n this.featureFlags = getFullReactUIFlagsContext(flags);\n return (\n <CommonWrapper {...this.props}>\n <ComboBoxView {...viewProps} size={this.props.size} ref={this.setRootNode} />\n </CommonWrapper>\n );\n }}\n </ReactUIFeatureFlagsContext.Consumer>\n );\n }\n\n public componentDidMount() {\n this.dispatch({ type: 'Mount' }, false);\n if (this.props.autoFocus) {\n this.focus();\n }\n }\n\n public componentDidUpdate(prevProps: CustomComboBoxProps<T>, prevState: CustomComboBoxState<T>) {\n if (prevState.editing && !this.state.editing) {\n this.handleBlur();\n }\n this.dispatch(\n {\n type: 'DidUpdate',\n prevProps,\n prevState,\n fixValueChange: this.featureFlags.comboBoxAllowValueChangeInEditingState,\n },\n false,\n );\n }\n\n /**\n * @public\n */\n public reset() {\n this.dispatch({ type: 'Reset' });\n }\n\n private dispatch = (action: CustomComboBoxAction<T>, sync = true) => {\n const updateState = (action: CustomComboBoxAction<T>) => {\n let effects: Array<CustomComboBoxEffect<T>>;\n let nextState: Pick<CustomComboBoxState<T>, never>;\n\n this.setState(\n (state) => {\n const stateAndEffect = this.reducer(state, this.props, action);\n [nextState, effects] = stateAndEffect instanceof Array ? stateAndEffect : [stateAndEffect, []];\n return nextState;\n },\n () => {\n effects.forEach(this.handleEffect);\n },\n );\n };\n\n // Auto-batching React@18 creates problems that are fixed with flushSync\n // https://github.com/skbkontur/retail-ui/pull/3144#issuecomment-1535235366\n if (sync && React.version.search('18') === 0) {\n ReactDOM.flushSync(() => updateState(action));\n } else {\n updateState(action);\n }\n };\n\n private handleEffect = (effect: CustomComboBoxEffect<T>) => {\n effect(this.dispatch, this.getState, this.getProps, () => this);\n };\n\n private getProps = () => this.props;\n\n private getState = () => this.state;\n\n private handleValueChange = (value: T) => {\n this.dispatch({\n type: 'ValueChange',\n value,\n keepFocus: !this.isMobileLayout,\n });\n };\n\n private handleFocus = () => {\n if (this.focused) {\n return;\n }\n this.focused = true;\n this.dispatch({ type: 'Focus' });\n };\n\n private handleMobileClose = () => {\n this.handleInputBlur();\n };\n\n private handleClickOutside = (e: Event) => {\n fixClickFocusIE(e);\n this.handleBlur();\n };\n\n private handleBlur = () => {\n if (!this.focused) {\n if (this.state.opened) {\n this.close();\n }\n return;\n }\n\n this.focused = false;\n // workaround for the similar bug with focusout\n // in Firefox, Chrome and IE\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1363964\n globalObject.setTimeout(() => {\n this.dispatch({ type: 'Blur' });\n }, 0);\n };\n\n private handleInputBlur = () => {\n // If menu opened, RenderLayer is active and\n // it would call handleFocusOutside\n // In that way handleBlur would be called\n\n if (this.state.opened && !this.isMobileLayout) {\n return;\n }\n this.handleBlur();\n };\n\n private handleInputClick = () => {\n if (!this.cancelationToken) {\n this.dispatch({ type: 'InputClick' });\n }\n };\n}\n"],"mappings":"qSAAA,OAAOA,KAAK,MAA0C,OAAO;AAC7D,OAAOC,QAAQ,MAAM,WAAW;AAChC,SAASC,YAAY,QAAQ,0BAA0B;;;;;;;AAOvD,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,iBAAiB;AACjE,SAASC,eAAe,QAAQ,kCAAkC;AAClE,SAAsBC,aAAa,QAAQ,kBAAkB;AAC7D,SAASC,gBAAgB,QAAQ,6CAA6C;AAC9E,SAASC,QAAQ,QAAsB,oBAAoB;;;AAG3D;;EAEEC,0BAA0B;EAC1BC,0BAA0B;AACrB,+BAA+B;;AAEtC,SAASC,qBAAqB,QAAQ,uBAAuB;AAC7D,SAAqDC,OAAO,QAAQ,yBAAyB;AAC7F,SAASC,YAAY,QAAQ,gBAAgB;;;;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AAC,CAAC,CACnB,CACA,IAAI,CAACC,QAAQ,CACX,EACEmB,IAAI,EAAE,WAAW,EACjBmG,SAAS,EAATA,SAAS,EACTC,SAAS,EAATA,SAAS,EACTC,cAAc,EAAE,IAAI,CAACT,YAAY,CAACU,sCAAsC,CAC1E,CAAC,EACD,KACF,CAAC,CACH,CAAC,CAED;AACF;AACA,KAFE,CAAA1F,MAAA,CAGO2F,KAAK,GAAZ,SAAAA,MAAA,EAAe,CACb,IAAI,CAAC1H,QAAQ,CAAC,EAAEmB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAClC,CAAC,QAAA9C,cAAA,GAzPoC/B,KAAK,CAACqL,aAAa,GAAApJ,eAAA,CAC1CqJ,mBAAmB,GAAG,gBAAgB,EAAArJ,eAAA,CACtCsJ,WAAW,GAAG,gBAAgB,EAAAtJ,eAAA,MAAAD,MAAA,KAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","ReactDOM","globalObject","CancelationError","taskWithDelay","fixClickFocusIE","CommonWrapper","responsiveLayout","rootNode","ReactUIFeatureFlagsContext","getFullReactUIFlagsContext","ComboBoxRequestStatus","reducer","ComboBoxView","DELAY_BEFORE_SHOW_LOADER","LOADER_SHOW_TIME","DefaultState","inputChanged","editing","items","loading","opened","focused","textValue","repeatRequest","undefined","requestStatus","Unknown","size","CustomComboBox","_class","_CustomComboBox","_React$PureComponent","_this","_len","arguments","length","args","Array","_key","call","apply","concat","state","requestId","cancelationToken","cancelLoaderDelay","focus","props","disabled","input","inputLikeText","selectInputText","selectAll","blur","handleBlur","dispatch","action","sync","updateState","effects","nextState","setState","stateAndEffect","_ref","forEach","handleEffect","version","search","flushSync","effect","getState","getProps","handleValueChange","value","type","keepFocus","isMobileLayout","handleFocus","handleMobileClose","handleInputBlur","handleClickOutside","e","close","setTimeout","handleInputClick","_inheritsLoose","_proto","prototype","_search","_asyncToGenerator","_regeneratorRuntime","mark","_callee","query","_this2","getItems","cancelPromise","expectingId","wrap","_callee$","_context","prev","next","Promise","_","reject","loaderShowDelay","resolve","cancelLoader","race","sent","t0","code","finish","stop","_x","cancelSearch","open","render","_this3","viewProps","align","borderless","disablePortal","error","drawArrow","menuPos","menuAlign","placeholder","totalCount","warning","id","width","maxLength","maxMenuHeight","leftIcon","rightIcon","inputMode","onValueChange","onClickOutside","onFocus","onMobileClose","onFocusOutside","onInputBlur","onInputValueChange","onInputFocus","onInputClick","onInputKeyDown","event","persist","onMouseEnter","onMouseOver","onMouseLeave","renderItem","renderNotFound","itemWrapper","renderValue","renderTotalCount","renderAddButton","refInput","refMenu","menu","refInputLikeText","createElement","Consumer","flags","featureFlags","_extends","ref","setRootNode","componentDidMount","autoFocus","componentDidUpdate","prevProps","prevState","fixValueChange","comboBoxAllowValueChangeInEditingState","reset","PureComponent","__KONTUR_REACT_UI__","displayName"],"sources":["CustomComboBox.tsx"],"sourcesContent":["import React, { AriaAttributes, HTMLAttributes } from 'react';\nimport ReactDOM from 'react-dom';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport { Nullable } from '../../typings/utility-types';\nimport { Input, InputIconType } from '../../components/Input';\nimport { Menu } from '../Menu';\nimport { InputLikeText } from '../InputLikeText';\nimport { MenuItemState } from '../../components/MenuItem';\nimport { CancelationError, taskWithDelay } from '../../lib/utils';\nimport { fixClickFocusIE } from '../../lib/events/fixClickFocusIE';\nimport { CommonProps, CommonWrapper } from '../CommonWrapper';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { ComboBoxExtendedItem } from '../../components/ComboBox';\nimport { SizeProp } from '../../lib/types/props';\nimport {\n ReactUIFeatureFlags,\n ReactUIFeatureFlagsContext,\n getFullReactUIFlagsContext,\n} from '../../lib/featureFlagsContext';\n\nimport { ComboBoxRequestStatus } from './CustomComboBoxTypes';\nimport { CustomComboBoxAction, CustomComboBoxEffect, reducer } from './CustomComboBoxReducer';\nimport { ComboBoxView } from './ComboBoxView';\n\nexport * from './tids';\n\nexport interface CustomComboBoxProps<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 /**\n * Cостояние валидации при ошибке.\n */\n error?: boolean;\n maxLength?: number;\n /**\n * Позволяет вручную задать текущую позицию выпадающего окна\n */\n menuPos?: 'top' | 'bottom';\n menuAlign?: 'left' | 'right';\n drawArrow?: boolean;\n leftIcon?: InputIconType;\n rightIcon?: InputIconType;\n searchOnFocus?: boolean;\n onValueChange?: (value: T) => void;\n onInputValueChange?: (value: string) => Nullable<string> | void;\n onUnexpectedInput?: (value: string) => void | null | T;\n onFocus?: () => void;\n onBlur?: () => void;\n onMouseEnter?: (e: React.MouseEvent) => void;\n onMouseOver?: (e: React.MouseEvent) => void;\n onMouseLeave?: (e: React.MouseEvent) => void;\n onInputKeyDown?: (e: React.KeyboardEvent<HTMLElement>) => void;\n placeholder?: string;\n size?: SizeProp;\n totalCount?: number;\n value?: Nullable<T>;\n /**\n * Cостояние валидации при предупреждении.\n */\n warning?: boolean;\n width?: string | number;\n maxMenuHeight?: number | string;\n renderNotFound?: () => React.ReactNode;\n renderTotalCount?: (found: number, total: number) => React.ReactNode;\n renderItem: (item: T, state?: MenuItemState) => React.ReactNode;\n itemWrapper?: (item: T) => React.ComponentType;\n renderValue: (value: T) => React.ReactNode;\n renderAddButton?: (query?: string) => React.ReactNode;\n valueToString: (value: T) => string;\n itemToValue: (item: T) => string | number;\n getItems: (query: string) => Promise<Array<ComboBoxExtendedItem<T>>>;\n inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];\n}\n\nexport interface CustomComboBoxState<T> {\n editing: boolean;\n loading: boolean;\n opened: boolean;\n textValue: string;\n items: Nullable<Array<ComboBoxExtendedItem<T>>>;\n inputChanged: boolean;\n focused: boolean;\n repeatRequest: () => void;\n requestStatus: ComboBoxRequestStatus;\n}\n\nexport const DELAY_BEFORE_SHOW_LOADER = 300;\nexport const LOADER_SHOW_TIME = 1000;\n\nexport const DefaultState = {\n inputChanged: false,\n editing: false,\n items: null,\n loading: false,\n opened: false,\n focused: false,\n textValue: '',\n repeatRequest: () => undefined,\n requestStatus: ComboBoxRequestStatus.Unknown,\n size: 'small',\n};\n\n@responsiveLayout\n@rootNode\nexport class CustomComboBox<T> extends React.PureComponent<CustomComboBoxProps<T>, CustomComboBoxState<T>> {\n public static __KONTUR_REACT_UI__ = 'CustomComboBox';\n public static displayName = 'CustomComboBox';\n\n public state: CustomComboBoxState<T> = DefaultState;\n public input: Nullable<Input>;\n public menu: Nullable<Menu>;\n public inputLikeText: Nullable<InputLikeText>;\n public requestId = 0;\n public loaderShowDelay: Nullable<Promise<void>>;\n private focused = false;\n private cancelationToken: Nullable<(reason?: Error) => void> = null;\n private isMobileLayout!: boolean;\n private featureFlags!: ReactUIFeatureFlags;\n\n private reducer = reducer;\n public cancelLoaderDelay: () => void = () => null;\n\n /**\n * @public\n */\n public focus = () => {\n if (this.props.disabled) {\n return;\n }\n\n if (this.input) {\n this.input.focus();\n } else if (this.inputLikeText) {\n this.inputLikeText.focus();\n }\n };\n\n /**\n * @public\n */\n public selectInputText = () => {\n if (this.props.disabled) {\n return;\n }\n if (this.input) {\n this.input.selectAll();\n }\n };\n\n /**\n * @public\n */\n public blur = () => {\n if (this.props.disabled) {\n return;\n }\n\n this.handleBlur();\n };\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public async search(query: string = this.state.textValue) {\n const { getItems } = this.props;\n\n const cancelPromise: Promise<never> = new Promise((_, reject) => (this.cancelationToken = reject));\n this.requestId += 1;\n const expectingId = this.requestId;\n\n if (!this.loaderShowDelay) {\n this.loaderShowDelay = new Promise<void>((resolve) => {\n const cancelLoader = taskWithDelay(() => {\n this.dispatch({ type: 'RequestItems' });\n globalObject.setTimeout(resolve, LOADER_SHOW_TIME);\n }, DELAY_BEFORE_SHOW_LOADER);\n\n cancelPromise.catch(() => cancelLoader());\n\n this.cancelLoaderDelay = () => {\n cancelLoader();\n resolve();\n };\n });\n }\n\n try {\n const items = await Promise.race([getItems(query), cancelPromise]);\n if (this.state.loading) {\n await Promise.race([this.loaderShowDelay, cancelPromise]);\n }\n if (expectingId === this.requestId) {\n this.dispatch({\n type: 'ReceiveItems',\n items,\n });\n }\n } catch (error) {\n if (error && error.code === 'CancelationError') {\n this.dispatch({ type: 'CancelRequest' });\n } else if (expectingId === this.requestId) {\n this.dispatch({\n type: 'RequestFailure',\n repeatRequest: () => {\n this.search(query);\n if (this.input) {\n this.input.focus();\n }\n },\n });\n }\n } finally {\n if (expectingId === this.requestId) {\n if (!this.state.loading) {\n this.cancelLoaderDelay();\n }\n this.cancelationToken = null;\n this.loaderShowDelay = null;\n }\n }\n }\n\n /**\n * @public\n */\n public cancelSearch() {\n if (this.cancelationToken) {\n this.cancelationToken(new CancelationError());\n }\n }\n\n /**\n * @public\n */\n public open() {\n this.dispatch({ type: 'Open' });\n }\n\n /**\n * @public\n */\n public close() {\n this.dispatch({ type: 'Close' });\n }\n\n public render() {\n const viewProps = {\n align: this.props.align,\n borderless: this.props.borderless,\n disabled: this.props.disabled,\n disablePortal: this.props.disablePortal,\n editing: this.state.editing,\n error: this.props.error,\n items: this.state.items,\n loading: this.state.loading,\n opened: this.state.opened,\n drawArrow: this.props.drawArrow,\n menuPos: this.props.menuPos,\n menuAlign: this.props.menuAlign,\n placeholder: this.props.placeholder,\n size: this.props.size,\n textValue: this.state.textValue,\n totalCount: this.props.totalCount,\n value: this.props.value,\n warning: this.props.warning,\n 'aria-describedby': this.props['aria-describedby'],\n 'aria-label': this.props['aria-label'],\n id: this.props.id,\n width: this.props.width,\n maxLength: this.props.maxLength,\n maxMenuHeight: this.props.maxMenuHeight,\n leftIcon: this.props.leftIcon,\n rightIcon: this.props.rightIcon,\n inputMode: this.props.inputMode,\n\n onValueChange: this.handleValueChange,\n onClickOutside: this.handleClickOutside,\n onFocus: this.handleFocus,\n onMobileClose: this.handleMobileClose,\n onFocusOutside: this.handleBlur,\n onInputBlur: this.handleInputBlur,\n onInputValueChange: (value: string) => this.dispatch({ type: 'TextChange', value }),\n onInputFocus: this.handleFocus,\n onInputClick: this.handleInputClick,\n onInputKeyDown: (event: React.KeyboardEvent) => {\n event.persist();\n this.dispatch({ type: 'KeyPress', event });\n },\n onMouseEnter: this.props.onMouseEnter,\n onMouseOver: this.props.onMouseOver,\n onMouseLeave: this.props.onMouseLeave,\n renderItem: this.props.renderItem,\n renderNotFound: this.props.renderNotFound,\n itemWrapper: this.props.itemWrapper,\n renderValue: this.props.renderValue,\n renderTotalCount: this.props.renderTotalCount,\n renderAddButton: this.props.renderAddButton,\n repeatRequest: this.state.repeatRequest,\n requestStatus: this.state.requestStatus,\n\n refInput: (input: Nullable<Input>) => {\n this.input = input;\n },\n refMenu: (menu: Nullable<Menu>) => {\n this.menu = menu;\n },\n refInputLikeText: (inputLikeText: Nullable<InputLikeText>) => {\n this.inputLikeText = inputLikeText;\n },\n };\n\n return (\n <ReactUIFeatureFlagsContext.Consumer>\n {(flags) => {\n this.featureFlags = getFullReactUIFlagsContext(flags);\n return (\n <CommonWrapper {...this.props}>\n <ComboBoxView {...viewProps} size={this.props.size} ref={this.setRootNode} />\n </CommonWrapper>\n );\n }}\n </ReactUIFeatureFlagsContext.Consumer>\n );\n }\n\n public componentDidMount() {\n this.dispatch({ type: 'Mount' }, false);\n if (this.props.autoFocus) {\n this.focus();\n }\n }\n\n public componentDidUpdate(prevProps: CustomComboBoxProps<T>, prevState: CustomComboBoxState<T>) {\n if (prevState.editing && !this.state.editing) {\n this.handleBlur();\n }\n this.dispatch(\n {\n type: 'DidUpdate',\n prevProps,\n prevState,\n fixValueChange: this.featureFlags.comboBoxAllowValueChangeInEditingState,\n },\n false,\n );\n }\n\n /**\n * @public\n */\n public reset() {\n this.dispatch({ type: 'Reset' });\n }\n\n private dispatch = (action: CustomComboBoxAction<T>, sync = true) => {\n const updateState = (action: CustomComboBoxAction<T>) => {\n let effects: Array<CustomComboBoxEffect<T>>;\n let nextState: Pick<CustomComboBoxState<T>, never>;\n\n this.setState(\n (state) => {\n const stateAndEffect = this.reducer(state, this.props, action);\n [nextState, effects] = stateAndEffect instanceof Array ? stateAndEffect : [stateAndEffect, []];\n return nextState;\n },\n () => {\n effects.forEach(this.handleEffect);\n },\n );\n };\n\n // Auto-batching React@18 creates problems that are fixed with flushSync\n // https://github.com/skbkontur/retail-ui/pull/3144#issuecomment-1535235366\n if (sync && React.version.search('18') === 0) {\n ReactDOM.flushSync(() => updateState(action));\n } else {\n updateState(action);\n }\n };\n\n private handleEffect = (effect: CustomComboBoxEffect<T>) => {\n effect(this.dispatch, this.getState, this.getProps, () => this);\n };\n\n private getProps = () => this.props;\n\n private getState = () => this.state;\n\n private handleValueChange = (value: T) => {\n this.dispatch({\n type: 'ValueChange',\n value,\n keepFocus: !this.isMobileLayout,\n });\n };\n\n private handleFocus = () => {\n if (this.focused) {\n return;\n }\n this.focused = true;\n this.dispatch({ type: 'Focus' });\n };\n\n private handleMobileClose = () => {\n this.handleInputBlur();\n };\n\n private handleClickOutside = (e: Event) => {\n fixClickFocusIE(e);\n this.handleBlur();\n };\n\n private handleBlur = () => {\n if (!this.focused) {\n if (this.state.opened) {\n this.close();\n }\n return;\n }\n\n this.focused = false;\n // workaround for the similar bug with focusout\n // in Firefox, Chrome and IE\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1363964\n globalObject.setTimeout(() => {\n this.dispatch({ type: 'Blur' });\n }, 0);\n };\n\n private handleInputBlur = () => {\n // If menu opened, RenderLayer is active and\n // it would call handleFocusOutside\n // In that way handleBlur would be called\n\n if (this.state.opened && !this.isMobileLayout) {\n return;\n }\n this.handleBlur();\n };\n\n private handleInputClick = () => {\n if (!this.cancelationToken) {\n this.dispatch({ type: 'InputClick' });\n }\n };\n}\n"],"mappings":"qSAAA,OAAOA,KAAK,MAA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AA,EAA2B,CACzB,IAAI,CAACnH,QAAQ,CAAC,EAAEmB,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CACvC,IAAI,IAAI,CAAC3B,KAAK,CAAC4H,SAAS,EAAE,CACxB,IAAI,CAAC7H,KAAK,CAAC,CAAC,CACd,CACF,CAAC,CAAAwC,MAAA,CAEMsF,kBAAkB,GAAzB,SAAAA,mBAA0BC,SAAiC,EAAEC,SAAiC,EAAE,CAC9F,IAAIA,SAAS,CAAC7J,OAAO,IAAI,CAAC,IAAI,CAACyB,KAAK,CAACzB,OAAO,EAAE,CAC5C,IAAI,CAACqC,UAAU,CAAC,CAAC,CACnB,CACA,IAAI,CAACC,QAAQ,CACX,EACEmB,IAAI,EAAE,WAAW,EACjBmG,SAAS,EAATA,SAAS,EACTC,SAAS,EAATA,SAAS,EACTC,cAAc,EAAE,IAAI,CAACT,YAAY,CAACU,sCAAsC,CAC1E,CAAC,EACD,KACF,CAAC,CACH,CAAC,CAED;AACF;AACA,KAFE,CAAA1F,MAAA,CAGO2F,KAAK,GAAZ,SAAAA,MAAA,EAAe,CACb,IAAI,CAAC1H,QAAQ,CAAC,EAAEmB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAClC,CAAC,QAAA9C,cAAA,GAzPoC7B,KAAK,CAACmL,aAAa,GAAApJ,eAAA,CAC1CqJ,mBAAmB,GAAG,gBAAgB,EAAArJ,eAAA,CACtCsJ,WAAW,GAAG,gBAAgB,EAAAtJ,eAAA,MAAAD,MAAA,KAAAA,MAAA","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ import { CommonProps } from '../CommonWrapper';
|
|
|
8
8
|
import { ComboBoxExtendedItem } from '../../components/ComboBox';
|
|
9
9
|
import { SizeProp } from '../../lib/types/props';
|
|
10
10
|
import { ComboBoxRequestStatus } from './CustomComboBoxTypes';
|
|
11
|
+
export * from './tids';
|
|
11
12
|
export interface CustomComboBoxProps<T> extends Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>, Pick<HTMLAttributes<HTMLElement>, 'id'>, CommonProps {
|
|
12
13
|
align?: 'left' | 'center' | 'right';
|
|
13
14
|
autoFocus?: boolean;
|
|
@@ -83,9 +84,6 @@ export declare const DefaultState: {
|
|
|
83
84
|
requestStatus: ComboBoxRequestStatus;
|
|
84
85
|
size: string;
|
|
85
86
|
};
|
|
86
|
-
export declare const CustomComboBoxDataTids: {
|
|
87
|
-
readonly comboBoxView: "ComboBoxView__root";
|
|
88
|
-
};
|
|
89
87
|
export declare class CustomComboBox<T> extends React.PureComponent<CustomComboBoxProps<T>, CustomComboBoxState<T>> {
|
|
90
88
|
static __KONTUR_REACT_UI__: string;
|
|
91
89
|
static displayName: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
|
|
3
|
+
const FIREFOX_REGEXP = /.*firefox.*/i;
|
|
4
|
+
|
|
5
|
+
kind('ComboBoxView', () => {
|
|
6
|
+
story('InputLikeText', ({ setStoryParameters }) => {
|
|
7
|
+
setStoryParameters({
|
|
8
|
+
skip: {
|
|
9
|
+
'story-skip-0': {
|
|
10
|
+
in: FIREFOX_REGEXP,
|
|
11
|
+
tests: ['focused first element'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('plain', async (context) => {
|
|
17
|
+
await context.matchImage(await context.takeScreenshot(), 'plain');
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test('focused first element', async (context) => {
|
|
21
|
+
await context.webdriver
|
|
22
|
+
.actions({
|
|
23
|
+
bridge: true,
|
|
24
|
+
})
|
|
25
|
+
.click(context.webdriver.findElement({ css: '[data-comp-name~="InputLikeText"]' }))
|
|
26
|
+
.perform();
|
|
27
|
+
await context.matchImage(await context.takeScreenshot(), 'focused first element');
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CustomComboBoxDataTids","comboBoxView"],"sources":["tids.ts"],"sourcesContent":["export const CustomComboBoxDataTids = {\n comboBoxView: 'ComboBoxView__root',\n} as const;\n"],"mappings":"AAAA,OAAO,IAAMA,sBAAsB,GAAG;EACpCC,YAAY,EAAE;AAChB,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
|
|
3
|
+
kind('FileUploaderFile', () => {
|
|
4
|
+
story('FileUploaderFileWithValidationError', ({ setStoryParameters }) => {
|
|
5
|
+
setStoryParameters({
|
|
6
|
+
skip: {
|
|
7
|
+
'story-skip-0': {
|
|
8
|
+
in: /^(?!\b(chrome2022)\b)/,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('hover', async (context) => {
|
|
14
|
+
await context.webdriver
|
|
15
|
+
.actions({
|
|
16
|
+
bridge: true,
|
|
17
|
+
})
|
|
18
|
+
.move({
|
|
19
|
+
origin: context.webdriver.findElement({ css: '[data-tid="FileUploader__fileName"]' }),
|
|
20
|
+
})
|
|
21
|
+
.perform();
|
|
22
|
+
await context.matchImage(await context.takeScreenshot(), 'hover');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
|
|
3
|
+
import { delay } from '../../../lib/delay';
|
|
4
|
+
|
|
5
|
+
const testScrollLockUnlock = () => {
|
|
6
|
+
test('scroll, lock, unlock', async (context) => {
|
|
7
|
+
const toggle = async () => {
|
|
8
|
+
await context.webdriver
|
|
9
|
+
.actions({
|
|
10
|
+
bridge: true,
|
|
11
|
+
})
|
|
12
|
+
.click(context.webdriver.findElement({ css: '[data-tid~="toggle-lock"]' }))
|
|
13
|
+
.perform();
|
|
14
|
+
await delay(1000);
|
|
15
|
+
};
|
|
16
|
+
await context.webdriver.executeScript(function () {
|
|
17
|
+
const scrollContainer = window.document.documentElement;
|
|
18
|
+
scrollContainer.scrollTop = scrollContainer.scrollHeight;
|
|
19
|
+
});
|
|
20
|
+
const scrolled = await context.webdriver.takeScreenshot();
|
|
21
|
+
await toggle();
|
|
22
|
+
const locked = await context.webdriver.takeScreenshot();
|
|
23
|
+
await toggle();
|
|
24
|
+
const unlocked = await context.webdriver.takeScreenshot();
|
|
25
|
+
await context.matchImages({ scrolled, locked, unlocked });
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
kind('HideBodyVerticalScroll', () => {
|
|
30
|
+
story('Sample', ({ setStoryParameters }) => {
|
|
31
|
+
setStoryParameters({
|
|
32
|
+
skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } },
|
|
33
|
+
});
|
|
34
|
+
testScrollLockUnlock();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
story('WithScrollableContent', ({ setStoryParameters }) => {
|
|
38
|
+
setStoryParameters({
|
|
39
|
+
skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } },
|
|
40
|
+
});
|
|
41
|
+
testScrollLockUnlock();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
story('WithHTMLOverflowYScroll', ({ setStoryParameters }) => {
|
|
45
|
+
setStoryParameters({
|
|
46
|
+
skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } },
|
|
47
|
+
});
|
|
48
|
+
testScrollLockUnlock();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
story('Multiple_WithScrollableContent', ({ setStoryParameters }) => {
|
|
52
|
+
setStoryParameters({
|
|
53
|
+
skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } },
|
|
54
|
+
});
|
|
55
|
+
testScrollLockUnlock();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
story('DisorderlyUnmountAndResize', ({ setStoryParameters }) => {
|
|
59
|
+
setStoryParameters({
|
|
60
|
+
skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } },
|
|
61
|
+
});
|
|
62
|
+
test('idle, hide, show, resize', async (context) => {
|
|
63
|
+
const toggle = async (index: number) => {
|
|
64
|
+
await context.webdriver.findElement({ css: `div:nth-of-type(${index}) [data-tid~="toggle-lock"]` }).click();
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const idle = await context.webdriver.takeScreenshot();
|
|
68
|
+
|
|
69
|
+
await toggle(1);
|
|
70
|
+
await toggle(2);
|
|
71
|
+
const hide = await context.webdriver.takeScreenshot();
|
|
72
|
+
|
|
73
|
+
await toggle(1);
|
|
74
|
+
await toggle(2);
|
|
75
|
+
const show = await context.webdriver.takeScreenshot();
|
|
76
|
+
|
|
77
|
+
await context.webdriver.findElement({ css: '[data-tid="resize"]' }).click();
|
|
78
|
+
const resize = await context.webdriver.takeScreenshot();
|
|
79
|
+
|
|
80
|
+
await context.matchImages({ idle, hide, show, resize });
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
|
|
3
|
+
kind('Menu', () => {
|
|
4
|
+
story('WithMaxHeight', ({ setStoryParameters }) => {
|
|
5
|
+
setStoryParameters({
|
|
6
|
+
captureElement: '[data-tid="menu-container"',
|
|
7
|
+
skip: {
|
|
8
|
+
flacky: { in: ['chrome2022'] },
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test('idle', async (context) => {
|
|
13
|
+
await context.matchImage(await context.takeScreenshot(), 'idle');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('moved up from top to the last Item', async (context) => {
|
|
17
|
+
await context.webdriver
|
|
18
|
+
.actions({
|
|
19
|
+
bridge: true,
|
|
20
|
+
})
|
|
21
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
22
|
+
.perform();
|
|
23
|
+
await context.matchImage(await context.takeScreenshot(), 'moved up from top to the last Item');
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('moved up from bottom to the first Item', async (context) => {
|
|
27
|
+
await context.webdriver
|
|
28
|
+
.actions({
|
|
29
|
+
bridge: true,
|
|
30
|
+
})
|
|
31
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
32
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
33
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
34
|
+
.perform();
|
|
35
|
+
await context.matchImage(await context.takeScreenshot(), 'moved up from bottom to the first Item');
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
test('moved down from top to the last Item', async (context) => {
|
|
39
|
+
await context.webdriver
|
|
40
|
+
.actions({
|
|
41
|
+
bridge: true,
|
|
42
|
+
})
|
|
43
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
44
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
45
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
46
|
+
.click(context.webdriver.findElement({ css: '#move-down' }))
|
|
47
|
+
.click(context.webdriver.findElement({ css: '#move-down' }))
|
|
48
|
+
.perform();
|
|
49
|
+
await context.matchImage(await context.takeScreenshot(), 'moved down from top to the last Item');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test('moved down from bottom to the first Item', async (context) => {
|
|
53
|
+
await context.webdriver
|
|
54
|
+
.actions({
|
|
55
|
+
bridge: true,
|
|
56
|
+
})
|
|
57
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
58
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
59
|
+
.click(context.webdriver.findElement({ css: '#move-up' }))
|
|
60
|
+
.click(context.webdriver.findElement({ css: '#move-down' }))
|
|
61
|
+
.click(context.webdriver.findElement({ css: '#move-down' }))
|
|
62
|
+
.click(context.webdriver.findElement({ css: '#move-down' }))
|
|
63
|
+
.perform();
|
|
64
|
+
await context.matchImage(await context.takeScreenshot(), 'moved down from bottom to the first Item');
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
story('WithDisabledMenuItem', ({ setStoryParameters }) => {
|
|
69
|
+
setStoryParameters({
|
|
70
|
+
skip: {
|
|
71
|
+
'hover does not work in chrome': { in: ['chrome2022', 'chrome2022Dark'], tests: ['mouseenter'] },
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('mouseenter', async (context) => {
|
|
76
|
+
await context.webdriver
|
|
77
|
+
.actions({
|
|
78
|
+
bridge: true,
|
|
79
|
+
})
|
|
80
|
+
.click(context.webdriver.findElement({ css: '[data-tid="menuitem-notdisabled"]' }))
|
|
81
|
+
.perform();
|
|
82
|
+
await context.matchImage(await context.takeScreenshot(), 'mouseenter');
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
story('WithItemsWithIconsWithoutTextAlignment', ({ setStoryParameters }) => {
|
|
86
|
+
setStoryParameters({
|
|
87
|
+
skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } },
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -16,14 +16,12 @@ import { createPropsGetter } from "../../../lib/createPropsGetter";
|
|
|
16
16
|
import { Menu } from "../../Menu";
|
|
17
17
|
import { isValidPositions } from "../validatePositions";
|
|
18
18
|
import { styles } from "../PopupMenu.styles";
|
|
19
|
+
import { PopupMenuDataTids } from "../tids";
|
|
20
|
+
export * from "../tids";
|
|
19
21
|
export var PopupMenuType = {
|
|
20
22
|
Dropdown: 'dropdown',
|
|
21
23
|
Tooltip: 'tooltip'
|
|
22
24
|
};
|
|
23
|
-
export var PopupMenuDataTids = {
|
|
24
|
-
root: 'PopupMenu__root',
|
|
25
|
-
caption: 'PopupMenu__caption'
|
|
26
|
-
};
|
|
27
25
|
var Positions = ['top left', 'top center', 'top right', 'right top', 'right middle', 'right bottom', 'bottom left', 'bottom center', 'bottom right', 'left top', 'left middle', 'left bottom'];
|
|
28
26
|
export var PopupMenu = rootNode(_class = responsiveLayout(_class = (_PopupMenu = /*#__PURE__*/function (_React$Component) {
|
|
29
27
|
function PopupMenu() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","globalObject","getRandomID","isKeyArrowVertical","isKeyEnter","isKeyEscape","isKeySpace","someKeys","ThemeContext","ThemeFactory","Popup","PopupIds","RenderLayer","CommonWrapper","responsiveLayout","rootNode","createPropsGetter","Menu","isValidPositions","styles","PopupMenuType","Dropdown","Tooltip","PopupMenuDataTids","root","caption","Positions","PopupMenu","_class","_PopupMenu","_React$Component","_this","_len","arguments","length","args","Array","_key","call","apply","concat","rootId","getProps","defaultProps","state","menuVisible","firstItemShouldBeSelected","captionWrapper","savedFocusableElement","menu","open","showMenu","close","hideMenu","menuRef","element","handleOpen","focus","passPropsToCaption","_this$props$popupMenu","cloneElement","id","props","popupMenuId","renderCaption","opened","openMenu","closeMenu","toggleMenu","createElement","className","ref","onClick","handleCaptionClick","onKeyDown","handleCaptionKeyDown","hideMenuWithoutFocusing","saveFocus","setState","handleChangeMenuVisible","restoreFocus","e","preventDefault","handleKeyDown","document","activeElement","focusShouldBeRestored","onOpen","onClose","onChangeMenuState","handleItemSelection","event","isDefaultPrevented","type","_inheritsLoose","_proto","prototype","render","_this2","Consumer","theme","Provider","value","create","menuOffsetY","popupMenuMenuOffsetY","renderMain","_this$props$popupMenu2","_this$getProps","popupHasPin","disableAnimations","_extends","rootNodeRef","setRootNode","onClickOutside","onFocusOutside","active","container","style","width","children","anchorElement","hasShadow","margin","popupMargin","hasPin","pinOffset","popupPinOffset","positions","getPositions","mobileOnCloseRequest","isMobileLayout","menuWidth","maxHeight","menuMaxHeight","onItemClick","preventIconsOffset","cyclicSelection","initialSelectedItemIndex","header","footer","Component","__KONTUR_REACT_UI__","displayName","Type"],"sources":["PopupMenu.tsx"],"sourcesContent":["import React, { AriaAttributes, HTMLAttributes } from 'react';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport { getRandomID } from '../../lib/utils';\nimport { HTMLProps } from '../../typings/html';\nimport {\n isKeyArrowVertical,\n isKeyEnter,\n isKeyEscape,\n isKeySpace,\n someKeys,\n} from '../../lib/events/keyboard/identifiers';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory';\nimport { Popup, PopupIds, PopupPositionsType } from '../Popup';\nimport { RenderLayer } from '../RenderLayer';\nimport { Nullable } from '../../typings/utility-types';\nimport { CommonProps, CommonWrapper } from '../CommonWrapper';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { Menu, MenuProps } from '../Menu';\n\nimport { isValidPositions } from './validatePositions';\nimport { styles } from './PopupMenu.styles';\n\nexport interface PopupMenuCaptionProps {\n opened: boolean;\n openMenu: (firstItemShouldBeSelected?: boolean) => void;\n closeMenu: (restoreFocus?: boolean) => void;\n toggleMenu: () => void;\n}\n\nexport interface PopupMenuProps\n extends CommonProps,\n Pick<MenuProps, 'preventIconsOffset'>,\n Pick<HTMLAttributes<HTMLElement>, 'id'>,\n Pick<AriaAttributes, 'aria-label'> {\n children?: React.ReactNode;\n /** Максимальная высота меню */\n menuMaxHeight?: number | string;\n /** Ширина меню */\n menuWidth?: number | string;\n /** Ширина контейнера и caption */\n width?: React.CSSProperties['width'];\n\n /**\n * Элемент или функция возвращающая элемент,\n * если передана, используется вместо ```caption```,\n * в таком случае управлять открытием и закрытием меню\n * придется в этой функции\n */\n caption: React.ReactNode | ((props: PopupMenuCaptionProps) => React.ReactNode);\n\n header?: React.ReactNode;\n footer?: React.ReactNode;\n\n /** Массив разрешенных положений меню относительно caption'а. */\n positions?: PopupPositionsType[];\n /** Колбэк, вызываемый после открытия/закрытия меню */\n onChangeMenuState?: (isOpened: boolean, restoreFocus: boolean) => void;\n /** Пропсы, передающиеся в Popup */\n popupHasPin?: boolean;\n popupMargin?: number;\n popupPinOffset?: number;\n type?: 'dropdown' | 'tooltip';\n disableAnimations?: boolean;\n /** Действие при открытии меню */\n onOpen?: () => void;\n /** Действие при закрытии меню */\n onClose?: () => void;\n /**\n * Позволяет задать `id` выпадающему меню.\n *\n * Это может пригодиться при реализации a11y. Например, для того, чтобы связать `aria-controls` с выпадающим меню.\n */\n popupMenuId?: HTMLProps['id'];\n}\n\ninterface PopupMenuState {\n menuVisible: boolean;\n firstItemShouldBeSelected?: boolean;\n}\n\nexport const PopupMenuType = {\n Dropdown: 'dropdown',\n Tooltip: 'tooltip',\n} as const;\n\nexport const PopupMenuDataTids = {\n root: 'PopupMenu__root',\n caption: 'PopupMenu__caption',\n} as const;\n\nconst Positions: PopupPositionsType[] = [\n 'top left',\n 'top center',\n 'top right',\n 'right top',\n 'right middle',\n 'right bottom',\n 'bottom left',\n 'bottom center',\n 'bottom right',\n 'left top',\n 'left middle',\n 'left bottom',\n];\n\ntype DefaultProps = Required<Pick<PopupMenuProps, 'positions' | 'type' | 'popupHasPin' | 'disableAnimations'>>;\n\n@rootNode\n@responsiveLayout\nexport class PopupMenu extends React.Component<PopupMenuProps, PopupMenuState> {\n public static __KONTUR_REACT_UI__ = 'PopupMenu';\n public static displayName = 'PopupMenu';\n\n private isMobileLayout!: boolean;\n private rootId = PopupIds.root + getRandomID();\n\n public static defaultProps: DefaultProps = {\n positions: Positions,\n type: PopupMenuType.Tooltip,\n popupHasPin: true,\n disableAnimations: false,\n };\n\n private getProps = createPropsGetter(PopupMenu.defaultProps);\n\n public static Type = PopupMenuType;\n\n public state = {\n menuVisible: false,\n firstItemShouldBeSelected: false,\n };\n\n private captionWrapper: HTMLSpanElement | null = null;\n private savedFocusableElement: HTMLElement | null = null;\n private menu: Nullable<Menu> = null;\n private setRootNode!: TSetRootNode;\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n return (\n <ThemeContext.Provider\n value={ThemeFactory.create(\n {\n menuOffsetY: theme.popupMenuMenuOffsetY,\n },\n theme,\n )}\n >\n {this.renderMain()}\n </ThemeContext.Provider>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const { popupHasPin, disableAnimations } = this.getProps();\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n <RenderLayer\n onClickOutside={this.hideMenuWithoutFocusing}\n onFocusOutside={this.hideMenuWithoutFocusing}\n active={this.state.menuVisible}\n >\n <div data-tid={PopupMenuDataTids.root} className={styles.container()} style={{ width: this.props.width }}>\n {this.renderCaption()}\n {this.captionWrapper && this.props.children && (\n <Popup\n id={this.props.popupMenuId ?? this.rootId}\n anchorElement={this.captionWrapper}\n opened={this.state.menuVisible}\n hasShadow\n margin={this.props.popupMargin}\n hasPin={popupHasPin}\n pinOffset={this.props.popupPinOffset}\n positions={this.getPositions()}\n disableAnimations={disableAnimations}\n onOpen={this.handleOpen}\n mobileOnCloseRequest={this.hideMenu}\n width={this.isMobileLayout ? 'auto' : this.props.menuWidth || 'auto'}\n >\n <Menu\n maxHeight={this.isMobileLayout ? 'none' : this.props.menuMaxHeight || 'none'}\n onKeyDown={this.handleKeyDown}\n onItemClick={this.handleItemSelection}\n preventIconsOffset={this.props.preventIconsOffset}\n cyclicSelection={false}\n ref={this.menuRef}\n initialSelectedItemIndex={this.state.firstItemShouldBeSelected ? 0 : -1}\n header={this.props.header}\n footer={this.props.footer}\n >\n {this.props.children}\n </Menu>\n </Popup>\n )}\n </div>\n </RenderLayer>\n </CommonWrapper>\n );\n }\n\n public open = (): void => this.showMenu();\n public close = (): void => this.hideMenu();\n\n private menuRef = (element: Nullable<Menu>) => (this.menu = element);\n\n private handleOpen = () => {\n if (this.menu) {\n this.menu.focus();\n }\n };\n\n private passPropsToCaption = (caption: React.ReactNode) => {\n if (typeof caption === 'string' || typeof caption === 'number') {\n return caption;\n }\n\n return React.cloneElement(caption as React.ReactElement, {\n id: this.props.id,\n 'aria-controls': this.props.popupMenuId ?? this.rootId,\n 'aria-expanded': this.state.menuVisible ? 'true' : 'false',\n 'aria-label': this.props['aria-label'],\n });\n };\n\n private renderCaption = () => {\n if (typeof this.props.caption === 'function') {\n const caption = this.props.caption({\n opened: this.state.menuVisible,\n openMenu: this.showMenu,\n closeMenu: this.hideMenu,\n toggleMenu: this.toggleMenu,\n });\n\n return (\n <span\n data-tid={PopupMenuDataTids.caption}\n className={styles.caption()}\n ref={(element) => (this.captionWrapper = element)}\n >\n {this.passPropsToCaption(caption)}\n </span>\n );\n }\n\n return (\n <span\n data-tid={PopupMenuDataTids.caption}\n onClick={this.handleCaptionClick}\n onKeyDown={this.handleCaptionKeyDown}\n ref={(element) => (this.captionWrapper = element)}\n className={styles.caption()}\n >\n {this.passPropsToCaption(this.props.caption)}\n </span>\n );\n };\n\n private hideMenuWithoutFocusing = () => this.hideMenu();\n\n private getPositions(): Readonly<PopupPositionsType[]> {\n const positions = this.getProps().positions;\n if (positions && isValidPositions(positions)) {\n return positions;\n }\n\n return Positions;\n }\n\n private showMenu = (firstItemShouldBeSelected?: boolean): void => {\n this.saveFocus();\n this.setState(\n {\n menuVisible: true,\n firstItemShouldBeSelected,\n },\n () => {\n this.handleChangeMenuVisible(false);\n },\n );\n };\n\n private hideMenu = (restoreFocus?: boolean): void => {\n this.setState(\n {\n menuVisible: false,\n firstItemShouldBeSelected: false,\n },\n () => {\n this.handleChangeMenuVisible(!!restoreFocus);\n },\n );\n };\n\n private toggleMenu = (): void => {\n this.state.menuVisible ? this.hideMenu() : this.showMenu();\n };\n\n private handleCaptionClick = (): void => {\n this.toggleMenu();\n };\n\n private handleCaptionKeyDown = (e: React.KeyboardEvent<HTMLElement>): void => {\n if (someKeys(isKeyEnter, isKeySpace, isKeyArrowVertical)(e)) {\n e.preventDefault();\n this.showMenu(true);\n }\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (isKeyEscape(e)) {\n const restoreFocus = true;\n this.hideMenu(restoreFocus);\n }\n };\n\n private saveFocus = (): void => {\n if (globalObject.document) {\n this.savedFocusableElement = globalObject.document.activeElement as HTMLElement;\n }\n };\n\n private restoreFocus = (): void => {\n if (this.savedFocusableElement) {\n this.savedFocusableElement.focus();\n this.savedFocusableElement = null;\n }\n };\n\n private handleChangeMenuVisible = (focusShouldBeRestored: boolean): void => {\n if (focusShouldBeRestored) {\n this.restoreFocus();\n }\n\n if (this.state.menuVisible && this.props.onOpen) {\n this.props.onOpen();\n }\n\n if (!this.state.menuVisible && this.props.onClose) {\n this.props.onClose();\n }\n\n if (typeof this.props.onChangeMenuState === 'function') {\n this.props.onChangeMenuState(this.state.menuVisible, focusShouldBeRestored);\n }\n };\n\n private handleItemSelection = (event: React.SyntheticEvent<HTMLElement>): void => {\n if (event.isDefaultPrevented()) {\n return;\n }\n\n if (event.type === 'keydown') {\n event.preventDefault();\n }\n\n const restoreFocus = event.type === 'keydown';\n this.hideMenu(restoreFocus);\n };\n}\n"],"mappings":"uJAAA,OAAOA,KAAK,MAA0C,OAAO;AAC7D,SAASC,YAAY,QAAQ,0BAA0B;;AAEvD,SAASC,WAAW,QAAQ,iBAAiB;;AAE7C;EACEC,kBAAkB;EAClBC,UAAU;EACVC,WAAW;EACXC,UAAU;EACVC,QAAQ;AACH,uCAAuC;AAC9C,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,KAAK,EAAEC,QAAQ,QAA4B,UAAU;AAC9D,SAASC,WAAW,QAAQ,gBAAgB;;AAE5C,SAAsBC,aAAa,QAAQ,kBAAkB;AAC7D,SAASC,gBAAgB,QAAQ,6CAA6C;AAC9E,SAASC,QAAQ,QAAsB,oBAAoB;AAC3D,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,IAAI,QAAmB,SAAS;;AAEzC,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,MAAM,QAAQ,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACM,CACA,CAAC,CAEpB,CAAC,CAAAzB,MAAA,CA6DOkC,YAAY,GAApB,SAAAA,aAAA,EAAuD,CACrD,IAAMD,SAAS,GAAG,IAAI,CAACtF,QAAQ,CAAC,CAAC,CAACsF,SAAS,CAC3C,IAAIA,SAAS,IAAI9G,gBAAgB,CAAC8G,SAAS,CAAC,EAAE,CAC5C,OAAOA,SAAS,CAClB,CAEA,OAAOtG,SAAS,CAClB,CAAC,QAAAC,SAAA,GAlK4B3B,KAAK,CAAC6I,SAAS,GAAAhH,UAAA,CAC9BiH,mBAAmB,GAAG,WAAW,EAAAjH,UAAA,CACjCkH,WAAW,GAAG,WAAW,EAAAlH,UAAA,CAKzBc,YAAY,GAAiB,EACzCqF,SAAS,EAAEtG,SAAS,EACpBmE,IAAI,EAAEzE,aAAa,CAACE,OAAO,EAC3BuF,WAAW,EAAE,IAAI,EACjBC,iBAAiB,EAAE,KAAK,CAC1B,CAAC,EAAAjF,UAAA,CAIamH,IAAI,GAAG5H,aAAa,EAAAS,UAAA,MAAAD,MAAA,KAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","globalObject","getRandomID","isKeyArrowVertical","isKeyEnter","isKeyEscape","isKeySpace","someKeys","ThemeContext","ThemeFactory","Popup","PopupIds","RenderLayer","CommonWrapper","responsiveLayout","rootNode","createPropsGetter","Menu","isValidPositions","styles","PopupMenuDataTids","PopupMenuType","Dropdown","Tooltip","Positions","PopupMenu","_class","_PopupMenu","_React$Component","_this","_len","arguments","length","args","Array","_key","call","apply","concat","rootId","root","getProps","defaultProps","state","menuVisible","firstItemShouldBeSelected","captionWrapper","savedFocusableElement","menu","open","showMenu","close","hideMenu","menuRef","element","handleOpen","focus","passPropsToCaption","caption","_this$props$popupMenu","cloneElement","id","props","popupMenuId","renderCaption","opened","openMenu","closeMenu","toggleMenu","createElement","className","ref","onClick","handleCaptionClick","onKeyDown","handleCaptionKeyDown","hideMenuWithoutFocusing","saveFocus","setState","handleChangeMenuVisible","restoreFocus","e","preventDefault","handleKeyDown","document","activeElement","focusShouldBeRestored","onOpen","onClose","onChangeMenuState","handleItemSelection","event","isDefaultPrevented","type","_inheritsLoose","_proto","prototype","render","_this2","Consumer","theme","Provider","value","create","menuOffsetY","popupMenuMenuOffsetY","renderMain","_this$props$popupMenu2","_this$getProps","popupHasPin","disableAnimations","_extends","rootNodeRef","setRootNode","onClickOutside","onFocusOutside","active","container","style","width","children","anchorElement","hasShadow","margin","popupMargin","hasPin","pinOffset","popupPinOffset","positions","getPositions","mobileOnCloseRequest","isMobileLayout","menuWidth","maxHeight","menuMaxHeight","onItemClick","preventIconsOffset","cyclicSelection","initialSelectedItemIndex","header","footer","Component","__KONTUR_REACT_UI__","displayName","Type"],"sources":["PopupMenu.tsx"],"sourcesContent":["import React, { AriaAttributes, HTMLAttributes } from 'react';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport { getRandomID } from '../../lib/utils';\nimport { HTMLProps } from '../../typings/html';\nimport {\n isKeyArrowVertical,\n isKeyEnter,\n isKeyEscape,\n isKeySpace,\n someKeys,\n} from '../../lib/events/keyboard/identifiers';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory';\nimport { Popup, PopupIds, PopupPositionsType } from '../Popup';\nimport { RenderLayer } from '../RenderLayer';\nimport { Nullable } from '../../typings/utility-types';\nimport { CommonProps, CommonWrapper } from '../CommonWrapper';\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { Menu, MenuProps } from '../Menu';\n\nimport { isValidPositions } from './validatePositions';\nimport { styles } from './PopupMenu.styles';\nimport { PopupMenuDataTids } from './tids';\n\nexport * from './tids';\n\nexport interface PopupMenuCaptionProps {\n opened: boolean;\n openMenu: (firstItemShouldBeSelected?: boolean) => void;\n closeMenu: (restoreFocus?: boolean) => void;\n toggleMenu: () => void;\n}\n\nexport interface PopupMenuProps\n extends CommonProps,\n Pick<MenuProps, 'preventIconsOffset'>,\n Pick<HTMLAttributes<HTMLElement>, 'id'>,\n Pick<AriaAttributes, 'aria-label'> {\n children?: React.ReactNode;\n /** Максимальная высота меню */\n menuMaxHeight?: number | string;\n /** Ширина меню */\n menuWidth?: number | string;\n /** Ширина контейнера и caption */\n width?: React.CSSProperties['width'];\n\n /**\n * Элемент или функция возвращающая элемент,\n * если передана, используется вместо ```caption```,\n * в таком случае управлять открытием и закрытием меню\n * придется в этой функции\n */\n caption: React.ReactNode | ((props: PopupMenuCaptionProps) => React.ReactNode);\n\n header?: React.ReactNode;\n footer?: React.ReactNode;\n\n /** Массив разрешенных положений меню относительно caption'а. */\n positions?: PopupPositionsType[];\n /** Колбэк, вызываемый после открытия/закрытия меню */\n onChangeMenuState?: (isOpened: boolean, restoreFocus: boolean) => void;\n /** Пропсы, передающиеся в Popup */\n popupHasPin?: boolean;\n popupMargin?: number;\n popupPinOffset?: number;\n type?: 'dropdown' | 'tooltip';\n disableAnimations?: boolean;\n /** Действие при открытии меню */\n onOpen?: () => void;\n /** Действие при закрытии меню */\n onClose?: () => void;\n /**\n * Позволяет задать `id` выпадающему меню.\n *\n * Это может пригодиться при реализации a11y. Например, для того, чтобы связать `aria-controls` с выпадающим меню.\n */\n popupMenuId?: HTMLProps['id'];\n}\n\ninterface PopupMenuState {\n menuVisible: boolean;\n firstItemShouldBeSelected?: boolean;\n}\n\nexport const PopupMenuType = {\n Dropdown: 'dropdown',\n Tooltip: 'tooltip',\n} as const;\n\nconst Positions: PopupPositionsType[] = [\n 'top left',\n 'top center',\n 'top right',\n 'right top',\n 'right middle',\n 'right bottom',\n 'bottom left',\n 'bottom center',\n 'bottom right',\n 'left top',\n 'left middle',\n 'left bottom',\n];\n\ntype DefaultProps = Required<Pick<PopupMenuProps, 'positions' | 'type' | 'popupHasPin' | 'disableAnimations'>>;\n\n@rootNode\n@responsiveLayout\nexport class PopupMenu extends React.Component<PopupMenuProps, PopupMenuState> {\n public static __KONTUR_REACT_UI__ = 'PopupMenu';\n public static displayName = 'PopupMenu';\n\n private isMobileLayout!: boolean;\n private rootId = PopupIds.root + getRandomID();\n\n public static defaultProps: DefaultProps = {\n positions: Positions,\n type: PopupMenuType.Tooltip,\n popupHasPin: true,\n disableAnimations: false,\n };\n\n private getProps = createPropsGetter(PopupMenu.defaultProps);\n\n public static Type = PopupMenuType;\n\n public state = {\n menuVisible: false,\n firstItemShouldBeSelected: false,\n };\n\n private captionWrapper: HTMLSpanElement | null = null;\n private savedFocusableElement: HTMLElement | null = null;\n private menu: Nullable<Menu> = null;\n private setRootNode!: TSetRootNode;\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n return (\n <ThemeContext.Provider\n value={ThemeFactory.create(\n {\n menuOffsetY: theme.popupMenuMenuOffsetY,\n },\n theme,\n )}\n >\n {this.renderMain()}\n </ThemeContext.Provider>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const { popupHasPin, disableAnimations } = this.getProps();\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n <RenderLayer\n onClickOutside={this.hideMenuWithoutFocusing}\n onFocusOutside={this.hideMenuWithoutFocusing}\n active={this.state.menuVisible}\n >\n <div data-tid={PopupMenuDataTids.root} className={styles.container()} style={{ width: this.props.width }}>\n {this.renderCaption()}\n {this.captionWrapper && this.props.children && (\n <Popup\n id={this.props.popupMenuId ?? this.rootId}\n anchorElement={this.captionWrapper}\n opened={this.state.menuVisible}\n hasShadow\n margin={this.props.popupMargin}\n hasPin={popupHasPin}\n pinOffset={this.props.popupPinOffset}\n positions={this.getPositions()}\n disableAnimations={disableAnimations}\n onOpen={this.handleOpen}\n mobileOnCloseRequest={this.hideMenu}\n width={this.isMobileLayout ? 'auto' : this.props.menuWidth || 'auto'}\n >\n <Menu\n maxHeight={this.isMobileLayout ? 'none' : this.props.menuMaxHeight || 'none'}\n onKeyDown={this.handleKeyDown}\n onItemClick={this.handleItemSelection}\n preventIconsOffset={this.props.preventIconsOffset}\n cyclicSelection={false}\n ref={this.menuRef}\n initialSelectedItemIndex={this.state.firstItemShouldBeSelected ? 0 : -1}\n header={this.props.header}\n footer={this.props.footer}\n >\n {this.props.children}\n </Menu>\n </Popup>\n )}\n </div>\n </RenderLayer>\n </CommonWrapper>\n );\n }\n\n public open = (): void => this.showMenu();\n public close = (): void => this.hideMenu();\n\n private menuRef = (element: Nullable<Menu>) => (this.menu = element);\n\n private handleOpen = () => {\n if (this.menu) {\n this.menu.focus();\n }\n };\n\n private passPropsToCaption = (caption: React.ReactNode) => {\n if (typeof caption === 'string' || typeof caption === 'number') {\n return caption;\n }\n\n return React.cloneElement(caption as React.ReactElement, {\n id: this.props.id,\n 'aria-controls': this.props.popupMenuId ?? this.rootId,\n 'aria-expanded': this.state.menuVisible ? 'true' : 'false',\n 'aria-label': this.props['aria-label'],\n });\n };\n\n private renderCaption = () => {\n if (typeof this.props.caption === 'function') {\n const caption = this.props.caption({\n opened: this.state.menuVisible,\n openMenu: this.showMenu,\n closeMenu: this.hideMenu,\n toggleMenu: this.toggleMenu,\n });\n\n return (\n <span\n data-tid={PopupMenuDataTids.caption}\n className={styles.caption()}\n ref={(element) => (this.captionWrapper = element)}\n >\n {this.passPropsToCaption(caption)}\n </span>\n );\n }\n\n return (\n <span\n data-tid={PopupMenuDataTids.caption}\n onClick={this.handleCaptionClick}\n onKeyDown={this.handleCaptionKeyDown}\n ref={(element) => (this.captionWrapper = element)}\n className={styles.caption()}\n >\n {this.passPropsToCaption(this.props.caption)}\n </span>\n );\n };\n\n private hideMenuWithoutFocusing = () => this.hideMenu();\n\n private getPositions(): Readonly<PopupPositionsType[]> {\n const positions = this.getProps().positions;\n if (positions && isValidPositions(positions)) {\n return positions;\n }\n\n return Positions;\n }\n\n private showMenu = (firstItemShouldBeSelected?: boolean): void => {\n this.saveFocus();\n this.setState(\n {\n menuVisible: true,\n firstItemShouldBeSelected,\n },\n () => {\n this.handleChangeMenuVisible(false);\n },\n );\n };\n\n private hideMenu = (restoreFocus?: boolean): void => {\n this.setState(\n {\n menuVisible: false,\n firstItemShouldBeSelected: false,\n },\n () => {\n this.handleChangeMenuVisible(!!restoreFocus);\n },\n );\n };\n\n private toggleMenu = (): void => {\n this.state.menuVisible ? this.hideMenu() : this.showMenu();\n };\n\n private handleCaptionClick = (): void => {\n this.toggleMenu();\n };\n\n private handleCaptionKeyDown = (e: React.KeyboardEvent<HTMLElement>): void => {\n if (someKeys(isKeyEnter, isKeySpace, isKeyArrowVertical)(e)) {\n e.preventDefault();\n this.showMenu(true);\n }\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (isKeyEscape(e)) {\n const restoreFocus = true;\n this.hideMenu(restoreFocus);\n }\n };\n\n private saveFocus = (): void => {\n if (globalObject.document) {\n this.savedFocusableElement = globalObject.document.activeElement as HTMLElement;\n }\n };\n\n private restoreFocus = (): void => {\n if (this.savedFocusableElement) {\n this.savedFocusableElement.focus();\n this.savedFocusableElement = null;\n }\n };\n\n private handleChangeMenuVisible = (focusShouldBeRestored: boolean): void => {\n if (focusShouldBeRestored) {\n this.restoreFocus();\n }\n\n if (this.state.menuVisible && this.props.onOpen) {\n this.props.onOpen();\n }\n\n if (!this.state.menuVisible && this.props.onClose) {\n this.props.onClose();\n }\n\n if (typeof this.props.onChangeMenuState === 'function') {\n this.props.onChangeMenuState(this.state.menuVisible, focusShouldBeRestored);\n }\n };\n\n private handleItemSelection = (event: React.SyntheticEvent<HTMLElement>): void => {\n if (event.isDefaultPrevented()) {\n return;\n }\n\n if (event.type === 'keydown') {\n event.preventDefault();\n }\n\n const restoreFocus = event.type === 'keydown';\n this.hideMenu(restoreFocus);\n };\n}\n"],"mappings":"uJAAA,OAAOA,KAAK,MAA0C,OAAO;AAC7D,SAASC,YAAY,QAAQ,0BAA0B;;AAEvD,SAASC,WAAW,QAAQ,iBAAiB;;AAE7C;EACEC,kBAAkB;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