@homecode/ui 4.18.16 → 4.18.17
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/dist/esm/index.js +83 -2
- package/dist/esm/node_modules/style-inject/dist/style-inject.es.js +28 -2
- package/dist/esm/src/components/AssistiveText/AssistiveText.js +10 -2
- package/dist/esm/src/components/AssistiveText/AssistiveText.styl.js +7 -2
- package/dist/esm/src/components/Button/Button.helpers.js +12 -2
- package/dist/esm/src/components/Button/Button.js +38 -2
- package/dist/esm/src/components/Button/Button.styl.js +7 -2
- package/dist/esm/src/components/ButtonGroup/ButtonGroup.js +10 -2
- package/dist/esm/src/components/ButtonGroup/ButtonGroup.styl.js +7 -2
- package/dist/esm/src/components/Calendar/Calendar.helpers.js +65 -2
- package/dist/esm/src/components/Calendar/Calendar.js +66 -2
- package/dist/esm/src/components/Calendar/Calendar.styl.js +7 -2
- package/dist/esm/src/components/Checkbox/Checkbox.js +48 -2
- package/dist/esm/src/components/Checkbox/Checkbox.styl.js +7 -2
- package/dist/esm/src/components/Container/Container.js +12 -2
- package/dist/esm/src/components/Container/Container.styl.js +7 -2
- package/dist/esm/src/components/DatePicker/DatePicker.helpers.js +31 -2
- package/dist/esm/src/components/DatePicker/DatePicker.js +47 -2
- package/dist/esm/src/components/DatePicker/DatePicker.styl.js +7 -2
- package/dist/esm/src/components/DatePickerInput/DatePickerInput.js +20 -2
- package/dist/esm/src/components/DatePickerInput/DatePickerInput.styl.js +7 -2
- package/dist/esm/src/components/DateTime/DateTime.js +17 -2
- package/dist/esm/src/components/Draggable/Draggable.js +136 -2
- package/dist/esm/src/components/Draggable/Draggable.styl.js +7 -2
- package/dist/esm/src/components/Expand/Expand.js +24 -2
- package/dist/esm/src/components/Expand/Expand.styl.js +7 -2
- package/dist/esm/src/components/Form/Form.helpers.js +42 -2
- package/dist/esm/src/components/Form/Form.js +286 -2
- package/dist/esm/src/components/Form/Form.styl.js +7 -2
- package/dist/esm/src/components/Form/Form.types.js +0 -1
- package/dist/esm/src/components/Form/SubmitButtons/SubmitButtons.js +8 -2
- package/dist/esm/src/components/Form/SubmitButtons/SubmitButtons.styl.js +7 -2
- package/dist/esm/src/components/Form/Validator.js +24 -6
- package/dist/esm/src/components/Gallery/Dots/Dots.js +9 -2
- package/dist/esm/src/components/Gallery/Dots/Dots.styl.js +7 -2
- package/dist/esm/src/components/Gallery/Gallery.js +180 -2
- package/dist/esm/src/components/Gallery/Gallery.styl.js +7 -2
- package/dist/esm/src/components/Heading/Heading.js +37 -2
- package/dist/esm/src/components/Heading/Heading.styl.js +7 -2
- package/dist/esm/src/components/Icon/Icon.js +27 -2
- package/dist/esm/src/components/Icon/Icon.styl.js +7 -2
- package/dist/esm/src/components/Icon/icons/avatar.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/brokenImage.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/check.svg.js +19 -2
- package/dist/esm/src/components/Icon/icons/chevronDown.svg.js +20 -2
- package/dist/esm/src/components/Icon/icons/chevronLeft.svg.js +20 -2
- package/dist/esm/src/components/Icon/icons/chevronRight.svg.js +20 -2
- package/dist/esm/src/components/Icon/icons/chevronUp.svg.js +20 -2
- package/dist/esm/src/components/Icon/icons/close.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/colors.svg.js +60 -2
- package/dist/esm/src/components/Icon/icons/copy.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/delete.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/draft.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/edit.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/email.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/externalLink.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/eye.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/fullscreen.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/fullscreenExit.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/function.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/gear.svg.js +21 -2
- package/dist/esm/src/components/Icon/icons/group.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/history.svg.js +17 -2
- package/dist/esm/src/components/Icon/icons/home.svg.js +19 -2
- package/dist/esm/src/components/Icon/icons/index.js +46 -2
- package/dist/esm/src/components/Icon/icons/instagram.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/link.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/loader.svg.js +45 -2
- package/dist/esm/src/components/Icon/icons/menu.svg.js +18 -2
- package/dist/esm/src/components/Icon/icons/mic.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/minus.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/moreHorizontal.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/moreVertical.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/output.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/plus.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/redo.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/requiredStar.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/save.svg.js +17 -2
- package/dist/esm/src/components/Icon/icons/send.svg.js +16 -2
- package/dist/esm/src/components/Icon/icons/settings.svg.js +52 -2
- package/dist/esm/src/components/Icon/icons/shoppingBag.svg.js +17 -2
- package/dist/esm/src/components/Icon/icons/table.svg.js +15 -2
- package/dist/esm/src/components/Icon/icons/telegram.svg.js +19 -2
- package/dist/esm/src/components/Icon/icons/undo.svg.js +15 -2
- package/dist/esm/src/components/Input/Input.js +343 -2
- package/dist/esm/src/components/Input/Input.styl.js +7 -2
- package/dist/esm/src/components/InputFile/InputFile.js +295 -2
- package/dist/esm/src/components/InputFile/InputFile.styl.js +7 -2
- package/dist/esm/src/components/InputFile/InputFile.types.js +0 -1
- package/dist/esm/src/components/InputFile/Item/Item.js +18 -2
- package/dist/esm/src/components/InputFile/Item/Item.styl.js +7 -2
- package/dist/esm/src/components/Label/Label.constants.json.js +8 -2
- package/dist/esm/src/components/Label/Label.helpers.js +35 -2
- package/dist/esm/src/components/Label/Label.js +58 -2
- package/dist/esm/src/components/Label/Label.styl.js +7 -2
- package/dist/esm/src/components/Lazy/Lazy.js +65 -2
- package/dist/esm/src/components/LightBox/LightBox.js +28 -2
- package/dist/esm/src/components/LightBox/LightBox.styl.js +7 -2
- package/dist/esm/src/components/Notifications/Notifications.constants.json.js +6 -2
- package/dist/esm/src/components/Notifications/Notifications.js +67 -2
- package/dist/esm/src/components/Notifications/Notifications.styl.js +7 -2
- package/dist/esm/src/components/Notifications/store.js +62 -2
- package/dist/esm/src/components/Paranja/Paranja.js +14 -2
- package/dist/esm/src/components/Paranja/Paranja.styl.js +7 -2
- package/dist/esm/src/components/Popup/Popup.helpers.js +31 -2
- package/dist/esm/src/components/Popup/Popup.js +397 -2
- package/dist/esm/src/components/Popup/Popup.styl.js +7 -2
- package/dist/esm/src/components/PopupMenu/PopupMenu.js +15 -2
- package/dist/esm/src/components/PopupMenu/PopupMenu.styl.js +7 -2
- package/dist/esm/src/components/Portal/Portal.js +19 -2
- package/dist/esm/src/components/RequiredStar/RequiredStar.js +12 -2
- package/dist/esm/src/components/RequiredStar/RequiredStar.styl.js +7 -2
- package/dist/esm/src/components/Router/Link/Link.js +61 -2
- package/dist/esm/src/components/Router/Link/Link.styl.js +7 -2
- package/dist/esm/src/components/Router/Redirect.js +12 -2
- package/dist/esm/src/components/Router/Route.js +4 -2
- package/dist/esm/src/components/Router/Router.helpers.js +33 -2
- package/dist/esm/src/components/Router/Router.js +68 -2
- package/dist/esm/src/components/Router/context.js +5 -2
- package/dist/esm/src/components/Router/store.js +55 -2
- package/dist/esm/src/components/Scroll/Scroll.js +274 -2
- package/dist/esm/src/components/Scroll/Scroll.styl.js +7 -2
- package/dist/esm/src/components/Select/Select.helpers.js +37 -2
- package/dist/esm/src/components/Select/Select.js +585 -2
- package/dist/esm/src/components/Select/Select.styl.js +7 -2
- package/dist/esm/src/components/Spinner/Spinner.js +11 -2
- package/dist/esm/src/components/Spinner/Spinner.styl.js +7 -2
- package/dist/esm/src/components/Spinner/spinner.svg.js +24 -2
- package/dist/esm/src/components/Table/Table.js +24 -2
- package/dist/esm/src/components/Table/Table.styl.js +7 -2
- package/dist/esm/src/components/Tabs/Tabs.js +43 -2
- package/dist/esm/src/components/Tabs/Tabs.styl.js +7 -2
- package/dist/esm/src/components/Text/Text.js +44 -2
- package/dist/esm/src/components/Text/Text.styl.js +7 -2
- package/dist/esm/src/components/Theme/Theme.defaults.js +50 -2
- package/dist/esm/src/components/Theme/Theme.helpers.js +67 -2
- package/dist/esm/src/components/Theme/Theme.js +13 -2
- package/dist/esm/src/components/VH/VH.js +33 -2
- package/dist/esm/src/components/Virtualized/List/List.js +124 -2
- package/dist/esm/src/components/Virtualized/List/List.styl.js +7 -2
- package/dist/esm/src/components/Virtualized/List/ListScroll.js +21 -2
- package/dist/esm/src/components/Virtualized/List/ListScroll.styl.js +7 -2
- package/dist/esm/src/components/Virtualized/Virtualized.helpers.js +14 -2
- package/dist/esm/src/components/Virtualized/Virtualized.js +200 -2
- package/dist/esm/src/components/Virtualized/Virtualized.styl.js +7 -2
- package/dist/esm/src/components/Virtualized/Virtualized.types.js +0 -1
- package/dist/esm/src/services/i18n.js +68 -2
- package/dist/esm/src/tools/array.js +60 -2
- package/dist/esm/src/tools/config.js +9 -2
- package/dist/esm/src/tools/date.js +11 -2
- package/dist/esm/src/tools/debounce.js +11 -2
- package/dist/esm/src/tools/dom.js +46 -2
- package/dist/esm/src/tools/env.js +3 -2
- package/dist/esm/src/tools/file.js +11 -2
- package/dist/esm/src/tools/localStorage.js +31 -2
- package/dist/esm/src/tools/number.js +27 -2
- package/dist/esm/src/tools/object.js +5 -2
- package/dist/esm/src/tools/queryParams.js +20 -2
- package/dist/esm/src/tools/rangeMap.js +3 -2
- package/dist/esm/src/tools/resizeObserver.js +68 -2
- package/dist/esm/src/tools/scroll.js +41 -2
- package/dist/esm/src/tools/string.js +7 -2
- package/dist/esm/src/tools/throttle.js +30 -2
- package/dist/esm/src/tools/uid.js +7 -2
- package/dist/esm/types/src/components/Icon/Icon.d.ts +3 -9
- package/dist/esm/types/src/components/Icon/Icon.example.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
- package/dist/esm/src/components/AssistiveText/AssistiveText.js.map +0 -1
- package/dist/esm/src/components/AssistiveText/AssistiveText.styl.js.map +0 -1
- package/dist/esm/src/components/Button/Button.helpers.js.map +0 -1
- package/dist/esm/src/components/Button/Button.js.map +0 -1
- package/dist/esm/src/components/Button/Button.styl.js.map +0 -1
- package/dist/esm/src/components/ButtonGroup/ButtonGroup.js.map +0 -1
- package/dist/esm/src/components/ButtonGroup/ButtonGroup.styl.js.map +0 -1
- package/dist/esm/src/components/Calendar/Calendar.helpers.js.map +0 -1
- package/dist/esm/src/components/Calendar/Calendar.js.map +0 -1
- package/dist/esm/src/components/Calendar/Calendar.styl.js.map +0 -1
- package/dist/esm/src/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/esm/src/components/Checkbox/Checkbox.styl.js.map +0 -1
- package/dist/esm/src/components/Container/Container.js.map +0 -1
- package/dist/esm/src/components/Container/Container.styl.js.map +0 -1
- package/dist/esm/src/components/DatePicker/DatePicker.helpers.js.map +0 -1
- package/dist/esm/src/components/DatePicker/DatePicker.js.map +0 -1
- package/dist/esm/src/components/DatePicker/DatePicker.styl.js.map +0 -1
- package/dist/esm/src/components/DatePickerInput/DatePickerInput.js.map +0 -1
- package/dist/esm/src/components/DatePickerInput/DatePickerInput.styl.js.map +0 -1
- package/dist/esm/src/components/DateTime/DateTime.js.map +0 -1
- package/dist/esm/src/components/Draggable/Draggable.js.map +0 -1
- package/dist/esm/src/components/Draggable/Draggable.styl.js.map +0 -1
- package/dist/esm/src/components/Expand/Expand.js.map +0 -1
- package/dist/esm/src/components/Expand/Expand.styl.js.map +0 -1
- package/dist/esm/src/components/Form/Form.helpers.js.map +0 -1
- package/dist/esm/src/components/Form/Form.js.map +0 -1
- package/dist/esm/src/components/Form/Form.styl.js.map +0 -1
- package/dist/esm/src/components/Form/Form.types.js.map +0 -1
- package/dist/esm/src/components/Form/SubmitButtons/SubmitButtons.js.map +0 -1
- package/dist/esm/src/components/Form/SubmitButtons/SubmitButtons.styl.js.map +0 -1
- package/dist/esm/src/components/Form/Validator.js.map +0 -1
- package/dist/esm/src/components/Gallery/Dots/Dots.js.map +0 -1
- package/dist/esm/src/components/Gallery/Dots/Dots.styl.js.map +0 -1
- package/dist/esm/src/components/Gallery/Gallery.js.map +0 -1
- package/dist/esm/src/components/Gallery/Gallery.styl.js.map +0 -1
- package/dist/esm/src/components/Heading/Heading.js.map +0 -1
- package/dist/esm/src/components/Heading/Heading.styl.js.map +0 -1
- package/dist/esm/src/components/Icon/Icon.js.map +0 -1
- package/dist/esm/src/components/Icon/Icon.styl.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/avatar.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/brokenImage.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/check.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/chevronDown.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/chevronLeft.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/chevronRight.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/chevronUp.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/close.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/colors.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/copy.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/delete.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/draft.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/edit.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/email.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/externalLink.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/eye.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/fullscreen.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/fullscreenExit.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/function.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/gear.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/group.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/history.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/home.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/index.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/instagram.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/link.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/loader.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/menu.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/mic.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/minus.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/moreHorizontal.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/moreVertical.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/output.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/plus.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/redo.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/requiredStar.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/save.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/send.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/settings.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/shoppingBag.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/table.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/telegram.svg.js.map +0 -1
- package/dist/esm/src/components/Icon/icons/undo.svg.js.map +0 -1
- package/dist/esm/src/components/Input/Input.js.map +0 -1
- package/dist/esm/src/components/Input/Input.styl.js.map +0 -1
- package/dist/esm/src/components/InputFile/InputFile.js.map +0 -1
- package/dist/esm/src/components/InputFile/InputFile.styl.js.map +0 -1
- package/dist/esm/src/components/InputFile/InputFile.types.js.map +0 -1
- package/dist/esm/src/components/InputFile/Item/Item.js.map +0 -1
- package/dist/esm/src/components/InputFile/Item/Item.styl.js.map +0 -1
- package/dist/esm/src/components/Label/Label.constants.json.js.map +0 -1
- package/dist/esm/src/components/Label/Label.helpers.js.map +0 -1
- package/dist/esm/src/components/Label/Label.js.map +0 -1
- package/dist/esm/src/components/Label/Label.styl.js.map +0 -1
- package/dist/esm/src/components/Lazy/Lazy.js.map +0 -1
- package/dist/esm/src/components/LightBox/LightBox.js.map +0 -1
- package/dist/esm/src/components/LightBox/LightBox.styl.js.map +0 -1
- package/dist/esm/src/components/Notifications/Notifications.constants.json.js.map +0 -1
- package/dist/esm/src/components/Notifications/Notifications.js.map +0 -1
- package/dist/esm/src/components/Notifications/Notifications.styl.js.map +0 -1
- package/dist/esm/src/components/Notifications/store.js.map +0 -1
- package/dist/esm/src/components/Paranja/Paranja.js.map +0 -1
- package/dist/esm/src/components/Paranja/Paranja.styl.js.map +0 -1
- package/dist/esm/src/components/Popup/Popup.helpers.js.map +0 -1
- package/dist/esm/src/components/Popup/Popup.js.map +0 -1
- package/dist/esm/src/components/Popup/Popup.styl.js.map +0 -1
- package/dist/esm/src/components/PopupMenu/PopupMenu.js.map +0 -1
- package/dist/esm/src/components/PopupMenu/PopupMenu.styl.js.map +0 -1
- package/dist/esm/src/components/Portal/Portal.js.map +0 -1
- package/dist/esm/src/components/RequiredStar/RequiredStar.js.map +0 -1
- package/dist/esm/src/components/RequiredStar/RequiredStar.styl.js.map +0 -1
- package/dist/esm/src/components/Router/Link/Link.js.map +0 -1
- package/dist/esm/src/components/Router/Link/Link.styl.js.map +0 -1
- package/dist/esm/src/components/Router/Redirect.js.map +0 -1
- package/dist/esm/src/components/Router/Route.js.map +0 -1
- package/dist/esm/src/components/Router/Router.helpers.js.map +0 -1
- package/dist/esm/src/components/Router/Router.js.map +0 -1
- package/dist/esm/src/components/Router/context.js.map +0 -1
- package/dist/esm/src/components/Router/store.js.map +0 -1
- package/dist/esm/src/components/Scroll/Scroll.js.map +0 -1
- package/dist/esm/src/components/Scroll/Scroll.styl.js.map +0 -1
- package/dist/esm/src/components/Select/Select.helpers.js.map +0 -1
- package/dist/esm/src/components/Select/Select.js.map +0 -1
- package/dist/esm/src/components/Select/Select.styl.js.map +0 -1
- package/dist/esm/src/components/Spinner/Spinner.js.map +0 -1
- package/dist/esm/src/components/Spinner/Spinner.styl.js.map +0 -1
- package/dist/esm/src/components/Spinner/spinner.svg.js.map +0 -1
- package/dist/esm/src/components/Table/Table.js.map +0 -1
- package/dist/esm/src/components/Table/Table.styl.js.map +0 -1
- package/dist/esm/src/components/Tabs/Tabs.js.map +0 -1
- package/dist/esm/src/components/Tabs/Tabs.styl.js.map +0 -1
- package/dist/esm/src/components/Text/Text.js.map +0 -1
- package/dist/esm/src/components/Text/Text.styl.js.map +0 -1
- package/dist/esm/src/components/Theme/Theme.defaults.js.map +0 -1
- package/dist/esm/src/components/Theme/Theme.helpers.js.map +0 -1
- package/dist/esm/src/components/Theme/Theme.js.map +0 -1
- package/dist/esm/src/components/VH/VH.js.map +0 -1
- package/dist/esm/src/components/Virtualized/List/List.js.map +0 -1
- package/dist/esm/src/components/Virtualized/List/List.styl.js.map +0 -1
- package/dist/esm/src/components/Virtualized/List/ListScroll.js.map +0 -1
- package/dist/esm/src/components/Virtualized/List/ListScroll.styl.js.map +0 -1
- package/dist/esm/src/components/Virtualized/Virtualized.helpers.js.map +0 -1
- package/dist/esm/src/components/Virtualized/Virtualized.js.map +0 -1
- package/dist/esm/src/components/Virtualized/Virtualized.styl.js.map +0 -1
- package/dist/esm/src/components/Virtualized/Virtualized.types.js.map +0 -1
- package/dist/esm/src/services/i18n.js.map +0 -1
- package/dist/esm/src/tools/array.js.map +0 -1
- package/dist/esm/src/tools/config.js.map +0 -1
- package/dist/esm/src/tools/date.js.map +0 -1
- package/dist/esm/src/tools/debounce.js.map +0 -1
- package/dist/esm/src/tools/dom.js.map +0 -1
- package/dist/esm/src/tools/env.js.map +0 -1
- package/dist/esm/src/tools/file.js.map +0 -1
- package/dist/esm/src/tools/localStorage.js.map +0 -1
- package/dist/esm/src/tools/number.js.map +0 -1
- package/dist/esm/src/tools/object.js.map +0 -1
- package/dist/esm/src/tools/queryParams.js.map +0 -1
- package/dist/esm/src/tools/rangeMap.js.map +0 -1
- package/dist/esm/src/tools/resizeObserver.js.map +0 -1
- package/dist/esm/src/tools/scroll.js.map +0 -1
- package/dist/esm/src/tools/string.js.map +0 -1
- package/dist/esm/src/tools/throttle.js.map +0 -1
- package/dist/esm/src/tools/uid.js.map +0 -1
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
import*as React from
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
var _circle;
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
var SvgSpinner = function SvgSpinner(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
width: 50,
|
|
8
|
+
height: 50,
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
viewBox: "0 0 100 100",
|
|
11
|
+
preserveAspectRatio: "xMidYMid"
|
|
12
|
+
}, props), _circle || (_circle = /*#__PURE__*/React.createElement("circle", {
|
|
13
|
+
cx: 50,
|
|
14
|
+
cy: 50,
|
|
15
|
+
fill: "none",
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
strokeWidth: 8,
|
|
18
|
+
r: 45,
|
|
19
|
+
strokeDasharray: "212.05750411731105 72.68583470577035",
|
|
20
|
+
transform: "rotate(270 50 50)"
|
|
21
|
+
})));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { SvgSpinner as default };
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
import{jsx,jsxs}from
|
|
2
|
-
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import { Paranja } from '../Paranja/Paranja.js';
|
|
5
|
+
import { Scroll } from '../Scroll/Scroll.js';
|
|
6
|
+
import { Spinner } from '../Spinner/Spinner.js';
|
|
7
|
+
import S from './Table.styl.js';
|
|
8
|
+
|
|
9
|
+
class Table extends Component {
|
|
10
|
+
renderHeaderColumn = ({ id, label, sticky }) => (jsx("th", { className: cn(sticky && S.sticky), children: label }, id));
|
|
11
|
+
renderRow = data => {
|
|
12
|
+
const { columns } = this.props;
|
|
13
|
+
return (jsx("tr", { children: columns.map(param => this.renderDataCol(param, data)) }, data.id));
|
|
14
|
+
};
|
|
15
|
+
renderDataCol({ id, dataField, render, sticky }, data) {
|
|
16
|
+
return (jsx("td", { className: cn(sticky && S.sticky), children: render ? render(data) : data[dataField || id] }, id));
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
const { className, columns, isLoading = false, loadingText, blur, data, } = this.props;
|
|
20
|
+
return (jsxs("div", { className: cn(S.root, blur && S.blur, className), children: [jsx(Scroll, { x: true, y: true, offset: { x: { before: 10, after: 10 } }, children: jsxs("table", { children: [jsx("thead", { children: jsx("tr", { children: columns.map(this.renderHeaderColumn) }) }), jsx("tbody", { children: data.map(this.renderRow) })] }) }), jsx(Paranja, { inline: true, visible: isLoading, blur: blur, children: isLoading && (loadingText ?? jsx(Spinner, {})) })] }));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { Table };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import styleInject from
|
|
2
|
-
|
|
1
|
+
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".Table_root__PxLR-{border-radius:var(--border-radius-l);box-shadow:0 0 0 2px var(--accent-color-alpha-100);overflow:hidden;position:relative}.Table_root__PxLR- table{min-width:100%}.Table_root__PxLR- tbody{overflow-scrolling:touch;overflow:auto}.Table_root__PxLR- thead{position:sticky;top:0;z-index:1}.Table_root__PxLR- td{box-shadow:inset 0 1px 0 0 var(--accent-color-alpha-100)}.Table_root__PxLR- td,.Table_root__PxLR- th{min-width:5em;padding:var(--indent-s);text-align:left}.Table_root__PxLR- th{background-color:var(--accent-color-alpha-100);padding-bottom:16px}.Table_root__PxLR- td{vertical-align:top}.Table_root__PxLR- tr:last-child td{padding-bottom:var(--indent-l)}.Table_sticky__99lks{background-color:var(--decent-color);left:0;position:sticky;z-index:1}th.Table_sticky__99lks{background-color:var(--accent-color);color:var(--decent-color)}.Table_blur__UwMAo .Table_sticky__99lks{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background-color:var(--decent-color-alpha-500)}.Table_blur__UwMAo th.Table_sticky__99lks{background-color:var(--accent-color-alpha-500);color:var(--decent-color-alpha-800)}";
|
|
4
|
+
var S = {"root":"Table_root__PxLR-","sticky":"Table_sticky__99lks","blur":"Table_blur__UwMAo"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -1,2 +1,43 @@
|
|
|
1
|
-
import{useState,useRef,useCallback,createElement
|
|
2
|
-
|
|
1
|
+
import { useState, useRef, useCallback, createElement } from 'react';
|
|
2
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import { Button } from '../Button/Button.js';
|
|
5
|
+
import { ButtonGroup } from '../ButtonGroup/ButtonGroup.js';
|
|
6
|
+
import S from './Tabs.styl.js';
|
|
7
|
+
|
|
8
|
+
function isId(id) {
|
|
9
|
+
return ['string', 'number'].includes(typeof id);
|
|
10
|
+
}
|
|
11
|
+
function Tabs(props) {
|
|
12
|
+
const { size = 'm', contentClassName, items, onChange, renderAll, activeId: initialId, children, ...rest } = props;
|
|
13
|
+
const [activeId, setActiveId] = useState(isId(initialId) ? initialId : items[0].id);
|
|
14
|
+
const tabsContent = useRef([]);
|
|
15
|
+
const onTabClick = useCallback((e, { id, onClick } = {}) => {
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
if (onClick && !onClick(e)) {
|
|
18
|
+
e.peventDefault();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
setActiveId(id);
|
|
22
|
+
onChange?.(id);
|
|
23
|
+
}, []);
|
|
24
|
+
tabsContent.current = [];
|
|
25
|
+
const tabs = items.map((params) => {
|
|
26
|
+
const { id, label, forceRender, content, contentClassName: currContentClassName, ...rest } = params;
|
|
27
|
+
const isActive = activeId === id;
|
|
28
|
+
const tabContent = typeof content === 'function' ? content() : content;
|
|
29
|
+
if (renderAll || forceRender || isActive) {
|
|
30
|
+
tabsContent.current.push(jsx("div", { className: cn(contentClassName, currContentClassName, !isActive && S.inactive), children: tabContent }, id));
|
|
31
|
+
}
|
|
32
|
+
return (createElement(Button, { ...rest, size: size, key: id, onClick: e => onTabClick(e, params), checked: isActive }, label));
|
|
33
|
+
});
|
|
34
|
+
if (typeof children === 'function') {
|
|
35
|
+
return children({
|
|
36
|
+
tabs: jsx(ButtonGroup, { ...rest, children: tabs }),
|
|
37
|
+
content: tabsContent.current,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return jsx(Fragment, { children: tabsContent.current });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { Tabs };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import styleInject from
|
|
2
|
-
|
|
1
|
+
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "div .Tabs_inactive__H0mPh{display:none}";
|
|
4
|
+
var S = {"inactive":"Tabs_inactive__H0mPh"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -1,2 +1,44 @@
|
|
|
1
|
-
import{jsx,jsxs,Fragment}from
|
|
2
|
-
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { Link } from '../Router/Link/Link.js';
|
|
5
|
+
import { isBrowser } from '../../tools/env.js';
|
|
6
|
+
import 'nanoid';
|
|
7
|
+
import '../../tools/dom.js';
|
|
8
|
+
import 'timen';
|
|
9
|
+
import 'compareq';
|
|
10
|
+
import 'lodash.pick';
|
|
11
|
+
import '../../tools/queryParams.js';
|
|
12
|
+
import S from './Text.styl.js';
|
|
13
|
+
|
|
14
|
+
const textToAnchorId = text => text.toLowerCase().split(' ').join('_');
|
|
15
|
+
const getPath = () => (isBrowser && location.pathname) ?? '/';
|
|
16
|
+
const scrollIntoHeader = id => document.getElementById(id)?.scrollIntoView();
|
|
17
|
+
function useAnchor(text) {
|
|
18
|
+
if (typeof text !== 'string')
|
|
19
|
+
return [];
|
|
20
|
+
const id = textToAnchorId(text);
|
|
21
|
+
const href = `${getPath()}#${id}`;
|
|
22
|
+
const scrollUp = useCallback(() => scrollIntoHeader(id), [id]);
|
|
23
|
+
return [
|
|
24
|
+
id,
|
|
25
|
+
jsxs(Fragment, { children: ["\u00A0", jsx(Link, { href: href, className: S.anchor, onClick: scrollUp, children: "#" })] }),
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
function H({ As, className, children, anchor, ...rest }) {
|
|
29
|
+
const [id, anchorEl] = useAnchor(anchor ?? children);
|
|
30
|
+
return (jsxs(As, { ...rest, className: cn(S.heading, className), id: id, children: [children, anchorEl] }));
|
|
31
|
+
}
|
|
32
|
+
const H1 = props => jsx(H, { ...props, As: "h1", anchor: false });
|
|
33
|
+
const H2 = props => jsx(H, { ...props, As: "h2" });
|
|
34
|
+
const H3 = props => jsx(H, { ...props, As: "h3" });
|
|
35
|
+
const H4 = props => jsx(H, { ...props, As: "h4" });
|
|
36
|
+
const H5 = props => jsx(H, { ...props, As: "h5" });
|
|
37
|
+
const H6 = props => jsx(H, { ...props, As: "h6" });
|
|
38
|
+
if (isBrowser) {
|
|
39
|
+
window.addEventListener('load', () => {
|
|
40
|
+
scrollIntoHeader(location.hash.slice(1));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { H1, H2, H3, H4, H5, H6 };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import styleInject from
|
|
2
|
-
|
|
1
|
+
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".Text_heading__DR-MG{position:relative}.Text_anchor__hq6W6{align-items:flex-start;border-radius:50%;height:100%;opacity:0;padding:0 .5em;transform:translateX(-1em);transition:.2s ease-out;transition-property:transform,opacity;-webkit-user-select:none;-moz-user-select:none;user-select:none}.Text_anchor__hq6W6:before{background:none!important;height:100%;position:absolute;width:2em}.Text_heading__DR-MG:hover .Text_anchor__hq6W6{opacity:1;transform:translateX(0)}.Text_heading__DR-MG .Text_anchor__hq6W6:hover{color:var(--active-color)}";
|
|
4
|
+
var S = {"heading":"Text_heading__DR-MG","anchor":"Text_anchor__hq6W6"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -1,2 +1,50 @@
|
|
|
1
|
-
import{colorsConfigToVars}from
|
|
2
|
-
|
|
1
|
+
import { colorsConfigToVars } from './Theme.helpers.js';
|
|
2
|
+
|
|
3
|
+
const baseConfig = {
|
|
4
|
+
'indent-s': '10px',
|
|
5
|
+
'indent-m': '20px',
|
|
6
|
+
'indent-l': '30px',
|
|
7
|
+
'border-radius-s': '2px',
|
|
8
|
+
'border-radius-m': '4px',
|
|
9
|
+
'border-radius-l': '6px',
|
|
10
|
+
};
|
|
11
|
+
const colorsAlphaModes = [0, 50, 100, 200, 300, 500, 800, 900];
|
|
12
|
+
const colors = {
|
|
13
|
+
light: '#e6e6e6',
|
|
14
|
+
dark: '#1a1a1a',
|
|
15
|
+
};
|
|
16
|
+
function getColors({ accent = colors.light, decent = colors.dark, active = '#54b62b', warning = '#ffa31a', danger = '#da3749', disabled = '#f1f1f2', link = '#3089fe', } = {}) {
|
|
17
|
+
return {
|
|
18
|
+
active: {
|
|
19
|
+
color: active,
|
|
20
|
+
mods: { alpha: [100, 300, 500, 800] /* mix: [['accent', 300]] */ },
|
|
21
|
+
},
|
|
22
|
+
warning: {
|
|
23
|
+
color: warning,
|
|
24
|
+
mods: { alpha: [100, 300, 500] },
|
|
25
|
+
},
|
|
26
|
+
danger: {
|
|
27
|
+
color: danger,
|
|
28
|
+
mods: { alpha: [100, 300, 500] },
|
|
29
|
+
},
|
|
30
|
+
disabled,
|
|
31
|
+
link,
|
|
32
|
+
accent: {
|
|
33
|
+
color: accent,
|
|
34
|
+
mods: { alpha: colorsAlphaModes },
|
|
35
|
+
},
|
|
36
|
+
decent: {
|
|
37
|
+
color: decent,
|
|
38
|
+
mods: { alpha: colorsAlphaModes },
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const getConfig = (cfg = {}) => ({
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
...colorsConfigToVars(getColors(cfg.colors)),
|
|
45
|
+
...baseConfig,
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
...cfg.rest,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export { baseConfig, colors, getColors, getConfig };
|
|
@@ -1,2 +1,67 @@
|
|
|
1
|
-
function hexToRGB(
|
|
2
|
-
|
|
1
|
+
function hexToRGB(str) {
|
|
2
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
3
|
+
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
4
|
+
const hex = str.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b);
|
|
5
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
6
|
+
if (!result)
|
|
7
|
+
return null;
|
|
8
|
+
return [
|
|
9
|
+
parseInt(result[1], 16),
|
|
10
|
+
parseInt(result[2], 16),
|
|
11
|
+
parseInt(result[3], 16),
|
|
12
|
+
].join(',');
|
|
13
|
+
}
|
|
14
|
+
const mix = (c1, c2, val) => Math.floor(c1 * (1 - val) + c2 * val);
|
|
15
|
+
function mixColor(color1, color2, val = 1) {
|
|
16
|
+
const c1 = (/^#/.test(color1) ? hexToRGB(color1) : color1)
|
|
17
|
+
.split(',')
|
|
18
|
+
.map(n => parseInt(n, 10));
|
|
19
|
+
const c2 = (/^#/.test(color2) ? hexToRGB(color2) : color2)
|
|
20
|
+
.split(',')
|
|
21
|
+
.map(n => parseInt(n, 10));
|
|
22
|
+
const rgb = [
|
|
23
|
+
mix(c1[0], c2[0], val),
|
|
24
|
+
mix(c1[1], c2[1], val),
|
|
25
|
+
mix(c1[2], c2[2], val),
|
|
26
|
+
].join(',');
|
|
27
|
+
return `rgb(${rgb})`;
|
|
28
|
+
}
|
|
29
|
+
function rgba(color, transparency) {
|
|
30
|
+
return `rgba(${getRGB(color)},${transparency})`;
|
|
31
|
+
}
|
|
32
|
+
function getRGB(color) {
|
|
33
|
+
if (/^rgb/.test(color))
|
|
34
|
+
return color.replace(/^rgb?\(|\)$/g, '');
|
|
35
|
+
return hexToRGB(color);
|
|
36
|
+
}
|
|
37
|
+
const getConfigColor = val => val?.color || val;
|
|
38
|
+
const colorMods = {
|
|
39
|
+
alpha: (color, val) => [rgba(color, val / 1000), `alpha-${val}`],
|
|
40
|
+
mix: (color1, [color2, val], config) => [
|
|
41
|
+
mixColor(color1, getConfigColor(config[color2]), val / 1000),
|
|
42
|
+
`mix-${color2}-${val}`,
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
function colorsConfigToVars(config) {
|
|
46
|
+
return Object.entries(config).reduce((acc, [name, val]) => {
|
|
47
|
+
const colorName = `${name}-color`;
|
|
48
|
+
if (typeof val === 'string') {
|
|
49
|
+
acc[colorName] = val;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const { color, mods } = val;
|
|
53
|
+
acc[colorName] = color;
|
|
54
|
+
if (typeof mods === 'object' && mods !== null) {
|
|
55
|
+
Object.entries(mods || {}).forEach(([mod, vals]) => {
|
|
56
|
+
vals.forEach(val => {
|
|
57
|
+
const [res, prefix] = colorMods[mod](color, val, config);
|
|
58
|
+
acc[`${colorName}-${prefix}`] = res;
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return acc;
|
|
64
|
+
}, {});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { colorsConfigToVars, getRGB, mixColor, rgba };
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import{jsx}from
|
|
2
|
-
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
function buildVar(name, val) {
|
|
4
|
+
return `--${name}: ${val};`;
|
|
5
|
+
}
|
|
6
|
+
function Theme({ config = {} }) {
|
|
7
|
+
const vars = Object.entries(config)
|
|
8
|
+
.map(([name, val]) => buildVar(name, val))
|
|
9
|
+
.join('\n');
|
|
10
|
+
return jsx("style", { children: `:root {${vars}}` });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { Theme };
|
|
@@ -1,2 +1,33 @@
|
|
|
1
|
-
import{jsx}from
|
|
2
|
-
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { isBrowser } from '../../tools/env.js';
|
|
4
|
+
import 'nanoid';
|
|
5
|
+
import '../../tools/dom.js';
|
|
6
|
+
import 'timen';
|
|
7
|
+
import 'compareq';
|
|
8
|
+
import 'lodash.pick';
|
|
9
|
+
import '../../tools/queryParams.js';
|
|
10
|
+
|
|
11
|
+
const getVH = () => (isBrowser ? window.innerHeight / 100 : 0);
|
|
12
|
+
class VH extends Component {
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(props);
|
|
15
|
+
this.state = { vh: 0 };
|
|
16
|
+
}
|
|
17
|
+
componentDidMount() {
|
|
18
|
+
this.updateVH();
|
|
19
|
+
window.addEventListener('resize', this.updateVH);
|
|
20
|
+
}
|
|
21
|
+
componentWillUnmount() {
|
|
22
|
+
window.removeEventListener('resize', this.updateVH);
|
|
23
|
+
}
|
|
24
|
+
updateVH = () => {
|
|
25
|
+
this.setState({ vh: getVH() });
|
|
26
|
+
};
|
|
27
|
+
render() {
|
|
28
|
+
const { vh } = this.state;
|
|
29
|
+
return jsx("style", { children: `:root{--vh: ${vh}px;}` });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { VH };
|
|
@@ -1,2 +1,124 @@
|
|
|
1
|
-
import{jsxs,Fragment,jsx
|
|
2
|
-
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Component, createRef } from 'react';
|
|
3
|
+
import omit from 'lodash.omit';
|
|
4
|
+
import { createStore } from 'justorm/react';
|
|
5
|
+
import Time from 'timen';
|
|
6
|
+
import * as number from '../../../tools/number.js';
|
|
7
|
+
import 'nanoid';
|
|
8
|
+
import '../../../tools/dom.js';
|
|
9
|
+
import 'compareq';
|
|
10
|
+
import 'lodash.pick';
|
|
11
|
+
import '../../../tools/queryParams.js';
|
|
12
|
+
import Virtualized from '../Virtualized.js';
|
|
13
|
+
import S from './List.styl.js';
|
|
14
|
+
|
|
15
|
+
const { zero } = number;
|
|
16
|
+
const CONTENT_BEFORE_SIZE_CHECK_TIMEOUT = 300;
|
|
17
|
+
class List extends Component {
|
|
18
|
+
store;
|
|
19
|
+
wrapElem;
|
|
20
|
+
contentBeforeElem;
|
|
21
|
+
contentAfterElem;
|
|
22
|
+
timers = Time.create();
|
|
23
|
+
unsubscribeContentBeforeResize;
|
|
24
|
+
constructor(props) {
|
|
25
|
+
super(props);
|
|
26
|
+
this.store = createStore(this, {
|
|
27
|
+
mounted: false,
|
|
28
|
+
contentBeforeHeight: 0,
|
|
29
|
+
hasWrap: false,
|
|
30
|
+
});
|
|
31
|
+
// this.wrapElem = createRef<HTMLDivElement>();
|
|
32
|
+
this.contentBeforeElem = createRef();
|
|
33
|
+
this.contentAfterElem = createRef();
|
|
34
|
+
}
|
|
35
|
+
componentDidMount() {
|
|
36
|
+
// update, to pass actual wrapElem to Virtualized props
|
|
37
|
+
// this.store.mounted = true;
|
|
38
|
+
if (this.props.contentBefore) {
|
|
39
|
+
this.subscribeContentBeforeResize();
|
|
40
|
+
this.checkContentBeforeHeight();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
componentDidUpdate(prevProps) {
|
|
44
|
+
const { contentBefore } = this.props;
|
|
45
|
+
if (!prevProps.contentBefore && contentBefore)
|
|
46
|
+
this.subscribeContentBeforeResize();
|
|
47
|
+
if (prevProps.contentBefore && !contentBefore)
|
|
48
|
+
this.unsubscribeContentBeforeResize?.();
|
|
49
|
+
}
|
|
50
|
+
subscribeContentBeforeResize() {
|
|
51
|
+
this.unsubscribeContentBeforeResize = Time.every(CONTENT_BEFORE_SIZE_CHECK_TIMEOUT, this.checkContentBeforeHeight);
|
|
52
|
+
}
|
|
53
|
+
checkContentBeforeHeight = () => {
|
|
54
|
+
const elem = this.contentBeforeElem.current;
|
|
55
|
+
if (!elem)
|
|
56
|
+
return;
|
|
57
|
+
const { offsetHeight } = elem;
|
|
58
|
+
if (offsetHeight !== this.store.contentBeforeHeight)
|
|
59
|
+
this.store.contentBeforeHeight = offsetHeight;
|
|
60
|
+
};
|
|
61
|
+
getProps() {
|
|
62
|
+
const props = omit(this.props, [
|
|
63
|
+
'contentBefore',
|
|
64
|
+
'contentAfter',
|
|
65
|
+
'customWrapElem',
|
|
66
|
+
]);
|
|
67
|
+
const { contentBeforeHeight } = this.store;
|
|
68
|
+
const offsetBefore = zero(contentBeforeHeight) + zero(this.props.offsetBefore);
|
|
69
|
+
const offsetAfter = zero(this.contentAfterElem.current?.offsetHeight) +
|
|
70
|
+
zero(this.props.offsetAfter);
|
|
71
|
+
if (offsetBefore)
|
|
72
|
+
props.offsetBefore = offsetBefore;
|
|
73
|
+
if (offsetAfter)
|
|
74
|
+
props.offsetAfter = offsetAfter;
|
|
75
|
+
return props;
|
|
76
|
+
}
|
|
77
|
+
getItemProps = ({ index, offsetBefore, offsetAfter }) => {
|
|
78
|
+
const { itemHeight } = this.props;
|
|
79
|
+
return {
|
|
80
|
+
className: S.item,
|
|
81
|
+
style: { top: zero(offsetBefore) + index * itemHeight },
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
onWrapRef = (ref) => {
|
|
85
|
+
if (!ref)
|
|
86
|
+
return;
|
|
87
|
+
// @ts-ignore
|
|
88
|
+
this.wrapElem = this.props.customWrapElem?.getRef?.(ref) || ref;
|
|
89
|
+
if (!this.store.hasWrap)
|
|
90
|
+
this.store.hasWrap = true;
|
|
91
|
+
};
|
|
92
|
+
renderLayout = ({ state, items, ...rest }) => {
|
|
93
|
+
const { contentBefore, contentAfter, customWrapElem } = this.props;
|
|
94
|
+
const { height, offsetAfter } = state;
|
|
95
|
+
const { contentBeforeHeight } = this.store;
|
|
96
|
+
const props = omit(rest, [
|
|
97
|
+
'contentBefore',
|
|
98
|
+
'contentAfter',
|
|
99
|
+
'scrollTop',
|
|
100
|
+
'itemHeight',
|
|
101
|
+
'itemsCount',
|
|
102
|
+
'totalCount',
|
|
103
|
+
'overlapCount',
|
|
104
|
+
'onScrollEnd',
|
|
105
|
+
'renderItem',
|
|
106
|
+
'wrapElem',
|
|
107
|
+
'getItemProps',
|
|
108
|
+
'offsetAfter',
|
|
109
|
+
'offsetBefore',
|
|
110
|
+
]);
|
|
111
|
+
const content = (jsxs(Fragment, { children: [contentBefore && (jsx("div", { ref: this.contentBeforeElem, children: contentBefore }, "contentBefore")), jsx("div", { className: S.gap, style: { height: height - contentBeforeHeight } }, "gap"), items, contentAfter && (jsx("div", { className: S.contentAfter, ref: this.contentAfterElem, style: { top: height - zero(offsetAfter) }, children: contentAfter }, "contentAfter"))] }));
|
|
112
|
+
let Elem = 'div';
|
|
113
|
+
if (customWrapElem) {
|
|
114
|
+
Elem = customWrapElem.component;
|
|
115
|
+
Object.assign(props, customWrapElem?.props);
|
|
116
|
+
}
|
|
117
|
+
return (jsx(Elem, { ...props, ref: this.onWrapRef, children: content }));
|
|
118
|
+
};
|
|
119
|
+
render() {
|
|
120
|
+
return (jsx(Virtualized, { ...this.getProps(), wrapElem: this.wrapElem, getItemProps: this.getItemProps, children: this.renderLayout }));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { List as default };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import styleInject from
|
|
2
|
-
|
|
1
|
+
import styleInject from '../../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".List_gap__-52oM{pointer-events:none;width:100%}.List_gap__-52oM,.List_item__-true{position:absolute}.List_contentAfter__H0Ujd{left:0;position:absolute;width:100%}";
|
|
4
|
+
var S = {"gap":"List_gap__-52oM","item":"List_item__-true","contentAfter":"List_contentAfter__H0Ujd"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
import{jsx}from
|
|
2
|
-
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Scroll } from '../../Scroll/Scroll.js';
|
|
4
|
+
import List from './List.js';
|
|
5
|
+
import S from './ListScroll.styl.js';
|
|
6
|
+
|
|
7
|
+
function ListScroll({ scrollProps, ...rest }) {
|
|
8
|
+
const innerClassName = cn(scrollProps.x && S.x, scrollProps.y && S.y);
|
|
9
|
+
const props = {
|
|
10
|
+
...scrollProps,
|
|
11
|
+
innerClassName,
|
|
12
|
+
};
|
|
13
|
+
return (jsx(List, { ...rest, customWrapElem: {
|
|
14
|
+
component: Scroll,
|
|
15
|
+
props,
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
getRef: ref => ref.innerElem,
|
|
18
|
+
} }));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { ListScroll as default };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import styleInject from
|
|
2
|
-
|
|
1
|
+
import styleInject from '../../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = ".ListScroll_x__tSPeG{width:100%}.ListScroll_y__mvFCU{height:100%}";
|
|
4
|
+
var S = {"x":"ListScroll_x__tSPeG","y":"ListScroll_y__mvFCU"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { S as default };
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
function getLastIndex(
|
|
2
|
-
|
|
1
|
+
function getLastIndex(scrollTop, clientHeight, itemHeight, overlapCount, totalCount) {
|
|
2
|
+
return Math.min(totalCount - 1, Math.floor((scrollTop + clientHeight) / itemHeight + overlapCount));
|
|
3
|
+
}
|
|
4
|
+
// Returns indexes of first and last items to be rendered
|
|
5
|
+
function getIndexes({ scrollTop, clientHeight, itemHeight, itemsCount, totalCount, overlapCount, }) {
|
|
6
|
+
const first = Math.max(0, Math.floor(scrollTop / itemHeight - overlapCount));
|
|
7
|
+
const last = Math.min(Math.max(first, itemsCount + overlapCount - 1), getLastIndex(scrollTop, clientHeight, itemHeight, overlapCount, totalCount));
|
|
8
|
+
return { first, last };
|
|
9
|
+
}
|
|
10
|
+
function getHeight({ itemsCount, itemHeight, offsetBefore = 0, offsetAfter = 0, }) {
|
|
11
|
+
return itemsCount * itemHeight + offsetBefore + offsetAfter;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { getHeight, getIndexes, getLastIndex };
|