@skbkontur/react-ui 5.0.8 → 5.0.10
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 +19 -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/GlobalLoader/GlobalLoader.d.ts +1 -0
- package/cjs/components/GlobalLoader/GlobalLoader.js +6 -2
- package/cjs/components/GlobalLoader/GlobalLoader.js.map +1 -1
- 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/GlobalLoader/GlobalLoader/GlobalLoader.js +13 -5
- package/components/GlobalLoader/GlobalLoader/GlobalLoader.js.map +1 -1
- package/components/GlobalLoader/GlobalLoader.d.ts +1 -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,216 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
import { Key } from 'selenium-webdriver';
|
|
3
|
+
|
|
4
|
+
import { delay } from '../../../lib/delay';
|
|
5
|
+
|
|
6
|
+
const testIdleFocusEditBlur = () => {
|
|
7
|
+
test('idle, focus, edit, blur', async (context) => {
|
|
8
|
+
const click = (css: string) => {
|
|
9
|
+
return context.webdriver
|
|
10
|
+
.actions({
|
|
11
|
+
bridge: true,
|
|
12
|
+
})
|
|
13
|
+
.click(context.webdriver.findElement({ css }));
|
|
14
|
+
};
|
|
15
|
+
const idle = await context.takeScreenshot();
|
|
16
|
+
|
|
17
|
+
await click('input').pause(500).perform();
|
|
18
|
+
const focused = await context.takeScreenshot();
|
|
19
|
+
|
|
20
|
+
await click('input').sendKeys('953').perform();
|
|
21
|
+
const edited = await context.takeScreenshot();
|
|
22
|
+
|
|
23
|
+
await click('body').perform();
|
|
24
|
+
const blured = await context.takeScreenshot();
|
|
25
|
+
|
|
26
|
+
await context.matchImages({ idle, focused, edited, blured });
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const testIdleFocusAppendRemoveBlur = () => {
|
|
31
|
+
test('idle, focus, edit, blur', async (context) => {
|
|
32
|
+
const click = (css: string) => {
|
|
33
|
+
return context.webdriver
|
|
34
|
+
.actions({
|
|
35
|
+
bridge: true,
|
|
36
|
+
})
|
|
37
|
+
.click(context.webdriver.findElement({ css }));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const idle = await context.takeScreenshot();
|
|
41
|
+
|
|
42
|
+
await click('input').pause(500).perform();
|
|
43
|
+
const focused = await context.takeScreenshot();
|
|
44
|
+
|
|
45
|
+
await click('input').sendKeys('953').perform();
|
|
46
|
+
const appended = await context.takeScreenshot();
|
|
47
|
+
|
|
48
|
+
await click('input').sendKeys(Key.BACK_SPACE).sendKeys(Key.BACK_SPACE).sendKeys(Key.BACK_SPACE).perform();
|
|
49
|
+
const restored = await context.takeScreenshot();
|
|
50
|
+
|
|
51
|
+
await click('body').perform();
|
|
52
|
+
const blured = await context.takeScreenshot();
|
|
53
|
+
|
|
54
|
+
await context.matchImages({ idle, focused, appended, restored, blured });
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const testIdleFocusBlur = () => {
|
|
59
|
+
test('idle, focus, blur', async (context) => {
|
|
60
|
+
const click = (css: string) => {
|
|
61
|
+
return context.webdriver
|
|
62
|
+
.actions({
|
|
63
|
+
bridge: true,
|
|
64
|
+
})
|
|
65
|
+
.click(context.webdriver.findElement({ css }));
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const idle = await context.takeScreenshot();
|
|
69
|
+
|
|
70
|
+
await click('input').pause(500).perform();
|
|
71
|
+
const focused = await context.takeScreenshot();
|
|
72
|
+
|
|
73
|
+
await click('body').perform();
|
|
74
|
+
const blured = await context.takeScreenshot();
|
|
75
|
+
|
|
76
|
+
await context.matchImages({ idle, focused, blured });
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const testRewriteInMiddle = () => {
|
|
81
|
+
test('idle, shift, rewrite', async (context) => {
|
|
82
|
+
const click = (css: string) => {
|
|
83
|
+
return context.webdriver
|
|
84
|
+
.actions({
|
|
85
|
+
bridge: true,
|
|
86
|
+
})
|
|
87
|
+
.click(context.webdriver.findElement({ css }))
|
|
88
|
+
.pause(500);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const idle = await context.takeScreenshot();
|
|
92
|
+
|
|
93
|
+
click('input').keyDown(Key.ARROW_LEFT).keyDown(Key.ARROW_LEFT).sendKeys('12').perform();
|
|
94
|
+
const shift = await context.takeScreenshot();
|
|
95
|
+
|
|
96
|
+
click('body');
|
|
97
|
+
|
|
98
|
+
click('input').keyDown(Key.ARROW_LEFT).keyDown(Key.ARROW_LEFT).sendKeys('56').perform();
|
|
99
|
+
const rewrite = await context.takeScreenshot();
|
|
100
|
+
|
|
101
|
+
await context.matchImages({ idle, shift, rewrite });
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
kind('MaskedInput', () => {
|
|
106
|
+
story('Default', ({ setStoryParameters }) => {
|
|
107
|
+
setStoryParameters({
|
|
108
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
109
|
+
});
|
|
110
|
+
testIdleFocusEditBlur();
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
story('IdleFocusEditBlurWithPlaceholder', ({ setStoryParameters }) => {
|
|
114
|
+
setStoryParameters({
|
|
115
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
116
|
+
});
|
|
117
|
+
testIdleFocusEditBlur();
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
story('IdleFocusBlurWithPlaceholder', ({ setStoryParameters }) => {
|
|
121
|
+
setStoryParameters({
|
|
122
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
123
|
+
});
|
|
124
|
+
testIdleFocusBlur();
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
story('IdleFocusAppendRemoveBlurWithPlaceholder', ({ setStoryParameters }) => {
|
|
128
|
+
setStoryParameters({
|
|
129
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
130
|
+
});
|
|
131
|
+
testIdleFocusAppendRemoveBlur();
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
story('IdleFocusBlurWithPrefix', ({ setStoryParameters }) => {
|
|
135
|
+
setStoryParameters({
|
|
136
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
137
|
+
});
|
|
138
|
+
testIdleFocusBlur();
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
story('WithCustomUnmaskedValue', ({ setStoryParameters }) => {
|
|
142
|
+
setStoryParameters({
|
|
143
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
144
|
+
});
|
|
145
|
+
testIdleFocusEditBlur();
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
story('WithUnmaskedAndFixedValue', ({ setStoryParameters }) => {
|
|
149
|
+
setStoryParameters({
|
|
150
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
151
|
+
});
|
|
152
|
+
testIdleFocusAppendRemoveBlur();
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
story('IdleFocusBlurAndUncontrolled', ({ setStoryParameters }) => {
|
|
156
|
+
setStoryParameters({
|
|
157
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
158
|
+
});
|
|
159
|
+
testIdleFocusEditBlur();
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
story('RewriteInMiddle', ({ setStoryParameters }) => {
|
|
163
|
+
setStoryParameters({
|
|
164
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
165
|
+
});
|
|
166
|
+
testRewriteInMiddle();
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
story('SelectAllByProp', ({ setStoryParameters }) => {
|
|
170
|
+
setStoryParameters({
|
|
171
|
+
skip: { 'enough basic themes': { in: /^(?!^(?:chrome2022|firefox2022)$)/ } },
|
|
172
|
+
});
|
|
173
|
+
test('Plain focused', async (context) => {
|
|
174
|
+
const idle = await context.takeScreenshot();
|
|
175
|
+
await context.webdriver
|
|
176
|
+
.actions({
|
|
177
|
+
bridge: true,
|
|
178
|
+
})
|
|
179
|
+
.click(context.webdriver.findElement({ css: 'input' }))
|
|
180
|
+
.pause(500)
|
|
181
|
+
.perform();
|
|
182
|
+
const select_half = await context.takeScreenshot();
|
|
183
|
+
await context.webdriver
|
|
184
|
+
.actions({
|
|
185
|
+
bridge: true,
|
|
186
|
+
})
|
|
187
|
+
.click(context.webdriver.findElement({ css: 'body' }))
|
|
188
|
+
.click(context.webdriver.findElement({ css: 'input' }))
|
|
189
|
+
.sendKeys('1234')
|
|
190
|
+
.click(context.webdriver.findElement({ css: 'body' }))
|
|
191
|
+
.click(context.webdriver.findElement({ css: 'input' }))
|
|
192
|
+
.pause(500)
|
|
193
|
+
.perform();
|
|
194
|
+
const select_all = await context.takeScreenshot();
|
|
195
|
+
await context.matchImages({ idle, select_half, select_all });
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
story('SelectAllByButton', ({ setStoryParameters }) => {
|
|
200
|
+
setStoryParameters({
|
|
201
|
+
skip: true, // flaky
|
|
202
|
+
});
|
|
203
|
+
test('Plain focused', async (context) => {
|
|
204
|
+
const plain = await context.takeScreenshot();
|
|
205
|
+
await context.webdriver
|
|
206
|
+
.actions({
|
|
207
|
+
bridge: true,
|
|
208
|
+
})
|
|
209
|
+
.click(context.webdriver.findElement({ css: '[data-tid~="select-all"]' }))
|
|
210
|
+
.perform();
|
|
211
|
+
await delay(500);
|
|
212
|
+
const select_all = await context.takeScreenshot();
|
|
213
|
+
await context.matchImages({ plain, select_all });
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
});
|
|
@@ -129,26 +129,17 @@ export var Modal = /*#__PURE__*/function (_React$Component) {
|
|
|
129
129
|
LayoutEvents.emit();
|
|
130
130
|
};
|
|
131
131
|
_this.setHasHeader = function (hasHeader) {
|
|
132
|
-
|
|
133
|
-
hasHeader = true;
|
|
134
|
-
}
|
|
135
|
-
_this.state.hasHeader !== hasHeader && _this.setState({
|
|
132
|
+
_this.setState({
|
|
136
133
|
hasHeader: hasHeader
|
|
137
134
|
});
|
|
138
135
|
};
|
|
139
136
|
_this.setHasFooter = function (hasFooter) {
|
|
140
|
-
|
|
141
|
-
hasFooter = true;
|
|
142
|
-
}
|
|
143
|
-
_this.state.hasFooter !== hasFooter && _this.setState({
|
|
137
|
+
_this.setState({
|
|
144
138
|
hasFooter: hasFooter
|
|
145
139
|
});
|
|
146
140
|
};
|
|
147
141
|
_this.setHasPanel = function (hasPanel) {
|
|
148
|
-
|
|
149
|
-
hasPanel = false;
|
|
150
|
-
}
|
|
151
|
-
_this.state.hasPanel !== hasPanel && _this.setState({
|
|
142
|
+
_this.setState({
|
|
152
143
|
hasPanel: hasPanel
|
|
153
144
|
});
|
|
154
145
|
};
|
|
@@ -221,10 +212,7 @@ export var Modal = /*#__PURE__*/function (_React$Component) {
|
|
|
221
212
|
requestClose: this.requestClose
|
|
222
213
|
};
|
|
223
214
|
}
|
|
224
|
-
if (!hasFooter) {
|
|
225
|
-
modalContextProps.additionalPadding = true;
|
|
226
|
-
}
|
|
227
|
-
if (hasFooter && hasPanel) {
|
|
215
|
+
if (!hasFooter || hasPanel) {
|
|
228
216
|
modalContextProps.additionalPadding = true;
|
|
229
217
|
}
|
|
230
218
|
var style = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","FocusLock","throttle","globalObject","isNonNullable","isKeyEscape","LayoutEvents","RenderContainer","ZIndex","stopPropagation","HideBodyVerticalScroll","ModalStack","ResizeDetector","ThemeContext","isIE11","CommonWrapper","cx","createPropsGetter","ResponsiveLayout","ModalContext","ModalFooter","ModalHeader","ModalBody","ModalClose","styles","getModalTheme","mountedModalsCount","ModalDataTids","container","content","close","Modal","_React$Component","_this","_len","arguments","length","args","Array","_key","call","apply","concat","getProps","defaultProps","state","stackPosition","hasBackground","horizontalScroll","hasHeader","hasFooter","hasPanel","stackSubscription","containerNode","mouseDownTarget","mouseUpTarget","requestClose","props","disableClose","onClose","refContainer","center","handleStackChange","stack","setState","indexOf","isBlocking","handleContainerMouseDown","event","target","handleContainerMouseUp","handleContainerClick","ignoreBackgroundClick","currentTarget","handleKeyDown","e","checkHorizontalScrollAppearance","hasScroll","containerClientWidth","clientWidth","containerScrollWidth","scrollWidth","throttledCheckHorizontalScroll","handleResize","emit","setHasHeader","setHasFooter","setHasPanel","_inheritsLoose","_proto","prototype","componentDidMount","add","addEventListener","componentWillUnmount","removeEventListener","remove","render","_this2","createElement","Consumer","theme","Provider","value","renderMain","_this3","_this$props","noClose","width","alignTop","children","ariaLabel","ariaLabelledby","_this$state","_this$getProps","role","disableFocusLock","modalContextProps","additionalPadding","style","containerStyle","priority","className","root","onMouseDown","onMouseUp","onClick","bg","_ref","_cx","_cx2","_cx3","_cx4","_cx5","isMobile","ref","containerMobile","centerContainer","mobileCenterContainer","Boolean","undefined","window","mobileWindow","onResize","fullHeight","disabled","autoFocus","columnFlexContainer","closeWrapper","mobileCloseWrapper","mobileCloseWithoutHeader","Component","__KONTUR_REACT_UI__","displayName","Header","Body","Footer"],"sources":["Modal.tsx"],"sourcesContent":["import React, { AriaAttributes, HTMLAttributes } from 'react';\nimport FocusLock from 'react-focus-lock';\nimport throttle from 'lodash.throttle';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport { isNonNullable } from '../../lib/utils';\nimport { isKeyEscape } from '../../lib/events/keyboard/identifiers';\nimport * as LayoutEvents from '../../lib/LayoutEvents';\nimport { RenderContainer } from '../../internal/RenderContainer';\nimport { ZIndex } from '../../internal/ZIndex';\nimport { stopPropagation } from '../../lib/events/stopPropagation';\nimport { HideBodyVerticalScroll } from '../../internal/HideBodyVerticalScroll';\nimport { ModalStack, ModalStackSubscription } from '../../lib/ModalStack';\nimport { ResizeDetector } from '../../internal/ResizeDetector';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme, ThemeIn } from '../../lib/theming/Theme';\nimport { isIE11 } from '../../lib/client';\nimport { CommonWrapper, CommonProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { ResponsiveLayout } from '../ResponsiveLayout';\n\nimport { ModalContext, ModalContextProps } from './ModalContext';\nimport { ModalFooter } from './ModalFooter';\nimport { ModalHeader } from './ModalHeader';\nimport { ModalBody } from './ModalBody';\nimport { ModalClose } from './ModalClose';\nimport { styles } from './Modal.styles';\nimport { getModalTheme } from './getModalTheme';\n\nlet mountedModalsCount = 0;\n\nexport interface ModalProps\n extends CommonProps,\n Pick<HTMLAttributes<unknown>, 'role'>,\n Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> {\n /**\n * Отключает событие onClose, также дизейблит кнопку закрытия модалки\n */\n disableClose?: boolean;\n\n /**\n * Выравнивание окна по верху страницы.\n */\n alignTop?: boolean;\n\n /**\n * Не закрывать окно при клике на фон.\n */\n ignoreBackgroundClick?: boolean;\n\n /**\n * Не показывать крестик для закрытия окна.\n */\n noClose?: boolean;\n width?: number | string;\n\n /**\n * Вызывается, когда пользователь запросил закрытие окна (нажал на фон, на\n * Escape или на крестик).\n */\n onClose?: () => void;\n\n /**\n * Не использовать фокус-лок внутри модалки.\n * По умолчанию true для IE11.\n */\n disableFocusLock?: boolean;\n\n /**\n * Обычный объект с переменными темы.\n * Он будет объединён с темой из контекста.\n */\n theme?: ThemeIn;\n}\n\nexport interface ModalState {\n stackPosition: number;\n hasBackground: boolean;\n horizontalScroll: boolean;\n hasHeader: boolean;\n hasFooter: boolean;\n hasPanel: boolean;\n}\n\nexport const ModalDataTids = {\n container: 'modal-container',\n content: 'modal-content',\n close: 'modal-close',\n} as const;\n\ntype DefaultProps = Required<Pick<ModalProps, 'disableFocusLock' | 'role'>>;\n\n/**\n * Модальное окно\n *\n * Содержит в себе три компоненты: **Modal.Header**,\n * **Modal.Body** и **Modal.Footer**\n *\n * Для отображения серой плашки в футере в компонент\n * **Footer** необходимо передать пропс **panel**\n *\n * Для отключения прилипания шапки и футера\n * в соответствующий компонент нужно передать\n * проп **sticky** со значением **false**\n * (по-умолчанию прилипание включено)\n */\nexport class Modal extends React.Component<ModalProps, ModalState> {\n public static __KONTUR_REACT_UI__ = 'Modal';\n public static displayName = 'Modal';\n\n public static Header = ModalHeader;\n public static Body = ModalBody;\n public static Footer = ModalFooter;\n\n public static defaultProps: DefaultProps = {\n // NOTE: в ie нормально не работает\n disableFocusLock: isIE11,\n role: 'dialog',\n };\n\n private getProps = createPropsGetter(Modal.defaultProps);\n\n public state: ModalState = {\n stackPosition: 0,\n hasBackground: true,\n horizontalScroll: false,\n hasHeader: false,\n hasFooter: false,\n hasPanel: false,\n };\n\n private theme!: Theme;\n private stackSubscription: ModalStackSubscription | null = null;\n private containerNode: HTMLDivElement | null = null;\n private mouseDownTarget: EventTarget | null = null;\n private mouseUpTarget: EventTarget | null = null;\n\n public componentDidMount() {\n this.stackSubscription = ModalStack.add(this, this.handleStackChange);\n\n if (mountedModalsCount === 0) {\n globalObject.addEventListener?.('resize', this.throttledCheckHorizontalScroll);\n }\n\n mountedModalsCount++;\n globalObject.addEventListener?.('keydown', this.handleKeyDown);\n this.checkHorizontalScrollAppearance();\n\n if (this.containerNode) {\n this.containerNode.addEventListener('scroll', LayoutEvents.emit);\n }\n }\n\n public componentWillUnmount() {\n if (--mountedModalsCount === 0) {\n globalObject.removeEventListener?.('resize', this.throttledCheckHorizontalScroll);\n LayoutEvents.emit();\n }\n\n globalObject.removeEventListener?.('keydown', this.handleKeyDown);\n if (isNonNullable(this.stackSubscription)) {\n this.stackSubscription.remove();\n }\n ModalStack.remove(this);\n\n if (this.containerNode) {\n this.containerNode.removeEventListener('scroll', LayoutEvents.emit);\n }\n }\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = getModalTheme(theme, this.props.theme);\n return <ThemeContext.Provider value={this.theme}>{this.renderMain()}</ThemeContext.Provider>;\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const {\n noClose,\n disableClose,\n width,\n alignTop,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n } = this.props;\n const { hasHeader, hasFooter, hasPanel } = this.state;\n const { role, disableFocusLock } = this.getProps();\n\n const modalContextProps: ModalContextProps = {\n hasHeader,\n horizontalScroll: this.state.horizontalScroll,\n setHasHeader: this.setHasHeader,\n setHasFooter: this.setHasFooter,\n setHasPanel: this.setHasPanel,\n };\n if (!noClose) {\n modalContextProps.close = {\n disableClose,\n requestClose: this.requestClose,\n };\n }\n if (!hasFooter) {\n modalContextProps.additionalPadding = true;\n }\n if (hasFooter && hasPanel) {\n modalContextProps.additionalPadding = true;\n }\n\n const style: { width?: number | string } = {};\n const containerStyle: { width?: number | string } = {};\n\n if (width) {\n style.width = width;\n } else {\n containerStyle.width = 'auto';\n }\n\n return (\n <RenderContainer>\n <CommonWrapper {...this.props}>\n <ZIndex priority={'Modal'} className={styles.root()}>\n <HideBodyVerticalScroll />\n {this.state.hasBackground && (\n <div\n onMouseDown={this.handleContainerMouseDown}\n onMouseUp={this.handleContainerMouseUp}\n onClick={this.handleContainerClick}\n className={styles.bg(this.theme)}\n />\n )}\n <ResponsiveLayout>\n {({ isMobile }) => (\n <div\n aria-labelledby={ariaLabelledby}\n ref={this.refContainer}\n className={cx(styles.container(), isMobile && styles.containerMobile(this.theme))}\n onMouseDown={this.handleContainerMouseDown}\n onMouseUp={this.handleContainerMouseUp}\n onClick={this.handleContainerClick}\n data-tid={ModalDataTids.container}\n >\n <div\n aria-modal\n aria-label={ariaLabel}\n role={role}\n className={cx({\n [styles.centerContainer()]: true,\n [styles.mobileCenterContainer()]: isMobile,\n [styles.alignTop()]: Boolean(alignTop),\n })}\n style={isMobile ? undefined : containerStyle}\n data-tid={ModalDataTids.content}\n >\n <div\n className={cx({ [styles.window(this.theme)]: true, [styles.mobileWindow()]: isMobile })}\n style={isMobile ? undefined : style}\n >\n <ResizeDetector onResize={this.handleResize} fullHeight={isMobile}>\n <FocusLock\n disabled={disableFocusLock}\n autoFocus={false}\n className={cx({ [styles.columnFlexContainer()]: isMobile }, 'focus-lock-container')}\n >\n {!hasHeader && !noClose && (\n <ZIndex\n className={cx({\n [styles.closeWrapper(this.theme)]: true,\n [styles.mobileCloseWrapper(this.theme)]: isMobile,\n })}\n >\n <ModalClose\n className={cx({\n [styles.mobileCloseWithoutHeader()]: isMobile && !this.state.hasHeader,\n })}\n requestClose={this.requestClose}\n disableClose={disableClose}\n />\n </ZIndex>\n )}\n <ModalContext.Provider value={modalContextProps}>{children}</ModalContext.Provider>\n </FocusLock>\n </ResizeDetector>\n </div>\n </div>\n </div>\n )}\n </ResponsiveLayout>\n </ZIndex>\n </CommonWrapper>\n </RenderContainer>\n );\n }\n\n private requestClose = () => {\n if (this.props.disableClose) {\n return;\n }\n if (this.props.onClose) {\n this.props.onClose();\n }\n };\n\n private refContainer = (center: HTMLDivElement | null) => {\n this.containerNode = center;\n };\n\n private handleStackChange = (stack: readonly React.Component[]) => {\n this.setState({ stackPosition: stack.indexOf(this), hasBackground: ModalStack.isBlocking(this) });\n };\n\n private handleContainerMouseDown = (event: React.MouseEvent) => {\n this.mouseDownTarget = event.target;\n };\n\n private handleContainerMouseUp = (event: React.MouseEvent) => {\n this.mouseUpTarget = event.target;\n };\n\n private handleContainerClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (!this.props.ignoreBackgroundClick) {\n const { target, currentTarget } = event;\n if (target === currentTarget && this.mouseDownTarget === currentTarget && this.mouseUpTarget === currentTarget) {\n this.requestClose();\n }\n }\n };\n\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.state.stackPosition !== 0) {\n return;\n }\n if (isKeyEscape(e)) {\n stopPropagation(e);\n this.requestClose();\n }\n };\n\n private checkHorizontalScrollAppearance = () => {\n let hasScroll = false;\n\n if (this.containerNode) {\n const containerClientWidth = this.containerNode.clientWidth;\n const containerScrollWidth = this.containerNode.scrollWidth;\n hasScroll = containerClientWidth < containerScrollWidth;\n }\n if (hasScroll && !this.state.horizontalScroll) {\n this.setState({ horizontalScroll: true });\n } else if (this.state.horizontalScroll) {\n this.setState({ horizontalScroll: false });\n }\n };\n\n private throttledCheckHorizontalScroll = throttle(this.checkHorizontalScrollAppearance, 100);\n\n private handleResize = () => {\n LayoutEvents.emit();\n };\n\n private setHasHeader = (hasHeader = true) => {\n this.state.hasHeader !== hasHeader && this.setState({ hasHeader });\n };\n\n private setHasFooter = (hasFooter = true) => {\n this.state.hasFooter !== hasFooter && this.setState({ hasFooter });\n };\n\n private setHasPanel = (hasPanel = false) => {\n this.state.hasPanel !== hasPanel && this.setState({ hasPanel });\n };\n}\n"],"mappings":"sEAAA,OAAOA,KAAK,MAA0C,OAAO;AAC7D,OAAOC,SAAS,MAAM,kBAAkB;AACxC,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,SAASC,YAAY,QAAQ,0BAA0B;;AAEvD,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,WAAW,QAAQ,uCAAuC;AACnE,OAAO,KAAKC,YAAY,MAAM,wBAAwB;AACtD,SAASC,eAAe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AI,CAAC5D,KAAK,CAACI,SAAS,EAAAoF,IAAA,CACvE,CAAE,EACH7E,YAAY,EAAEiD,MAAI,CAACjD,YAAa,EAChCE,YAAY,EAAEA,YAAa,EAC5B,CACK,CACT,eACD1D,KAAA,CAAAmG,aAAA,CAAChF,YAAY,CAACmF,QAAQ,IAACC,KAAK,EAAEc,iBAAkB,IAAEP,QAAgC,CACzE,CACG,CACb,CACF,CACF,CAAC,EAEQ,CACZ,CACK,CACA,CAAC,CAEtB,CAAC,QAAA/E,KAAA,GA/LwB/B,KAAK,CAACuJ,SAAS,EAA7BxH,KAAK,CACFyH,mBAAmB,GAAG,OAAO,CADhCzH,KAAK,CAEF0H,WAAW,GAAG,OAAO,CAFxB1H,KAAK,CAIF2H,MAAM,GAAGrI,WAAW,CAJvBU,KAAK,CAKF4H,IAAI,GAAGrI,SAAS,CALnBS,KAAK,CAMF6H,MAAM,GAAGxI,WAAW,CANvBW,KAAK,CAQFa,YAAY,GAAiB,EACzC;EACAwE,gBAAgB,EAAEtG,MAAM,EACxBqG,IAAI,EAAE,QAAQ,CAChB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","FocusLock","throttle","globalObject","isNonNullable","isKeyEscape","LayoutEvents","RenderContainer","ZIndex","stopPropagation","HideBodyVerticalScroll","ModalStack","ResizeDetector","ThemeContext","isIE11","CommonWrapper","cx","createPropsGetter","ResponsiveLayout","ModalContext","ModalFooter","ModalHeader","ModalBody","ModalClose","styles","getModalTheme","mountedModalsCount","ModalDataTids","container","content","close","Modal","_React$Component","_this","_len","arguments","length","args","Array","_key","call","apply","concat","getProps","defaultProps","state","stackPosition","hasBackground","horizontalScroll","hasHeader","hasFooter","hasPanel","stackSubscription","containerNode","mouseDownTarget","mouseUpTarget","requestClose","props","disableClose","onClose","refContainer","center","handleStackChange","stack","setState","indexOf","isBlocking","handleContainerMouseDown","event","target","handleContainerMouseUp","handleContainerClick","ignoreBackgroundClick","currentTarget","handleKeyDown","e","checkHorizontalScrollAppearance","hasScroll","containerClientWidth","clientWidth","containerScrollWidth","scrollWidth","throttledCheckHorizontalScroll","handleResize","emit","setHasHeader","setHasFooter","setHasPanel","_inheritsLoose","_proto","prototype","componentDidMount","add","addEventListener","componentWillUnmount","removeEventListener","remove","render","_this2","createElement","Consumer","theme","Provider","value","renderMain","_this3","_this$props","noClose","width","alignTop","children","ariaLabel","ariaLabelledby","_this$state","_this$getProps","role","disableFocusLock","modalContextProps","additionalPadding","style","containerStyle","priority","className","root","onMouseDown","onMouseUp","onClick","bg","_ref","_cx","_cx2","_cx3","_cx4","_cx5","isMobile","ref","containerMobile","centerContainer","mobileCenterContainer","Boolean","undefined","window","mobileWindow","onResize","fullHeight","disabled","autoFocus","columnFlexContainer","closeWrapper","mobileCloseWrapper","mobileCloseWithoutHeader","Component","__KONTUR_REACT_UI__","displayName","Header","Body","Footer"],"sources":["Modal.tsx"],"sourcesContent":["import React, { AriaAttributes, HTMLAttributes } from 'react';\nimport FocusLock from 'react-focus-lock';\nimport throttle from 'lodash.throttle';\nimport { globalObject } from '@skbkontur/global-object';\n\nimport { isNonNullable } from '../../lib/utils';\nimport { isKeyEscape } from '../../lib/events/keyboard/identifiers';\nimport * as LayoutEvents from '../../lib/LayoutEvents';\nimport { RenderContainer } from '../../internal/RenderContainer';\nimport { ZIndex } from '../../internal/ZIndex';\nimport { stopPropagation } from '../../lib/events/stopPropagation';\nimport { HideBodyVerticalScroll } from '../../internal/HideBodyVerticalScroll';\nimport { ModalStack, ModalStackSubscription } from '../../lib/ModalStack';\nimport { ResizeDetector } from '../../internal/ResizeDetector';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme, ThemeIn } from '../../lib/theming/Theme';\nimport { isIE11 } from '../../lib/client';\nimport { CommonWrapper, CommonProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { ResponsiveLayout } from '../ResponsiveLayout';\n\nimport { ModalContext, ModalContextProps } from './ModalContext';\nimport { ModalFooter } from './ModalFooter';\nimport { ModalHeader } from './ModalHeader';\nimport { ModalBody } from './ModalBody';\nimport { ModalClose } from './ModalClose';\nimport { styles } from './Modal.styles';\nimport { getModalTheme } from './getModalTheme';\n\nlet mountedModalsCount = 0;\n\nexport interface ModalProps\n extends CommonProps,\n Pick<HTMLAttributes<unknown>, 'role'>,\n Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> {\n /**\n * Отключает событие onClose, также дизейблит кнопку закрытия модалки\n */\n disableClose?: boolean;\n\n /**\n * Выравнивание окна по верху страницы.\n */\n alignTop?: boolean;\n\n /**\n * Не закрывать окно при клике на фон.\n */\n ignoreBackgroundClick?: boolean;\n\n /**\n * Не показывать крестик для закрытия окна.\n */\n noClose?: boolean;\n width?: number | string;\n\n /**\n * Вызывается, когда пользователь запросил закрытие окна (нажал на фон, на\n * Escape или на крестик).\n */\n onClose?: () => void;\n\n /**\n * Не использовать фокус-лок внутри модалки.\n * По умолчанию true для IE11.\n */\n disableFocusLock?: boolean;\n\n /**\n * Обычный объект с переменными темы.\n * Он будет объединён с темой из контекста.\n */\n theme?: ThemeIn;\n}\n\nexport interface ModalState {\n stackPosition: number;\n hasBackground: boolean;\n horizontalScroll: boolean;\n hasHeader: boolean;\n hasFooter: boolean;\n hasPanel: boolean;\n}\n\nexport const ModalDataTids = {\n container: 'modal-container',\n content: 'modal-content',\n close: 'modal-close',\n} as const;\n\ntype DefaultProps = Required<Pick<ModalProps, 'disableFocusLock' | 'role'>>;\n\n/**\n * Модальное окно\n *\n * Содержит в себе три компоненты: **Modal.Header**,\n * **Modal.Body** и **Modal.Footer**\n *\n * Для отображения серой плашки в футере в компонент\n * **Footer** необходимо передать пропс **panel**\n *\n * Для отключения прилипания шапки и футера\n * в соответствующий компонент нужно передать\n * проп **sticky** со значением **false**\n * (по-умолчанию прилипание включено)\n */\nexport class Modal extends React.Component<ModalProps, ModalState> {\n public static __KONTUR_REACT_UI__ = 'Modal';\n public static displayName = 'Modal';\n\n public static Header = ModalHeader;\n public static Body = ModalBody;\n public static Footer = ModalFooter;\n\n public static defaultProps: DefaultProps = {\n // NOTE: в ie нормально не работает\n disableFocusLock: isIE11,\n role: 'dialog',\n };\n\n private getProps = createPropsGetter(Modal.defaultProps);\n\n public state: ModalState = {\n stackPosition: 0,\n hasBackground: true,\n horizontalScroll: false,\n hasHeader: false,\n hasFooter: false,\n hasPanel: false,\n };\n\n private theme!: Theme;\n private stackSubscription: ModalStackSubscription | null = null;\n private containerNode: HTMLDivElement | null = null;\n private mouseDownTarget: EventTarget | null = null;\n private mouseUpTarget: EventTarget | null = null;\n\n public componentDidMount() {\n this.stackSubscription = ModalStack.add(this, this.handleStackChange);\n\n if (mountedModalsCount === 0) {\n globalObject.addEventListener?.('resize', this.throttledCheckHorizontalScroll);\n }\n\n mountedModalsCount++;\n globalObject.addEventListener?.('keydown', this.handleKeyDown);\n this.checkHorizontalScrollAppearance();\n\n if (this.containerNode) {\n this.containerNode.addEventListener('scroll', LayoutEvents.emit);\n }\n }\n\n public componentWillUnmount() {\n if (--mountedModalsCount === 0) {\n globalObject.removeEventListener?.('resize', this.throttledCheckHorizontalScroll);\n LayoutEvents.emit();\n }\n\n globalObject.removeEventListener?.('keydown', this.handleKeyDown);\n if (isNonNullable(this.stackSubscription)) {\n this.stackSubscription.remove();\n }\n ModalStack.remove(this);\n\n if (this.containerNode) {\n this.containerNode.removeEventListener('scroll', LayoutEvents.emit);\n }\n }\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = getModalTheme(theme, this.props.theme);\n return <ThemeContext.Provider value={this.theme}>{this.renderMain()}</ThemeContext.Provider>;\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const {\n noClose,\n disableClose,\n width,\n alignTop,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n } = this.props;\n const { hasHeader, hasFooter, hasPanel } = this.state;\n const { role, disableFocusLock } = this.getProps();\n\n const modalContextProps: ModalContextProps = {\n hasHeader,\n horizontalScroll: this.state.horizontalScroll,\n setHasHeader: this.setHasHeader,\n setHasFooter: this.setHasFooter,\n setHasPanel: this.setHasPanel,\n };\n if (!noClose) {\n modalContextProps.close = {\n disableClose,\n requestClose: this.requestClose,\n };\n }\n if (!hasFooter || hasPanel) {\n modalContextProps.additionalPadding = true;\n }\n\n const style: { width?: number | string } = {};\n const containerStyle: { width?: number | string } = {};\n\n if (width) {\n style.width = width;\n } else {\n containerStyle.width = 'auto';\n }\n\n return (\n <RenderContainer>\n <CommonWrapper {...this.props}>\n <ZIndex priority={'Modal'} className={styles.root()}>\n <HideBodyVerticalScroll />\n {this.state.hasBackground && (\n <div\n onMouseDown={this.handleContainerMouseDown}\n onMouseUp={this.handleContainerMouseUp}\n onClick={this.handleContainerClick}\n className={styles.bg(this.theme)}\n />\n )}\n <ResponsiveLayout>\n {({ isMobile }) => (\n <div\n aria-labelledby={ariaLabelledby}\n ref={this.refContainer}\n className={cx(styles.container(), isMobile && styles.containerMobile(this.theme))}\n onMouseDown={this.handleContainerMouseDown}\n onMouseUp={this.handleContainerMouseUp}\n onClick={this.handleContainerClick}\n data-tid={ModalDataTids.container}\n >\n <div\n aria-modal\n aria-label={ariaLabel}\n role={role}\n className={cx({\n [styles.centerContainer()]: true,\n [styles.mobileCenterContainer()]: isMobile,\n [styles.alignTop()]: Boolean(alignTop),\n })}\n style={isMobile ? undefined : containerStyle}\n data-tid={ModalDataTids.content}\n >\n <div\n className={cx({ [styles.window(this.theme)]: true, [styles.mobileWindow()]: isMobile })}\n style={isMobile ? undefined : style}\n >\n <ResizeDetector onResize={this.handleResize} fullHeight={isMobile}>\n <FocusLock\n disabled={disableFocusLock}\n autoFocus={false}\n className={cx({ [styles.columnFlexContainer()]: isMobile }, 'focus-lock-container')}\n >\n {!hasHeader && !noClose && (\n <ZIndex\n className={cx({\n [styles.closeWrapper(this.theme)]: true,\n [styles.mobileCloseWrapper(this.theme)]: isMobile,\n })}\n >\n <ModalClose\n className={cx({\n [styles.mobileCloseWithoutHeader()]: isMobile && !this.state.hasHeader,\n })}\n requestClose={this.requestClose}\n disableClose={disableClose}\n />\n </ZIndex>\n )}\n <ModalContext.Provider value={modalContextProps}>{children}</ModalContext.Provider>\n </FocusLock>\n </ResizeDetector>\n </div>\n </div>\n </div>\n )}\n </ResponsiveLayout>\n </ZIndex>\n </CommonWrapper>\n </RenderContainer>\n );\n }\n\n private requestClose = () => {\n if (this.props.disableClose) {\n return;\n }\n if (this.props.onClose) {\n this.props.onClose();\n }\n };\n\n private refContainer = (center: HTMLDivElement | null) => {\n this.containerNode = center;\n };\n\n private handleStackChange = (stack: readonly React.Component[]) => {\n this.setState({ stackPosition: stack.indexOf(this), hasBackground: ModalStack.isBlocking(this) });\n };\n\n private handleContainerMouseDown = (event: React.MouseEvent) => {\n this.mouseDownTarget = event.target;\n };\n\n private handleContainerMouseUp = (event: React.MouseEvent) => {\n this.mouseUpTarget = event.target;\n };\n\n private handleContainerClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (!this.props.ignoreBackgroundClick) {\n const { target, currentTarget } = event;\n if (target === currentTarget && this.mouseDownTarget === currentTarget && this.mouseUpTarget === currentTarget) {\n this.requestClose();\n }\n }\n };\n\n private handleKeyDown = (e: KeyboardEvent) => {\n if (this.state.stackPosition !== 0) {\n return;\n }\n if (isKeyEscape(e)) {\n stopPropagation(e);\n this.requestClose();\n }\n };\n\n private checkHorizontalScrollAppearance = () => {\n let hasScroll = false;\n\n if (this.containerNode) {\n const containerClientWidth = this.containerNode.clientWidth;\n const containerScrollWidth = this.containerNode.scrollWidth;\n hasScroll = containerClientWidth < containerScrollWidth;\n }\n if (hasScroll && !this.state.horizontalScroll) {\n this.setState({ horizontalScroll: true });\n } else if (this.state.horizontalScroll) {\n this.setState({ horizontalScroll: false });\n }\n };\n\n private throttledCheckHorizontalScroll = throttle(this.checkHorizontalScrollAppearance, 100);\n\n private handleResize = () => {\n LayoutEvents.emit();\n };\n\n private setHasHeader = (hasHeader: boolean) => {\n this.setState({ hasHeader });\n };\n\n private setHasFooter = (hasFooter: boolean) => {\n this.setState({ hasFooter });\n };\n\n private setHasPanel = (hasPanel: boolean) => {\n this.setState({ hasPanel });\n };\n}\n"],"mappings":"sEAAA,OAAOA,KAAK,MAA0C,OAAO;AAC7D,OAAOC,SAAS,MAAM,kBAAkB;AACxC,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,SAASC,YAAY,QAAQ,0BAA0B;;AAEvD,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,WAAW,QAAQ,uCAAuC;AACnE,OAAO,KAAKC,YAAY,MAAM,wBAAwB;AACtD,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,eAAe,QAAQ,kCAAkC;AAClE,SAASC,sBAAsB,QAAQ,uCAAuC;AAC9E,SAASC,UAAU,QAAgC,sBAAsB;AACzE,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,SAASC,YAAY,QAAQ,gCAAgC;;AAE7D,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,aAAa,QAAqB,8BAA8B;AACzE,SAASC,EAAE,QAAQ,2BAA2B;AAC9C,SAASC,iBAAiB,QAAQ,6BAA6B;AAC/D,SAASC,gBAAgB,QAAQ,qBAAqB;;AAEtD,SAASC,YAAY,QAA2B,gBAAgB;AAChE,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,SAAS,QAAQ,aAAa;AACvC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,aAAa,QAAQ,iBAAiB;;AAE/C,IAAIC,kBAAkB,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuD1B,OAAO,IAAMC,aAAa,GAAG;EAC3BC,SAAS,E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AAE,EAAAqH,IAAA,OAAAA,IAAA,CACV7G,MAAM,CAAC8H,wBAAwB,CAAC,CAAC,IAAGhB,QAAQ,IAAI,CAAC7B,MAAI,CAAC5D,KAAK,CAACI,SAAS,EAAAoF,IAAA,CACvE,CAAE,EACH7E,YAAY,EAAEiD,MAAI,CAACjD,YAAa,EAChCE,YAAY,EAAEA,YAAa,EAC5B,CACK,CACT,eACD1D,KAAA,CAAAmG,aAAA,CAAChF,YAAY,CAACmF,QAAQ,IAACC,KAAK,EAAEc,iBAAkB,IAAEP,QAAgC,CACzE,CACG,CACb,CACF,CACF,CAAC,EAEQ,CACZ,CACK,CACA,CAAC,CAEtB,CAAC,QAAA/E,KAAA,GA5LwB/B,KAAK,CAACuJ,SAAS,EAA7BxH,KAAK,CACFyH,mBAAmB,GAAG,OAAO,CADhCzH,KAAK,CAEF0H,WAAW,GAAG,OAAO,CAFxB1H,KAAK,CAIF2H,MAAM,GAAGrI,WAAW,CAJvBU,KAAK,CAKF4H,IAAI,GAAGrI,SAAS,CALnBS,KAAK,CAMF6H,MAAM,GAAGxI,WAAW,CANvBW,KAAK,CAQFa,YAAY,GAAiB,EACzC;EACAwE,gBAAgB,EAAEtG,MAAM,EACxBqG,IAAI,EAAE,QAAQ,CAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ModalContext","createContext","displayName"],"sources":["ModalContext.tsx"],"sourcesContent":["import React from 'react';\n\nimport { CommonProps } from '../../internal/CommonWrapper';\n\nexport interface CloseProps extends CommonProps {\n disableClose?: boolean;\n requestClose: () => void;\n}\n\nexport interface ModalContextProps {\n additionalPadding?: boolean;\n hasHeader?: boolean;\n close?: CloseProps;\n horizontalScroll?: boolean;\n setHasHeader?: (value
|
|
1
|
+
{"version":3,"names":["React","ModalContext","createContext","displayName"],"sources":["ModalContext.tsx"],"sourcesContent":["import React from 'react';\n\nimport { CommonProps } from '../../internal/CommonWrapper';\n\nexport interface CloseProps extends CommonProps {\n disableClose?: boolean;\n requestClose: () => void;\n}\n\nexport interface ModalContextProps {\n additionalPadding?: boolean;\n hasHeader?: boolean;\n close?: CloseProps;\n horizontalScroll?: boolean;\n setHasHeader?: (value: boolean) => void;\n setHasFooter?: (value: boolean) => void;\n setHasPanel?: (value: boolean) => void;\n}\n\nexport const ModalContext = React.createContext<ModalContextProps>({});\n\nModalContext.displayName = 'ModalContext';\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;;;;;;;;;;;;;;;;;;AAmBzB,OAAO,IAAMC,YAAY,gBAAGD,KAAK,CAACE,aAAa,CAAoB,CAAC,CAAC,CAAC;;AAEtED,YAAY,CAACE,WAAW,GAAG,cAAc","ignoreList":[]}
|
|
@@ -9,8 +9,8 @@ export interface ModalContextProps {
|
|
|
9
9
|
hasHeader?: boolean;
|
|
10
10
|
close?: CloseProps;
|
|
11
11
|
horizontalScroll?: boolean;
|
|
12
|
-
setHasHeader?: (value
|
|
13
|
-
setHasFooter?: (value
|
|
14
|
-
setHasPanel?: (value
|
|
12
|
+
setHasHeader?: (value: boolean) => void;
|
|
13
|
+
setHasFooter?: (value: boolean) => void;
|
|
14
|
+
setHasPanel?: (value: boolean) => void;
|
|
15
15
|
}
|
|
16
16
|
export declare const ModalContext: React.Context<ModalContextProps>;
|
|
@@ -29,8 +29,8 @@ function ModalFooter(props) {
|
|
|
29
29
|
panel = props.panel,
|
|
30
30
|
children = props.children;
|
|
31
31
|
useLayoutEffect(function () {
|
|
32
|
-
modal.setHasFooter == null || modal.setHasFooter();
|
|
33
|
-
modal.setHasPanel == null || modal.setHasPanel(panel);
|
|
32
|
+
modal.setHasFooter == null || modal.setHasFooter(true);
|
|
33
|
+
modal.setHasPanel == null || modal.setHasPanel(panel || false);
|
|
34
34
|
return function () {
|
|
35
35
|
modal.setHasFooter == null || modal.setHasFooter(false);
|
|
36
36
|
modal.setHasPanel == null || modal.setHasPanel(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useContext","useLayoutEffect","getScrollWidth","Sticky","ThemeContext","CommonWrapper","cx","useResponsiveLayout","Gapped","isNonNullable","styles","ModalContext","ModalSeparator","ModalFooterDataTids","root","ModalFooter","props","theme","modal","layout","_props$sticky","sticky","isMobile","gap","panel","children","setHasFooter","setHasPanel","renderContent","fixed","createElement","className","footer","fixedFooter","Boolean","fixedPanel","mobileFooter","vertical","side","offset","horizontalScroll","__KONTUR_REACT_UI__","displayName","__MODAL_FOOTER__"],"sources":["ModalFooter.tsx"],"sourcesContent":["import React, { ReactNode, useContext, useLayoutEffect } from 'react';\n\nimport { getScrollWidth } from '../../lib/dom/getScrollWidth';\nimport { Sticky } from '../Sticky';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { CommonWrapper, CommonProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { useResponsiveLayout } from '../ResponsiveLayout';\nimport { Gapped, GappedProps } from '../Gapped';\nimport { isNonNullable } from '../../lib/utils';\n\nimport { styles } from './Modal.styles';\nimport { ModalContext } from './ModalContext';\nimport { ModalSeparator } from './ModalSeparator';\n\nexport interface ModalFooterProps extends CommonProps {\n /**\n * Включает серый цвет в футере\n */\n panel?: boolean;\n /**\n * Закрепляет футер снизу модального окна\n *\n * На десктопе по умолчанию равен `true`\n * На мобильных по умолчанию равен `false`\n */\n sticky?: boolean;\n /**\n * Контент футера\n */\n children?: ReactNode;\n /**\n * Задаёт отступ между элементами футера\n */\n gap?: GappedProps['gap'];\n}\n\nexport const ModalFooterDataTids = {\n root: 'ModalFooter__root',\n} as const;\n\n/**\n * Футер модального окна.\n *\n * @visibleName Modal.Footer\n */\nfunction ModalFooter(props: ModalFooterProps) {\n const theme = useContext(ThemeContext);\n const modal = useContext(ModalContext);\n const layout = useResponsiveLayout();\n\n const { sticky = !layout.isMobile, gap, panel, children } = props;\n\n useLayoutEffect(() => {\n modal.setHasFooter?.();\n modal.setHasPanel?.(panel);\n\n return () => {\n modal.setHasFooter?.(false);\n modal.setHasPanel?.(false);\n };\n }, [panel]);\n\n const renderContent = (fixed = false) => {\n return (\n <div>\n {(panel || fixed) && <ModalSeparator fixed={fixed} />}\n <div\n data-tid={ModalFooterDataTids.root}\n className={cx(\n styles.footer(theme),\n fixed && styles.fixedFooter(theme),\n Boolean(panel) && styles.panel(theme),\n fixed && Boolean(panel) && styles.fixedPanel(theme),\n layout.isMobile && styles.mobileFooter(theme),\n )}\n >\n {isNonNullable(gap) ? (\n <Gapped vertical={layout.isMobile} gap={gap}>\n {children}\n </Gapped>\n ) : (\n children\n )}\n </div>\n </div>\n );\n };\n\n return (\n <CommonWrapper {...props}>\n {sticky ? (\n <Sticky side=\"bottom\" offset={modal.horizontalScroll ? getScrollWidth() : 0}>\n {renderContent}\n </Sticky>\n ) : (\n renderContent()\n )}\n </CommonWrapper>\n );\n}\n\nModalFooter.__KONTUR_REACT_UI__ = 'ModalFooter';\nModalFooter.displayName = 'ModalFooter';\nModalFooter.__MODAL_FOOTER__ = true;\n\nexport { ModalFooter };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAeC,UAAU,EAAEC,eAAe,QAAQ,OAAO;;AAErE,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,aAAa,QAAqB,8BAA8B;AACzE,SAASC,EAAE,QAAQ,2BAA2B;AAC9C,SAASC,mBAAmB,QAAQ,qBAAqB;AACzD,SAASC,MAAM,QAAqB,WAAW;AAC/C,SAASC,aAAa,QAAQ,iBAAiB;;AAE/C,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,cAAc,QAAQ,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;AAwBjD,OAAO,IAAMC,mBAAmB,GAAG;EACjCC,IAAI,EAAE;AACR,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAACC,KAAuB,EAAE;EAC5C,IAAMC,KAAK,GAAGjB,UAAU,CAACI,YAAY,CAAC;EACtC,IAAMc,KAAK,GAAGlB,UAAU,CAACW,YAAY,CAAC;EACtC,IAAMQ,MAAM,GAAGZ,mBAAmB,CAAC,CAAC;;EAEpC,IAAAa,aAAA,GAA4DJ,KAAK,CAAzDK,MAAM,CAANA,MAAM,GAAAD,aAAA,cAAG,CAACD,MAAM,CAACG,QAAQ,GAAAF,aAAA,CAAEG,GAAG,GAAsBP,KAAK,CAA9BO,GAAG,CAAEC,KAAK,GAAeR,KAAK,CAAzBQ,KAAK,CAAEC,QAAQ,GAAKT,KAAK,CAAlBS,QAAQ;;EAEvDxB,eAAe,CAAC,YAAM;IACpBiB,KAAK,CAACQ,YAAY,YAAlBR,KAAK,CAACQ,YAAY,CAAG,CAAC;
|
|
1
|
+
{"version":3,"names":["React","useContext","useLayoutEffect","getScrollWidth","Sticky","ThemeContext","CommonWrapper","cx","useResponsiveLayout","Gapped","isNonNullable","styles","ModalContext","ModalSeparator","ModalFooterDataTids","root","ModalFooter","props","theme","modal","layout","_props$sticky","sticky","isMobile","gap","panel","children","setHasFooter","setHasPanel","renderContent","fixed","createElement","className","footer","fixedFooter","Boolean","fixedPanel","mobileFooter","vertical","side","offset","horizontalScroll","__KONTUR_REACT_UI__","displayName","__MODAL_FOOTER__"],"sources":["ModalFooter.tsx"],"sourcesContent":["import React, { ReactNode, useContext, useLayoutEffect } from 'react';\n\nimport { getScrollWidth } from '../../lib/dom/getScrollWidth';\nimport { Sticky } from '../Sticky';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { CommonWrapper, CommonProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { useResponsiveLayout } from '../ResponsiveLayout';\nimport { Gapped, GappedProps } from '../Gapped';\nimport { isNonNullable } from '../../lib/utils';\n\nimport { styles } from './Modal.styles';\nimport { ModalContext } from './ModalContext';\nimport { ModalSeparator } from './ModalSeparator';\n\nexport interface ModalFooterProps extends CommonProps {\n /**\n * Включает серый цвет в футере\n */\n panel?: boolean;\n /**\n * Закрепляет футер снизу модального окна\n *\n * На десктопе по умолчанию равен `true`\n * На мобильных по умолчанию равен `false`\n */\n sticky?: boolean;\n /**\n * Контент футера\n */\n children?: ReactNode;\n /**\n * Задаёт отступ между элементами футера\n */\n gap?: GappedProps['gap'];\n}\n\nexport const ModalFooterDataTids = {\n root: 'ModalFooter__root',\n} as const;\n\n/**\n * Футер модального окна.\n *\n * @visibleName Modal.Footer\n */\nfunction ModalFooter(props: ModalFooterProps) {\n const theme = useContext(ThemeContext);\n const modal = useContext(ModalContext);\n const layout = useResponsiveLayout();\n\n const { sticky = !layout.isMobile, gap, panel, children } = props;\n\n useLayoutEffect(() => {\n modal.setHasFooter?.(true);\n modal.setHasPanel?.(panel || false);\n\n return () => {\n modal.setHasFooter?.(false);\n modal.setHasPanel?.(false);\n };\n }, [panel]);\n\n const renderContent = (fixed = false) => {\n return (\n <div>\n {(panel || fixed) && <ModalSeparator fixed={fixed} />}\n <div\n data-tid={ModalFooterDataTids.root}\n className={cx(\n styles.footer(theme),\n fixed && styles.fixedFooter(theme),\n Boolean(panel) && styles.panel(theme),\n fixed && Boolean(panel) && styles.fixedPanel(theme),\n layout.isMobile && styles.mobileFooter(theme),\n )}\n >\n {isNonNullable(gap) ? (\n <Gapped vertical={layout.isMobile} gap={gap}>\n {children}\n </Gapped>\n ) : (\n children\n )}\n </div>\n </div>\n );\n };\n\n return (\n <CommonWrapper {...props}>\n {sticky ? (\n <Sticky side=\"bottom\" offset={modal.horizontalScroll ? getScrollWidth() : 0}>\n {renderContent}\n </Sticky>\n ) : (\n renderContent()\n )}\n </CommonWrapper>\n );\n}\n\nModalFooter.__KONTUR_REACT_UI__ = 'ModalFooter';\nModalFooter.displayName = 'ModalFooter';\nModalFooter.__MODAL_FOOTER__ = true;\n\nexport { ModalFooter };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAeC,UAAU,EAA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AE;IACzE0B;IACK,CAAC;;IAETA,aAAa,CAAC;;IAEH,CAAC;;AAEpB;;AAEAb,WAAW,CAAC0B,mBAAmB,GAAG,aAAa;AAC/C1B,WAAW,CAAC2B,WAAW,GAAG,aAAa;AACvC3B,WAAW,CAAC4B,gBAAgB,GAAG,IAAI;;AAEnC,SAAS5B,WAAW","ignoreList":[]}
|
|
@@ -25,7 +25,7 @@ function ModalHeader(props) {
|
|
|
25
25
|
sticky = _props$sticky === void 0 ? !layout.isMobile : _props$sticky,
|
|
26
26
|
children = props.children;
|
|
27
27
|
useLayoutEffect(function () {
|
|
28
|
-
modal.setHasHeader == null || modal.setHasHeader();
|
|
28
|
+
modal.setHasHeader == null || modal.setHasHeader(true);
|
|
29
29
|
return function () {
|
|
30
30
|
return modal.setHasHeader == null ? void 0 : modal.setHasHeader(false);
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useContext","useLayoutEffect","Sticky","ThemeContext","CommonWrapper","cx","useResponsiveLayout","styles","ModalClose","ModalContext","ModalSeparator","ModalHeaderDataTids","root","ModalHeader","props","theme","modal","layout","_props$sticky","sticky","isMobile","children","setHasHeader","renderContent","fixed","createElement","className","header","mobileHeader","Boolean","additionalPadding","headerAddPadding","fixedHeader","mobileFixedHeader","close","headerWithClose","mobileHeaderWithClose","requestClose","disableClose","side","__KONTUR_REACT_UI__","displayName","__MODAL_HEADER__"],"sources":["ModalHeader.tsx"],"sourcesContent":["import React, { ReactNode, useContext, useLayoutEffect } from 'react';\n\nimport { Sticky } from '../Sticky';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { CommonWrapper, CommonProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { useResponsiveLayout } from '../ResponsiveLayout';\n\nimport { styles } from './Modal.styles';\nimport { ModalClose } from './ModalClose';\nimport { ModalContext } from './ModalContext';\nimport { ModalSeparator } from './ModalSeparator';\n\nexport interface ModalHeaderProps extends CommonProps {\n sticky?: boolean;\n children?: ReactNode;\n}\n\nexport const ModalHeaderDataTids = {\n root: 'ModalHeader__root',\n} as const;\n\n/**\n * Шапка модального окна\n *\n * @visibleName Modal.Header\n */\nfunction ModalHeader(props: ModalHeaderProps) {\n const theme = useContext(ThemeContext);\n const modal = useContext(ModalContext);\n const layout = useResponsiveLayout();\n\n const { sticky = !layout.isMobile, children } = props;\n\n useLayoutEffect(() => {\n modal.setHasHeader?.();\n\n return () => modal.setHasHeader?.(false);\n }, []);\n\n const renderContent = (fixed = false) => {\n return (\n <div>\n <div\n data-tid={ModalHeaderDataTids.root}\n className={cx(\n styles.header(theme),\n layout.isMobile && styles.mobileHeader(theme),\n Boolean(modal.additionalPadding) && styles.headerAddPadding(theme),\n fixed && styles.fixedHeader(theme),\n fixed && layout.isMobile && styles.mobileFixedHeader(theme),\n Boolean(modal.close) && styles.headerWithClose(theme),\n Boolean(modal.close) && layout.isMobile && styles.mobileHeaderWithClose(theme),\n )}\n >\n {modal.close && (\n <ModalClose requestClose={modal.close.requestClose} disableClose={modal.close.disableClose} />\n )}\n {children}\n </div>\n {fixed && <ModalSeparator fixed={fixed} />}\n </div>\n );\n };\n\n return (\n <CommonWrapper {...props}>{sticky ? <Sticky side=\"top\">{renderContent}</Sticky> : renderContent()}</CommonWrapper>\n );\n}\n\nModalHeader.__KONTUR_REACT_UI__ = 'ModalHeader';\nModalHeader.displayName = 'ModalHeader';\nModalHeader.__MODAL_HEADER__ = true;\n\nexport { ModalHeader };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAeC,UAAU,EAAEC,eAAe,QAAQ,OAAO;;AAErE,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,aAAa,QAAqB,8BAA8B;AACzE,SAASC,EAAE,QAAQ,2BAA2B;AAC9C,SAASC,mBAAmB,QAAQ,qBAAqB;;AAEzD,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,cAAc,QAAQ,kBAAkB;;;;;;;AAOjD,OAAO,IAAMC,mBAAmB,GAAG;EACjCC,IAAI,EAAE;AACR,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,SAASC,WAAWA,CAACC,KAAuB,EAAE;EAC5C,IAAMC,KAAK,GAAGf,UAAU,CAACG,YAAY,CAAC;EACtC,IAAMa,KAAK,GAAGhB,UAAU,CAACS,YAAY,CAAC;EACtC,IAAMQ,MAAM,GAAGX,mBAAmB,CAAC,CAAC;;EAEpC,IAAAY,aAAA,GAAgDJ,KAAK,CAA7CK,MAAM,CAANA,MAAM,GAAAD,aAAA,cAAG,CAACD,MAAM,CAACG,QAAQ,GAAAF,aAAA,CAAEG,QAAQ,GAAKP,KAAK,CAAlBO,QAAQ;;EAE3CpB,eAAe,CAAC,YAAM;IACpBe,KAAK,CAACM,YAAY,YAAlBN,KAAK,CAACM,YAAY,CAAG,CAAC;;
|
|
1
|
+
{"version":3,"names":["React","useContext","useLayoutEffect","Sticky","ThemeContext","CommonWrapper","cx","useResponsiveLayout","styles","ModalClose","ModalContext","ModalSeparator","ModalHeaderDataTids","root","ModalHeader","props","theme","modal","layout","_props$sticky","sticky","isMobile","children","setHasHeader","renderContent","fixed","createElement","className","header","mobileHeader","Boolean","additionalPadding","headerAddPadding","fixedHeader","mobileFixedHeader","close","headerWithClose","mobileHeaderWithClose","requestClose","disableClose","side","__KONTUR_REACT_UI__","displayName","__MODAL_HEADER__"],"sources":["ModalHeader.tsx"],"sourcesContent":["import React, { ReactNode, useContext, useLayoutEffect } from 'react';\n\nimport { Sticky } from '../Sticky';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { CommonWrapper, CommonProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { useResponsiveLayout } from '../ResponsiveLayout';\n\nimport { styles } from './Modal.styles';\nimport { ModalClose } from './ModalClose';\nimport { ModalContext } from './ModalContext';\nimport { ModalSeparator } from './ModalSeparator';\n\nexport interface ModalHeaderProps extends CommonProps {\n sticky?: boolean;\n children?: ReactNode;\n}\n\nexport const ModalHeaderDataTids = {\n root: 'ModalHeader__root',\n} as const;\n\n/**\n * Шапка модального окна\n *\n * @visibleName Modal.Header\n */\nfunction ModalHeader(props: ModalHeaderProps) {\n const theme = useContext(ThemeContext);\n const modal = useContext(ModalContext);\n const layout = useResponsiveLayout();\n\n const { sticky = !layout.isMobile, children } = props;\n\n useLayoutEffect(() => {\n modal.setHasHeader?.(true);\n\n return () => modal.setHasHeader?.(false);\n }, []);\n\n const renderContent = (fixed = false) => {\n return (\n <div>\n <div\n data-tid={ModalHeaderDataTids.root}\n className={cx(\n styles.header(theme),\n layout.isMobile && styles.mobileHeader(theme),\n Boolean(modal.additionalPadding) && styles.headerAddPadding(theme),\n fixed && styles.fixedHeader(theme),\n fixed && layout.isMobile && styles.mobileFixedHeader(theme),\n Boolean(modal.close) && styles.headerWithClose(theme),\n Boolean(modal.close) && layout.isMobile && styles.mobileHeaderWithClose(theme),\n )}\n >\n {modal.close && (\n <ModalClose requestClose={modal.close.requestClose} disableClose={modal.close.disableClose} />\n )}\n {children}\n </div>\n {fixed && <ModalSeparator fixed={fixed} />}\n </div>\n );\n };\n\n return (\n <CommonWrapper {...props}>{sticky ? <Sticky side=\"top\">{renderContent}</Sticky> : renderContent()}</CommonWrapper>\n );\n}\n\nModalHeader.__KONTUR_REACT_UI__ = 'ModalHeader';\nModalHeader.displayName = 'ModalHeader';\nModalHeader.__MODAL_HEADER__ = true;\n\nexport { ModalHeader };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAeC,UAAU,EAAEC,eAAe,QAAQ,OAAO;;AAErE,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,aAAa,QAAqB,8BAA8B;AACzE,SAASC,EAAE,QAAQ,2BAA2B;AAC9C,SAASC,mBAAmB,QAA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