@skbkontur/react-ui 5.0.8 → 5.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/cjs/components/Autocomplete/__creevey__/Autocomplete.creevey.mts +239 -0
- package/cjs/components/Button/__creevey__/Button.creevey.mts +251 -0
- package/cjs/components/Calendar/__creevey__/Calendar.creevey.mts +74 -0
- package/cjs/components/Checkbox/__creevey__/Checkbox.creevey.mts +243 -0
- package/cjs/components/ComboBox/__creevey__/ComboBox.creevey.mts +541 -0
- package/cjs/components/CurrencyInput/__creevey__/CurrencyInput.creevey.mts +81 -0
- package/cjs/components/DateInput/__creevey__/DateInput.creevey.mts +156 -0
- package/cjs/components/DatePicker/__creevey__/DatePicker.creevey.mts +209 -0
- package/cjs/components/Dropdown/__creevey__/Dropdown.creevey.mts +184 -0
- package/cjs/components/DropdownMenu/__creevey__/DropdownMenu.creevey.mts +263 -0
- package/cjs/components/FxInput/__creevey__/FxInput.creevey.mts +21 -0
- package/cjs/components/Group/__creevey__/Group.creevey.mts +19 -0
- package/cjs/components/Hint/__creevey__/Hint.creevey.mts +68 -0
- package/cjs/components/Input/__creevey__/Input.creevey.mts +239 -0
- package/cjs/components/Kebab/__creevey__/Kebab.creevey.mts +147 -0
- package/cjs/components/Link/__creevey__/Link.creevey.mts +162 -0
- package/cjs/components/Loader/__creevey__/Loader.creevey.mts +35 -0
- package/cjs/components/MaskedInput/__creevey__/MaskedInput.creevey.mts +216 -0
- package/cjs/components/Modal/Modal.js +7 -10
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Modal/ModalContext.d.ts +3 -3
- package/cjs/components/Modal/ModalContext.js.map +1 -1
- package/cjs/components/Modal/ModalFooter.js +2 -2
- package/cjs/components/Modal/ModalFooter.js.map +1 -1
- package/cjs/components/Modal/ModalHeader.js +1 -1
- package/cjs/components/Modal/ModalHeader.js.map +1 -1
- package/cjs/components/Modal/__creevey__/Modal.creevey.mts +281 -0
- package/cjs/components/Paging/__creevey__/Paging.creevey.mts +97 -0
- package/cjs/components/PasswordInput/__creevey__/PasswordInput.creevey.mts +38 -0
- package/cjs/components/Radio/__creevey__/Radio.creevey.mts +28 -0
- package/cjs/components/RadioGroup/__creevey__/RadioGroup.creevey.mts +86 -0
- package/cjs/components/ScrollContainer/__creevey__/ScrollContainer.creevey.mts +247 -0
- package/cjs/components/Select/Select.d.ts +1 -6
- package/cjs/components/Select/Select.js +7 -10
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/__creevey__/Select.creevey.mts +293 -0
- package/cjs/components/Select/tids.d.ts +5 -0
- package/cjs/components/Select/tids.js +5 -0
- package/cjs/components/Select/tids.js.map +1 -0
- package/cjs/components/SidePage/__creevey__/SidePage.creevey.mts +319 -0
- package/cjs/components/Sticky/__creevey__/Sticky.creevey.mts +98 -0
- package/cjs/components/Switcher/__creevey__/Switcher.creevey.mts +24 -0
- package/cjs/components/Tabs/__creevey__/Tabs.creevey.mts +239 -0
- package/cjs/components/Textarea/__creevey__/Textarea.creevey.mts +177 -0
- package/cjs/components/Toast/__creevey__/Toast.creevey.mts +54 -0
- package/cjs/components/Toggle/__creevey__/Toggle.creevey.mts +87 -0
- package/cjs/components/TokenInput/__creevey__/TokenInput.creevey.mts +414 -0
- package/cjs/components/Tooltip/__creevey__/Tooltip.creevey.mts +533 -0
- package/cjs/components/TooltipMenu/__creevey__/TooltipMenu.creevey.mts +131 -0
- package/cjs/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.mts +48 -0
- package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +1 -3
- package/cjs/internal/CustomComboBox/CustomComboBox.js +4 -6
- package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
- package/cjs/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.mts +30 -0
- package/cjs/internal/CustomComboBox/tids.d.ts +3 -0
- package/cjs/internal/CustomComboBox/tids.js +3 -0
- package/cjs/internal/CustomComboBox/tids.js.map +1 -0
- package/cjs/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.mts +25 -0
- package/cjs/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.mts +83 -0
- package/cjs/internal/Menu/__creevey__/Menu.creevey.mts +90 -0
- package/cjs/internal/PopupMenu/PopupMenu.d.ts +1 -5
- package/cjs/internal/PopupMenu/PopupMenu.js +8 -10
- package/cjs/internal/PopupMenu/PopupMenu.js.map +1 -1
- package/cjs/internal/PopupMenu/__creevey__/PopupMenu.creevey.mts +37 -0
- package/cjs/internal/PopupMenu/tids.d.ts +4 -0
- package/cjs/internal/PopupMenu/tids.js +4 -0
- package/cjs/internal/PopupMenu/tids.js.map +1 -0
- package/cjs/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.mts +68 -0
- package/cjs/internal/ThemeShowcase/VariablesCollector.js +1 -0
- package/cjs/internal/ThemeShowcase/VariablesCollector.js.map +1 -1
- package/cjs/internal/ZIndex/__creevey__/ZIndex.creevey.mts +228 -0
- package/cjs/lib/delay.d.ts +1 -0
- package/cjs/lib/delay.js +3 -0
- package/cjs/lib/delay.js.map +1 -0
- package/cjs/lib/utils.d.ts +3 -3
- package/cjs/lib/utils.js +5 -4
- package/cjs/lib/utils.js.map +1 -1
- package/components/Autocomplete/__creevey__/Autocomplete.creevey.mts +239 -0
- package/components/Button/__creevey__/Button.creevey.mts +251 -0
- package/components/Calendar/__creevey__/Calendar.creevey.mts +74 -0
- package/components/Checkbox/__creevey__/Checkbox.creevey.mts +243 -0
- package/components/ComboBox/__creevey__/ComboBox.creevey.mts +541 -0
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey.mts +81 -0
- package/components/DateInput/__creevey__/DateInput.creevey.mts +156 -0
- package/components/DatePicker/__creevey__/DatePicker.creevey.mts +209 -0
- package/components/Dropdown/__creevey__/Dropdown.creevey.mts +184 -0
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey.mts +263 -0
- package/components/FxInput/__creevey__/FxInput.creevey.mts +21 -0
- package/components/Group/__creevey__/Group.creevey.mts +19 -0
- package/components/Hint/__creevey__/Hint.creevey.mts +68 -0
- package/components/Input/__creevey__/Input.creevey.mts +239 -0
- package/components/Kebab/__creevey__/Kebab.creevey.mts +147 -0
- package/components/Link/__creevey__/Link.creevey.mts +162 -0
- package/components/Loader/__creevey__/Loader.creevey.mts +35 -0
- package/components/MaskedInput/__creevey__/MaskedInput.creevey.mts +216 -0
- package/components/Modal/Modal/Modal.js +4 -16
- package/components/Modal/Modal/Modal.js.map +1 -1
- package/components/Modal/ModalContext/ModalContext.js.map +1 -1
- package/components/Modal/ModalContext.d.ts +3 -3
- package/components/Modal/ModalFooter/ModalFooter.js +2 -2
- package/components/Modal/ModalFooter/ModalFooter.js.map +1 -1
- package/components/Modal/ModalHeader/ModalHeader.js +1 -1
- package/components/Modal/ModalHeader/ModalHeader.js.map +1 -1
- package/components/Modal/__creevey__/Modal.creevey.mts +281 -0
- package/components/Paging/__creevey__/Paging.creevey.mts +97 -0
- package/components/PasswordInput/__creevey__/PasswordInput.creevey.mts +38 -0
- package/components/Radio/__creevey__/Radio.creevey.mts +28 -0
- package/components/RadioGroup/__creevey__/RadioGroup.creevey.mts +86 -0
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey.mts +247 -0
- package/components/Select/Select/Select.js +2 -5
- package/components/Select/Select/Select.js.map +1 -1
- package/components/Select/Select.d.ts +1 -6
- package/components/Select/__creevey__/Select.creevey.mts +293 -0
- package/components/Select/tids/package.json +6 -0
- package/components/Select/tids/tids.js +5 -0
- package/components/Select/tids/tids.js.map +1 -0
- package/components/Select/tids.d.ts +5 -0
- package/components/SidePage/__creevey__/SidePage.creevey.mts +319 -0
- package/components/Sticky/__creevey__/Sticky.creevey.mts +98 -0
- package/components/Switcher/__creevey__/Switcher.creevey.mts +24 -0
- package/components/Tabs/__creevey__/Tabs.creevey.mts +239 -0
- package/components/Textarea/__creevey__/Textarea.creevey.mts +177 -0
- package/components/Toast/__creevey__/Toast.creevey.mts +54 -0
- package/components/Toggle/__creevey__/Toggle.creevey.mts +87 -0
- package/components/TokenInput/__creevey__/TokenInput.creevey.mts +414 -0
- package/components/Tooltip/__creevey__/Tooltip.creevey.mts +533 -0
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey.mts +131 -0
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.mts +48 -0
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +1 -3
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.d.ts +1 -3
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.mts +30 -0
- package/internal/CustomComboBox/tids/package.json +6 -0
- package/internal/CustomComboBox/tids/tids.js +3 -0
- package/internal/CustomComboBox/tids/tids.js.map +1 -0
- package/internal/CustomComboBox/tids.d.ts +3 -0
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.mts +25 -0
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.mts +83 -0
- package/internal/Menu/__creevey__/Menu.creevey.mts +90 -0
- package/internal/PopupMenu/PopupMenu/PopupMenu.js +2 -4
- package/internal/PopupMenu/PopupMenu/PopupMenu.js.map +1 -1
- package/internal/PopupMenu/PopupMenu.d.ts +1 -5
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey.mts +37 -0
- package/internal/PopupMenu/tids/package.json +6 -0
- package/internal/PopupMenu/tids/tids.js +4 -0
- package/internal/PopupMenu/tids/tids.js.map +1 -0
- package/internal/PopupMenu/tids.d.ts +4 -0
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.mts +68 -0
- package/internal/ThemeShowcase/VariablesCollector/VariablesCollector.js +2 -0
- package/internal/ThemeShowcase/VariablesCollector/VariablesCollector.js.map +1 -1
- package/internal/ZIndex/__creevey__/ZIndex.creevey.mts +228 -0
- package/lib/delay/delay.js +6 -0
- package/lib/delay/delay.js.map +1 -0
- package/lib/delay/package.json +6 -0
- package/lib/delay.d.ts +1 -0
- package/lib/utils/utils.js +3 -7
- package/lib/utils/utils.js.map +1 -1
- package/lib/utils.d.ts +3 -3
- package/package.json +6 -5
- package/cjs/components/Autocomplete/__creevey__/Autocomplete.creevey.js +0 -239
- package/cjs/components/Autocomplete/__creevey__/Autocomplete.creevey.js.map +0 -1
- package/cjs/components/Button/__creevey__/Button.creevey.js +0 -250
- package/cjs/components/Button/__creevey__/Button.creevey.js.map +0 -1
- package/cjs/components/Calendar/__creevey__/Calendar.creevey.js +0 -74
- package/cjs/components/Calendar/__creevey__/Calendar.creevey.js.map +0 -1
- package/cjs/components/Checkbox/__creevey__/Checkbox.creevey.js +0 -242
- package/cjs/components/Checkbox/__creevey__/Checkbox.creevey.js.map +0 -1
- package/cjs/components/ComboBox/__creevey__/ComboBox.creevey.js +0 -540
- package/cjs/components/ComboBox/__creevey__/ComboBox.creevey.js.map +0 -1
- package/cjs/components/CurrencyInput/__creevey__/CurrencyInput.creevey.js +0 -81
- package/cjs/components/CurrencyInput/__creevey__/CurrencyInput.creevey.js.map +0 -1
- package/cjs/components/DateInput/__creevey__/DateInput.creevey.js +0 -155
- package/cjs/components/DateInput/__creevey__/DateInput.creevey.js.map +0 -1
- package/cjs/components/DatePicker/__creevey__/DatePicker.creevey.js +0 -209
- package/cjs/components/DatePicker/__creevey__/DatePicker.creevey.js.map +0 -1
- package/cjs/components/Dropdown/__creevey__/Dropdown.creevey.js +0 -184
- package/cjs/components/Dropdown/__creevey__/Dropdown.creevey.js.map +0 -1
- package/cjs/components/DropdownMenu/__creevey__/DropdownMenu.creevey.js +0 -262
- package/cjs/components/DropdownMenu/__creevey__/DropdownMenu.creevey.js.map +0 -1
- package/cjs/components/FxInput/__creevey__/FxInput.creevey.js +0 -21
- package/cjs/components/FxInput/__creevey__/FxInput.creevey.js.map +0 -1
- package/cjs/components/Group/__creevey__/Group.creevey.js +0 -19
- package/cjs/components/Group/__creevey__/Group.creevey.js.map +0 -1
- package/cjs/components/Hint/__creevey__/Hint.creevey.js +0 -68
- package/cjs/components/Hint/__creevey__/Hint.creevey.js.map +0 -1
- package/cjs/components/Input/__creevey__/Input.creevey.js +0 -239
- package/cjs/components/Input/__creevey__/Input.creevey.js.map +0 -1
- package/cjs/components/Kebab/__creevey__/Kebab.creevey.js +0 -146
- package/cjs/components/Kebab/__creevey__/Kebab.creevey.js.map +0 -1
- package/cjs/components/Link/__creevey__/Link.creevey.js +0 -161
- package/cjs/components/Link/__creevey__/Link.creevey.js.map +0 -1
- package/cjs/components/Loader/__creevey__/Loader.creevey.js +0 -34
- package/cjs/components/Loader/__creevey__/Loader.creevey.js.map +0 -1
- package/cjs/components/MaskedInput/__creevey__/MaskedInput.creevey.js +0 -219
- package/cjs/components/MaskedInput/__creevey__/MaskedInput.creevey.js.map +0 -1
- package/cjs/components/Modal/__creevey__/Modal.creevey.js +0 -258
- package/cjs/components/Modal/__creevey__/Modal.creevey.js.map +0 -1
- package/cjs/components/Paging/__creevey__/Paging.creevey.js +0 -96
- package/cjs/components/Paging/__creevey__/Paging.creevey.js.map +0 -1
- package/cjs/components/PasswordInput/__creevey__/PasswordInput.creevey.js +0 -38
- package/cjs/components/PasswordInput/__creevey__/PasswordInput.creevey.js.map +0 -1
- package/cjs/components/Radio/__creevey__/Radio.creevey.js +0 -27
- package/cjs/components/Radio/__creevey__/Radio.creevey.js.map +0 -1
- package/cjs/components/RadioGroup/__creevey__/RadioGroup.creevey.js +0 -85
- package/cjs/components/RadioGroup/__creevey__/RadioGroup.creevey.js.map +0 -1
- package/cjs/components/ScrollContainer/__creevey__/ScrollContainer.creevey.js +0 -247
- package/cjs/components/ScrollContainer/__creevey__/ScrollContainer.creevey.js.map +0 -1
- package/cjs/components/Select/__creevey__/Select.creevey.js +0 -284
- package/cjs/components/Select/__creevey__/Select.creevey.js.map +0 -1
- package/cjs/components/SidePage/__creevey__/SidePage.creevey.js +0 -313
- package/cjs/components/SidePage/__creevey__/SidePage.creevey.js.map +0 -1
- package/cjs/components/Sticky/__creevey__/Sticky.creevey.js +0 -98
- package/cjs/components/Sticky/__creevey__/Sticky.creevey.js.map +0 -1
- package/cjs/components/Switcher/__creevey__/Switcher.creevey.js +0 -24
- package/cjs/components/Switcher/__creevey__/Switcher.creevey.js.map +0 -1
- package/cjs/components/Tabs/__creevey__/Tabs.creevey.js +0 -238
- package/cjs/components/Tabs/__creevey__/Tabs.creevey.js.map +0 -1
- package/cjs/components/Textarea/__creevey__/Textarea.creevey.js +0 -176
- package/cjs/components/Textarea/__creevey__/Textarea.creevey.js.map +0 -1
- package/cjs/components/Toast/__creevey__/Toast.creevey.js +0 -54
- package/cjs/components/Toast/__creevey__/Toast.creevey.js.map +0 -1
- package/cjs/components/Toggle/__creevey__/Toggle.creevey.js +0 -87
- package/cjs/components/Toggle/__creevey__/Toggle.creevey.js.map +0 -1
- package/cjs/components/TokenInput/__creevey__/TokenInput.creevey.js +0 -413
- package/cjs/components/TokenInput/__creevey__/TokenInput.creevey.js.map +0 -1
- package/cjs/components/Tooltip/__creevey__/Tooltip.creevey.js +0 -534
- package/cjs/components/Tooltip/__creevey__/Tooltip.creevey.js.map +0 -1
- package/cjs/components/TooltipMenu/__creevey__/TooltipMenu.creevey.js +0 -130
- package/cjs/components/TooltipMenu/__creevey__/TooltipMenu.creevey.js.map +0 -1
- package/cjs/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.js +0 -47
- package/cjs/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.js.map +0 -1
- package/cjs/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.js +0 -30
- package/cjs/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.js.map +0 -1
- package/cjs/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.js +0 -25
- package/cjs/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.js.map +0 -1
- package/cjs/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.js +0 -83
- package/cjs/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.js.map +0 -1
- package/cjs/internal/Menu/__creevey__/Menu.creevey.js +0 -90
- package/cjs/internal/Menu/__creevey__/Menu.creevey.js.map +0 -1
- package/cjs/internal/PopupMenu/__creevey__/PopupMenu.creevey.js +0 -37
- package/cjs/internal/PopupMenu/__creevey__/PopupMenu.creevey.js.map +0 -1
- package/cjs/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.js +0 -68
- package/cjs/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.js.map +0 -1
- package/cjs/internal/ZIndex/__creevey__/ZIndex.creevey.js +0 -228
- package/cjs/internal/ZIndex/__creevey__/ZIndex.creevey.js.map +0 -1
- package/cjs/lib/styles/HoldSelectionColor.d.ts +0 -1
- package/cjs/lib/styles/HoldSelectionColor.js +0 -9
- package/cjs/lib/styles/HoldSelectionColor.js.map +0 -1
- package/components/Autocomplete/__creevey__/Autocomplete.creevey/Autocomplete.creevey.js +0 -506
- package/components/Autocomplete/__creevey__/Autocomplete.creevey/Autocomplete.creevey.js.map +0 -1
- package/components/Autocomplete/__creevey__/Autocomplete.creevey/package.json +0 -6
- package/components/Autocomplete/__creevey__/Autocomplete.creevey.d.ts +0 -1
- package/components/Button/__creevey__/Button.creevey/Button.creevey.js +0 -396
- package/components/Button/__creevey__/Button.creevey/Button.creevey.js.map +0 -1
- package/components/Button/__creevey__/Button.creevey/package.json +0 -6
- package/components/Button/__creevey__/Button.creevey.d.ts +0 -1
- package/components/Calendar/__creevey__/Calendar.creevey/Calendar.creevey.js +0 -138
- package/components/Calendar/__creevey__/Calendar.creevey/Calendar.creevey.js.map +0 -1
- package/components/Calendar/__creevey__/Calendar.creevey/package.json +0 -6
- package/components/Calendar/__creevey__/Calendar.creevey.d.ts +0 -1
- package/components/Checkbox/__creevey__/Checkbox.creevey/Checkbox.creevey.js +0 -487
- package/components/Checkbox/__creevey__/Checkbox.creevey/Checkbox.creevey.js.map +0 -1
- package/components/Checkbox/__creevey__/Checkbox.creevey/package.json +0 -6
- package/components/Checkbox/__creevey__/Checkbox.creevey.d.ts +0 -1
- package/components/ComboBox/__creevey__/ComboBox.creevey/ComboBox.creevey.js +0 -1043
- package/components/ComboBox/__creevey__/ComboBox.creevey/ComboBox.creevey.js.map +0 -1
- package/components/ComboBox/__creevey__/ComboBox.creevey/package.json +0 -6
- package/components/ComboBox/__creevey__/ComboBox.creevey.d.ts +0 -1
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey/CurrencyInput.creevey.js +0 -114
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey/CurrencyInput.creevey.js.map +0 -1
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey/package.json +0 -6
- package/components/CurrencyInput/__creevey__/CurrencyInput.creevey.d.ts +0 -1
- package/components/DateInput/__creevey__/DateInput.creevey/DateInput.creevey.js +0 -367
- package/components/DateInput/__creevey__/DateInput.creevey/DateInput.creevey.js.map +0 -1
- package/components/DateInput/__creevey__/DateInput.creevey/package.json +0 -6
- package/components/DateInput/__creevey__/DateInput.creevey.d.ts +0 -1
- package/components/DatePicker/__creevey__/DatePicker.creevey/DatePicker.creevey.js +0 -395
- package/components/DatePicker/__creevey__/DatePicker.creevey/DatePicker.creevey.js.map +0 -1
- package/components/DatePicker/__creevey__/DatePicker.creevey/package.json +0 -6
- package/components/DatePicker/__creevey__/DatePicker.creevey.d.ts +0 -1
- package/components/Dropdown/__creevey__/Dropdown.creevey/Dropdown.creevey.js +0 -417
- package/components/Dropdown/__creevey__/Dropdown.creevey/Dropdown.creevey.js.map +0 -1
- package/components/Dropdown/__creevey__/Dropdown.creevey/package.json +0 -6
- package/components/Dropdown/__creevey__/Dropdown.creevey.d.ts +0 -1
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey/DropdownMenu.creevey.js +0 -534
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey/DropdownMenu.creevey.js.map +0 -1
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey/package.json +0 -6
- package/components/DropdownMenu/__creevey__/DropdownMenu.creevey.d.ts +0 -1
- package/components/FxInput/__creevey__/FxInput.creevey/FxInput.creevey.js +0 -62
- package/components/FxInput/__creevey__/FxInput.creevey/FxInput.creevey.js.map +0 -1
- package/components/FxInput/__creevey__/FxInput.creevey/package.json +0 -6
- package/components/FxInput/__creevey__/FxInput.creevey.d.ts +0 -1
- package/components/Group/__creevey__/Group.creevey/Group.creevey.js +0 -48
- package/components/Group/__creevey__/Group.creevey/Group.creevey.js.map +0 -1
- package/components/Group/__creevey__/Group.creevey/package.json +0 -6
- package/components/Group/__creevey__/Group.creevey.d.ts +0 -1
- package/components/Hint/__creevey__/Hint.creevey/Hint.creevey.js +0 -127
- package/components/Hint/__creevey__/Hint.creevey/Hint.creevey.js.map +0 -1
- package/components/Hint/__creevey__/Hint.creevey/package.json +0 -6
- package/components/Hint/__creevey__/Hint.creevey.d.ts +0 -1
- package/components/Input/__creevey__/Input.creevey/Input.creevey.js +0 -517
- package/components/Input/__creevey__/Input.creevey/Input.creevey.js.map +0 -1
- package/components/Input/__creevey__/Input.creevey/package.json +0 -6
- package/components/Input/__creevey__/Input.creevey.d.ts +0 -1
- package/components/Kebab/__creevey__/Kebab.creevey/Kebab.creevey.js +0 -278
- package/components/Kebab/__creevey__/Kebab.creevey/Kebab.creevey.js.map +0 -1
- package/components/Kebab/__creevey__/Kebab.creevey/package.json +0 -6
- package/components/Kebab/__creevey__/Kebab.creevey.d.ts +0 -1
- package/components/Link/__creevey__/Link.creevey/Link.creevey.js +0 -238
- package/components/Link/__creevey__/Link.creevey/Link.creevey.js.map +0 -1
- package/components/Link/__creevey__/Link.creevey/package.json +0 -6
- package/components/Link/__creevey__/Link.creevey.d.ts +0 -1
- package/components/Loader/__creevey__/Loader.creevey/Loader.creevey.js +0 -129
- package/components/Loader/__creevey__/Loader.creevey/Loader.creevey.js.map +0 -1
- package/components/Loader/__creevey__/Loader.creevey/package.json +0 -6
- package/components/Loader/__creevey__/Loader.creevey.d.ts +0 -1
- package/components/MaskedInput/__creevey__/MaskedInput.creevey/MaskedInput.creevey.js +0 -405
- package/components/MaskedInput/__creevey__/MaskedInput.creevey/MaskedInput.creevey.js.map +0 -1
- package/components/MaskedInput/__creevey__/MaskedInput.creevey/package.json +0 -6
- package/components/MaskedInput/__creevey__/MaskedInput.creevey.d.ts +0 -1
- package/components/Modal/__creevey__/Modal.creevey/Modal.creevey.js +0 -565
- package/components/Modal/__creevey__/Modal.creevey/Modal.creevey.js.map +0 -1
- package/components/Modal/__creevey__/Modal.creevey/package.json +0 -6
- package/components/Modal/__creevey__/Modal.creevey.d.ts +0 -1
- package/components/Paging/__creevey__/Paging.creevey/Paging.creevey.js +0 -190
- package/components/Paging/__creevey__/Paging.creevey/Paging.creevey.js.map +0 -1
- package/components/Paging/__creevey__/Paging.creevey/package.json +0 -6
- package/components/Paging/__creevey__/Paging.creevey.d.ts +0 -1
- package/components/PasswordInput/__creevey__/PasswordInput.creevey/PasswordInput.creevey.js +0 -83
- package/components/PasswordInput/__creevey__/PasswordInput.creevey/PasswordInput.creevey.js.map +0 -1
- package/components/PasswordInput/__creevey__/PasswordInput.creevey/package.json +0 -6
- package/components/PasswordInput/__creevey__/PasswordInput.creevey.d.ts +0 -1
- package/components/Radio/__creevey__/Radio.creevey/Radio.creevey.js +0 -56
- package/components/Radio/__creevey__/Radio.creevey/Radio.creevey.js.map +0 -1
- package/components/Radio/__creevey__/Radio.creevey/package.json +0 -6
- package/components/Radio/__creevey__/Radio.creevey.d.ts +0 -1
- package/components/RadioGroup/__creevey__/RadioGroup.creevey/RadioGroup.creevey.js +0 -167
- package/components/RadioGroup/__creevey__/RadioGroup.creevey/RadioGroup.creevey.js.map +0 -1
- package/components/RadioGroup/__creevey__/RadioGroup.creevey/package.json +0 -6
- package/components/RadioGroup/__creevey__/RadioGroup.creevey.d.ts +0 -1
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey/ScrollContainer.creevey.js +0 -488
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey/ScrollContainer.creevey.js.map +0 -1
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey/package.json +0 -6
- package/components/ScrollContainer/__creevey__/ScrollContainer.creevey.d.ts +0 -1
- package/components/Select/__creevey__/Select.creevey/Select.creevey.js +0 -541
- package/components/Select/__creevey__/Select.creevey/Select.creevey.js.map +0 -1
- package/components/Select/__creevey__/Select.creevey/package.json +0 -6
- package/components/Select/__creevey__/Select.creevey.d.ts +0 -1
- package/components/SidePage/__creevey__/SidePage.creevey/SidePage.creevey.js +0 -697
- package/components/SidePage/__creevey__/SidePage.creevey/SidePage.creevey.js.map +0 -1
- package/components/SidePage/__creevey__/SidePage.creevey/package.json +0 -6
- package/components/SidePage/__creevey__/SidePage.creevey.d.ts +0 -1
- package/components/Sticky/__creevey__/Sticky.creevey/Sticky.creevey.js +0 -215
- package/components/Sticky/__creevey__/Sticky.creevey/Sticky.creevey.js.map +0 -1
- package/components/Sticky/__creevey__/Sticky.creevey/package.json +0 -6
- package/components/Sticky/__creevey__/Sticky.creevey.d.ts +0 -1
- package/components/Switcher/__creevey__/Switcher.creevey/Switcher.creevey.js +0 -58
- package/components/Switcher/__creevey__/Switcher.creevey/Switcher.creevey.js.map +0 -1
- package/components/Switcher/__creevey__/Switcher.creevey/package.json +0 -6
- package/components/Switcher/__creevey__/Switcher.creevey.d.ts +0 -1
- package/components/Tabs/__creevey__/Tabs.creevey/Tabs.creevey.js +0 -391
- package/components/Tabs/__creevey__/Tabs.creevey/Tabs.creevey.js.map +0 -1
- package/components/Tabs/__creevey__/Tabs.creevey/package.json +0 -6
- package/components/Tabs/__creevey__/Tabs.creevey.d.ts +0 -1
- package/components/Textarea/__creevey__/Textarea.creevey/Textarea.creevey.js +0 -404
- package/components/Textarea/__creevey__/Textarea.creevey/Textarea.creevey.js.map +0 -1
- package/components/Textarea/__creevey__/Textarea.creevey/package.json +0 -6
- package/components/Textarea/__creevey__/Textarea.creevey.d.ts +0 -1
- package/components/Toast/__creevey__/Toast.creevey/Toast.creevey.js +0 -70
- package/components/Toast/__creevey__/Toast.creevey/Toast.creevey.js.map +0 -1
- package/components/Toast/__creevey__/Toast.creevey/package.json +0 -6
- package/components/Toast/__creevey__/Toast.creevey.d.ts +0 -1
- package/components/Toggle/__creevey__/Toggle.creevey/Toggle.creevey.js +0 -195
- package/components/Toggle/__creevey__/Toggle.creevey/Toggle.creevey.js.map +0 -1
- package/components/Toggle/__creevey__/Toggle.creevey/package.json +0 -6
- package/components/Toggle/__creevey__/Toggle.creevey.d.ts +0 -1
- package/components/TokenInput/__creevey__/TokenInput.creevey/TokenInput.creevey.js +0 -635
- package/components/TokenInput/__creevey__/TokenInput.creevey/TokenInput.creevey.js.map +0 -1
- package/components/TokenInput/__creevey__/TokenInput.creevey/package.json +0 -6
- package/components/TokenInput/__creevey__/TokenInput.creevey.d.ts +0 -1
- package/components/Tooltip/__creevey__/Tooltip.creevey/Tooltip.creevey.js +0 -1171
- package/components/Tooltip/__creevey__/Tooltip.creevey/Tooltip.creevey.js.map +0 -1
- package/components/Tooltip/__creevey__/Tooltip.creevey/package.json +0 -6
- package/components/Tooltip/__creevey__/Tooltip.creevey.d.ts +0 -1
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey/TooltipMenu.creevey.js +0 -277
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey/TooltipMenu.creevey.js.map +0 -1
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey/package.json +0 -6
- package/components/TooltipMenu/__creevey__/TooltipMenu.creevey.d.ts +0 -1
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey/CloseButtonIcon.creevey.js +0 -78
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey/CloseButtonIcon.creevey.js.map +0 -1
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey/package.json +0 -6
- package/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.d.ts +0 -1
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey/ComboBoxView.creevey.js +0 -58
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey/ComboBoxView.creevey.js.map +0 -1
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey/package.json +0 -6
- package/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.d.ts +0 -1
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey/FileUploaderFile.creevey.js +0 -41
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey/FileUploaderFile.creevey.js.map +0 -1
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey/package.json +0 -6
- package/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.d.ts +0 -1
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey/HideBodyVerticalScroll.creevey.js +0 -199
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey/HideBodyVerticalScroll.creevey.js.map +0 -1
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey/package.json +0 -6
- package/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.d.ts +0 -1
- package/internal/Menu/__creevey__/Menu.creevey/Menu.creevey.js +0 -196
- package/internal/Menu/__creevey__/Menu.creevey/Menu.creevey.js.map +0 -1
- package/internal/Menu/__creevey__/Menu.creevey/package.json +0 -6
- package/internal/Menu/__creevey__/Menu.creevey.d.ts +0 -1
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey/PopupMenu.creevey.js +0 -69
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey/PopupMenu.creevey.js.map +0 -1
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey/package.json +0 -6
- package/internal/PopupMenu/__creevey__/PopupMenu.creevey.d.ts +0 -1
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey/ThemeProvider.creevey.js +0 -145
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey/ThemeProvider.creevey.js.map +0 -1
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey/package.json +0 -6
- package/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.d.ts +0 -1
- package/internal/ZIndex/__creevey__/ZIndex.creevey/ZIndex.creevey.js +0 -550
- package/internal/ZIndex/__creevey__/ZIndex.creevey/ZIndex.creevey.js.map +0 -1
- package/internal/ZIndex/__creevey__/ZIndex.creevey/package.json +0 -6
- package/internal/ZIndex/__creevey__/ZIndex.creevey.d.ts +0 -1
- package/lib/styles/HoldSelectionColor/HoldSelectionColor.js +0 -8
- package/lib/styles/HoldSelectionColor/HoldSelectionColor.js.map +0 -1
- package/lib/styles/HoldSelectionColor/package.json +0 -6
- package/lib/styles/HoldSelectionColor.d.ts +0 -1
- /package/{cjs/components/Autocomplete/__creevey__/Autocomplete.creevey.d.ts → components/Autocomplete/__creevey__/Autocomplete.creevey.d.mts} +0 -0
- /package/{cjs/components/Button/__creevey__/Button.creevey.d.ts → components/Button/__creevey__/Button.creevey.d.mts} +0 -0
- /package/{cjs/components/Calendar/__creevey__/Calendar.creevey.d.ts → components/Calendar/__creevey__/Calendar.creevey.d.mts} +0 -0
- /package/{cjs/components/Checkbox/__creevey__/Checkbox.creevey.d.ts → components/Checkbox/__creevey__/Checkbox.creevey.d.mts} +0 -0
- /package/{cjs/components/ComboBox/__creevey__/ComboBox.creevey.d.ts → components/ComboBox/__creevey__/ComboBox.creevey.d.mts} +0 -0
- /package/{cjs/components/CurrencyInput/__creevey__/CurrencyInput.creevey.d.ts → components/CurrencyInput/__creevey__/CurrencyInput.creevey.d.mts} +0 -0
- /package/{cjs/components/DateInput/__creevey__/DateInput.creevey.d.ts → components/DateInput/__creevey__/DateInput.creevey.d.mts} +0 -0
- /package/{cjs/components/DatePicker/__creevey__/DatePicker.creevey.d.ts → components/DatePicker/__creevey__/DatePicker.creevey.d.mts} +0 -0
- /package/{cjs/components/Dropdown/__creevey__/Dropdown.creevey.d.ts → components/Dropdown/__creevey__/Dropdown.creevey.d.mts} +0 -0
- /package/{cjs/components/DropdownMenu/__creevey__/DropdownMenu.creevey.d.ts → components/DropdownMenu/__creevey__/DropdownMenu.creevey.d.mts} +0 -0
- /package/{cjs/components/FxInput/__creevey__/FxInput.creevey.d.ts → components/FxInput/__creevey__/FxInput.creevey.d.mts} +0 -0
- /package/{cjs/components/Group/__creevey__/Group.creevey.d.ts → components/Group/__creevey__/Group.creevey.d.mts} +0 -0
- /package/{cjs/components/Hint/__creevey__/Hint.creevey.d.ts → components/Hint/__creevey__/Hint.creevey.d.mts} +0 -0
- /package/{cjs/components/Input/__creevey__/Input.creevey.d.ts → components/Input/__creevey__/Input.creevey.d.mts} +0 -0
- /package/{cjs/components/Kebab/__creevey__/Kebab.creevey.d.ts → components/Kebab/__creevey__/Kebab.creevey.d.mts} +0 -0
- /package/{cjs/components/Link/__creevey__/Link.creevey.d.ts → components/Link/__creevey__/Link.creevey.d.mts} +0 -0
- /package/{cjs/components/Loader/__creevey__/Loader.creevey.d.ts → components/Loader/__creevey__/Loader.creevey.d.mts} +0 -0
- /package/{cjs/components/MaskedInput/__creevey__/MaskedInput.creevey.d.ts → components/MaskedInput/__creevey__/MaskedInput.creevey.d.mts} +0 -0
- /package/{cjs/components/Modal/__creevey__/Modal.creevey.d.ts → components/Modal/__creevey__/Modal.creevey.d.mts} +0 -0
- /package/{cjs/components/Paging/__creevey__/Paging.creevey.d.ts → components/Paging/__creevey__/Paging.creevey.d.mts} +0 -0
- /package/{cjs/components/PasswordInput/__creevey__/PasswordInput.creevey.d.ts → components/PasswordInput/__creevey__/PasswordInput.creevey.d.mts} +0 -0
- /package/{cjs/components/Radio/__creevey__/Radio.creevey.d.ts → components/Radio/__creevey__/Radio.creevey.d.mts} +0 -0
- /package/{cjs/components/RadioGroup/__creevey__/RadioGroup.creevey.d.ts → components/RadioGroup/__creevey__/RadioGroup.creevey.d.mts} +0 -0
- /package/{cjs/components/ScrollContainer/__creevey__/ScrollContainer.creevey.d.ts → components/ScrollContainer/__creevey__/ScrollContainer.creevey.d.mts} +0 -0
- /package/{cjs/components/Select/__creevey__/Select.creevey.d.ts → components/Select/__creevey__/Select.creevey.d.mts} +0 -0
- /package/{cjs/components/SidePage/__creevey__/SidePage.creevey.d.ts → components/SidePage/__creevey__/SidePage.creevey.d.mts} +0 -0
- /package/{cjs/components/Sticky/__creevey__/Sticky.creevey.d.ts → components/Sticky/__creevey__/Sticky.creevey.d.mts} +0 -0
- /package/{cjs/components/Switcher/__creevey__/Switcher.creevey.d.ts → components/Switcher/__creevey__/Switcher.creevey.d.mts} +0 -0
- /package/{cjs/components/Tabs/__creevey__/Tabs.creevey.d.ts → components/Tabs/__creevey__/Tabs.creevey.d.mts} +0 -0
- /package/{cjs/components/Textarea/__creevey__/Textarea.creevey.d.ts → components/Textarea/__creevey__/Textarea.creevey.d.mts} +0 -0
- /package/{cjs/components/Toast/__creevey__/Toast.creevey.d.ts → components/Toast/__creevey__/Toast.creevey.d.mts} +0 -0
- /package/{cjs/components/Toggle/__creevey__/Toggle.creevey.d.ts → components/Toggle/__creevey__/Toggle.creevey.d.mts} +0 -0
- /package/{cjs/components/TokenInput/__creevey__/TokenInput.creevey.d.ts → components/TokenInput/__creevey__/TokenInput.creevey.d.mts} +0 -0
- /package/{cjs/components/Tooltip/__creevey__/Tooltip.creevey.d.ts → components/Tooltip/__creevey__/Tooltip.creevey.d.mts} +0 -0
- /package/{cjs/components/TooltipMenu/__creevey__/TooltipMenu.creevey.d.ts → components/TooltipMenu/__creevey__/TooltipMenu.creevey.d.mts} +0 -0
- /package/{cjs/internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.d.ts → internal/CloseButtonIcon/__creevey__/CloseButtonIcon.creevey.d.mts} +0 -0
- /package/{cjs/internal/CustomComboBox/__creevey__/ComboBoxView.creevey.d.ts → internal/CustomComboBox/__creevey__/ComboBoxView.creevey.d.mts} +0 -0
- /package/{cjs/internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.d.ts → internal/FileUploaderControl/__creevey__/FileUploaderFile.creevey.d.mts} +0 -0
- /package/{cjs/internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.d.ts → internal/HideBodyVerticalScroll/__creevey__/HideBodyVerticalScroll.creevey.d.mts} +0 -0
- /package/{cjs/internal/Menu/__creevey__/Menu.creevey.d.ts → internal/Menu/__creevey__/Menu.creevey.d.mts} +0 -0
- /package/{cjs/internal/PopupMenu/__creevey__/PopupMenu.creevey.d.ts → internal/PopupMenu/__creevey__/PopupMenu.creevey.d.mts} +0 -0
- /package/{cjs/internal/ThemePlayground/__creevey__/ThemeProvider.creevey.d.ts → internal/ThemePlayground/__creevey__/ThemeProvider.creevey.d.mts} +0 -0
- /package/{cjs/internal/ZIndex/__creevey__/ZIndex.creevey.d.ts → internal/ZIndex/__creevey__/ZIndex.creevey.d.mts} +0 -0
|
@@ -3,6 +3,7 @@ import { HTMLProps } from '../../typings/html';
|
|
|
3
3
|
import { PopupPositionsType } from '../Popup';
|
|
4
4
|
import { CommonProps } from '../CommonWrapper';
|
|
5
5
|
import { MenuProps } from '../Menu';
|
|
6
|
+
export * from './tids';
|
|
6
7
|
export interface PopupMenuCaptionProps {
|
|
7
8
|
opened: boolean;
|
|
8
9
|
openMenu: (firstItemShouldBeSelected?: boolean) => void;
|
|
@@ -55,10 +56,6 @@ export declare const PopupMenuType: {
|
|
|
55
56
|
readonly Dropdown: "dropdown";
|
|
56
57
|
readonly Tooltip: "tooltip";
|
|
57
58
|
};
|
|
58
|
-
export declare const PopupMenuDataTids: {
|
|
59
|
-
readonly root: "PopupMenu__root";
|
|
60
|
-
readonly caption: "PopupMenu__caption";
|
|
61
|
-
};
|
|
62
59
|
type DefaultProps = Required<Pick<PopupMenuProps, 'positions' | 'type' | 'popupHasPin' | 'disableAnimations'>>;
|
|
63
60
|
export declare class PopupMenu extends React.Component<PopupMenuProps, PopupMenuState> {
|
|
64
61
|
static __KONTUR_REACT_UI__: string;
|
|
@@ -100,4 +97,3 @@ export declare class PopupMenu extends React.Component<PopupMenuProps, PopupMenu
|
|
|
100
97
|
private handleChangeMenuVisible;
|
|
101
98
|
private handleItemSelection;
|
|
102
99
|
}
|
|
103
|
-
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
|
|
3
|
+
import { PopupMenuDataTids } from '../tids';
|
|
4
|
+
import { delay } from '../../../lib/delay';
|
|
5
|
+
|
|
6
|
+
const textAlignmentTests = () => {
|
|
7
|
+
test('opened', async (context) => {
|
|
8
|
+
await context.webdriver
|
|
9
|
+
.actions({
|
|
10
|
+
bridge: true,
|
|
11
|
+
})
|
|
12
|
+
.click(context.webdriver.findElement({ css: `[data-tid~="${PopupMenuDataTids.caption}"]` }))
|
|
13
|
+
.perform();
|
|
14
|
+
await delay(1000);
|
|
15
|
+
await context.matchImage(await context.takeScreenshot(), 'opened');
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
kind('PopupMenu', () => {
|
|
20
|
+
story('WithItems', ({ setStoryParameters }) => {
|
|
21
|
+
setStoryParameters({ skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } } });
|
|
22
|
+
|
|
23
|
+
textAlignmentTests();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
story('WithItemsWithIcons', ({ setStoryParameters }) => {
|
|
27
|
+
setStoryParameters({ skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } } });
|
|
28
|
+
|
|
29
|
+
textAlignmentTests();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
story('WithItemsWithIconsWithoutTextAlignment', ({ setStoryParameters }) => {
|
|
33
|
+
setStoryParameters({ skip: { 'themes dont affect logic': { in: /^(?!\bchrome2022\b)/ } } });
|
|
34
|
+
|
|
35
|
+
textAlignmentTests();
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PopupMenuDataTids","root","caption"],"sources":["tids.ts"],"sourcesContent":["export const PopupMenuDataTids = {\n root: 'PopupMenu__root',\n caption: 'PopupMenu__caption',\n} as const;\n"],"mappings":"AAAA,OAAO,IAAMA,iBAAiB,GAAG;EAC/BC,IAAI,EAAE,iBAAiB;EACvBC,OAAO,EAAE;AACX,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
|
|
3
|
+
import { delay } from '../../../lib/delay';
|
|
4
|
+
|
|
5
|
+
kind('ThemeProvider', () => {
|
|
6
|
+
story('Playground', ({ setStoryParameters }) => {
|
|
7
|
+
setStoryParameters({
|
|
8
|
+
skip: {
|
|
9
|
+
'repeating tests': {
|
|
10
|
+
tests: ['theme 2022 top', 'theme 2022 bottom', 'theme 2022 dark top', 'theme 2022 dark bottom'],
|
|
11
|
+
in: /^(?!\b(chrome2022|firefox2022)\b)/,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('theme 2022 top', async (context) => {
|
|
17
|
+
await context.webdriver
|
|
18
|
+
.actions({ bridge: true })
|
|
19
|
+
.click(context.webdriver.findElement({ css: '[data-prop-id="lightTheme"]' }))
|
|
20
|
+
.perform();
|
|
21
|
+
await delay(500);
|
|
22
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'theme 2022 top');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('theme 2022 bottom', async (context) => {
|
|
26
|
+
await context.webdriver
|
|
27
|
+
.actions({ bridge: true })
|
|
28
|
+
.click(context.webdriver.findElement({ css: '[data-prop-id="lightTheme"]' }))
|
|
29
|
+
.perform();
|
|
30
|
+
await context.webdriver.executeScript(function () {
|
|
31
|
+
document.documentElement.scrollTop = document.documentElement.scrollHeight;
|
|
32
|
+
});
|
|
33
|
+
await delay(1000);
|
|
34
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'theme 2022 bottom');
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test('theme 2022 dark top', async (context) => {
|
|
38
|
+
await context.webdriver
|
|
39
|
+
.actions({ bridge: true })
|
|
40
|
+
.click(context.webdriver.findElement({ css: '[data-prop-id="darkTheme"]' }))
|
|
41
|
+
.perform();
|
|
42
|
+
await delay(500);
|
|
43
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'theme 2022 dark top');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('theme 2022 dark bottom', async (context) => {
|
|
47
|
+
await context.webdriver
|
|
48
|
+
.actions({ bridge: true })
|
|
49
|
+
.click(context.webdriver.findElement({ css: '[data-prop-id="darkTheme"]' }))
|
|
50
|
+
.perform();
|
|
51
|
+
await context.webdriver.executeScript(function () {
|
|
52
|
+
document.documentElement.scrollTop = document.documentElement.scrollHeight;
|
|
53
|
+
});
|
|
54
|
+
await delay(1000);
|
|
55
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'theme 2022 dark bottom');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
story('UnlinkVars', ({ setStoryParameters }) => {
|
|
60
|
+
setStoryParameters({
|
|
61
|
+
skip: {
|
|
62
|
+
'themes do not affect logic': {
|
|
63
|
+
in: ['chrome2022Dark', 'firefox2022', 'firefox2022Dark'],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
});
|
|
@@ -11,6 +11,8 @@ if (IS_PROXY_SUPPORTED) {
|
|
|
11
11
|
var baseThemes = [];
|
|
12
12
|
baseThemes.push(LIGHT_THEME);
|
|
13
13
|
baseThemes.push(DARK_THEME);
|
|
14
|
+
|
|
15
|
+
// @ts-expect-error не очень-то и хотелось
|
|
14
16
|
var componentsContext = require.context('../../../', true, /\.styles.ts$/);
|
|
15
17
|
componentsContext.keys().forEach(function (fileName) {
|
|
16
18
|
var fileNameStart = fileName.lastIndexOf('/') + 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["globalObject","LIGHT_THEME","DARK_THEME","IS_PROXY_SUPPORTED","callsCount","executionTime","ALL_USED_VARIABLES_SET","Set","COMPONENT_DESCRIPTIONS","COMPONENT_DESCRIPTIONS_BY_VARIABLE","baseThemes","push","componentsContext","require","context","keys","forEach","fileName","fileNameStart","lastIndexOf","componentName","substring","replace","componentDescription","Object","exportName","styles","elementName","jsStyle","variablesAccumulator","dependencies","elementProxyHandler","getProxyHandler","themes","map","t","Proxy","variables","Array","from","length","variableName","variableNode","componentNode","includes","dependenciesList","dependencyName","dependencyNode","accumulator","accessLevel","rootProp","isThemeVariable","theme","name","get","target","prop","receiver","_globalObject$perform","_globalObject$perform2","propName","add","start","performance","now","result","Reflect","ALL_USED_VARIABLES","CALLS_COUNT","EXECUTION_TIME"],"sources":["VariablesCollector.ts"],"sourcesContent":["import { globalObject } from '@skbkontur/global-object';\n\nimport { Theme } from '../../lib/theming/Theme';\nimport { LIGHT_THEME } from '../../lib/theming/themes/LightTheme';\nimport { DARK_THEME } from '../../lib/theming/themes/DarkTheme';\nimport { IS_PROXY_SUPPORTED } from '../../lib/Supports';\n\nexport interface DescriptionsType {\n [componentName: string]: ComponentDescriptionType;\n}\n\nexport interface ComponentDescriptionType {\n [elementName: string]: ComponentRowDescriptionType;\n}\n\nexport interface ComponentRowDescriptionType {\n variables: Array<keyof Theme>;\n dependencies: VariableDependencies;\n}\n\nexport interface VariableNameToComponentsMap {\n [variableName: string]: DescriptionsType;\n}\n\nexport interface VariableDependencies {\n [variableName: string]: Array<keyof Theme>;\n}\n\nlet callsCount = 0;\nlet executionTime = 0;\nconst ALL_USED_VARIABLES_SET = new Set<keyof Theme>();\n\nexport const COMPONENT_DESCRIPTIONS: DescriptionsType = {};\nexport const COMPONENT_DESCRIPTIONS_BY_VARIABLE: VariableNameToComponentsMap = {};\n\nif (IS_PROXY_SUPPORTED) {\n const baseThemes: Theme[] = [];\n baseThemes.push(LIGHT_THEME);\n baseThemes.push(DARK_THEME);\n\n const componentsContext = require.context('../../../', true, /\\.styles.ts$/);\n componentsContext.keys().forEach((fileName) => {\n const fileNameStart = fileName.lastIndexOf('/') + 1;\n const componentName = fileName.substring(fileNameStart).replace('.styles.ts', '');\n const componentDescription: ComponentDescriptionType = {};\n Object.keys(componentsContext(fileName)).forEach((exportName) => {\n const styles = componentsContext(fileName)[exportName];\n\n Object.keys(styles).forEach((elementName) => {\n const jsStyle = styles[elementName];\n if (typeof jsStyle !== 'function') {\n return;\n }\n const variablesAccumulator = new Set<keyof Theme>();\n const dependencies: VariableDependencies = {};\n const elementProxyHandler = getProxyHandler(variablesAccumulator, dependencies);\n const themes = baseThemes.map((t) => new Proxy(t, elementProxyHandler));\n themes.forEach((t) => jsStyle(t));\n\n const variables = Array.from(variablesAccumulator);\n\n if (variables.length > 0) {\n componentDescription[elementName] = { variables, dependencies };\n\n variables.forEach((variableName) => {\n if (!COMPONENT_DESCRIPTIONS_BY_VARIABLE[variableName]) {\n COMPONENT_DESCRIPTIONS_BY_VARIABLE[variableName] = {};\n }\n\n const variableNode = COMPONENT_DESCRIPTIONS_BY_VARIABLE[variableName];\n if (!variableNode[componentName]) {\n variableNode[componentName] = {};\n }\n\n const componentNode = variableNode[componentName];\n if (!componentNode[elementName]) {\n componentNode[elementName] = {\n dependencies,\n variables: [variableName],\n };\n } else if (!componentNode[elementName].variables.includes(variableName)) {\n componentNode[elementName].dependencies = dependencies;\n componentNode[elementName].variables.push(variableName);\n }\n\n const dependenciesList = dependencies[variableName];\n if (dependenciesList) {\n dependenciesList.forEach((dependencyName) => {\n if (!COMPONENT_DESCRIPTIONS_BY_VARIABLE[dependencyName]) {\n COMPONENT_DESCRIPTIONS_BY_VARIABLE[dependencyName] = {};\n }\n\n const dependencyNode = COMPONENT_DESCRIPTIONS_BY_VARIABLE[dependencyName];\n if (!dependencyNode[componentName]) {\n dependencyNode[componentName] = COMPONENT_DESCRIPTIONS_BY_VARIABLE[variableName][componentName];\n }\n });\n }\n });\n }\n });\n });\n\n COMPONENT_DESCRIPTIONS[componentName] = componentDescription;\n });\n}\n\nfunction getProxyHandler(accumulator: Set<keyof Theme>, dependencies: VariableDependencies): ProxyHandler<Theme> {\n let accessLevel = 0;\n let rootProp = '';\n function isThemeVariable<T extends Theme>(theme: T, name: keyof T) {\n return typeof theme[name] === 'string';\n }\n return {\n get(target, prop, receiver) {\n const propName = prop as keyof Theme;\n if (isThemeVariable(target, propName)) {\n ALL_USED_VARIABLES_SET.add(propName);\n if (accessLevel === 0) {\n rootProp = propName;\n accumulator.add(propName);\n } else if (!dependencies[rootProp]) {\n dependencies[rootProp] = [propName];\n } else if (!dependencies[rootProp].includes(propName)) {\n dependencies[rootProp].push(propName);\n }\n }\n\n accessLevel++;\n const start = globalObject.performance?.now() || 0;\n const result = Reflect.get(target, prop, receiver);\n executionTime += (globalObject.performance?.now() || 0) - start;\n callsCount++;\n accessLevel--;\n return result;\n },\n };\n}\n\nexport const ALL_USED_VARIABLES = Array.from(ALL_USED_VARIABLES_SET);\nexport const CALLS_COUNT = callsCount;\nexport const EXECUTION_TIME = executionTime;\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,0BAA0B;;;AAGvD,SAASC,WAAW,QAAQ,qCAAqC;AACjE,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,SAASC,kBAAkB,QAAQ,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;AAuBvD,IAAIC,UAAU,GAAG,CAAC;AAClB,IAAIC,aAAa,GAAG,CAAC;AACrB,IAAMC,sBAAsB,GAAG,IAAIC,GAAG,CAAc,CAAC;;AAErD,OAAO,IAAMC,sBAAwC,GAAG,CAAC,CAAC;AAC1D,OAAO,IAAMC,kCAA+D,GAAG,CAAC,CAAC;;AAEjF,IAAIN,kBAAkB,EAAE;EACtB,IAAMO,UAAmB,GAAG,EAAE;EAC9BA,UAAU,CAACC,IAAI,CAACV,WAAW,CAAC;EAC5BS,UAAU,CAACC,IAAI,CAACT,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AAE;MACb,IAAMa,KAAK,GAAG,EAAAJ,qBAAA,GAAA1D,YAAY,CAAC+D,WAAW,qBAAxBL,qBAAA,CAA0BM,GAAG,CAAC,CAAC,KAAI,CAAC;MAClD,IAAMC,MAAM,GAAGC,OAAO,CAACZ,GAAG,CAACC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,CAAC;MAClDpD,aAAa,IAAI,CAAC,EAAAsD,sBAAA,GAAA3D,YAAY,CAAC+D,WAAW,qBAAxBJ,sBAAA,CAA0BK,GAAG,CAAC,CAAC,KAAI,CAAC,IAAIF,KAAK;MAC/D1D,UAAU,EAAE;MACZ6C,WAAW,EAAE;MACb,OAAOgB,MAAM;IACf;EACF,CAAC;AACH;;AAEA,OAAO,IAAME,kBAAkB,GAAG7B,KAAK,CAACC,IAAI,CAACjC,sBAAsB,CAAC;AACpE,OAAO,IAAM8D,WAAW,GAAGhE,UAAU;AACrC,OAAO,IAAMiE,cAAc,GAAGhE,aAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["globalObject","LIGHT_THEME","DARK_THEME","IS_PROXY_SUPPORTED","callsCount","executionTime","ALL_USED_VARIABLES_SET","Set","COMPONENT_DESCRIPTIONS","COMPONENT_DESCRIPTIONS_BY_VARIABLE","baseThemes","push","componentsContext","require","context","keys","forEach","fileName","fileNameStart","lastIndexOf","componentName","substring","replace","componentDescription","Object","exportName","styles","elementName","jsStyle","variablesAccumulator","dependencies","elementProxyHandler","getProxyHandler","themes","map","t","Proxy","variables","Array","from","length","variableName","variableNode","componentNode","includes","dependenciesList","dependencyName","dependencyNode","accumulator","accessLevel","rootProp","isThemeVariable","theme","name","get","target","prop","receiver","_globalObject$perform","_globalObject$perform2","propName","add","start","performance","now","result","Reflect","ALL_USED_VARIABLES","CALLS_COUNT","EXECUTION_TIME"],"sources":["VariablesCollector.ts"],"sourcesContent":["import { globalObject } from '@skbkontur/global-object';\n\nimport { Theme } from '../../lib/theming/Theme';\nimport { LIGHT_THEME } from '../../lib/theming/themes/LightTheme';\nimport { DARK_THEME } from '../../lib/theming/themes/DarkTheme';\nimport { IS_PROXY_SUPPORTED } from '../../lib/Supports';\n\nexport interface DescriptionsType {\n [componentName: string]: ComponentDescriptionType;\n}\n\nexport interface ComponentDescriptionType {\n [elementName: string]: ComponentRowDescriptionType;\n}\n\nexport interface ComponentRowDescriptionType {\n variables: Array<keyof Theme>;\n dependencies: VariableDependencies;\n}\n\nexport interface VariableNameToComponentsMap {\n [variableName: string]: DescriptionsType;\n}\n\nexport interface VariableDependencies {\n [variableName: string]: Array<keyof Theme>;\n}\n\nlet callsCount = 0;\nlet executionTime = 0;\nconst ALL_USED_VARIABLES_SET = new Set<keyof Theme>();\n\nexport const COMPONENT_DESCRIPTIONS: DescriptionsType = {};\nexport const COMPONENT_DESCRIPTIONS_BY_VARIABLE: VariableNameToComponentsMap = {};\n\nif (IS_PROXY_SUPPORTED) {\n const baseThemes: Theme[] = [];\n baseThemes.push(LIGHT_THEME);\n baseThemes.push(DARK_THEME);\n\n // @ts-expect-error не очень-то и хотелось\n const componentsContext = require.context('../../../', true, /\\.styles.ts$/);\n componentsContext.keys().forEach((fileName: string) => {\n const fileNameStart = fileName.lastIndexOf('/') + 1;\n const componentName = fileName.substring(fileNameStart).replace('.styles.ts', '');\n const componentDescription: ComponentDescriptionType = {};\n Object.keys(componentsContext(fileName)).forEach((exportName) => {\n const styles = componentsContext(fileName)[exportName];\n\n Object.keys(styles).forEach((elementName) => {\n const jsStyle = styles[elementName];\n if (typeof jsStyle !== 'function') {\n return;\n }\n const variablesAccumulator = new Set<keyof Theme>();\n const dependencies: VariableDependencies = {};\n const elementProxyHandler = getProxyHandler(variablesAccumulator, dependencies);\n const themes = baseThemes.map((t) => new Proxy(t, elementProxyHandler));\n themes.forEach((t) => jsStyle(t));\n\n const variables = Array.from(variablesAccumulator);\n\n if (variables.length > 0) {\n componentDescription[elementName] = { variables, dependencies };\n\n variables.forEach((variableName) => {\n if (!COMPONENT_DESCRIPTIONS_BY_VARIABLE[variableName]) {\n COMPONENT_DESCRIPTIONS_BY_VARIABLE[variableName] = {};\n }\n\n const variableNode = COMPONENT_DESCRIPTIONS_BY_VARIABLE[variableName];\n if (!variableNode[componentName]) {\n variableNode[componentName] = {};\n }\n\n const componentNode = variableNode[componentName];\n if (!componentNode[elementName]) {\n componentNode[elementName] = {\n dependencies,\n variables: [variableName],\n };\n } else if (!componentNode[elementName].variables.includes(variableName)) {\n componentNode[elementName].dependencies = dependencies;\n componentNode[elementName].variables.push(variableName);\n }\n\n const dependenciesList = dependencies[variableName];\n if (dependenciesList) {\n dependenciesList.forEach((dependencyName) => {\n if (!COMPONENT_DESCRIPTIONS_BY_VARIABLE[dependencyName]) {\n COMPONENT_DESCRIPTIONS_BY_VARIABLE[dependencyName] = {};\n }\n\n const dependencyNode = COMPONENT_DESCRIPTIONS_BY_VARIABLE[dependencyName];\n if (!dependencyNode[componentName]) {\n dependencyNode[componentName] = COMPONENT_DESCRIPTIONS_BY_VARIABLE[variableName][componentName];\n }\n });\n }\n });\n }\n });\n });\n\n COMPONENT_DESCRIPTIONS[componentName] = componentDescription;\n });\n}\n\nfunction getProxyHandler(accumulator: Set<keyof Theme>, dependencies: VariableDependencies): ProxyHandler<Theme> {\n let accessLevel = 0;\n let rootProp = '';\n function isThemeVariable<T extends Theme>(theme: T, name: keyof T) {\n return typeof theme[name] === 'string';\n }\n return {\n get(target, prop, receiver) {\n const propName = prop as keyof Theme;\n if (isThemeVariable(target, propName)) {\n ALL_USED_VARIABLES_SET.add(propName);\n if (accessLevel === 0) {\n rootProp = propName;\n accumulator.add(propName);\n } else if (!dependencies[rootProp]) {\n dependencies[rootProp] = [propName];\n } else if (!dependencies[rootProp].includes(propName)) {\n dependencies[rootProp].push(propName);\n }\n }\n\n accessLevel++;\n const start = globalObject.performance?.now() || 0;\n const result = Reflect.get(target, prop, receiver);\n executionTime += (globalObject.performance?.now() || 0) - start;\n callsCount++;\n accessLevel--;\n return result;\n },\n };\n}\n\nexport const ALL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[]}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { story, kind, test } from 'creevey';
|
|
2
|
+
|
|
3
|
+
import { delay } from '../../../lib/delay';
|
|
4
|
+
import { SelectDataTids } from '../../../components/Select/tids';
|
|
5
|
+
|
|
6
|
+
kind('ZIndex', () => {
|
|
7
|
+
story('HintAndModalStory', () => {
|
|
8
|
+
test('Modal covers hint', async (context) => {
|
|
9
|
+
await context.webdriver
|
|
10
|
+
.actions({ bridge: true })
|
|
11
|
+
.click(context.webdriver.findElement({ css: '[data-tid~="open-modal"]' }))
|
|
12
|
+
.perform();
|
|
13
|
+
await context.webdriver
|
|
14
|
+
.actions({ bridge: true })
|
|
15
|
+
.click(context.webdriver.findElement({ css: '.modalBody button' }))
|
|
16
|
+
.perform();
|
|
17
|
+
await delay(1000);
|
|
18
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'Modal covers hint');
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
story('BigModalWithLoaderStory', () => {
|
|
23
|
+
test('Header covers Loader', async (context) => {
|
|
24
|
+
await context.webdriver.executeScript(function () {
|
|
25
|
+
const sidePage = window.document.querySelector('[data-tid="modal-container"]') as HTMLElement;
|
|
26
|
+
|
|
27
|
+
if (sidePage) {
|
|
28
|
+
sidePage.scrollTop = sidePage.offsetHeight / 3;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
await delay(1000);
|
|
32
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'Header covers Loader');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
story('TooltipAndSelectStory', () => {
|
|
37
|
+
test('Menu covers tooltip', async (context) => {
|
|
38
|
+
const element = await context.webdriver.findElement({ css: '.container' });
|
|
39
|
+
await context.webdriver
|
|
40
|
+
.actions({ bridge: true })
|
|
41
|
+
.click(context.webdriver.findElement({ css: `[data-tid=${SelectDataTids.label}]` }))
|
|
42
|
+
.sendKeys('q')
|
|
43
|
+
.perform();
|
|
44
|
+
await delay(1000);
|
|
45
|
+
await context.matchImage(await element.takeScreenshot(), 'Modal covers hint');
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
story('LoaderInSidePageBody', () => {
|
|
50
|
+
test('is covered by Header and Footer', async (context) => {
|
|
51
|
+
await context.webdriver.executeScript(function () {
|
|
52
|
+
const sidePage = window.document.querySelector('[data-tid="SidePage__container"]') as HTMLElement;
|
|
53
|
+
|
|
54
|
+
if (sidePage) {
|
|
55
|
+
sidePage.scrollTop = sidePage.offsetHeight;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
await delay(1000);
|
|
59
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'is covered by Header and Footer');
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
story('SidepageAndSelect', () => {
|
|
64
|
+
test('SidePage covers Select and Tooltip', async (context) => {
|
|
65
|
+
await context.webdriver
|
|
66
|
+
.actions({ bridge: true })
|
|
67
|
+
.click(context.webdriver.findElement({ css: '.select-container button' }))
|
|
68
|
+
.sendKeys('q')
|
|
69
|
+
.perform();
|
|
70
|
+
await context.webdriver
|
|
71
|
+
.actions({ bridge: true })
|
|
72
|
+
.click(context.webdriver.findElement({ css: '.open-sidepage-container button' }))
|
|
73
|
+
.perform();
|
|
74
|
+
await context.webdriver
|
|
75
|
+
.actions({ bridge: true })
|
|
76
|
+
.click(context.webdriver.findElement({ css: '.sidepage-select-continer button' }))
|
|
77
|
+
.sendKeys('q')
|
|
78
|
+
.perform();
|
|
79
|
+
const element = await context.webdriver.findElement({ css: `[data-tid='SidePage__container']` });
|
|
80
|
+
await delay(1000);
|
|
81
|
+
await context.matchImage(await element.takeScreenshot(), 'SidePage covers Select and Tooltip');
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
story('ElementsInLoaderInModalStory', ({ setStoryParameters }) => {
|
|
86
|
+
setStoryParameters({
|
|
87
|
+
skip: {
|
|
88
|
+
'flaky test': {
|
|
89
|
+
in: ['chrome2022Dark'],
|
|
90
|
+
tests: ['Hide Hint on active Loader'],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
test('Open Dropdown while Loader is inactive', async (context) => {
|
|
96
|
+
await context.webdriver
|
|
97
|
+
.actions({ bridge: true })
|
|
98
|
+
.click(context.webdriver.findElement({ css: '[data-comp-name~="Select"]' }))
|
|
99
|
+
.perform();
|
|
100
|
+
await delay(1000);
|
|
101
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'Open Dropdown while Loader is inactive');
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
test('Hide Hint on active Loader', async (context) => {
|
|
105
|
+
await context.webdriver
|
|
106
|
+
.actions({ bridge: true })
|
|
107
|
+
.click(context.webdriver.findElement({ css: '[data-comp-name~="Toggle"]' }))
|
|
108
|
+
.perform();
|
|
109
|
+
await delay(1000);
|
|
110
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'Hide Hint on active Loader');
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
story('LoaderAndSidePageStory', () => {
|
|
115
|
+
test('SidePage shadow cover Loader', async (context) => {
|
|
116
|
+
await context.webdriver
|
|
117
|
+
.actions({ bridge: true })
|
|
118
|
+
.click(context.webdriver.findElement({ css: '[data-comp-name~="Toggle"]' }))
|
|
119
|
+
.perform();
|
|
120
|
+
await delay(1000);
|
|
121
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'SidePage shadow cover Loader');
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
story('StickyAndTooltipsStory', () => {
|
|
126
|
+
test('Sticky covers outside Popup', async (context) => {
|
|
127
|
+
await context.webdriver
|
|
128
|
+
.actions({ bridge: true })
|
|
129
|
+
.click(context.webdriver.findElement({ css: '[data-comp-name~="Select"]' }))
|
|
130
|
+
.perform();
|
|
131
|
+
await delay(1000);
|
|
132
|
+
await context.matchImage(await context.webdriver.takeScreenshot(), 'Sticky covers outside Popup');
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
story('ModalAndToast', () => {
|
|
137
|
+
test('toastShown', async (context) => {
|
|
138
|
+
await context.webdriver
|
|
139
|
+
.actions({ bridge: true })
|
|
140
|
+
.click(context.webdriver.findElement({ css: '[data-comp-name~="Button"] button' }))
|
|
141
|
+
.perform();
|
|
142
|
+
await delay(1000);
|
|
143
|
+
await context.matchImage(await context.webdriver.takeScreenshot());
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
story('ToastOverEverything', ({ setStoryParameters }) => {
|
|
148
|
+
setStoryParameters({ skip: { 'flickering screenshot': { in: /^(?!\b(firefox))/, tests: 'staticToast' } } });
|
|
149
|
+
|
|
150
|
+
test('staticToast', async (context) => {
|
|
151
|
+
await context.webdriver
|
|
152
|
+
.actions({ bridge: true })
|
|
153
|
+
.click(context.webdriver.findElement({ css: '[data-tid~="static-toast"]' }))
|
|
154
|
+
.pause(1000)
|
|
155
|
+
.click(context.webdriver.findElement({ css: 'body' }))
|
|
156
|
+
.perform();
|
|
157
|
+
const shown = await context.webdriver.takeScreenshot(); // Toast rendered by static method doesn't get removed
|
|
158
|
+
// when story switches, so we have to close it manually
|
|
159
|
+
await context.webdriver
|
|
160
|
+
.actions({ bridge: true })
|
|
161
|
+
.click(context.webdriver.findElement({ css: '[data-tid~="ToastView__close"]' }))
|
|
162
|
+
.pause(500)
|
|
163
|
+
.perform();
|
|
164
|
+
await context.matchImage(shown);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
test('refToast', async (context) => {
|
|
168
|
+
await context.webdriver
|
|
169
|
+
.actions({ bridge: true })
|
|
170
|
+
.click(context.webdriver.findElement({ css: '[data-tid~="ref-toast"]' }))
|
|
171
|
+
.pause(1000)
|
|
172
|
+
.click(context.webdriver.findElement({ css: 'body' }))
|
|
173
|
+
.perform();
|
|
174
|
+
await delay(1000);
|
|
175
|
+
await context.matchImage(await context.webdriver.takeScreenshot());
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
story('ModalWithDropdown', ({ setStoryParameters }) => {
|
|
180
|
+
setStoryParameters({ skip: { 'no themes': { in: /^(?!\b(chrome2022|firefox2022)\b)/ } } });
|
|
181
|
+
|
|
182
|
+
test('dropdown overlaps static header', async (context) => {
|
|
183
|
+
await context.webdriver
|
|
184
|
+
.actions({ bridge: true })
|
|
185
|
+
.click(context.webdriver.findElement({ css: '[data-tid="dropdown_top"]' }))
|
|
186
|
+
.perform();
|
|
187
|
+
await delay(1000);
|
|
188
|
+
await context.matchImage(await context.webdriver.takeScreenshot());
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
test('dropdown lays under fixed header', async (context) => {
|
|
192
|
+
await context.webdriver
|
|
193
|
+
.actions({ bridge: true })
|
|
194
|
+
.click(context.webdriver.findElement({ css: '[data-tid="dropdown_top"]' }))
|
|
195
|
+
.perform();
|
|
196
|
+
await delay(1000);
|
|
197
|
+
await context.webdriver.executeScript(function () {
|
|
198
|
+
const scrollContainer = window.document.querySelector('[data-tid="modal-container"]') as HTMLElement;
|
|
199
|
+
scrollContainer.scrollTop = scrollContainer.scrollHeight;
|
|
200
|
+
});
|
|
201
|
+
await delay(1000);
|
|
202
|
+
await context.matchImage(await context.webdriver.takeScreenshot());
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
test('dropdown lays under fixed footer', async (context) => {
|
|
206
|
+
await context.webdriver
|
|
207
|
+
.actions({ bridge: true })
|
|
208
|
+
.click(context.webdriver.findElement({ css: '[data-tid="dropdown_bottom"]' }))
|
|
209
|
+
.perform();
|
|
210
|
+
await delay(1000);
|
|
211
|
+
await context.matchImage(await context.webdriver.takeScreenshot());
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
test('dropdown overlaps static footer', async (context) => {
|
|
215
|
+
await context.webdriver
|
|
216
|
+
.actions({ bridge: true })
|
|
217
|
+
.click(context.webdriver.findElement({ css: '[data-tid="dropdown_bottom"]' }))
|
|
218
|
+
.perform();
|
|
219
|
+
await delay(1000);
|
|
220
|
+
await context.webdriver.executeScript(function () {
|
|
221
|
+
const scrollContainer = window.document.querySelector('[data-tid="modal-container"]') as HTMLElement;
|
|
222
|
+
scrollContainer.scrollTop = scrollContainer.scrollHeight;
|
|
223
|
+
});
|
|
224
|
+
await delay(1000);
|
|
225
|
+
await context.matchImage(await context.webdriver.takeScreenshot());
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["globalObject","delay","ms","Promise","resolve","setTimeout"],"sources":["delay.ts"],"sourcesContent":["import { globalObject } from '@skbkontur/global-object';\n\nexport const delay = (ms: number) => new Promise((resolve) => globalObject.setTimeout(resolve, ms));\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,0BAA0B;;AAEvD,OAAO,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAIC,EAAU,UAAK,IAAIC,OAAO,CAAC,UAACC,OAAO,UAAKJ,YAAY,CAACK,UAAU,CAACD,OAAO,EAAEF,EAAE,CAAC,GAAC","ignoreList":[]}
|
package/lib/delay.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const delay: (ms: number) => Promise<unknown>;
|
package/lib/utils/utils.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
|
|
2
2
|
import _wrapNativeSuper from "@babel/runtime/helpers/esm/wrapNativeSuper";
|
|
3
|
-
import
|
|
3
|
+
import { isValidElement } from 'react';
|
|
4
4
|
import { isForwardRef } from 'react-is';
|
|
5
5
|
import { globalObject, isBrowser } from '@skbkontur/global-object';
|
|
6
|
+
export { delay } from "../delay";
|
|
6
7
|
|
|
7
8
|
// NOTE: Copy-paste from @types/react
|
|
8
9
|
|
|
9
|
-
export var delay = function delay(ms) {
|
|
10
|
-
return new Promise(function (resolve) {
|
|
11
|
-
return globalObject.setTimeout(resolve, ms);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
10
|
export var emptyHandler = function emptyHandler() {
|
|
15
11
|
|
|
16
12
|
/* noop */};
|
|
@@ -68,7 +64,7 @@ export var isExternalLink = function isExternalLink(link) {
|
|
|
68
64
|
* Check if the given ReactNode is an element of the specified ReactUI component
|
|
69
65
|
*/
|
|
70
66
|
export var isReactUINode = function isReactUINode(componentName, node) {
|
|
71
|
-
if ( /*#__PURE__*/
|
|
67
|
+
if ( /*#__PURE__*/isValidElement(node)) {
|
|
72
68
|
return Object.prototype.hasOwnProperty.call(node.type, '__KONTUR_REACT_UI__') &&
|
|
73
69
|
// @ts-expect-error: React doesn't know about existence of __KONTUR_REACT_UI__.
|
|
74
70
|
node.type.__KONTUR_REACT_UI__ === componentName;
|
package/lib/utils/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","isForwardRef","globalObject","isBrowser","delay","ms","Promise","resolve","setTimeout","emptyHandler","CancelationError","_Error","_this","_len","arguments","length","args","Array","_key","call","apply","concat","code","_inheritsLoose","_wrapNativeSuper","Error","taskWithDelay","task","cancelationToken","reject","then","isFunction","x","isFunctionalComponent","Component","Boolean","prototype","isReactComponent","isClassComponent","isIntrinsicElement","element","type","isRefableElement","escapeRegExpSpecChars","s","replace","getRandomID","Math","random","toString","slice","isExternalLink","link","RegExp","location","host","test","isReactUINode","componentName","node","isValidElement","Object","hasOwnProperty","__KONTUR_REACT_UI__","KB","UNITS","calculateDecimals","decimals","formatBytes","bytes","calculatedDecimals","i","floor","log2","formattedBytes","parseFloat","pow","toFixed","isNonNullable","value","undefined","isNullable","isReactUIComponent","name","child","_child$type","mergeRefs","refs","forEach","ref","current","extractDataProps","props","dataProps","restWithoutDataProps","entries","map","_ref","startsWith","startsWithOneOf","searchKeys","inputString","keyIndex","findIndex","key","isInputLike","isKonturIcon","icon","clickOutside","event","document","createEvent","initEvent","body","dispatchEvent"],"sources":["utils.ts"],"sourcesContent":["import React from 'react';\nimport { isForwardRef } from 'react-is';\nimport { globalObject, isBrowser } from '@skbkontur/global-object';\n\nimport { CurrencyInputProps } from '../components/CurrencyInput';\nimport { PasswordInputProps } from '../components/PasswordInput';\nimport { InputProps } from '../components/Input';\nimport { AutocompleteProps } from '../components/Autocomplete';\nimport { FxInputProps } from '../components/FxInput';\n\n// NOTE: Copy-paste from @types/react\nexport type Defaultize<P, D> = P extends any\n ? string extends keyof P\n ? P\n : Pick<P, Exclude<keyof P, keyof D>> &\n Partial<Pick<P, Extract<keyof P, keyof D>>> &\n Partial<Pick<D, Exclude<keyof D, keyof P>>>\n : never;\n\nexport type DefaultizeProps<C, P> = C extends { defaultProps: infer D } ? Defaultize<P, D> : P;\n\nexport type AnyObject = Record<string, unknown>;\n\nexport type NoInfer<T> = T extends infer U ? U : never;\n\nexport const delay = (ms: number) => new Promise((resolve) => globalObject.setTimeout(resolve, ms));\n\nexport const emptyHandler = () => {\n /* noop */\n};\n\nexport class CancelationError extends Error {\n public code = 'CancelationError';\n}\n\nexport function taskWithDelay(task: () => void, ms: number) {\n let cancelationToken: () => void = () => null;\n\n new Promise((resolve, reject) => {\n cancelationToken = reject;\n globalObject.setTimeout(resolve, ms);\n })\n .then(task)\n .catch(() => null);\n\n return cancelationToken;\n}\n\nexport type FunctionWithParams<R = any> = (...args: any[]) => R;\nexport function isFunction<T>(x: T | FunctionWithParams): x is FunctionWithParams {\n return typeof x === 'function';\n}\n\nexport function isFunctionalComponent(Component: unknown): Component is React.ComponentType {\n return Boolean(typeof Component === 'function' && !(Component.prototype && Component.prototype.isReactComponent));\n}\n\nexport function isClassComponent(Component: unknown): Component is React.ComponentType {\n return Boolean(typeof Component === 'function' && Component.prototype && Component.prototype.isReactComponent);\n}\n\nexport function isIntrinsicElement(element: React.ReactElement): boolean {\n return typeof element.type === 'string';\n}\n\nexport function isRefableElement(element: React.ReactElement): boolean {\n return Boolean(isIntrinsicElement(element) || isClassComponent(element.type) || isForwardRef(element));\n}\n\nexport function escapeRegExpSpecChars(s: string): string {\n return s.replace(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nexport const getRandomID = (): string => Math.random().toString(16).slice(2);\n\nexport const isExternalLink = (link: string): boolean => {\n return isBrowser(globalObject) && new RegExp(`^(https?:)?//(?!${globalObject.location.host})\\\\S+`, 'gi').test(link);\n};\n\n/**\n * Check if the given ReactNode is an element of the specified ReactUI component\n */\nexport const isReactUINode = (componentName: string, node: React.ReactNode): boolean => {\n if (React.isValidElement(node)) {\n return (\n Object.prototype.hasOwnProperty.call(node.type, '__KONTUR_REACT_UI__') &&\n // @ts-expect-error: React doesn't know about existence of __KONTUR_REACT_UI__.\n node.type.__KONTUR_REACT_UI__ === componentName\n );\n }\n\n return false;\n};\n\nconst KB = 1024;\nconst UNITS = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\nconst calculateDecimals = (decimals: number) => {\n if (decimals < 0) {\n return 0;\n }\n\n return 0;\n};\n\nexport const formatBytes = (bytes: number, decimals = 2): string | null => {\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n if (!bytes) {\n return null;\n }\n\n const calculatedDecimals = calculateDecimals(decimals);\n\n const i = Math.floor(Math.log2(bytes) / Math.log2(KB));\n const formattedBytes = parseFloat((bytes / Math.pow(KB, i)).toFixed(calculatedDecimals));\n\n return `${formattedBytes} ${UNITS[i]}`;\n};\n\n/**\n * Проверяет, не является ли переданный аргумент null или undefined и исключает типы null и undefined из типа аргумента\n *\n * @param value Значение, которое нужно проверить и исключить из него типы\n * @returns Возвращает true, если переданный аргумент не является null или undefined иначе false\n */\nexport const isNonNullable = <T>(value: T): value is NonNullable<T> => {\n return value !== null && value !== undefined;\n};\n\n/**\n * Checks if the value `null` or `undefined`.\n *\n * @param value Value to check for `null` and `undefined`.\n * @returns Returns `true` if `value` is `null` or `undefined`, else `false`.\n */\nexport const isNullable = (value: unknown): value is null | undefined => {\n return value === null || value === undefined;\n};\n\n/**\n * Creates a function that checks if the given `child`\n * is an instance of some component specified by `name`.\n *\n * @param name Component name for which function will be created.\n * @returns A function that checks if the given `child` is an instance of the component specified by `name`.\n */\nexport const isReactUIComponent = <P = any>(name: string) => {\n return (child: React.ReactNode): child is React.ReactElement<P> => {\n // @ts-expect-error: Property `type` doesn't exist on type `React.ReactNode`, but exists on type `React.ReactElement` meanwhile `React.ReactElement` is not compatible with `React` `children` type.\n return child?.type?.__KONTUR_REACT_UI__ === name;\n };\n};\n\n/**\n * Merges two or more refs into one.\n *\n * @param refs Array of refs.\n * @returns A single ref composing all the refs passed.\n *\n * @example\n * const SomeComponent = forwardRef((props, ref) => {\n * const localRef = useRef();\n *\n * return <div ref={mergeRefs([localRef, ref])} />;\n * });\n */\nexport function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n return ref(value);\n } else if (isNonNullable(ref)) {\n return ((ref as React.MutableRefObject<T | null>).current = value);\n }\n });\n };\n}\n\n/**\n * Extracts all data attributes from props and returns them as well as props.\n *\n * @param props Props object to extract data attributes from.\n * @returns Separated data attributes and all other props.\n */\nexport const extractDataProps = <T extends Record<string, any>>(props: T) => {\n const dataProps: Record<string, any> = {};\n const restWithoutDataProps: Record<string, any> = {};\n\n Object.entries(props).map(([name, value]) => {\n if (name.startsWith('data-')) {\n return (dataProps[name] = value);\n }\n\n return (restWithoutDataProps[name] = value);\n });\n\n return { dataProps, restWithoutDataProps };\n};\n\n/**\n * Basically `.startsWith` for arrays.\n *\n * @param searchKeys Array of strings to test against `inputString`.\n * @param inputString String on which search will be performed.\n * @returns `true` if `inputString` starts with one of keys, else `false`.\n */\nexport const startsWithOneOf = (searchKeys: string[], inputString: string) => {\n const keyIndex = searchKeys.findIndex((key) => {\n return inputString.startsWith(key);\n });\n\n return keyIndex >= 0;\n};\n\nexport const isInputLike =\n isReactUIComponent<InputProps>('Input') ||\n isReactUIComponent<FxInputProps>('FxInput') ||\n isReactUIComponent<AutocompleteProps>('Autocomplete') ||\n isReactUIComponent<PasswordInputProps>('PasswordInput') ||\n isReactUIComponent<CurrencyInputProps>('CurrencyInput');\n\nexport const isKonturIcon = (icon: React.ReactElement) => {\n return Object.prototype.hasOwnProperty.call(icon?.type, '__KONTUR_ICON__');\n};\n\nexport function clickOutside() {\n const event = document.createEvent('HTMLEvents');\n event.initEvent('mousedown', true, true);\n\n document.body.dispatchEvent(event);\n}\n"],"mappings":"gJAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,YAAY,EAAEC,SAAS,QAAQ,0BAA0B;;;;;;;;AAQlE;;;;;;;;;;;;;;;AAeA,OAAO,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAIC,EAAU,UAAK,IAAIC,OAAO,CAAC,UAACC,OAAO,UAAKL,YAAY,CAACM,UAAU,CAACD,OAAO,EAAEF,EAAE,CAAC,GAAC;;AAEnG,OAAO,IAAMI,YAAY,GAAG,SAAfA,YAAYA,CAAA,EAAS;;EAChC,WACD;;AAED,WAAaC,gBAAgB,0BAAAC,MAAA,YAAAD,iBAAA,OAAAE,KAAA,UAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,KAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA,GAAAN,KAAA,GAAAD,MAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,MAAA,SAAAU,MAAA,CAAAL,IAAA,WAAAJ,KAAA;IACpBU,IAAI,GAAG,kBAAkB,QAAAV,KAAA,EAAAW,cAAA,CAAAb,gBAAA,EAAAC,MAAA,SAAAD,gBAAA,i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,IAAI,CAAC;AACtB,CAAC;;AAED,OAAO,IAAMG,WAAW;AACtBvB,kBAAkB,CAAa,OAAO,CAAC;AACvCA,kBAAkB,CAAe,SAAS,CAAC;AAC3CA,kBAAkB,CAAoB,cAAc,CAAC;AACrDA,kBAAkB,CAAqB,eAAe,CAAC;AACvDA,kBAAkB,CAAqB,eAAe,CAAC;;AAEzD,OAAO,IAAMwB,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAwB,EAAK;EACxD,OAAO9C,MAAM,CAACzB,SAAS,CAAC0B,cAAc,CAAC3C,IAAI,CAACwF,IAAI,oBAAJA,IAAI,CAAElE,IAAI,EAAE,iBAAiB,CAAC;AAC5E,CAAC;;AAED,OAAO,SAASmE,YAAYA,CAAA,EAAG;EAC7B,IAAMC,KAAK,GAAGC,QAAQ,CAACC,WAAW,CAAC,YAAY,CAAC;EAChDF,KAAK,CAACG,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC;;EAExCF,QAAQ,CAACG,IAAI,CAACC,aAAa,CAACL,KAAK,CAAC;AACpC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["isValidElement","isForwardRef","globalObject","isBrowser","delay","emptyHandler","CancelationError","_Error","_this","_len","arguments","length","args","Array","_key","call","apply","concat","code","_inheritsLoose","_wrapNativeSuper","Error","taskWithDelay","task","ms","cancelationToken","Promise","resolve","reject","setTimeout","then","isFunction","x","isFunctionalComponent","Component","Boolean","prototype","isReactComponent","isClassComponent","isIntrinsicElement","element","type","isRefableElement","escapeRegExpSpecChars","s","replace","getRandomID","Math","random","toString","slice","isExternalLink","link","RegExp","location","host","test","isReactUINode","componentName","node","Object","hasOwnProperty","__KONTUR_REACT_UI__","KB","UNITS","calculateDecimals","decimals","formatBytes","bytes","calculatedDecimals","i","floor","log2","formattedBytes","parseFloat","pow","toFixed","isNonNullable","value","undefined","isNullable","isReactUIComponent","name","child","_child$type","mergeRefs","refs","forEach","ref","current","extractDataProps","props","dataProps","restWithoutDataProps","entries","map","_ref","startsWith","startsWithOneOf","searchKeys","inputString","keyIndex","findIndex","key","isInputLike","isKonturIcon","icon","clickOutside","event","document","createEvent","initEvent","body","dispatchEvent"],"sources":["utils.ts"],"sourcesContent":["import type React from 'react';\nimport { isValidElement } from 'react';\nimport { isForwardRef } from 'react-is';\nimport { globalObject, isBrowser } from '@skbkontur/global-object';\n\nimport type { CurrencyInputProps } from '../components/CurrencyInput';\nimport type { PasswordInputProps } from '../components/PasswordInput';\nimport type { InputProps } from '../components/Input';\nimport type { AutocompleteProps } from '../components/Autocomplete';\nimport type { FxInputProps } from '../components/FxInput';\n\nexport { delay } from './delay';\n\n// NOTE: Copy-paste from @types/react\nexport type Defaultize<P, D> = P extends any\n ? string extends keyof P\n ? P\n : Pick<P, Exclude<keyof P, keyof D>> &\n Partial<Pick<P, Extract<keyof P, keyof D>>> &\n Partial<Pick<D, Exclude<keyof D, keyof P>>>\n : never;\n\nexport type DefaultizeProps<C, P> = C extends { defaultProps: infer D } ? Defaultize<P, D> : P;\n\nexport type AnyObject = Record<string, unknown>;\n\nexport type NoInfer<T> = T extends infer U ? U : never;\n\nexport const emptyHandler = () => {\n /* noop */\n};\n\nexport class CancelationError extends Error {\n public code = 'CancelationError';\n}\n\nexport function taskWithDelay(task: () => void, ms: number) {\n let cancelationToken: () => void = () => null;\n\n new Promise((resolve, reject) => {\n cancelationToken = reject;\n globalObject.setTimeout(resolve, ms);\n })\n .then(task)\n .catch(() => null);\n\n return cancelationToken;\n}\n\nexport type FunctionWithParams<R = any> = (...args: any[]) => R;\nexport function isFunction<T>(x: T | FunctionWithParams): x is FunctionWithParams {\n return typeof x === 'function';\n}\n\nexport function isFunctionalComponent(Component: unknown): Component is React.ComponentType {\n return Boolean(typeof Component === 'function' && !(Component.prototype && Component.prototype.isReactComponent));\n}\n\nexport function isClassComponent(Component: unknown): Component is React.ComponentType {\n return Boolean(typeof Component === 'function' && Component.prototype && Component.prototype.isReactComponent);\n}\n\nexport function isIntrinsicElement(element: React.ReactElement): boolean {\n return typeof element.type === 'string';\n}\n\nexport function isRefableElement(element: React.ReactElement): boolean {\n return Boolean(isIntrinsicElement(element) || isClassComponent(element.type) || isForwardRef(element));\n}\n\nexport function escapeRegExpSpecChars(s: string): string {\n return s.replace(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nexport const getRandomID = (): string => Math.random().toString(16).slice(2);\n\nexport const isExternalLink = (link: string): boolean => {\n return isBrowser(globalObject) && new RegExp(`^(https?:)?//(?!${globalObject.location.host})\\\\S+`, 'gi').test(link);\n};\n\n/**\n * Check if the given ReactNode is an element of the specified ReactUI component\n */\nexport const isReactUINode = (componentName: string, node: React.ReactNode): boolean => {\n if (isValidElement(node)) {\n return (\n Object.prototype.hasOwnProperty.call(node.type, '__KONTUR_REACT_UI__') &&\n // @ts-expect-error: React doesn't know about existence of __KONTUR_REACT_UI__.\n node.type.__KONTUR_REACT_UI__ === componentName\n );\n }\n\n return false;\n};\n\nconst KB = 1024;\nconst UNITS = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\nconst calculateDecimals = (decimals: number) => {\n if (decimals < 0) {\n return 0;\n }\n\n return 0;\n};\n\nexport const formatBytes = (bytes: number, decimals = 2): string | null => {\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n if (!bytes) {\n return null;\n }\n\n const calculatedDecimals = calculateDecimals(decimals);\n\n const i = Math.floor(Math.log2(bytes) / Math.log2(KB));\n const formattedBytes = parseFloat((bytes / Math.pow(KB, i)).toFixed(calculatedDecimals));\n\n return `${formattedBytes} ${UNITS[i]}`;\n};\n\n/**\n * Проверяет, не является ли переданный аргумент null или undefined и исключает типы null и undefined из типа аргумента\n *\n * @param value Значение, которое нужно проверить и исключить из него типы\n * @returns Возвращает true, если переданный аргумент не является null или undefined иначе false\n */\nexport const isNonNullable = <T>(value: T): value is NonNullable<T> => {\n return value !== null && value !== undefined;\n};\n\n/**\n * Checks if the value `null` or `undefined`.\n *\n * @param value Value to check for `null` and `undefined`.\n * @returns Returns `true` if `value` is `null` or `undefined`, else `false`.\n */\nexport const isNullable = (value: unknown): value is null | undefined => {\n return value === null || value === undefined;\n};\n\n/**\n * Creates a function that checks if the given `child`\n * is an instance of some component specified by `name`.\n *\n * @param name Component name for which function will be created.\n * @returns A function that checks if the given `child` is an instance of the component specified by `name`.\n */\nexport const isReactUIComponent = <P = any>(name: string) => {\n return (child: React.ReactNode): child is React.ReactElement<P> => {\n // @ts-expect-error: Property `type` doesn't exist on type `React.ReactNode`, but exists on type `React.ReactElement` meanwhile `React.ReactElement` is not compatible with `React` `children` type.\n return child?.type?.__KONTUR_REACT_UI__ === name;\n };\n};\n\n/**\n * Merges two or more refs into one.\n *\n * @param refs Array of refs.\n * @returns A single ref composing all the refs passed.\n *\n * @example\n * const SomeComponent = forwardRef((props, ref) => {\n * const localRef = useRef();\n *\n * return <div ref={mergeRefs([localRef, ref])} />;\n * });\n */\nexport function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n return ref(value);\n } else if (isNonNullable(ref)) {\n return ((ref as React.MutableRefObject<T | null>).current = value);\n }\n });\n };\n}\n\n/**\n * Extracts all data attributes from props and returns them as well as props.\n *\n * @param props Props object to extract data attributes from.\n * @returns Separated data attributes and all other props.\n */\nexport const extractDataProps = <T extends Record<string, any>>(props: T) => {\n const dataProps: Record<string, any> = {};\n const restWithoutDataProps: Record<string, any> = {};\n\n Object.entries(props).map(([name, value]) => {\n if (name.startsWith('data-')) {\n return (dataProps[name] = value);\n }\n\n return (restWithoutDataProps[name] = value);\n });\n\n return { dataProps, restWithoutDataProps };\n};\n\n/**\n * Basically `.startsWith` for arrays.\n *\n * @param searchKeys Array of strings to test against `inputString`.\n * @param inputString String on which search will be performed.\n * @returns `true` if `inputString` starts with one of keys, else `false`.\n */\nexport const startsWithOneOf = (searchKeys: string[], inputString: string) => {\n const keyIndex = searchKeys.findIndex((key) => {\n return inputString.startsWith(key);\n });\n\n return keyIndex >= 0;\n};\n\nexport const isInputLike =\n isReactUIComponent<InputProps>('Input') ||\n isReactUIComponent<FxInputProps>('FxInput') ||\n isReactUIComponent<AutocompleteProps>('Autocomplete') ||\n isReactUIComponent<PasswordInputProps>('PasswordInput') ||\n isReactUIComponent<CurrencyInputProps>('CurrencyInput');\n\nexport const isKonturIcon = (icon: React.ReactElement) => {\n return Object.prototype.hasOwnProperty.call(icon?.type, '__KONTUR_ICON__');\n};\n\nexport function clickOutside() {\n const event = document.createEvent('HTMLEvents');\n event.initEvent('mousedown', true, true);\n\n document.body.dispatchEvent(event);\n}\n"],"mappings":";AACA,SAASA,cAAc,QAAQ,OAAO;AACtC,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,YAAY,EAAEC,SAAS,QAAQ,0BAA0B;;;;;;;;AAQlE,SAASC,KAAK,QAAQ,SAAS;;AAE/B;;;;;;;;;;;;;;;AAeA,OAAO,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAA,EAAS;;EAChC,WACD;;AAED,WAAaC,gBAAgB,0BAAAC,MAAA,YAAAD,iBAAA,OAAAE,KAAA,UAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,KAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA,GAAAN,KAAA,GAAAD,MAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,MAAA,SAAAU,MAAA,CAAAL,IAAA,WAAAJ,KAAA;IACpBU,IAAI,GAAG,kBAAkB,QAAAV,KAAA,EAAAW,cAAA,CAAAb,gBAAA,EAAAC,MAAA,SAAAD,gBAAA,iBAAAc,gBAAA,CADIC,KAAK;;;AAI3C,OAAO,SAASC,aAAaA,CAACC,IAAgB,EAAEC,EAA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AAkB,CAAe,SAAS,CAAC;AAC3CA,kBAAkB,CAAoB,cAAc,CAAC;AACrDA,kBAAkB,CAAqB,eAAe,CAAC;AACvDA,kBAAkB,CAAqB,eAAe,CAAC;;AAEzD,OAAO,IAAMwB,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAwB,EAAK;EACxD,OAAO9C,MAAM,CAACxB,SAAS,CAACyB,cAAc,CAAC9C,IAAI,CAAC2F,IAAI,oBAAJA,IAAI,CAAEjE,IAAI,EAAE,iBAAiB,CAAC;AAC5E,CAAC;;AAED,OAAO,SAASkE,YAAYA,CAAA,EAAG;EAC7B,IAAMC,KAAK,GAAGC,QAAQ,CAACC,WAAW,CAAC,YAAY,CAAC;EAChDF,KAAK,CAACG,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC;;EAExCF,QAAQ,CAACG,IAAI,CAACC,aAAa,CAACL,KAAK,CAAC;AACpC","ignoreList":[]}
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InputProps } from '../components/Input';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { InputProps } from '../components/Input';
|
|
3
|
+
export { delay } from './delay';
|
|
3
4
|
export type Defaultize<P, D> = P extends any ? string extends keyof P ? P : Pick<P, Exclude<keyof P, keyof D>> & Partial<Pick<P, Extract<keyof P, keyof D>>> & Partial<Pick<D, Exclude<keyof D, keyof P>>> : never;
|
|
4
5
|
export type DefaultizeProps<C, P> = C extends {
|
|
5
6
|
defaultProps: infer D;
|
|
6
7
|
} ? Defaultize<P, D> : P;
|
|
7
8
|
export type AnyObject = Record<string, unknown>;
|
|
8
9
|
export type NoInfer<T> = T extends infer U ? U : never;
|
|
9
|
-
export declare const delay: (ms: number) => Promise<unknown>;
|
|
10
10
|
export declare const emptyHandler: () => void;
|
|
11
11
|
export declare class CancelationError extends Error {
|
|
12
12
|
code: string;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/react-ui",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.9",
|
|
4
4
|
"description": "UI Components",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
|
-
"homepage": "https://tech.skbkontur.ru/react-ui/5.0.
|
|
8
|
+
"homepage": "https://tech.skbkontur.ru/react-ui/5.0.9/",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git@github.com:skbkontur/retail-ui.git"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"fix:prettier": "yarn prettier --write .",
|
|
41
41
|
"test": "jest --detectOpenHandles",
|
|
42
42
|
"test:watch": "yarn test --watch",
|
|
43
|
-
"creevey": "node ../../scripts/creevey-prepare.js .creevey/config.
|
|
44
|
-
"creevey:update": "cross-env BABEL_ENV=cjs creevey -c .creevey/config.
|
|
43
|
+
"creevey": "node ../../scripts/creevey-prepare.js .creevey/config.mts && cross-env BABEL_ENV=cjs creevey -c .creevey/config.mts",
|
|
44
|
+
"creevey:update": "cross-env BABEL_ENV=cjs creevey -c .creevey/config.mts --update",
|
|
45
45
|
"creevey:ui": "yarn creevey --ui",
|
|
46
46
|
"report:eslint": "yarn eslint -f eslint-html-reporter/reporter.js -o reports/eslint/index.html"
|
|
47
47
|
},
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"chalk": "4.1.0",
|
|
115
115
|
"copyfiles": "^2.4.1",
|
|
116
116
|
"core-js": "^3.37.1",
|
|
117
|
-
"creevey": "0.
|
|
117
|
+
"creevey": "0.10.0-beta.13",
|
|
118
118
|
"cross-env": "^7.0.3",
|
|
119
119
|
"css-loader": "^7.1.2",
|
|
120
120
|
"dotenv": "^16.4.5",
|
|
@@ -142,6 +142,7 @@
|
|
|
142
142
|
"react-dom": "^18.3.1",
|
|
143
143
|
"react-styleguidist": "^12.0.1",
|
|
144
144
|
"rimraf": "^5.0.7",
|
|
145
|
+
"selenium-webdriver": "^4.27.0",
|
|
145
146
|
"semver": "^7.6.2",
|
|
146
147
|
"serve": "^13.0.2",
|
|
147
148
|
"storybook": "7.6.18",
|