@skbkontur/react-ui 0.0.0-a8f1c3e7a1 → 0.0.0-ab4ec97409
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 +50 -0
- package/README.md +7 -7
- package/cjs/components/Autocomplete/Autocomplete.d.ts +6 -23
- package/cjs/components/Autocomplete/Autocomplete.js +49 -46
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Button/Button.d.ts +2 -0
- package/cjs/components/Button/Button.js +29 -1
- package/cjs/components/Button/Button.js.map +1 -1
- package/cjs/components/Button/Button.styles.d.ts +6 -0
- package/cjs/components/Button/Button.styles.js +107 -75
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Calendar/Calendar.d.ts +2 -0
- package/cjs/components/Calendar/Calendar.js +1 -0
- package/cjs/components/Calendar/Calendar.js.map +1 -1
- package/cjs/components/Center/Center.d.ts +2 -0
- package/cjs/components/Center/Center.js +1 -0
- package/cjs/components/Center/Center.js.map +1 -1
- package/cjs/components/Checkbox/Checkbox.d.ts +2 -12
- package/cjs/components/Checkbox/Checkbox.js +2 -14
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/ComboBox/ComboBox.d.ts +11 -1
- package/cjs/components/ComboBox/ComboBox.js +21 -1
- package/cjs/components/ComboBox/ComboBox.js.map +1 -1
- package/cjs/components/CurrencyInput/CurrencyInput.d.ts +6 -24
- package/cjs/components/CurrencyInput/CurrencyInput.js +5 -28
- package/cjs/components/CurrencyInput/CurrencyInput.js.map +1 -1
- package/cjs/components/CurrencyInput/constants.js +1 -2
- package/cjs/components/CurrencyInput/constants.js.map +1 -1
- package/cjs/components/CurrencyLabel/CurrencyLabel.js +21 -28
- package/cjs/components/CurrencyLabel/CurrencyLabel.js.map +1 -1
- package/cjs/components/DateInput/DateInput.d.ts +2 -0
- package/cjs/components/DateInput/DateInput.js +1 -0
- package/cjs/components/DateInput/DateInput.js.map +1 -1
- package/cjs/components/DatePicker/DatePicker.d.ts +6 -33
- package/cjs/components/DatePicker/DatePicker.js +6 -60
- package/cjs/components/DatePicker/DatePicker.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.d.ts +2 -47
- package/cjs/components/Dropdown/Dropdown.js +2 -82
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/DropdownMenu/DropdownMenu.d.ts +4 -2
- package/cjs/components/DropdownMenu/DropdownMenu.js +1 -0
- package/cjs/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/cjs/components/FxInput/FxInput.d.ts +2 -5
- package/cjs/components/FxInput/FxInput.js +2 -7
- package/cjs/components/FxInput/FxInput.js.map +1 -1
- package/cjs/components/Gapped/Gapped.d.ts +2 -15
- package/cjs/components/Gapped/Gapped.js +1 -24
- package/cjs/components/Gapped/Gapped.js.map +1 -1
- package/cjs/components/GlobalLoader/GlobalLoader.d.ts +2 -0
- package/cjs/components/GlobalLoader/GlobalLoader.js +1 -0
- package/cjs/components/GlobalLoader/GlobalLoader.js.map +1 -1
- package/cjs/components/Group/Group.d.ts +5 -4
- package/cjs/components/Group/Group.js +91 -40
- package/cjs/components/Group/Group.js.map +1 -1
- package/cjs/components/Group/Group.styles.d.ts +1 -0
- package/cjs/components/Group/Group.styles.js +12 -6
- package/cjs/components/Group/Group.styles.js.map +1 -1
- package/cjs/components/Hint/Hint.d.ts +2 -0
- package/cjs/components/Hint/Hint.js +1 -0
- package/cjs/components/Hint/Hint.js.map +1 -1
- package/cjs/components/Input/Input.d.ts +2 -0
- package/cjs/components/Input/Input.js +1 -0
- package/cjs/components/Input/Input.js.map +1 -1
- package/cjs/components/Kebab/Kebab.d.ts +2 -1
- package/cjs/components/Kebab/Kebab.js +2 -26
- package/cjs/components/Kebab/Kebab.js.map +1 -1
- package/cjs/components/Link/Link.d.ts +2 -0
- package/cjs/components/Link/Link.js +1 -0
- package/cjs/components/Link/Link.js.map +1 -1
- package/cjs/components/Loader/Loader.d.ts +6 -36
- package/cjs/components/Loader/Loader.js +3 -57
- package/cjs/components/Loader/Loader.js.map +1 -1
- package/cjs/components/MaskedInput/MaskedInput.d.ts +9 -0
- package/cjs/components/MaskedInput/MaskedInput.js +40 -3
- package/cjs/components/MaskedInput/MaskedInput.js.map +1 -1
- package/cjs/components/MenuItem/MenuItem.d.ts +2 -12
- package/cjs/components/MenuItem/MenuItem.js +2 -22
- package/cjs/components/MenuItem/MenuItem.js.map +1 -1
- package/cjs/components/MiniModal/MiniModal.styles.d.ts +1 -0
- package/cjs/components/MiniModal/MiniModal.styles.js +14 -7
- package/cjs/components/MiniModal/MiniModal.styles.js.map +1 -1
- package/cjs/components/MiniModal/MiniModalBody.js +17 -2
- package/cjs/components/MiniModal/MiniModalBody.js.map +1 -1
- package/cjs/components/Modal/Modal.styles.d.ts +1 -0
- package/cjs/components/Modal/Modal.styles.js +36 -28
- package/cjs/components/Modal/Modal.styles.js.map +1 -1
- package/cjs/components/Modal/ModalBody.d.ts +2 -0
- package/cjs/components/Modal/ModalBody.js +1 -0
- package/cjs/components/Modal/ModalBody.js.map +1 -1
- package/cjs/components/Modal/ModalHeader.d.ts +5 -0
- package/cjs/components/Modal/ModalHeader.js +8 -1
- package/cjs/components/Modal/ModalHeader.js.map +1 -1
- package/cjs/components/Paging/DotsIcon.d.ts +3 -0
- package/cjs/components/Paging/DotsIcon.js +13 -0
- package/cjs/components/Paging/DotsIcon.js.map +1 -0
- package/cjs/components/Paging/ForwardIcon.d.ts +3 -0
- package/cjs/components/Paging/ForwardIcon.js +13 -1
- package/cjs/components/Paging/ForwardIcon.js.map +1 -1
- package/cjs/components/Paging/NavigationHelper.d.ts +3 -2
- package/cjs/components/Paging/NavigationHelper.js +8 -6
- package/cjs/components/Paging/NavigationHelper.js.map +1 -1
- package/cjs/components/Paging/Paging.d.ts +13 -2
- package/cjs/components/Paging/Paging.js +120 -50
- package/cjs/components/Paging/Paging.js.map +1 -1
- package/cjs/components/Paging/Paging.styles.d.ts +24 -1
- package/cjs/components/Paging/Paging.styles.js +151 -22
- package/cjs/components/Paging/Paging.styles.js.map +1 -1
- package/cjs/components/Paging/PagingHelper.d.ts +1 -1
- package/cjs/components/Paging/PagingHelper.js +18 -11
- package/cjs/components/Paging/PagingHelper.js.map +1 -1
- package/cjs/components/PasswordInput/PasswordInput.d.ts +2 -7
- package/cjs/components/PasswordInput/PasswordInput.js +2 -11
- package/cjs/components/PasswordInput/PasswordInput.js.map +1 -1
- package/cjs/components/Radio/Radio.d.ts +2 -0
- package/cjs/components/Radio/Radio.js +1 -0
- package/cjs/components/Radio/Radio.js.map +1 -1
- package/cjs/components/RadioGroup/RadioGroup.d.ts +2 -0
- package/cjs/components/RadioGroup/RadioGroup.js +1 -0
- package/cjs/components/RadioGroup/RadioGroup.js.map +1 -1
- package/cjs/components/ScrollContainer/ScrollContainer.d.ts +2 -9
- package/cjs/components/ScrollContainer/ScrollContainer.js +2 -11
- package/cjs/components/ScrollContainer/ScrollContainer.js.map +1 -1
- package/cjs/components/Select/Select.d.ts +2 -0
- package/cjs/components/Select/Select.js +2 -1
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/SidePage/SidePage.styles.d.ts +3 -1
- package/cjs/components/SidePage/SidePage.styles.js +52 -38
- package/cjs/components/SidePage/SidePage.styles.js.map +1 -1
- package/cjs/components/SidePage/SidePageBody.d.ts +2 -0
- package/cjs/components/SidePage/SidePageBody.js +1 -0
- package/cjs/components/SidePage/SidePageBody.js.map +1 -1
- package/cjs/components/SidePage/SidePageContainer.d.ts +2 -0
- package/cjs/components/SidePage/SidePageContainer.js +1 -0
- package/cjs/components/SidePage/SidePageContainer.js.map +1 -1
- package/cjs/components/SidePage/SidePageFooter.d.ts +2 -0
- package/cjs/components/SidePage/SidePageFooter.js +1 -0
- package/cjs/components/SidePage/SidePageFooter.js.map +1 -1
- package/cjs/components/SidePage/SidePageHeader.d.ts +12 -2
- package/cjs/components/SidePage/SidePageHeader.js +60 -19
- package/cjs/components/SidePage/SidePageHeader.js.map +1 -1
- package/cjs/components/Spinner/Spinner.d.ts +2 -18
- package/cjs/components/Spinner/Spinner.js +2 -32
- package/cjs/components/Spinner/Spinner.js.map +1 -1
- package/cjs/components/Sticky/Sticky.d.ts +2 -13
- package/cjs/components/Sticky/Sticky.js +2 -22
- package/cjs/components/Sticky/Sticky.js.map +1 -1
- package/cjs/components/Switcher/Switcher.d.ts +6 -21
- package/cjs/components/Switcher/Switcher.js +11 -20
- package/cjs/components/Switcher/Switcher.js.map +1 -1
- package/cjs/components/Switcher/Switcher.styles.d.ts +1 -0
- package/cjs/components/Switcher/Switcher.styles.js +17 -9
- package/cjs/components/Switcher/Switcher.styles.js.map +1 -1
- package/cjs/components/Tabs/Indicator.d.ts +2 -0
- package/cjs/components/Tabs/Indicator.js +1 -0
- package/cjs/components/Tabs/Indicator.js.map +1 -1
- package/cjs/components/Tabs/Tab.d.ts +2 -0
- package/cjs/components/Tabs/Tab.js +1 -0
- package/cjs/components/Tabs/Tab.js.map +1 -1
- package/cjs/components/Tabs/Tabs.d.ts +2 -0
- package/cjs/components/Tabs/Tabs.js +1 -0
- package/cjs/components/Tabs/Tabs.js.map +1 -1
- package/cjs/components/Textarea/Textarea.d.ts +2 -44
- package/cjs/components/Textarea/Textarea.js +2 -56
- package/cjs/components/Textarea/Textarea.js.map +1 -1
- package/cjs/components/Textarea/TextareaCounter.js +2 -13
- package/cjs/components/Textarea/TextareaCounter.js.map +1 -1
- package/cjs/components/Toast/Toast.d.ts +2 -0
- package/cjs/components/Toast/Toast.js +1 -0
- package/cjs/components/Toast/Toast.js.map +1 -1
- package/cjs/components/Toast/ToastView.d.ts +2 -14
- package/cjs/components/Toast/ToastView.js +3 -22
- package/cjs/components/Toast/ToastView.js.map +1 -1
- package/cjs/components/Toggle/Toggle.d.ts +2 -10
- package/cjs/components/Toggle/Toggle.js +1 -11
- package/cjs/components/Toggle/Toggle.js.map +1 -1
- package/cjs/components/Token/Token.d.ts +2 -0
- package/cjs/components/Token/Token.js +1 -0
- package/cjs/components/Token/Token.js.map +1 -1
- package/cjs/components/TokenInput/TokenInput.d.ts +2 -0
- package/cjs/components/TokenInput/TokenInput.js +1 -0
- package/cjs/components/TokenInput/TokenInput.js.map +1 -1
- package/cjs/components/Tooltip/Tooltip.d.ts +14 -9
- package/cjs/components/Tooltip/Tooltip.js +101 -17
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/components/Tooltip/Tooltip.styles.d.ts +7 -1
- package/cjs/components/Tooltip/Tooltip.styles.js +50 -12
- package/cjs/components/Tooltip/Tooltip.styles.js.map +1 -1
- package/cjs/components/TooltipMenu/TooltipMenu.d.ts +4 -2
- package/cjs/components/TooltipMenu/TooltipMenu.js +1 -0
- package/cjs/components/TooltipMenu/TooltipMenu.js.map +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js.map +1 -1
- package/cjs/internal/CommonWrapper/CommonWrapper.d.ts +2 -0
- package/cjs/internal/CommonWrapper/CommonWrapper.js +1 -0
- package/cjs/internal/CommonWrapper/CommonWrapper.js.map +1 -1
- package/cjs/internal/ComponentTable.js +2 -3
- package/cjs/internal/ComponentTable.js.map +1 -1
- package/cjs/internal/CustomComboBox/ComboBoxView.d.ts +5 -1
- package/cjs/internal/CustomComboBox/ComboBoxView.js +27 -1
- package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
- package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +9 -2
- package/cjs/internal/CustomComboBox/CustomComboBox.js +23 -10
- package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
- package/cjs/internal/DateSelect/DateSelect.d.ts +0 -10
- package/cjs/internal/DateSelect/DateSelect.js +1 -18
- package/cjs/internal/DateSelect/DateSelect.js.map +1 -1
- package/cjs/internal/FocusTrap/FocusTrap.d.ts +2 -0
- package/cjs/internal/FocusTrap/FocusTrap.js +1 -0
- package/cjs/internal/FocusTrap/FocusTrap.js.map +1 -1
- package/cjs/internal/IgnoreLayerClick/IgnoreLayerClick.js +1 -0
- package/cjs/internal/IgnoreLayerClick/IgnoreLayerClick.js.map +1 -1
- package/cjs/internal/InputLikeText/InputLikeText.d.ts +2 -0
- package/cjs/internal/InputLikeText/InputLikeText.js +1 -0
- package/cjs/internal/InputLikeText/InputLikeText.js.map +1 -1
- package/cjs/internal/Menu/Menu.d.ts +2 -0
- package/cjs/internal/Menu/Menu.js +1 -0
- package/cjs/internal/Menu/Menu.js.map +1 -1
- package/cjs/internal/MobilePopup/MobilePopup.d.ts +2 -0
- package/cjs/internal/MobilePopup/MobilePopup.js +1 -0
- package/cjs/internal/MobilePopup/MobilePopup.js.map +1 -1
- package/cjs/internal/Popup/Popup.d.ts +41 -59
- package/cjs/internal/Popup/Popup.js +36 -79
- package/cjs/internal/Popup/Popup.js.map +1 -1
- package/cjs/internal/Popup/PopupPin.d.ts +23 -33
- package/cjs/internal/Popup/PopupPin.js +2 -35
- package/cjs/internal/Popup/PopupPin.js.map +1 -1
- package/cjs/internal/Popup/PopupPinNew.d.ts +31 -0
- package/cjs/internal/Popup/PopupPinNew.js +180 -0
- package/cjs/internal/Popup/PopupPinNew.js.map +1 -0
- package/cjs/internal/Popup/PopupPinNew.styles.d.ts +7 -0
- package/cjs/internal/Popup/PopupPinNew.styles.js +33 -0
- package/cjs/internal/Popup/PopupPinNew.styles.js.map +1 -0
- package/cjs/internal/PopupMenu/PopupMenu.d.ts +2 -0
- package/cjs/internal/PopupMenu/PopupMenu.js +1 -0
- package/cjs/internal/PopupMenu/PopupMenu.js.map +1 -1
- package/cjs/internal/RenderContainer/RenderInnerContainer.d.ts +0 -6
- package/cjs/internal/RenderContainer/RenderInnerContainer.js +0 -9
- package/cjs/internal/RenderContainer/RenderInnerContainer.js.map +1 -1
- package/cjs/internal/RenderLayer/RenderLayer.d.ts +2 -3
- package/cjs/internal/RenderLayer/RenderLayer.js +3 -12
- package/cjs/internal/RenderLayer/RenderLayer.js.map +1 -1
- package/cjs/internal/ThemePlayground/Playground.js +1 -1
- package/cjs/internal/ThemePlayground/Playground.js.map +1 -1
- package/cjs/internal/ThemePlayground/Playground.styles.js +5 -8
- package/cjs/internal/ThemePlayground/Playground.styles.js.map +1 -1
- package/cjs/internal/ThemePlayground/ShowcaseGroup.js +12 -1
- package/cjs/internal/ThemePlayground/ShowcaseGroup.js.map +1 -1
- package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/cjs/internal/ZIndex/ZIndex.d.ts +3 -3
- package/cjs/internal/ZIndex/ZIndex.js +5 -1
- package/cjs/internal/ZIndex/ZIndex.js.map +1 -1
- package/cjs/internal/icons2022/UiMenuDots3HIcon/UiMenuDots3HIcon16Regular.d.ts +2 -0
- package/cjs/internal/icons2022/UiMenuDots3HIcon/UiMenuDots3HIcon16Regular.js +16 -0
- package/cjs/internal/icons2022/UiMenuDots3HIcon/UiMenuDots3HIcon16Regular.js.map +1 -0
- package/cjs/internal/themes/BasicTheme.d.ts +112 -20
- package/cjs/internal/themes/BasicTheme.js +149 -18
- package/cjs/internal/themes/BasicTheme.js.map +1 -1
- package/cjs/internal/themes/DarkTheme5_2.js +1 -1
- package/cjs/internal/themes/DarkTheme5_2.js.map +1 -1
- package/cjs/internal/themes/DarkTheme5_3.d.ts +1 -0
- package/cjs/internal/themes/DarkTheme5_3.js +13 -0
- package/cjs/internal/themes/DarkTheme5_3.js.map +1 -0
- package/cjs/internal/themes/DarkTheme5_4.d.ts +1 -0
- package/cjs/internal/themes/DarkTheme5_4.js +10 -0
- package/cjs/internal/themes/DarkTheme5_4.js.map +1 -0
- package/cjs/internal/themes/LightTheme5_3.d.ts +1 -0
- package/cjs/internal/themes/LightTheme5_3.js +13 -0
- package/cjs/internal/themes/LightTheme5_3.js.map +1 -0
- package/cjs/internal/themes/LightTheme5_4.d.ts +1 -0
- package/cjs/internal/themes/LightTheme5_4.js +10 -0
- package/cjs/internal/themes/LightTheme5_4.js.map +1 -0
- package/cjs/lib/delay.mts +3 -0
- package/cjs/lib/featureFlagsContext/FeatureFlagsHelpers.d.ts +5 -0
- package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +5 -0
- package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js +11 -1
- package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
- package/cjs/lib/forwardRefAndName.d.ts +1 -1
- package/cjs/lib/forwardRefAndName.js +0 -1
- package/cjs/lib/forwardRefAndName.js.map +1 -1
- package/cjs/lib/rootNode/rootNodeDecorator.d.ts +2 -1
- package/cjs/lib/rootNode/rootNodeDecorator.js +1 -0
- package/cjs/lib/rootNode/rootNodeDecorator.js.map +1 -1
- package/cjs/lib/theming/ThemeVersions.d.ts +1 -1
- package/cjs/lib/theming/ThemeVersions.js.map +1 -1
- package/cjs/lib/theming/themes/DarkTheme.d.ts +2 -0
- package/cjs/lib/theming/themes/DarkTheme.js +6 -2
- package/cjs/lib/theming/themes/DarkTheme.js.map +1 -1
- package/cjs/lib/theming/themes/LightTheme.d.ts +2 -0
- package/cjs/lib/theming/themes/LightTheme.js +6 -2
- package/cjs/lib/theming/themes/LightTheme.js.map +1 -1
- package/cjs/lib/utils.d.ts +4 -0
- package/cjs/lib/utils.js +5 -1
- package/cjs/lib/utils.js.map +1 -1
- package/components/Autocomplete/Autocomplete/Autocomplete.js +49 -45
- package/components/Autocomplete/Autocomplete/Autocomplete.js.map +1 -1
- package/components/Autocomplete/Autocomplete.d.ts +6 -23
- package/components/Button/Button/Button.js +26 -5
- package/components/Button/Button/Button.js.map +1 -1
- package/components/Button/Button.d.ts +2 -0
- package/components/Button/Button.styles/Button.styles.js +78 -60
- package/components/Button/Button.styles/Button.styles.js.map +1 -1
- package/components/Button/Button.styles.d.ts +6 -0
- package/components/Calendar/Calendar/Calendar.js.map +1 -1
- package/components/Calendar/Calendar.d.ts +2 -0
- package/components/Center/Center/Center.js.map +1 -1
- package/components/Center/Center.d.ts +2 -0
- package/components/Checkbox/Checkbox/Checkbox.js +0 -11
- package/components/Checkbox/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Checkbox.d.ts +2 -12
- package/components/ComboBox/ComboBox/ComboBox.js +8 -0
- package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
- package/components/ComboBox/ComboBox.d.ts +11 -1
- package/components/CurrencyInput/CurrencyInput/CurrencyInput.js +12 -36
- package/components/CurrencyInput/CurrencyInput/CurrencyInput.js.map +1 -1
- package/components/CurrencyInput/CurrencyInput.d.ts +6 -24
- package/components/CurrencyInput/constants/constants.js +0 -1
- package/components/CurrencyInput/constants/constants.js.map +1 -1
- package/components/CurrencyLabel/CurrencyLabel/CurrencyLabel.js +10 -22
- package/components/CurrencyLabel/CurrencyLabel/CurrencyLabel.js.map +1 -1
- package/components/DateInput/DateInput/DateInput.js.map +1 -1
- package/components/DateInput/DateInput.d.ts +2 -0
- package/components/DatePicker/DatePicker/DatePicker.js +1 -32
- package/components/DatePicker/DatePicker/DatePicker.js.map +1 -1
- package/components/DatePicker/DatePicker.d.ts +6 -33
- package/components/Dropdown/Dropdown/Dropdown.js +1 -47
- package/components/Dropdown/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.d.ts +2 -47
- package/components/DropdownMenu/DropdownMenu/DropdownMenu.js.map +1 -1
- package/components/DropdownMenu/DropdownMenu.d.ts +4 -2
- package/components/FxInput/FxInput/FxInput.js +1 -5
- package/components/FxInput/FxInput/FxInput.js.map +1 -1
- package/components/FxInput/FxInput.d.ts +2 -5
- package/components/Gapped/Gapped/Gapped.js +1 -15
- package/components/Gapped/Gapped/Gapped.js.map +1 -1
- package/components/Gapped/Gapped.d.ts +2 -15
- package/components/GlobalLoader/GlobalLoader/GlobalLoader.js.map +1 -1
- package/components/GlobalLoader/GlobalLoader.d.ts +2 -0
- package/components/Group/Group/Group.js +64 -28
- package/components/Group/Group/Group.js.map +1 -1
- package/components/Group/Group.d.ts +5 -4
- package/components/Group/Group.styles/Group.styles.js +9 -6
- package/components/Group/Group.styles/Group.styles.js.map +1 -1
- package/components/Group/Group.styles.d.ts +1 -0
- package/components/Hint/Hint/Hint.js.map +1 -1
- package/components/Hint/Hint.d.ts +2 -0
- package/components/Input/Input/Input.js.map +1 -1
- package/components/Input/Input.d.ts +2 -0
- package/components/Kebab/Kebab/Kebab.js +2 -20
- package/components/Kebab/Kebab/Kebab.js.map +1 -1
- package/components/Kebab/Kebab.d.ts +2 -1
- package/components/Link/Link/Link.js.map +1 -1
- package/components/Link/Link.d.ts +2 -0
- package/components/Loader/Loader/Loader.js +0 -33
- package/components/Loader/Loader/Loader.js.map +1 -1
- package/components/Loader/Loader.d.ts +6 -36
- package/components/MaskedInput/MaskedInput/MaskedInput.js +25 -1
- package/components/MaskedInput/MaskedInput/MaskedInput.js.map +1 -1
- package/components/MaskedInput/MaskedInput.d.ts +9 -0
- package/components/MenuItem/MenuItem/MenuItem.js +1 -12
- package/components/MenuItem/MenuItem/MenuItem.js.map +1 -1
- package/components/MenuItem/MenuItem.d.ts +2 -12
- package/components/MiniModal/MiniModal.styles/MiniModal.styles.js +10 -7
- package/components/MiniModal/MiniModal.styles/MiniModal.styles.js.map +1 -1
- package/components/MiniModal/MiniModal.styles.d.ts +1 -0
- package/components/MiniModal/MiniModalBody/MiniModalBody.js +13 -5
- package/components/MiniModal/MiniModalBody/MiniModalBody.js.map +1 -1
- package/components/Modal/Modal.styles/Modal.styles.js +31 -28
- package/components/Modal/Modal.styles/Modal.styles.js.map +1 -1
- package/components/Modal/Modal.styles.d.ts +1 -0
- package/components/Modal/ModalBody/ModalBody.js.map +1 -1
- package/components/Modal/ModalBody.d.ts +2 -0
- package/components/Modal/ModalHeader/ModalHeader.js +3 -1
- package/components/Modal/ModalHeader/ModalHeader.js.map +1 -1
- package/components/Modal/ModalHeader.d.ts +5 -0
- package/components/Paging/DotsIcon/DotsIcon.js +14 -0
- package/components/Paging/DotsIcon/DotsIcon.js.map +1 -0
- package/components/Paging/DotsIcon/package.json +6 -0
- package/components/Paging/DotsIcon.d.ts +3 -0
- package/components/Paging/ForwardIcon/ForwardIcon.js +15 -1
- package/components/Paging/ForwardIcon/ForwardIcon.js.map +1 -1
- package/components/Paging/ForwardIcon.d.ts +3 -0
- package/components/Paging/NavigationHelper/NavigationHelper.js +9 -8
- package/components/Paging/NavigationHelper/NavigationHelper.js.map +1 -1
- package/components/Paging/NavigationHelper.d.ts +3 -2
- package/components/Paging/Paging/Paging.js +96 -47
- package/components/Paging/Paging/Paging.js.map +1 -1
- package/components/Paging/Paging.d.ts +13 -2
- package/components/Paging/Paging.styles/Paging.styles.js +77 -16
- package/components/Paging/Paging.styles/Paging.styles.js.map +1 -1
- package/components/Paging/Paging.styles.d.ts +24 -1
- package/components/Paging/PagingHelper/PagingHelper.js +16 -8
- package/components/Paging/PagingHelper/PagingHelper.js.map +1 -1
- package/components/Paging/PagingHelper.d.ts +1 -1
- package/components/PasswordInput/PasswordInput/PasswordInput.js +1 -7
- package/components/PasswordInput/PasswordInput/PasswordInput.js.map +1 -1
- package/components/PasswordInput/PasswordInput.d.ts +2 -7
- package/components/Radio/Radio/Radio.js.map +1 -1
- package/components/Radio/Radio.d.ts +2 -0
- package/components/RadioGroup/RadioGroup/RadioGroup.js.map +1 -1
- package/components/RadioGroup/RadioGroup.d.ts +2 -0
- package/components/ScrollContainer/ScrollContainer/ScrollContainer.js +1 -9
- package/components/ScrollContainer/ScrollContainer/ScrollContainer.js.map +1 -1
- package/components/ScrollContainer/ScrollContainer.d.ts +2 -9
- package/components/Select/Select/Select.js +2 -2
- package/components/Select/Select/Select.js.map +1 -1
- package/components/Select/Select.d.ts +2 -0
- package/components/SidePage/SidePage.styles/SidePage.styles.js +41 -35
- package/components/SidePage/SidePage.styles/SidePage.styles.js.map +1 -1
- package/components/SidePage/SidePage.styles.d.ts +3 -1
- package/components/SidePage/SidePageBody/SidePageBody.js.map +1 -1
- package/components/SidePage/SidePageBody.d.ts +2 -0
- package/components/SidePage/SidePageContainer/SidePageContainer.js.map +1 -1
- package/components/SidePage/SidePageContainer.d.ts +2 -0
- package/components/SidePage/SidePageFooter/SidePageFooter.js.map +1 -1
- package/components/SidePage/SidePageFooter.d.ts +2 -0
- package/components/SidePage/SidePageHeader/SidePageHeader.js +61 -39
- package/components/SidePage/SidePageHeader/SidePageHeader.js.map +1 -1
- package/components/SidePage/SidePageHeader.d.ts +12 -2
- package/components/Spinner/Spinner/Spinner.js +1 -18
- package/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/components/Spinner/Spinner.d.ts +2 -18
- package/components/Sticky/Sticky/Sticky.js +1 -13
- package/components/Sticky/Sticky/Sticky.js.map +1 -1
- package/components/Sticky/Sticky.d.ts +2 -13
- package/components/Switcher/Switcher/Switcher.js +19 -16
- package/components/Switcher/Switcher/Switcher.js.map +1 -1
- package/components/Switcher/Switcher.d.ts +6 -21
- package/components/Switcher/Switcher.styles/Switcher.styles.js +12 -9
- package/components/Switcher/Switcher.styles/Switcher.styles.js.map +1 -1
- package/components/Switcher/Switcher.styles.d.ts +1 -0
- package/components/Tabs/Indicator/Indicator.js.map +1 -1
- package/components/Tabs/Indicator.d.ts +2 -0
- package/components/Tabs/Tab/Tab.js.map +1 -1
- package/components/Tabs/Tab.d.ts +2 -0
- package/components/Tabs/Tabs/Tabs.js.map +1 -1
- package/components/Tabs/Tabs.d.ts +2 -0
- package/components/Textarea/Textarea/Textarea.js +1 -44
- package/components/Textarea/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.d.ts +2 -44
- package/components/Textarea/TextareaCounter/TextareaCounter.js +1 -11
- package/components/Textarea/TextareaCounter/TextareaCounter.js.map +1 -1
- package/components/Toast/Toast/Toast.js.map +1 -1
- package/components/Toast/Toast.d.ts +2 -0
- package/components/Toast/ToastView/ToastView.js +3 -17
- package/components/Toast/ToastView/ToastView.js.map +1 -1
- package/components/Toast/ToastView.d.ts +2 -14
- package/components/Toggle/Toggle/Toggle.js +1 -10
- package/components/Toggle/Toggle/Toggle.js.map +1 -1
- package/components/Toggle/Toggle.d.ts +2 -10
- package/components/Token/Token/Token.js.map +1 -1
- package/components/Token/Token.d.ts +2 -0
- package/components/TokenInput/TokenInput/TokenInput.js.map +1 -1
- package/components/TokenInput/TokenInput.d.ts +2 -0
- package/components/Tooltip/Tooltip/Tooltip.js +74 -24
- package/components/Tooltip/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/Tooltip.d.ts +14 -9
- package/components/Tooltip/Tooltip.styles/Tooltip.styles.js +22 -4
- package/components/Tooltip/Tooltip.styles/Tooltip.styles.js.map +1 -1
- package/components/Tooltip/Tooltip.styles.d.ts +7 -1
- package/components/TooltipMenu/TooltipMenu/TooltipMenu.js.map +1 -1
- package/components/TooltipMenu/TooltipMenu.d.ts +4 -2
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/internal/CommonWrapper/CommonWrapper/CommonWrapper.js.map +1 -1
- package/internal/CommonWrapper/CommonWrapper.d.ts +2 -0
- package/internal/ComponentTable/ComponentTable.js +0 -2
- package/internal/ComponentTable/ComponentTable.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js +35 -12
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView.d.ts +5 -1
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +17 -8
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.d.ts +9 -2
- package/internal/DateSelect/DateSelect/DateSelect.js +1 -10
- package/internal/DateSelect/DateSelect/DateSelect.js.map +1 -1
- package/internal/DateSelect/DateSelect.d.ts +0 -10
- package/internal/FocusTrap/FocusTrap/FocusTrap.js.map +1 -1
- package/internal/FocusTrap/FocusTrap.d.ts +2 -0
- package/internal/IgnoreLayerClick/IgnoreLayerClick/IgnoreLayerClick.js.map +1 -1
- package/internal/InputLikeText/InputLikeText/InputLikeText.js.map +1 -1
- package/internal/InputLikeText/InputLikeText.d.ts +2 -0
- package/internal/Menu/Menu/Menu.js.map +1 -1
- package/internal/Menu/Menu.d.ts +2 -0
- package/internal/MobilePopup/MobilePopup/MobilePopup.js.map +1 -1
- package/internal/MobilePopup/MobilePopup.d.ts +2 -0
- package/internal/Popup/Popup/Popup.js +14 -64
- package/internal/Popup/Popup/Popup.js.map +1 -1
- package/internal/Popup/Popup.d.ts +41 -59
- package/internal/Popup/PopupPin/PopupPin.js +1 -34
- package/internal/Popup/PopupPin/PopupPin.js.map +1 -1
- package/internal/Popup/PopupPin.d.ts +23 -33
- package/internal/Popup/PopupPinNew/PopupPinNew.js +146 -0
- package/internal/Popup/PopupPinNew/PopupPinNew.js.map +1 -0
- package/internal/Popup/PopupPinNew/package.json +6 -0
- package/internal/Popup/PopupPinNew.d.ts +31 -0
- package/internal/Popup/PopupPinNew.styles/PopupPinNew.styles.js +20 -0
- package/internal/Popup/PopupPinNew.styles/PopupPinNew.styles.js.map +1 -0
- package/internal/Popup/PopupPinNew.styles/package.json +6 -0
- package/internal/Popup/PopupPinNew.styles.d.ts +7 -0
- package/internal/PopupMenu/PopupMenu/PopupMenu.js.map +1 -1
- package/internal/PopupMenu/PopupMenu.d.ts +2 -0
- package/internal/RenderContainer/RenderInnerContainer/RenderInnerContainer.js +0 -8
- package/internal/RenderContainer/RenderInnerContainer/RenderInnerContainer.js.map +1 -1
- package/internal/RenderContainer/RenderInnerContainer.d.ts +0 -6
- package/internal/RenderLayer/RenderLayer/RenderLayer.js +3 -11
- package/internal/RenderLayer/RenderLayer/RenderLayer.js.map +1 -1
- package/internal/RenderLayer/RenderLayer.d.ts +2 -3
- package/internal/ThemePlayground/Playground/Playground.js +4 -3
- package/internal/ThemePlayground/Playground/Playground.js.map +1 -1
- package/internal/ThemePlayground/Playground.styles/Playground.styles.js +4 -4
- package/internal/ThemePlayground/Playground.styles/Playground.styles.js.map +1 -1
- package/internal/ThemePlayground/ShowcaseGroup/ShowcaseGroup.js +6 -1
- package/internal/ThemePlayground/ShowcaseGroup/ShowcaseGroup.js.map +1 -1
- package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/internal/ZIndex/ZIndex/ZIndex.js +8 -10
- package/internal/ZIndex/ZIndex/ZIndex.js.map +1 -1
- package/internal/ZIndex/ZIndex.d.ts +3 -3
- package/internal/icons2022/UiMenuDots3HIcon/UiMenuDots3HIcon16Regular/UiMenuDots3HIcon16Regular.js +21 -0
- package/internal/icons2022/UiMenuDots3HIcon/UiMenuDots3HIcon16Regular/UiMenuDots3HIcon16Regular.js.map +1 -0
- package/internal/icons2022/UiMenuDots3HIcon/UiMenuDots3HIcon16Regular/package.json +6 -0
- package/internal/icons2022/UiMenuDots3HIcon/UiMenuDots3HIcon16Regular.d.ts +2 -0
- package/internal/themes/BasicTheme/BasicTheme.js +170 -26
- package/internal/themes/BasicTheme/BasicTheme.js.map +1 -1
- package/internal/themes/BasicTheme.d.ts +112 -20
- package/internal/themes/DarkTheme5_2/DarkTheme5_2.js +3 -3
- package/internal/themes/DarkTheme5_2/DarkTheme5_2.js.map +1 -1
- package/internal/themes/DarkTheme5_3/DarkTheme5_3.js +16 -0
- package/internal/themes/DarkTheme5_3/DarkTheme5_3.js.map +1 -0
- package/internal/themes/DarkTheme5_3/package.json +6 -0
- package/internal/themes/DarkTheme5_3.d.ts +1 -0
- package/internal/themes/DarkTheme5_4/DarkTheme5_4.js +15 -0
- package/internal/themes/DarkTheme5_4/DarkTheme5_4.js.map +1 -0
- package/internal/themes/DarkTheme5_4/package.json +6 -0
- package/internal/themes/DarkTheme5_4.d.ts +1 -0
- package/internal/themes/LightTheme5_3/LightTheme5_3.js +16 -0
- package/internal/themes/LightTheme5_3/LightTheme5_3.js.map +1 -0
- package/internal/themes/LightTheme5_3/package.json +6 -0
- package/internal/themes/LightTheme5_3.d.ts +1 -0
- package/internal/themes/LightTheme5_4/LightTheme5_4.js +15 -0
- package/internal/themes/LightTheme5_4/LightTheme5_4.js.map +1 -0
- package/internal/themes/LightTheme5_4/package.json +6 -0
- package/internal/themes/LightTheme5_4.d.ts +1 -0
- package/lib/delay.d.mts +1 -0
- package/lib/delay.mts +3 -0
- package/lib/featureFlagsContext/FeatureFlagsHelpers.d.ts +5 -0
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js +6 -1
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +5 -0
- package/lib/forwardRefAndName/forwardRefAndName.js.map +1 -1
- package/lib/forwardRefAndName.d.ts +1 -1
- package/lib/rootNode/rootNodeDecorator/rootNodeDecorator.js.map +1 -1
- package/lib/rootNode/rootNodeDecorator.d.ts +2 -1
- package/lib/theming/ThemeVersions/ThemeVersions.js.map +1 -1
- package/lib/theming/ThemeVersions.d.ts +1 -1
- package/lib/theming/themes/DarkTheme/DarkTheme.js +5 -1
- package/lib/theming/themes/DarkTheme/DarkTheme.js.map +1 -1
- package/lib/theming/themes/DarkTheme.d.ts +2 -0
- package/lib/theming/themes/LightTheme/LightTheme.js +5 -1
- package/lib/theming/themes/LightTheme/LightTheme.js.map +1 -1
- package/lib/theming/themes/LightTheme.d.ts +2 -0
- package/lib/utils/utils.js +2 -0
- package/lib/utils/utils.js.map +1 -1
- package/lib/utils.d.ts +4 -0
- package/package.json +8 -16
- package/cjs/components/Autocomplete/Autocomplete.md +0 -113
- package/cjs/components/Button/Button.md +0 -261
- package/cjs/components/Calendar/Calendar.md +0 -276
- package/cjs/components/Calendar/CalendarDay.md +0 -70
- package/cjs/components/Center/Center.md +0 -26
- package/cjs/components/Checkbox/Checkbox.md +0 -171
- package/cjs/components/ComboBox/ComboBox.md +0 -574
- package/cjs/components/CurrencyInput/CurrencyInput.md +0 -39
- package/cjs/components/CurrencyLabel/CurrencyLabel.md +0 -29
- package/cjs/components/DateInput/DateInput.md +0 -111
- package/cjs/components/DatePicker/DatePicker.md +0 -368
- package/cjs/components/Dropdown/Dropdown.md +0 -45
- package/cjs/components/DropdownMenu/DropdownMenu.md +0 -290
- package/cjs/components/FileUploader/FileUploader.md +0 -131
- package/cjs/components/FxInput/FxInput.md +0 -31
- package/cjs/components/Gapped/Gapped.md +0 -44
- package/cjs/components/GlobalLoader/GlobalLoader.md +0 -97
- package/cjs/components/Group/Group.md +0 -19
- package/cjs/components/Hint/Hint.md +0 -86
- package/cjs/components/Input/Input.md +0 -86
- package/cjs/components/Kebab/Kebab.md +0 -306
- package/cjs/components/Link/Link.md +0 -182
- package/cjs/components/Loader/Loader.md +0 -33
- package/cjs/components/MaskedInput/MaskedInput.md +0 -114
- package/cjs/components/MenuFooter/MenuFooter.md +0 -27
- package/cjs/components/MenuHeader/MenuHeader.md +0 -35
- package/cjs/components/MenuItem/MenuItem.md +0 -139
- package/cjs/components/MenuSeparator/MenuSeparator.md +0 -14
- package/cjs/components/MiniModal/MiniModal.md +0 -231
- package/cjs/components/Modal/Modal.md +0 -56
- package/cjs/components/Paging/Paging.md +0 -57
- package/cjs/components/PasswordInput/PasswordInput.md +0 -29
- package/cjs/components/Radio/Radio.md +0 -57
- package/cjs/components/RadioGroup/RadioGroup.md +0 -44
- package/cjs/components/ResponsiveLayout/ResponsiveLayout.md +0 -75
- package/cjs/components/ScrollContainer/ScrollContainer.md +0 -224
- package/cjs/components/Select/Select.md +0 -113
- package/cjs/components/SidePage/SidePage.md +0 -65
- package/cjs/components/SingleToast/SingleToast.md +0 -36
- package/cjs/components/Spinner/Spinner.md +0 -36
- package/cjs/components/Sticky/Sticky.md +0 -28
- package/cjs/components/Switcher/Switcher.md +0 -111
- package/cjs/components/Tabs/Tab.md +0 -73
- package/cjs/components/Tabs/Tabs.md +0 -54
- package/cjs/components/Textarea/Textarea.md +0 -58
- package/cjs/components/Toast/Toast.md +0 -69
- package/cjs/components/Toggle/Toggle.md +0 -110
- package/cjs/components/Token/Token.md +0 -48
- package/cjs/components/TokenInput/TokenInput.md +0 -277
- package/cjs/components/Tooltip/Tooltip.md +0 -322
- package/cjs/components/TooltipMenu/TooltipMenu.md +0 -241
- package/cjs/internal/DataTids/DATATIDS.md +0 -12
- package/cjs/internal/DataTids/DataTids.d.ts +0 -12
- package/cjs/internal/DataTids/DataTids.js +0 -50
- package/cjs/internal/DataTids/DataTids.js.map +0 -1
- package/cjs/internal/DataTids/DataTids.styles.d.ts +0 -7
- package/cjs/internal/DataTids/DataTids.styles.js +0 -42
- package/cjs/internal/DataTids/DataTids.styles.js.map +0 -1
- package/cjs/internal/DataTids/componentsDataTids.d.ts +0 -5
- package/cjs/internal/DataTids/componentsDataTids.js +0 -15
- package/cjs/internal/DataTids/componentsDataTids.js.map +0 -1
- package/cjs/internal/ThemePlayground/Playground.md +0 -7
- package/cjs/lib/SSRSafe.d.ts +0 -2
- package/cjs/lib/SSRSafe.js +0 -5
- package/cjs/lib/SSRSafe.js.map +0 -1
- package/cjs/lib/featureFlagsContext/FEATUREFLAGSCONTEXT.md +0 -64
- package/cjs/lib/locale/LOCALECONTEXT.md +0 -222
- package/cjs/lib/theming/ThemeContext.md +0 -265
- package/components/Autocomplete/Autocomplete.md +0 -113
- package/components/Button/Button.md +0 -261
- package/components/Calendar/Calendar.md +0 -276
- package/components/Calendar/CalendarDay.md +0 -70
- package/components/Center/Center.md +0 -26
- package/components/Checkbox/Checkbox.md +0 -171
- package/components/ComboBox/ComboBox.md +0 -574
- package/components/CurrencyInput/CurrencyInput.md +0 -39
- package/components/CurrencyLabel/CurrencyLabel.md +0 -29
- package/components/DateInput/DateInput.md +0 -111
- package/components/DatePicker/DatePicker.md +0 -368
- package/components/Dropdown/Dropdown.md +0 -45
- package/components/DropdownMenu/DropdownMenu.md +0 -290
- package/components/FileUploader/FileUploader.md +0 -131
- package/components/FxInput/FxInput.md +0 -31
- package/components/Gapped/Gapped.md +0 -44
- package/components/GlobalLoader/GlobalLoader.md +0 -97
- package/components/Group/Group.md +0 -19
- package/components/Hint/Hint.md +0 -86
- package/components/Input/Input.md +0 -86
- package/components/Kebab/Kebab.md +0 -306
- package/components/Link/Link.md +0 -182
- package/components/Loader/Loader.md +0 -33
- package/components/MaskedInput/MaskedInput.md +0 -114
- package/components/MenuFooter/MenuFooter.md +0 -27
- package/components/MenuHeader/MenuHeader.md +0 -35
- package/components/MenuItem/MenuItem.md +0 -139
- package/components/MenuSeparator/MenuSeparator.md +0 -14
- package/components/MiniModal/MiniModal.md +0 -231
- package/components/Modal/Modal.md +0 -56
- package/components/Paging/Paging.md +0 -57
- package/components/PasswordInput/PasswordInput.md +0 -29
- package/components/Radio/Radio.md +0 -57
- package/components/RadioGroup/RadioGroup.md +0 -44
- package/components/ResponsiveLayout/ResponsiveLayout.md +0 -75
- package/components/ScrollContainer/ScrollContainer.md +0 -224
- package/components/Select/Select.md +0 -113
- package/components/SidePage/SidePage.md +0 -65
- package/components/SingleToast/SingleToast.md +0 -36
- package/components/Spinner/Spinner.md +0 -36
- package/components/Sticky/Sticky.md +0 -28
- package/components/Switcher/Switcher.md +0 -111
- package/components/Tabs/Tab.md +0 -73
- package/components/Tabs/Tabs.md +0 -54
- package/components/Textarea/Textarea.md +0 -58
- package/components/Toast/Toast.md +0 -69
- package/components/Toggle/Toggle.md +0 -110
- package/components/Token/Token.md +0 -48
- package/components/TokenInput/TokenInput.md +0 -277
- package/components/Tooltip/Tooltip.md +0 -322
- package/components/TooltipMenu/TooltipMenu.md +0 -241
- package/internal/DataTids/DATATIDS.md +0 -12
- package/internal/DataTids/DataTids/DataTids.js +0 -69
- package/internal/DataTids/DataTids/DataTids.js.map +0 -1
- package/internal/DataTids/DataTids/package.json +0 -6
- package/internal/DataTids/DataTids.d.ts +0 -12
- package/internal/DataTids/DataTids.styles/DataTids.styles.js +0 -20
- package/internal/DataTids/DataTids.styles/DataTids.styles.js.map +0 -1
- package/internal/DataTids/DataTids.styles/package.json +0 -6
- package/internal/DataTids/DataTids.styles.d.ts +0 -7
- package/internal/DataTids/componentsDataTids/componentsDataTids.js +0 -12
- package/internal/DataTids/componentsDataTids/componentsDataTids.js.map +0 -1
- package/internal/DataTids/componentsDataTids/package.json +0 -6
- package/internal/DataTids/componentsDataTids.d.ts +0 -5
- package/internal/ThemePlayground/Playground.md +0 -7
- package/lib/SSRSafe/SSRSafe.js +0 -4
- package/lib/SSRSafe/SSRSafe.js.map +0 -1
- package/lib/SSRSafe/package.json +0 -6
- package/lib/SSRSafe.d.ts +0 -2
- package/lib/featureFlagsContext/FEATUREFLAGSCONTEXT.md +0 -64
- package/lib/locale/LOCALECONTEXT.md +0 -222
- package/lib/theming/ThemeContext.md +0 -265
package/lib/utils/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","isButton","isInput","isFxInput","isAutocomplete","isPasswordInput","isCurrencyInput","isSelect","isDropdown","isDropdownMenu","isKonturIcon","icon","clickOutside","event","document","createEvent","initEvent","body","dispatchEvent","isElement","el","nodeType","Node","ELEMENT_NODE"],"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';\nimport type { SelectProps } from '../components/Select';\nimport type { DropdownProps } from '../components/Dropdown';\nimport type { DropdownMenuProps } from '../components/DropdownMenu';\nimport type { ButtonProps } from '../components/Button';\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;\n\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/** @deprecated Переехал в `lib/mergeRefs.ts`. Со следующей мажорной версии от сюда будет удален*/\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 isButton = isReactUIComponent<ButtonProps>('Button');\nexport const isInput = isReactUIComponent<InputProps>('Input');\nexport const isFxInput = isReactUIComponent<FxInputProps>('FxInput');\nexport const isAutocomplete = isReactUIComponent<AutocompleteProps>('Autocomplete');\nexport const isPasswordInput = isReactUIComponent<PasswordInputProps>('PasswordInput');\nexport const isCurrencyInput = isReactUIComponent<CurrencyInputProps>('CurrencyInput');\nexport const isSelect = isReactUIComponent<SelectProps<unknown, unknown>>('Select');\nexport const isDropdown = isReactUIComponent<DropdownProps>('Dropdown');\nexport const isDropdownMenu = isReactUIComponent<DropdownMenuProps>('DropdownMenu');\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\nexport function isElement(el: unknown): el is Element {\n return !!el && typeof el === 'object' && 'nodeType' in el && el.nodeType === Node.ELEMENT_NODE;\n}\n"],"mappings":";AACA,SAASA,cAAc,QAAQ,OAAO;AACtC,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,YAAY,EAAEC,SAAS,QAAQ,0BAA0B;;;;;;;;;;;;AAYlE,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,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idElement","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","isButton","isInput","isFxInput","isAutocomplete","isPasswordInput","isCurrencyInput","isSelect","isDropdown","isDropdownMenu","isHint","isTooltip","isKonturIcon","icon","clickOutside","event","document","createEvent","initEvent","body","dispatchEvent","isElement","el","nodeType","Node","ELEMENT_NODE"],"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';\nimport type { SelectProps } from '../components/Select';\nimport type { DropdownProps } from '../components/Dropdown';\nimport type { DropdownMenuProps } from '../components/DropdownMenu';\nimport type { ButtonProps } from '../components/Button';\nimport type { TooltipProps } from '../components/Tooltip';\nimport type { HintProps } from '../components/Hint';\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;\n\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/** @deprecated Переехал в `lib/mergeRefs.ts`. Со следующей мажорной версии от сюда будет удален*/\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 isButton = isReactUIComponent<ButtonProps>('Button');\nexport const isInput = isReactUIComponent<InputProps>('Input');\nexport const isFxInput = isReactUIComponent<FxInputProps>('FxInput');\nexport const isAutocomplete = isReactUIComponent<AutocompleteProps>('Autocomplete');\nexport const isPasswordInput = isReactUIComponent<PasswordInputProps>('PasswordInput');\nexport const isCurrencyInput = isReactUIComponent<CurrencyInputProps>('CurrencyInput');\nexport const isSelect = isReactUIComponent<SelectProps<unknown, unknown>>('Select');\nexport const isDropdown = isReactUIComponent<DropdownProps>('Dropdown');\nexport const isDropdownMenu = isReactUIComponent<DropdownMenuProps>('DropdownMenu');\nexport const isHint = isReactUIComponent<HintProps>('Hint');\nexport const isTooltip = isReactUIComponent<TooltipProps>('Tooltip');\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\nexport function isElement(el: unknown): el is Element {\n return !!el && typeof el === 'object' && 'nodeType' in el && el.nodeType === Node.ELEMENT_NODE;\n}\n"],"mappings":";AACA,SAASA,cAAc,QAAQ,OAAO;AACtC,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,YAAY,EAAEC,SAAS,QAAQ,0BAA0B;;;;;;;;;;;;;;AAclE,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,EAAU,EAAE;EAC1D,IAAIC,gBAA4B,GAAG,SAAAA,iBAAA,UAAM,IAAI;;EAE7C,IAAIC,OAAO,CAAC,UAACC,OAAO,EAAEC,MAAM,EAAK;IAC/BH,gBAAgB,GAAGG,MAAM;I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3B,kBAAkB,CAAqB,eAAe,CAAC;AACtF,OAAO,IAAM4B,eAAe,GAAG5B,kBAAkB,CAAqB,eAAe,CAAC;AACtF,OAAO,IAAM6B,QAAQ,GAAG7B,kBAAkB,CAAgC,QAAQ,CAAC;AACnF,OAAO,IAAM8B,UAAU,GAAG9B,kBAAkB,CAAgB,UAAU,CAAC;AACvE,OAAO,IAAM+B,cAAc,GAAG/B,kBAAkB,CAAoB,cAAc,CAAC;AACnF,OAAO,IAAMgC,MAAM,GAAGhC,kBAAkB,CAAY,MAAM,CAAC;AAC3D,OAAO,IAAMiC,SAAS,GAAGjC,kBAAkB,CAAe,SAAS,CAAC;;AAEpE,OAAO,IAAMkC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAwB,EAAK;EACxD,OAAOxD,MAAM,CAACxB,SAAS,CAACyB,cAAc,CAAC9C,IAAI,CAACqG,IAAI,oBAAJA,IAAI,CAAE3E,IAAI,EAAE,iBAAiB,CAAC;AAC5E,CAAC;;AAED,OAAO,SAAS4E,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;;AAEA,OAAO,SAASM,SAASA,CAACC,EAAW,EAAiB;EACpD,OAAO,CAAC,CAACA,EAAE,IAAI,OAAOA,EAAE,KAAK,QAAQ,IAAI,UAAU,IAAIA,EAAE,IAAIA,EAAE,CAACC,QAAQ,KAAKC,IAAI,CAACC,YAAY;AAChG","ignoreList":[]}
|
package/lib/utils.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import type { SelectProps } from '../components/Select';
|
|
|
8
8
|
import type { DropdownProps } from '../components/Dropdown';
|
|
9
9
|
import type { DropdownMenuProps } from '../components/DropdownMenu';
|
|
10
10
|
import type { ButtonProps } from '../components/Button';
|
|
11
|
+
import type { TooltipProps } from '../components/Tooltip';
|
|
12
|
+
import type { HintProps } from '../components/Hint';
|
|
11
13
|
export { delay } from './delay';
|
|
12
14
|
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;
|
|
13
15
|
export type DefaultizeProps<C, P> = C extends {
|
|
@@ -85,6 +87,8 @@ export declare const isCurrencyInput: (child: React.ReactNode) => child is React
|
|
|
85
87
|
export declare const isSelect: (child: React.ReactNode) => child is React.ReactElement<SelectProps<unknown, unknown>, string | React.JSXElementConstructor<any>>;
|
|
86
88
|
export declare const isDropdown: (child: React.ReactNode) => child is React.ReactElement<DropdownProps, string | React.JSXElementConstructor<any>>;
|
|
87
89
|
export declare const isDropdownMenu: (child: React.ReactNode) => child is React.ReactElement<DropdownMenuProps, string | React.JSXElementConstructor<any>>;
|
|
90
|
+
export declare const isHint: (child: React.ReactNode) => child is React.ReactElement<HintProps, string | React.JSXElementConstructor<any>>;
|
|
91
|
+
export declare const isTooltip: (child: React.ReactNode) => child is React.ReactElement<TooltipProps, string | React.JSXElementConstructor<any>>;
|
|
88
92
|
export declare const isKonturIcon: (icon: React.ReactElement) => boolean;
|
|
89
93
|
export declare function clickOutside(): void;
|
|
90
94
|
export declare function isElement(el: unknown): el is Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/react-ui",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-ab4ec97409",
|
|
4
4
|
"description": "UI Components",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -22,16 +22,12 @@
|
|
|
22
22
|
"clean": "git clean -fdxqe node_modules",
|
|
23
23
|
"prerelease": "node scripts/publish/prepublish && yarn build",
|
|
24
24
|
"release": "npm publish ./build --workspaces=false",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"storybook": "
|
|
28
|
-
"storybook:
|
|
29
|
-
"storybook:docs
|
|
30
|
-
"storybook:test": "node ../../scripts/patch-node-options.js \"cross-env STORYBOOK_REACT_UI_TEST=true storybook dev --ci -p 6060\"",
|
|
31
|
-
"storybook:docs": "node ../../scripts/patch-node-options.js \"cross-env STORYBOOK_REACT_UI_DOCS=true storybook dev --docs -p 6061 -c .storybook-docs\"",
|
|
25
|
+
"storybook": "storybook dev -p 6060",
|
|
26
|
+
"storybook:build": "cross-env STORYBOOK_REACT_UI_TEST=true storybook build -o .storybook/build --quiet",
|
|
27
|
+
"storybook:docs-build": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook build --docs -c .storybook-docs -o .storybook/build --quiet",
|
|
28
|
+
"storybook:test": "cross-env STORYBOOK_REACT_UI_TEST=true storybook dev --ci -p 6060",
|
|
29
|
+
"storybook:docs": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook dev --docs -p 6061 -c .storybook-docs",
|
|
32
30
|
"storybook:serve": "yarn serve -l 6060 .storybook/build",
|
|
33
|
-
"styleguide": "node ../../scripts/patch-node-options.js \"styleguidist server --config .styleguide/config/dev.config.js\"",
|
|
34
|
-
"styleguide:build": "node ../../scripts/patch-node-options.js \"node .styleguide/build\"",
|
|
35
31
|
"lint": "run-p -c lint:*",
|
|
36
32
|
"lint:eslint": "cross-env TIMING=1 yarn eslint ./",
|
|
37
33
|
"lint:tsc": "tsc --noEmit --diagnostics",
|
|
@@ -59,7 +55,6 @@
|
|
|
59
55
|
"lodash.isequal": "^4.5.0",
|
|
60
56
|
"lodash.throttle": "^4.1.1",
|
|
61
57
|
"normalize-wheel": "^1.0.1",
|
|
62
|
-
"prop-types": "^15.8.1",
|
|
63
58
|
"react-focus-lock": "2.11.2",
|
|
64
59
|
"react-input-mask": "2.0.4",
|
|
65
60
|
"react-is": "^18.3.1",
|
|
@@ -102,7 +97,6 @@
|
|
|
102
97
|
"@types/lodash.debounce": "^4.0.6",
|
|
103
98
|
"@types/lodash.isequal": "^4.5.5",
|
|
104
99
|
"@types/lodash.throttle": "^4.1.6",
|
|
105
|
-
"@types/prop-types": "15.7.12",
|
|
106
100
|
"@types/react": "18.3.3",
|
|
107
101
|
"@types/react-dom": "18.3.0",
|
|
108
102
|
"@types/react-input-mask": "3.0.5",
|
|
@@ -113,7 +107,6 @@
|
|
|
113
107
|
"axios": "^1.7.2",
|
|
114
108
|
"babel-jest": "29.7.0",
|
|
115
109
|
"babel-loader": "^9.1.3",
|
|
116
|
-
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
117
110
|
"chalk": "4.1.0",
|
|
118
111
|
"copyfiles": "^2.4.1",
|
|
119
112
|
"core-js": "^3.37.1",
|
|
@@ -143,7 +136,6 @@
|
|
|
143
136
|
"react": "18.3.1",
|
|
144
137
|
"react-docgen-typescript": "^2.2.2",
|
|
145
138
|
"react-dom": "^18.3.1",
|
|
146
|
-
"react-styleguidist": "^12.0.1",
|
|
147
139
|
"rimraf": "^5.0.7",
|
|
148
140
|
"selenium-webdriver": "^4.27.0",
|
|
149
141
|
"semver": "^7.6.2",
|
|
@@ -161,8 +153,8 @@
|
|
|
161
153
|
"webpack": "^5.91.0"
|
|
162
154
|
},
|
|
163
155
|
"peerDependencies": {
|
|
164
|
-
"react": ">=16.9",
|
|
165
|
-
"react-dom": ">=16.9"
|
|
156
|
+
"react": ">=16.9 <19",
|
|
157
|
+
"react-dom": ">=16.9 <19"
|
|
166
158
|
},
|
|
167
159
|
"publishConfig": {
|
|
168
160
|
"tag": "unstable"
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
### Базовый пример
|
|
2
|
-
```jsx harmony
|
|
3
|
-
import { Autocomplete } from '@skbkontur/react-ui';
|
|
4
|
-
|
|
5
|
-
const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
|
|
6
|
-
|
|
7
|
-
const [value, setValue] = React.useState('Kappa');
|
|
8
|
-
|
|
9
|
-
<Autocomplete source={items} value={value} onValueChange={setValue} />;
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
### Очистка Autocomplete
|
|
13
|
-
Очистить значение в `Autocomplete` можно только с помощью пустой строки.
|
|
14
|
-
```jsx harmony
|
|
15
|
-
import { Autocomplete, Button, Group } from '@skbkontur/react-ui';
|
|
16
|
-
|
|
17
|
-
const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
|
|
18
|
-
|
|
19
|
-
const [value, setValue] = React.useState('Kappa');
|
|
20
|
-
|
|
21
|
-
<Group>
|
|
22
|
-
<Autocomplete source={items} value={value} onValueChange={setValue} />
|
|
23
|
-
<Button onClick={() => setValue('')}>Очистить</Button>
|
|
24
|
-
</Group>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
### Размер
|
|
28
|
-
```jsx harmony
|
|
29
|
-
import { Autocomplete, Gapped } from '@skbkontur/react-ui';
|
|
30
|
-
|
|
31
|
-
const items = ['Маленький', 'Средний', 'Большой'];
|
|
32
|
-
|
|
33
|
-
const [valueSmall, setValueSmall] = React.useState('Маленький');
|
|
34
|
-
const [valueMedium, setValueMedium] = React.useState('Средний');
|
|
35
|
-
const [valueLarge, setValueLarge] = React.useState('Большой');
|
|
36
|
-
|
|
37
|
-
<Gapped vertical>
|
|
38
|
-
<Autocomplete source={items} value={valueSmall} onValueChange={setValueSmall} size={'small'} />
|
|
39
|
-
<Autocomplete source={items} value={valueMedium} onValueChange={setValueMedium} size={'medium'} />
|
|
40
|
-
<Autocomplete source={items} value={valueLarge} onValueChange={setValueLarge} size={'large'} />
|
|
41
|
-
</Gapped>
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Выделение введеного значения при фокусе
|
|
45
|
-
```jsx harmony
|
|
46
|
-
import { Autocomplete } from '@skbkontur/react-ui';
|
|
47
|
-
|
|
48
|
-
const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
|
|
49
|
-
|
|
50
|
-
const [value, setValue] = React.useState('');
|
|
51
|
-
|
|
52
|
-
<Autocomplete source={items} value={value} onValueChange={setValue} selectAllOnFocus />
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Иконка
|
|
56
|
-
```jsx harmony
|
|
57
|
-
import { Autocomplete, Gapped } from '@skbkontur/react-ui';
|
|
58
|
-
import { SearchLoupeIcon16Regular } from '@skbkontur/icons/SearchLoupeIcon16Regular';
|
|
59
|
-
|
|
60
|
-
const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
|
|
61
|
-
|
|
62
|
-
const [valueLeft, setValueLeft] = React.useState('');
|
|
63
|
-
const [valueRight, setValueRight] = React.useState('');
|
|
64
|
-
|
|
65
|
-
<Gapped>
|
|
66
|
-
<Autocomplete source={items} value={valueLeft} onValueChange={setValueLeft} leftIcon={<SearchLoupeIcon16Regular />} />
|
|
67
|
-
<Autocomplete source={items} value={valueRight} onValueChange={setValueRight} rightIcon={<SearchLoupeIcon16Regular />} />
|
|
68
|
-
</Gapped>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Ширина меню
|
|
72
|
-
```jsx harmony
|
|
73
|
-
import { Autocomplete } from '@skbkontur/react-ui';
|
|
74
|
-
|
|
75
|
-
const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
|
|
76
|
-
|
|
77
|
-
const [value, setValue] = React.useState('');
|
|
78
|
-
|
|
79
|
-
<Autocomplete source={items} value={value} onValueChange={setValue} menuWidth={'80%'} />
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Расположение выпадающего окна Autocomplete
|
|
83
|
-
```jsx harmony
|
|
84
|
-
import { Autocomplete } from '@skbkontur/react-ui';
|
|
85
|
-
|
|
86
|
-
const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
|
|
87
|
-
|
|
88
|
-
const [value, setValue] = React.useState('');
|
|
89
|
-
|
|
90
|
-
<Autocomplete source={items} value={value} onValueChange={setValue} menuPos={'top'} />
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Тень у выпадающего меню
|
|
94
|
-
```jsx harmony
|
|
95
|
-
import { Autocomplete } from '@skbkontur/react-ui';
|
|
96
|
-
|
|
97
|
-
const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
|
|
98
|
-
|
|
99
|
-
const [value, setValue] = React.useState('');
|
|
100
|
-
|
|
101
|
-
<Autocomplete source={items} value={value} onValueChange={setValue} hasShadow />
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Режима прозрачной рамки
|
|
105
|
-
```jsx harmony
|
|
106
|
-
import { Autocomplete } from '@skbkontur/react-ui';
|
|
107
|
-
|
|
108
|
-
const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
|
|
109
|
-
|
|
110
|
-
const [value, setValue] = React.useState('Kappa');
|
|
111
|
-
|
|
112
|
-
<Autocomplete source={items} value={value} onValueChange={setValue} borderless />
|
|
113
|
-
```
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
### Базовый пример
|
|
2
|
-
По умолчанию, кнопка принимает все пропы `HTMLButtonElement`.
|
|
3
|
-
|
|
4
|
-
```jsx harmony
|
|
5
|
-
import { Button } from '@skbkontur/react-ui';
|
|
6
|
-
|
|
7
|
-
<Button onClick={alert} name="report">Создать отчёт</Button>;
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
### Корневой компонент
|
|
11
|
-
Кнопка может рендерить ссылку в качестве корневого элемента, c помощью пропа `component`. Кнопка принимает все пропы переданного в `component` компонента.
|
|
12
|
-
|
|
13
|
-
```jsx harmony
|
|
14
|
-
import { Button } from '@skbkontur/react-ui';
|
|
15
|
-
|
|
16
|
-
<Button component='a' href='https://kontur.ru' target="_blank">Ссылка, но выглядит как кнопка</Button>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Различные стили
|
|
20
|
-
|
|
21
|
-
```jsx harmony
|
|
22
|
-
import { Gapped } from '@skbkontur/react-ui';
|
|
23
|
-
|
|
24
|
-
const bgStyle = {
|
|
25
|
-
backgroundImage: `linear-gradient(to right, rgba(130, 130, 130, 0.5) 1px, transparent 1px),
|
|
26
|
-
linear-gradient(to bottom, rgba(130, 130, 130, 0.5) 1px, transparent 1px)`,
|
|
27
|
-
backgroundSize: `16px 16px`,
|
|
28
|
-
backgroundPosition: `-8px -8px`,
|
|
29
|
-
padding: 16
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
<Gapped vertical>
|
|
33
|
-
<Gapped>
|
|
34
|
-
<Button use="default">Default</Button>
|
|
35
|
-
<Button use="primary">Primary</Button>
|
|
36
|
-
<Button use="success">Success</Button>
|
|
37
|
-
<Button use="danger">Danger</Button>
|
|
38
|
-
<Button use="pay">Pay</Button>
|
|
39
|
-
<Button use="text">Text</Button>
|
|
40
|
-
<Button use="backless">Backless</Button>
|
|
41
|
-
<Button use="link">Link</Button>
|
|
42
|
-
</Gapped>
|
|
43
|
-
<Gapped style={bgStyle}>
|
|
44
|
-
<Button use="default">Default</Button>
|
|
45
|
-
<Button use="primary">Primary</Button>
|
|
46
|
-
<Button use="success">Success</Button>
|
|
47
|
-
<Button use="danger">Danger</Button>
|
|
48
|
-
<Button use="pay">Pay</Button>
|
|
49
|
-
<Button use="text">Text</Button>
|
|
50
|
-
<Button use="backless">Backless</Button>
|
|
51
|
-
<Button use="link">Link</Button>
|
|
52
|
-
</Gapped>
|
|
53
|
-
</Gapped>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Иконка
|
|
57
|
-
В кнопку можно передать иконку. Иконка может находиться как слева от текста кнопки, так и справа и даже в обоих позициях одновременно.
|
|
58
|
-
|
|
59
|
-
```jsx harmony
|
|
60
|
-
import { Button, Gapped } from '@skbkontur/react-ui';
|
|
61
|
-
import { XIcon16Regular } from '@skbkontur/icons/XIcon16Regular';
|
|
62
|
-
|
|
63
|
-
<Gapped gap={5}>
|
|
64
|
-
<Button icon={<XIcon16Regular />}>Закрыть</Button>
|
|
65
|
-
<Button icon={<XIcon16Regular />} rightIcon={<XIcon16Regular />}>Закрыть</Button>
|
|
66
|
-
<Button rightIcon={<XIcon16Regular />}>Закрыть</Button>
|
|
67
|
-
</Gapped>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Размер
|
|
71
|
-
|
|
72
|
-
```jsx harmony
|
|
73
|
-
<div
|
|
74
|
-
style={{
|
|
75
|
-
display: "flex",
|
|
76
|
-
alignItems: "end",
|
|
77
|
-
gap: '10px',
|
|
78
|
-
}}
|
|
79
|
-
>
|
|
80
|
-
<Button size="small">Маленькая</Button>
|
|
81
|
-
<Button size="medium">Средняя</Button>
|
|
82
|
-
<Button size="large">Большая</Button>
|
|
83
|
-
</div>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Ширина
|
|
87
|
-
|
|
88
|
-
```jsx harmony
|
|
89
|
-
<Button width={40}>Закрыть</Button>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Состояние валидации
|
|
93
|
-
|
|
94
|
-
```jsx harmony
|
|
95
|
-
import { Gapped, Button } from '@skbkontur/react-ui';
|
|
96
|
-
<Gapped gap={5}>
|
|
97
|
-
<Button warning>Закрыть</Button>
|
|
98
|
-
<Button error>Закрыть</Button>
|
|
99
|
-
</Gapped>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### Стрелка
|
|
103
|
-
|
|
104
|
-
```jsx harmony
|
|
105
|
-
import { Gapped, Button } from '@skbkontur/react-ui';
|
|
106
|
-
|
|
107
|
-
<Gapped gap={5}>
|
|
108
|
-
<Button arrow="left" size="medium">
|
|
109
|
-
Назад
|
|
110
|
-
</Button>
|
|
111
|
-
<Button arrow size="medium">
|
|
112
|
-
Далее
|
|
113
|
-
</Button>
|
|
114
|
-
</Gapped>
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Состояние загрузки
|
|
118
|
-
|
|
119
|
-
**Поведение:**
|
|
120
|
-
Кнопка на время нахождения в состоянии загрузки отключается.
|
|
121
|
-
Если в кнопке есть иконка, на время загрузки иконка заменяется на спиннер, если иконки нет — весь контент кнопки заменяется на спиннер. Когда иконки две — заменяется только левая.
|
|
122
|
-
|
|
123
|
-
```jsx harmony
|
|
124
|
-
import { Button, Gapped } from '@skbkontur/react-ui';
|
|
125
|
-
import { MinusCircleIcon16Light } from '@skbkontur/icons/MinusCircleIcon16Light';
|
|
126
|
-
|
|
127
|
-
const [loading, setLoading] = React.useState(false);
|
|
128
|
-
|
|
129
|
-
const delay = time => args => new Promise(resolve => setTimeout(resolve, time, args));
|
|
130
|
-
|
|
131
|
-
const handleLoadingStart = () => {
|
|
132
|
-
delay(2000)()
|
|
133
|
-
.then(() => {
|
|
134
|
-
setLoading(false);
|
|
135
|
-
})
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const handleClick = () => {
|
|
139
|
-
setLoading(true);
|
|
140
|
-
handleLoadingStart();
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
<Gapped>
|
|
144
|
-
<Button width={150} onClick={handleClick} loading={loading}>
|
|
145
|
-
Удалить
|
|
146
|
-
</Button>
|
|
147
|
-
<Button icon={<MinusCircleIcon16Light />} width={150} onClick={handleClick} loading={loading}>
|
|
148
|
-
Удалить
|
|
149
|
-
</Button>
|
|
150
|
-
<Button rightIcon={<MinusCircleIcon16Light />} width={150} onClick={handleClick} loading={loading}>
|
|
151
|
-
Удалить
|
|
152
|
-
</Button>
|
|
153
|
-
<Button icon={<MinusCircleIcon16Light />} rightIcon={<MinusCircleIcon16Light />} width={150} onClick={handleClick} loading={loading}>
|
|
154
|
-
Удалить
|
|
155
|
-
</Button>
|
|
156
|
-
</Gapped>
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Проп темы
|
|
161
|
-
|
|
162
|
-
```jsx harmony
|
|
163
|
-
import { Button, Gapped } from '@skbkontur/react-ui';
|
|
164
|
-
|
|
165
|
-
<Gapped>
|
|
166
|
-
<Button theme={{textColorDefault: '#C00000'}}>Ok</Button>
|
|
167
|
-
<Button use="link" theme={{linkColor: '#C00000'}}>Ok</Button>
|
|
168
|
-
<Button>Ok</Button>
|
|
169
|
-
</Gapped>
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Кастомизация кнопки-ссылки
|
|
173
|
-
|
|
174
|
-
```jsx harmony
|
|
175
|
-
import { Toast } from "@skbkontur/react-ui";
|
|
176
|
-
import { CopyIcon16Regular } from "@skbkontur/icons/CopyIcon16Regular"
|
|
177
|
-
|
|
178
|
-
const textDecorationStyles = {
|
|
179
|
-
btnLinkTextUnderlineOffset: '1px',
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const underlineOnHoverStyles = {
|
|
183
|
-
btnLinkTextDecorationColor: 'transparent',
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const differentColorStyles = {
|
|
187
|
-
btnLinkColor: 'blue',
|
|
188
|
-
btnLinkHoverColor: 'blue',
|
|
189
|
-
btnLinkActiveColor: 'blue',
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const stringify = (styles) => {
|
|
193
|
-
return `${Object.entries(styles).map(([key, value]) => `${key}: "${value}"`).join(", ")}`
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
const copyStyles = (styles) => {
|
|
197
|
-
navigator.clipboard.writeText(stringify(styles));
|
|
198
|
-
Toast.push('Copied');
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
const tableStyle = {
|
|
202
|
-
borderCollapse: 'collapse',
|
|
203
|
-
width: '100%',
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
const tdStyle = {
|
|
207
|
-
border: '1px solid',
|
|
208
|
-
padding: '8px',
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
const renderExampleRow = (title, styles) => {
|
|
212
|
-
return (
|
|
213
|
-
<tr>
|
|
214
|
-
<td style={tdStyle}>{title}</td>
|
|
215
|
-
<td style={tdStyle}><Button use={'link'} theme={styles}>Button-link</Button></td>
|
|
216
|
-
<td style={tdStyle}>
|
|
217
|
-
<div style={{display: 'flex'}}>
|
|
218
|
-
<div style={{width: '80%', whiteSpace: 'pre-line'}}>{stringify(styles).replace(/, /g, '\n')}</div>
|
|
219
|
-
<Button icon={<CopyIcon16Regular />} use={'text'} onClick={() => copyStyles(styles)}/>
|
|
220
|
-
</div>
|
|
221
|
-
</td>
|
|
222
|
-
</tr>
|
|
223
|
-
)
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
<table style={tableStyle}>
|
|
227
|
-
<tr style={{textAlign: 'left'}}>
|
|
228
|
-
<th style={tdStyle}></th>
|
|
229
|
-
<th style={tdStyle}>Пример</th>
|
|
230
|
-
<th style={tdStyle}>Переменные темы</th>
|
|
231
|
-
</tr>
|
|
232
|
-
{renderExampleRow('Ссылка с подчеркиванием без отступа', textDecorationStyles)}
|
|
233
|
-
{renderExampleRow('Ссылка с подчеркиванием при наведении', underlineOnHoverStyles)}
|
|
234
|
-
{renderExampleRow('Изменение цвета ссылки', differentColorStyles)}
|
|
235
|
-
</table>
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
### Узкая Кнопка
|
|
239
|
-
|
|
240
|
-
```jsx harmony
|
|
241
|
-
import { Button } from '@skbkontur/react-ui';
|
|
242
|
-
|
|
243
|
-
<Button narrow>
|
|
244
|
-
Создать отчет
|
|
245
|
-
</Button>
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### Состояния валидации
|
|
249
|
-
|
|
250
|
-
```jsx harmony
|
|
251
|
-
import { Button, Gapped } from '@skbkontur/react-ui';
|
|
252
|
-
|
|
253
|
-
<Gapped gap={5}>
|
|
254
|
-
<Button warning>
|
|
255
|
-
Warning
|
|
256
|
-
</Button>
|
|
257
|
-
<Button error>
|
|
258
|
-
Error
|
|
259
|
-
</Button>
|
|
260
|
-
</Gapped>
|
|
261
|
-
```
|