@salutejs/plasma-new-hope 0.325.0-canary.1941.15208820474.0 → 0.325.0-canary.1941.15255593421.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/hooks/useMonths.js +3 -1
- package/cjs/components/Calendar/hooks/useMonths.js.map +1 -1
- package/cjs/components/Calendar/hooks/useQuarters.js +3 -1
- package/cjs/components/Calendar/hooks/useQuarters.js.map +1 -1
- package/cjs/components/Calendar/hooks/useYears.js +3 -1
- package/cjs/components/Calendar/hooks/useYears.js.map +1 -1
- package/cjs/components/Calendar/utils/getDateWithModification.js +28 -24
- package/cjs/components/Calendar/utils/getDateWithModification.js.map +1 -1
- package/cjs/components/Note/Note.css +35 -6
- package/cjs/components/Note/Note.js +17 -3
- package/cjs/components/Note/Note.js.map +1 -1
- package/cjs/components/Note/Note.styles.js +25 -2
- package/cjs/components/Note/Note.styles.js.map +1 -1
- package/cjs/components/Note/{Note.styles_178qpj9.css → Note.styles_thpfhk.css} +2 -1
- package/cjs/components/Note/Note.tokens.js +9 -1
- package/cjs/components/Note/Note.tokens.js.map +1 -1
- package/cjs/components/PaginationDots/PaginationDot.js +59 -0
- package/cjs/components/PaginationDots/PaginationDot.js.map +1 -0
- package/cjs/components/PaginationDots/PaginationDot_baul9c.css +2 -0
- package/cjs/components/PaginationDots/PaginationDots.js +34 -0
- package/cjs/components/PaginationDots/PaginationDots.js.map +1 -0
- package/cjs/components/PaginationDots/PaginationDots_fm2ha5.css +2 -0
- package/cjs/components/PaginationDots/SmartPaginationDots.css +5 -0
- package/cjs/components/PaginationDots/SmartPaginationDots.js +47 -0
- package/cjs/components/PaginationDots/SmartPaginationDots.js.map +1 -0
- package/cjs/components/PaginationDots/usePaginationDots.js +40 -0
- package/cjs/components/PaginationDots/usePaginationDots.js.map +1 -0
- package/cjs/index.css +14 -7
- package/cjs/index.js +6 -0
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Calendar/hooks/useMonths.js +3 -1
- package/emotion/cjs/components/Calendar/hooks/useQuarters.js +3 -1
- package/emotion/cjs/components/Calendar/hooks/useYears.js +3 -1
- package/emotion/cjs/components/Calendar/utils/getDateWithModification.js +28 -24
- package/emotion/cjs/components/Note/Note.js +17 -3
- package/emotion/cjs/components/Note/Note.styles.js +27 -15
- package/emotion/cjs/components/Note/Note.tokens.js +9 -1
- package/emotion/cjs/components/PaginationDots/PaginationDot.js +35 -0
- package/emotion/cjs/components/PaginationDots/PaginationDots.js +35 -0
- package/emotion/cjs/components/PaginationDots/SmartPaginationDots.js +43 -0
- package/emotion/cjs/components/PaginationDots/index.js +26 -0
- package/emotion/cjs/components/PaginationDots/usePaginationDots.js +38 -0
- package/emotion/cjs/examples/plasma_b2c/components/Note/Note.config.js +9 -9
- package/emotion/cjs/examples/plasma_b2c/components/Note/Note.stories.tsx +1 -0
- package/emotion/cjs/examples/plasma_web/components/Note/Note.config.js +9 -9
- package/emotion/cjs/examples/plasma_web/components/Note/Note.stories.tsx +1 -0
- package/emotion/cjs/index.js +11 -0
- package/emotion/es/components/Calendar/hooks/useMonths.js +3 -1
- package/emotion/es/components/Calendar/hooks/useQuarters.js +3 -1
- package/emotion/es/components/Calendar/hooks/useYears.js +3 -1
- package/emotion/es/components/Calendar/utils/getDateWithModification.js +28 -24
- package/emotion/es/components/Note/Note.js +18 -4
- package/emotion/es/components/Note/Note.styles.js +26 -14
- package/emotion/es/components/Note/Note.tokens.js +9 -1
- package/emotion/es/components/PaginationDots/PaginationDot.js +28 -0
- package/emotion/es/components/PaginationDots/PaginationDots.js +28 -0
- package/emotion/es/components/PaginationDots/SmartPaginationDots.js +36 -0
- package/emotion/es/components/PaginationDots/index.js +3 -0
- package/emotion/es/components/PaginationDots/usePaginationDots.js +32 -0
- package/emotion/es/examples/plasma_b2c/components/Note/Note.config.js +9 -9
- package/emotion/es/examples/plasma_b2c/components/Note/Note.stories.tsx +1 -0
- package/emotion/es/examples/plasma_web/components/Note/Note.config.js +9 -9
- package/emotion/es/examples/plasma_web/components/Note/Note.stories.tsx +1 -0
- package/emotion/es/index.js +1 -0
- package/es/components/Calendar/hooks/useMonths.js +3 -1
- package/es/components/Calendar/hooks/useMonths.js.map +1 -1
- package/es/components/Calendar/hooks/useQuarters.js +3 -1
- package/es/components/Calendar/hooks/useQuarters.js.map +1 -1
- package/es/components/Calendar/hooks/useYears.js +3 -1
- package/es/components/Calendar/hooks/useYears.js.map +1 -1
- package/es/components/Calendar/utils/getDateWithModification.js +28 -24
- package/es/components/Calendar/utils/getDateWithModification.js.map +1 -1
- package/es/components/Note/Note.css +35 -6
- package/es/components/Note/Note.js +18 -4
- package/es/components/Note/Note.js.map +1 -1
- package/es/components/Note/Note.styles.js +25 -3
- package/es/components/Note/Note.styles.js.map +1 -1
- package/es/components/Note/{Note.styles_178qpj9.css → Note.styles_thpfhk.css} +2 -1
- package/es/components/Note/Note.tokens.js +9 -1
- package/es/components/Note/Note.tokens.js.map +1 -1
- package/es/components/PaginationDots/PaginationDot.js +54 -0
- package/es/components/PaginationDots/PaginationDot.js.map +1 -0
- package/es/components/PaginationDots/PaginationDot_baul9c.css +2 -0
- package/es/components/PaginationDots/PaginationDots.js +29 -0
- package/es/components/PaginationDots/PaginationDots.js.map +1 -0
- package/es/components/PaginationDots/PaginationDots_fm2ha5.css +2 -0
- package/es/components/PaginationDots/SmartPaginationDots.css +5 -0
- package/es/components/PaginationDots/SmartPaginationDots.js +39 -0
- package/es/components/PaginationDots/SmartPaginationDots.js.map +1 -0
- package/es/components/PaginationDots/usePaginationDots.js +36 -0
- package/es/components/PaginationDots/usePaginationDots.js.map +1 -0
- package/es/index.css +14 -7
- package/es/index.js +3 -0
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Calendar/hooks/useMonths.js +3 -1
- package/styled-components/cjs/components/Calendar/hooks/useQuarters.js +3 -1
- package/styled-components/cjs/components/Calendar/hooks/useYears.js +3 -1
- package/styled-components/cjs/components/Calendar/utils/getDateWithModification.js +28 -24
- package/styled-components/cjs/components/Note/Note.js +17 -3
- package/styled-components/cjs/components/Note/Note.styles.js +14 -3
- package/styled-components/cjs/components/Note/Note.tokens.js +9 -1
- package/styled-components/cjs/components/PaginationDots/PaginationDot.js +33 -0
- package/styled-components/cjs/components/PaginationDots/PaginationDots.js +24 -0
- package/styled-components/cjs/components/PaginationDots/SmartPaginationDots.js +43 -0
- package/styled-components/cjs/components/PaginationDots/index.js +26 -0
- package/styled-components/cjs/components/PaginationDots/usePaginationDots.js +38 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Note/Note.config.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Note/Note.stories.tsx +1 -0
- package/styled-components/cjs/examples/plasma_web/components/Note/Note.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/Note/Note.stories.tsx +1 -0
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Calendar/hooks/useMonths.js +3 -1
- package/styled-components/es/components/Calendar/hooks/useQuarters.js +3 -1
- package/styled-components/es/components/Calendar/hooks/useYears.js +3 -1
- package/styled-components/es/components/Calendar/utils/getDateWithModification.js +28 -24
- package/styled-components/es/components/Note/Note.js +18 -4
- package/styled-components/es/components/Note/Note.styles.js +13 -2
- package/styled-components/es/components/Note/Note.tokens.js +9 -1
- package/styled-components/es/components/PaginationDots/PaginationDot.js +26 -0
- package/styled-components/es/components/PaginationDots/PaginationDots.js +18 -0
- package/styled-components/es/components/PaginationDots/SmartPaginationDots.js +36 -0
- package/styled-components/es/components/PaginationDots/index.js +3 -0
- package/styled-components/es/components/PaginationDots/usePaginationDots.js +32 -0
- package/styled-components/es/examples/plasma_b2c/components/Note/Note.config.js +4 -4
- package/styled-components/es/examples/plasma_b2c/components/Note/Note.stories.tsx +1 -0
- package/styled-components/es/examples/plasma_web/components/Note/Note.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/Note/Note.stories.tsx +1 -0
- package/styled-components/es/index.js +1 -0
- package/types/components/Calendar/hooks/types.d.ts +7 -2
- package/types/components/Calendar/hooks/types.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useMonths.d.ts +1 -1
- package/types/components/Calendar/hooks/useMonths.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useQuarters.d.ts +1 -1
- package/types/components/Calendar/hooks/useQuarters.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useYears.d.ts +1 -1
- package/types/components/Calendar/hooks/useYears.d.ts.map +1 -1
- package/types/components/Calendar/utils/getDateWithModification.d.ts.map +1 -1
- package/types/components/Note/Note.d.ts +4 -0
- package/types/components/Note/Note.d.ts.map +1 -1
- package/types/components/Note/Note.styles.d.ts +46 -1
- package/types/components/Note/Note.styles.d.ts.map +1 -1
- package/types/components/Note/Note.tokens.d.ts +8 -0
- package/types/components/Note/Note.tokens.d.ts.map +1 -1
- package/types/components/Note/Note.types.d.ts +8 -0
- package/types/components/Note/Note.types.d.ts.map +1 -1
- package/types/components/PaginationDots/PaginationDot.d.ts +21 -0
- package/types/components/PaginationDots/PaginationDot.d.ts.map +1 -0
- package/types/components/PaginationDots/PaginationDots.d.ts +15 -0
- package/types/components/PaginationDots/PaginationDots.d.ts.map +1 -0
- package/types/components/PaginationDots/SmartPaginationDots.d.ts +15 -0
- package/types/components/PaginationDots/SmartPaginationDots.d.ts.map +1 -0
- package/types/components/PaginationDots/index.d.ts +6 -0
- package/types/components/PaginationDots/index.d.ts.map +1 -0
- package/types/components/PaginationDots/usePaginationDots.d.ts +14 -0
- package/types/components/PaginationDots/usePaginationDots.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
@@ -1,7 +1,8 @@
|
|
1
1
|
.b1eqam57{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;}
|
2
2
|
.c1i6bkpn{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
|
3
3
|
.cendmch{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;box-sizing:border-box;}
|
4
|
-
|
4
|
+
.t1wkjxug{padding-right:var(--t1wkjxug-0);box-sizing:border-box;}
|
5
5
|
.te86upw{visibility:hidden;position:absolute;z-index:-9999;opacity:0;}
|
6
6
|
.t1kp0wa7{display:block;position:relative;}
|
7
7
|
.tf1lafs{visibility:hidden;position:absolute;z-index:-9999;opacity:0;top:0;left:0;}
|
8
|
+
.cvkhqd3{position:absolute;right:var(--plasma-note-close-icon-right);top:var(--plasma-note-close-icon-top);width:var(--plasma-note-close-icon-button-size);height:var(--plasma-note-close-icon-button-size);color:var(--plasma-note-close-icon-color);}.cvkhqd3:hover{color:var(--plasma-note-close-icon-color-on-hover);}
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var classes = {
|
6
6
|
stretch: 'note-stretch',
|
7
|
+
closeIcon: 'note-close-icon',
|
7
8
|
contentAlignCenter: 'note-content-align-center'
|
8
9
|
};
|
9
10
|
var privateTokens = {
|
@@ -30,12 +31,19 @@ var tokens = {
|
|
30
31
|
titleFontWeight: '--plasma-note-title-font-weight',
|
31
32
|
titleLetterSpacing: '--plasma-note-title-letter-spacing',
|
32
33
|
titleLineHeight: '--plasma-note-title-line-height',
|
34
|
+
titlePaddingRight: '--plasma-note-title-padding-right',
|
33
35
|
textFontFamily: '--plasma-note-text-font-family',
|
34
36
|
textFontSize: '--plasma-note-text-font-size',
|
35
37
|
textFontStyle: '--plasma-note-text-font-style',
|
36
38
|
textFontWeight: '--plasma-note-text-font-weight',
|
37
39
|
textLetterSpacing: '--plasma-note-text-letter-spacing',
|
38
|
-
textLineHeight: '--plasma-note-text-line-height'
|
40
|
+
textLineHeight: '--plasma-note-text-line-height',
|
41
|
+
closeIconTop: '--plasma-note-close-icon-top',
|
42
|
+
closeIconRight: '--plasma-note-close-icon-right',
|
43
|
+
closeIconColor: '--plasma-note-close-icon-color',
|
44
|
+
closeIconColorOnHover: '--plasma-note-close-icon-color-on-hover',
|
45
|
+
closeIconSize: '--plasma-note-close-icon-size',
|
46
|
+
closeIconButtonSize: '--plasma-note-close-icon-button-size'
|
39
47
|
};
|
40
48
|
|
41
49
|
exports.classes = classes;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Note.tokens.js","sources":["../../../src/components/Note/Note.tokens.ts"],"sourcesContent":["export const classes = {\n stretch: 'note-stretch',\n contentAlignCenter: 'note-content-align-center',\n};\n\nexport const privateTokens = {\n width: '--plasma_private-note-width',\n height: '--plasma_private-note-height',\n contentWidthWithOffset: '--plasma_private-note-content-width-with-offset',\n};\n\nexport const tokens = {\n background: '--plasma-note-background',\n color: '--plasma-note-color',\n contentBeforeColor: '--plasma-note-content-before-color',\n\n padding: '--plasma-note-padding',\n paddingScalable: '--plasma-note-padding-scalable',\n borderRadius: '--plasma-note-border-radius',\n gap: '--plasma-note-gap',\n gapScalable: '--plasma-note-gap-scalable',\n contentGap: '--plasma-note-content-gap',\n\n fixedContentBeforeWidth: '--plasma-note-fixed-content-before-width',\n fixedContentBeforeHeight: '--plasma-note-fixed-content-before-height',\n fixedContentBeforePadding: '--plasma-note-fixed-content-before-padding',\n\n titleFontFamily: '--plasma-note-title-font-family',\n titleFontSize: '--plasma-note-title-font-size',\n titleFontStyle: '--plasma-note-title-font-style',\n titleFontWeight: '--plasma-note-title-font-weight',\n titleLetterSpacing: '--plasma-note-title-letter-spacing',\n titleLineHeight: '--plasma-note-title-line-height',\n\n textFontFamily: '--plasma-note-text-font-family',\n textFontSize: '--plasma-note-text-font-size',\n textFontStyle: '--plasma-note-text-font-style',\n textFontWeight: '--plasma-note-text-font-weight',\n textLetterSpacing: '--plasma-note-text-letter-spacing',\n textLineHeight: '--plasma-note-text-line-height',\n};\n"],"names":["classes","stretch","contentAlignCenter","privateTokens","width","height","contentWidthWithOffset","tokens","background","color","contentBeforeColor","padding","paddingScalable","borderRadius","gap","gapScalable","contentGap","fixedContentBeforeWidth","fixedContentBeforeHeight","fixedContentBeforePadding","titleFontFamily","titleFontSize","titleFontStyle","titleFontWeight","titleLetterSpacing","titleLineHeight","textFontFamily","textFontSize","textFontStyle","textFontWeight","textLetterSpacing","textLineHeight"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,OAAO,EAAE,cAAc;AACvBC,EAAAA,kBAAkB,EAAE,2BAAA;AACxB,EAAC;AAEM,IAAMC,aAAa,GAAG;AACzBC,EAAAA,KAAK,EAAE,6BAA6B;AACpCC,EAAAA,MAAM,EAAE,8BAA8B;AACtCC,EAAAA,sBAAsB,EAAE,iDAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,0BAA0B;AACtCC,EAAAA,KAAK,EAAE,qBAAqB;AAC5BC,EAAAA,kBAAkB,EAAE,oCAAoC;AAExDC,EAAAA,OAAO,EAAE,uBAAuB;AAChCC,EAAAA,eAAe,EAAE,gCAAgC;AACjDC,EAAAA,YAAY,EAAE,6BAA6B;AAC3CC,EAAAA,GAAG,EAAE,mBAAmB;AACxBC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,UAAU,EAAE,2BAA2B;AAEvCC,EAAAA,uBAAuB,EAAE,0CAA0C;AACnEC,EAAAA,wBAAwB,EAAE,2CAA2C;AACrEC,EAAAA,yBAAyB,EAAE,4CAA4C;AAEvEC,EAAAA,eAAe,EAAE,iCAAiC;AAClDC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,cAAc,EAAE,gCAAgC;AAChDC,EAAAA,eAAe,EAAE,iCAAiC;AAClDC,EAAAA,kBAAkB,EAAE,oCAAoC;AACxDC,EAAAA,eAAe,EAAE,iCAAiC;
|
1
|
+
{"version":3,"file":"Note.tokens.js","sources":["../../../src/components/Note/Note.tokens.ts"],"sourcesContent":["export const classes = {\n stretch: 'note-stretch',\n closeIcon: 'note-close-icon',\n contentAlignCenter: 'note-content-align-center',\n};\n\nexport const privateTokens = {\n width: '--plasma_private-note-width',\n height: '--plasma_private-note-height',\n contentWidthWithOffset: '--plasma_private-note-content-width-with-offset',\n};\n\nexport const tokens = {\n background: '--plasma-note-background',\n color: '--plasma-note-color',\n contentBeforeColor: '--plasma-note-content-before-color',\n\n padding: '--plasma-note-padding',\n paddingScalable: '--plasma-note-padding-scalable',\n borderRadius: '--plasma-note-border-radius',\n gap: '--plasma-note-gap',\n gapScalable: '--plasma-note-gap-scalable',\n contentGap: '--plasma-note-content-gap',\n\n fixedContentBeforeWidth: '--plasma-note-fixed-content-before-width',\n fixedContentBeforeHeight: '--plasma-note-fixed-content-before-height',\n fixedContentBeforePadding: '--plasma-note-fixed-content-before-padding',\n\n titleFontFamily: '--plasma-note-title-font-family',\n titleFontSize: '--plasma-note-title-font-size',\n titleFontStyle: '--plasma-note-title-font-style',\n titleFontWeight: '--plasma-note-title-font-weight',\n titleLetterSpacing: '--plasma-note-title-letter-spacing',\n titleLineHeight: '--plasma-note-title-line-height',\n titlePaddingRight: '--plasma-note-title-padding-right',\n\n textFontFamily: '--plasma-note-text-font-family',\n textFontSize: '--plasma-note-text-font-size',\n textFontStyle: '--plasma-note-text-font-style',\n textFontWeight: '--plasma-note-text-font-weight',\n textLetterSpacing: '--plasma-note-text-letter-spacing',\n textLineHeight: '--plasma-note-text-line-height',\n\n closeIconTop: '--plasma-note-close-icon-top',\n closeIconRight: '--plasma-note-close-icon-right',\n closeIconColor: '--plasma-note-close-icon-color',\n closeIconColorOnHover: '--plasma-note-close-icon-color-on-hover',\n closeIconSize: '--plasma-note-close-icon-size',\n closeIconButtonSize: '--plasma-note-close-icon-button-size',\n};\n"],"names":["classes","stretch","closeIcon","contentAlignCenter","privateTokens","width","height","contentWidthWithOffset","tokens","background","color","contentBeforeColor","padding","paddingScalable","borderRadius","gap","gapScalable","contentGap","fixedContentBeforeWidth","fixedContentBeforeHeight","fixedContentBeforePadding","titleFontFamily","titleFontSize","titleFontStyle","titleFontWeight","titleLetterSpacing","titleLineHeight","titlePaddingRight","textFontFamily","textFontSize","textFontStyle","textFontWeight","textLetterSpacing","textLineHeight","closeIconTop","closeIconRight","closeIconColor","closeIconColorOnHover","closeIconSize","closeIconButtonSize"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,OAAO,EAAE,cAAc;AACvBC,EAAAA,SAAS,EAAE,iBAAiB;AAC5BC,EAAAA,kBAAkB,EAAE,2BAAA;AACxB,EAAC;AAEM,IAAMC,aAAa,GAAG;AACzBC,EAAAA,KAAK,EAAE,6BAA6B;AACpCC,EAAAA,MAAM,EAAE,8BAA8B;AACtCC,EAAAA,sBAAsB,EAAE,iDAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,0BAA0B;AACtCC,EAAAA,KAAK,EAAE,qBAAqB;AAC5BC,EAAAA,kBAAkB,EAAE,oCAAoC;AAExDC,EAAAA,OAAO,EAAE,uBAAuB;AAChCC,EAAAA,eAAe,EAAE,gCAAgC;AACjDC,EAAAA,YAAY,EAAE,6BAA6B;AAC3CC,EAAAA,GAAG,EAAE,mBAAmB;AACxBC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,UAAU,EAAE,2BAA2B;AAEvCC,EAAAA,uBAAuB,EAAE,0CAA0C;AACnEC,EAAAA,wBAAwB,EAAE,2CAA2C;AACrEC,EAAAA,yBAAyB,EAAE,4CAA4C;AAEvEC,EAAAA,eAAe,EAAE,iCAAiC;AAClDC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,cAAc,EAAE,gCAAgC;AAChDC,EAAAA,eAAe,EAAE,iCAAiC;AAClDC,EAAAA,kBAAkB,EAAE,oCAAoC;AACxDC,EAAAA,eAAe,EAAE,iCAAiC;AAClDC,EAAAA,iBAAiB,EAAE,mCAAmC;AAEtDC,EAAAA,cAAc,EAAE,gCAAgC;AAChDC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,cAAc,EAAE,gCAAgC;AAChDC,EAAAA,iBAAiB,EAAE,mCAAmC;AACtDC,EAAAA,cAAc,EAAE,gCAAgC;AAEhDC,EAAAA,YAAY,EAAE,8BAA8B;AAC5CC,EAAAA,cAAc,EAAE,gCAAgC;AAChDC,EAAAA,cAAc,EAAE,gCAAgC;AAChDC,EAAAA,qBAAqB,EAAE,yCAAyC;AAChEC,EAAAA,aAAa,EAAE,+BAA+B;AAC9CC,EAAAA,mBAAmB,EAAE,sCAAA;AACzB;;;;;;"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require('./PaginationDot_baul9c.css');
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
5
|
+
|
6
|
+
var react = require('@linaria/react');
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Элемент пагинации точками.
|
10
|
+
* Стилизованный компонент, обладающий всеми свойствами ``div``.
|
11
|
+
*/
|
12
|
+
var _exp = function _exp() {
|
13
|
+
return function (_ref) {
|
14
|
+
var isActive = _ref.isActive;
|
15
|
+
return isActive ? '1.75rem' : '0.375rem';
|
16
|
+
};
|
17
|
+
};
|
18
|
+
var _exp2 = function _exp2() {
|
19
|
+
return function (_ref2) {
|
20
|
+
var isActive = _ref2.isActive;
|
21
|
+
return isActive ? 'var(--text-primary)' : 'var(--surface-transparent-tertiary)';
|
22
|
+
};
|
23
|
+
};
|
24
|
+
var DotBase = /*#__PURE__*/react.styled('li')({
|
25
|
+
name: "DotBase",
|
26
|
+
"class": "d1mcs0w2",
|
27
|
+
propsAsIs: false,
|
28
|
+
vars: {
|
29
|
+
"d1mcs0w2-0": [/*#__PURE__*/_exp()],
|
30
|
+
"d1mcs0w2-1": [/*#__PURE__*/_exp2()]
|
31
|
+
}
|
32
|
+
});
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Элемент пагинации точками.
|
36
|
+
* Стилизованный компонент, обладающий всеми свойствами ``div``.
|
37
|
+
* @deprecated
|
38
|
+
*/
|
39
|
+
var _exp3 = function _exp3() {
|
40
|
+
return DotBase;
|
41
|
+
};
|
42
|
+
var _exp4 = function _exp4() {
|
43
|
+
return function (_ref3) {
|
44
|
+
var isActive = _ref3.isActive;
|
45
|
+
return isActive ? 'var(--text-accent)' : 'var(--surface-transparent-tertiary)';
|
46
|
+
};
|
47
|
+
};
|
48
|
+
var PaginationDot = /*#__PURE__*/react.styled(_exp3())({
|
49
|
+
name: "PaginationDot",
|
50
|
+
"class": "poypaki",
|
51
|
+
propsAsIs: true,
|
52
|
+
vars: {
|
53
|
+
"poypaki-0": [/*#__PURE__*/_exp4()]
|
54
|
+
}
|
55
|
+
});
|
56
|
+
|
57
|
+
exports.DotBase = DotBase;
|
58
|
+
exports.PaginationDot = PaginationDot;
|
59
|
+
//# sourceMappingURL=PaginationDot.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PaginationDot.js","sources":["../../../src/components/PaginationDots/PaginationDot.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\nexport interface PaginationDotProps extends React.LiHTMLAttributes<HTMLLIElement> {\n /**\n * Элемент активен\n */\n isActive: boolean;\n}\n\n/**\n * Элемент пагинации точками.\n * Стилизованный компонент, обладающий всеми свойствами ``div``.\n */\nexport const DotBase = styled.li<PaginationDotProps>`\n width: ${({ isActive }) => (isActive ? '1.75rem' : '0.375rem')};\n height: 0.375rem;\n border-radius: 1rem;\n background: ${({ isActive }) => (isActive ? 'var(--text-primary)' : 'var(--surface-transparent-tertiary)')};\n transition: width 0.1s ease-in-out, background 0.3s ease-in-out;\n font-size: 0.5rem;\n\n & + & {\n margin-left: 0.375rem;\n }\n\n &:focus {\n outline: 0 none;\n }\n`;\n\n/**\n * Элемент пагинации точками.\n * Стилизованный компонент, обладающий всеми свойствами ``div``.\n * @deprecated\n */\nexport const PaginationDot = styled(DotBase)<PaginationDotProps>`\n cursor: pointer;\n\n background: ${({ isActive }) => (isActive ? 'var(--text-accent)' : 'var(--surface-transparent-tertiary)')};\n\n &:hover {\n background: var(--text-accent);\n }\n`;\n"],"names":["_exp","_ref","isActive","_exp2","_ref2","DotBase","styled","name","class","propsAsIs","vars","_exp3","_exp4","_ref3","PaginationDot"],"mappings":";;;;;;AASA;AACA;AACA;AACA;AAHA,IAAAA,IAAA,GARkBA,SAQlBA,IAAAA,GAAA;AAAA,EAAA,OAKa,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,QAAAA,GAAAA,IAAAA,CAAAA,QAAAA,CAAAA;AAAAA,IAAAA,OAAgBA,QAAQ,GAAG,SAAS,GAAG,UAAW,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GAbhDA,SAagDA,KAAAA,GAAA;AAAA,EAAA,OAGhD,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGF,QAAAA,GAAAA,KAAAA,CAAAA,QAAAA,CAAAA;AAAAA,IAAAA,OAAgBA,QAAQ,GAAG,qBAAqB,GAAG,qCAAsC,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAJvG,IAAMG,OAAO,gBAAGC,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,SAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,YAAA,EAAA,cAChBV,IAAqD,EAAA,CAAA;AAAA,IAAA,YAAA,EAAA,cAGhDG,KAA4F,EAAA,CAAA;AAAA,GAAA;AAAA,CAW7G,EAAA;;AAED;AACA;AACA;AACA;AACA;AAJA,IAAAQ,KAAA,GA7BkBA,SA6BlBA,KAAAA,GAAA;AAAA,EAAA,OAKoCN,OAAO,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAO,KAAA,GAlCzBA,SAkCyBA,KAAAA,GAAA;AAAA,EAAA,OAGzB,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGX,QAAAA,GAAAA,KAAAA,CAAAA,QAAAA,CAAAA;AAAAA,IAAAA,OAAgBA,QAAQ,GAAG,oBAAoB,GAAG,qCAAsC,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAHtG,IAAMY,aAAa,gBAAGR,YAAM,CAAAK,KAAA,EAAA,CAAA,CAAA;AAAAJ,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAGjBE,KAA2F,EAAA,CAAA;AAAA,GAAA;AAAA,CAK5G;;;;;"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
.d1mcs0w2{width:var(--d1mcs0w2-0);height:0.375rem;border-radius:1rem;background:var(--d1mcs0w2-1);-webkit-transition:width 0.1s ease-in-out,background 0.3s ease-in-out;transition:width 0.1s ease-in-out,background 0.3s ease-in-out;font-size:0.5rem;}.d1mcs0w2 + .d1mcs0w2{margin-left:0.375rem;}.d1mcs0w2:focus{outline:0 none;}
|
2
|
+
.poypaki.d1mcs0w2{cursor:pointer;background:var(--poypaki-0);}.poypaki.d1mcs0w2:hover{background:var(--text-accent);}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require('./PaginationDots_fm2ha5.css');
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
5
|
+
|
6
|
+
var react = require('@linaria/react');
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Оборачивающий компонент для пагинации точками.
|
10
|
+
* Стилизованный компонент, обладающий всеми свойствами ``div``.
|
11
|
+
*/
|
12
|
+
var DotsBase = /*#__PURE__*/react.styled('ul')({
|
13
|
+
name: "DotsBase",
|
14
|
+
"class": "dut2ldg",
|
15
|
+
propsAsIs: false
|
16
|
+
});
|
17
|
+
|
18
|
+
/**
|
19
|
+
* Оборачивающий компонент для пагинации точками.
|
20
|
+
* Стилизованный компонент, обладающий всеми свойствами ``div``.
|
21
|
+
* @deprecated
|
22
|
+
*/
|
23
|
+
var _exp = function _exp() {
|
24
|
+
return DotsBase;
|
25
|
+
};
|
26
|
+
var PaginationDots = /*#__PURE__*/react.styled(_exp())({
|
27
|
+
name: "PaginationDots",
|
28
|
+
"class": "p1m9slup",
|
29
|
+
propsAsIs: true
|
30
|
+
});
|
31
|
+
|
32
|
+
exports.DotsBase = DotsBase;
|
33
|
+
exports.PaginationDots = PaginationDots;
|
34
|
+
//# sourceMappingURL=PaginationDots.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PaginationDots.js","sources":["../../../src/components/PaginationDots/PaginationDots.tsx"],"sourcesContent":["import { styled } from '@linaria/react';\n\n/**\n * Оборачивающий компонент для пагинации точками.\n * Стилизованный компонент, обладающий всеми свойствами ``div``.\n */\nexport const DotsBase = styled.ul`\n display: flex;\n flex-wrap: wrap;\n align-self: center;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style: none;\n`;\n\n/**\n * Оборачивающий компонент для пагинации точками.\n * Стилизованный компонент, обладающий всеми свойствами ``div``.\n * @deprecated\n */\nexport const PaginationDots = styled(DotsBase)``;\n"],"names":["DotsBase","styled","name","class","propsAsIs","_exp","PaginationDots"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACO,IAAMA,QAAQ,gBAAGC,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,UAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAQ7B,EAAA;;AAED;AACA;AACA;AACA;AACA;AAJA,IAAAC,IAAA,GAfkBA,SAelBA,IAAAA,GAAA;AAAA,EAAA,OAKqCL,QAAQ,CAAA;AAAA,CAAA,CAAA;AAAtC,IAAMM,cAAc,gBAAGL,YAAM,CAAAI,IAAA,EAAA,CAAA,CAAA;AAAAH,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAAY;;;;;"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
.dut2ldg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0;padding:0;list-style:none;}
|
2
|
+
|
@@ -0,0 +1,5 @@
|
|
1
|
+
.PaginationDots_fm2ha5_dut2ldg__db2a2205{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0;padding:0;list-style:none;}
|
2
|
+
|
3
|
+
|
4
|
+
.PaginationDot_baul9c_d1mcs0w2__b1eb09b2{width:var(--d1mcs0w2-0);height:0.375rem;border-radius:1rem;background:var(--d1mcs0w2-1);-webkit-transition:width 0.1s ease-in-out,background 0.3s ease-in-out;transition:width 0.1s ease-in-out,background 0.3s ease-in-out;font-size:0.5rem;}.PaginationDot_baul9c_d1mcs0w2__b1eb09b2 + .PaginationDot_baul9c_d1mcs0w2__b1eb09b2{margin-left:0.375rem;}.PaginationDot_baul9c_d1mcs0w2__b1eb09b2:focus{outline:0 none;}
|
5
|
+
.PaginationDot_baul9c_poypaki__b1eb09b2.PaginationDot_baul9c_d1mcs0w2__b1eb09b2{cursor:pointer;background:var(--poypaki-0);}.PaginationDot_baul9c_poypaki__b1eb09b2.PaginationDot_baul9c_d1mcs0w2__b1eb09b2:hover{background:var(--text-accent);}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
+
var React = require('react');
|
7
|
+
var usePaginationDots = require('./usePaginationDots.js');
|
8
|
+
var PaginationDots = require('./PaginationDots.js');
|
9
|
+
var PaginationDot = require('./PaginationDot.js');
|
10
|
+
|
11
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
12
|
+
|
13
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
14
|
+
|
15
|
+
var _excluded = ["items", "index", "visibleItems", "onIndexChange"];
|
16
|
+
/**
|
17
|
+
* Компонент для отображения точек пагинации
|
18
|
+
* с возможностью ограничения количества видимых элементов.
|
19
|
+
* @deprecated
|
20
|
+
*/
|
21
|
+
var SmartPaginationDots = function SmartPaginationDots(_ref) {
|
22
|
+
var items = _ref.items,
|
23
|
+
index = _ref.index,
|
24
|
+
visibleItems = _ref.visibleItems,
|
25
|
+
onIndexChange = _ref.onIndexChange,
|
26
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
27
|
+
var _usePaginationDots = usePaginationDots.usePaginationDots({
|
28
|
+
items: items,
|
29
|
+
index: index,
|
30
|
+
visibleItems: visibleItems
|
31
|
+
}),
|
32
|
+
sliced = _usePaginationDots.sliced,
|
33
|
+
activeId = _usePaginationDots.activeId;
|
34
|
+
return /*#__PURE__*/React__default.default.createElement(PaginationDots.PaginationDots, rest, sliced.map(function (_ref2, i) {
|
35
|
+
var id = _ref2.id;
|
36
|
+
return /*#__PURE__*/React__default.default.createElement(PaginationDot.PaginationDot, {
|
37
|
+
key: "item:".concat(i),
|
38
|
+
isActive: id === activeId,
|
39
|
+
onClick: function onClick() {
|
40
|
+
return onIndexChange === null || onIndexChange === void 0 ? void 0 : onIndexChange(i);
|
41
|
+
}
|
42
|
+
});
|
43
|
+
}));
|
44
|
+
};
|
45
|
+
|
46
|
+
exports.SmartPaginationDots = SmartPaginationDots;
|
47
|
+
//# sourceMappingURL=SmartPaginationDots.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SmartPaginationDots.js","sources":["../../../src/components/PaginationDots/SmartPaginationDots.tsx"],"sourcesContent":["import React from 'react';\n\nimport { usePaginationDots, SmartPaginationDotsProps as BaseProps } from './usePaginationDots';\nimport { PaginationDots } from './PaginationDots';\nimport { PaginationDot } from './PaginationDot';\n\nexport interface SmartPaginationDotsProps extends BaseProps, React.HTMLAttributes<HTMLUListElement> {\n /**\n * Обработчик изменения индекса\n */\n onIndexChange?: (index: number) => void;\n}\n\n/**\n * Компонент для отображения точек пагинации\n * с возможностью ограничения количества видимых элементов.\n * @deprecated\n */\nexport const SmartPaginationDots: React.FC<SmartPaginationDotsProps> = ({\n items,\n index,\n visibleItems,\n onIndexChange,\n ...rest\n}) => {\n const { sliced, activeId } = usePaginationDots({ items, index, visibleItems });\n\n return (\n <PaginationDots {...rest}>\n {sliced.map(({ id }, i) => (\n <PaginationDot key={`item:${i}`} isActive={id === activeId} onClick={() => onIndexChange?.(i)} />\n ))}\n </PaginationDots>\n );\n};\n"],"names":["SmartPaginationDots","_ref","items","index","visibleItems","onIndexChange","rest","_objectWithoutProperties","_excluded","_usePaginationDots","usePaginationDots","sliced","activeId","React","createElement","PaginationDots","map","_ref2","i","id","PaginationDot","key","concat","isActive","onClick"],"mappings":";;;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AACA;IACaA,mBAAuD,GAAG,SAA1DA,mBAAuDA,CAAAC,IAAA,EAM9D;AAAA,EAAA,IALFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;AACVC,IAAAA,IAAI,GAAAC,iDAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA,CAAA;EAEP,IAAAC,kBAAA,GAA6BC,mCAAiB,CAAC;AAAER,MAAAA,KAAK,EAALA,KAAK;AAAEC,MAAAA,KAAK,EAALA,KAAK;AAAEC,MAAAA,YAAY,EAAZA,YAAAA;AAAa,KAAC,CAAC;IAAtEO,MAAM,GAAAF,kBAAA,CAANE,MAAM;IAAEC,QAAQ,GAAAH,kBAAA,CAARG,QAAQ,CAAA;AAExB,EAAA,oBACIC,sBAAA,CAAAC,aAAA,CAACC,6BAAc,EAAKT,IAAI,EACnBK,MAAM,CAACK,GAAG,CAAC,UAAAC,KAAA,EAASC,CAAC,EAAA;AAAA,IAAA,IAAPC,EAAE,GAAAF,KAAA,CAAFE,EAAE,CAAA;AAAA,IAAA,oBACbN,sBAAA,CAAAC,aAAA,CAACM,2BAAa,EAAA;AAACC,MAAAA,GAAG,EAAAC,OAAAA,CAAAA,MAAA,CAAUJ,CAAC,CAAG;MAACK,QAAQ,EAAEJ,EAAE,KAAKP,QAAS;MAACY,OAAO,EAAE,SAAAA,OAAA,GAAA;AAAA,QAAA,OAAMnB,aAAa,KAAbA,IAAAA,IAAAA,aAAa,uBAAbA,aAAa,CAAGa,CAAC,CAAC,CAAA;AAAA,OAAA;AAAC,KAAE,CAAC,CAAA;AAAA,GACpG,CACW,CAAC,CAAA;AAEzB;;;;"}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
|
7
|
+
var usePaginationDots = function usePaginationDots(_ref) {
|
8
|
+
var items = _ref.items,
|
9
|
+
index = _ref.index,
|
10
|
+
_ref$visibleItems = _ref.visibleItems,
|
11
|
+
visibleItems = _ref$visibleItems === void 0 ? 7 : _ref$visibleItems;
|
12
|
+
var activeId = items[index].id;
|
13
|
+
var prevIndex = React.useRef(null);
|
14
|
+
var direction = 0;
|
15
|
+
if (prevIndex.current !== null) {
|
16
|
+
direction = index > prevIndex.current ? 1 : -1;
|
17
|
+
}
|
18
|
+
var start;
|
19
|
+
var end;
|
20
|
+
if (direction === 1) {
|
21
|
+
end = Math.min(Math.max(index + 2, visibleItems), items.length);
|
22
|
+
start = Math.max(end - visibleItems, 0);
|
23
|
+
} else if (direction === -1) {
|
24
|
+
start = Math.min(Math.max(index - 1, 0), items.length - visibleItems);
|
25
|
+
end = start + visibleItems;
|
26
|
+
} else {
|
27
|
+
start = Math.max(index - Math.floor(visibleItems / 2), 0);
|
28
|
+
end = Math.min(start + visibleItems, items.length);
|
29
|
+
start = end - visibleItems;
|
30
|
+
}
|
31
|
+
var sliced = items.slice(start, end);
|
32
|
+
prevIndex.current = index;
|
33
|
+
return {
|
34
|
+
sliced: sliced,
|
35
|
+
activeId: activeId
|
36
|
+
};
|
37
|
+
};
|
38
|
+
|
39
|
+
exports.usePaginationDots = usePaginationDots;
|
40
|
+
//# sourceMappingURL=usePaginationDots.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"usePaginationDots.js","sources":["../../../src/components/PaginationDots/usePaginationDots.ts"],"sourcesContent":["import { useRef } from 'react';\n\nexport interface SmartPaginationDotsProps {\n items: Array<{ id: number | string }>;\n index: number;\n visibleItems?: number;\n}\n\nexport const usePaginationDots = ({ items, index, visibleItems = 7 }: SmartPaginationDotsProps) => {\n const activeId = items[index].id;\n const prevIndex = useRef<number | null>(null);\n let direction = 0;\n\n if (prevIndex.current !== null) {\n direction = index > prevIndex.current ? 1 : -1;\n }\n\n let start: number;\n let end: number;\n\n if (direction === 1) {\n end = Math.min(Math.max(index + 2, visibleItems), items.length);\n start = Math.max(end - visibleItems, 0);\n } else if (direction === -1) {\n start = Math.min(Math.max(index - 1, 0), items.length - visibleItems);\n end = start + visibleItems;\n } else {\n start = Math.max(index - Math.floor(visibleItems / 2), 0);\n end = Math.min(start + visibleItems, items.length);\n start = end - visibleItems;\n }\n\n const sliced = items.slice(start, end);\n\n prevIndex.current = index;\n\n return {\n sliced,\n activeId,\n };\n};\n"],"names":["usePaginationDots","_ref","items","index","_ref$visibleItems","visibleItems","activeId","id","prevIndex","useRef","direction","current","start","end","Math","min","max","length","floor","sliced","slice"],"mappings":";;;;;;IAQaA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAAqE;AAAA,EAAA,IAA/DC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAAC,iBAAA,GAAAH,IAAA,CAAEI,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,iBAAA,CAAA;AAC9D,EAAA,IAAME,QAAQ,GAAGJ,KAAK,CAACC,KAAK,CAAC,CAACI,EAAE,CAAA;AAChC,EAAA,IAAMC,SAAS,GAAGC,YAAM,CAAgB,IAAI,CAAC,CAAA;EAC7C,IAAIC,SAAS,GAAG,CAAC,CAAA;AAEjB,EAAA,IAAIF,SAAS,CAACG,OAAO,KAAK,IAAI,EAAE;IAC5BD,SAAS,GAAGP,KAAK,GAAGK,SAAS,CAACG,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AAClD,GAAA;AAEA,EAAA,IAAIC,KAAa,CAAA;AACjB,EAAA,IAAIC,GAAW,CAAA;EAEf,IAAIH,SAAS,KAAK,CAAC,EAAE;AACjBG,IAAAA,GAAG,GAAGC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,GAAG,CAACb,KAAK,GAAG,CAAC,EAAEE,YAAY,CAAC,EAAEH,KAAK,CAACe,MAAM,CAAC,CAAA;IAC/DL,KAAK,GAAGE,IAAI,CAACE,GAAG,CAACH,GAAG,GAAGR,YAAY,EAAE,CAAC,CAAC,CAAA;AAC3C,GAAC,MAAM,IAAIK,SAAS,KAAK,CAAC,CAAC,EAAE;IACzBE,KAAK,GAAGE,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,GAAG,CAACb,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,EAAED,KAAK,CAACe,MAAM,GAAGZ,YAAY,CAAC,CAAA;IACrEQ,GAAG,GAAGD,KAAK,GAAGP,YAAY,CAAA;AAC9B,GAAC,MAAM;AACHO,IAAAA,KAAK,GAAGE,IAAI,CAACE,GAAG,CAACb,KAAK,GAAGW,IAAI,CAACI,KAAK,CAACb,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACzDQ,IAAAA,GAAG,GAAGC,IAAI,CAACC,GAAG,CAACH,KAAK,GAAGP,YAAY,EAAEH,KAAK,CAACe,MAAM,CAAC,CAAA;IAClDL,KAAK,GAAGC,GAAG,GAAGR,YAAY,CAAA;AAC9B,GAAA;EAEA,IAAMc,MAAM,GAAGjB,KAAK,CAACkB,KAAK,CAACR,KAAK,EAAEC,GAAG,CAAC,CAAA;EAEtCL,SAAS,CAACG,OAAO,GAAGR,KAAK,CAAA;EAEzB,OAAO;AACHgB,IAAAA,MAAM,EAANA,MAAM;AACNb,IAAAA,QAAQ,EAARA,QAAAA;GACH,CAAA;AACL;;;;"}
|
package/cjs/index.css
CHANGED
@@ -901,13 +901,14 @@
|
|
901
901
|
|
902
902
|
.base_14g19gh_bnp62xb__2fa012c5{padding:var(--plasma-note-padding);border-radius:var(--plasma-note-border-radius);height:var(--plasma_private-note-height);width:var(--plasma_private-note-width);gap:var(--plasma-note-gap);}.base_14g19gh_bnp62xb__2fa012c5.base_14g19gh_noteStretch__2fa012c5{width:100%;height:100%;}.base_14g19gh_bnp62xb__2fa012c5 .base_14g19gh_c1i6bkpn__2fa012c5{width:var(--plasma-note-fixed-content-before-width);height:var(--plasma-note-fixed-content-before-height);padding:var(--plasma-note-fixed-content-before-padding);box-sizing:border-box;}.base_14g19gh_bnp62xb__2fa012c5.base_14g19gh_noteContentAlignCenter__2fa012c5{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:var(--plasma-note-padding-scalable);gap:var(--plasma-note-gap-scalable);}.base_14g19gh_bnp62xb__2fa012c5.base_14g19gh_noteContentAlignCenter__2fa012c5 .base_14g19gh_c1i6bkpn__2fa012c5{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:unset;}.base_14g19gh_bnp62xb__2fa012c5 .base_14g19gh_cendmch__2fa012c5{width:var(--plasma_private-note-content-width-with-offset);gap:var(--plasma-note-content-gap);}.base_14g19gh_bnp62xb__2fa012c5 .base_14g19gh_t1wkjxug__2fa012c5,.base_14g19gh_bnp62xb__2fa012c5 .base_14g19gh_te86upw__2fa012c5{width:100%;min-height:var(--plasma-note-title-line-height);font-family:var(--plasma-note-title-font-family);font-size:var(--plasma-note-title-font-size);font-style:var(--plasma-note-title-font-style);font-weight:var(--plasma-note-title-font-weight);-webkit-letter-spacing:var(--plasma-note-title-letter-spacing);-moz-letter-spacing:var(--plasma-note-title-letter-spacing);-ms-letter-spacing:var(--plasma-note-title-letter-spacing);letter-spacing:var(--plasma-note-title-letter-spacing);line-height:var(--plasma-note-title-line-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.base_14g19gh_bnp62xb__2fa012c5 .base_14g19gh_t1kp0wa7__2fa012c5,.base_14g19gh_bnp62xb__2fa012c5 .base_14g19gh_tf1lafs__2fa012c5{font-family:var(--plasma-note-text-font-family);font-size:var(--plasma-note-text-font-size);font-style:var(--plasma-note-text-font-style);font-weight:var(--plasma-note-text-font-weight);-webkit-letter-spacing:var(--plasma-note-text-letter-spacing);-moz-letter-spacing:var(--plasma-note-text-letter-spacing);-ms-letter-spacing:var(--plasma-note-text-letter-spacing);letter-spacing:var(--plasma-note-text-letter-spacing);line-height:var(--plasma-note-text-line-height);word-break:break-all;}
|
903
903
|
|
904
|
-
.
|
905
|
-
.
|
906
|
-
.
|
907
|
-
|
908
|
-
.
|
909
|
-
.
|
910
|
-
.
|
904
|
+
.Note_styles_thpfhk_b1eqam57__3331b1ad{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;}
|
905
|
+
.Note_styles_thpfhk_c1i6bkpn__3331b1ad{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
|
906
|
+
.Note_styles_thpfhk_cendmch__3331b1ad{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;box-sizing:border-box;}
|
907
|
+
.Note_styles_thpfhk_t1wkjxug__3331b1ad{padding-right:var(--t1wkjxug-0);box-sizing:border-box;}
|
908
|
+
.Note_styles_thpfhk_te86upw__3331b1ad{visibility:hidden;position:absolute;z-index:-9999;opacity:0;}
|
909
|
+
.Note_styles_thpfhk_t1kp0wa7__3331b1ad{display:block;position:relative;}
|
910
|
+
.Note_styles_thpfhk_tf1lafs__3331b1ad{visibility:hidden;position:absolute;z-index:-9999;opacity:0;top:0;left:0;}
|
911
|
+
.Note_styles_thpfhk_cvkhqd3__3331b1ad{position:absolute;right:var(--plasma-note-close-icon-right);top:var(--plasma-note-close-icon-top);width:var(--plasma-note-close-icon-button-size);height:var(--plasma-note-close-icon-button-size);color:var(--plasma-note-close-icon-color);}.Note_styles_thpfhk_cvkhqd3__3331b1ad:hover{color:var(--plasma-note-close-icon-color-on-hover);}
|
911
912
|
|
912
913
|
.HeadCell_styles_155gsrn_c14eoxb5__5c959fae{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.5rem;}
|
913
914
|
.HeadCell_styles_155gsrn_t1179z8p__5c959fae{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.5rem;}
|
@@ -970,6 +971,12 @@
|
|
970
971
|
|
971
972
|
.CarouselItem_cqjszm_s13at6mi__7ff91d05{-webkit-scroll-snap-align:var(--s13at6mi-0);-moz-scroll-snap-align:var(--s13at6mi-0);-ms-scroll-snap-align:var(--s13at6mi-0);scroll-snap-align:var(--s13at6mi-0);-webkit-scroll-snap-stop:var(--s13at6mi-1);-moz-scroll-snap-stop:var(--s13at6mi-1);-ms-scroll-snap-stop:var(--s13at6mi-1);scroll-snap-stop:var(--s13at6mi-1);}
|
972
973
|
|
974
|
+
.PaginationDots_fm2ha5_dut2ldg__db2a2205{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0;padding:0;list-style:none;}
|
975
|
+
|
976
|
+
|
977
|
+
.PaginationDot_baul9c_d1mcs0w2__b1eb09b2{width:var(--d1mcs0w2-0);height:0.375rem;border-radius:1rem;background:var(--d1mcs0w2-1);-webkit-transition:width 0.1s ease-in-out,background 0.3s ease-in-out;transition:width 0.1s ease-in-out,background 0.3s ease-in-out;font-size:0.5rem;}.PaginationDot_baul9c_d1mcs0w2__b1eb09b2 + .PaginationDot_baul9c_d1mcs0w2__b1eb09b2{margin-left:0.375rem;}.PaginationDot_baul9c_d1mcs0w2__b1eb09b2:focus{outline:0 none;}
|
978
|
+
.PaginationDot_baul9c_poypaki__b1eb09b2.PaginationDot_baul9c_d1mcs0w2__b1eb09b2{cursor:pointer;background:var(--poypaki-0);}.PaginationDot_baul9c_poypaki__b1eb09b2.PaginationDot_baul9c_d1mcs0w2__b1eb09b2:hover{background:var(--text-accent);}
|
979
|
+
|
973
980
|
.CodeField_styles_7zxgpc_b1xx9skx__84a479ac{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:-webkit-min-content;width:-moz-min-content;width:min-content;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.CodeField_styles_7zxgpc_b1xx9skx__84a479ac.CodeField_styles_7zxgpc_codefieldCaptionAlignLeft__84a479ac{-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}
|
974
981
|
.CodeField_styles_7zxgpc_c1wzspax__84a479ac{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
975
982
|
.CodeField_styles_7zxgpc_c7swj1z__84a479ac{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
package/cjs/index.js
CHANGED
@@ -236,6 +236,9 @@ var ToastNew_tokens = require('./components/Toast/ToastNew/ToastNew.tokens.js');
|
|
236
236
|
var Carousel = require('./components/Carousel/Carousel.js');
|
237
237
|
var Carousel_styles = require('./components/Carousel/Carousel.styles.js');
|
238
238
|
var CarouselItem = require('./components/Carousel/CarouselItem.js');
|
239
|
+
var SmartPaginationDots = require('./components/PaginationDots/SmartPaginationDots.js');
|
240
|
+
var PaginationDots = require('./components/PaginationDots/PaginationDots.js');
|
241
|
+
var PaginationDot = require('./components/PaginationDots/PaginationDot.js');
|
239
242
|
var CodeField = require('./components/CodeField/CodeField.js');
|
240
243
|
var CodeField_tokens = require('./components/CodeField/CodeField.tokens.js');
|
241
244
|
var constants$1 = require('./components/CodeField/utils/constants.js');
|
@@ -679,6 +682,9 @@ exports.carouselConfig = Carousel.carouselConfig;
|
|
679
682
|
exports.carouselRoot = Carousel.carouselRoot;
|
680
683
|
exports.CarouselGridWrapper = Carousel_styles.CarouselGridWrapper;
|
681
684
|
exports.CarouselItem = CarouselItem.CarouselItem;
|
685
|
+
exports.SmartPaginationDots = SmartPaginationDots.SmartPaginationDots;
|
686
|
+
exports.PaginationDots = PaginationDots.PaginationDots;
|
687
|
+
exports.PaginationDot = PaginationDot.PaginationDot;
|
682
688
|
exports.codeFieldConfig = CodeField.codeFieldConfig;
|
683
689
|
exports.codeFieldRoot = CodeField.codeFieldRoot;
|
684
690
|
exports.codeFieldClasses = CodeField_tokens.classes;
|
package/cjs/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -18,7 +18,8 @@ var useMonths = exports.useMonths = function useMonths(_ref) {
|
|
18
18
|
min = _ref.min,
|
19
19
|
max = _ref.max,
|
20
20
|
_ref$locale = _ref.locale,
|
21
|
-
locale = _ref$locale === void 0 ? 'ru' : _ref$locale
|
21
|
+
locale = _ref$locale === void 0 ? 'ru' : _ref$locale,
|
22
|
+
includeEdgeDates = _ref.includeEdgeDates;
|
22
23
|
return (0, _react.useMemo)(function () {
|
23
24
|
var months = _utils.SHORT_MONTH_NAME[locale].map(function (monthName, monthIndex) {
|
24
25
|
return {
|
@@ -43,6 +44,7 @@ var useMonths = exports.useMonths = function useMonths(_ref) {
|
|
43
44
|
type: _types.CalendarState.Months,
|
44
45
|
min: min,
|
45
46
|
max: max,
|
47
|
+
includeEdgeDates: includeEdgeDates,
|
46
48
|
eventList: eventList,
|
47
49
|
disabledList: disabledList
|
48
50
|
});
|
@@ -16,7 +16,8 @@ var useQuarters = exports.useQuarters = function useQuarters(_ref) {
|
|
16
16
|
eventList = _ref.eventList,
|
17
17
|
disabledList = _ref.disabledList,
|
18
18
|
min = _ref.min,
|
19
|
-
max = _ref.max
|
19
|
+
max = _ref.max,
|
20
|
+
includeEdgeDates = _ref.includeEdgeDates;
|
20
21
|
return (0, _react.useMemo)(function () {
|
21
22
|
var quarters = _utils.QUARTER_NAMES.map(function (quarterName) {
|
22
23
|
var _quarterDates$quarter = _utils.quarterDates[quarterName],
|
@@ -42,6 +43,7 @@ var useQuarters = exports.useQuarters = function useQuarters(_ref) {
|
|
42
43
|
type: _types.CalendarState.Quarters,
|
43
44
|
min: min,
|
44
45
|
max: max,
|
46
|
+
includeEdgeDates: includeEdgeDates,
|
45
47
|
eventList: eventList,
|
46
48
|
disabledList: disabledList
|
47
49
|
});
|
@@ -17,7 +17,8 @@ var useYears = exports.useYears = function useYears(_ref) {
|
|
17
17
|
eventList = _ref.eventList,
|
18
18
|
disabledList = _ref.disabledList,
|
19
19
|
min = _ref.min,
|
20
|
-
max = _ref.max
|
20
|
+
max = _ref.max,
|
21
|
+
includeEdgeDates = _ref.includeEdgeDates;
|
21
22
|
return (0, _react.useMemo)(function () {
|
22
23
|
// type-coverage:ignore-next-line
|
23
24
|
var years = Array.from(Array(_utils.YEAR_RENDER_COUNT), function (_, i) {
|
@@ -42,6 +43,7 @@ var useYears = exports.useYears = function useYears(_ref) {
|
|
42
43
|
type: _types.CalendarState.Years,
|
43
44
|
min: min,
|
44
45
|
max: max,
|
46
|
+
includeEdgeDates: includeEdgeDates,
|
45
47
|
eventList: eventList,
|
46
48
|
disabledList: disabledList
|
47
49
|
});
|
@@ -48,7 +48,7 @@ var normalizeDate = function normalizeDate(date, type) {
|
|
48
48
|
date.setMonth(0);
|
49
49
|
}
|
50
50
|
};
|
51
|
-
var isDisabledNextDate = function isDisabledNextDate(_ref, type, max) {
|
51
|
+
var isDisabledNextDate = function isDisabledNextDate(_ref, type, max, includeEdgeDates) {
|
52
52
|
var year = _ref.year,
|
53
53
|
monthIndex = _ref.monthIndex,
|
54
54
|
day = _ref.day;
|
@@ -60,13 +60,13 @@ var isDisabledNextDate = function isDisabledNextDate(_ref, type, max) {
|
|
60
60
|
var currentDate = new Date(year, monthIndex, day);
|
61
61
|
dateOperationHandler[type].add(currentDate);
|
62
62
|
var isOut = true;
|
63
|
-
while (isOut && currentDate <= maxDate) {
|
64
|
-
isOut = maxDate <= currentDate;
|
63
|
+
while (isOut && includeEdgeDates ? currentDate < maxDate : currentDate <= maxDate) {
|
64
|
+
isOut = includeEdgeDates ? maxDate < currentDate : maxDate <= currentDate;
|
65
65
|
dateOperationHandler[type].add(currentDate);
|
66
66
|
}
|
67
67
|
return isOut;
|
68
68
|
};
|
69
|
-
var isDisabledPreviousDate = function isDisabledPreviousDate(_ref2, type, min) {
|
69
|
+
var isDisabledPreviousDate = function isDisabledPreviousDate(_ref2, type, min, includeEdgeDates) {
|
70
70
|
var year = _ref2.year,
|
71
71
|
monthIndex = _ref2.monthIndex,
|
72
72
|
day = _ref2.day;
|
@@ -78,54 +78,58 @@ var isDisabledPreviousDate = function isDisabledPreviousDate(_ref2, type, min) {
|
|
78
78
|
var currentDate = new Date(year, monthIndex, day);
|
79
79
|
dateOperationHandler[type].subtract(currentDate);
|
80
80
|
var isOut = true;
|
81
|
-
while (isOut && currentDate >= minDate) {
|
82
|
-
isOut = minDate >= currentDate;
|
81
|
+
while (isOut && includeEdgeDates ? currentDate > minDate : currentDate >= minDate) {
|
82
|
+
isOut = includeEdgeDates ? minDate > currentDate : minDate >= currentDate;
|
83
83
|
dateOperationHandler[type].subtract(currentDate);
|
84
84
|
}
|
85
85
|
return isOut;
|
86
86
|
};
|
87
|
-
var getDisabledDates = function getDisabledDates(list, type, min, max) {
|
87
|
+
var getDisabledDates = function getDisabledDates(list, type, min, max, includeEdgeDates) {
|
88
88
|
var disabledDate = [];
|
89
|
-
if (isDisabledPreviousDate(list[0], type, min)) {
|
89
|
+
if (isDisabledPreviousDate(list[0], type, min, includeEdgeDates)) {
|
90
90
|
disabledDate.push('previous');
|
91
91
|
}
|
92
|
-
if (isDisabledNextDate(list[list.length - 1], type, max)) {
|
92
|
+
if (isDisabledNextDate(list[list.length - 1], type, max, includeEdgeDates)) {
|
93
93
|
disabledDate.push('next');
|
94
94
|
}
|
95
95
|
return disabledDate.join(',');
|
96
96
|
};
|
97
|
-
var isDisabledArrowLeft = function isDisabledArrowLeft(date, min) {
|
97
|
+
var isDisabledArrowLeft = function isDisabledArrowLeft(date, min, includeEdgeDates) {
|
98
98
|
var currentDate = new Date(date);
|
99
99
|
currentDate.setDate(currentDate.getDate() - 1);
|
100
|
-
|
100
|
+
var disableCondition = min && (includeEdgeDates ? min > currentDate : min >= currentDate);
|
101
|
+
return disableCondition;
|
101
102
|
};
|
102
|
-
var isDisabledArrowRight = function isDisabledArrowRight(date, max) {
|
103
|
+
var isDisabledArrowRight = function isDisabledArrowRight(date, max, includeEdgeDates) {
|
103
104
|
var currentDate = new Date(date);
|
104
105
|
currentDate.setDate(currentDate.getDate() + 1);
|
105
|
-
|
106
|
+
var disableCondition = max && (includeEdgeDates ? max < currentDate : max <= currentDate);
|
107
|
+
return disableCondition;
|
106
108
|
};
|
107
|
-
var isDisabledArrowUp = function isDisabledArrowUp(date, min) {
|
109
|
+
var isDisabledArrowUp = function isDisabledArrowUp(date, min, includeEdgeDates) {
|
108
110
|
var currentDate = new Date(date);
|
109
111
|
currentDate.setDate(date.getDate() - 7);
|
110
|
-
|
112
|
+
var disableCondition = min && (includeEdgeDates ? min > currentDate : min >= currentDate);
|
113
|
+
return disableCondition;
|
111
114
|
};
|
112
|
-
var isDisabledArrowDown = function isDisabledArrowDown(date, max) {
|
115
|
+
var isDisabledArrowDown = function isDisabledArrowDown(date, max, includeEdgeDates) {
|
113
116
|
var currentDate = new Date(date);
|
114
117
|
currentDate.setDate(date.getDate() + 7);
|
115
|
-
|
118
|
+
var disableCondition = max && (includeEdgeDates ? max < currentDate : max <= currentDate);
|
119
|
+
return disableCondition;
|
116
120
|
};
|
117
|
-
var getDisabledArrowKey = function getDisabledArrowKey(currentDate, min, max) {
|
121
|
+
var getDisabledArrowKey = function getDisabledArrowKey(currentDate, min, max, includeEdgeDates) {
|
118
122
|
var disabledArrowKey = [];
|
119
|
-
if (isDisabledArrowLeft(currentDate, min)) {
|
123
|
+
if (isDisabledArrowLeft(currentDate, min, includeEdgeDates)) {
|
120
124
|
disabledArrowKey.push('left');
|
121
125
|
}
|
122
|
-
if (isDisabledArrowRight(currentDate, max)) {
|
126
|
+
if (isDisabledArrowRight(currentDate, max, includeEdgeDates)) {
|
123
127
|
disabledArrowKey.push('right');
|
124
128
|
}
|
125
|
-
if (isDisabledArrowDown(currentDate, max)) {
|
129
|
+
if (isDisabledArrowDown(currentDate, max, includeEdgeDates)) {
|
126
130
|
disabledArrowKey.push('down');
|
127
131
|
}
|
128
|
-
if (isDisabledArrowUp(currentDate, min)) {
|
132
|
+
if (isDisabledArrowUp(currentDate, min, includeEdgeDates)) {
|
129
133
|
disabledArrowKey.push('up');
|
130
134
|
}
|
131
135
|
return disabledArrowKey.join(',');
|
@@ -154,7 +158,7 @@ var getDatesWithModifications = exports.getDatesWithModifications = function get
|
|
154
158
|
var date = _ref5.date;
|
155
159
|
return date;
|
156
160
|
});
|
157
|
-
var disabledDates = getDisabledDates(datesList, type, min, max);
|
161
|
+
var disabledDates = getDisabledDates(datesList, type, min, max, includeEdgeDates);
|
158
162
|
return dates.map(function (dateItem) {
|
159
163
|
var date = dateItem.date;
|
160
164
|
var year = date.year,
|
@@ -179,7 +183,7 @@ var getDatesWithModifications = exports.getDatesWithModifications = function get
|
|
179
183
|
dateItem.events = eventsMap.get(keyDate);
|
180
184
|
dateItem.disabled = disabledDatesMap.has(keyDate) || isOutOfMinMaxRange;
|
181
185
|
dateItem.isOutOfMinMaxRange = isOutOfMinMaxRange;
|
182
|
-
dateItem.disabledArrowKey = getDisabledArrowKey(currentDate, min, max);
|
186
|
+
dateItem.disabledArrowKey = getDisabledArrowKey(currentDate, min, max, includeEdgeDates);
|
183
187
|
dateItem.disabledDates = disabledDates;
|
184
188
|
return dateItem;
|
185
189
|
});
|
@@ -8,11 +8,12 @@ exports.noteRoot = exports.noteConfig = void 0;
|
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard(/*#__PURE__*/require("react"));
|
9
9
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
10
|
var _utils = /*#__PURE__*/require("../../utils");
|
11
|
+
var _IconCrossThin = /*#__PURE__*/require("../_Icon/Icons/IconCrossThin");
|
11
12
|
var _base = /*#__PURE__*/require("./variations/_view/base");
|
12
13
|
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
13
14
|
var _Note = /*#__PURE__*/require("./Note.styles");
|
14
15
|
var _Note2 = /*#__PURE__*/require("./Note.tokens");
|
15
|
-
var _excluded = ["className", "style", "title", "text", "contentBefore", "contentBeforeSizing", "size", "view", "stretch", "width", "height"];
|
16
|
+
var _excluded = ["className", "style", "title", "text", "contentBefore", "contentBeforeSizing", "size", "view", "stretch", "width", "height", "hasClose", "onCloseButtonClick"];
|
16
17
|
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); }
|
17
18
|
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; }
|
18
19
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
@@ -43,6 +44,8 @@ var noteRoot = exports.noteRoot = function noteRoot(Root) {
|
|
43
44
|
stretch = _ref.stretch,
|
44
45
|
width = _ref.width,
|
45
46
|
height = _ref.height,
|
47
|
+
hasClose = _ref.hasClose,
|
48
|
+
onCloseButtonClick = _ref.onCloseButtonClick,
|
46
49
|
rest = _objectWithoutProperties(_ref, _excluded);
|
47
50
|
var _useState = (0, _react.useState)(text),
|
48
51
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -108,11 +111,22 @@ var noteRoot = exports.noteRoot = function noteRoot(Root) {
|
|
108
111
|
ref: contentBeforeRef
|
109
112
|
}, contentBefore), /*#__PURE__*/_react["default"].createElement(_Note.ContentWrapper, {
|
110
113
|
ref: contentWrapperRef
|
111
|
-
}, title && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Note.Title,
|
114
|
+
}, title && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Note.Title, {
|
115
|
+
hasClose: hasClose
|
116
|
+
}, title), /*#__PURE__*/_react["default"].createElement(_Note.TitleHelper, {
|
112
117
|
ref: titleHelperRef
|
113
118
|
}, "C")), innerText && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Note.Text, null, innerText, /*#__PURE__*/_react["default"].createElement(_Note.TextHelper, {
|
114
119
|
ref: textRenderHelperRef
|
115
|
-
}, "C"))))
|
120
|
+
}, "C")))), hasClose && /*#__PURE__*/_react["default"].createElement(_Note.CloseIconWrapper, {
|
121
|
+
view: "clear",
|
122
|
+
size: "s",
|
123
|
+
onClick: onCloseButtonClick,
|
124
|
+
className: _Note2.classes.closeIcon
|
125
|
+
}, /*#__PURE__*/_react["default"].createElement(_IconCrossThin.IconCrossThin, {
|
126
|
+
size: "s",
|
127
|
+
sizeCustomProperty: _Note2.tokens.closeIconSize,
|
128
|
+
color: "inherit"
|
129
|
+
})));
|
116
130
|
});
|
117
131
|
};
|
118
132
|
var noteConfig = exports.noteConfig = {
|