@skbkontur/react-ui 0.0.0-dad43298ae → 0.0.0-db9f11da2a
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 +280 -0
- package/README.md +7 -7
- package/cjs/components/Autocomplete/Autocomplete.d.ts +18 -26
- package/cjs/components/Autocomplete/Autocomplete.js +64 -46
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Button/Button.d.ts +4 -1
- package/cjs/components/Button/Button.js +47 -17
- 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 +109 -76
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Button/ButtonArrow.js +13 -14
- package/cjs/components/Button/ButtonArrow.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/Calendar/CalendarDay.js +18 -2
- package/cjs/components/Calendar/CalendarDay.js.map +1 -1
- package/cjs/components/Calendar/DayCellView.js +7 -15
- package/cjs/components/Calendar/DayCellView.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 +4 -16
- package/cjs/components/Checkbox/Checkbox.js +16 -32
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/ComboBox/ComboBox.d.ts +22 -3
- package/cjs/components/ComboBox/ComboBox.js +26 -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 +6 -25
- 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 +6 -1
- package/cjs/components/DateInput/DateInput.js +45 -17
- package/cjs/components/DateInput/DateInput.js.map +1 -1
- package/cjs/components/DateInput/helpers/InternalDateMediator.d.ts +1 -1
- package/cjs/components/DateInput/helpers/InternalDateMediator.js +10 -1
- package/cjs/components/DateInput/helpers/InternalDateMediator.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/DateRangePicker/DateRangePicker.d.ts +3 -1
- package/cjs/components/DateRangePicker/DateRangePicker.js +61 -23
- package/cjs/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/cjs/components/DateRangePicker/DateRangePicker.styles.d.ts +0 -1
- package/cjs/components/DateRangePicker/DateRangePicker.styles.js +13 -18
- package/cjs/components/DateRangePicker/DateRangePicker.styles.js.map +1 -1
- package/cjs/components/DateRangePicker/DateRangePickerInput.js +4 -8
- package/cjs/components/DateRangePicker/DateRangePickerInput.js.map +1 -1
- package/cjs/components/DateRangePicker/helpers/validateDateRangePicker.js +17 -17
- package/cjs/components/DateRangePicker/helpers/validateDateRangePicker.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/FileUploader/FileUploader.js +15 -2
- package/cjs/components/FileUploader/FileUploader.js.map +1 -1
- package/cjs/components/FxInput/FxInput.d.ts +13 -8
- package/cjs/components/FxInput/FxInput.js +137 -60
- package/cjs/components/FxInput/FxInput.js.map +1 -1
- package/cjs/components/FxInput/FxInputRestoreBtn.js +2 -3
- package/cjs/components/FxInput/FxInputRestoreBtn.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 +6 -5
- package/cjs/components/Input/Input.js +17 -47
- package/cjs/components/Input/Input.js.map +1 -1
- package/cjs/components/Input/Input.styles.d.ts +0 -1
- package/cjs/components/Input/Input.styles.js +8 -19
- package/cjs/components/Input/Input.styles.js.map +1 -1
- package/cjs/components/Input/InputLayout/InputLayout.d.ts +1 -0
- package/cjs/components/Input/InputLayout/InputLayout.js +4 -2
- package/cjs/components/Input/InputLayout/InputLayout.js.map +1 -1
- package/cjs/components/Kebab/Kebab.d.ts +4 -2
- package/cjs/components/Kebab/Kebab.js +9 -29
- package/cjs/components/Kebab/Kebab.js.map +1 -1
- package/cjs/components/Link/Link.d.ts +2 -0
- package/cjs/components/Link/Link.js +15 -1
- package/cjs/components/Link/Link.js.map +1 -1
- package/cjs/components/Link/Link.mixins.js +1 -2
- package/cjs/components/Link/Link.mixins.js.map +1 -1
- package/cjs/components/Link/Link.styles.js +3 -2
- package/cjs/components/Link/Link.styles.js.map +1 -1
- package/cjs/components/Loader/Loader.d.ts +7 -36
- package/cjs/components/Loader/Loader.js +6 -56
- package/cjs/components/Loader/Loader.js.map +1 -1
- package/cjs/components/MaskedInput/ColorableInputElement/ColorableInputElement.d.ts +1 -0
- package/cjs/components/MaskedInput/ColorableInputElement/ColorableInputElement.js +107 -78
- package/cjs/components/MaskedInput/ColorableInputElement/ColorableInputElement.js.map +1 -1
- package/cjs/components/MaskedInput/FixedIMaskInput.js +3 -2
- package/cjs/components/MaskedInput/FixedIMaskInput.js.map +1 -1
- package/cjs/components/MaskedInput/MaskedInput.d.ts +9 -0
- package/cjs/components/MaskedInput/MaskedInput.js +43 -4
- 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 +2 -1
- package/cjs/components/Modal/Modal.styles.js +40 -32
- 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/Modal/ModalSeparator.js +1 -1
- package/cjs/components/Modal/ModalSeparator.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 +5 -12
- package/cjs/components/PasswordInput/PasswordInput.js +21 -32
- package/cjs/components/PasswordInput/PasswordInput.js.map +1 -1
- package/cjs/components/Radio/Radio.d.ts +4 -1
- package/cjs/components/Radio/Radio.js +7 -4
- package/cjs/components/Radio/Radio.js.map +1 -1
- package/cjs/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/cjs/components/RadioGroup/RadioGroup.js +19 -1
- package/cjs/components/RadioGroup/RadioGroup.js.map +1 -1
- package/cjs/components/RadioGroup/RadioGroup.styles.d.ts +1 -0
- package/cjs/components/RadioGroup/RadioGroup.styles.js +10 -4
- package/cjs/components/RadioGroup/RadioGroup.styles.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 +7 -1
- package/cjs/components/Select/Select.js +13 -6
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/SidePage/SidePage.js +4 -2
- package/cjs/components/SidePage/SidePage.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 +63 -19
- package/cjs/components/SidePage/SidePageHeader.js.map +1 -1
- package/cjs/components/SingleToast/SingleToast.d.ts +33 -3
- package/cjs/components/SingleToast/SingleToast.js +58 -3
- package/cjs/components/SingleToast/SingleToast.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 +5 -13
- package/cjs/components/Sticky/Sticky.js +12 -18
- 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 +10 -46
- package/cjs/components/Textarea/Textarea.js +23 -60
- package/cjs/components/Textarea/Textarea.js.map +1 -1
- package/cjs/components/Textarea/Textarea.styles.js +3 -2
- package/cjs/components/Textarea/Textarea.styles.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 +62 -13
- package/cjs/components/Toast/Toast.js +119 -12
- package/cjs/components/Toast/Toast.js.map +1 -1
- package/cjs/components/Toast/ToastStatic.d.ts +3 -2
- package/cjs/components/Toast/ToastStatic.js.map +1 -1
- package/cjs/components/Toast/ToastView.d.ts +8 -16
- package/cjs/components/Toast/ToastView.js +19 -22
- package/cjs/components/Toast/ToastView.js.map +1 -1
- package/cjs/components/Toast/ToastView.styles.d.ts +4 -0
- package/cjs/components/Toast/ToastView.styles.js +43 -9
- package/cjs/components/Toast/ToastView.styles.js.map +1 -1
- package/cjs/components/Toggle/Toggle.d.ts +4 -11
- package/cjs/components/Toggle/Toggle.js +4 -14
- 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 +8 -3
- package/cjs/components/TokenInput/TokenInput.js +44 -30
- package/cjs/components/TokenInput/TokenInput.js.map +1 -1
- package/cjs/components/TokenInput/TokenInputMenu.d.ts +12 -3
- package/cjs/components/TokenInput/TokenInputMenu.js +23 -1
- package/cjs/components/TokenInput/TokenInputMenu.js.map +1 -1
- package/cjs/components/Tooltip/Tooltip.d.ts +14 -8
- package/cjs/components/Tooltip/Tooltip.js +102 -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 +2 -0
- package/cjs/index.js +1 -0
- package/cjs/index.js.map +1 -1
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.d.ts +1 -0
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.js +16 -7
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +3 -0
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.js +27 -9
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.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 +12 -4
- package/cjs/internal/CustomComboBox/ComboBoxView.js +50 -7
- package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
- package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +11 -4
- package/cjs/internal/CustomComboBox/CustomComboBox.js +20 -5
- package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
- package/cjs/internal/CustomComboBox/getComboBoxTheme.d.ts +2 -1
- package/cjs/internal/CustomComboBox/getComboBoxTheme.js +10 -7
- package/cjs/internal/CustomComboBox/getComboBoxTheme.js.map +1 -1
- package/cjs/internal/DateSelect/DateSelect.d.ts +0 -10
- package/cjs/internal/DateSelect/DateSelect.js +13 -19
- 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 +4 -3
- package/cjs/internal/InputLikeText/InputLikeText.js +13 -14
- package/cjs/internal/InputLikeText/InputLikeText.js.map +1 -1
- package/cjs/internal/InputLikeText/InputLikeText.styles.d.ts +1 -0
- package/cjs/internal/InputLikeText/InputLikeText.styles.js +12 -4
- package/cjs/internal/InputLikeText/InputLikeText.styles.js.map +1 -1
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +37 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js +235 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js +10 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js.map +1 -0
- 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 +43 -60
- package/cjs/internal/Popup/Popup.js +41 -81
- 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 +20 -16
- 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/ThemePlayground/SizesGroup.js +4 -4
- package/cjs/internal/ThemePlayground/SizesGroup.js.map +1 -1
- package/cjs/internal/ThemePlayground/ThemeContextPlayground.js +1 -1
- package/cjs/internal/ThemePlayground/ThemeContextPlayground.js.map +1 -1
- package/cjs/internal/ThemePlayground/VariableValue.js +4 -4
- package/cjs/internal/ThemePlayground/VariableValue.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 +125 -20
- package/cjs/internal/themes/BasicTheme.js +172 -25
- 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 +18 -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 +18 -0
- package/cjs/internal/themes/LightTheme5_4.js.map +1 -0
- package/cjs/internal/themes/consts.d.ts +8 -0
- package/cjs/internal/themes/consts.js +8 -0
- package/cjs/internal/themes/consts.js.map +1 -0
- package/cjs/lib/__stories__/Blink.creevey.mts +90 -0
- package/cjs/lib/blink.d.ts +15 -0
- package/cjs/lib/blink.js +65 -0
- package/cjs/lib/blink.js.map +1 -0
- package/cjs/lib/date/InternalDateGetter.d.ts +1 -1
- package/cjs/lib/date/InternalDateGetter.js +8 -1
- package/cjs/lib/date/InternalDateGetter.js.map +1 -1
- package/cjs/lib/delay.mts +3 -0
- package/cjs/lib/featureFlagsContext/FeatureFlagsHelpers.d.ts +11 -0
- package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +11 -0
- package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js +23 -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/getMenuPositions.d.ts +21 -1
- package/cjs/lib/getMenuPositions.js +45 -8
- package/cjs/lib/getMenuPositions.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/size/SizeControlContext.d.ts +6 -0
- package/cjs/lib/size/SizeControlContext.js +16 -0
- package/cjs/lib/size/SizeControlContext.js.map +1 -0
- package/cjs/lib/size/SizeDecorator.d.ts +33 -0
- package/cjs/lib/size/SizeDecorator.js +41 -0
- package/cjs/lib/size/SizeDecorator.js.map +1 -0
- package/cjs/lib/size/constants.d.ts +2 -0
- package/cjs/lib/size/constants.js +3 -0
- package/cjs/lib/size/constants.js.map +1 -0
- package/cjs/lib/size/index.d.ts +1 -0
- package/cjs/lib/size/index.js +1 -0
- package/cjs/lib/size/index.js.map +1 -0
- package/cjs/lib/size/useSizeControl.d.ts +2 -0
- package/cjs/lib/size/useSizeControl.js +10 -0
- package/cjs/lib/size/useSizeControl.js.map +1 -0
- package/cjs/lib/theming/ThemeHelpers.d.ts +1 -1
- package/cjs/lib/theming/ThemeHelpers.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 +18 -1
- package/cjs/lib/utils.js +40 -4
- package/cjs/lib/utils.js.map +1 -1
- package/cjs/test-setup.d.ts +1 -0
- package/cjs/vitest.config.d.ts +2 -0
- package/components/Autocomplete/Autocomplete/Autocomplete.js +63 -51
- package/components/Autocomplete/Autocomplete/Autocomplete.js.map +1 -1
- package/components/Autocomplete/Autocomplete.d.ts +18 -26
- package/components/Button/Button/Button.js +45 -24
- package/components/Button/Button/Button.js.map +1 -1
- package/components/Button/Button.d.ts +4 -1
- package/components/Button/Button.styles/Button.styles.js +79 -61
- package/components/Button/Button.styles/Button.styles.js.map +1 -1
- package/components/Button/Button.styles.d.ts +6 -0
- package/components/Button/ButtonArrow/ButtonArrow.js +1 -3
- package/components/Button/ButtonArrow/ButtonArrow.js.map +1 -1
- package/components/Calendar/Calendar/Calendar.js.map +1 -1
- package/components/Calendar/Calendar.d.ts +2 -0
- package/components/Calendar/CalendarDay/CalendarDay.js +9 -2
- package/components/Calendar/CalendarDay/CalendarDay.js.map +1 -1
- package/components/Calendar/DayCellView/DayCellView.js +6 -10
- package/components/Calendar/DayCellView/DayCellView.js.map +1 -1
- package/components/Center/Center/Center.js.map +1 -1
- package/components/Center/Center.d.ts +2 -0
- package/components/Checkbox/Checkbox/Checkbox.js +12 -24
- package/components/Checkbox/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Checkbox.d.ts +4 -16
- package/components/ComboBox/ComboBox/ComboBox.js +2 -1
- package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
- package/components/ComboBox/ComboBox.d.ts +22 -3
- package/components/CurrencyInput/CurrencyInput/CurrencyInput.js +13 -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 +34 -24
- package/components/DateInput/DateInput/DateInput.js.map +1 -1
- package/components/DateInput/DateInput.d.ts +6 -1
- package/components/DateInput/helpers/InternalDateMediator/InternalDateMediator.js +2 -2
- package/components/DateInput/helpers/InternalDateMediator/InternalDateMediator.js.map +1 -1
- package/components/DateInput/helpers/InternalDateMediator.d.ts +1 -1
- 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/DateRangePicker/DateRangePicker/DateRangePicker.js +41 -22
- package/components/DateRangePicker/DateRangePicker/DateRangePicker.js.map +1 -1
- package/components/DateRangePicker/DateRangePicker.d.ts +3 -1
- package/components/DateRangePicker/DateRangePicker.styles/DateRangePicker.styles.js +12 -15
- package/components/DateRangePicker/DateRangePicker.styles/DateRangePicker.styles.js.map +1 -1
- package/components/DateRangePicker/DateRangePicker.styles.d.ts +0 -1
- package/components/DateRangePicker/DateRangePickerInput/DateRangePickerInput.js +5 -8
- package/components/DateRangePicker/DateRangePickerInput/DateRangePickerInput.js.map +1 -1
- package/components/DateRangePicker/helpers/validateDateRangePicker/validateDateRangePicker.js +16 -15
- package/components/DateRangePicker/helpers/validateDateRangePicker/validateDateRangePicker.js.map +1 -1
- 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/FileUploader/FileUploader/FileUploader.js +8 -2
- package/components/FileUploader/FileUploader/FileUploader.js.map +1 -1
- package/components/FxInput/FxInput/FxInput.js +122 -70
- package/components/FxInput/FxInput/FxInput.js.map +1 -1
- package/components/FxInput/FxInput.d.ts +13 -8
- package/components/FxInput/FxInputRestoreBtn/FxInputRestoreBtn.js +2 -2
- package/components/FxInput/FxInputRestoreBtn/FxInputRestoreBtn.js.map +1 -1
- 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 +23 -52
- package/components/Input/Input/Input.js.map +1 -1
- package/components/Input/Input.d.ts +6 -5
- package/components/Input/Input.styles/Input.styles.js +9 -13
- package/components/Input/Input.styles/Input.styles.js.map +1 -1
- package/components/Input/Input.styles.d.ts +0 -1
- package/components/Input/InputLayout/InputLayout/InputLayout.js +5 -2
- package/components/Input/InputLayout/InputLayout/InputLayout.js.map +1 -1
- package/components/Input/InputLayout/InputLayout.d.ts +1 -0
- package/components/Kebab/Kebab/Kebab.js +8 -26
- package/components/Kebab/Kebab/Kebab.js.map +1 -1
- package/components/Kebab/Kebab.d.ts +4 -2
- package/components/Link/Link/Link.js +8 -1
- package/components/Link/Link/Link.js.map +1 -1
- package/components/Link/Link.d.ts +2 -0
- package/components/Link/Link.mixins/Link.mixins.js +1 -1
- package/components/Link/Link.mixins/Link.mixins.js.map +1 -1
- package/components/Link/Link.styles/Link.styles.js +1 -1
- package/components/Link/Link.styles/Link.styles.js.map +1 -1
- package/components/Loader/Loader/Loader.js +2 -34
- package/components/Loader/Loader/Loader.js.map +1 -1
- package/components/Loader/Loader.d.ts +7 -36
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement/ColorableInputElement.js +81 -66
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement/ColorableInputElement.js.map +1 -1
- package/components/MaskedInput/ColorableInputElement/ColorableInputElement.d.ts +1 -0
- package/components/MaskedInput/FixedIMaskInput/FixedIMaskInput.js +3 -2
- package/components/MaskedInput/FixedIMaskInput/FixedIMaskInput.js.map +1 -1
- package/components/MaskedInput/MaskedInput/MaskedInput.js +28 -2
- 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 +32 -29
- package/components/Modal/Modal.styles/Modal.styles.js.map +1 -1
- package/components/Modal/Modal.styles.d.ts +2 -1
- 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/Modal/ModalSeparator/ModalSeparator.js +1 -1
- package/components/Modal/ModalSeparator/ModalSeparator.js.map +1 -1
- 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 +13 -25
- package/components/PasswordInput/PasswordInput/PasswordInput.js.map +1 -1
- package/components/PasswordInput/PasswordInput.d.ts +5 -12
- package/components/Radio/Radio/Radio.js +7 -7
- package/components/Radio/Radio/Radio.js.map +1 -1
- package/components/Radio/Radio.d.ts +4 -1
- package/components/RadioGroup/RadioGroup/RadioGroup.js +23 -17
- package/components/RadioGroup/RadioGroup/RadioGroup.js.map +1 -1
- package/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/components/RadioGroup/RadioGroup.styles/RadioGroup.styles.js +7 -4
- package/components/RadioGroup/RadioGroup.styles/RadioGroup.styles.js.map +1 -1
- package/components/RadioGroup/RadioGroup.styles.d.ts +1 -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 +17 -15
- package/components/Select/Select/Select.js.map +1 -1
- package/components/Select/Select.d.ts +7 -1
- package/components/SidePage/SidePage/SidePage.js +3 -3
- package/components/SidePage/SidePage/SidePage.js.map +1 -1
- 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 +62 -35
- package/components/SidePage/SidePageHeader/SidePageHeader.js.map +1 -1
- package/components/SidePage/SidePageHeader.d.ts +12 -2
- package/components/SingleToast/SingleToast/SingleToast.js +37 -12
- package/components/SingleToast/SingleToast/SingleToast.js.map +1 -1
- package/components/SingleToast/SingleToast.d.ts +33 -3
- 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 +10 -14
- package/components/Sticky/Sticky/Sticky.js.map +1 -1
- package/components/Sticky/Sticky.d.ts +5 -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 +19 -52
- package/components/Textarea/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.d.ts +10 -46
- package/components/Textarea/Textarea.styles/Textarea.styles.js +1 -1
- package/components/Textarea/Textarea.styles/Textarea.styles.js.map +1 -1
- package/components/Textarea/TextareaCounter/TextareaCounter.js +1 -11
- package/components/Textarea/TextareaCounter/TextareaCounter.js.map +1 -1
- package/components/Toast/Toast/Toast.js +93 -32
- package/components/Toast/Toast/Toast.js.map +1 -1
- package/components/Toast/Toast.d.ts +62 -13
- package/components/Toast/ToastStatic/ToastStatic.js.map +1 -1
- package/components/Toast/ToastStatic.d.ts +3 -2
- package/components/Toast/ToastView/ToastView.js +20 -22
- package/components/Toast/ToastView/ToastView.js.map +1 -1
- package/components/Toast/ToastView.d.ts +8 -16
- package/components/Toast/ToastView.styles/ToastView.styles.js +17 -5
- package/components/Toast/ToastView.styles/ToastView.styles.js.map +1 -1
- package/components/Toast/ToastView.styles.d.ts +4 -0
- package/components/Toggle/Toggle/Toggle.js +11 -20
- package/components/Toggle/Toggle/Toggle.js.map +1 -1
- package/components/Toggle/Toggle.d.ts +4 -11
- package/components/Token/Token/Token.js.map +1 -1
- package/components/Token/Token.d.ts +2 -0
- package/components/TokenInput/TokenInput/TokenInput.js +49 -43
- package/components/TokenInput/TokenInput/TokenInput.js.map +1 -1
- package/components/TokenInput/TokenInput.d.ts +8 -3
- package/components/TokenInput/TokenInputMenu/TokenInputMenu.js +16 -6
- package/components/TokenInput/TokenInputMenu/TokenInputMenu.js.map +1 -1
- package/components/TokenInput/TokenInputMenu.d.ts +12 -3
- package/components/Tooltip/Tooltip/Tooltip.js +77 -26
- package/components/Tooltip/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/Tooltip.d.ts +14 -8
- 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 +2 -0
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon/ClearCrossIcon.js +21 -7
- package/internal/ClearCrossIcon/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.d.ts +1 -0
- package/internal/ClearCrossIcon/ClearCrossIcon.styles/ClearCrossIcon.styles.js +14 -5
- package/internal/ClearCrossIcon/ClearCrossIcon.styles/ClearCrossIcon.styles.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +3 -0
- 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 +72 -41
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView.d.ts +12 -4
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +13 -7
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.d.ts +11 -4
- package/internal/CustomComboBox/getComboBoxTheme/getComboBoxTheme.js +5 -3
- package/internal/CustomComboBox/getComboBoxTheme/getComboBoxTheme.js.map +1 -1
- package/internal/CustomComboBox/getComboBoxTheme.d.ts +2 -1
- package/internal/DateSelect/DateSelect/DateSelect.js +4 -11
- 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 +17 -28
- package/internal/InputLikeText/InputLikeText/InputLikeText.js.map +1 -1
- package/internal/InputLikeText/InputLikeText.d.ts +4 -3
- package/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js +7 -4
- package/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js.map +1 -1
- package/internal/InputLikeText/InputLikeText.styles.d.ts +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/InternalTextareaWithLayout.js +249 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/package.json +6 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +37 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/InternalTextareaWithLayout.styles.js +8 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/InternalTextareaWithLayout.styles.js.map +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/package.json +6 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -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 +23 -69
- package/internal/Popup/Popup/Popup.js.map +1 -1
- package/internal/Popup/Popup.d.ts +43 -60
- 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 +21 -18
- 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/ThemePlayground/SizesGroup/SizesGroup.js +4 -4
- package/internal/ThemePlayground/SizesGroup/SizesGroup.js.map +1 -1
- package/internal/ThemePlayground/ThemeContextPlayground/ThemeContextPlayground.js +2 -2
- package/internal/ThemePlayground/ThemeContextPlayground/ThemeContextPlayground.js.map +1 -1
- package/internal/ThemePlayground/VariableValue/VariableValue.js +4 -4
- package/internal/ThemePlayground/VariableValue/VariableValue.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 +185 -30
- package/internal/themes/BasicTheme/BasicTheme.js.map +1 -1
- package/internal/themes/BasicTheme.d.ts +125 -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 +17 -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 +17 -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/internal/themes/consts/consts.js +9 -0
- package/internal/themes/consts/consts.js.map +1 -0
- package/internal/themes/consts/package.json +6 -0
- package/internal/themes/consts.d.ts +8 -0
- package/lib/__stories__/Blink.creevey.mts +90 -0
- package/lib/blink/blink.js +63 -0
- package/lib/blink/blink.js.map +1 -0
- package/lib/blink/package.json +6 -0
- package/lib/blink.d.ts +15 -0
- package/lib/date/InternalDateGetter/InternalDateGetter.js +4 -1
- package/lib/date/InternalDateGetter/InternalDateGetter.js.map +1 -1
- package/lib/date/InternalDateGetter.d.ts +1 -1
- package/lib/delay.d.mts +1 -0
- package/lib/delay.mts +3 -0
- package/lib/featureFlagsContext/FeatureFlagsHelpers.d.ts +11 -0
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js +12 -1
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +11 -0
- package/lib/forwardRefAndName/forwardRefAndName.js.map +1 -1
- package/lib/forwardRefAndName.d.ts +1 -1
- package/lib/getMenuPositions/getMenuPositions.js +33 -4
- package/lib/getMenuPositions/getMenuPositions.js.map +1 -1
- package/lib/getMenuPositions.d.ts +21 -1
- package/lib/rootNode/rootNodeDecorator/rootNodeDecorator.js.map +1 -1
- package/lib/rootNode/rootNodeDecorator.d.ts +2 -1
- package/lib/size/SizeControlContext/SizeControlContext.js +7 -0
- package/lib/size/SizeControlContext/SizeControlContext.js.map +1 -0
- package/lib/size/SizeControlContext/package.json +6 -0
- package/lib/size/SizeControlContext.d.ts +6 -0
- package/lib/size/SizeDecorator/SizeDecorator.js +41 -0
- package/lib/size/SizeDecorator/SizeDecorator.js.map +1 -0
- package/lib/size/SizeDecorator/package.json +6 -0
- package/lib/size/SizeDecorator.d.ts +33 -0
- package/lib/size/constants/constants.js +1 -0
- package/lib/size/constants/constants.js.map +1 -0
- package/lib/size/constants/package.json +6 -0
- package/lib/size/constants.d.ts +2 -0
- package/lib/size/index/index.js +1 -0
- package/lib/size/index/index.js.map +1 -0
- package/lib/size/index/package.json +6 -0
- package/lib/size/index.d.ts +1 -0
- package/lib/size/package.json +6 -0
- package/lib/size/useSizeControl/package.json +6 -0
- package/lib/size/useSizeControl/useSizeControl.js +7 -0
- package/lib/size/useSizeControl/useSizeControl.js.map +1 -0
- package/lib/size/useSizeControl.d.ts +2 -0
- package/lib/theming/ThemeHelpers/ThemeHelpers.js.map +1 -1
- package/lib/theming/ThemeHelpers.d.ts +1 -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 +33 -2
- package/lib/utils/utils.js.map +1 -1
- package/lib/utils.d.ts +18 -1
- package/package.json +19 -36
- package/test-setup.d.ts +1 -0
- package/vitest.config.d.ts +2 -0
- 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 -87
- 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 -131
- package/cjs/components/TokenInput/TokenInput.md +0 -308
- 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 -87
- 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 -131
- package/components/TokenInput/TokenInput.md +0 -308
- 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
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const DARK_THEME_5_0: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
2
2
|
export declare const DARK_THEME_5_1: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
3
3
|
export declare const DARK_THEME_5_2: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
4
|
+
export declare const DARK_THEME_5_3: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
5
|
+
export declare const DARK_THEME_5_4: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
4
6
|
export declare const DARK_THEME: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { LightTheme5_0 } from "../../../../internal/themes/LightTheme5_0";
|
|
2
2
|
import { LightTheme5_1 } from "../../../../internal/themes/LightTheme5_1";
|
|
3
3
|
import { LightTheme5_2 } from "../../../../internal/themes/LightTheme5_2";
|
|
4
|
+
import { LightTheme5_3 } from "../../../../internal/themes/LightTheme5_3";
|
|
5
|
+
import { LightTheme5_4 } from "../../../../internal/themes/LightTheme5_4";
|
|
4
6
|
export var LIGHT_THEME_5_0 = LightTheme5_0;
|
|
5
7
|
export var LIGHT_THEME_5_1 = LightTheme5_1;
|
|
6
8
|
export var LIGHT_THEME_5_2 = LightTheme5_2;
|
|
7
|
-
export var
|
|
9
|
+
export var LIGHT_THEME_5_3 = LightTheme5_3;
|
|
10
|
+
export var LIGHT_THEME_5_4 = LightTheme5_4;
|
|
11
|
+
export var LIGHT_THEME = LIGHT_THEME_5_4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LightTheme5_0","LightTheme5_1","LightTheme5_2","LIGHT_THEME_5_0","LIGHT_THEME_5_1","LIGHT_THEME_5_2","LIGHT_THEME"],"sources":["LightTheme.ts"],"sourcesContent":["import { LightTheme5_0 } from '../../../internal/themes/LightTheme5_0';\nimport { LightTheme5_1 } from '../../../internal/themes/LightTheme5_1';\nimport { LightTheme5_2 } from '../../../internal/themes/LightTheme5_2';\n\nexport const LIGHT_THEME_5_0 = LightTheme5_0;\nexport const LIGHT_THEME_5_1 = LightTheme5_1;\nexport const LIGHT_THEME_5_2 = LightTheme5_2;\n\nexport const LIGHT_THEME =
|
|
1
|
+
{"version":3,"names":["LightTheme5_0","LightTheme5_1","LightTheme5_2","LightTheme5_3","LightTheme5_4","LIGHT_THEME_5_0","LIGHT_THEME_5_1","LIGHT_THEME_5_2","LIGHT_THEME_5_3","LIGHT_THEME_5_4","LIGHT_THEME"],"sources":["LightTheme.ts"],"sourcesContent":["import { LightTheme5_0 } from '../../../internal/themes/LightTheme5_0';\nimport { LightTheme5_1 } from '../../../internal/themes/LightTheme5_1';\nimport { LightTheme5_2 } from '../../../internal/themes/LightTheme5_2';\nimport { LightTheme5_3 } from '../../../internal/themes/LightTheme5_3';\nimport { LightTheme5_4 } from '../../../internal/themes/LightTheme5_4';\n\nexport const LIGHT_THEME_5_0 = LightTheme5_0;\nexport const LIGHT_THEME_5_1 = LightTheme5_1;\nexport const LIGHT_THEME_5_2 = LightTheme5_2;\nexport const LIGHT_THEME_5_3 = LightTheme5_3;\nexport const LIGHT_THEME_5_4 = LightTheme5_4;\n\nexport const LIGHT_THEME = LIGHT_THEME_5_4;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;;AAEtE,OAAO,IAAMC,eAAe,GAAGL,aAAa;AAC5C,OAAO,IAAMM,eAAe,GAAGL,aAAa;AAC5C,OAAO,IAAMM,eAAe,GAAGL,aAAa;AAC5C,OAAO,IAAMM,eAAe,GAAGL,aAAa;AAC5C,OAAO,IAAMM,eAAe,GAAGL,aAAa;;AAE5C,OAAO,IAAMM,WAAW,GAAGD,eAAe","ignoreList":[]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const LIGHT_THEME_5_0: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
2
2
|
export declare const LIGHT_THEME_5_1: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
3
3
|
export declare const LIGHT_THEME_5_2: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
4
|
+
export declare const LIGHT_THEME_5_3: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
5
|
+
export declare const LIGHT_THEME_5_4: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
|
4
6
|
export declare const LIGHT_THEME: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
|
package/lib/utils/utils.js
CHANGED
|
@@ -130,6 +130,19 @@ export var isReactUIComponent = function isReactUIComponent(name) {
|
|
|
130
130
|
};
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Checks if a component instance is a ReactUI component with the given name.
|
|
135
|
+
*
|
|
136
|
+
* @typeParam T Expected ReactUI component type.
|
|
137
|
+
* @param instance Component instance.
|
|
138
|
+
* @param componentName ReactUI component name.
|
|
139
|
+
* @returns `true` if it matches, otherwise `false`.
|
|
140
|
+
*/
|
|
141
|
+
export var isReactUIInstance = function isReactUIInstance(instance, componentName) {
|
|
142
|
+
var constructor = instance == null ? void 0 : instance.constructor;
|
|
143
|
+
return '__KONTUR_REACT_UI__' in constructor && constructor.__KONTUR_REACT_UI__ === componentName;
|
|
144
|
+
};
|
|
145
|
+
|
|
133
146
|
/** @deprecated Переехал в `lib/mergeRefs.ts`. Со следующей мажорной версии от сюда будет удален*/
|
|
134
147
|
export function mergeRefs(refs) {
|
|
135
148
|
return function (value) {
|
|
@@ -188,14 +201,32 @@ export var isCurrencyInput = isReactUIComponent('CurrencyInput');
|
|
|
188
201
|
export var isSelect = isReactUIComponent('Select');
|
|
189
202
|
export var isDropdown = isReactUIComponent('Dropdown');
|
|
190
203
|
export var isDropdownMenu = isReactUIComponent('DropdownMenu');
|
|
204
|
+
export var isHint = isReactUIComponent('Hint');
|
|
205
|
+
export var isTooltip = isReactUIComponent('Tooltip');
|
|
191
206
|
export var isKonturIcon = function isKonturIcon(icon) {
|
|
192
207
|
return Object.prototype.hasOwnProperty.call(icon == null ? void 0 : icon.type, '__KONTUR_ICON__');
|
|
193
208
|
};
|
|
194
|
-
export function clickOutside() {
|
|
209
|
+
export function clickOutside(eventType) {
|
|
210
|
+
if (eventType === void 0) {
|
|
211
|
+
eventType = 'mousedown';
|
|
212
|
+
}
|
|
195
213
|
var event = document.createEvent('HTMLEvents');
|
|
196
|
-
event.initEvent(
|
|
214
|
+
event.initEvent(eventType, true, true);
|
|
197
215
|
document.body.dispatchEvent(event);
|
|
198
216
|
}
|
|
199
217
|
export function isElement(el) {
|
|
200
218
|
return !!el && typeof el === 'object' && 'nodeType' in el && el.nodeType === Node.ELEMENT_NODE;
|
|
219
|
+
}
|
|
220
|
+
export function isDocument(node) {
|
|
221
|
+
return !!node && typeof node === 'object' && node.nodeType === Node.DOCUMENT_NODE;
|
|
222
|
+
}
|
|
223
|
+
export function isWindow(node) {
|
|
224
|
+
return !!node && typeof node === 'object' && node.window === node;
|
|
225
|
+
}
|
|
226
|
+
export function tryGetDocument(node) {
|
|
227
|
+
return !!node && isDocument(node.ownerDocument) ? node.ownerDocument : null;
|
|
228
|
+
}
|
|
229
|
+
export function tryGetWindow(node) {
|
|
230
|
+
var doc = tryGetDocument(node);
|
|
231
|
+
return isDocument(doc) ? doc.defaultView : null;
|
|
201
232
|
}
|
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,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;IACzB1B,YAAY,CAAC2B,UAAU,CAACF,OAAO,EAAEH,EAAE,CAAC;EACtC,CAAC,CAAC;EACCM,IAAI,CAACP,IAAI,CAAC,SACL;IAAC,oBAAM,IAA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,kBAAkB,CAAgC,QAAQ,CAAC;AACnF,OAAO,IAAM8B,UAAU,GAAG9B,kBAAkB,CAAgB,UAAU,CAAC;AACvE,OAAO,IAAM+B,cAAc,GAAG/B,kBAAkB,CAAoB,cAAc,CAAC;;AAEnF,OAAO,IAAMgC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAwB,EAAK;EACxD,OAAOtD,MAAM,CAACxB,SAAS,CAACyB,cAAc,CAAC9C,IAAI,CAACmG,IAAI,oBAAJA,IAAI,CAAEzE,IAAI,EAAE,iBAAiB,CAAC;AAC5E,CAAC;;AAED,OAAO,SAAS0E,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":[]}
|
|
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","isReactUIInstance","instance","constructor","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","eventType","event","document","createEvent","initEvent","body","dispatchEvent","isElement","el","nodeType","Node","ELEMENT_NODE","isDocument","DOCUMENT_NODE","isWindow","window","tryGetDocument","ownerDocument","tryGetWindow","doc","defaultView"],"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/**\n * Checks if a component instance is a ReactUI component with the given name.\n *\n * @typeParam T Expected ReactUI component type.\n * @param instance Component instance.\n * @param componentName ReactUI component name.\n * @returns `true` if it matches, otherwise `false`.\n */\nexport const isReactUIInstance = <T extends React.Component>(\n instance: React.Component,\n componentName: string,\n): instance is T => {\n const constructor = instance?.constructor;\n return '__KONTUR_REACT_UI__' in constructor && constructor.__KONTUR_REACT_UI__ === componentName;\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(eventType: 'touchstart' | 'mousedown' | 'pointerup' = 'mousedown') {\n const event = document.createEvent('HTMLEvents');\n event.initEvent(eventType, true, true);\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\nexport function isDocument(node?: Document | null): node is Document {\n return !!node && typeof node === 'object' && node.nodeType === Node.DOCUMENT_NODE;\n}\n\nexport function isWindow(node?: Window | null): node is Window {\n return !!node && typeof node === 'object' && node.window === node;\n}\n\nexport function tryGetDocument(node?: Node | null): Document | null {\n return !!node && isDocument(node.ownerDocument) ? node.ownerDocument : null;\n}\n\nexport function tryGetWindow(node?: Node | null): Window | null {\n const doc = tryGetDocument(node);\n return isDocument(doc) ? doc.defaultView : null;\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,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|
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 {
|
|
@@ -56,6 +58,15 @@ export declare const isNullable: (value: unknown) => value is null | undefined;
|
|
|
56
58
|
* @returns A function that checks if the given `child` is an instance of the component specified by `name`.
|
|
57
59
|
*/
|
|
58
60
|
export declare const isReactUIComponent: <P = any>(name: string) => (child: React.ReactNode) => child is React.ReactElement<P, string | React.JSXElementConstructor<any>>;
|
|
61
|
+
/**
|
|
62
|
+
* Checks if a component instance is a ReactUI component with the given name.
|
|
63
|
+
*
|
|
64
|
+
* @typeParam T Expected ReactUI component type.
|
|
65
|
+
* @param instance Component instance.
|
|
66
|
+
* @param componentName ReactUI component name.
|
|
67
|
+
* @returns `true` if it matches, otherwise `false`.
|
|
68
|
+
*/
|
|
69
|
+
export declare const isReactUIInstance: <T extends React.Component<{}, {}, any>>(instance: React.Component, componentName: string) => instance is T;
|
|
59
70
|
/** @deprecated Переехал в `lib/mergeRefs.ts`. Со следующей мажорной версии от сюда будет удален*/
|
|
60
71
|
export declare function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T>;
|
|
61
72
|
/**
|
|
@@ -85,6 +96,12 @@ export declare const isCurrencyInput: (child: React.ReactNode) => child is React
|
|
|
85
96
|
export declare const isSelect: (child: React.ReactNode) => child is React.ReactElement<SelectProps<unknown, unknown>, string | React.JSXElementConstructor<any>>;
|
|
86
97
|
export declare const isDropdown: (child: React.ReactNode) => child is React.ReactElement<DropdownProps, string | React.JSXElementConstructor<any>>;
|
|
87
98
|
export declare const isDropdownMenu: (child: React.ReactNode) => child is React.ReactElement<DropdownMenuProps, string | React.JSXElementConstructor<any>>;
|
|
99
|
+
export declare const isHint: (child: React.ReactNode) => child is React.ReactElement<HintProps, string | React.JSXElementConstructor<any>>;
|
|
100
|
+
export declare const isTooltip: (child: React.ReactNode) => child is React.ReactElement<TooltipProps, string | React.JSXElementConstructor<any>>;
|
|
88
101
|
export declare const isKonturIcon: (icon: React.ReactElement) => boolean;
|
|
89
|
-
export declare function clickOutside(): void;
|
|
102
|
+
export declare function clickOutside(eventType?: 'touchstart' | 'mousedown' | 'pointerup'): void;
|
|
90
103
|
export declare function isElement(el: unknown): el is Element;
|
|
104
|
+
export declare function isDocument(node?: Document | null): node is Document;
|
|
105
|
+
export declare function isWindow(node?: Window | null): node is Window;
|
|
106
|
+
export declare function tryGetDocument(node?: Node | null): Document | null;
|
|
107
|
+
export declare function tryGetWindow(node?: Node | null): Window | null;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/react-ui",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-db9f11da2a",
|
|
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/
|
|
8
|
+
"homepage": "https://tech.skbkontur.ru/kontur-ui/",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git@github.com:skbkontur/retail-ui.git"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/skbkontur/retail-ui/issues"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
|
-
"prebuild": "run-s clean build:types",
|
|
17
|
+
"prebuild": "run-s clean \"build:types\"",
|
|
18
18
|
"build:types": "tsc -p ./prod.tsconfig.json --emitDeclarationOnly --diagnostics --outDir build",
|
|
19
19
|
"build:cjs": "cross-env BABEL_ENV=cjs node scripts/build",
|
|
20
20
|
"build:esm": "node scripts/build",
|
|
@@ -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",
|
|
@@ -39,8 +35,8 @@
|
|
|
39
35
|
"fix": "run-s -c fix:*",
|
|
40
36
|
"fix:eslint": "yarn lint:eslint --fix",
|
|
41
37
|
"fix:prettier": "yarn prettier --write .",
|
|
42
|
-
"test": "
|
|
43
|
-
"test:watch": "
|
|
38
|
+
"test": "vitest run",
|
|
39
|
+
"test:watch": "vitest",
|
|
44
40
|
"creevey": "node ../../scripts/creevey-prepare.js .creevey/config.mts && cross-env BABEL_ENV=cjs creevey -c .creevey/config.mts",
|
|
45
41
|
"creevey:ci": "start-server-and-test storybook:serve http://localhost:6060 creevey",
|
|
46
42
|
"creevey:update": "cross-env BABEL_ENV=cjs creevey -c .creevey/config.mts --update",
|
|
@@ -52,15 +48,15 @@
|
|
|
52
48
|
"@babel/runtime": "^7.24.6",
|
|
53
49
|
"@emotion/css": "^11.11.2",
|
|
54
50
|
"@skbkontur/global-object": "^0.4.4",
|
|
55
|
-
"@skbkontur/react-imask": "^7.6.
|
|
51
|
+
"@skbkontur/react-imask": "^7.6.5",
|
|
56
52
|
"eventemitter3": "^5.0.1",
|
|
57
53
|
"invariant": "^2.2.4",
|
|
58
54
|
"lodash.debounce": "^4.0.8",
|
|
59
55
|
"lodash.isequal": "^4.5.0",
|
|
60
56
|
"lodash.throttle": "^4.1.1",
|
|
61
57
|
"normalize-wheel": "^1.0.1",
|
|
62
|
-
"
|
|
63
|
-
"react-focus-lock": "2.11.2",
|
|
58
|
+
"react-docgen": "7.0.0",
|
|
59
|
+
"react-focus-lock": "^2.11.2",
|
|
64
60
|
"react-input-mask": "2.0.4",
|
|
65
61
|
"react-is": "^18.3.1",
|
|
66
62
|
"react-transition-group": "^4.4.5",
|
|
@@ -79,9 +75,6 @@
|
|
|
79
75
|
"@babel/preset-typescript": "^7.24.6",
|
|
80
76
|
"@babel/register": "^7.24.6",
|
|
81
77
|
"@skbkontur/icons": "1.10.0",
|
|
82
|
-
"@skbkontur/react-icons": "5.2.9",
|
|
83
|
-
"@skbkontur/react-props2attrs": "0.1.3",
|
|
84
|
-
"@skbkontur/react-sorge": "0.2.1",
|
|
85
78
|
"@skbkontur/storybook-addon-live-examples": "0.0.17",
|
|
86
79
|
"@storybook/addon-a11y": "7.6.18",
|
|
87
80
|
"@storybook/addon-controls": "7.6.18",
|
|
@@ -93,17 +86,14 @@
|
|
|
93
86
|
"@storybook/blocks": "^7.6.18",
|
|
94
87
|
"@storybook/react": "7.6.18",
|
|
95
88
|
"@storybook/react-webpack5": "7.6.18",
|
|
96
|
-
"@testing-library/jest-dom": "
|
|
89
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
97
90
|
"@testing-library/react": "15.0.7",
|
|
98
91
|
"@testing-library/react-hooks": "^8.0.1",
|
|
99
92
|
"@testing-library/user-event": "14.5.2",
|
|
100
93
|
"@types/invariant": "^2.2.35",
|
|
101
|
-
"@types/jest": "29.5.12",
|
|
102
|
-
"@types/jest-axe": "^3.5.3",
|
|
103
94
|
"@types/lodash.debounce": "^4.0.6",
|
|
104
95
|
"@types/lodash.isequal": "^4.5.5",
|
|
105
96
|
"@types/lodash.throttle": "^4.1.6",
|
|
106
|
-
"@types/prop-types": "15.7.12",
|
|
107
97
|
"@types/react": "18.3.3",
|
|
108
98
|
"@types/react-dom": "18.3.0",
|
|
109
99
|
"@types/react-input-mask": "3.0.5",
|
|
@@ -112,9 +102,7 @@
|
|
|
112
102
|
"@types/shallowequal": "^1.1.1",
|
|
113
103
|
"@types/warning": "^3.0.0",
|
|
114
104
|
"axios": "^1.7.2",
|
|
115
|
-
"babel-jest": "29.7.0",
|
|
116
105
|
"babel-loader": "^9.1.3",
|
|
117
|
-
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
118
106
|
"chalk": "4.1.0",
|
|
119
107
|
"copyfiles": "^2.4.1",
|
|
120
108
|
"core-js": "^3.37.1",
|
|
@@ -123,33 +111,28 @@
|
|
|
123
111
|
"css-loader": "^7.1.2",
|
|
124
112
|
"dotenv": "^16.4.5",
|
|
125
113
|
"dts-css-modules-loader": "^2.0.1",
|
|
126
|
-
"eslint-plugin-jest": "28.5.0",
|
|
127
114
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
128
115
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
129
116
|
"eslint-plugin-storybook": "^0.8.0",
|
|
130
117
|
"eslint-plugin-testing-library": "^6.2.2",
|
|
118
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
131
119
|
"file-loader": "^6.2.0",
|
|
132
120
|
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
133
121
|
"fs-extra": "^11.2.0",
|
|
134
122
|
"fs-readdir-recursive": "^1.1.0",
|
|
135
123
|
"gh-pages": "^6.1.1",
|
|
136
124
|
"identity-obj-proxy": "^3.0.0",
|
|
137
|
-
"
|
|
138
|
-
"start-server-and-test": "1.14.0",
|
|
139
|
-
"jest-axe": "^8.0.0",
|
|
140
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
141
|
-
"jest-teamcity-reporter": "^0.9.0",
|
|
142
|
-
"jest-junit": "^16.0.0",
|
|
125
|
+
"jsdom": "^26.1.0",
|
|
143
126
|
"npm-run-all": "^4.1.5",
|
|
144
127
|
"output-file-sync": "^2.0.1",
|
|
145
128
|
"react": "18.3.1",
|
|
146
129
|
"react-docgen-typescript": "^2.2.2",
|
|
147
130
|
"react-dom": "^18.3.1",
|
|
148
|
-
"react-styleguidist": "^12.0.1",
|
|
149
131
|
"rimraf": "^5.0.7",
|
|
150
132
|
"selenium-webdriver": "^4.27.0",
|
|
151
133
|
"semver": "^7.6.2",
|
|
152
134
|
"serve": "^13.0.2",
|
|
135
|
+
"start-server-and-test": "1.14.0",
|
|
153
136
|
"storybook": "7.6.18",
|
|
154
137
|
"string-replace-loader": "3.1.0",
|
|
155
138
|
"style-loader": "^4.0.0",
|
|
@@ -162,8 +145,8 @@
|
|
|
162
145
|
"webpack": "^5.91.0"
|
|
163
146
|
},
|
|
164
147
|
"peerDependencies": {
|
|
165
|
-
"react": ">=16.9",
|
|
166
|
-
"react-dom": ">=16.9"
|
|
148
|
+
"react": ">=16.9 <19",
|
|
149
|
+
"react-dom": ">=16.9 <19"
|
|
167
150
|
},
|
|
168
151
|
"publishConfig": {
|
|
169
152
|
"tag": "unstable"
|
package/test-setup.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/vitest';
|
|
@@ -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
|
-
```
|