@activecollab/components 2.0.443 → 2.0.444
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 +18 -36
- package/dist/cjs/components/Sheet/Sheet.js.map +1 -1
- package/dist/cjs/components/Sheet/Styles.js +14 -21
- package/dist/cjs/components/Sheet/Styles.js.map +1 -1
- package/dist/esm/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/esm/components/Sheet/Sheet.js +17 -33
- package/dist/esm/components/Sheet/Sheet.js.map +1 -1
- package/dist/esm/components/Sheet/Styles.d.ts +1 -10
- package/dist/esm/components/Sheet/Styles.d.ts.map +1 -1
- package/dist/esm/components/Sheet/Styles.js +14 -13
- package/dist/esm/components/Sheet/Styles.js.map +1 -1
- package/dist/index.js +31 -55
- 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
|
@@ -1 +1 @@
|
|
|
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 /* Scrolling here must not dirty the blurred overlays below, which already clip to this box. */\n transform: translateZ(0);\n contain: paint;\n /* A scroll that runs off the end must stop here. Chained to the page, it moves what the blur samples. */\n overscroll-behavior: contain;\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,KAAK,CAACE,SAAS,KAAK,QAAQ,IAC5Bb,GAAG,WACG;EAAA;EAAA;AAAW,CAAC,CACjB,EAEAW,KAAK,IACNA,KAAK,CAACE,SAAS,KAAK,MAAM,IAC1Bb,GAAG,WACG;EAAA;EAAA;AAAmB,CAAC,CACzB,EAEAW,KAAK,IACNA,KAAK,CAACE,SAAS,KAAK,OAAO,IAC3Bb,GAAG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AM0B,YAAY,GAAGnC,MAAM,CAACO,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+CAIrC;AAEDyB,YAAY,CAAC1B,WAAW,GAAG,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["CSSTransition","styled","css","BoxSizingStyle","FontStyle","ListSeparator","StyledSheetIcons","div","withConfig","displayName","componentId","StyledSheetWrapper","props","$mode","$position","StyledSheetSurface","StyledSheetWrapperPaper","attrs","className","paperClass","StyledAnimatedSpan","span","$disabled","StyledCssTransition","$direction","StyledListSeparator","StyledIconsWrapperSmall","StyledHeader"],"sources":["../../../../src/components/Sheet/Styles.ts"],"sourcesContent":["import { CSSTransition } from \"react-transition-group\";\n\nimport styled, { css } 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 }\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 }\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 StyledSheetSurface = styled.div`\n display: flex;\n flex-direction: inherit;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n`;\n\nStyledSheetSurface.displayName = \"StyledSheetSurface\";\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 /* Scrolling here must not dirty the blurred overlays below, which already clip to this box. */\n transform: translateZ(0);\n contain: paint;\n /* A scroll that runs off the end must stop here. Chained to the page, it moves what the blur samples. */\n overscroll-behavior: contain;\n\n ${tw`tw-flex-auto`}\n`;\n\nStyledSheetWrapperPaper.displayName = \"StyledSheetWrapperPaper\";\n\ninterface IStyledAnimatedSpan {\n $disabled?: boolean;\n}\n\nexport const StyledAnimatedSpan = styled.span<IStyledAnimatedSpan>`\n &:hover svg {\n fill: var(--color-primary);\n }\n\n ${(props) =>\n props.$disabled &&\n css`\n pointer-events: none;\n\n svg {\n opacity: 0.5;\n }\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,I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B,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8IAShD;AAEDgB,uBAAuB,CAACjB,WAAW,GAAG,yBAAyB;AAE/D,OAAO,MAAMkB,YAAY,GAAG1B,MAAM,CAACM,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+CAIrC;AAEDiB,YAAY,CAAClB,WAAW,GAAG,cAAc","ignoreList":[]}
|
package/dist/index.js
CHANGED
|
@@ -24856,7 +24856,7 @@
|
|
|
24856
24856
|
displayName: "Styles__StyledSheetWrapper",
|
|
24857
24857
|
componentId: "sc-144eyxd-1"
|
|
24858
24858
|
})(["", " ", " position:relative;max-width:95vw;display:flex;flex-direction:row;", " ", " ", " ", " ", " ", " ", ""], BoxSizingStyle, FontStyle, function (props) {
|
|
24859
|
-
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;
|
|
24859
|
+
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;}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;}span{top:-48px;right:8px;}}"], StyledSheetIcons);
|
|
24860
24860
|
}, function (props) {
|
|
24861
24861
|
return props.$mode === "stretch" && styled.css(["@media (max-width:640px){width:100%;height:100%;}"]);
|
|
24862
24862
|
}, function (props) {
|
|
@@ -24880,39 +24880,32 @@
|
|
|
24880
24880
|
return props.$mode === "stretch" && props.$position === "left" && styled.css(["flex-direction:row-reverse;", "{span{right:-8px;}}"], StyledSheetIcons);
|
|
24881
24881
|
});
|
|
24882
24882
|
StyledSheetWrapper.displayName = "StyledSheetWrapper";
|
|
24883
|
+
var StyledSheetSurface = styled__default["default"].div.withConfig({
|
|
24884
|
+
displayName: "Styles__StyledSheetSurface",
|
|
24885
|
+
componentId: "sc-144eyxd-2"
|
|
24886
|
+
})(["display:flex;flex-direction:inherit;flex:1 1 auto;min-width:0;min-height:0;"]);
|
|
24887
|
+
StyledSheetSurface.displayName = "StyledSheetSurface";
|
|
24883
24888
|
var StyledSheetWrapperPaper = styled__default["default"].div.attrs(function (props) {
|
|
24884
24889
|
return {
|
|
24885
24890
|
className: props.paperClass
|
|
24886
24891
|
};
|
|
24887
24892
|
}).withConfig({
|
|
24888
24893
|
displayName: "Styles__StyledSheetWrapperPaper",
|
|
24889
|
-
componentId: "sc-144eyxd-
|
|
24894
|
+
componentId: "sc-144eyxd-3"
|
|
24890
24895
|
})(["background-color:var(--page-paper-main);color:var(--color-theme-900);box-shadow:var(--shadow-primary);border-radius:6px;overflow:auto;animation:0.3s linear ease-out;transform:translateZ(0);contain:paint;overscroll-behavior:contain;", ""], {
|
|
24891
24896
|
"flex": "1 1 auto"
|
|
24892
24897
|
});
|
|
24893
24898
|
StyledSheetWrapperPaper.displayName = "StyledSheetWrapperPaper";
|
|
24894
|
-
var StyledSheetControlsTop = styled.keyframes(["0%{opacity:0;transform:translateY(-200px);}100%{opacity:1;transform:translateY(0);}"]);
|
|
24895
|
-
var StyledSheetControlsBottom = styled.keyframes(["0%{opacity:1;transform:translateY(0);}100%{opacity:0;transform:translateY(-200px);}"]);
|
|
24896
|
-
var StyledSheetControlsCenterIn = styled.keyframes(["0%{transform:translateY(-150px);opacity:0;}100%{transform:translateY(0);opacity:1;}"]);
|
|
24897
|
-
var StyledSheetControlsCenterOut = styled.keyframes(["0%{transform:translateY(0);opacity:1;}100%{transform:translateY(-150px);opacity:0;}"]);
|
|
24898
24899
|
var StyledAnimatedSpan = styled__default["default"].span.withConfig({
|
|
24899
24900
|
displayName: "Styles__StyledAnimatedSpan",
|
|
24900
|
-
componentId: "sc-144eyxd-
|
|
24901
|
-
})(["&:hover svg{fill:var(--color-primary);}", "
|
|
24902
|
-
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")));
|
|
24903
|
-
}, function (props) {
|
|
24904
|
-
return props.$state === "entered" && styled.css(["opacity:1;"]);
|
|
24905
|
-
}, function (props) {
|
|
24901
|
+
componentId: "sc-144eyxd-4"
|
|
24902
|
+
})(["&:hover svg{fill:var(--color-primary);}", ""], function (props) {
|
|
24906
24903
|
return props.$disabled && styled.css(["pointer-events:none;svg{opacity:0.5;}"]);
|
|
24907
|
-
}, function (props) {
|
|
24908
|
-
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")));
|
|
24909
|
-
}, function (props) {
|
|
24910
|
-
return props.$state === "exited" && styled.css(["opacity:0;"]);
|
|
24911
24904
|
});
|
|
24912
24905
|
StyledAnimatedSpan.displayName = "StyledAnimatedSpan";
|
|
24913
24906
|
var StyledCssTransition = styled__default["default"](reactTransitionGroup.CSSTransition).withConfig({
|
|
24914
24907
|
displayName: "Styles__StyledCssTransition",
|
|
24915
|
-
componentId: "sc-144eyxd-
|
|
24908
|
+
componentId: "sc-144eyxd-5"
|
|
24916
24909
|
})(["", " ", " ", " ", ""], function (props) {
|
|
24917
24910
|
return props.$direction === "top" && styled.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;}"]);
|
|
24918
24911
|
}, function (props) {
|
|
@@ -24925,17 +24918,17 @@
|
|
|
24925
24918
|
StyledCssTransition.displayName = "StyledCssTransition";
|
|
24926
24919
|
var StyledListSeparator = styled__default["default"](ListSeparator).withConfig({
|
|
24927
24920
|
displayName: "Styles__StyledListSeparator",
|
|
24928
|
-
componentId: "sc-144eyxd-
|
|
24921
|
+
componentId: "sc-144eyxd-6"
|
|
24929
24922
|
})(["margin:0;"]);
|
|
24930
24923
|
StyledListSeparator.displayName = "StyledListSeparator";
|
|
24931
24924
|
var StyledIconsWrapperSmall = styled__default["default"].div.withConfig({
|
|
24932
24925
|
displayName: "Styles__StyledIconsWrapperSmall",
|
|
24933
|
-
componentId: "sc-144eyxd-
|
|
24926
|
+
componentId: "sc-144eyxd-7"
|
|
24934
24927
|
})(["height:40px;display:flex;gap:8px;padding-left:16px;padding-right:16px;align-items:center;place-content:end;flex-direction:row-reverse;"]);
|
|
24935
24928
|
StyledIconsWrapperSmall.displayName = "StyledIconsWrapperSmall";
|
|
24936
24929
|
var StyledHeader$1 = styled__default["default"].div.withConfig({
|
|
24937
24930
|
displayName: "Styles__StyledHeader",
|
|
24938
|
-
componentId: "sc-144eyxd-
|
|
24931
|
+
componentId: "sc-144eyxd-8"
|
|
24939
24932
|
})(["@media (min-width:640px){display:none;}"]);
|
|
24940
24933
|
StyledHeader$1.displayName = "StyledHeader";
|
|
24941
24934
|
|
|
@@ -25011,39 +25004,7 @@
|
|
|
25011
25004
|
style: bodyStyle,
|
|
25012
25005
|
$position: position,
|
|
25013
25006
|
$mode: mode
|
|
25014
|
-
},
|
|
25015
|
-
var IconComponent = _ref2.icon,
|
|
25016
|
-
tooltip = _ref2.tooltip,
|
|
25017
|
-
onClick = _ref2.onClick,
|
|
25018
|
-
disabled = _ref2.disabled,
|
|
25019
|
-
className = _ref2.className;
|
|
25020
|
-
var maxDurationIn = 4;
|
|
25021
|
-
var maxDurationOut = 2;
|
|
25022
|
-
var control = index + 1;
|
|
25023
|
-
var durationOut = Math.max(0, maxDurationOut - control);
|
|
25024
|
-
var durationIn = Math.min(control, maxDurationIn);
|
|
25025
|
-
return /*#__PURE__*/React__default["default"].createElement(reactTransitionGroup.Transition, {
|
|
25026
|
-
appear: true,
|
|
25027
|
-
in: open,
|
|
25028
|
-
timeout: maxDurationIn * 100,
|
|
25029
|
-
key: "c-sheet-control-".concat(index)
|
|
25030
|
-
}, function (state) {
|
|
25031
|
-
return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
25032
|
-
title: tooltip,
|
|
25033
|
-
disable: !tooltip || disabled
|
|
25034
|
-
}, /*#__PURE__*/React__default["default"].createElement(StyledAnimatedSpan, {
|
|
25035
|
-
onClick: onClick,
|
|
25036
|
-
$disabled: disabled,
|
|
25037
|
-
$mode: mode,
|
|
25038
|
-
$state: state,
|
|
25039
|
-
className: className,
|
|
25040
|
-
$maxDurationIn: maxDurationIn / 10,
|
|
25041
|
-
$maxDurationOut: maxDurationOut / 10,
|
|
25042
|
-
$durationOut: durationOut / 10,
|
|
25043
|
-
$durationIn: durationIn / 10
|
|
25044
|
-
}, IconComponent));
|
|
25045
|
-
});
|
|
25046
|
-
})), /*#__PURE__*/React__default["default"].createElement(StyledCssTransition, {
|
|
25007
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledCssTransition, {
|
|
25047
25008
|
appear: true,
|
|
25048
25009
|
in: open,
|
|
25049
25010
|
timeout: 400,
|
|
@@ -25051,7 +25012,22 @@
|
|
|
25051
25012
|
$direction: animation,
|
|
25052
25013
|
onEnter: handleEnter,
|
|
25053
25014
|
onExited: handleExited
|
|
25054
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
25015
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledSheetSurface, null, controls.length > 0 && /*#__PURE__*/React__default["default"].createElement(StyledSheetIcons, null, controls.map(function (_ref2, index) {
|
|
25016
|
+
var IconComponent = _ref2.icon,
|
|
25017
|
+
tooltip = _ref2.tooltip,
|
|
25018
|
+
onClick = _ref2.onClick,
|
|
25019
|
+
disabled = _ref2.disabled,
|
|
25020
|
+
className = _ref2.className;
|
|
25021
|
+
return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
25022
|
+
title: tooltip,
|
|
25023
|
+
disable: !tooltip || disabled,
|
|
25024
|
+
key: "c-sheet-control-".concat(index)
|
|
25025
|
+
}, /*#__PURE__*/React__default["default"].createElement(StyledAnimatedSpan, {
|
|
25026
|
+
onClick: onClick,
|
|
25027
|
+
$disabled: disabled,
|
|
25028
|
+
className: className
|
|
25029
|
+
}, IconComponent));
|
|
25030
|
+
})), /*#__PURE__*/React__default["default"].createElement(StyledSheetWrapperPaper, {
|
|
25055
25031
|
paperClass: "c-sheet__wrapper__paper"
|
|
25056
25032
|
}, controls.length > 0 && /*#__PURE__*/React__default["default"].createElement(StyledHeader$1, null, /*#__PURE__*/React__default["default"].createElement(StyledIconsWrapperSmall, null, controls.map(function (_ref3, index) {
|
|
25057
25033
|
var IconComponent = _ref3.icon,
|
|
@@ -25069,7 +25045,7 @@
|
|
|
25069
25045
|
className: className,
|
|
25070
25046
|
variant: "text gray"
|
|
25071
25047
|
}, IconComponent));
|
|
25072
|
-
})), /*#__PURE__*/React__default["default"].createElement(StyledListSeparator, null)), children))));
|
|
25048
|
+
})), /*#__PURE__*/React__default["default"].createElement(StyledListSeparator, null)), children)))));
|
|
25073
25049
|
});
|
|
25074
25050
|
Sheet.displayName = "Sheet";
|
|
25075
25051
|
|