@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
|
+
});
|
|
@@ -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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.LOADER_SHOW_TIME = exports.DefaultState = exports.DELAY_BEFORE_SHOW_LOADER = exports.
|
|
1
|
+
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;var _exportNames = { DELAY_BEFORE_SHOW_LOADER: true, LOADER_SHOW_TIME: true, DefaultState: true, CustomComboBox: true };exports.LOADER_SHOW_TIME = exports.DefaultState = exports.DELAY_BEFORE_SHOW_LOADER = exports.CustomComboBox = void 0;var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));var _react = _interopRequireDefault(require("react"));
|
|
2
2
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
3
3
|
var _globalObject = require("@skbkontur/global-object");
|
|
4
4
|
|
|
@@ -22,7 +22,9 @@ var _featureFlagsContext = require("../../lib/featureFlagsContext");
|
|
|
22
22
|
|
|
23
23
|
var _CustomComboBoxTypes = require("./CustomComboBoxTypes");
|
|
24
24
|
var _CustomComboBoxReducer = require("./CustomComboBoxReducer");
|
|
25
|
-
var _ComboBoxView = require("./ComboBoxView");
|
|
25
|
+
var _ComboBoxView = require("./ComboBoxView");
|
|
26
|
+
|
|
27
|
+
var _tids = require("./tids");Object.keys(_tids).forEach(function (key) {if (key === "default" || key === "__esModule") return;if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;if (key in exports && exports[key] === _tids[key]) return;exports[key] = _tids[key];});var _class, _CustomComboBox;
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
|
|
@@ -104,10 +106,6 @@ var DefaultState = exports.DefaultState = {
|
|
|
104
106
|
repeatRequest: function repeatRequest() {return undefined;},
|
|
105
107
|
requestStatus: _CustomComboBoxTypes.ComboBoxRequestStatus.Unknown,
|
|
106
108
|
size: 'small'
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
var CustomComboBoxDataTids = exports.CustomComboBoxDataTids = {
|
|
110
|
-
comboBoxView: 'ComboBoxView__root'
|
|
111
109
|
};var
|
|
112
110
|
|
|
113
111
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactDom","_globalObject","_utils","_fixClickFocusIE","_CommonWrapper","_decorator","_rootNode","_featureFlagsContext","_CustomComboBoxTypes","_CustomComboBoxReducer","_ComboBoxView","_class","_CustomComboBox","DELAY_BEFORE_SHOW_LOADER","exports","LOADER_SHOW_TIME","DefaultState","inputChanged","editing","items","loading","opened","focused","textValue","repeatRequest","undefined","requestStatus","ComboBoxRequestStatus","Unknown","size","CustomComboBoxDataTids","comboBoxView","CustomComboBox","responsiveLayout","rootNode","_React$PureComponent","_this","_len","arguments","length","args","Array","_key","call","apply","concat","state","requestId","cancelationToken","reducer","cancelLoaderDelay","focus","props","disabled","input","inputLikeText","selectInputText","selectAll","blur","handleBlur","dispatch","action","sync","updateState","effects","nextState","setState","stateAndEffect","_ref","forEach","handleEffect","React","version","search","ReactDOM","flushSync","effect","getState","getProps","handleValueChange","value","type","keepFocus","isMobileLayout","handleFocus","handleMobileClose","handleInputBlur","handleClickOutside","e","fixClickFocusIE","close","globalObject","setTimeout","handleInputClick","_inheritsLoose2","default","_proto","prototype","_search","_asyncToGenerator2","_regenerator","mark","_callee","query","_this2","getItems","cancelPromise","expectingId","wrap","_callee$","_context","prev","next","Promise","_","reject","loaderShowDelay","resolve","cancelLoader","taskWithDelay","catch","race","sent","t0","code","finish","stop","_x","cancelSearch","CancelationError","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","ReactUIFeatureFlagsContext","Consumer","flags","featureFlags","getFullReactUIFlagsContext","CommonWrapper","ComboBoxView","_extends2","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":"+nBAAA,IAAAA,MAAA,GAAAC,sBAAA,CAA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,eAAA,MAAAD,MAAA,KAAAA,MAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactDom","_globalObject","_utils","_fixClickFocusIE","_CommonWrapper","_decorator","_rootNode","_featureFlagsContext","_CustomComboBoxTypes","_CustomComboBoxReducer","_ComboBoxView","_tids","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","_class","_CustomComboBox","DELAY_BEFORE_SHOW_LOADER","LOADER_SHOW_TIME","DefaultState","inputChanged","editing","items","loading","opened","focused","textValue","repeatRequest","undefined","requestStatus","ComboBoxRequestStatus","Unknown","size","CustomComboBox","responsiveLayout","rootNode","_React$PureComponent","_this","_len","arguments","length","args","Array","_key","apply","concat","state","requestId","cancelationToken","reducer","cancelLoaderDelay","focus","props","disabled","input","inputLikeText","selectInputText","selectAll","blur","handleBlur","dispatch","action","sync","updateState","effects","nextState","setState","stateAndEffect","_ref","handleEffect","React","version","search","ReactDOM","flushSync","effect","getState","getProps","handleValueChange","value","type","keepFocus","isMobileLayout","handleFocus","handleMobileClose","handleInputBlur","handleClickOutside","e","fixClickFocusIE","close","globalObject","setTimeout","handleInputClick","_inheritsLoose2","default","_proto","_search","_asyncToGenerator2","_regenerator","mark","_callee","query","_this2","getItems","cancelPromise","expectingId","wrap","_callee$","_context","prev","next","Promise","_","reject","loaderShowDelay","resolve","cancelLoader","taskWithDelay","catch","race","sent","t0","code","finish","stop","_x","cancelSearch","CancelationError","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","ReactUIFeatureFlagsContext","Consumer","flags","featureFlags","getFullReactUIFlagsContext","CommonWrapper","ComboBoxView","_extends2","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":"stBAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;;;;;;;AAOA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;;;AAGA,IAAAQ,oBAAA,GAAAR,OAAA;;;;;;AAMA,IAAAS,oBAAA,GAAAT,OAAA;AACA,IAA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, 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","exports","comboBoxView"],"sources":["tids.ts"],"sourcesContent":["export const CustomComboBoxDataTids = {\n comboBoxView: 'ComboBoxView__root',\n} as const;\n"],"mappings":"+EAAO,IAAMA,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG;EACpCE,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
|
+
});
|
|
@@ -3,6 +3,7 @@ import { HTMLProps } from '../../typings/html';
|
|
|
3
3
|
import { PopupPositionsType } from '../Popup';
|
|
4
4
|
import { CommonProps } from '../CommonWrapper';
|
|
5
5
|
import { MenuProps } from '../Menu';
|
|
6
|
+
export * from './tids';
|
|
6
7
|
export interface PopupMenuCaptionProps {
|
|
7
8
|
opened: boolean;
|
|
8
9
|
openMenu: (firstItemShouldBeSelected?: boolean) => void;
|
|
@@ -55,10 +56,6 @@ export declare const PopupMenuType: {
|
|
|
55
56
|
readonly Dropdown: "dropdown";
|
|
56
57
|
readonly Tooltip: "tooltip";
|
|
57
58
|
};
|
|
58
|
-
export declare const PopupMenuDataTids: {
|
|
59
|
-
readonly root: "PopupMenu__root";
|
|
60
|
-
readonly caption: "PopupMenu__caption";
|
|
61
|
-
};
|
|
62
59
|
type DefaultProps = Required<Pick<PopupMenuProps, 'positions' | 'type' | 'popupHasPin' | 'disableAnimations'>>;
|
|
63
60
|
export declare class PopupMenu extends React.Component<PopupMenuProps, PopupMenuState> {
|
|
64
61
|
static __KONTUR_REACT_UI__: string;
|
|
@@ -100,4 +97,3 @@ export declare class PopupMenu extends React.Component<PopupMenuProps, PopupMenu
|
|
|
100
97
|
private handleChangeMenuVisible;
|
|
101
98
|
private handleItemSelection;
|
|
102
99
|
}
|
|
103
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;
|
|
1
|
+
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;var _exportNames = { PopupMenuType: true, PopupMenu: true };exports.PopupMenuType = exports.PopupMenu = void 0;var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));var _react = _interopRequireDefault(require("react"));
|
|
2
2
|
var _globalObject = require("@skbkontur/global-object");
|
|
3
3
|
|
|
4
4
|
var _utils = require("../../lib/utils");
|
|
@@ -22,7 +22,10 @@ var _createPropsGetter = require("../../lib/createPropsGetter");
|
|
|
22
22
|
var _Menu = require("../Menu");
|
|
23
23
|
|
|
24
24
|
var _validatePositions = require("./validatePositions");
|
|
25
|
-
var _PopupMenu2 = require("./PopupMenu.styles");
|
|
25
|
+
var _PopupMenu2 = require("./PopupMenu.styles");
|
|
26
|
+
var _tids = require("./tids");
|
|
27
|
+
|
|
28
|
+
Object.keys(_tids).forEach(function (key) {if (key === "default" || key === "__esModule") return;if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;if (key in exports && exports[key] === _tids[key]) return;exports[key] = _tids[key];});var _class, _PopupMenu;
|
|
26
29
|
|
|
27
30
|
|
|
28
31
|
|
|
@@ -87,11 +90,6 @@ var PopupMenuType = exports.PopupMenuType = {
|
|
|
87
90
|
Tooltip: 'tooltip'
|
|
88
91
|
};
|
|
89
92
|
|
|
90
|
-
var PopupMenuDataTids = exports.PopupMenuDataTids = {
|
|
91
|
-
root: 'PopupMenu__root',
|
|
92
|
-
caption: 'PopupMenu__caption'
|
|
93
|
-
};
|
|
94
|
-
|
|
95
93
|
var Positions = [
|
|
96
94
|
'top left',
|
|
97
95
|
'top center',
|
|
@@ -242,7 +240,7 @@ PopupMenu = exports.PopupMenu = (0, _rootNode.rootNode)(_class = (0, _decorator.
|
|
|
242
240
|
|
|
243
241
|
return /*#__PURE__*/(
|
|
244
242
|
_react.default.createElement("span", {
|
|
245
|
-
"data-tid": PopupMenuDataTids.caption,
|
|
243
|
+
"data-tid": _tids.PopupMenuDataTids.caption,
|
|
246
244
|
className: _PopupMenu2.styles.caption(),
|
|
247
245
|
ref: function ref(element) {return _this.captionWrapper = element;} },
|
|
248
246
|
|
|
@@ -253,7 +251,7 @@ PopupMenu = exports.PopupMenu = (0, _rootNode.rootNode)(_class = (0, _decorator.
|
|
|
253
251
|
|
|
254
252
|
return /*#__PURE__*/(
|
|
255
253
|
_react.default.createElement("span", {
|
|
256
|
-
"data-tid": PopupMenuDataTids.caption,
|
|
254
|
+
"data-tid": _tids.PopupMenuDataTids.caption,
|
|
257
255
|
onClick: _this.handleCaptionClick,
|
|
258
256
|
onKeyDown: _this.handleCaptionKeyDown,
|
|
259
257
|
ref: function ref(element) {return _this.captionWrapper = element;},
|
|
@@ -364,4 +362,4 @@ PopupMenu = exports.PopupMenu = (0, _rootNode.rootNode)(_class = (0, _decorator.
|
|
|
364
362
|
|
|
365
363
|
var restoreFocus = event.type === 'keydown';
|
|
366
364
|
_this.hideMenu(restoreFocus);
|
|
367
|
-
};return _this;}(0, _inheritsLoose2.default)(PopupMenu, _React$Component);var _proto = PopupMenu.prototype;_proto.render = function render() {var _this2 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Provider, { value: _ThemeFactory.ThemeFactory.create({ menuOffsetY: theme.popupMenuMenuOffsetY }, theme) }, _this2.renderMain());});};_proto.renderMain = function renderMain() {var _this$props$popupMenu2;var _this$getProps = this.getProps(),popupHasPin = _this$getProps.popupHasPin,disableAnimations = _this$getProps.disableAnimations;return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: this.setRootNode }, this.props), /*#__PURE__*/_react.default.createElement(_RenderLayer.RenderLayer, { onClickOutside: this.hideMenuWithoutFocusing, onFocusOutside: this.hideMenuWithoutFocusing, active: this.state.menuVisible }, /*#__PURE__*/_react.default.createElement("div", { "data-tid": PopupMenuDataTids.root, className: _PopupMenu2.styles.container(), style: { width: this.props.width } }, this.renderCaption(), this.captionWrapper && this.props.children && /*#__PURE__*/_react.default.createElement(_Popup.Popup, { id: (_this$props$popupMenu2 = this.props.popupMenuId) != null ? _this$props$popupMenu2 : this.rootId, anchorElement: this.captionWrapper, opened: this.state.menuVisible, hasShadow: true, margin: this.props.popupMargin, hasPin: popupHasPin, pinOffset: this.props.popupPinOffset, positions: this.getPositions(), disableAnimations: disableAnimations, onOpen: this.handleOpen, mobileOnCloseRequest: this.hideMenu, width: this.isMobileLayout ? 'auto' : this.props.menuWidth || 'auto' }, /*#__PURE__*/_react.default.createElement(_Menu.Menu, { maxHeight: this.isMobileLayout ? 'none' : this.props.menuMaxHeight || 'none', onKeyDown: this.handleKeyDown, onItemClick: this.handleItemSelection, preventIconsOffset: this.props.preventIconsOffset, cyclicSelection: false, ref: this.menuRef, initialSelectedItemIndex: this.state.firstItemShouldBeSelected ? 0 : -1, header: this.props.header, footer: this.props.footer }, this.props.children)))));};_proto.getPositions = function getPositions() {var positions = this.getProps().positions;if (positions && (0, _validatePositions.isValidPositions)(positions)) {return positions;}return Positions;};return PopupMenu;}(_react.default.Component), _PopupMenu.__KONTUR_REACT_UI__ = 'PopupMenu', _PopupMenu.displayName = 'PopupMenu', _PopupMenu.defaultProps = { positions: Positions, type: PopupMenuType.Tooltip, popupHasPin: true, disableAnimations: false }, _PopupMenu.Type = PopupMenuType, _PopupMenu)) || _class) || _class;
|
|
365
|
+
};return _this;}(0, _inheritsLoose2.default)(PopupMenu, _React$Component);var _proto = PopupMenu.prototype;_proto.render = function render() {var _this2 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Provider, { value: _ThemeFactory.ThemeFactory.create({ menuOffsetY: theme.popupMenuMenuOffsetY }, theme) }, _this2.renderMain());});};_proto.renderMain = function renderMain() {var _this$props$popupMenu2;var _this$getProps = this.getProps(),popupHasPin = _this$getProps.popupHasPin,disableAnimations = _this$getProps.disableAnimations;return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: this.setRootNode }, this.props), /*#__PURE__*/_react.default.createElement(_RenderLayer.RenderLayer, { onClickOutside: this.hideMenuWithoutFocusing, onFocusOutside: this.hideMenuWithoutFocusing, active: this.state.menuVisible }, /*#__PURE__*/_react.default.createElement("div", { "data-tid": _tids.PopupMenuDataTids.root, className: _PopupMenu2.styles.container(), style: { width: this.props.width } }, this.renderCaption(), this.captionWrapper && this.props.children && /*#__PURE__*/_react.default.createElement(_Popup.Popup, { id: (_this$props$popupMenu2 = this.props.popupMenuId) != null ? _this$props$popupMenu2 : this.rootId, anchorElement: this.captionWrapper, opened: this.state.menuVisible, hasShadow: true, margin: this.props.popupMargin, hasPin: popupHasPin, pinOffset: this.props.popupPinOffset, positions: this.getPositions(), disableAnimations: disableAnimations, onOpen: this.handleOpen, mobileOnCloseRequest: this.hideMenu, width: this.isMobileLayout ? 'auto' : this.props.menuWidth || 'auto' }, /*#__PURE__*/_react.default.createElement(_Menu.Menu, { maxHeight: this.isMobileLayout ? 'none' : this.props.menuMaxHeight || 'none', onKeyDown: this.handleKeyDown, onItemClick: this.handleItemSelection, preventIconsOffset: this.props.preventIconsOffset, cyclicSelection: false, ref: this.menuRef, initialSelectedItemIndex: this.state.firstItemShouldBeSelected ? 0 : -1, header: this.props.header, footer: this.props.footer }, this.props.children)))));};_proto.getPositions = function getPositions() {var positions = this.getProps().positions;if (positions && (0, _validatePositions.isValidPositions)(positions)) {return positions;}return Positions;};return PopupMenu;}(_react.default.Component), _PopupMenu.__KONTUR_REACT_UI__ = 'PopupMenu', _PopupMenu.displayName = 'PopupMenu', _PopupMenu.defaultProps = { positions: Positions, type: PopupMenuType.Tooltip, popupHasPin: true, disableAnimations: false }, _PopupMenu.Type = PopupMenuType, _PopupMenu)) || _class) || _class;
|