@activecollab/components 2.0.164 → 2.0.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Sheet/Sheet.js +42 -13
- package/dist/cjs/components/Sheet/Sheet.js.map +1 -1
- package/dist/cjs/components/Sheet/Styles.js +24 -4
- package/dist/cjs/components/Sheet/Styles.js.map +1 -1
- package/dist/esm/components/Sheet/Sheet.d.ts +8 -1
- package/dist/esm/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/esm/components/Sheet/Sheet.js +47 -14
- package/dist/esm/components/Sheet/Sheet.js.map +1 -1
- package/dist/esm/components/Sheet/Styles.d.ts +9 -1
- package/dist/esm/components/Sheet/Styles.d.ts.map +1 -1
- package/dist/esm/components/Sheet/Styles.js +19 -3
- package/dist/esm/components/Sheet/Styles.js.map +1 -1
- package/dist/index.js +65 -19
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,15 +2,16 @@ import { CSSTransition } from "react-transition-group";
|
|
|
2
2
|
import styled, { css, keyframes } from "styled-components";
|
|
3
3
|
import { BoxSizingStyle } from "../BoxSizingStyle";
|
|
4
4
|
import { FontStyle } from "../FontStyle";
|
|
5
|
+
import { ListSeparator } from "../List";
|
|
5
6
|
export const StyledSheetIcons = styled.div.withConfig({
|
|
6
7
|
displayName: "Styles__StyledSheetIcons",
|
|
7
8
|
componentId: "sc-144eyxd-0"
|
|
8
|
-
})(["display:flex;height:0;position:relative;span{position:relative;background-color:var(--page-paper-main);box-shadow:var(--shadow-secondary);cursor:pointer;border-radius:100%;width:40px;height:40px;display:flex;justify-content:center;align-items:center;& > *{height:40px;width:40px;padding:8px;fill:var(--color-theme-600);}}"]);
|
|
9
|
+
})(["display:flex;height:0;position:relative;span{position:relative;background-color:var(--page-paper-main);box-shadow:var(--shadow-secondary);cursor:pointer;border-radius:100%;width:40px;height:40px;display:flex;justify-content:center;align-items:center;& > *{height:40px;width:40px;padding:8px;fill:var(--color-theme-600);}}@media (max-width:640px){display:none;}"]);
|
|
9
10
|
StyledSheetIcons.displayName = "StyledSheetIcons";
|
|
10
11
|
export const StyledSheetWrapper = styled.div.withConfig({
|
|
11
12
|
displayName: "Styles__StyledSheetWrapper",
|
|
12
13
|
componentId: "sc-144eyxd-1"
|
|
13
|
-
})(["", " ", " position:relative;max-width:95vw;display:flex;flex-direction:row;", " ", " ", " ", " ", " ", ""], BoxSizingStyle, FontStyle, props => props.$mode === "stretch" ? css(["margin-top:8px;height:calc(100vh - 16px);width:calc(100vw - 100px);max-width:1000px;", "{flex-direction:column;width:0;height:calc(100vh - 32px);& > *{margin-bottom:8px;animation-fill-mode:both;}span{top:8px;}}"], StyledSheetIcons) : css(["max-height:calc(100vh - 156px);margin-top:126px;margin-bottom:30px;width:540px;flex-direction:column;", "{flex-direction:row-reverse;& > *{margin-left:8px;animation-fill-mode:both;}span{top:-48px;right:8px;}}"], StyledSheetIcons), props => props.$position === "center" && css(["", ""], {
|
|
14
|
+
})(["", " ", " position:relative;max-width:95vw;display:flex;flex-direction:row;", " ", " ", " ", " ", " ", " ", ""], BoxSizingStyle, FontStyle, props => props.$mode === "stretch" ? css(["margin-top:8px;height:calc(100vh - 16px);width:calc(100vw - 100px);max-width:1000px;", "{flex-direction:column;width:0;height:calc(100vh - 32px);& > *{margin-bottom:8px;animation-fill-mode:both;}span{top:8px;}}"], StyledSheetIcons) : css(["max-height:calc(100vh - 156px);margin-top:126px;margin-bottom:30px;width:540px;flex-direction:column;", "{flex-direction:row-reverse;& > *{margin-left:8px;animation-fill-mode:both;}span{top:-48px;right:8px;}}"], StyledSheetIcons), props => props.$mode === "stretch" && css(["@media (max-width:640px){width:100%;height:100%;}"]), props => props.$position === "center" && css(["", ""], {
|
|
14
15
|
"marginLeft": "auto",
|
|
15
16
|
"marginRight": "auto"
|
|
16
17
|
}), props => props.$position === "left" && css(["", ""], {
|
|
@@ -37,11 +38,26 @@ export const StyledSheetControlsCenterOut = keyframes(["0%{transform:translateY(
|
|
|
37
38
|
export const StyledAnimatedSpan = styled.span.withConfig({
|
|
38
39
|
displayName: "Styles__StyledAnimatedSpan",
|
|
39
40
|
componentId: "sc-144eyxd-3"
|
|
40
|
-
})(["
|
|
41
|
+
})(["&:hover svg{fill:var(--color-primary);}", " ", " ", " ", " ", ""], props => props.$state === "entering" && css(["opacity:1;", ""], props.$mode === "stretch" ? css(["animation-name:", ";animation-duration:", ";animation-delay:", ";"], StyledSheetControlsTop, props.$durationIn + "s", props.$durationIn + "s") : css(["animation-name:", ";animation-duration:", ";animation-delay:0s;"], StyledSheetControlsCenterIn, props.$maxDurationIn + "s")), props => props.$state === "entered" && css(["opacity:1;"]), props => props.$disabled && css(["pointer-events:none;svg{opacity:0.5;}"]), props => props.$state === "exiting" && css(["opacity:0;", ""], props.$mode === "stretch" ? css(["animation-name:", ";animation-duration:", ";animation-delay:", ";"], StyledSheetControlsBottom, props.$durationOut + "s", props.$durationOut + "s") : css(["animation-name:", ";animation-duration:", ";animation-delay:0;"], StyledSheetControlsCenterOut, props.$maxDurationOut + "s")), props => props.$state === "exited" && css(["opacity:0;"]));
|
|
41
42
|
StyledAnimatedSpan.displayName = "StyledAnimatedSpan";
|
|
42
43
|
export const StyledCssTransition = styled(CSSTransition).withConfig({
|
|
43
44
|
displayName: "Styles__StyledCssTransition",
|
|
44
45
|
componentId: "sc-144eyxd-4"
|
|
45
46
|
})(["", " ", " ", " ", ""], props => props.$direction === "top" && css(["&.c-sheet__animation-enter{opacity:0;transform:translateY(-100%);}&.c-sheet__animation-enter-active{opacity:1;transform:translateY(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-appear{opacity:0;transform:translateY(-100%);}&.c-sheet__animation-appear-active{opacity:1;transform:translateY(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-exit{opacity:1;}&.c-sheet__animation-exit-active{opacity:0;transform:translateY(-100%);transition:opacity 200ms,transform 200ms;}"]), props => props.$direction === "bottom" && css(["&.c-sheet__animation-enter{opacity:0;transform:translateY(100%);}&.c-sheet__animation-enter-active{opacity:1;transform:translateY(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-appear{opacity:0;transform:translateY(100%);}&.c-sheet__animation-appear-active{opacity:1;transform:translateY(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-exit{opacity:1;}&.c-sheet__animation-exit-active{opacity:0;transform:translateY(100%);transition:opacity 200ms,transform 200ms;}"]), props => props.$direction === "left" && css(["&.c-sheet__animation-enter{opacity:0;transform:translateX(-100%);}&.c-sheet__animation-enter-active{opacity:1;transform:translateX(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-appear{opacity:0;transform:translateX(-100%);}&.c-sheet__animation-appear-active{opacity:1;transform:translateX(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-exit{opacity:1;}&.c-sheet__animation-exit-active{opacity:0;transform:translateX(-100%);transition:opacity 200ms,transform 200ms;}"]), props => props.$direction === "right" && css(["&.c-sheet__animation-enter{opacity:0;transform:translateX(100%);}&.c-sheet__animation-enter-active{opacity:1;transform:translateX(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-appear{opacity:0;transform:translateX(100%);}&.c-sheet__animation-appear-active{opacity:1;transform:translateX(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-exit{opacity:1;}&.c-sheet__animation-exit-active{opacity:0;transform:translateX(100%);transition:opacity 200ms,transform 200ms;}"]));
|
|
46
47
|
StyledCssTransition.displayName = "StyledCssTransition";
|
|
48
|
+
export const StyledListSeparator = styled(ListSeparator).withConfig({
|
|
49
|
+
displayName: "Styles__StyledListSeparator",
|
|
50
|
+
componentId: "sc-144eyxd-5"
|
|
51
|
+
})(["margin:0;"]);
|
|
52
|
+
StyledListSeparator.displayName = "StyledListSeparator";
|
|
53
|
+
export const StyledIconsWrapperSmall = styled.div.withConfig({
|
|
54
|
+
displayName: "Styles__StyledIconsWrapperSmall",
|
|
55
|
+
componentId: "sc-144eyxd-6"
|
|
56
|
+
})(["height:40px;display:flex;gap:8px;padding-left:16px;padding-right:16px;align-items:center;place-content:end;flex-direction:row-reverse;"]);
|
|
57
|
+
StyledIconsWrapperSmall.displayName = "StyledIconsWrapperSmall";
|
|
58
|
+
export const StyledHeader = styled.div.withConfig({
|
|
59
|
+
displayName: "Styles__StyledHeader",
|
|
60
|
+
componentId: "sc-144eyxd-7"
|
|
61
|
+
})(["@media (min-width:640px){display:none;}"]);
|
|
62
|
+
StyledHeader.displayName = "StyledHeader";
|
|
47
63
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["CSSTransition","styled","css","keyframes","BoxSizingStyle","FontStyle","StyledSheetIcons","div","withConfig","displayName","componentId","StyledSheetWrapper","props","$mode","$position","StyledSheetWrapperPaper","attrs","className","paperClass","StyledSheetControlsTop","StyledSheetControlsBottom","StyledSheetControlsCenterIn","StyledSheetControlsCenterOut","StyledAnimatedSpan","span","$state","$durationIn","$maxDurationIn","$durationOut","$maxDurationOut","StyledCssTransition","$direction"],"sources":["../../../../src/components/Sheet/Styles.ts"],"sourcesContent":["import { CSSTransition } from \"react-transition-group\";\n\nimport styled, { css, keyframes } from \"styled-components\";\nimport tw from \"twin.macro\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { FontStyle } from \"../FontStyle\";\n\nexport const StyledSheetIcons = styled.div`\n display: flex;\n height: 0;\n position: relative;\n\n span {\n position: relative;\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-secondary);\n cursor: pointer;\n border-radius: 100%;\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n & > * {\n height: 40px;\n width: 40px;\n padding: 8px;\n fill: var(--color-theme-600);\n }\n }\n`;\n\nStyledSheetIcons.displayName = \"StyledSheetIcons\";\n\ninterface IStyledSheetWrapper {\n $position?: \"center\" | \"left\" | \"right\";\n $mode?: \"normal\" | \"stretch\";\n}\n\nexport const StyledSheetWrapper = styled.div<IStyledSheetWrapper>`\n ${BoxSizingStyle}\n ${FontStyle}\n\n position: relative;\n max-width: 95vw;\n display: flex;\n flex-direction: row;\n\n ${(props) =>\n props.$mode === \"stretch\"\n ? css`\n margin-top: 8px;\n height: calc(100vh - 16px);\n width: calc(100vw - 100px);\n max-width: 1000px;\n ${StyledSheetIcons} {\n flex-direction: column;\n width: 0;\n height: calc(100vh - 32px);\n & > * {\n margin-bottom: 8px;\n animation-fill-mode: both;\n }\n span {\n top: 8px;\n }\n }\n `\n : css`\n max-height: calc(100vh - 156px);\n margin-top: 126px;\n margin-bottom: 30px;\n width: 540px;\n flex-direction: column;\n\n ${StyledSheetIcons} {\n flex-direction: row-reverse;\n & > * {\n margin-left: 8px;\n animation-fill-mode: both;\n }\n span {\n top: -48px;\n right: 8px;\n }\n }\n `}\n\n ${(props) =>\n props.$position === \"center\" &&\n css`\n ${tw`tw-mx-auto`}\n `}\n\n ${(props) =>\n props.$position === \"left\" &&\n css`\n ${tw`tw-ml-2 tw-mr-auto`}\n `}\n\n ${(props) =>\n props.$position === \"right\" &&\n css`\n ${tw`tw-mr-2 tw-ml-auto`}\n `}\n\n ${(props) =>\n props.$mode === \"stretch\" &&\n props.$position !== \"left\" &&\n css`\n ${StyledSheetIcons} {\n span {\n right: 48px;\n }\n }\n `}\n\n ${(props) =>\n props.$mode === \"stretch\" &&\n props.$position === \"left\" &&\n css`\n flex-direction: row-reverse;\n\n ${StyledSheetIcons} {\n span {\n right: -8px;\n }\n }\n `}\n`;\n\nStyledSheetWrapper.displayName = \"StyledSheetWrapper\";\n\ninterface IStyledSheetWrapperPaper {\n paperClass?: string;\n}\n\nexport const StyledSheetWrapperPaper = styled.div.attrs<IStyledSheetWrapperPaper>(\n (props) => ({\n className: props.paperClass,\n })\n)<IStyledSheetWrapperPaper>`\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 6px;\n overflow: auto;\n animation: 0.3s linear ease-out;\n\n ${tw`tw-flex-auto`}\n`;\n\nStyledSheetWrapperPaper.displayName = \"StyledSheetWrapperPaper\";\n\nexport const StyledSheetControlsTop = keyframes`\n 0% {\n opacity: 0;\n transform: translateY(-200px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n`;\n\nexport const StyledSheetControlsBottom = keyframes`\n 0% {\n opacity: 1;\n transform: translateY(0);\n }\n 100% {\n opacity: 0;\n transform: translateY(-200px);\n}\n`;\n\nexport const StyledSheetControlsCenterIn = keyframes`\n 0% {\n transform: translateY(-150px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n`;\n\nexport const StyledSheetControlsCenterOut = keyframes`\n 0% {\n transform: translateY(0);\n opacity: 1;\n }\n 100% {\n transform: translateY(-150px);\n opacity: 0;\n }\n`;\n\ninterface IStyledAnimatedSpan {\n $mode: string;\n $state: string;\n $maxDurationIn: number;\n $maxDurationOut: number;\n $durationOut: number;\n $durationIn: number;\n}\n\nexport const StyledAnimatedSpan = styled.span<IStyledAnimatedSpan>`\n background: red;\n ${(props) =>\n props.$state === \"entering\" &&\n css`\n opacity: 1;\n\n ${props.$mode === \"stretch\"\n ? css`\n animation-name: ${StyledSheetControlsTop};\n animation-duration: ${`${props.$durationIn}s`};\n animation-delay: ${`${props.$durationIn}s`};\n `\n : css`\n animation-name: ${StyledSheetControlsCenterIn};\n animation-duration: ${`${props.$maxDurationIn}s`};\n animation-delay: 0s;\n `}\n `}\n\n ${(props) =>\n props.$state === \"entered\" &&\n css`\n opacity: 1;\n `}\n\n ${(props) =>\n props.$state === \"exiting\" &&\n css`\n opacity: 0;\n\n ${props.$mode === \"stretch\"\n ? css`\n animation-name: ${StyledSheetControlsBottom};\n animation-duration: ${`${props.$durationOut}s`};\n animation-delay: ${`${props.$durationOut}s`};\n `\n : css`\n animation-name: ${StyledSheetControlsCenterOut};\n animation-duration: ${`${props.$maxDurationOut}s`};\n animation-delay: 0;\n `}\n `}\n\n ${(props) =>\n props.$state === \"exited\" &&\n css`\n opacity: 0;\n `}\n`;\n\nStyledAnimatedSpan.displayName = \"StyledAnimatedSpan\";\n\nexport const StyledCssTransition = styled(CSSTransition)<{\n $direction: string;\n}>`\n ${(props) =>\n props.$direction === \"top\" &&\n css`\n &.c-sheet__animation-enter {\n opacity: 0;\n transform: translateY(-100%);\n }\n &.c-sheet__animation-enter-active {\n opacity: 1;\n transform: translateY(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-appear {\n opacity: 0;\n transform: translateY(-100%);\n }\n &.c-sheet__animation-appear-active {\n opacity: 1;\n transform: translateY(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-exit {\n opacity: 1;\n }\n &.c-sheet__animation-exit-active {\n opacity: 0;\n transform: translateY(-100%);\n transition: opacity 200ms, transform 200ms;\n }\n `}\n\n ${(props) =>\n props.$direction === \"bottom\" &&\n css`\n &.c-sheet__animation-enter {\n opacity: 0;\n transform: translateY(100%);\n }\n &.c-sheet__animation-enter-active {\n opacity: 1;\n transform: translateY(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-appear {\n opacity: 0;\n transform: translateY(100%);\n }\n &.c-sheet__animation-appear-active {\n opacity: 1;\n transform: translateY(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-exit {\n opacity: 1;\n }\n &.c-sheet__animation-exit-active {\n opacity: 0;\n transform: translateY(100%);\n transition: opacity 200ms, transform 200ms;\n }\n `}\n\n ${(props) =>\n props.$direction === \"left\" &&\n css`\n &.c-sheet__animation-enter {\n opacity: 0;\n transform: translateX(-100%);\n }\n &.c-sheet__animation-enter-active {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-appear {\n opacity: 0;\n transform: translateX(-100%);\n }\n &.c-sheet__animation-appear-active {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-exit {\n opacity: 1;\n }\n &.c-sheet__animation-exit-active {\n opacity: 0;\n transform: translateX(-100%);\n transition: opacity 200ms, transform 200ms;\n }\n `}\n\n ${(props) =>\n props.$direction === \"right\" &&\n css`\n &.c-sheet__animation-enter {\n opacity: 0;\n transform: translateX(100%);\n }\n &.c-sheet__animation-enter-active {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-appear {\n opacity: 0;\n transform: translateX(100%);\n }\n &.c-sheet__animation-appear-active {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-exit {\n opacity: 1;\n }\n &.c-sheet__animation-exit-active {\n opacity: 0;\n transform: translateX(100%);\n transition: opacity 200ms, transform 200ms;\n }\n `}\n`;\n\nStyledCssTransition.displayName = \"StyledCssTransition\";\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAEtD,OAAOC,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAG1D,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,SAAS,QAAQ,cAAc;AAExC,OAAO,MAAMC,gBAAgB,GAAGL,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yUAuBzC;AAEDJ,gBAAgB,CAACG,WAAW,GAAG,kBAAkB;AAOjD,OAAO,MAAME,kBAAkB,GAAGV,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,iHACxCN,cAAc,EACdC,SAAS,EAORO,KAAK,IACNA,KAAK,CAACC,KAAK,KAAK,SAAS,GACrBX,GAAG,yNAKCI,gBAAgB,IAapBJ,GAAG,uNAOCI,gBAAgB,CAWnB,EAEJM,KAAK,IACNA,KAAK,CAACE,SAAS,KAAK,QAAQ,IAC5BZ,GAAG,WACG;EAAA;EAAA;AAAW,CAAC,CACjB,EAEAU,KAAK,IACNA,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AEzCxB,GAAG,sEACiBmB,2BAA2B,EACpBT,KAAK,CAACe,cAAc,OAE9C,CACN,EAEAf,KAAK,IACNA,KAAK,CAACa,MAAM,KAAK,SAAS,IAC1BvB,GAAG,gBAEF,EAEAU,KAAK,IACNA,KAAK,CAACa,MAAM,KAAK,SAAS,IAC1BvB,GAAG,qBAGCU,KAAK,CAACC,KAAK,KAAK,SAAS,GACvBX,GAAG,wEACiBkB,yBAAyB,EAClBR,KAAK,CAACgB,YAAY,QACrBhB,KAAK,CAACgB,YAAY,UAE1C1B,GAAG,qEACiBoB,4BAA4B,EACrBV,KAAK,CAACiB,eAAe,OAE/C,CACN,EAEAjB,KAAK,IACNA,KAAK,CAACa,MAAM,KAAK,QAAQ,IACzBvB,GAAG,gBAEF,CACJ;AAEDqB,kBAAkB,CAACd,WAAW,GAAG,oBAAoB;AAErD,OAAO,MAAMqB,mBAAmB,GAAG7B,MAAM,CAACD,aAAa,CAAC,CAAAQ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,4BAGnDE,KAAK,IACNA,KAAK,CAACmB,UAAU,KAAK,KAAK,IAC1B7B,GAAG,8fA2BF,EAEAU,KAAK,IACNA,KAAK,CAACmB,UAAU,KAAK,QAAQ,IAC7B7B,GAAG,2fA2BF,EAEAU,KAAK,IACNA,KAAK,CAACmB,UAAU,KAAK,MAAM,IAC3B7B,GAAG,8fA2BF,EAEAU,KAAK,IACNA,KAAK,CAACmB,UAAU,KAAK,OAAO,IAC5B7B,GAAG,2fA2BF,CACJ;AAED4B,mBAAmB,CAACrB,WAAW,GAAG,qBAAqB"}
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["CSSTransition","styled","css","keyframes","BoxSizingStyle","FontStyle","ListSeparator","StyledSheetIcons","div","withConfig","displayName","componentId","StyledSheetWrapper","props","$mode","$position","StyledSheetWrapperPaper","attrs","className","paperClass","StyledSheetControlsTop","StyledSheetControlsBottom","StyledSheetControlsCenterIn","StyledSheetControlsCenterOut","StyledAnimatedSpan","span","$state","$durationIn","$maxDurationIn","$disabled","$durationOut","$maxDurationOut","StyledCssTransition","$direction","StyledListSeparator","StyledIconsWrapperSmall","StyledHeader"],"sources":["../../../../src/components/Sheet/Styles.ts"],"sourcesContent":["import { CSSTransition } from \"react-transition-group\";\n\nimport styled, { css, keyframes } from \"styled-components\";\nimport tw from \"twin.macro\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { FontStyle } from \"../FontStyle\";\nimport { ListSeparator } from \"../List\";\n\nexport const StyledSheetIcons = styled.div`\n display: flex;\n height: 0;\n position: relative;\n\n span {\n position: relative;\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-secondary);\n cursor: pointer;\n border-radius: 100%;\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n & > * {\n height: 40px;\n width: 40px;\n padding: 8px;\n fill: var(--color-theme-600);\n }\n }\n\n @media (max-width: 640px) {\n display: none;\n }\n`;\n\nStyledSheetIcons.displayName = \"StyledSheetIcons\";\n\ninterface IStyledSheetWrapper {\n $position?: \"center\" | \"left\" | \"right\";\n $mode?: \"normal\" | \"stretch\";\n}\n\nexport const StyledSheetWrapper = styled.div<IStyledSheetWrapper>`\n ${BoxSizingStyle}\n ${FontStyle}\n\n position: relative;\n max-width: 95vw;\n display: flex;\n flex-direction: row;\n\n ${(props) =>\n props.$mode === \"stretch\"\n ? css`\n margin-top: 8px;\n height: calc(100vh - 16px);\n width: calc(100vw - 100px);\n max-width: 1000px;\n ${StyledSheetIcons} {\n flex-direction: column;\n width: 0;\n height: calc(100vh - 32px);\n & > * {\n margin-bottom: 8px;\n animation-fill-mode: both;\n }\n span {\n top: 8px;\n }\n }\n `\n : css`\n max-height: calc(100vh - 156px);\n margin-top: 126px;\n margin-bottom: 30px;\n width: 540px;\n flex-direction: column;\n\n ${StyledSheetIcons} {\n flex-direction: row-reverse;\n & > * {\n margin-left: 8px;\n animation-fill-mode: both;\n }\n span {\n top: -48px;\n right: 8px;\n }\n }\n `}\n\n ${(props) =>\n props.$mode === \"stretch\" &&\n css`\n @media (max-width: 640px) {\n width: 100%;\n height: 100%;\n }\n `}\n\n ${(props) =>\n props.$position === \"center\" &&\n css`\n ${tw`tw-mx-auto`}\n `}\n\n ${(props) =>\n props.$position === \"left\" &&\n css`\n ${tw`tw-ml-2 tw-mr-auto`}\n `}\n\n ${(props) =>\n props.$position === \"right\" &&\n css`\n ${tw`tw-mr-2 tw-ml-auto`}\n `}\n\n ${(props) =>\n props.$mode === \"stretch\" &&\n props.$position !== \"left\" &&\n css`\n ${StyledSheetIcons} {\n span {\n right: 48px;\n }\n }\n `}\n\n ${(props) =>\n props.$mode === \"stretch\" &&\n props.$position === \"left\" &&\n css`\n flex-direction: row-reverse;\n\n ${StyledSheetIcons} {\n span {\n right: -8px;\n }\n }\n `}\n`;\n\nStyledSheetWrapper.displayName = \"StyledSheetWrapper\";\n\ninterface IStyledSheetWrapperPaper {\n paperClass?: string;\n}\n\nexport const StyledSheetWrapperPaper = styled.div.attrs<IStyledSheetWrapperPaper>(\n (props) => ({\n className: props.paperClass,\n })\n)<IStyledSheetWrapperPaper>`\n background-color: var(--page-paper-main);\n color: var(--color-theme-900);\n box-shadow: var(--shadow-primary);\n border-radius: 6px;\n overflow: auto;\n animation: 0.3s linear ease-out;\n\n ${tw`tw-flex-auto`}\n`;\n\nStyledSheetWrapperPaper.displayName = \"StyledSheetWrapperPaper\";\n\nexport const StyledSheetControlsTop = keyframes`\n 0% {\n opacity: 0;\n transform: translateY(-200px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n`;\n\nexport const StyledSheetControlsBottom = keyframes`\n 0% {\n opacity: 1;\n transform: translateY(0);\n }\n 100% {\n opacity: 0;\n transform: translateY(-200px);\n}\n`;\n\nexport const StyledSheetControlsCenterIn = keyframes`\n 0% {\n transform: translateY(-150px);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n`;\n\nexport const StyledSheetControlsCenterOut = keyframes`\n 0% {\n transform: translateY(0);\n opacity: 1;\n }\n 100% {\n transform: translateY(-150px);\n opacity: 0;\n }\n`;\n\ninterface IStyledAnimatedSpan {\n $mode: string;\n $state?: string;\n $maxDurationIn: number;\n $maxDurationOut: number;\n $durationOut: number;\n $durationIn: number;\n $disabled?: boolean;\n}\n\nexport const StyledAnimatedSpan = styled.span<IStyledAnimatedSpan>`\n &:hover svg {\n fill: var(--color-primary);\n }\n ${(props) =>\n props.$state === \"entering\" &&\n css`\n opacity: 1;\n\n ${props.$mode === \"stretch\"\n ? css`\n animation-name: ${StyledSheetControlsTop};\n animation-duration: ${`${props.$durationIn}s`};\n animation-delay: ${`${props.$durationIn}s`};\n `\n : css`\n animation-name: ${StyledSheetControlsCenterIn};\n animation-duration: ${`${props.$maxDurationIn}s`};\n animation-delay: 0s;\n `}\n `}\n\n ${(props) =>\n props.$state === \"entered\" &&\n css`\n opacity: 1;\n `}\n\n ${(props) =>\n props.$disabled &&\n css`\n pointer-events: none;\n\n svg {\n opacity: 0.5;\n }\n `}\n\n ${(props) =>\n props.$state === \"exiting\" &&\n css`\n opacity: 0;\n\n ${props.$mode === \"stretch\"\n ? css`\n animation-name: ${StyledSheetControlsBottom};\n animation-duration: ${`${props.$durationOut}s`};\n animation-delay: ${`${props.$durationOut}s`};\n `\n : css`\n animation-name: ${StyledSheetControlsCenterOut};\n animation-duration: ${`${props.$maxDurationOut}s`};\n animation-delay: 0;\n `}\n `}\n\n ${(props) =>\n props.$state === \"exited\" &&\n css`\n opacity: 0;\n `}\n`;\n\nStyledAnimatedSpan.displayName = \"StyledAnimatedSpan\";\n\nexport const StyledCssTransition = styled(CSSTransition)<{\n $direction: string;\n}>`\n ${(props) =>\n props.$direction === \"top\" &&\n css`\n &.c-sheet__animation-enter {\n opacity: 0;\n transform: translateY(-100%);\n }\n &.c-sheet__animation-enter-active {\n opacity: 1;\n transform: translateY(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-appear {\n opacity: 0;\n transform: translateY(-100%);\n }\n &.c-sheet__animation-appear-active {\n opacity: 1;\n transform: translateY(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-exit {\n opacity: 1;\n }\n &.c-sheet__animation-exit-active {\n opacity: 0;\n transform: translateY(-100%);\n transition: opacity 200ms, transform 200ms;\n }\n `}\n\n ${(props) =>\n props.$direction === \"bottom\" &&\n css`\n &.c-sheet__animation-enter {\n opacity: 0;\n transform: translateY(100%);\n }\n &.c-sheet__animation-enter-active {\n opacity: 1;\n transform: translateY(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-appear {\n opacity: 0;\n transform: translateY(100%);\n }\n &.c-sheet__animation-appear-active {\n opacity: 1;\n transform: translateY(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-exit {\n opacity: 1;\n }\n &.c-sheet__animation-exit-active {\n opacity: 0;\n transform: translateY(100%);\n transition: opacity 200ms, transform 200ms;\n }\n `}\n\n ${(props) =>\n props.$direction === \"left\" &&\n css`\n &.c-sheet__animation-enter {\n opacity: 0;\n transform: translateX(-100%);\n }\n &.c-sheet__animation-enter-active {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-appear {\n opacity: 0;\n transform: translateX(-100%);\n }\n &.c-sheet__animation-appear-active {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-exit {\n opacity: 1;\n }\n &.c-sheet__animation-exit-active {\n opacity: 0;\n transform: translateX(-100%);\n transition: opacity 200ms, transform 200ms;\n }\n `}\n\n ${(props) =>\n props.$direction === \"right\" &&\n css`\n &.c-sheet__animation-enter {\n opacity: 0;\n transform: translateX(100%);\n }\n &.c-sheet__animation-enter-active {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-appear {\n opacity: 0;\n transform: translateX(100%);\n }\n &.c-sheet__animation-appear-active {\n opacity: 1;\n transform: translateX(0);\n transition: opacity 400ms, transform 400ms;\n }\n &.c-sheet__animation-exit {\n opacity: 1;\n }\n &.c-sheet__animation-exit-active {\n opacity: 0;\n transform: translateX(100%);\n transition: opacity 200ms, transform 200ms;\n }\n `}\n`;\n\nStyledCssTransition.displayName = \"StyledCssTransition\";\n\nexport const StyledListSeparator = styled(ListSeparator)`\n margin: 0;\n`;\n\nStyledListSeparator.displayName = \"StyledListSeparator\";\n\nexport const StyledIconsWrapperSmall = styled.div`\n height: 40px;\n display: flex;\n gap: 8px;\n padding-left: 16px;\n padding-right: 16px;\n align-items: center;\n place-content: end;\n flex-direction: row-reverse;\n`;\n\nStyledIconsWrapperSmall.displayName = \"StyledIconsWrapperSmall\";\n\nexport const StyledHeader = styled.div`\n @media (min-width: 640px) {\n display: none;\n }\n`;\n\nStyledHeader.displayName = \"StyledHeader\";\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAEtD,OAAOC,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAG1D,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,aAAa,QAAQ,SAAS;AAEvC,OAAO,MAAMC,gBAAgB,GAAGN,MAAM,CAACO,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gXA2BzC;AAEDJ,gBAAgB,CAACG,WAAW,GAAG,kBAAkB;AAOjD,OAAO,MAAME,kBAAkB,GAAGX,MAAM,CAACO,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sHACxCP,cAAc,EACdC,SAAS,EAORQ,KAAK,IACNA,KAAK,CAACC,KAAK,KAAK,SAAS,GACrBZ,GAAG,yNAKCK,gBAAgB,IAapBL,GAAG,uNAOCK,gBAAgB,CAWnB,EAEJM,KAAK,IACNA,KAAK,CAACC,KAAK,KAAK,SAAS,IACzBZ,GAAG,uDAKF,EAEAW,KAAK,IACNA,KA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A;EAAAC,WAAA;AAAA,iBAEvD;AAEDuB,mBAAmB,CAACxB,WAAW,GAAG,qBAAqB;AAEvD,OAAO,MAAMyB,uBAAuB,GAAGlC,MAAM,CAACO,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8IAShD;AAEDwB,uBAAuB,CAACzB,WAAW,GAAG,yBAAyB;AAE/D,OAAO,MAAM0B,YAAY,GAAGnC,MAAM,CAACO,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+CAIrC;AAEDyB,YAAY,CAAC1B,WAAW,GAAG,cAAc"}
|
package/dist/index.js
CHANGED
|
@@ -363,11 +363,11 @@
|
|
|
363
363
|
componentId: "sc-dv1w0m-1"
|
|
364
364
|
})(["", " ", " display:flex;flex-direction:row;align-items:center;cursor:pointer;padding:0 1rem;margin:0.25rem 0;font-size:0.875rem;user-select:none;color:var(--color-theme-900);line-height:28px;> svg:first-child{margin-right:8px;}&:hover,&:focus-visible{background-color:var(--color-theme-200);outline:none;}"], BoxSizingStyle, FontStyle);
|
|
365
365
|
StyledListItem.displayName = "StyledListItem";
|
|
366
|
-
var StyledListSeparator = styled__default["default"].div.withConfig({
|
|
366
|
+
var StyledListSeparator$1 = styled__default["default"].div.withConfig({
|
|
367
367
|
displayName: "Styles__StyledListSeparator",
|
|
368
368
|
componentId: "sc-dv1w0m-2"
|
|
369
369
|
})(["border-top:1px solid var(--border-primary);margin:12px 16px;height:1px;"]);
|
|
370
|
-
StyledListSeparator.displayName = "StyledListSeparator";
|
|
370
|
+
StyledListSeparator$1.displayName = "StyledListSeparator";
|
|
371
371
|
|
|
372
372
|
var _excluded$1u = ["children", "className"];
|
|
373
373
|
var ListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
var ListSeparator = function ListSeparator(_ref) {
|
|
387
387
|
var className = _ref.className,
|
|
388
388
|
props = _objectWithoutProperties(_ref, _excluded$1t);
|
|
389
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledListSeparator, _extends({
|
|
389
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledListSeparator$1, _extends({
|
|
390
390
|
className: classNames__default["default"]("c-list-separator", className)
|
|
391
391
|
}, props));
|
|
392
392
|
};
|
|
@@ -16904,13 +16904,15 @@
|
|
|
16904
16904
|
var StyledSheetIcons = styled__default["default"].div.withConfig({
|
|
16905
16905
|
displayName: "Styles__StyledSheetIcons",
|
|
16906
16906
|
componentId: "sc-144eyxd-0"
|
|
16907
|
-
})(["display:flex;height:0;position:relative;span{position:relative;background-color:var(--page-paper-main);box-shadow:var(--shadow-secondary);cursor:pointer;border-radius:100%;width:40px;height:40px;display:flex;justify-content:center;align-items:center;& > *{height:40px;width:40px;padding:8px;fill:var(--color-theme-600);}}"]);
|
|
16907
|
+
})(["display:flex;height:0;position:relative;span{position:relative;background-color:var(--page-paper-main);box-shadow:var(--shadow-secondary);cursor:pointer;border-radius:100%;width:40px;height:40px;display:flex;justify-content:center;align-items:center;& > *{height:40px;width:40px;padding:8px;fill:var(--color-theme-600);}}@media (max-width:640px){display:none;}"]);
|
|
16908
16908
|
StyledSheetIcons.displayName = "StyledSheetIcons";
|
|
16909
16909
|
var StyledSheetWrapper = styled__default["default"].div.withConfig({
|
|
16910
16910
|
displayName: "Styles__StyledSheetWrapper",
|
|
16911
16911
|
componentId: "sc-144eyxd-1"
|
|
16912
|
-
})(["", " ", " position:relative;max-width:95vw;display:flex;flex-direction:row;", " ", " ", " ", " ", " ", ""], BoxSizingStyle, FontStyle, function (props) {
|
|
16912
|
+
})(["", " ", " position:relative;max-width:95vw;display:flex;flex-direction:row;", " ", " ", " ", " ", " ", " ", ""], BoxSizingStyle, FontStyle, function (props) {
|
|
16913
16913
|
return props.$mode === "stretch" ? styled.css(["margin-top:8px;height:calc(100vh - 16px);width:calc(100vw - 100px);max-width:1000px;", "{flex-direction:column;width:0;height:calc(100vh - 32px);& > *{margin-bottom:8px;animation-fill-mode:both;}span{top:8px;}}"], StyledSheetIcons) : styled.css(["max-height:calc(100vh - 156px);margin-top:126px;margin-bottom:30px;width:540px;flex-direction:column;", "{flex-direction:row-reverse;& > *{margin-left:8px;animation-fill-mode:both;}span{top:-48px;right:8px;}}"], StyledSheetIcons);
|
|
16914
|
+
}, function (props) {
|
|
16915
|
+
return props.$mode === "stretch" && styled.css(["@media (max-width:640px){width:100%;height:100%;}"]);
|
|
16914
16916
|
}, function (props) {
|
|
16915
16917
|
return props.$position === "center" && styled.css(["", ""], {
|
|
16916
16918
|
"marginLeft": "auto",
|
|
@@ -16950,10 +16952,12 @@
|
|
|
16950
16952
|
var StyledAnimatedSpan = styled__default["default"].span.withConfig({
|
|
16951
16953
|
displayName: "Styles__StyledAnimatedSpan",
|
|
16952
16954
|
componentId: "sc-144eyxd-3"
|
|
16953
|
-
})(["
|
|
16955
|
+
})(["&:hover svg{fill:var(--color-primary);}", " ", " ", " ", " ", ""], function (props) {
|
|
16954
16956
|
return props.$state === "entering" && styled.css(["opacity:1;", ""], props.$mode === "stretch" ? styled.css(["animation-name:", ";animation-duration:", ";animation-delay:", ";"], StyledSheetControlsTop, "".concat(props.$durationIn, "s"), "".concat(props.$durationIn, "s")) : styled.css(["animation-name:", ";animation-duration:", ";animation-delay:0s;"], StyledSheetControlsCenterIn, "".concat(props.$maxDurationIn, "s")));
|
|
16955
16957
|
}, function (props) {
|
|
16956
16958
|
return props.$state === "entered" && styled.css(["opacity:1;"]);
|
|
16959
|
+
}, function (props) {
|
|
16960
|
+
return props.$disabled && styled.css(["pointer-events:none;svg{opacity:0.5;}"]);
|
|
16957
16961
|
}, function (props) {
|
|
16958
16962
|
return props.$state === "exiting" && styled.css(["opacity:0;", ""], props.$mode === "stretch" ? styled.css(["animation-name:", ";animation-duration:", ";animation-delay:", ";"], StyledSheetControlsBottom, "".concat(props.$durationOut, "s"), "".concat(props.$durationOut, "s")) : styled.css(["animation-name:", ";animation-duration:", ";animation-delay:0;"], StyledSheetControlsCenterOut, "".concat(props.$maxDurationOut, "s")));
|
|
16959
16963
|
}, function (props) {
|
|
@@ -16973,6 +16977,21 @@
|
|
|
16973
16977
|
return props.$direction === "right" && styled.css(["&.c-sheet__animation-enter{opacity:0;transform:translateX(100%);}&.c-sheet__animation-enter-active{opacity:1;transform:translateX(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-appear{opacity:0;transform:translateX(100%);}&.c-sheet__animation-appear-active{opacity:1;transform:translateX(0);transition:opacity 400ms,transform 400ms;}&.c-sheet__animation-exit{opacity:1;}&.c-sheet__animation-exit-active{opacity:0;transform:translateX(100%);transition:opacity 200ms,transform 200ms;}"]);
|
|
16974
16978
|
});
|
|
16975
16979
|
StyledCssTransition.displayName = "StyledCssTransition";
|
|
16980
|
+
var StyledListSeparator = styled__default["default"](ListSeparator).withConfig({
|
|
16981
|
+
displayName: "Styles__StyledListSeparator",
|
|
16982
|
+
componentId: "sc-144eyxd-5"
|
|
16983
|
+
})(["margin:0;"]);
|
|
16984
|
+
StyledListSeparator.displayName = "StyledListSeparator";
|
|
16985
|
+
var StyledIconsWrapperSmall = styled__default["default"].div.withConfig({
|
|
16986
|
+
displayName: "Styles__StyledIconsWrapperSmall",
|
|
16987
|
+
componentId: "sc-144eyxd-6"
|
|
16988
|
+
})(["height:40px;display:flex;gap:8px;padding-left:16px;padding-right:16px;align-items:center;place-content:end;flex-direction:row-reverse;"]);
|
|
16989
|
+
StyledIconsWrapperSmall.displayName = "StyledIconsWrapperSmall";
|
|
16990
|
+
var StyledHeader$1 = styled__default["default"].div.withConfig({
|
|
16991
|
+
displayName: "Styles__StyledHeader",
|
|
16992
|
+
componentId: "sc-144eyxd-7"
|
|
16993
|
+
})(["@media (min-width:640px){display:none;}"]);
|
|
16994
|
+
StyledHeader$1.displayName = "StyledHeader";
|
|
16976
16995
|
|
|
16977
16996
|
var _excluded$x = ["children", "onClose", "controls", "open", "animation", "position", "mode", "disableFocusLock", "disableScrollLock", "disableBackgroundColor", "bodyStyle", "bodyClassName", "disableBackgroundClick"];
|
|
16978
16997
|
var Sheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -17015,7 +17034,7 @@
|
|
|
17015
17034
|
}, []);
|
|
17016
17035
|
var handleExited = React.useCallback(function () {
|
|
17017
17036
|
setExited(true);
|
|
17018
|
-
|
|
17037
|
+
onClose === null || onClose === void 0 || onClose();
|
|
17019
17038
|
}, [onClose]);
|
|
17020
17039
|
var handleClose = React.useCallback(function () {
|
|
17021
17040
|
setOpen(false);
|
|
@@ -17038,36 +17057,47 @@
|
|
|
17038
17057
|
onClose: handleClose,
|
|
17039
17058
|
disableFocusLock: disableFocusLock,
|
|
17040
17059
|
disableScrollLock: disableScrollLock
|
|
17041
|
-
}), open
|
|
17060
|
+
}), open && /*#__PURE__*/React__default["default"].createElement(Overlay, {
|
|
17042
17061
|
onClick: handleBackgroundClick,
|
|
17043
17062
|
disableBackgroundColor: disableBackgroundColor
|
|
17044
|
-
})
|
|
17063
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledSheetWrapper, {
|
|
17045
17064
|
className: classNames__default["default"]("c-sheet__wrapper", bodyClassName),
|
|
17046
17065
|
style: bodyStyle,
|
|
17047
17066
|
$position: position,
|
|
17048
17067
|
$mode: mode
|
|
17049
|
-
}, controls.length
|
|
17050
|
-
var
|
|
17051
|
-
|
|
17068
|
+
}, controls.length > 0 && /*#__PURE__*/React__default["default"].createElement(StyledSheetIcons, null, controls.map(function (_ref2, index) {
|
|
17069
|
+
var IconComponent = _ref2.icon,
|
|
17070
|
+
tooltip = _ref2.tooltip,
|
|
17071
|
+
onClick = _ref2.onClick,
|
|
17072
|
+
disabled = _ref2.disabled,
|
|
17073
|
+
className = _ref2.className;
|
|
17074
|
+
var maxDurationIn = 4;
|
|
17075
|
+
var maxDurationOut = 2;
|
|
17052
17076
|
var control = index + 1;
|
|
17053
|
-
var durationOut =
|
|
17054
|
-
var durationIn = control
|
|
17077
|
+
var durationOut = Math.max(0, maxDurationOut - control);
|
|
17078
|
+
var durationIn = Math.min(control, maxDurationIn);
|
|
17055
17079
|
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, {
|
|
17056
17080
|
appear: true,
|
|
17057
17081
|
in: open,
|
|
17058
17082
|
timeout: maxDurationIn * 100,
|
|
17059
17083
|
key: "c-sheet-control-".concat(index)
|
|
17060
17084
|
}, function (state) {
|
|
17061
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
17062
|
-
|
|
17085
|
+
return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
17086
|
+
title: tooltip,
|
|
17087
|
+
disable: !tooltip || disabled
|
|
17088
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledAnimatedSpan, {
|
|
17089
|
+
onClick: onClick,
|
|
17090
|
+
$disabled: disabled,
|
|
17063
17091
|
$mode: mode,
|
|
17092
|
+
$state: state,
|
|
17093
|
+
className: className,
|
|
17064
17094
|
$maxDurationIn: maxDurationIn / 10,
|
|
17065
17095
|
$maxDurationOut: maxDurationOut / 10,
|
|
17066
17096
|
$durationOut: durationOut / 10,
|
|
17067
17097
|
$durationIn: durationIn / 10
|
|
17068
|
-
},
|
|
17098
|
+
}, IconComponent));
|
|
17069
17099
|
});
|
|
17070
|
-
}))
|
|
17100
|
+
})), /*#__PURE__*/React__default["default"].createElement(StyledCssTransition, {
|
|
17071
17101
|
appear: true,
|
|
17072
17102
|
in: open,
|
|
17073
17103
|
timeout: 400,
|
|
@@ -17077,7 +17107,23 @@
|
|
|
17077
17107
|
onExited: handleExited
|
|
17078
17108
|
}, /*#__PURE__*/React__default["default"].createElement(StyledSheetWrapperPaper, {
|
|
17079
17109
|
paperClass: "c-sheet__wrapper__paper"
|
|
17080
|
-
},
|
|
17110
|
+
}, controls.length > 0 && /*#__PURE__*/React__default["default"].createElement(StyledHeader$1, null, /*#__PURE__*/React__default["default"].createElement(StyledIconsWrapperSmall, null, controls.map(function (_ref3, index) {
|
|
17111
|
+
var IconComponent = _ref3.icon,
|
|
17112
|
+
tooltip = _ref3.tooltip,
|
|
17113
|
+
onClick = _ref3.onClick,
|
|
17114
|
+
disabled = _ref3.disabled,
|
|
17115
|
+
className = _ref3.className;
|
|
17116
|
+
return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
17117
|
+
title: tooltip,
|
|
17118
|
+
disable: !tooltip || disabled,
|
|
17119
|
+
key: index
|
|
17120
|
+
}, /*#__PURE__*/React__default["default"].createElement(IconButton, {
|
|
17121
|
+
onClick: onClick,
|
|
17122
|
+
disabled: disabled,
|
|
17123
|
+
className: className,
|
|
17124
|
+
variant: "text gray"
|
|
17125
|
+
}, IconComponent));
|
|
17126
|
+
})), /*#__PURE__*/React__default["default"].createElement(StyledListSeparator, null)), children))));
|
|
17081
17127
|
});
|
|
17082
17128
|
Sheet.displayName = "Sheet";
|
|
17083
17129
|
|