@salutejs/plasma-new-hope 0.326.1-canary.2018.15775755664.0 → 0.326.1-canary.2019.15674501487.0
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/cjs/components/Calendar/CalendarBase/CalendarBase.js +0 -12
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +0 -12
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +0 -3
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +0 -3
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +0 -3
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +0 -3
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/cjs/components/Carousel/CarouselNew/Carousel.css +5 -5
- package/cjs/components/Carousel/CarouselNew/Carousel.js +6 -9
- package/cjs/components/Carousel/CarouselNew/Carousel.js.map +1 -1
- package/cjs/components/Carousel/CarouselNew/Carousel.styles.js +4 -13
- package/cjs/components/Carousel/CarouselNew/Carousel.styles.js.map +1 -1
- package/cjs/components/Carousel/CarouselNew/Carousel.styles_151pk3s.css +5 -0
- package/cjs/components/Carousel/CarouselNew/Carousel.tokens.js +1 -9
- package/cjs/components/Carousel/CarouselNew/Carousel.tokens.js.map +1 -1
- package/cjs/components/Carousel/CarouselNew/hooks/useCarousel.js +357 -49
- package/cjs/components/Carousel/CarouselNew/hooks/useCarousel.js.map +1 -1
- package/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.js +38 -52
- package/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.js.map +1 -1
- package/cjs/components/Carousel/CarouselOld/CarouselItem.js +1 -1
- package/cjs/components/Carousel/CarouselOld/CarouselItem.js.map +1 -1
- package/{es/components/Carousel/CarouselOld/CarouselItem_uvoxfy.css → cjs/components/Carousel/CarouselOld/CarouselItem_cghzk7.css} +1 -1
- package/cjs/components/CodeField/CodeField.css +6 -6
- package/cjs/components/CodeField/CodeField.styles.js +1 -1
- package/cjs/components/CodeField/CodeField.styles.js.map +1 -1
- package/{es/components/CodeField/CodeField.styles_7zxgpc.css → cjs/components/CodeField/CodeField.styles_ebdpd0.css} +1 -1
- package/cjs/components/Drawer/Drawer.js +3 -4
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/hooks/useDrawer.js +2 -2
- package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/cjs/components/Mask/Mask.js +3 -3
- package/cjs/components/Mask/Mask.js.map +1 -1
- package/cjs/components/Modal/Modal.js +2 -3
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Modal/hooks/useModal.js +1 -1
- package/cjs/components/Modal/hooks/useModal.js.map +1 -1
- package/cjs/components/Popup/Popup.js +1 -2
- package/cjs/components/Popup/Popup.js.map +1 -1
- package/cjs/components/Popup/PopupContext.js +15 -13
- package/cjs/components/Popup/PopupContext.js.map +1 -1
- package/cjs/components/Rating/Rating.css +6 -6
- package/cjs/components/Rating/Rating.styles.js +1 -1
- package/cjs/components/Rating/Rating.styles.js.map +1 -1
- package/{es/components/Rating/Rating.styles_hi5qwl.css → cjs/components/Rating/Rating.styles_dg76kk.css} +1 -1
- package/cjs/components/Rating/utils/getIcons.css +6 -6
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.css +4 -4
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/{VerticalTabs.styles_1egpt45.css → VerticalTabs.styles_1khdtzl.css} +1 -1
- package/cjs/index.css +22 -22
- package/cjs/index.js +0 -2
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Calendar/CalendarBase/CalendarBase.js +0 -12
- package/emotion/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +0 -12
- package/emotion/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +0 -3
- package/emotion/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +0 -3
- package/emotion/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +0 -3
- package/emotion/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +0 -3
- package/emotion/cjs/components/Carousel/CarouselNew/Carousel.js +6 -9
- package/emotion/cjs/components/Carousel/CarouselNew/Carousel.styles.js +17 -12
- package/emotion/cjs/components/Carousel/CarouselNew/Carousel.tokens.js +1 -9
- package/emotion/cjs/components/Carousel/CarouselNew/hooks/useCarousel.js +353 -50
- package/emotion/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.js +38 -52
- package/emotion/cjs/components/Carousel/CarouselOld/CarouselItem.js +1 -1
- package/emotion/cjs/components/CodeField/CodeField.styles.js +6 -6
- package/emotion/cjs/components/Drawer/Drawer.js +8 -8
- package/emotion/cjs/components/Drawer/hooks/useDrawer.js +2 -2
- package/emotion/cjs/components/Mask/Mask.js +3 -3
- package/emotion/cjs/components/Modal/Modal.js +5 -6
- package/emotion/cjs/components/Modal/hooks/useModal.js +1 -1
- package/emotion/cjs/components/Popup/Popup.js +1 -1
- package/emotion/cjs/components/Popup/PopupContext.js +20 -14
- package/emotion/cjs/components/Rating/Rating.styles.js +11 -11
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +8 -8
- package/emotion/cjs/examples/plasma_b2c/components/Carousel/Carousel.config.js +2 -2
- package/emotion/cjs/examples/plasma_b2c/components/Carousel/Carousel.stories.tsx +14 -10
- package/emotion/cjs/examples/plasma_web/components/Carousel/Carousel.config.js +2 -2
- package/emotion/cjs/examples/plasma_web/components/Carousel/Carousel.stories.tsx +15 -10
- package/emotion/cjs/hooks/index.js +1 -8
- package/emotion/es/components/Calendar/CalendarBase/CalendarBase.js +0 -12
- package/emotion/es/components/Calendar/CalendarDouble/CalendarDouble.js +0 -12
- package/emotion/es/components/Calendar/ui/CalendarDays/CalendarDays.js +0 -3
- package/emotion/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +0 -3
- package/emotion/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +0 -3
- package/emotion/es/components/Calendar/ui/CalendarYears/CalendarYears.js +0 -3
- package/emotion/es/components/Carousel/CarouselNew/Carousel.js +6 -9
- package/emotion/es/components/Carousel/CarouselNew/Carousel.styles.js +18 -13
- package/emotion/es/components/Carousel/CarouselNew/Carousel.tokens.js +1 -9
- package/emotion/es/components/Carousel/CarouselNew/hooks/useCarousel.js +349 -50
- package/emotion/es/components/Carousel/CarouselNew/ui/Dots/Dots.js +38 -52
- package/emotion/es/components/Carousel/CarouselOld/CarouselItem.js +1 -1
- package/emotion/es/components/CodeField/CodeField.styles.js +6 -6
- package/emotion/es/components/Drawer/Drawer.js +3 -3
- package/emotion/es/components/Drawer/hooks/useDrawer.js +2 -2
- package/emotion/es/components/Mask/Mask.js +3 -3
- package/emotion/es/components/Modal/Modal.js +3 -4
- package/emotion/es/components/Modal/hooks/useModal.js +1 -1
- package/emotion/es/components/Popup/Popup.js +2 -2
- package/emotion/es/components/Popup/PopupContext.js +20 -14
- package/emotion/es/components/Rating/Rating.styles.js +11 -11
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +8 -8
- package/emotion/es/examples/plasma_b2c/components/Carousel/Carousel.config.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/Carousel/Carousel.stories.tsx +14 -10
- package/emotion/es/examples/plasma_web/components/Carousel/Carousel.config.js +2 -2
- package/emotion/es/examples/plasma_web/components/Carousel/Carousel.stories.tsx +15 -10
- package/emotion/es/hooks/index.js +1 -2
- package/es/components/Calendar/CalendarBase/CalendarBase.js +0 -12
- package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +0 -12
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +0 -3
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +0 -3
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +0 -3
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +0 -3
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/es/components/Carousel/CarouselNew/Carousel.css +5 -5
- package/es/components/Carousel/CarouselNew/Carousel.js +6 -9
- package/es/components/Carousel/CarouselNew/Carousel.js.map +1 -1
- package/es/components/Carousel/CarouselNew/Carousel.styles.js +4 -13
- package/es/components/Carousel/CarouselNew/Carousel.styles.js.map +1 -1
- package/es/components/Carousel/CarouselNew/Carousel.styles_151pk3s.css +5 -0
- package/es/components/Carousel/CarouselNew/Carousel.tokens.js +1 -9
- package/es/components/Carousel/CarouselNew/Carousel.tokens.js.map +1 -1
- package/es/components/Carousel/CarouselNew/hooks/useCarousel.js +349 -51
- package/es/components/Carousel/CarouselNew/hooks/useCarousel.js.map +1 -1
- package/es/components/Carousel/CarouselNew/ui/Dots/Dots.js +38 -52
- package/es/components/Carousel/CarouselNew/ui/Dots/Dots.js.map +1 -1
- package/es/components/Carousel/CarouselOld/CarouselItem.js +1 -1
- package/es/components/Carousel/CarouselOld/CarouselItem.js.map +1 -1
- package/{cjs/components/Carousel/CarouselOld/CarouselItem_uvoxfy.css → es/components/Carousel/CarouselOld/CarouselItem_cghzk7.css} +1 -1
- package/es/components/CodeField/CodeField.css +6 -6
- package/es/components/CodeField/CodeField.styles.js +1 -1
- package/es/components/CodeField/CodeField.styles.js.map +1 -1
- package/{cjs/components/CodeField/CodeField.styles_7zxgpc.css → es/components/CodeField/CodeField.styles_ebdpd0.css} +1 -1
- package/es/components/Drawer/Drawer.js +3 -4
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/hooks/useDrawer.js +2 -2
- package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/es/components/Mask/Mask.js +3 -3
- package/es/components/Mask/Mask.js.map +1 -1
- package/es/components/Modal/Modal.js +2 -3
- package/es/components/Modal/Modal.js.map +1 -1
- package/es/components/Modal/hooks/useModal.js +1 -1
- package/es/components/Modal/hooks/useModal.js.map +1 -1
- package/es/components/Popup/Popup.js +1 -2
- package/es/components/Popup/Popup.js.map +1 -1
- package/es/components/Popup/PopupContext.js +16 -14
- package/es/components/Popup/PopupContext.js.map +1 -1
- package/es/components/Rating/Rating.css +6 -6
- package/es/components/Rating/Rating.styles.js +1 -1
- package/es/components/Rating/Rating.styles.js.map +1 -1
- package/{cjs/components/Rating/Rating.styles_hi5qwl.css → es/components/Rating/Rating.styles_dg76kk.css} +1 -1
- package/es/components/Rating/utils/getIcons.css +6 -6
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.css +4 -4
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/{VerticalTabs.styles_1egpt45.css → VerticalTabs.styles_1khdtzl.css} +1 -1
- package/es/index.css +22 -22
- package/es/index.js +0 -1
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +0 -12
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +0 -12
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +0 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +0 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +0 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +0 -3
- package/styled-components/cjs/components/Carousel/CarouselNew/Carousel.js +6 -9
- package/styled-components/cjs/components/Carousel/CarouselNew/Carousel.styles.js +3 -6
- package/styled-components/cjs/components/Carousel/CarouselNew/Carousel.tokens.js +1 -9
- package/styled-components/cjs/components/Carousel/CarouselNew/hooks/useCarousel.js +353 -50
- package/styled-components/cjs/components/Carousel/CarouselNew/ui/Dots/Dots.js +38 -52
- package/styled-components/cjs/components/Carousel/CarouselOld/CarouselItem.js +1 -1
- package/styled-components/cjs/components/CodeField/CodeField.styles.js +1 -1
- package/styled-components/cjs/components/Drawer/Drawer.js +8 -8
- package/styled-components/cjs/components/Drawer/hooks/useDrawer.js +2 -2
- package/styled-components/cjs/components/Mask/Mask.js +3 -3
- package/styled-components/cjs/components/Modal/Modal.js +5 -6
- package/styled-components/cjs/components/Modal/hooks/useModal.js +1 -1
- package/styled-components/cjs/components/Popup/Popup.js +1 -1
- package/styled-components/cjs/components/Popup/PopupContext.js +20 -14
- package/styled-components/cjs/components/Rating/Rating.styles.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Carousel/Carousel.config.js +2 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Carousel/Carousel.stories.tsx +14 -10
- package/styled-components/cjs/examples/plasma_web/components/Carousel/Carousel.config.js +2 -2
- package/styled-components/cjs/examples/plasma_web/components/Carousel/Carousel.stories.tsx +15 -10
- package/styled-components/cjs/hooks/index.js +1 -8
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +0 -12
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +0 -12
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +0 -3
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +0 -3
- package/styled-components/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +0 -3
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +0 -3
- package/styled-components/es/components/Carousel/CarouselNew/Carousel.js +6 -9
- package/styled-components/es/components/Carousel/CarouselNew/Carousel.styles.js +4 -7
- package/styled-components/es/components/Carousel/CarouselNew/Carousel.tokens.js +1 -9
- package/styled-components/es/components/Carousel/CarouselNew/hooks/useCarousel.js +349 -50
- package/styled-components/es/components/Carousel/CarouselNew/ui/Dots/Dots.js +38 -52
- package/styled-components/es/components/Carousel/CarouselOld/CarouselItem.js +1 -1
- package/styled-components/es/components/CodeField/CodeField.styles.js +1 -1
- package/styled-components/es/components/Drawer/Drawer.js +3 -3
- package/styled-components/es/components/Drawer/hooks/useDrawer.js +2 -2
- package/styled-components/es/components/Mask/Mask.js +3 -3
- package/styled-components/es/components/Modal/Modal.js +3 -4
- package/styled-components/es/components/Modal/hooks/useModal.js +1 -1
- package/styled-components/es/components/Popup/Popup.js +2 -2
- package/styled-components/es/components/Popup/PopupContext.js +20 -14
- package/styled-components/es/components/Rating/Rating.styles.js +1 -1
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Carousel/Carousel.config.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Carousel/Carousel.stories.tsx +14 -10
- package/styled-components/es/examples/plasma_web/components/Carousel/Carousel.config.js +2 -2
- package/styled-components/es/examples/plasma_web/components/Carousel/Carousel.stories.tsx +15 -10
- package/styled-components/es/hooks/index.js +1 -2
- package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
- package/types/components/Calendar/CalendarDouble/CalendarDouble.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarMonths/CalendarMonths.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarQuarters/CalendarQuarters.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarYears/CalendarYears.d.ts.map +1 -1
- package/types/components/Carousel/CarouselNew/Carousel.d.ts.map +1 -1
- package/types/components/Carousel/CarouselNew/Carousel.styles.d.ts +1 -4
- package/types/components/Carousel/CarouselNew/Carousel.styles.d.ts.map +1 -1
- package/types/components/Carousel/CarouselNew/Carousel.tokens.d.ts +0 -8
- package/types/components/Carousel/CarouselNew/Carousel.tokens.d.ts.map +1 -1
- package/types/components/Carousel/CarouselNew/Carousel.types.d.ts +3 -8
- package/types/components/Carousel/CarouselNew/Carousel.types.d.ts.map +1 -1
- package/types/components/Carousel/CarouselNew/hooks/useCarousel.d.ts +52 -11
- package/types/components/Carousel/CarouselNew/hooks/useCarousel.d.ts.map +1 -1
- package/types/components/Carousel/CarouselNew/ui/Dots/Dots.d.ts.map +1 -1
- package/types/components/Carousel/CarouselOld/CarouselItem.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.d.ts +1 -1
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/hooks/useDrawer.d.ts.map +1 -1
- package/types/components/Modal/Modal.d.ts +1 -1
- package/types/components/Modal/Modal.d.ts.map +1 -1
- package/types/components/Popup/Popup.d.ts +1 -1
- package/types/components/Popup/Popup.d.ts.map +1 -1
- package/types/components/Popup/Popup.types.d.ts +1 -1
- package/types/components/Popup/Popup.types.d.ts.map +1 -1
- package/types/components/Popup/PopupContext.d.ts.map +1 -1
- package/types/hooks/index.d.ts +0 -1
- package/types/hooks/index.d.ts.map +1 -1
- package/cjs/components/Carousel/CarouselNew/Carousel.styles_1benby5.css +0 -5
- package/cjs/hooks/useDisableScroll.js +0 -30
- package/cjs/hooks/useDisableScroll.js.map +0 -1
- package/emotion/cjs/hooks/useDisableScroll.js +0 -28
- package/emotion/es/hooks/useDisableScroll.js +0 -22
- package/es/components/Carousel/CarouselNew/Carousel.styles_1benby5.css +0 -5
- package/es/hooks/useDisableScroll.js +0 -26
- package/es/hooks/useDisableScroll.js.map +0 -1
- package/styled-components/cjs/hooks/useDisableScroll.js +0 -28
- package/styled-components/es/hooks/useDisableScroll.js +0 -22
- package/types/hooks/useDisableScroll.d.ts +0 -3
- package/types/hooks/useDisableScroll.d.ts.map +0 -1
@@ -11,7 +11,7 @@ var _templateObject;
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
13
13
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
14
|
-
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: min-content;\n align-items: center;\n\n &.", " {\n align-items: start;\n }\n"])), _CodeField.classes.captionAlignLeft);
|
14
|
+
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n width: min-content;\n align-items: center;\n\n &.", " {\n align-items: flex-start;\n }\n"])), _CodeField.classes.captionAlignLeft);
|
15
15
|
var CodeWrapper = exports.CodeWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
16
16
|
componentId: "plasma-new-hope__sc-1269wxl-0"
|
17
17
|
})(["display:flex;align-items:center;"]);
|
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.drawerRoot = exports.drawerConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("react"));
|
9
9
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
|
-
var _utils = /*#__PURE__*/require("../../utils");
|
11
10
|
var _Popup = /*#__PURE__*/require("../Popup");
|
12
11
|
var _Overlay = /*#__PURE__*/require("../Overlay");
|
13
|
-
var
|
12
|
+
var _utils = /*#__PURE__*/require("../Popup/utils");
|
13
|
+
var _utils2 = /*#__PURE__*/require("../../utils");
|
14
14
|
var _hooks = /*#__PURE__*/require("../../hooks");
|
15
15
|
var _Drawer = /*#__PURE__*/require("./Drawer.tokens");
|
16
16
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
@@ -65,11 +65,11 @@ var drawerRoot = exports.drawerRoot = function drawerRoot(Root) {
|
|
65
65
|
var trapRef = (0, _hooks.useFocusTrap)(true, initialFocusRef, focusAfterRef);
|
66
66
|
var popupController = (0, _Popup.usePopupContext)();
|
67
67
|
var innerRef = (0, _plasmaCore.useForkRef)(trapRef, outerRef);
|
68
|
-
var uniqId = (0,
|
68
|
+
var uniqId = (0, _plasmaCore.safeUseId)();
|
69
69
|
var innerId = id || uniqId;
|
70
70
|
var overlayBackgroundToken = withBlur ? "var(".concat(_Drawer.tokens.drawerOverlayWithBlurColor, ")") : "var(".concat(_Drawer.tokens.drawerOverlayColor, ")");
|
71
|
-
var innerWidth = width ? (0,
|
72
|
-
var innerHeight = height ? (0,
|
71
|
+
var innerWidth = width ? (0, _utils2.getSizeValueFromProp)(width) : '100%';
|
72
|
+
var innerHeight = height ? (0, _utils2.getSizeValueFromProp)(height) : '100%';
|
73
73
|
var placementClass = placement ? _Drawer.classes["".concat(placement, "Placement")] : undefined;
|
74
74
|
var _useDrawer = (0, _hooks2.useDrawer)({
|
75
75
|
id: innerId,
|
@@ -82,7 +82,7 @@ var drawerRoot = exports.drawerRoot = function drawerRoot(Root) {
|
|
82
82
|
}),
|
83
83
|
drawerInfo = _useDrawer.drawerInfo;
|
84
84
|
var transparent = (0, _react.useMemo)(function () {
|
85
|
-
return (0, _DrawerContext.getIdLastDrawer)(
|
85
|
+
return (0, _DrawerContext.getIdLastDrawer)(popupController.items) !== innerId;
|
86
86
|
}, [innerId, popupController.items]);
|
87
87
|
var onDrawerOverlayKeyDown = function onDrawerOverlayKeyDown(event) {
|
88
88
|
if (onOverlayClick) {
|
@@ -96,7 +96,7 @@ var drawerRoot = exports.drawerRoot = function drawerRoot(Root) {
|
|
96
96
|
return /*#__PURE__*/_react["default"].createElement(_Drawer2.StyledPopup, _extends({
|
97
97
|
id: innerId,
|
98
98
|
ref: asModal ? innerRef : outerRef,
|
99
|
-
className: (0,
|
99
|
+
className: (0, _utils2.cx)(placementClass),
|
100
100
|
opened: innerIsOpen,
|
101
101
|
zIndex: zIndex,
|
102
102
|
placement: placement,
|
@@ -110,7 +110,7 @@ var drawerRoot = exports.drawerRoot = function drawerRoot(Root) {
|
|
110
110
|
view: view
|
111
111
|
}, /*#__PURE__*/_react["default"].createElement(_Overlay.Overlay, {
|
112
112
|
className: _Drawer.classes.overlay,
|
113
|
-
zIndex: zIndex ||
|
113
|
+
zIndex: zIndex || _utils.DEFAULT_Z_INDEX,
|
114
114
|
backgroundColorProperty: overlayBackgroundToken,
|
115
115
|
withBlur: withBlur,
|
116
116
|
transparent: transparent,
|
@@ -33,7 +33,7 @@ var useDrawer = exports.useDrawer = function useDrawer(_ref) {
|
|
33
33
|
if (!closeOnEsc) {
|
34
34
|
return;
|
35
35
|
}
|
36
|
-
if (event.keyCode === ESCAPE_KEYCODE && (0, _DrawerContext.getIdLastDrawer)(
|
36
|
+
if (event.keyCode === ESCAPE_KEYCODE && (0, _DrawerContext.getIdLastDrawer)(popupController.items) === id) {
|
37
37
|
if (onEscKeyDown) {
|
38
38
|
onEscKeyDown(event);
|
39
39
|
return;
|
@@ -64,7 +64,7 @@ var useDrawer = exports.useDrawer = function useDrawer(_ref) {
|
|
64
64
|
if (!_utils.canUseDOM) {
|
65
65
|
return;
|
66
66
|
}
|
67
|
-
if (!isOpen && !(0, _DrawerContext.hasDrawers)(
|
67
|
+
if (!isOpen && !(0, _DrawerContext.hasDrawers)(popupController.items)) {
|
68
68
|
document.body.style.overflow = overflow.current;
|
69
69
|
}
|
70
70
|
}, [isOpen, popupController.items]);
|
@@ -21,11 +21,11 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
21
21
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
22
22
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
23
23
|
var defaultFormatChars = [{
|
24
|
-
str: '*',
|
25
|
-
regexp: /./
|
26
|
-
}, {
|
27
24
|
str: '0',
|
28
25
|
regexp: /[0-9]/
|
26
|
+
}, {
|
27
|
+
str: '*',
|
28
|
+
regexp: /./
|
29
29
|
}, {
|
30
30
|
str: 'a',
|
31
31
|
regexp: /[a-zA-Z]/
|
@@ -7,12 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
exports.modalRoot = exports.modalConfig = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("react"));
|
9
9
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
|
-
var _utils = /*#__PURE__*/require("../../utils");
|
11
10
|
var _engines = /*#__PURE__*/require("../../engines");
|
12
|
-
var _hooks = /*#__PURE__*/require("../../hooks");
|
13
11
|
var _Popup = /*#__PURE__*/require("../Popup");
|
14
12
|
var _Overlay = /*#__PURE__*/require("../Overlay");
|
15
|
-
var
|
13
|
+
var _utils = /*#__PURE__*/require("../Popup/utils");
|
14
|
+
var _hooks = /*#__PURE__*/require("../../hooks");
|
16
15
|
var _IconClose2 = /*#__PURE__*/require("../_Icon/Icons/IconClose");
|
17
16
|
var _Modal = /*#__PURE__*/require("./Modal.tokens");
|
18
17
|
var _hooks2 = /*#__PURE__*/require("./hooks");
|
@@ -61,7 +60,7 @@ var modalRoot = exports.modalRoot = function modalRoot(Root) {
|
|
61
60
|
var trapRef = (0, _hooks.useFocusTrap)(true, initialFocusRef, focusAfterRef, true);
|
62
61
|
var popupController = (0, _Popup.usePopupContext)();
|
63
62
|
var innerRef = (0, _plasmaCore.useForkRef)(trapRef, outerRootRef);
|
64
|
-
var uniqId = (0,
|
63
|
+
var uniqId = (0, _plasmaCore.safeUseId)();
|
65
64
|
var innerId = id || uniqId;
|
66
65
|
var overlayBackgroundToken = withBlur ? "var(".concat(_Modal.tokens.modalOverlayWithBlurColor, ")") : "var(".concat(_Modal.tokens.modalOverlayColor, ")");
|
67
66
|
var _useModal = (0, _hooks2.useModal)({
|
@@ -74,7 +73,7 @@ var modalRoot = exports.modalRoot = function modalRoot(Root) {
|
|
74
73
|
}),
|
75
74
|
modalInfo = _useModal.modalInfo;
|
76
75
|
var transparent = (0, _react.useMemo)(function () {
|
77
|
-
return (0, _ModalContext.getIdLastModal)(
|
76
|
+
return (0, _ModalContext.getIdLastModal)(popupController.items) !== innerId;
|
78
77
|
}, [innerId, popupController.items]);
|
79
78
|
var onModalOverlayKeyDown = (0, _react.useCallback)(function (event) {
|
80
79
|
if (onOverlayClick) {
|
@@ -87,7 +86,7 @@ var modalRoot = exports.modalRoot = function modalRoot(Root) {
|
|
87
86
|
}, [closeOnOverlayClick, onOverlayClick, onClose]);
|
88
87
|
var overlayNode = /*#__PURE__*/_react["default"].createElement(_Overlay.Overlay, {
|
89
88
|
className: _Modal.classes.overlay,
|
90
|
-
zIndex: zIndex ||
|
89
|
+
zIndex: zIndex || _utils.DEFAULT_Z_INDEX,
|
91
90
|
backgroundColorProperty: overlayBackgroundToken,
|
92
91
|
withBlur: withBlur,
|
93
92
|
transparent: transparent,
|
@@ -28,7 +28,7 @@ var useModal = exports.useModal = function useModal(_ref) {
|
|
28
28
|
if (!closeOnEsc) {
|
29
29
|
return;
|
30
30
|
}
|
31
|
-
if (event.keyCode === ESCAPE_KEYCODE && (0, _ModalContext.getIdLastModal)(
|
31
|
+
if (event.keyCode === ESCAPE_KEYCODE && (0, _ModalContext.getIdLastModal)(popupController.items) === id) {
|
32
32
|
if (onEscKeyDown) {
|
33
33
|
onEscKeyDown(event);
|
34
34
|
return;
|
@@ -109,7 +109,7 @@ var popupRoot = exports.popupRoot = function popupRoot(Root) {
|
|
109
109
|
className = _ref.className,
|
110
110
|
rest = _objectWithoutProperties(_ref, _excluded);
|
111
111
|
var innerIsOpen = isOpen || opened;
|
112
|
-
var uniqId = (0,
|
112
|
+
var uniqId = (0, _plasmaCore.safeUseId)();
|
113
113
|
var innerId = id || uniqId;
|
114
114
|
var _usePopup = (0, _hooks.usePopup)({
|
115
115
|
isOpen: innerIsOpen,
|
@@ -6,13 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.usePopupContext = exports.PopupProvider = exports.POPUP_PORTAL_ID = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("react"));
|
9
|
-
var _utils = /*#__PURE__*/require("../../utils");
|
10
9
|
var _Portal = /*#__PURE__*/require("../Portal");
|
11
10
|
var _ModalContext = /*#__PURE__*/require("../Modal/ModalContext");
|
11
|
+
var _utils = /*#__PURE__*/require("../../utils");
|
12
12
|
var _ClientOnlyPortal = /*#__PURE__*/require("./ClientOnlyPortal");
|
13
13
|
var _Popup = /*#__PURE__*/require("./Popup.styles");
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
16
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
17
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
18
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
19
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
16
20
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
17
21
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
18
22
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
@@ -20,9 +24,9 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
20
24
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
21
25
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
22
26
|
var POPUP_PORTAL_ID = exports.POPUP_PORTAL_ID = 'plasma-popup-root';
|
23
|
-
var
|
27
|
+
var items = [];
|
24
28
|
var PopupContext = /*#__PURE__*/(0, _react.createContext)({
|
25
|
-
items:
|
29
|
+
items: items,
|
26
30
|
rootId: POPUP_PORTAL_ID,
|
27
31
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
28
32
|
register: function register(_info) {
|
@@ -42,7 +46,7 @@ var PopupProvider = exports.PopupProvider = function PopupProvider(_ref) {
|
|
42
46
|
var children = _ref.children,
|
43
47
|
UNSAFE_SSR_ENABLED = _ref.UNSAFE_SSR_ENABLED;
|
44
48
|
var prevBodyOverflowY = (0, _react.useRef)(_utils.canUseDOM ? document.body.style.overflowY : '');
|
45
|
-
var _useState = (0, _react.useState)(
|
49
|
+
var _useState = (0, _react.useState)([]),
|
46
50
|
_useState2 = _slicedToArray(_useState, 2),
|
47
51
|
items = _useState2[0],
|
48
52
|
setItems = _useState2[1];
|
@@ -54,13 +58,11 @@ var PopupProvider = exports.PopupProvider = function PopupProvider(_ref) {
|
|
54
58
|
}
|
55
59
|
setItems(function (prevItems) {
|
56
60
|
var _info$info;
|
57
|
-
|
58
|
-
if ((_info$info = info.info) !== null && _info$info !== void 0 && _info$info.isModal && !(0, _ModalContext.hasModals)(Array.from(prevItems.values()))) {
|
61
|
+
if ((_info$info = info.info) !== null && _info$info !== void 0 && _info$info.isModal && !(0, _ModalContext.hasModals)(prevItems)) {
|
59
62
|
prevBodyOverflowY.current = document.body.style.overflowY;
|
60
63
|
document.body.style.overflowY = 'hidden';
|
61
64
|
}
|
62
|
-
|
63
|
-
return newItems;
|
65
|
+
return [].concat(_toConsumableArray(prevItems), [info]);
|
64
66
|
});
|
65
67
|
};
|
66
68
|
var unregister = function unregister(id) {
|
@@ -68,16 +70,20 @@ var PopupProvider = exports.PopupProvider = function PopupProvider(_ref) {
|
|
68
70
|
return;
|
69
71
|
}
|
70
72
|
setItems(function (prevItems) {
|
71
|
-
|
73
|
+
var index = prevItems.findIndex(function (item) {
|
74
|
+
return id === item.id;
|
75
|
+
});
|
76
|
+
if (index === -1) {
|
72
77
|
return prevItems;
|
73
78
|
}
|
74
|
-
var
|
75
|
-
|
76
|
-
|
77
|
-
if (prevHasModals && !(0, _ModalContext.hasModals)(Array.from(newItems.values()))) {
|
79
|
+
var prevHasModals = (0, _ModalContext.hasModals)(prevItems);
|
80
|
+
prevItems.splice(index, 1);
|
81
|
+
if (prevHasModals && !(0, _ModalContext.hasModals)(prevItems)) {
|
78
82
|
document.body.style.overflowY = prevBodyOverflowY.current;
|
79
83
|
}
|
80
|
-
|
84
|
+
|
85
|
+
// при return prevItems не обновится контекст
|
86
|
+
return _toConsumableArray(prevItems);
|
81
87
|
});
|
82
88
|
};
|
83
89
|
var context = {
|
@@ -16,7 +16,7 @@ var Score = exports.Score = /*#__PURE__*/_styledComponents["default"].div.withCo
|
|
16
16
|
})([""]);
|
17
17
|
var Wrapper = exports.Wrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
18
18
|
componentId: "plasma-new-hope__sc-1qb7s38-1"
|
19
|
-
})(["display:flex;align-items:start;flex-direction:column;"]);
|
19
|
+
})(["display:flex;align-items:flex-start;flex-direction:column;"]);
|
20
20
|
var Content = exports.Content = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
21
21
|
componentId: "plasma-new-hope__sc-1qb7s38-2"
|
22
22
|
})(["display:flex;align-items:center;width:fit-content;"]);
|
package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.styles.js
CHANGED
@@ -15,7 +15,7 @@ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.fre
|
|
15
15
|
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n align-items: center;\n"])));
|
16
16
|
var StyledContent = exports.StyledContent = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
17
17
|
componentId: "plasma-new-hope__sc-gz8fxn-0"
|
18
|
-
})(["display:inline-flex;flex-direction:column;align-items:start;"]);
|
18
|
+
})(["display:inline-flex;flex-direction:column;align-items:flex-start;"]);
|
19
19
|
var StyledContentWrapper = exports.StyledContentWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
20
20
|
componentId: "plasma-new-hope__sc-gz8fxn-1"
|
21
21
|
})(["margin:-0.125rem;padding:0.25rem;box-sizing:content-box;position:relative;height:100%;width:100%;display:flex;align-items:center;z-index:1;&.", "{overflow:scroll;scrollbar-width:none;::-webkit-scrollbar{display:none;}", "{margin-top:auto;}}&.", "{overflow:visible;}"], _tokens.classes.tabsClipScroll, StyledContent, _tokens.classes.tabsClipShowAll);
|
@@ -13,10 +13,10 @@ var config = exports.config = {
|
|
13
13
|
},
|
14
14
|
variations: {
|
15
15
|
view: {
|
16
|
-
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-transparent-tertiary);", ":var(--surface-solid-default);"
|
16
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-transparent-tertiary);", ":var(--surface-solid-default);"], _Carousel.carouselNewTokens.paginationDotBackground, _Carousel.carouselNewTokens.paginationDotActiveBackground)
|
17
17
|
},
|
18
18
|
size: {
|
19
|
-
s: /*#__PURE__*/(0, _styledComponents.css)([""
|
19
|
+
s: /*#__PURE__*/(0, _styledComponents.css)([""])
|
20
20
|
}
|
21
21
|
}
|
22
22
|
};
|
@@ -35,8 +35,8 @@ const meta: Meta<StoryCarouselProps> = {
|
|
35
35
|
type: 'inline-radio',
|
36
36
|
},
|
37
37
|
},
|
38
|
-
|
39
|
-
options: ['start', 'center', 'end'],
|
38
|
+
align: {
|
39
|
+
options: ['start', 'center', 'end', 'activeDirection'],
|
40
40
|
control: {
|
41
41
|
type: 'inline-radio',
|
42
42
|
},
|
@@ -56,24 +56,19 @@ const meta: Meta<StoryCarouselProps> = {
|
|
56
56
|
paginationCentered: {
|
57
57
|
control: 'boolean',
|
58
58
|
},
|
59
|
-
gap: {
|
60
|
-
control: 'text',
|
61
|
-
},
|
62
59
|
},
|
63
60
|
args: {
|
64
61
|
view: 'default',
|
65
62
|
size: 's',
|
66
|
-
|
67
|
-
slides:
|
63
|
+
align: 'center',
|
64
|
+
slides: 10,
|
68
65
|
controlArrowsDisabled: false,
|
69
66
|
paginationDisabled: false,
|
70
67
|
paginationCentered: false,
|
71
|
-
gap: '20px',
|
72
68
|
},
|
73
69
|
parameters: {
|
74
70
|
controls: {
|
75
71
|
include: [
|
76
|
-
'scrollAlign',
|
77
72
|
'visibleDots',
|
78
73
|
'slides',
|
79
74
|
'controlArrowsDisabled',
|
@@ -91,6 +86,7 @@ const StyledCard = styled.div`
|
|
91
86
|
display: flex;
|
92
87
|
align-items: center;
|
93
88
|
justify-content: center;
|
89
|
+
position: relative;
|
94
90
|
border-radius: 8px;
|
95
91
|
width: 400px;
|
96
92
|
height: 370px;
|
@@ -98,7 +94,14 @@ const StyledCard = styled.div`
|
|
98
94
|
font-size: 30px;
|
99
95
|
`;
|
100
96
|
|
101
|
-
const StoryDefault = ({
|
97
|
+
const StoryDefault = ({
|
98
|
+
align,
|
99
|
+
visibleDots,
|
100
|
+
slides,
|
101
|
+
paginationDisabled,
|
102
|
+
paginationCentered,
|
103
|
+
...rest
|
104
|
+
}: StoryCarouselProps) => {
|
102
105
|
const items = Array(slides)
|
103
106
|
.fill(1)
|
104
107
|
.map((_, i) => ({
|
@@ -110,6 +113,7 @@ const StoryDefault = ({ visibleDots, slides, paginationDisabled, paginationCente
|
|
110
113
|
<>
|
111
114
|
<div style={{ width: '600px' }}>
|
112
115
|
<Carousel
|
116
|
+
scrollAlign={align}
|
113
117
|
paginationOptions={{
|
114
118
|
disabled: paginationDisabled,
|
115
119
|
visibleDots,
|
@@ -13,10 +13,10 @@ var config = exports.config = {
|
|
13
13
|
},
|
14
14
|
variations: {
|
15
15
|
view: {
|
16
|
-
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-transparent-tertiary);", ":var(--surface-solid-default);"
|
16
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-transparent-tertiary);", ":var(--surface-solid-default);"], _Carousel.carouselNewTokens.paginationDotBackground, _Carousel.carouselNewTokens.paginationDotActiveBackground)
|
17
17
|
},
|
18
18
|
size: {
|
19
|
-
s: /*#__PURE__*/(0, _styledComponents.css)([""
|
19
|
+
s: /*#__PURE__*/(0, _styledComponents.css)([""])
|
20
20
|
}
|
21
21
|
}
|
22
22
|
};
|
@@ -35,8 +35,8 @@ const meta: Meta<StoryCarouselProps> = {
|
|
35
35
|
type: 'inline-radio',
|
36
36
|
},
|
37
37
|
},
|
38
|
-
|
39
|
-
options: ['start', 'center', 'end'],
|
38
|
+
align: {
|
39
|
+
options: ['start', 'center', 'end', 'activeDirection'],
|
40
40
|
control: {
|
41
41
|
type: 'inline-radio',
|
42
42
|
},
|
@@ -56,24 +56,20 @@ const meta: Meta<StoryCarouselProps> = {
|
|
56
56
|
paginationCentered: {
|
57
57
|
control: 'boolean',
|
58
58
|
},
|
59
|
-
gap: {
|
60
|
-
control: 'text',
|
61
|
-
},
|
62
59
|
},
|
63
60
|
args: {
|
64
61
|
view: 'default',
|
65
62
|
size: 's',
|
66
|
-
|
67
|
-
|
63
|
+
align: 'center',
|
64
|
+
visibleDots: 6,
|
65
|
+
slides: 10,
|
68
66
|
controlArrowsDisabled: false,
|
69
67
|
paginationDisabled: false,
|
70
68
|
paginationCentered: false,
|
71
|
-
gap: '20px',
|
72
69
|
},
|
73
70
|
parameters: {
|
74
71
|
controls: {
|
75
72
|
include: [
|
76
|
-
'scrollAlign',
|
77
73
|
'visibleDots',
|
78
74
|
'slides',
|
79
75
|
'controlArrowsDisabled',
|
@@ -91,6 +87,7 @@ const StyledCard = styled.div`
|
|
91
87
|
display: flex;
|
92
88
|
align-items: center;
|
93
89
|
justify-content: center;
|
90
|
+
position: relative;
|
94
91
|
border-radius: 8px;
|
95
92
|
width: 400px;
|
96
93
|
height: 370px;
|
@@ -98,7 +95,14 @@ const StyledCard = styled.div`
|
|
98
95
|
font-size: 30px;
|
99
96
|
`;
|
100
97
|
|
101
|
-
const StoryDefault = ({
|
98
|
+
const StoryDefault = ({
|
99
|
+
align,
|
100
|
+
visibleDots,
|
101
|
+
slides,
|
102
|
+
paginationDisabled,
|
103
|
+
paginationCentered,
|
104
|
+
...rest
|
105
|
+
}: StoryCarouselProps) => {
|
102
106
|
const items = Array(slides)
|
103
107
|
.fill(1)
|
104
108
|
.map((_, i) => ({
|
@@ -110,6 +114,7 @@ const StoryDefault = ({ visibleDots, slides, paginationDisabled, paginationCente
|
|
110
114
|
<>
|
111
115
|
<div style={{ width: '600px' }}>
|
112
116
|
<Carousel
|
117
|
+
scrollAlign={align}
|
113
118
|
paginationOptions={{
|
114
119
|
disabled: paginationDisabled,
|
115
120
|
visibleDots,
|
@@ -15,12 +15,6 @@ Object.defineProperty(exports, "useDidMountLayoutEffect", {
|
|
15
15
|
return _useDidMountLayoutEffect.useDidMountLayoutEffect;
|
16
16
|
}
|
17
17
|
});
|
18
|
-
Object.defineProperty(exports, "useDisableScroll", {
|
19
|
-
enumerable: true,
|
20
|
-
get: function get() {
|
21
|
-
return _useDisableScroll.useDisableScroll;
|
22
|
-
}
|
23
|
-
});
|
24
18
|
Object.defineProperty(exports, "useFocusTrap", {
|
25
19
|
enumerable: true,
|
26
20
|
get: function get() {
|
@@ -64,5 +58,4 @@ var _useForceUpdate = /*#__PURE__*/require("./useForceUpdate");
|
|
64
58
|
var _useDidMountEffect = /*#__PURE__*/require("./useDidMountEffect");
|
65
59
|
var _useDidMountLayoutEffect = /*#__PURE__*/require("./useDidMountLayoutEffect");
|
66
60
|
var _useOutsideClick = /*#__PURE__*/require("./useOutsideClick");
|
67
|
-
var _useIsomorphicLayoutEffect = /*#__PURE__*/require("./useIsomorphicLayoutEffect");
|
68
|
-
var _useDisableScroll = /*#__PURE__*/require("./useDisableScroll");
|
61
|
+
var _useIsomorphicLayoutEffect = /*#__PURE__*/require("./useIsomorphicLayoutEffect");
|
@@ -135,18 +135,6 @@ export var calendarBaseRoot = function calendarBaseRoot(Root) {
|
|
135
135
|
setPrevType(calendarState);
|
136
136
|
}
|
137
137
|
}, [calendarState]);
|
138
|
-
useEffect(function () {
|
139
|
-
if (prevType !== type) {
|
140
|
-
dispatch({
|
141
|
-
type: ActionType.UPDATE_CALENDAR_STATE,
|
142
|
-
payload: {
|
143
|
-
calendarState: type,
|
144
|
-
size: sizeMap[type].single
|
145
|
-
}
|
146
|
-
});
|
147
|
-
setPrevType(type);
|
148
|
-
}
|
149
|
-
}, [type]);
|
150
138
|
useEffect(function () {
|
151
139
|
if (value && prevValue && isValueUpdate(value, prevValue) || value && !prevValue) {
|
152
140
|
dispatch({
|
@@ -182,18 +182,6 @@ export var calendarDoubleRoot = function calendarDoubleRoot(Root) {
|
|
182
182
|
setPrevType(calendarState);
|
183
183
|
}
|
184
184
|
}, [calendarState]);
|
185
|
-
useEffect(function () {
|
186
|
-
if (prevType !== type) {
|
187
|
-
dispatch({
|
188
|
-
type: ActionType.UPDATE_CALENDAR_STATE,
|
189
|
-
payload: {
|
190
|
-
calendarState: type,
|
191
|
-
size: sizeMap[type]["double"]
|
192
|
-
}
|
193
|
-
});
|
194
|
-
setPrevType(type);
|
195
|
-
}
|
196
|
-
}, [type]);
|
197
185
|
useEffect(function () {
|
198
186
|
if (value && prevValue && isValueUpdate(value, prevValue) || value && !prevValue) {
|
199
187
|
var _getBoundaryDates = getBoundaryDates(),
|
@@ -92,9 +92,6 @@ export var CalendarDays = function CalendarDays(_ref) {
|
|
92
92
|
};
|
93
93
|
var getRefs = function getRefs(element, isDayInCurrentMonth, i, j) {
|
94
94
|
if (isDayInCurrentMonth) {
|
95
|
-
if (!outerRefs.current[i + offset]) {
|
96
|
-
outerRefs.current[i + offset] = [];
|
97
|
-
}
|
98
95
|
outerRefs.current[i + offset][j] = element;
|
99
96
|
}
|
100
97
|
};
|
@@ -98,9 +98,6 @@ export var CalendarMonths = function CalendarMonths(_ref) {
|
|
98
98
|
return onHoverMonth === null || onHoverMonth === void 0 ? void 0 : onHoverMonth(undefined);
|
99
99
|
};
|
100
100
|
var getRefs = useCallback(function (element, i, j) {
|
101
|
-
if (!outerRefs.current[i + offset]) {
|
102
|
-
outerRefs.current[i + offset] = [];
|
103
|
-
}
|
104
101
|
outerRefs.current[i + offset][j] = element;
|
105
102
|
}, [offset, outerRefs]);
|
106
103
|
useEffect(function () {
|
@@ -96,9 +96,6 @@ export var CalendarQuarters = function CalendarQuarters(_ref) {
|
|
96
96
|
return onHoverQuarter === null || onHoverQuarter === void 0 ? void 0 : onHoverQuarter(undefined);
|
97
97
|
};
|
98
98
|
var getRefs = useCallback(function (element, i, j) {
|
99
|
-
if (!outerRefs.current[i + offset]) {
|
100
|
-
outerRefs.current[i + offset] = [];
|
101
|
-
}
|
102
99
|
outerRefs.current[i + offset][j] = element;
|
103
100
|
}, [offset, outerRefs]);
|
104
101
|
useEffect(function () {
|
@@ -98,9 +98,6 @@ export var CalendarYears = function CalendarYears(_ref) {
|
|
98
98
|
return onHoverYear === null || onHoverYear === void 0 ? void 0 : onHoverYear(undefined);
|
99
99
|
};
|
100
100
|
var getRefs = useCallback(function (element, i, j) {
|
101
|
-
if (!outerRefs.current[i + offset]) {
|
102
|
-
outerRefs.current[i + offset] = [];
|
103
|
-
}
|
104
101
|
outerRefs.current[i + offset][j] = element;
|
105
102
|
}, [outerRefs]);
|
106
103
|
useEffect(function () {
|
@@ -7,7 +7,6 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
7
7
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
8
8
|
import React, { forwardRef, useState, Children } from 'react';
|
9
9
|
import { IconDisclosureLeft, IconDisclosureRight } from "../../_Icon";
|
10
|
-
import { useDisableScroll } from "../../../hooks";
|
11
10
|
import { classes } from "./Carousel.tokens";
|
12
11
|
import { base as sizeCSS } from "./variations/_size/base";
|
13
12
|
import { base as viewCSS } from "./variations/_view/base";
|
@@ -25,13 +24,11 @@ export var carouselNewRoot = function carouselNewRoot(Root) {
|
|
25
24
|
var view = _ref.view,
|
26
25
|
size = _ref.size,
|
27
26
|
_ref$scrollAlign = _ref.scrollAlign,
|
28
|
-
scrollAlign = _ref$scrollAlign === void 0 ? '
|
27
|
+
scrollAlign = _ref$scrollAlign === void 0 ? 'center' : _ref$scrollAlign,
|
29
28
|
children = _ref.children,
|
30
29
|
_ref$controlArrowsDis = _ref.controlArrowsDisabled,
|
31
30
|
controlArrowsDisabled = _ref$controlArrowsDis === void 0 ? false : _ref$controlArrowsDis,
|
32
31
|
paginationOptions = _ref.paginationOptions,
|
33
|
-
_ref$gap = _ref.gap,
|
34
|
-
gap = _ref$gap === void 0 ? '20px' : _ref$gap,
|
35
32
|
className = _ref.className,
|
36
33
|
style = _ref.style;
|
37
34
|
var _useState = useState(0),
|
@@ -47,11 +44,11 @@ export var carouselNewRoot = function carouselNewRoot(Root) {
|
|
47
44
|
};
|
48
45
|
var _useCarousel = useCarousel({
|
49
46
|
index: index,
|
50
|
-
scrollAlign: scrollAlign
|
47
|
+
scrollAlign: scrollAlign,
|
48
|
+
onIndexChange: setIndex
|
51
49
|
}),
|
52
50
|
scrollRef = _useCarousel.scrollRef,
|
53
51
|
trackRef = _useCarousel.trackRef;
|
54
|
-
useDisableScroll(scrollRef);
|
55
52
|
return /*#__PURE__*/React.createElement(Root, {
|
56
53
|
className: className,
|
57
54
|
style: style,
|
@@ -59,7 +56,7 @@ export var carouselNewRoot = function carouselNewRoot(Root) {
|
|
59
56
|
view: view,
|
60
57
|
ref: ref
|
61
58
|
}, /*#__PURE__*/React.createElement(ControlsWrapper, null, index !== 0 && !controlArrowsDisabled && /*#__PURE__*/React.createElement(IconButton, {
|
62
|
-
|
59
|
+
pin: "circle-circle",
|
63
60
|
onClick: handleClickLeft
|
64
61
|
}, _IconDisclosureLeft || (_IconDisclosureLeft = /*#__PURE__*/React.createElement(IconDisclosureLeft, {
|
65
62
|
size: "m",
|
@@ -67,10 +64,10 @@ export var carouselNewRoot = function carouselNewRoot(Root) {
|
|
67
64
|
}))), /*#__PURE__*/React.createElement(CarouselWrapper, {
|
68
65
|
ref: scrollRef
|
69
66
|
}, /*#__PURE__*/React.createElement(CarouselTrack, {
|
70
|
-
ref: trackRef
|
71
|
-
gap: gap
|
67
|
+
ref: trackRef
|
72
68
|
}, children)), index !== slidesAmount - 1 && !controlArrowsDisabled && /*#__PURE__*/React.createElement(IconButton, {
|
73
69
|
className: classes.rightControlButton,
|
70
|
+
pin: "circle-circle",
|
74
71
|
onClick: handleClickRight
|
75
72
|
}, _IconDisclosureRight || (_IconDisclosureRight = /*#__PURE__*/React.createElement(IconDisclosureRight, {
|
76
73
|
size: "m",
|
@@ -2,22 +2,19 @@ import styled from 'styled-components';
|
|
2
2
|
import { css } from 'styled-components';
|
3
3
|
import { component, mergeConfig } from "../../../engines";
|
4
4
|
import { iconButtonConfig, iconButtonTokens } from "../../IconButton";
|
5
|
-
import { classes
|
5
|
+
import { classes } from "./Carousel.tokens";
|
6
6
|
var mergedConfig = /*#__PURE__*/mergeConfig(iconButtonConfig);
|
7
7
|
export var IconButtonComponent = /*#__PURE__*/component(mergedConfig);
|
8
8
|
export var base = /*#__PURE__*/css(["position:relative;"]);
|
9
9
|
export var CarouselWrapper = /*#__PURE__*/styled.div.withConfig({
|
10
10
|
componentId: "plasma-new-hope__sc-vln28v-0"
|
11
|
-
})(["position:relative;padding:0;list-style:none;-ms-overflow-style:none;scrollbar-width:none;::-webkit-scrollbar{display:none;}overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x mandatory;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);"]);
|
11
|
+
})(["position:relative;margin-left:calc(var(--plasma_private-carousel-padding) * -1);margin-right:calc(var(--plasma_private-carousel-padding) * -1);padding:0;list-style:none;-ms-overflow-style:none;scrollbar-width:none;::-webkit-scrollbar{display:none;}overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x mandatory;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-carousel-padding:0.625rem;"]);
|
12
12
|
export var CarouselTrack = /*#__PURE__*/styled.div.withConfig({
|
13
13
|
componentId: "plasma-new-hope__sc-vln28v-1"
|
14
|
-
})(["display:inline-flex;flex-direction:row;
|
15
|
-
var gap = _ref.gap;
|
16
|
-
return gap;
|
17
|
-
});
|
14
|
+
})(["display:inline-flex;flex-direction:row;"]);
|
18
15
|
export var IconButton = /*#__PURE__*/styled(IconButtonComponent).withConfig({
|
19
16
|
componentId: "plasma-new-hope__sc-vln28v-2"
|
20
|
-
})(["position:absolute;top:50%;transform:translateY(-50%);left:0.75rem;z-index:10;", ":var(
|
17
|
+
})(["position:absolute;top:50%;transform:translateY(-50%);left:0.75rem;z-index:10;", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(", ");", ":var(--surface-transparent-secondary-hover);", ":var(--surface-transparent-secondary-active);", ":2.5rem;", ":2.5rem;", ":1rem;", ":0.625rem;&.", "{left:auto;right:0.75rem;}"], iconButtonTokens.iconButtonColor, iconButtonTokens.iconButtonBackgroundColor, iconButtonTokens.iconButtonLoadingBackgroundColor, iconButtonTokens.iconButtonBackgroundColor, iconButtonTokens.iconButtonBackgroundColorHover, iconButtonTokens.iconButtonBackgroundColorActive, iconButtonTokens.iconButtonHeight, iconButtonTokens.iconButtonWidth, iconButtonTokens.iconButtonPadding, iconButtonTokens.iconButtonRadius, classes.rightControlButton);
|
21
18
|
export var ControlsWrapper = /*#__PURE__*/styled.div.withConfig({
|
22
19
|
componentId: "plasma-new-hope__sc-vln28v-3"
|
23
20
|
})(["position:relative;"]);
|