@sima-land/ui-nucleons 45.0.0-alpha.1 → 45.0.0-alpha.11
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/README.md +103 -0
- package/_internal/custom-scrollbar/custom-scrollbar.d.ts +13 -0
- package/_internal/custom-scrollbar/custom-scrollbar.js +78 -0
- package/_internal/custom-scrollbar/custom-scrollbar.js.map +1 -0
- package/_internal/custom-scrollbar/custom-scrollbar.module.scss +38 -43
- package/_internal/custom-scrollbar/index.d.ts +2 -42
- package/_internal/custom-scrollbar/index.js +4 -51
- package/_internal/custom-scrollbar/index.js.map +1 -0
- package/_internal/custom-scrollbar/types.d.ts +18 -0
- package/{hooks/breakpoint → _internal/custom-scrollbar}/types.js +1 -0
- package/_internal/custom-scrollbar/types.js.map +1 -0
- package/_internal/lifecycle/index.d.ts +11 -0
- package/_internal/lifecycle/index.js +23 -0
- package/_internal/lifecycle/index.js.map +1 -0
- package/_internal/page-scroll-lock/adapters/body-scroll-lock.d.ts +7 -4
- package/_internal/page-scroll-lock/adapters/body-scroll-lock.js +8 -4
- package/_internal/page-scroll-lock/adapters/body-scroll-lock.js.map +1 -0
- package/_internal/page-scroll-lock/adapters/ui-nucleons.d.ts +30 -5
- package/_internal/page-scroll-lock/adapters/ui-nucleons.js +5 -3
- package/_internal/page-scroll-lock/adapters/ui-nucleons.js.map +1 -0
- package/_internal/page-scroll-lock/context.d.ts +2 -12
- package/_internal/page-scroll-lock/context.js +6 -51
- package/_internal/page-scroll-lock/context.js.map +1 -0
- package/_internal/page-scroll-lock/hook.d.ts +1 -1
- package/_internal/page-scroll-lock/hook.js +8 -5
- package/_internal/page-scroll-lock/hook.js.map +1 -0
- package/_internal/page-scroll-lock/index.d.ts +4 -3
- package/_internal/page-scroll-lock/index.js +8 -4
- package/_internal/page-scroll-lock/index.js.map +1 -0
- package/_internal/page-scroll-lock/types.js +1 -0
- package/_internal/page-scroll-lock/types.js.map +1 -0
- package/alert/alert-body.d.ts +7 -0
- package/alert/alert-body.js +25 -0
- package/alert/alert-body.js.map +1 -0
- package/alert/alert-body.module.scss +3 -0
- package/alert/alert.d.ts +8 -0
- package/alert/alert.js +34 -0
- package/alert/alert.js.map +1 -0
- package/alert/index.d.ts +3 -21
- package/alert/index.js +5 -68
- package/alert/index.js.map +1 -0
- package/alert/types.d.ts +10 -0
- package/alert/types.js +3 -0
- package/alert/types.js.map +1 -0
- package/arrow-button/arrow-button.d.ts +7 -0
- package/arrow-button/arrow-button.js +43 -0
- package/arrow-button/arrow-button.js.map +1 -0
- package/arrow-button/arrow-button.module.scss +5 -5
- package/arrow-button/index.d.ts +2 -17
- package/arrow-button/index.js +3 -52
- package/arrow-button/index.js.map +1 -0
- package/arrow-button/types.d.ts +10 -0
- package/arrow-button/types.js +3 -0
- package/arrow-button/types.js.map +1 -0
- package/autocomplete/autocomplete.d.ts +1 -2
- package/autocomplete/autocomplete.js +129 -102
- package/autocomplete/autocomplete.js.map +1 -0
- package/autocomplete/index.js +1 -0
- package/autocomplete/index.js.map +1 -0
- package/autocomplete/types.d.ts +15 -6
- package/autocomplete/types.js +1 -0
- package/autocomplete/types.js.map +1 -0
- package/autocomplete/utils.d.ts +36 -0
- package/autocomplete/utils.js +55 -0
- package/autocomplete/utils.js.map +1 -0
- package/avatar/avatar.d.ts +7 -0
- package/avatar/avatar.js +26 -0
- package/avatar/avatar.js.map +1 -0
- package/avatar/avatar.module.scss +19 -39
- package/avatar/index.d.ts +3 -30
- package/avatar/index.js +9 -63
- package/avatar/index.js.map +1 -0
- package/avatar/types.d.ts +19 -0
- package/avatar/types.js +3 -0
- package/avatar/types.js.map +1 -0
- package/avatar/utils.d.ts +28 -4
- package/avatar/utils.js +81 -15
- package/avatar/utils.js.map +1 -0
- package/avatar/utils.module.scss +9 -0
- package/base-input/base-input.d.ts +2 -3
- package/base-input/base-input.js +12 -49
- package/base-input/base-input.js.map +1 -0
- package/base-input/index.js +1 -0
- package/base-input/index.js.map +1 -0
- package/base-input/types.d.ts +4 -5
- package/base-input/types.js +1 -0
- package/base-input/types.js.map +1 -0
- package/base-input/utils.js +2 -1
- package/base-input/utils.js.map +1 -0
- package/bottom-bar/bottom-bar.d.ts +3 -4
- package/bottom-bar/bottom-bar.js +7 -20
- package/bottom-bar/bottom-bar.js.map +1 -0
- package/bottom-bar/bottom-bar.module.scss +11 -0
- package/bottom-bar/index.d.ts +1 -1
- package/bottom-bar/index.js +1 -0
- package/bottom-bar/index.js.map +1 -0
- package/bottom-bar/types.d.ts +10 -4
- package/bottom-bar/types.js +1 -0
- package/bottom-bar/types.js.map +1 -0
- package/box/box.d.ts +8 -0
- package/box/box.js +159 -0
- package/box/box.js.map +1 -0
- package/box/index.d.ts +2 -66
- package/box/index.js +3 -154
- package/box/index.js.map +1 -0
- package/box/types.d.ts +60 -0
- package/box/types.js +3 -0
- package/box/types.js.map +1 -0
- package/breakpoints.scss +6 -2
- package/button/button-util.scss +46 -0
- package/button/button.d.ts +8 -0
- package/button/button.js +35 -0
- package/button/button.js.map +1 -0
- package/button/button.module.scss +17 -26
- package/button/index.d.ts +2 -40
- package/button/index.js +3 -69
- package/button/index.js.map +1 -0
- package/button/types.d.ts +43 -0
- package/button/types.js +3 -0
- package/button/types.js.map +1 -0
- package/carousel/carousel.d.ts +262 -0
- package/carousel/carousel.js +616 -0
- package/carousel/carousel.js.map +1 -0
- package/carousel/draggable.d.ts +8 -11
- package/carousel/draggable.js +26 -47
- package/carousel/draggable.js.map +1 -0
- package/carousel/helpers/draggable-event.d.ts +1 -4
- package/carousel/helpers/draggable-event.js +1 -4
- package/carousel/helpers/draggable-event.js.map +1 -0
- package/carousel/index.d.ts +2 -311
- package/carousel/index.js +3 -628
- package/carousel/index.js.map +1 -0
- package/carousel/types.d.ts +51 -0
- package/carousel/types.js +3 -0
- package/carousel/types.js.map +1 -0
- package/checkbox/checkbox.d.ts +5 -0
- package/checkbox/checkbox.js +19 -0
- package/checkbox/checkbox.js.map +1 -0
- package/checkbox/index.d.ts +2 -7
- package/checkbox/index.js +3 -55
- package/checkbox/index.js.map +1 -0
- package/checkbox/types.d.ts +2 -0
- package/checkbox/types.js +3 -0
- package/checkbox/types.js.map +1 -0
- package/chip/chip-util.scss +53 -0
- package/chip/chip.d.ts +14 -0
- package/chip/chip.js +39 -0
- package/chip/chip.js.map +1 -0
- package/chip/chip.module.scss +148 -0
- package/chip/index.d.ts +3 -0
- package/chip/index.js +9 -0
- package/chip/index.js.map +1 -0
- package/chip/types.d.ts +53 -0
- package/chip/types.js +3 -0
- package/chip/types.js.map +1 -0
- package/chip/utils.d.ts +9 -0
- package/chip/utils.js +23 -0
- package/chip/utils.js.map +1 -0
- package/clean-buttons/clean-button.d.ts +7 -0
- package/clean-buttons/clean-button.js +26 -0
- package/clean-buttons/clean-button.js.map +1 -0
- package/clean-buttons/{clean-buttons.module.scss → clean-button.module.scss} +0 -16
- package/clean-buttons/clean-group.d.ts +8 -0
- package/clean-buttons/clean-group.js +26 -0
- package/clean-buttons/clean-group.js.map +1 -0
- package/clean-buttons/clean-group.module.scss +16 -0
- package/clean-buttons/index.d.ts +3 -33
- package/clean-buttons/index.js +6 -72
- package/clean-buttons/index.js.map +1 -0
- package/clean-buttons/types.d.ts +13 -0
- package/clean-buttons/types.js +1 -0
- package/clean-buttons/types.js.map +1 -0
- package/clean-buttons/utils.d.ts +2 -2
- package/clean-buttons/utils.js +3 -2
- package/clean-buttons/utils.js.map +1 -0
- package/colors/index.d.ts +6 -4
- package/colors/index.js +7 -3
- package/colors/index.js.map +1 -0
- package/colors.scss +2 -0
- package/context/index.d.ts +10 -0
- package/context/index.js +23 -0
- package/context/index.js.map +1 -0
- package/context/viewport.js +1 -0
- package/context/viewport.js.map +1 -0
- package/dot-nav/dot-nav.d.ts +7 -0
- package/dot-nav/dot-nav.js +62 -0
- package/dot-nav/dot-nav.js.map +1 -0
- package/dot-nav/dot-nav.module.scss +3 -1
- package/dot-nav/index.d.ts +2 -18
- package/dot-nav/index.js +3 -79
- package/dot-nav/index.js.map +1 -0
- package/dot-nav/types.d.ts +11 -0
- package/dot-nav/types.js +3 -0
- package/dot-nav/types.js.map +1 -0
- package/dropdown/dropdown-loading.d.ts +7 -0
- package/dropdown/dropdown-loading.js +21 -0
- package/dropdown/dropdown-loading.js.map +1 -0
- package/dropdown/dropdown.d.ts +7 -0
- package/dropdown/dropdown.js +21 -0
- package/dropdown/dropdown.js.map +1 -0
- package/dropdown/dropdown.module.scss +4 -0
- package/dropdown/index.d.ts +4 -18
- package/dropdown/index.js +9 -53
- package/dropdown/index.js.map +1 -0
- package/dropdown/types.d.ts +16 -0
- package/dropdown/types.js +3 -0
- package/dropdown/types.js.map +1 -0
- package/dropdown/utils.d.ts +10 -5
- package/dropdown/utils.js +41 -16
- package/dropdown/utils.js.map +1 -0
- package/dropdown-item/dropdown-item.d.ts +8 -0
- package/dropdown-item/dropdown-item.js +24 -0
- package/dropdown-item/dropdown-item.js.map +1 -0
- package/dropdown-item/index.d.ts +2 -34
- package/dropdown-item/index.js +3 -35
- package/dropdown-item/index.js.map +1 -0
- package/dropdown-item/types.d.ts +28 -3
- package/dropdown-item/types.js +1 -0
- package/dropdown-item/types.js.map +1 -0
- package/dropdown-item/utils.js +3 -2
- package/dropdown-item/utils.js.map +1 -0
- package/expandable/expandable-group.d.ts +13 -0
- package/expandable/expandable-group.js +114 -0
- package/expandable/expandable-group.js.map +1 -0
- package/expandable/expandable-group.module.scss +1 -5
- package/expandable/index.d.ts +2 -41
- package/expandable/index.js +6 -83
- package/expandable/index.js.map +1 -0
- package/expandable/types.d.ts +39 -0
- package/expandable/types.js +3 -0
- package/expandable/types.js.map +1 -0
- package/expandable/utils.d.ts +22 -23
- package/expandable/utils.js +66 -80
- package/expandable/utils.js.map +1 -0
- package/field-block/field-block.d.ts +11 -0
- package/field-block/field-block.js +37 -0
- package/field-block/field-block.js.map +1 -0
- package/field-block/field-block.module.scss +4 -1
- package/field-block/index.d.ts +2 -63
- package/field-block/index.js +6 -41
- package/field-block/index.js.map +1 -0
- package/field-block/types.d.ts +52 -0
- package/field-block/types.js +3 -0
- package/field-block/types.js.map +1 -0
- package/file-icon/file-icon.d.ts +7 -0
- package/file-icon/file-icon.js +36 -0
- package/file-icon/file-icon.js.map +1 -0
- package/file-icon/file-icon.module.scss +62 -0
- package/file-icon/index.d.ts +2 -11
- package/file-icon/index.js +3 -40
- package/file-icon/index.js.map +1 -0
- package/file-icon/types.d.ts +12 -0
- package/file-icon/types.js +3 -0
- package/file-icon/types.js.map +1 -0
- package/group-overflow/group-overflow.d.ts +7 -0
- package/group-overflow/group-overflow.js +28 -0
- package/group-overflow/group-overflow.js.map +1 -0
- package/group-overflow/group-overflow.module.scss +24 -0
- package/group-overflow/index.d.ts +2 -0
- package/group-overflow/index.js +6 -0
- package/group-overflow/index.js.map +1 -0
- package/group-overflow/types.d.ts +10 -0
- package/group-overflow/types.js +3 -0
- package/group-overflow/types.js.map +1 -0
- package/group-overflow/utils.d.ts +20 -0
- package/group-overflow/utils.js +75 -0
- package/group-overflow/utils.js.map +1 -0
- package/helpers/bounds-of.d.ts +0 -4
- package/helpers/bounds-of.js +1 -4
- package/helpers/bounds-of.js.map +1 -0
- package/helpers/center-of.d.ts +0 -4
- package/helpers/center-of.js +3 -9
- package/helpers/center-of.js.map +1 -0
- package/helpers/create-container.d.ts +1 -4
- package/helpers/create-container.js +1 -4
- package/helpers/create-container.js.map +1 -0
- package/helpers/define-slots.d.ts +4 -4
- package/helpers/define-slots.js +1 -0
- package/helpers/define-slots.js.map +1 -0
- package/helpers/events.d.ts +3 -3
- package/helpers/events.js +1 -0
- package/helpers/events.js.map +1 -0
- package/helpers/{find-child-element.d.ts → find-child-index.d.ts} +0 -4
- package/helpers/{find-child-element.js → find-child-index.js} +1 -4
- package/helpers/find-child-index.js.map +1 -0
- package/helpers/find-offset-parent.js +1 -0
- package/helpers/find-offset-parent.js.map +1 -0
- package/helpers/find-sibling-index.d.ts +3 -7
- package/helpers/find-sibling-index.js +6 -10
- package/helpers/find-sibling-index.js.map +1 -0
- package/helpers/fit-element-height.js +1 -0
- package/helpers/fit-element-height.js.map +1 -0
- package/helpers/format-date.js +2 -2
- package/helpers/format-date.js.map +1 -0
- package/helpers/get-date-interval-data.d.ts +0 -4
- package/helpers/get-date-interval-data.js +1 -4
- package/helpers/get-date-interval-data.js.map +1 -0
- package/helpers/get-declination.d.ts +0 -4
- package/helpers/get-declination.js +1 -4
- package/helpers/get-declination.js.map +1 -0
- package/helpers/get-fraction-depth.js +1 -0
- package/helpers/get-fraction-depth.js.map +1 -0
- package/helpers/get-positioned-parent-offset.d.ts +15 -0
- package/helpers/get-positioned-parent-offset.js +41 -0
- package/helpers/get-positioned-parent-offset.js.map +1 -0
- package/helpers/get-relative-pos.d.ts +0 -4
- package/helpers/get-relative-pos.js +1 -4
- package/helpers/get-relative-pos.js.map +1 -0
- package/helpers/get-scroll-parent.js +1 -0
- package/helpers/get-scroll-parent.js.map +1 -0
- package/helpers/index.d.ts +13 -0
- package/helpers/index.js +33 -0
- package/helpers/index.js.map +1 -0
- package/helpers/is-browser.d.ts +0 -4
- package/helpers/is-browser.js +1 -4
- package/helpers/is-browser.js.map +1 -0
- package/helpers/is-fully-scrolled.js +1 -0
- package/helpers/is-fully-scrolled.js.map +1 -0
- package/helpers/is-touch-device.js +1 -0
- package/helpers/is-touch-device.js.map +1 -0
- package/helpers/layer.js +1 -0
- package/helpers/layer.js.map +1 -0
- package/helpers/max-index-of.d.ts +0 -4
- package/helpers/max-index-of.js +1 -4
- package/helpers/max-index-of.js.map +1 -0
- package/helpers/media-query-list.js +1 -0
- package/helpers/media-query-list.js.map +1 -0
- package/helpers/on.d.ts +2 -6
- package/helpers/on.js +1 -4
- package/helpers/on.js.map +1 -0
- package/helpers/point.d.ts +0 -4
- package/helpers/point.js +2 -4
- package/helpers/point.js.map +1 -0
- package/helpers/scroll-to-child.js +3 -6
- package/helpers/scroll-to-child.js.map +1 -0
- package/helpers/styles.d.ts +2 -6
- package/helpers/styles.js +4 -12
- package/helpers/styles.js.map +1 -0
- package/hint/hint-view.d.ts +2 -2
- package/hint/hint-view.js +6 -18
- package/hint/hint-view.js.map +1 -0
- package/hint/hint.d.ts +1 -1
- package/hint/hint.js +6 -23
- package/hint/hint.js.map +1 -0
- package/hint/index.js +1 -0
- package/hint/index.js.map +1 -0
- package/hint/utils.d.ts +10 -6
- package/hint/utils.js +36 -13
- package/hint/utils.js.map +1 -0
- package/hooks/index.d.ts +9 -29
- package/hooks/index.js +20 -74
- package/hooks/index.js.map +1 -0
- package/hooks/{breakpoint → use-breakpoint}/index.d.ts +1 -1
- package/hooks/{breakpoint → use-breakpoint}/index.js +10 -31
- package/hooks/use-breakpoint/index.js.map +1 -0
- package/hooks/use-breakpoint/types.js +3 -0
- package/hooks/use-breakpoint/types.js.map +1 -0
- package/hooks/{breakpoint → use-breakpoint}/utils.d.ts +3 -1
- package/hooks/{breakpoint → use-breakpoint}/utils.js +5 -5
- package/hooks/use-breakpoint/utils.js.map +1 -0
- package/hooks/{identity.d.ts → use-identity-ref/index.d.ts} +1 -1
- package/hooks/{identity.js → use-identity-ref/index.js} +3 -2
- package/hooks/use-identity-ref/index.js.map +1 -0
- package/hooks/use-infinite-scroll/index.d.ts +13 -0
- package/hooks/use-infinite-scroll/index.js +31 -0
- package/hooks/use-infinite-scroll/index.js.map +1 -0
- package/hooks/{intersection/readme.md → use-intersection/README.md} +5 -5
- package/hooks/{intersection → use-intersection}/index.js +7 -4
- package/hooks/use-intersection/index.js.map +1 -0
- package/hooks/{intersection → use-intersection}/test-utils.js +6 -2
- package/hooks/use-intersection/test-utils.js.map +1 -0
- package/hooks/use-is-touch-device/index.d.ts +5 -0
- package/hooks/use-is-touch-device/index.js +18 -0
- package/hooks/use-is-touch-device/index.js.map +1 -0
- package/hooks/use-isomorphic-layout-effect/index.d.ts +6 -0
- package/hooks/use-isomorphic-layout-effect/index.js +10 -0
- package/hooks/use-isomorphic-layout-effect/index.js.map +1 -0
- package/hooks/{keydown.js → use-keydown/index.js} +5 -7
- package/hooks/use-keydown/index.js.map +1 -0
- package/hooks/{media.d.ts → use-media/index.d.ts} +1 -1
- package/hooks/{media.js → use-media/index.js} +10 -6
- package/hooks/use-media/index.js.map +1 -0
- package/hooks/use-outside-click/index.d.ts +7 -0
- package/hooks/use-outside-click/index.js +37 -0
- package/hooks/use-outside-click/index.js.map +1 -0
- package/info-text/index.d.ts +2 -23
- package/info-text/index.js +3 -57
- package/info-text/index.js.map +1 -0
- package/info-text/info-text.d.ts +8 -0
- package/info-text/info-text.js +34 -0
- package/info-text/info-text.js.map +1 -0
- package/info-text/types.d.ts +16 -0
- package/info-text/types.js +3 -0
- package/info-text/types.js.map +1 -0
- package/input/index.d.ts +2 -32
- package/input/index.js +3 -93
- package/input/index.js.map +1 -0
- package/input/input.d.ts +7 -0
- package/input/input.js +73 -0
- package/input/input.js.map +1 -0
- package/input/types.d.ts +26 -0
- package/input/types.js +3 -0
- package/input/types.js.map +1 -0
- package/input/utils.js +1 -0
- package/input/utils.js.map +1 -0
- package/layout/index.js +1 -0
- package/layout/index.js.map +1 -0
- package/layout/layout.d.ts +2 -5
- package/layout/layout.js +5 -16
- package/layout/layout.js.map +1 -0
- package/layout/layout.module.scss +70 -39
- package/layout/legacy.d.ts +5 -5
- package/layout/legacy.js +4 -39
- package/layout/legacy.js.map +1 -0
- package/layout/types.d.ts +4 -2
- package/layout/types.js +1 -0
- package/layout/types.js.map +1 -0
- package/link/index.d.ts +2 -24
- package/link/index.js +3 -65
- package/link/index.js.map +1 -0
- package/link/link.d.ts +9 -0
- package/link/link.js +27 -0
- package/link/link.js.map +1 -0
- package/link/types.d.ts +14 -0
- package/link/types.js +3 -0
- package/link/types.js.map +1 -0
- package/masked-input/index.d.ts +3 -5
- package/masked-input/index.js +4 -3
- package/masked-input/index.js.map +1 -0
- package/masked-input/masked-input.d.ts +1 -2
- package/masked-input/masked-input.js +42 -51
- package/masked-input/masked-input.js.map +1 -0
- package/masked-input/types.d.ts +6 -5
- package/masked-input/types.js +1 -0
- package/masked-input/types.js.map +1 -0
- package/masked-input/use-input-mask.d.ts +9 -0
- package/masked-input/use-input-mask.js +65 -0
- package/masked-input/use-input-mask.js.map +1 -0
- package/masked-input/utils.js +3 -4
- package/masked-input/utils.js.map +1 -0
- package/modal/index.d.ts +4 -30
- package/modal/index.js +10 -52
- package/modal/index.js.map +1 -0
- package/modal/modal-util.scss +45 -0
- package/modal/modal.d.ts +7 -0
- package/modal/modal.js +31 -0
- package/modal/modal.js.map +1 -0
- package/modal/modal.module.scss +45 -100
- package/modal/slots.d.ts +8 -25
- package/modal/slots.js +19 -72
- package/modal/slots.js.map +1 -0
- package/modal/types.d.ts +37 -0
- package/modal/types.js +3 -0
- package/modal/types.js.map +1 -0
- package/modal/utils.d.ts +9 -8
- package/modal/utils.js +28 -3
- package/modal/utils.js.map +1 -0
- package/modal/utils.module.scss +45 -0
- package/modal-overlay/index.d.ts +3 -13
- package/modal-overlay/index.js +7 -58
- package/modal-overlay/index.js.map +1 -0
- package/modal-overlay/modal-overlay.d.ts +7 -0
- package/modal-overlay/modal-overlay.js +30 -0
- package/modal-overlay/modal-overlay.js.map +1 -0
- package/modal-overlay/modal-overlay.module.scss +5 -2
- package/modal-overlay/types.d.ts +7 -0
- package/modal-overlay/types.js +3 -0
- package/modal-overlay/types.js.map +1 -0
- package/modal-overlay/utils.d.ts +11 -3
- package/modal-overlay/utils.js +50 -3
- package/modal-overlay/utils.js.map +1 -0
- package/no-index/index.d.ts +4 -11
- package/no-index/index.js +9 -16
- package/no-index/index.js.map +1 -0
- package/no-index/no-index-mark.d.ts +7 -0
- package/no-index/no-index-mark.js +16 -0
- package/no-index/no-index-mark.js.map +1 -0
- package/no-index/no-index.d.ts +7 -0
- package/no-index/no-index.js +15 -0
- package/no-index/no-index.js.map +1 -0
- package/no-index/types.d.ts +9 -0
- package/no-index/types.js +3 -0
- package/no-index/types.js.map +1 -0
- package/no-index/utils.d.ts +13 -0
- package/no-index/utils.js +29 -0
- package/no-index/utils.js.map +1 -0
- package/package.json +35 -47
- package/pagination/index.d.ts +4 -20
- package/pagination/index.js +10 -15
- package/pagination/index.js.map +1 -0
- package/pagination/pagination-item.d.ts +7 -0
- package/pagination/pagination-item.js +20 -0
- package/pagination/pagination-item.js.map +1 -0
- package/pagination/pagination-item.module.scss +49 -0
- package/pagination/pagination.d.ts +7 -0
- package/pagination/pagination.js +98 -0
- package/pagination/pagination.js.map +1 -0
- package/pagination/pagination.module.scss +15 -70
- package/pagination/types.d.ts +28 -0
- package/pagination/types.js +3 -0
- package/pagination/types.js.map +1 -0
- package/pagination/utils.d.ts +25 -41
- package/pagination/utils.js +51 -85
- package/pagination/utils.js.map +1 -0
- package/panel/index.d.ts +2 -38
- package/panel/index.js +6 -56
- package/panel/index.js.map +1 -0
- package/panel/panel.d.ts +20 -0
- package/panel/panel.js +57 -0
- package/panel/panel.js.map +1 -0
- package/panel/types.d.ts +17 -0
- package/panel/types.js +3 -0
- package/panel/types.js.map +1 -0
- package/phone-input/images/armenia.png +0 -0
- package/phone-input/images/azerbaijan.png +0 -0
- package/phone-input/images/belarus.png +0 -0
- package/phone-input/images/georgia.png +0 -0
- package/phone-input/images/kazakhstan.png +0 -0
- package/phone-input/images/kyrgyzstan.png +0 -0
- package/phone-input/images/moldova.png +0 -0
- package/phone-input/images/other.png +0 -0
- package/phone-input/images/russia.png +0 -0
- package/phone-input/images/tajikistan.png +0 -0
- package/phone-input/images/turkmenistan.png +0 -0
- package/phone-input/images/ukraine.png +0 -0
- package/phone-input/images/uzbekistan.png +0 -0
- package/phone-input/index.js +1 -0
- package/phone-input/index.js.map +1 -0
- package/phone-input/phone-input.d.ts +1 -2
- package/phone-input/phone-input.js +80 -82
- package/phone-input/phone-input.js.map +1 -0
- package/phone-input/phone-input.module.scss +7 -1
- package/phone-input/presets.js +4 -1
- package/phone-input/presets.js.map +1 -0
- package/phone-input/types.d.ts +9 -2
- package/phone-input/types.js +1 -0
- package/phone-input/types.js.map +1 -0
- package/phone-input/utils.js +1 -0
- package/phone-input/utils.js.map +1 -0
- package/plate/index.d.ts +2 -15
- package/plate/index.js +3 -50
- package/plate/index.js.map +1 -0
- package/plate/plate.d.ts +7 -0
- package/plate/plate.js +21 -0
- package/plate/plate.js.map +1 -0
- package/plate/types.d.ts +9 -0
- package/plate/types.js +3 -0
- package/plate/types.js.map +1 -0
- package/popup/index.js +1 -0
- package/popup/index.js.map +1 -0
- package/popup/popup-view.d.ts +2 -2
- package/popup/popup-view.js +6 -20
- package/popup/popup-view.js.map +1 -0
- package/popup/popup.d.ts +1 -2
- package/popup/popup.js +13 -44
- package/popup/popup.js.map +1 -0
- package/popup/utils.d.ts +3 -3
- package/popup/utils.js +11 -6
- package/popup/utils.js.map +1 -0
- package/portal/index.d.ts +2 -13
- package/portal/index.js +3 -23
- package/portal/index.js.map +1 -0
- package/portal/portal.d.ts +8 -0
- package/portal/portal.js +27 -0
- package/portal/portal.js.map +1 -0
- package/portal/types.d.ts +7 -0
- package/portal/types.js +3 -0
- package/portal/types.js.map +1 -0
- package/price/index.d.ts +2 -21
- package/price/index.js +3 -20
- package/price/index.js.map +1 -0
- package/price/price.d.ts +7 -0
- package/price/price.js +24 -0
- package/price/price.js.map +1 -0
- package/price/types.d.ts +13 -0
- package/price/types.js +3 -0
- package/price/types.js.map +1 -0
- package/price/utils.js +2 -0
- package/price/utils.js.map +1 -0
- package/radio-button/index.d.ts +2 -10
- package/radio-button/index.js +3 -30
- package/radio-button/index.js.map +1 -0
- package/radio-button/radio-button.d.ts +7 -0
- package/radio-button/radio-button.js +20 -0
- package/radio-button/radio-button.js.map +1 -0
- package/radio-button/types.d.ts +4 -0
- package/radio-button/types.js +3 -0
- package/radio-button/types.js.map +1 -0
- package/range/index.d.ts +2 -108
- package/range/index.js +3 -284
- package/range/index.js.map +1 -0
- package/range/range.d.ts +84 -0
- package/range/range.js +261 -0
- package/range/range.js.map +1 -0
- package/range/types.d.ts +26 -0
- package/range/types.js +3 -0
- package/range/types.js.map +1 -0
- package/rating/index.d.ts +2 -16
- package/rating/index.js +3 -41
- package/rating/index.js.map +1 -0
- package/rating/rating.d.ts +7 -0
- package/rating/rating.js +26 -0
- package/rating/rating.js.map +1 -0
- package/rating/types.d.ts +9 -0
- package/rating/types.js +1 -0
- package/rating/types.js.map +1 -0
- package/rating/utils.js +1 -0
- package/rating/utils.js.map +1 -0
- package/select/index.js +1 -0
- package/select/index.js.map +1 -0
- package/select/parts/block.d.ts +2 -3
- package/select/parts/block.js +21 -33
- package/select/parts/block.js.map +1 -0
- package/select/parts/button.d.ts +2 -3
- package/select/parts/button.js +10 -43
- package/select/parts/button.js.map +1 -0
- package/select/parts/menu.d.ts +1 -2
- package/select/parts/menu.js +21 -56
- package/select/parts/menu.js.map +1 -0
- package/select/select.d.ts +1 -2
- package/select/select.js +45 -49
- package/select/select.js.map +1 -0
- package/select/types.d.ts +6 -2
- package/select/types.js +1 -0
- package/select/types.js.map +1 -0
- package/select/utils.js +1 -0
- package/select/utils.js.map +1 -0
- package/shadows.scss +40 -4
- package/side-page/index.d.ts +3 -39
- package/side-page/index.js +8 -89
- package/side-page/index.js.map +1 -0
- package/side-page/side-page.d.ts +13 -0
- package/side-page/side-page.js +58 -0
- package/side-page/side-page.js.map +1 -0
- package/side-page/slots.d.ts +3 -3
- package/side-page/slots.js +7 -19
- package/side-page/slots.js.map +1 -0
- package/side-page/types.d.ts +27 -0
- package/side-page/types.js +3 -0
- package/side-page/types.js.map +1 -0
- package/spinner/index.d.ts +2 -34
- package/spinner/index.js +6 -45
- package/spinner/index.js.map +1 -0
- package/spinner/spinner.d.ts +15 -0
- package/spinner/spinner.js +41 -0
- package/spinner/spinner.js.map +1 -0
- package/spinner/spinner.module.scss +15 -5
- package/spinner/types.d.ts +15 -0
- package/spinner/types.js +3 -0
- package/spinner/types.js.map +1 -0
- package/stepper/index.d.ts +2 -38
- package/stepper/index.js +3 -73
- package/stepper/index.js.map +1 -0
- package/stepper/stepper.d.ts +8 -0
- package/stepper/stepper.js +38 -0
- package/stepper/stepper.js.map +1 -0
- package/stepper/types.d.ts +31 -0
- package/stepper/types.js +3 -0
- package/stepper/types.js.map +1 -0
- package/stroked-svg/index.d.ts +2 -17
- package/stroked-svg/index.js +3 -53
- package/stroked-svg/index.js.map +1 -0
- package/stroked-svg/stroked-svg.d.ts +8 -0
- package/stroked-svg/stroked-svg.js +19 -0
- package/stroked-svg/stroked-svg.js.map +1 -0
- package/stroked-svg/types.d.ts +12 -0
- package/stroked-svg/types.js +3 -0
- package/stroked-svg/types.js.map +1 -0
- package/styling/borders.d.ts +1 -0
- package/styling/borders.js +2 -0
- package/styling/borders.js.map +1 -0
- package/styling/borders.module.scss +3 -1
- package/styling/colors.d.ts +10 -5
- package/styling/colors.js +6 -0
- package/styling/colors.js.map +1 -0
- package/styling/fonts.d.ts +3 -0
- package/styling/fonts.js +4 -0
- package/styling/fonts.js.map +1 -0
- package/styling/index.d.ts +6 -0
- package/styling/index.js +31 -0
- package/styling/index.js.map +1 -0
- package/styling/shadows.d.ts +1 -0
- package/styling/shadows.js +2 -0
- package/styling/shadows.js.map +1 -0
- package/styling/shadows.module.scss +12 -4
- package/styling/shapes.d.ts +2 -0
- package/styling/shapes.js +3 -0
- package/styling/shapes.js.map +1 -0
- package/styling/sizes.d.ts +10 -0
- package/styling/sizes.js +11 -0
- package/styling/sizes.js.map +1 -0
- package/styling/sizes.module.scss +3 -1
- package/styling/utils.d.ts +2 -1
- package/styling/utils.js +3 -1
- package/styling/utils.js.map +1 -0
- package/super-ellipse-clip-path/index.d.ts +2 -11
- package/super-ellipse-clip-path/index.js +3 -14
- package/super-ellipse-clip-path/index.js.map +1 -0
- package/super-ellipse-clip-path/super-ellipse-clip-path.d.ts +7 -0
- package/super-ellipse-clip-path/super-ellipse-clip-path.js +14 -0
- package/super-ellipse-clip-path/super-ellipse-clip-path.js.map +1 -0
- package/super-ellipse-clip-path/types.d.ts +4 -0
- package/super-ellipse-clip-path/types.js +3 -0
- package/super-ellipse-clip-path/types.js.map +1 -0
- package/switcher-row/index.d.ts +2 -42
- package/switcher-row/index.js +3 -56
- package/switcher-row/index.js.map +1 -0
- package/switcher-row/switcher-row.d.ts +29 -0
- package/switcher-row/switcher-row.js +56 -0
- package/switcher-row/switcher-row.js.map +1 -0
- package/switcher-row/switcher-row.module.scss +1 -1
- package/switcher-row/types.d.ts +14 -0
- package/switcher-row/types.js +3 -0
- package/switcher-row/types.js.map +1 -0
- package/tabs/index.d.ts +2 -36
- package/tabs/index.js +5 -45
- package/tabs/index.js.map +1 -0
- package/tabs/tabs.d.ts +16 -0
- package/tabs/tabs.js +31 -0
- package/tabs/tabs.js.map +1 -0
- package/tabs/tabs.module.scss +1 -0
- package/tabs/types.d.ts +35 -0
- package/tabs/types.js +3 -0
- package/tabs/types.js.map +1 -0
- package/text/index.d.ts +2 -37
- package/text/index.js +6 -68
- package/text/index.js.map +1 -0
- package/text/text.d.ts +12 -0
- package/text/text.js +50 -0
- package/text/text.js.map +1 -0
- package/text/types.d.ts +28 -0
- package/text/types.js +3 -0
- package/text/types.js.map +1 -0
- package/text-button/index.d.ts +2 -42
- package/text-button/index.js +3 -43
- package/text-button/index.js.map +1 -0
- package/text-button/text-button.d.ts +8 -0
- package/text-button/text-button.js +38 -0
- package/text-button/text-button.js.map +1 -0
- package/text-button/text-button.module.scss +1 -1
- package/text-button/types.d.ts +40 -0
- package/text-button/types.js +3 -0
- package/text-button/types.js.map +1 -0
- package/textarea/index.d.ts +2 -21
- package/textarea/index.js +3 -82
- package/textarea/index.js.map +1 -0
- package/textarea/textarea.d.ts +7 -0
- package/textarea/textarea.js +61 -0
- package/textarea/textarea.js.map +1 -0
- package/textarea/types.d.ts +15 -0
- package/textarea/types.js +3 -0
- package/textarea/types.js.map +1 -0
- package/timer/index.d.ts +2 -16
- package/timer/index.js +3 -42
- package/timer/index.js.map +1 -0
- package/timer/timer.d.ts +7 -0
- package/timer/timer.js +24 -0
- package/timer/timer.js.map +1 -0
- package/timer/types.d.ts +10 -1
- package/timer/types.js +1 -0
- package/timer/types.js.map +1 -0
- package/timer/utils.d.ts +3 -3
- package/timer/utils.js +6 -3
- package/timer/utils.js.map +1 -0
- package/toggle/index.d.ts +2 -7
- package/toggle/index.js +3 -53
- package/toggle/index.js.map +1 -0
- package/toggle/toggle.d.ts +5 -0
- package/toggle/toggle.js +21 -0
- package/toggle/toggle.js.map +1 -0
- package/toggle/toggle.module.scss +9 -3
- package/toggle/types.d.ts +2 -0
- package/toggle/types.js +3 -0
- package/toggle/types.js.map +1 -0
- package/top-bar/index.d.ts +1 -1
- package/top-bar/index.js +4 -1
- package/top-bar/index.js.map +1 -0
- package/top-bar/top-bar.d.ts +2 -3
- package/top-bar/top-bar.js +16 -63
- package/top-bar/top-bar.js.map +1 -0
- package/top-bar/top-bar.module.scss +25 -11
- package/top-bar/types.d.ts +21 -10
- package/top-bar/types.js +1 -0
- package/top-bar/types.js.map +1 -0
- package/top-bar/utils.d.ts +2 -2
- package/top-bar/utils.js +22 -39
- package/top-bar/utils.js.map +1 -0
- package/touch-slider/index.d.ts +2 -13
- package/touch-slider/index.js +3 -18
- package/touch-slider/index.js.map +1 -0
- package/touch-slider/touch-slider.d.ts +9 -0
- package/touch-slider/touch-slider.js +22 -0
- package/touch-slider/touch-slider.js.map +1 -0
- package/touch-slider/types.d.ts +5 -0
- package/touch-slider/types.js +3 -0
- package/touch-slider/types.js.map +1 -0
- package/types.d.ts +1 -1
- package/types.js +1 -0
- package/types.js.map +1 -0
- package/unknown-content/index.d.ts +2 -13
- package/unknown-content/index.js +3 -43
- package/unknown-content/index.js.map +1 -0
- package/unknown-content/types.d.ts +7 -0
- package/unknown-content/types.js +3 -0
- package/unknown-content/types.js.map +1 -0
- package/unknown-content/unknown-content.d.ts +8 -0
- package/unknown-content/unknown-content.js +26 -0
- package/unknown-content/unknown-content.js.map +1 -0
- package/unknown-content/utils.js +1 -0
- package/unknown-content/utils.js.map +1 -0
- package/upload-area/index.d.ts +2 -1
- package/upload-area/index.js +4 -1
- package/upload-area/index.js.map +1 -0
- package/upload-area/types.d.ts +12 -11
- package/upload-area/types.js +1 -0
- package/upload-area/types.js.map +1 -0
- package/upload-area/upload-area-util.scss +2 -0
- package/upload-area/upload-area.d.ts +1 -2
- package/upload-area/upload-area.js +12 -54
- package/upload-area/upload-area.js.map +1 -0
- package/upload-area/upload-area.module.scss +4 -1
- package/upload-area/utils.d.ts +7 -0
- package/upload-area/utils.js +23 -3
- package/upload-area/utils.js.map +1 -0
- package/utils.scss +8 -1
- package/_internal/dropdown-loading/index.d.ts +0 -9
- package/_internal/dropdown-loading/index.js +0 -19
- package/_internal/utils/dropdown.d.ts +0 -12
- package/_internal/utils/dropdown.js +0 -16
- package/autocomplete-deprecated/autocomplete.module.scss +0 -20
- package/autocomplete-deprecated/index.d.ts +0 -28
- package/autocomplete-deprecated/index.js +0 -130
- package/avatar/user.d.ts +0 -10
- package/avatar/user.js +0 -61
- package/base-input-deprecated/base-input.module.scss +0 -66
- package/base-input-deprecated/index.d.ts +0 -24
- package/base-input-deprecated/index.js +0 -80
- package/bordered-layout/bordered-layout.module.scss +0 -7
- package/bordered-layout/index.d.ts +0 -16
- package/bordered-layout/index.js +0 -33
- package/card/card.module.scss +0 -8
- package/card/index.d.ts +0 -17
- package/card/index.js +0 -63
- package/card/slots.d.ts +0 -41
- package/card/slots.js +0 -86
- package/card/utils.d.ts +0 -3
- package/card/utils.js +0 -5
- package/checkbox-field/checkbox-field.module.scss +0 -56
- package/checkbox-field/index.d.ts +0 -19
- package/checkbox-field/index.js +0 -62
- package/chips/chips.module.scss +0 -75
- package/chips/index.d.ts +0 -16
- package/chips/index.js +0 -56
- package/chips/item.d.ts +0 -15
- package/chips/item.js +0 -20
- package/field-grid/field-grid.module.scss +0 -30
- package/field-grid/index.d.ts +0 -59
- package/field-grid/index.js +0 -138
- package/file-icon/unknown.svg +0 -9
- package/helpers/format-number.d.ts +0 -7
- package/helpers/format-number.js +0 -29
- package/helpers/get-no-index.d.ts +0 -8
- package/helpers/get-no-index.js +0 -12
- package/helpers/rename.d.ts +0 -13
- package/helpers/rename.js +0 -14
- package/helpers/with-prevent.d.ts +0 -11
- package/helpers/with-prevent.js +0 -20
- package/hint-deprecated/hint.module.scss +0 -61
- package/hint-deprecated/index.d.ts +0 -11
- package/hint-deprecated/index.js +0 -53
- package/hooks/styles.d.ts +0 -6
- package/hooks/styles.js +0 -26
- package/loading-overlay/index.d.ts +0 -19
- package/loading-overlay/index.js +0 -20
- package/loading-overlay/loading-overlay.module.scss +0 -14
- package/masked-field/index.d.ts +0 -23
- package/masked-field/index.js +0 -71
- package/masked-input/hook.d.ts +0 -8
- package/masked-input/hook.js +0 -72
- package/no-index-mark/index.d.ts +0 -11
- package/no-index-mark/index.js +0 -14
- package/pagination/base-pagination.d.ts +0 -51
- package/pagination/base-pagination.js +0 -105
- package/pagination/page-button.d.ts +0 -15
- package/pagination/page-button.js +0 -32
- package/phone-input-deprecated/index.d.ts +0 -29
- package/phone-input-deprecated/index.js +0 -124
- package/phone-input-deprecated/phone-input.module.scss +0 -41
- package/rating/star.svg +0 -3
- package/readme.md +0 -183
- package/screen/index.d.ts +0 -25
- package/screen/index.js +0 -74
- package/screen/screen.module.scss +0 -31
- package/screen/slots.d.ts +0 -26
- package/screen/slots.js +0 -101
- package/screen/utils.d.ts +0 -14
- package/screen/utils.js +0 -5
- package/select-deprecated/index.d.ts +0 -34
- package/select-deprecated/index.js +0 -112
- package/select-deprecated/select.module.scss +0 -26
- package/text-field/index.d.ts +0 -69
- package/text-field/index.js +0 -108
- package/text-field/text-field.module.scss +0 -205
- package/tooltip/index.d.ts +0 -18
- package/tooltip/index.js +0 -43
- package/tooltip/tooltip.module.scss +0 -49
- package/upload-area/upload.svg +0 -6
- package/with-hint/index.d.ts +0 -31
- package/with-hint/index.js +0 -73
- package/with-hint/positioning-hint.d.ts +0 -12
- package/with-hint/positioning-hint.js +0 -53
- package/with-hint/positioning-hint.module.scss +0 -10
- package/with-hint/utils.d.ts +0 -17
- package/with-hint/utils.js +0 -50
- package/with-tooltip/index.d.ts +0 -18
- package/with-tooltip/index.js +0 -48
- package/with-tooltip/positioning-tooltip.d.ts +0 -15
- package/with-tooltip/positioning-tooltip.js +0 -80
- package/with-tooltip/utils.d.ts +0 -38
- package/with-tooltip/utils.js +0 -162
- /package/_internal/{readme.md → README.md} +0 -0
- /package/{_internal/dropdown-loading/index.module.scss → dropdown/dropdown-loading.module.scss} +0 -0
- /package/hooks/{breakpoint → use-breakpoint}/types.d.ts +0 -0
- /package/hooks/{intersection → use-intersection}/index.d.ts +0 -0
- /package/hooks/{intersection → use-intersection}/test-utils.d.ts +0 -0
- /package/hooks/{keydown.d.ts → use-keydown/index.d.ts} +0 -0
- /package/stroked-svg/{index.module.scss → stroked-svg.module.scss} +0 -0
|
@@ -1,54 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
const react_1 =
|
|
3
|
+
exports.PageScrollLockContext = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
28
5
|
const body_scroll_lock_1 = require("./adapters/body-scroll-lock");
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Провайдер реализации блокировки прокрутки.
|
|
35
|
-
* @param props Свойства.
|
|
36
|
-
* @return Элемент.
|
|
37
|
-
*/
|
|
38
|
-
function PageScrollProvider({ children, adapter }) {
|
|
39
|
-
const contextValue = (0, react_1.useContext)(PageScrollContext);
|
|
40
|
-
if (contextValue !== null) {
|
|
41
|
-
throw Error('PageScrollContext: only one provider allowed in jsx tree');
|
|
42
|
-
}
|
|
43
|
-
return react_1.default.createElement(PageScrollContext.Provider, { value: { adapter } }, children);
|
|
44
|
-
}
|
|
45
|
-
exports.PageScrollProvider = PageScrollProvider;
|
|
46
|
-
/**
|
|
47
|
-
* Хук использования реализации блокировки прокрутки.
|
|
48
|
-
* @return Реализация.
|
|
49
|
-
*/
|
|
50
|
-
function usePageScrollContext() {
|
|
51
|
-
const context = (0, react_1.useContext)(PageScrollContext);
|
|
52
|
-
return context || DEFAULTS;
|
|
53
|
-
}
|
|
54
|
-
exports.usePageScrollContext = usePageScrollContext;
|
|
6
|
+
exports.PageScrollLockContext = (0, react_1.createContext)({
|
|
7
|
+
adapter: (element, options) => new body_scroll_lock_1.PageScrollLockAdapterBSL(element, options),
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/_internal/page-scroll-lock/context.tsx"],"names":[],"mappings":";;;AAAA,iCAAsC;AACtC,kEAAuE;AAG1D,QAAA,qBAAqB,GAAG,IAAA,qBAAa,EAA6B;IAC7E,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,2CAAwB,CAAC,OAAO,EAAE,OAAO,CAAC;CAC9E,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.usePageScrollLock = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
4
5
|
const hooks_1 = require("../../hooks");
|
|
5
6
|
const context_1 = require("./context");
|
|
6
7
|
const DEFAULTS = {
|
|
@@ -12,15 +13,17 @@ const DEFAULTS = {
|
|
|
12
13
|
* @param ref Ref прокручиваемого элемента для которого нужно отключить прокрутку body.
|
|
13
14
|
* @param options Опции.
|
|
14
15
|
*/
|
|
15
|
-
function usePageScrollLock(ref, options
|
|
16
|
-
const { adapter } = (0,
|
|
16
|
+
function usePageScrollLock(ref, options) {
|
|
17
|
+
const { adapter } = (0, react_1.useContext)(context_1.PageScrollLockContext);
|
|
18
|
+
const { lockEnabled = DEFAULTS.lockEnabled, reserveScrollBarGap = DEFAULTS.reserveScrollBarGap } = options !== null && options !== void 0 ? options : DEFAULTS;
|
|
17
19
|
(0, hooks_1.useIsomorphicLayoutEffect)(() => {
|
|
18
20
|
const element = ref.current;
|
|
19
|
-
if (element &&
|
|
20
|
-
const pageScroll = adapter(element,
|
|
21
|
+
if (element && lockEnabled) {
|
|
22
|
+
const pageScroll = adapter(element, { reserveScrollBarGap });
|
|
21
23
|
pageScroll.lock();
|
|
22
24
|
return () => pageScroll.unlock();
|
|
23
25
|
}
|
|
24
|
-
}, [
|
|
26
|
+
}, [ref, lockEnabled, reserveScrollBarGap]);
|
|
25
27
|
}
|
|
26
28
|
exports.usePageScrollLock = usePageScrollLock;
|
|
29
|
+
//# sourceMappingURL=hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/_internal/page-scroll-lock/hook.ts"],"names":[],"mappings":";;;AAAA,iCAA8C;AAE9C,uCAAwD;AACxD,uCAAkD;AAMlD,MAAM,QAAQ,GAAgB;IAC5B,WAAW,EAAE,IAAI;IACjB,mBAAmB,EAAE,IAAI;CACjB,CAAC;AAEX;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,GAA2B,EAAE,OAAqB;IAClF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,kBAAU,EAAC,+BAAqB,CAAC,CAAC;IAEtD,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC,WAAW,EAAE,mBAAmB,GAAG,QAAQ,CAAC,mBAAmB,EAAE,GAC9F,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,QAAQ,CAAC;IAEtB,IAAA,iCAAyB,EAAC,GAAG,EAAE;QAC7B,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAE5B,IAAI,OAAO,IAAI,WAAW,EAAE;YAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAC;YAE7D,UAAU,CAAC,IAAI,EAAE,CAAC;YAElB,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;SAClC;IACH,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC;AAC9C,CAAC;AAjBD,8CAiBC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type { WithPageScrollLock, PageScrollLockAdapterFactory } from './types';
|
|
2
|
-
export { BSL_IGNORE_ATTR } from './adapters/body-scroll-lock';
|
|
1
|
+
export type { WithPageScrollLock, PageScrollLockOptions, PageScrollLockAdapter, PageScrollLockAdapterFactory, } from './types';
|
|
3
2
|
export { usePageScrollLock } from './hook';
|
|
4
|
-
export {
|
|
3
|
+
export { PageScrollLockContext } from './context';
|
|
4
|
+
export { PageScrollLockAdapterBSL, BSL_IGNORE_ATTR } from './adapters/body-scroll-lock';
|
|
5
|
+
export { PageScrollLockAdapterNucleons } from './adapters/ui-nucleons';
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var body_scroll_lock_1 = require("./adapters/body-scroll-lock");
|
|
5
|
-
Object.defineProperty(exports, "BSL_IGNORE_ATTR", { enumerable: true, get: function () { return body_scroll_lock_1.BSL_IGNORE_ATTR; } });
|
|
3
|
+
exports.PageScrollLockAdapterNucleons = exports.BSL_IGNORE_ATTR = exports.PageScrollLockAdapterBSL = exports.PageScrollLockContext = exports.usePageScrollLock = void 0;
|
|
6
4
|
var hook_1 = require("./hook");
|
|
7
5
|
Object.defineProperty(exports, "usePageScrollLock", { enumerable: true, get: function () { return hook_1.usePageScrollLock; } });
|
|
8
6
|
var context_1 = require("./context");
|
|
9
|
-
Object.defineProperty(exports, "
|
|
7
|
+
Object.defineProperty(exports, "PageScrollLockContext", { enumerable: true, get: function () { return context_1.PageScrollLockContext; } });
|
|
8
|
+
var body_scroll_lock_1 = require("./adapters/body-scroll-lock");
|
|
9
|
+
Object.defineProperty(exports, "PageScrollLockAdapterBSL", { enumerable: true, get: function () { return body_scroll_lock_1.PageScrollLockAdapterBSL; } });
|
|
10
|
+
Object.defineProperty(exports, "BSL_IGNORE_ATTR", { enumerable: true, get: function () { return body_scroll_lock_1.BSL_IGNORE_ATTR; } });
|
|
11
|
+
var ui_nucleons_1 = require("./adapters/ui-nucleons");
|
|
12
|
+
Object.defineProperty(exports, "PageScrollLockAdapterNucleons", { enumerable: true, get: function () { return ui_nucleons_1.PageScrollLockAdapterNucleons; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_internal/page-scroll-lock/index.ts"],"names":[],"mappings":";;;AAMA,+BAA2C;AAAlC,yGAAA,iBAAiB,OAAA;AAC1B,qCAAkD;AAAzC,gHAAA,qBAAqB,OAAA;AAC9B,gEAAwF;AAA/E,4HAAA,wBAAwB,OAAA;AAAE,mHAAA,eAAe,OAAA;AAClD,sDAAuE;AAA9D,4HAAA,6BAA6B,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/_internal/page-scroll-lock/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AlertBodyProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Основной контент Alert.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function AlertBody({ children, className, rootRef, withScrollDisable, scrollDisableOptions, ...restProps }: AlertBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AlertBody = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const page_scroll_lock_1 = require("../_internal/page-scroll-lock");
|
|
10
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
11
|
+
const alert_body_module_scss_1 = __importDefault(require("./alert-body.module.scss"));
|
|
12
|
+
const cx = bind_1.default.bind(alert_body_module_scss_1.default);
|
|
13
|
+
/**
|
|
14
|
+
* Основной контент Alert.
|
|
15
|
+
* @param props Свойства.
|
|
16
|
+
* @return Элемент.
|
|
17
|
+
*/
|
|
18
|
+
function AlertBody({ children, className, rootRef, withScrollDisable = false, scrollDisableOptions, ...restProps }) {
|
|
19
|
+
const ref = (0, react_1.useRef)(null);
|
|
20
|
+
(0, page_scroll_lock_1.usePageScrollLock)(ref, { lockEnabled: withScrollDisable, ...scrollDisableOptions });
|
|
21
|
+
(0, react_1.useImperativeHandle)(rootRef, () => ref.current);
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)("div", { ...restProps, ref: ref, className: cx('body', className), children: children }));
|
|
23
|
+
}
|
|
24
|
+
exports.AlertBody = AlertBody;
|
|
25
|
+
//# sourceMappingURL=alert-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-body.js","sourceRoot":"","sources":["../../src/alert/alert-body.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAAoD;AACpD,oEAAkE;AAElE,2DAAyC;AACzC,sFAA8C;AAE9C,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,gCAAM,CAAC,CAAC;AAEnC;;;;GAIG;AACH,SAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,OAAO,EACP,iBAAiB,GAAG,KAAK,EACzB,oBAAoB,EACpB,GAAG,SAAS,EACG;IACf,MAAM,GAAG,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAC;IAEzC,IAAA,oCAAiB,EAAC,GAAG,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,oBAAoB,EAAE,CAAC,CAAC;IAEpF,IAAA,2BAAmB,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,OAAyB,CAAC,CAAC;IAElE,OAAO,CACL,mCAAS,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,YAC3D,QAAQ,GACL,CACP,CAAC;AACJ,CAAC;AAnBD,8BAmBC"}
|
package/alert/alert.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AlertProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Алерт - небольше модальное окно, блокирующее работу с основным интерфейсом до тех пор, пока оно не будет закрыто.
|
|
4
|
+
* Обычно используется для подтверждения действия или выбора действия из списка.
|
|
5
|
+
* @param props Свойства.
|
|
6
|
+
* @return Элемент.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Alert({ children, onClose, className, 'data-testid': testId, ...restProps }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
package/alert/alert.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Alert = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const modal_overlay_1 = require("../modal-overlay");
|
|
9
|
+
const plate_1 = require("../plate");
|
|
10
|
+
const top_bar_1 = require("../top-bar");
|
|
11
|
+
const bottom_bar_1 = require("../bottom-bar");
|
|
12
|
+
const define_slots_1 = require("../helpers/define-slots");
|
|
13
|
+
const utils_1 = require("../modal-overlay/utils");
|
|
14
|
+
const alert_body_1 = require("./alert-body");
|
|
15
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
16
|
+
const alert_module_scss_1 = __importDefault(require("./alert.module.scss"));
|
|
17
|
+
const cx = bind_1.default.bind(alert_module_scss_1.default);
|
|
18
|
+
/**
|
|
19
|
+
* Алерт - небольше модальное окно, блокирующее работу с основным интерфейсом до тех пор, пока оно не будет закрыто.
|
|
20
|
+
* Обычно используется для подтверждения действия или выбора действия из списка.
|
|
21
|
+
* @param props Свойства.
|
|
22
|
+
* @return Элемент.
|
|
23
|
+
*/
|
|
24
|
+
function Alert({ children, onClose, className, 'data-testid': testId = 'alert', ...restProps }) {
|
|
25
|
+
const { topBar, body, bottomBar } = (0, define_slots_1.defineSlots)(children, {
|
|
26
|
+
topBar: top_bar_1.TopBar,
|
|
27
|
+
body: alert_body_1.AlertBody,
|
|
28
|
+
bottomBar: bottom_bar_1.BottomBar,
|
|
29
|
+
});
|
|
30
|
+
const overlayClickBind = (0, utils_1.useExactClick)(onClose);
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(modal_overlay_1.ModalOverlay, { className: alert_module_scss_1.default.overlay, ...overlayClickBind, children: (0, jsx_runtime_1.jsxs)(plate_1.Plate, { ...restProps, rounds: 'm', shadow: 'z4', className: cx('alert', className), "data-testid": testId, children: [topBar, body, bottomBar] }) }));
|
|
32
|
+
}
|
|
33
|
+
exports.Alert = Alert;
|
|
34
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":";;;;;;;AAAA,oDAAgD;AAChD,oCAAiC;AACjC,wCAAoC;AACpC,8CAA0C;AAC1C,0DAAsD;AACtD,kDAAuD;AAEvD,6CAAyC;AACzC,2DAAyC;AACzC,4EAAyC;AAEzC,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,2BAAM,CAAC,CAAC;AAEnC;;;;;GAKG;AACH,SAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,aAAa,EAAE,MAAM,GAAG,OAAO,EAC/B,GAAG,SAAS,EACD;IACX,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAA,0BAAW,EAAC,QAAQ,EAAE;QACxD,MAAM,EAAE,gBAAM;QACd,IAAI,EAAE,sBAAS;QACf,SAAS,EAAE,sBAAS;KACrB,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAG,IAAA,qBAAa,EAAC,OAAO,CAAC,CAAC;IAEhD,OAAO,CACL,uBAAC,4BAAY,IAAC,SAAS,EAAE,2BAAM,CAAC,OAAO,KAAM,gBAAgB,YAC3D,wBAAC,aAAK,OACA,SAAS,EACb,MAAM,EAAC,GAAG,EACV,MAAM,EAAC,IAAI,EACX,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,iBACpB,MAAM,aAElB,MAAM,EACN,IAAI,EACJ,SAAS,IACJ,GACK,CAChB,CAAC;AACJ,CAAC;AA9BD,sBA8BC"}
|
package/alert/index.d.ts
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface AlertProps extends WithPageScrollLock {
|
|
5
|
-
/** Основное содержимое. */
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
/** Будет вызвана при закрытии окна нажатием на затемнение. */
|
|
8
|
-
onClose?: VoidFunction;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Компонент модального диалога.
|
|
12
|
-
* @param props Свойства.
|
|
13
|
-
* @return Элемент.
|
|
14
|
-
*/
|
|
15
|
-
export declare function Alert({ children, withScrollDisable, scrollDisableOptions, onClose, }: AlertProps): JSX.Element;
|
|
16
|
-
/**
|
|
17
|
-
* Основной контент Alert.
|
|
18
|
-
* @param props Свойства.
|
|
19
|
-
* @return Элемент.
|
|
20
|
-
*/
|
|
21
|
-
export declare function AlertBody({ children }: CardContentProps): JSX.Element;
|
|
1
|
+
export type { AlertProps, AlertBodyProps } from './types';
|
|
2
|
+
export { Alert } from './alert';
|
|
3
|
+
export { AlertBody } from './alert-body';
|
package/alert/index.js
CHANGED
|
@@ -1,71 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
3
|
exports.AlertBody = exports.Alert = void 0;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const bottom_bar_1 = require("../bottom-bar");
|
|
36
|
-
const define_slots_1 = require("../helpers/define-slots");
|
|
37
|
-
const utils_1 = require("../modal-overlay/utils");
|
|
38
|
-
const bind_1 = __importDefault(require("classnames/bind"));
|
|
39
|
-
const alert_module_scss_1 = __importDefault(require("./alert.module.scss"));
|
|
40
|
-
const cx = bind_1.default.bind(alert_module_scss_1.default);
|
|
41
|
-
/**
|
|
42
|
-
* Компонент модального диалога.
|
|
43
|
-
* @param props Свойства.
|
|
44
|
-
* @return Элемент.
|
|
45
|
-
*/
|
|
46
|
-
function Alert({ children, withScrollDisable = false, scrollDisableOptions, onClose, }) {
|
|
47
|
-
const scrollableRef = (0, react_1.useRef)(null);
|
|
48
|
-
(0, page_scroll_lock_1.usePageScrollLock)(scrollableRef, Object.assign({ lockEnabled: withScrollDisable }, scrollDisableOptions));
|
|
49
|
-
const { topBar, body, bottomBar } = (0, define_slots_1.defineSlots)(children, {
|
|
50
|
-
topBar: top_bar_1.TopBar,
|
|
51
|
-
body: AlertBody,
|
|
52
|
-
bottomBar: bottom_bar_1.BottomBar,
|
|
53
|
-
});
|
|
54
|
-
const overlayClickBind = (0, utils_1.useExactClick)(onClose);
|
|
55
|
-
(0, react_1.useImperativeHandle)(body === null || body === void 0 ? void 0 : body.props.scrollableRef, () => scrollableRef.current);
|
|
56
|
-
return (react_1.default.createElement(modal_overlay_1.ModalOverlay, Object.assign({ className: alert_module_scss_1.default.overlay }, overlayClickBind),
|
|
57
|
-
react_1.default.createElement(card_1.Card, { shadow: 'z4', rounds: 'm', className: cx('alert'), "data-testid": 'alert' },
|
|
58
|
-
topBar && react_1.default.createElement(top_bar_1.TopBar, Object.assign({}, topBar.props, { size: 's' })),
|
|
59
|
-
body && (react_1.default.createElement(card_1.CardContent, Object.assign({}, body.props, { scrollableRef: scrollableRef }), body)),
|
|
60
|
-
bottomBar && react_1.default.createElement(bottom_bar_1.BottomBar, Object.assign({}, bottomBar.props, { size: 's' })))));
|
|
61
|
-
}
|
|
62
|
-
exports.Alert = Alert;
|
|
63
|
-
/**
|
|
64
|
-
* Основной контент Alert.
|
|
65
|
-
* @param props Свойства.
|
|
66
|
-
* @return Элемент.
|
|
67
|
-
*/
|
|
68
|
-
function AlertBody({ children }) {
|
|
69
|
-
return react_1.default.createElement(react_1.default.Fragment, null, children);
|
|
70
|
-
}
|
|
71
|
-
exports.AlertBody = AlertBody;
|
|
4
|
+
var alert_1 = require("./alert");
|
|
5
|
+
Object.defineProperty(exports, "Alert", { enumerable: true, get: function () { return alert_1.Alert; } });
|
|
6
|
+
var alert_body_1 = require("./alert-body");
|
|
7
|
+
Object.defineProperty(exports, "AlertBody", { enumerable: true, get: function () { return alert_body_1.AlertBody; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":";;;AACA,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,2CAAyC;AAAhC,uGAAA,SAAS,OAAA"}
|
package/alert/types.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes, Ref } from 'react';
|
|
2
|
+
import type { WithPageScrollLock } from '../_internal/page-scroll-lock';
|
|
3
|
+
import type { WithTestId } from '../types';
|
|
4
|
+
export interface AlertProps extends HTMLAttributes<HTMLDivElement>, WithTestId {
|
|
5
|
+
/** Будет вызвана при закрытии окна нажатием на затемнение. */
|
|
6
|
+
onClose?: VoidFunction;
|
|
7
|
+
}
|
|
8
|
+
export interface AlertBodyProps extends HTMLAttributes<HTMLDivElement>, WithTestId, WithPageScrollLock {
|
|
9
|
+
rootRef?: Ref<HTMLDivElement>;
|
|
10
|
+
}
|
package/alert/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/alert/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ArrowButtonProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Кнопка-стрелка - круглая кнопка со стрелкой.
|
|
4
|
+
* @param props Свойства. Поддерживаются свойства элемента button.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ArrowButton: ({ size, direction, className, "data-testid": testId, ...buttonProps }: ArrowButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ArrowButton = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const ArrowUp_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/ArrowUp"));
|
|
9
|
+
const ArrowRight_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/ArrowRight"));
|
|
10
|
+
const ArrowDown_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/ArrowDown"));
|
|
11
|
+
const ArrowLeft_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/ArrowLeft"));
|
|
12
|
+
const ArrowUp_2 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/ArrowUp"));
|
|
13
|
+
const ArrowRight_2 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/ArrowRight"));
|
|
14
|
+
const ArrowDown_2 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/ArrowDown"));
|
|
15
|
+
const ArrowLeft_2 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/ArrowLeft"));
|
|
16
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
17
|
+
const arrow_button_module_scss_1 = __importDefault(require("./arrow-button.module.scss"));
|
|
18
|
+
const cx = bind_1.default.bind(arrow_button_module_scss_1.default);
|
|
19
|
+
const ICONS = {
|
|
20
|
+
s: {
|
|
21
|
+
up: ArrowUp_2.default,
|
|
22
|
+
right: ArrowRight_2.default,
|
|
23
|
+
down: ArrowDown_2.default,
|
|
24
|
+
left: ArrowLeft_2.default,
|
|
25
|
+
},
|
|
26
|
+
l: {
|
|
27
|
+
up: ArrowUp_1.default,
|
|
28
|
+
right: ArrowRight_1.default,
|
|
29
|
+
down: ArrowDown_1.default,
|
|
30
|
+
left: ArrowLeft_1.default,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Кнопка-стрелка - круглая кнопка со стрелкой.
|
|
35
|
+
* @param props Свойства. Поддерживаются свойства элемента button.
|
|
36
|
+
* @return Элемент.
|
|
37
|
+
*/
|
|
38
|
+
const ArrowButton = ({ size = 'l', direction = 'right', className, 'data-testid': testId = 'arrow-button', ...buttonProps }) => {
|
|
39
|
+
const Icon = ICONS[size][direction];
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)("button", { type: 'button', ...buttonProps, className: cx('arrow-button', `size-${size}`, className), "data-testid": testId, children: (0, jsx_runtime_1.jsx)(Icon, { "aria-hidden": true, fill: 'currentColor' }) }));
|
|
41
|
+
};
|
|
42
|
+
exports.ArrowButton = ArrowButton;
|
|
43
|
+
//# sourceMappingURL=arrow-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow-button.js","sourceRoot":"","sources":["../../src/arrow-button/arrow-button.tsx"],"names":[],"mappings":";;;;;;;AAEA,+FAAqE;AACrE,qGAA2E;AAC3E,mGAAyE;AACzE,mGAAyE;AACzE,+FAA0E;AAC1E,qGAAgF;AAChF,mGAA8E;AAC9E,mGAA8E;AAC9E,2DAAyC;AACzC,0FAAgD;AAEhD,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,kCAAM,CAAC,CAAC;AAEnC,MAAM,KAAK,GAAG;IACZ,CAAC,EAAE;QACD,EAAE,EAAE,iBAAU;QACd,KAAK,EAAE,oBAAa;QACpB,IAAI,EAAE,mBAAY;QAClB,IAAI,EAAE,mBAAY;KACyD;IAC7E,CAAC,EAAE;QACD,EAAE,EAAE,iBAAK;QACT,KAAK,EAAE,oBAAQ;QACf,IAAI,EAAE,mBAAO;QACb,IAAI,EAAE,mBAAO;KAC8D;CACrE,CAAC;AAEX;;;;GAIG;AACI,MAAM,WAAW,GAAG,CAAC,EAC1B,IAAI,GAAG,GAAG,EACV,SAAS,GAAG,OAAO,EACnB,SAAS,EACT,aAAa,EAAE,MAAM,GAAG,cAAc,EACtC,GAAG,WAAW,EACG,EAAE,EAAE;IACrB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;IAEpC,OAAO,CACL,mCACE,IAAI,EAAC,QAAQ,KACT,WAAW,EACf,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,QAAQ,IAAI,EAAE,EAAE,SAAS,CAAC,iBAC3C,MAAM,YAEnB,uBAAC,IAAI,yBAAa,IAAI,EAAC,cAAc,GAAG,GACjC,CACV,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,WAAW,eAmBtB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use '../colors';
|
|
2
2
|
@use '../utils';
|
|
3
|
-
@
|
|
3
|
+
@use '../shadows';
|
|
4
4
|
|
|
5
5
|
.arrow-button {
|
|
6
6
|
@include utils.focus-visible;
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
&.size-s {
|
|
26
26
|
width: 32px;
|
|
27
27
|
height: 32px;
|
|
28
|
-
@
|
|
28
|
+
@include shadows.box-shadow('z2');
|
|
29
29
|
&:not(:disabled):hover {
|
|
30
|
-
@
|
|
30
|
+
@include shadows.box-shadow('z3');
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
&.size-l {
|
|
34
34
|
width: 56px;
|
|
35
35
|
height: 56px;
|
|
36
|
-
@
|
|
36
|
+
@include shadows.box-shadow('z3');
|
|
37
37
|
&:not(:disabled):hover {
|
|
38
|
-
@
|
|
38
|
+
@include shadows.box-shadow('z4');
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
package/arrow-button/index.d.ts
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export type ArrowDirection = 'up' | 'right' | 'down' | 'left';
|
|
4
|
-
export interface ArrowButtonProps extends Omit<JSX.IntrinsicElements['button'], 'size' | 'children'> {
|
|
5
|
-
/** Размер. */
|
|
6
|
-
size?: ArrowButtonSize;
|
|
7
|
-
/** Направление (отвечает за иконку). */
|
|
8
|
-
direction?: ArrowDirection;
|
|
9
|
-
/** Идентификатор для систем автоматизированного тестирования. */
|
|
10
|
-
'data-testid'?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Компонент круглой кнопки со стрелкой.
|
|
14
|
-
* @param props Свойства. Поддерживаются свойства элемента button.
|
|
15
|
-
* @return Элемент.
|
|
16
|
-
*/
|
|
17
|
-
export declare const ArrowButton: ({ size, direction, className, "data-testid": testId, ...buttonProps }: ArrowButtonProps) => JSX.Element;
|
|
1
|
+
export type { ArrowButtonSize, ArrowDirection, ArrowButtonProps } from './types';
|
|
2
|
+
export { ArrowButton } from './arrow-button';
|
package/arrow-button/index.js
CHANGED
|
@@ -1,55 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.ArrowButton = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const arrow_up_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/arrow-up"));
|
|
22
|
-
const arrow_right_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/arrow-right"));
|
|
23
|
-
const arrow_down_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/arrow-down"));
|
|
24
|
-
const arrow_left_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/arrow-left"));
|
|
25
|
-
const arrow_up_2 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/arrow-up"));
|
|
26
|
-
const arrow_right_2 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/arrow-right"));
|
|
27
|
-
const arrow_down_2 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/arrow-down"));
|
|
28
|
-
const arrow_left_2 = __importDefault(require("@sima-land/ui-quarks/icons/16x16/Stroked/arrow-left"));
|
|
29
|
-
const cx = bind_1.default.bind(arrow_button_module_scss_1.default);
|
|
30
|
-
const ICONS = {
|
|
31
|
-
s: {
|
|
32
|
-
up: arrow_up_2.default,
|
|
33
|
-
right: arrow_right_2.default,
|
|
34
|
-
down: arrow_down_2.default,
|
|
35
|
-
left: arrow_left_2.default,
|
|
36
|
-
},
|
|
37
|
-
l: {
|
|
38
|
-
up: arrow_up_1.default,
|
|
39
|
-
right: arrow_right_1.default,
|
|
40
|
-
down: arrow_down_1.default,
|
|
41
|
-
left: arrow_left_1.default,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Компонент круглой кнопки со стрелкой.
|
|
46
|
-
* @param props Свойства. Поддерживаются свойства элемента button.
|
|
47
|
-
* @return Элемент.
|
|
48
|
-
*/
|
|
49
|
-
const ArrowButton = (_a) => {
|
|
50
|
-
var { size = 'l', direction = 'right', className, 'data-testid': testId = 'arrow-button' } = _a, buttonProps = __rest(_a, ["size", "direction", "className", 'data-testid']);
|
|
51
|
-
const Icon = ICONS[size][direction];
|
|
52
|
-
return (react_1.default.createElement("button", Object.assign({ type: 'button' }, buttonProps, { className: cx('arrow-button', `size-${size}`, className), "data-testid": testId }),
|
|
53
|
-
react_1.default.createElement(Icon, { "aria-hidden": true, fill: 'currentColor' })));
|
|
54
|
-
};
|
|
55
|
-
exports.ArrowButton = ArrowButton;
|
|
4
|
+
var arrow_button_1 = require("./arrow-button");
|
|
5
|
+
Object.defineProperty(exports, "ArrowButton", { enumerable: true, get: function () { return arrow_button_1.ArrowButton; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/arrow-button/index.ts"],"names":[],"mappings":";;;AACA,+CAA6C;AAApC,2GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import type { WithTestId } from '../types';
|
|
3
|
+
export type ArrowButtonSize = 's' | 'l';
|
|
4
|
+
export type ArrowDirection = 'up' | 'right' | 'down' | 'left';
|
|
5
|
+
export interface ArrowButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'size' | 'children'>, WithTestId {
|
|
6
|
+
/** Размер. */
|
|
7
|
+
size?: ArrowButtonSize;
|
|
8
|
+
/** Направление (отвечает за иконку). */
|
|
9
|
+
direction?: ArrowDirection;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/arrow-button/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { AutocompleteProps } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* Поле ввода с подсказками.
|
|
5
4
|
* @param props Свойства.
|
|
6
5
|
* @return Элемент.
|
|
7
6
|
*/
|
|
8
|
-
export declare function Autocomplete({ children, loading, filterOption, dropdownProps, autoComplete, autoFocus, defaultValue, disabled, id, name, onBlur, onChange, onFocus, onInput, placeholder, readOnly, required, type, value, adornmentEnd, baseInputProps, ...restProps }: AutocompleteProps): JSX.Element;
|
|
7
|
+
export declare function Autocomplete({ children, loading, filterOption, dropdownProps, onMenuOpen, onMenuClose, optionsStub, autoComplete, autoFocus, defaultValue, disabled, id, name, onBlur, onChange, onFocus, onInput, placeholder, readOnly, required, type, value, adornmentEnd, baseInputProps, ...restProps }: AutocompleteProps): import("react/jsx-runtime").JSX.Element;
|