@startlibs/components 1.1.4 → 1.1.5

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/lib/Dialog.mjs CHANGED
@@ -127,7 +127,7 @@ const Dialog = /*#__PURE__*/styled(/*#__PURE__*/React.forwardRef((_ref, outerRef
127
127
  })).withConfig({
128
128
  displayName: "Dialog",
129
129
  componentId: "sc-gai4ey-9"
130
- })(["@supports (position:sticky){will-change:transform,opacity;&.JS-wc-off{will-change:auto;}}border-radius:24px;padding:2rem;background-color:white;width:100%;max-width:45rem;", " margin:auto;position:relative;align-self:baseline;display:block;overflow:clip;> h3:first-child{margin-top:0.5rem;}p{line-height:140%;}", " ", " ", ""], props => props.$maxWidth && css(["max-width:", ";"], props.$maxWidth), media.mobile(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding: 1.75rem;\n max-width: 100%;\n ", ";\n "])), props => props.fullscreenOnMobile && "\n border-radius: 0;\n min-height: 100%;\n "), props => props.closeDialog && css(["", "{padding-right:2rem;}"], DialogTitle), customTheme('Dialog'));
130
+ })(["@supports (position:sticky){will-change:transform,opacity;&.JS-wc-off{will-change:auto;}}border-radius:24px;padding:2rem;background-color:white;width:100%;max-width:45rem;", " margin:auto;position:relative;align-self:baseline;display:block;> h3:first-child{margin-top:0.5rem;}p{line-height:140%;}", " ", " ", ""], props => props.$maxWidth && css(["max-width:", ";"], props.$maxWidth), media.mobile(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding: 1.75rem;\n max-width: 100%;\n ", ";\n "])), props => props.fullscreenOnMobile && "\n border-radius: 0;\n min-height: 100%;\n "), props => props.closeDialog && css(["", "{padding-right:2rem;}"], DialogTitle), customTheme('Dialog'));
131
131
  const ConfirmDialog = props => /*#__PURE__*/React.createElement(Dialog, _extends({}, props, {
132
132
  placement: "Confirm-Dialog"
133
133
  }), props.children);
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.mjs","sources":["../src/Dialog.jsx"],"sourcesContent":["import React from 'react';\nimport _ from 'lodash/fp'\nimport styled, {css} from 'styled-components'\nimport {darken} from 'polished'\n\nimport {callIfFunction, customTheme, getColor, media} from '@startlibs/utils'\nimport {StartlibsConsumer, useEnsureRef} from '@startlibs/core'\n\nimport {Button} from './Button'\nimport {Icon} from './Icon'\nimport {LoadingDiv} from './LoadingDiv'\nimport {fixDoubledLastMarginBottom} from './SplitColumnsContainer'\nimport {DialogContainer} from './containers/DialogContainer'\nimport {willUseIsSticky} from './willUseIsSticky'\n\nexport const DialogIcon = styled(Icon)`\n font-size: 60px;\n width: 8rem;\n text-align: center;\n color: #d2d2d2;\n right: 0;\n top: 1rem;\n position: absolute;\n ${media.desktop`\n top: 0\n `}\n`\n\nconst CloseIcon = styled(Icon).attrs(_.assign({icon: 'x'}))`\n position: absolute;\n width: 32px;\n height: 32px;\n font-size: 24px;\n line-height: 32px;\n cursor: pointer;\n border-radius: 50%;\n text-align: center;\n color: rgba(0,0,0,0.3);\n transition: 0.2s linear;\n z-index: 1000;\n top: 1rem;\n right: 1rem;\n &:hover {\n background-color: rgba(0,0,0,0.075);\n }\n `\n\nconst DialogIllustration = styled.img`\n max-width: 16rem;\n position: absolute;\n right: 1rem;\n bottom: 0;\n ${media.mobile`\n display: none;\n `}\n`\n\nconst DialogContent = styled((props) =>\n <div {...props}>\n {fixDoubledLastMarginBottom(props.children)}\n {props.icon && <DialogIcon icon={props.icon}/>}\n {props.illustration && <DialogIllustration src={props.illustration}/>}\n </div>\n)`\n outline:none;\n width: 100%;\n position: relative;\n min-height: 5rem;\n ${props => props.icon && css`\n padding-right: 8rem;\n min-height: 6rem;\n `}\n ${props => props.illustration && css`\n padding-right: 15rem;\n ${media.mobile`\n padding-right: 1.5rem;\n `}\n `}\n p {\n font-size: 14px;\n }\n `\n\nconst DialogTitle = styled.h2`\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n ${props => props.fixTitleMargin && `\n padding-bottom: 0;\n `}\n ${media.mobile`\n font-size: 19px;\n `}\n`\n\nconst DialogFooter = styled.div`\n display: block;\n padding-top: 1rem;\n margin-top: 1rem;\n align-items: stretch;\n text-align: right;\n ${props => props.sticky && css`\n position: sticky;\n background: white;\n width: inherit;\n z-index: 50;\n ${media.desktop`\n bottom: -3rem;\n margin-left: -2rem;\n margin-right: -2rem;\n margin-bottom: -1.5rem;\n margin-top: 0.5rem;\n padding: 1.5rem 2rem;\n border-radius: 0 0 1rem 1rem;\n `}\n ${media.mobile`\n bottom: -0.5rem;\n padding: 0.75rem 1.75rem;\n margin-bottom: -1rem;\n margin-left: -1.75rem;\n margin-right: -1.75rem;\n `}\n ${props => props.isSticky && `\n box-shadow: 0 0px 2px 0 rgba(0,0,0,0.1), 0 0px 5px 1px rgba(0,0,0,0.15);\n border-radius: 0;\n `}\n `}\n ${media.max(370)`\n ${Button} {\n min-width: unset;\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n }\n `}\n // Footer's plain (non-colored) buttons use the \"light\" look; colored variants keep their color.\n // ponytail: for a plain footer button that shows a loading spinner, pass \\`light\\` explicitly so the spinner renders dark instead of white-on-light.\n ${Button}:not(.styled-button-colored) {\n background: ${props => darken(0.03, getColor('bluishGray')(props))};\n color: ${getColor('gray90')};\n &:hover {\n background: ${props => darken(0.06, getColor('bluishGray')(props))};\n }\n &:active {\n background: ${props => darken(0.09, getColor('bluishGray')(props))};\n }\n }\n `\n\nconst FooterAuxiliaryContainer = styled.div`\n flex-grow: 1;\n align-self: center;\n display: inline-block;\n padding-right: 1rem;\n float: left;\n`\n\n// THIS IS NEEDED FOR LOADING ANIMATION ON DialogWithImageHeader\n\nexport const DialogContentWrapper = styled(LoadingDiv)`\n padding: 2rem;\n margin: -2rem;\n ${media.mobile`\n padding: 1.75rem;\n margin: -1.75rem;\n `}\n`\nconst DialogAlwaysVisibleDiv = styled.div`\n padding: 2rem 2rem 0;\n margin: -2rem;\n ${media.mobile`\n padding: 1.75rem 1.75rem 0;\n margin: -1.75rem;\n `}\n`\n// END\n\nconst Dialog = styled(React.forwardRef(({className, skipWrap, wrapChildren, stickyFooter, fixTitleMargin, skipCloseIcon, isLoading, footer, Content, children, title, illustration, icon, auxiliarActions, container = true, onClose, ...props}, outerRef) => {\n const ref = useEnsureRef(outerRef)\n const [WithIsSticky] = willUseIsSticky()\n\n const handleClose = React.useCallback(async () => {\n if (onClose) await onClose().catch(console.error)\n if (props.closeDialog) props.closeDialog()\n }, [onClose, props.closeDialog])\n\n const alwaysVisible = (confirmCloseDialog) => <>\n {\n props.closeDialog && !skipCloseIcon &&\n <CloseIcon className=\"JS-dialog-close\" onClick={confirmCloseDialog}/>\n }\n {\n title &&\n <DialogTitle fixTitleMargin>{callIfFunction(title)}</DialogTitle>\n }\n </>\n\n const content = <>\n {\n Content &&\n <DialogContent icon={icon} illustration={illustration}>{callIfFunction(Content)}</DialogContent>\n }\n {\n !Content && children &&\n <DialogContent icon={icon} illustration={illustration}>{wrapChildren ? wrapChildren(children) : callIfFunction(children)}</DialogContent>\n }\n {\n Content && children && (wrapChildren ? wrapChildren(children) : callIfFunction(children))\n }\n {\n footer &&\n <WithIsSticky bottom>{(sentinel, isSticky) => <>\n <DialogFooter isSticky={isSticky} sticky={stickyFooter}>\n {auxiliarActions && <FooterAuxiliaryContainer>{callIfFunction(auxiliarActions)}</FooterAuxiliaryContainer>}\n {callIfFunction(footer)}\n </DialogFooter>\n {sentinel()}\n </>\n }</WithIsSticky>\n }\n </>\n\n const dialog = (confirmCloseDialog) => <div\n className={className + \" JS-has-wc JS-dialog\"}\n ref={ref}\n >\n {skipWrap\n ? <>\n {alwaysVisible(confirmCloseDialog)}\n {content}\n </>\n : <>\n <DialogAlwaysVisibleDiv>\n {alwaysVisible(confirmCloseDialog)}\n </DialogAlwaysVisibleDiv>\n <DialogContentWrapper isLoading={isLoading}>\n {content}\n </DialogContentWrapper>\n </>\n }\n </div>\n\n return container\n ? <DialogContainer {...props} DialogErrorContent={DialogErrorContent}\n ref={ref}\n title={title}\n closeDialog={handleClose}\n >{({confirmCloseDialog}) => dialog(confirmCloseDialog)}</DialogContainer>\n : dialog(handleClose)\n}))`\n @supports (position:sticky) {\n will-change: transform, opacity;\n &.JS-wc-off {\n will-change: auto;\n }\n }\n \n border-radius: 24px;\n padding: 2rem;\n background-color: white;\n width: 100%;\n max-width: 45rem;\n /* Override opcional via prop. Fica ANTES do media.mobile de propósito: no mobile\n o max-width:100% de lá continua ganhando. Inerte sem a prop → zero efeito em\n quem já ajusta a largura por css=\"max-width:...\". */\n ${props => props.$maxWidth && css`max-width: ${props.$maxWidth};`}\n margin: auto;\n position: relative;\n align-self: baseline;\n display: block; \n overflow: clip;\n > h3:first-child {\n margin-top: 0.5rem;\n }\n p {\n line-height: 140%;\n }\n ${media.mobile`\n padding: 1.75rem;\n max-width: 100%;\n ${props => props.fullscreenOnMobile && `\n border-radius: 0;\n min-height: 100%;\n `};\n `}\n ${props => props.closeDialog && css`\n ${DialogTitle} {\n padding-right: 2rem;\n }\n `}\n ${customTheme('Dialog')}\n`\n\n\nexport {\n FooterAuxiliaryContainer,\n DialogTitle,\n DialogFooter,\n DialogContent,\n CloseIcon,\n Dialog\n}\n\nexport const ConfirmDialog = (props) => <Dialog {...props} placement=\"Confirm-Dialog\">{props.children}</Dialog>\n\nexport const DefaultConfirmDialog = (props) => (\n <StartlibsConsumer>{({confirmDialogLabels}) => {\n const handleCancel = async () => {\n if (props.onCancel) props.onCancel()\n if (props.onClose) await props.onClose().catch(console.error)\n }\n\n return (\n <ConfirmDialog\n title={confirmDialogLabels.title}\n closeDialog={handleCancel}\n onClose={props.onClose}\n onConfirm={props.onConfirm}\n footer={<>\n <Button onClick={handleCancel}>{confirmDialogLabels.cancel}</Button>\n <Button\n hover=\"success\" isLoading={props.isLoading}\n onClick={props.onSaveInstead}\n >{confirmDialogLabels.confirm}</Button>\n <Button autoFocus alert onClick={props.onConfirm}>{confirmDialogLabels.discard}</Button>\n </>}\n >\n <p>{confirmDialogLabels.content}</p>\n </ConfirmDialog>\n )}}\n </StartlibsConsumer>)\n\n// Estado de erro genérico da dialog: badge circular centralizado (mesma linguagem\n// dos error pages da app) no lugar do ícone cinza flutuando no canto. Cores em rgba\n// (não getColor) pra não depender dos tokens de tema da app que consome a lib.\nconst DialogErrorLayout = styled.div`\n text-align: center;\n /* max-width (não <br/>) força a quebra do título em ~2 linhas como o error page,\n mas deixa telas estreitas quebrarem sozinhas. Ajuste fino se o corte não bater. */\n ${DialogTitle} {\n max-width: 18rem;\n margin-left: auto;\n margin-right: auto;\n }\n ${DialogContent} {\n min-height: 0; /* mata o vão vazio que sobrava acima do botão */\n p {\n max-width: 20rem;\n margin-left: auto;\n margin-right: auto;\n }\n }\n ${DialogFooter} {\n text-align: center;\n margin-top: 0;\n padding-top: 0.5rem;\n }\n`\n\nconst DialogErrorBadge = styled.div`\n width: 72px;\n height: 72px;\n margin: 0 auto 1.5rem;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.06);\n display: flex;\n align-items: center;\n justify-content: center;\n ${Icon} {\n font-size: 40px;\n color: rgba(0, 0, 0, 0.4);\n }\n`\n\nexport const DialogErrorContent = ({ closeDialog, onClose, title }) => {\n const handleClose = React.useCallback(async () => {\n if (onClose) await onClose().catch(console.error)\n if (closeDialog) closeDialog()\n }, [onClose, closeDialog])\n\n return (\n <StartlibsConsumer>\n {({ ErrorDialog: { title, content, close } }) => (\n <Dialog as=\"div\" $maxWidth=\"30rem\">\n {closeDialog && <CloseIcon onClick={handleClose} />}\n <DialogErrorLayout>\n <DialogErrorBadge><Icon icon=\"warning\"/></DialogErrorBadge>\n {title && <DialogTitle fixTitleMargin>{title}</DialogTitle>}\n <DialogContent>{content}</DialogContent>\n <DialogFooter>\n <Button highlight rounded onClick={handleClose}>{close}</Button>\n </DialogFooter>\n </DialogErrorLayout>\n </Dialog>\n )}\n </StartlibsConsumer>\n )\n}\n\nexport const DialogError = ({ closeDialog, onClose }) => {\n const handleClose = React.useCallback(async () => {\n if (onClose) await onClose().catch(console.error)\n if (closeDialog) closeDialog()\n }, [onClose, closeDialog])\n\n return (\n <StartlibsConsumer>\n {({ ErrorDialog: { title } }) => (\n <Dialog closeDialog={handleClose} title={title}>\n <DialogErrorContent closeDialog={handleClose} onClose={onClose} />\n </Dialog>\n )}\n </StartlibsConsumer>\n )\n}\n"],"names":["DialogIcon","styled","Icon","withConfig","displayName","componentId","media","desktop","_templateObject","_taggedTemplateLiteral","CloseIcon","attrs","_assign","icon","DialogIllustration","img","mobile","_templateObject2","DialogContent","props","React","createElement","fixDoubledLastMarginBottom","children","illustration","src","css","_templateObject3","DialogTitle","h2","fixTitleMargin","_templateObject4","DialogFooter","div","sticky","_templateObject5","_templateObject6","isSticky","max","_templateObject7","Button","darken","getColor","FooterAuxiliaryContainer","DialogContentWrapper","LoadingDiv","_templateObject8","DialogAlwaysVisibleDiv","_templateObject9","Dialog","forwardRef","_ref","outerRef","className","skipWrap","wrapChildren","stickyFooter","skipCloseIcon","isLoading","footer","Content","title","auxiliarActions","container","onClose","_objectWithoutProperties","_excluded","ref","useEnsureRef","WithIsSticky","willUseIsSticky","handleClose","useCallback","catch","console","error","closeDialog","alwaysVisible","confirmCloseDialog","Fragment","onClick","callIfFunction","content","bottom","sentinel","dialog","DialogContainer","_extends","DialogErrorContent","_ref2","$maxWidth","_templateObject10","fullscreenOnMobile","customTheme","ConfirmDialog","placement","DefaultConfirmDialog","StartlibsConsumer","_ref3","confirmDialogLabels","handleCancel","onCancel","onConfirm","cancel","hover","onSaveInstead","confirm","autoFocus","alert","discard","DialogErrorLayout","DialogErrorBadge","_ref4","_ref5","ErrorDialog","close","as","highlight","rounded","DialogError","_ref6","_ref7"],"mappings":";;;;;;;;;;;;;;;;;;AAeO,MAAMA,UAAU,gBAAGC,MAAM,CAACC,IAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oBAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAQlCC,CAAAA,CAAAA,CAAAA,+FAAAA,EAAAA,EAAAA,CAA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,aAAA,CAACmE,kBAAkB,EAAA;AAACZ,MAAAA,WAAW,EAAEL,WAAY;AAACP,MAAAA,OAAO,EAAEA,OAAAA;AAAQ,KAAE,CAC3D,CAAC,CAAA;AAAA,GAEM,CAAC,CAAA;AAExB;;;;"}
1
+ {"version":3,"file":"Dialog.mjs","sources":["../src/Dialog.jsx"],"sourcesContent":["import React from 'react';\nimport _ from 'lodash/fp'\nimport styled, {css} from 'styled-components'\nimport {darken} from 'polished'\n\nimport {callIfFunction, customTheme, getColor, media} from '@startlibs/utils'\nimport {StartlibsConsumer, useEnsureRef} from '@startlibs/core'\n\nimport {Button} from './Button'\nimport {Icon} from './Icon'\nimport {LoadingDiv} from './LoadingDiv'\nimport {fixDoubledLastMarginBottom} from './SplitColumnsContainer'\nimport {DialogContainer} from './containers/DialogContainer'\nimport {willUseIsSticky} from './willUseIsSticky'\n\nexport const DialogIcon = styled(Icon)`\n font-size: 60px;\n width: 8rem;\n text-align: center;\n color: #d2d2d2;\n right: 0;\n top: 1rem;\n position: absolute;\n ${media.desktop`\n top: 0\n `}\n`\n\nconst CloseIcon = styled(Icon).attrs(_.assign({icon: 'x'}))`\n position: absolute;\n width: 32px;\n height: 32px;\n font-size: 24px;\n line-height: 32px;\n cursor: pointer;\n border-radius: 50%;\n text-align: center;\n color: rgba(0,0,0,0.3);\n transition: 0.2s linear;\n z-index: 1000;\n top: 1rem;\n right: 1rem;\n &:hover {\n background-color: rgba(0,0,0,0.075);\n }\n `\n\nconst DialogIllustration = styled.img`\n max-width: 16rem;\n position: absolute;\n right: 1rem;\n bottom: 0;\n ${media.mobile`\n display: none;\n `}\n`\n\nconst DialogContent = styled((props) =>\n <div {...props}>\n {fixDoubledLastMarginBottom(props.children)}\n {props.icon && <DialogIcon icon={props.icon}/>}\n {props.illustration && <DialogIllustration src={props.illustration}/>}\n </div>\n)`\n outline:none;\n width: 100%;\n position: relative;\n min-height: 5rem;\n ${props => props.icon && css`\n padding-right: 8rem;\n min-height: 6rem;\n `}\n ${props => props.illustration && css`\n padding-right: 15rem;\n ${media.mobile`\n padding-right: 1.5rem;\n `}\n `}\n p {\n font-size: 14px;\n }\n `\n\nconst DialogTitle = styled.h2`\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n ${props => props.fixTitleMargin && `\n padding-bottom: 0;\n `}\n ${media.mobile`\n font-size: 19px;\n `}\n`\n\nconst DialogFooter = styled.div`\n display: block;\n padding-top: 1rem;\n margin-top: 1rem;\n align-items: stretch;\n text-align: right;\n ${props => props.sticky && css`\n position: sticky;\n background: white;\n width: inherit;\n z-index: 50;\n ${media.desktop`\n bottom: -3rem;\n margin-left: -2rem;\n margin-right: -2rem;\n margin-bottom: -1.5rem;\n margin-top: 0.5rem;\n padding: 1.5rem 2rem;\n border-radius: 0 0 1rem 1rem;\n `}\n ${media.mobile`\n bottom: -0.5rem;\n padding: 0.75rem 1.75rem;\n margin-bottom: -1rem;\n margin-left: -1.75rem;\n margin-right: -1.75rem;\n `}\n ${props => props.isSticky && `\n box-shadow: 0 0px 2px 0 rgba(0,0,0,0.1), 0 0px 5px 1px rgba(0,0,0,0.15);\n border-radius: 0;\n `}\n `}\n ${media.max(370)`\n ${Button} {\n min-width: unset;\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n }\n `}\n // Footer's plain (non-colored) buttons use the \"light\" look; colored variants keep their color.\n // ponytail: for a plain footer button that shows a loading spinner, pass \\`light\\` explicitly so the spinner renders dark instead of white-on-light.\n ${Button}:not(.styled-button-colored) {\n background: ${props => darken(0.03, getColor('bluishGray')(props))};\n color: ${getColor('gray90')};\n &:hover {\n background: ${props => darken(0.06, getColor('bluishGray')(props))};\n }\n &:active {\n background: ${props => darken(0.09, getColor('bluishGray')(props))};\n }\n }\n `\n\nconst FooterAuxiliaryContainer = styled.div`\n flex-grow: 1;\n align-self: center;\n display: inline-block;\n padding-right: 1rem;\n float: left;\n`\n\n// THIS IS NEEDED FOR LOADING ANIMATION ON DialogWithImageHeader\n\nexport const DialogContentWrapper = styled(LoadingDiv)`\n padding: 2rem;\n margin: -2rem;\n ${media.mobile`\n padding: 1.75rem;\n margin: -1.75rem;\n `}\n`\nconst DialogAlwaysVisibleDiv = styled.div`\n padding: 2rem 2rem 0;\n margin: -2rem;\n ${media.mobile`\n padding: 1.75rem 1.75rem 0;\n margin: -1.75rem;\n `}\n`\n// END\n\nconst Dialog = styled(React.forwardRef(({className, skipWrap, wrapChildren, stickyFooter, fixTitleMargin, skipCloseIcon, isLoading, footer, Content, children, title, illustration, icon, auxiliarActions, container = true, onClose, ...props}, outerRef) => {\n const ref = useEnsureRef(outerRef)\n const [WithIsSticky] = willUseIsSticky()\n\n const handleClose = React.useCallback(async () => {\n if (onClose) await onClose().catch(console.error)\n if (props.closeDialog) props.closeDialog()\n }, [onClose, props.closeDialog])\n\n const alwaysVisible = (confirmCloseDialog) => <>\n {\n props.closeDialog && !skipCloseIcon &&\n <CloseIcon className=\"JS-dialog-close\" onClick={confirmCloseDialog}/>\n }\n {\n title &&\n <DialogTitle fixTitleMargin>{callIfFunction(title)}</DialogTitle>\n }\n </>\n\n const content = <>\n {\n Content &&\n <DialogContent icon={icon} illustration={illustration}>{callIfFunction(Content)}</DialogContent>\n }\n {\n !Content && children &&\n <DialogContent icon={icon} illustration={illustration}>{wrapChildren ? wrapChildren(children) : callIfFunction(children)}</DialogContent>\n }\n {\n Content && children && (wrapChildren ? wrapChildren(children) : callIfFunction(children))\n }\n {\n footer &&\n <WithIsSticky bottom>{(sentinel, isSticky) => <>\n <DialogFooter isSticky={isSticky} sticky={stickyFooter}>\n {auxiliarActions && <FooterAuxiliaryContainer>{callIfFunction(auxiliarActions)}</FooterAuxiliaryContainer>}\n {callIfFunction(footer)}\n </DialogFooter>\n {sentinel()}\n </>\n }</WithIsSticky>\n }\n </>\n\n const dialog = (confirmCloseDialog) => <div\n className={className + \" JS-has-wc JS-dialog\"}\n ref={ref}\n >\n {skipWrap\n ? <>\n {alwaysVisible(confirmCloseDialog)}\n {content}\n </>\n : <>\n <DialogAlwaysVisibleDiv>\n {alwaysVisible(confirmCloseDialog)}\n </DialogAlwaysVisibleDiv>\n <DialogContentWrapper isLoading={isLoading}>\n {content}\n </DialogContentWrapper>\n </>\n }\n </div>\n\n return container\n ? <DialogContainer {...props} DialogErrorContent={DialogErrorContent}\n ref={ref}\n title={title}\n closeDialog={handleClose}\n >{({confirmCloseDialog}) => dialog(confirmCloseDialog)}</DialogContainer>\n : dialog(handleClose)\n}))`\n @supports (position:sticky) {\n will-change: transform, opacity;\n &.JS-wc-off {\n will-change: auto;\n }\n }\n \n border-radius: 24px;\n padding: 2rem;\n background-color: white;\n width: 100%;\n max-width: 45rem;\n /* Override opcional via prop. Fica ANTES do media.mobile de propósito: no mobile\n o max-width:100% de lá continua ganhando. Inerte sem a prop → zero efeito em\n quem já ajusta a largura por css=\"max-width:...\". */\n ${props => props.$maxWidth && css`max-width: ${props.$maxWidth};`}\n margin: auto;\n position: relative;\n align-self: baseline;\n display: block; \n > h3:first-child {\n margin-top: 0.5rem;\n }\n p {\n line-height: 140%;\n }\n ${media.mobile`\n padding: 1.75rem;\n max-width: 100%;\n ${props => props.fullscreenOnMobile && `\n border-radius: 0;\n min-height: 100%;\n `};\n `}\n ${props => props.closeDialog && css`\n ${DialogTitle} {\n padding-right: 2rem;\n }\n `}\n ${customTheme('Dialog')}\n`\n\n\nexport {\n FooterAuxiliaryContainer,\n DialogTitle,\n DialogFooter,\n DialogContent,\n CloseIcon,\n Dialog\n}\n\nexport const ConfirmDialog = (props) => <Dialog {...props} placement=\"Confirm-Dialog\">{props.children}</Dialog>\n\nexport const DefaultConfirmDialog = (props) => (\n <StartlibsConsumer>{({confirmDialogLabels}) => {\n const handleCancel = async () => {\n if (props.onCancel) props.onCancel()\n if (props.onClose) await props.onClose().catch(console.error)\n }\n\n return (\n <ConfirmDialog\n title={confirmDialogLabels.title}\n closeDialog={handleCancel}\n onClose={props.onClose}\n onConfirm={props.onConfirm}\n footer={<>\n <Button onClick={handleCancel}>{confirmDialogLabels.cancel}</Button>\n <Button\n hover=\"success\" isLoading={props.isLoading}\n onClick={props.onSaveInstead}\n >{confirmDialogLabels.confirm}</Button>\n <Button autoFocus alert onClick={props.onConfirm}>{confirmDialogLabels.discard}</Button>\n </>}\n >\n <p>{confirmDialogLabels.content}</p>\n </ConfirmDialog>\n )}}\n </StartlibsConsumer>)\n\n// Estado de erro genérico da dialog: badge circular centralizado (mesma linguagem\n// dos error pages da app) no lugar do ícone cinza flutuando no canto. Cores em rgba\n// (não getColor) pra não depender dos tokens de tema da app que consome a lib.\nconst DialogErrorLayout = styled.div`\n text-align: center;\n /* max-width (não <br/>) força a quebra do título em ~2 linhas como o error page,\n mas deixa telas estreitas quebrarem sozinhas. Ajuste fino se o corte não bater. */\n ${DialogTitle} {\n max-width: 18rem;\n margin-left: auto;\n margin-right: auto;\n }\n ${DialogContent} {\n min-height: 0; /* mata o vão vazio que sobrava acima do botão */\n p {\n max-width: 20rem;\n margin-left: auto;\n margin-right: auto;\n }\n }\n ${DialogFooter} {\n text-align: center;\n margin-top: 0;\n padding-top: 0.5rem;\n }\n`\n\nconst DialogErrorBadge = styled.div`\n width: 72px;\n height: 72px;\n margin: 0 auto 1.5rem;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.06);\n display: flex;\n align-items: center;\n justify-content: center;\n ${Icon} {\n font-size: 40px;\n color: rgba(0, 0, 0, 0.4);\n }\n`\n\nexport const DialogErrorContent = ({ closeDialog, onClose, title }) => {\n const handleClose = React.useCallback(async () => {\n if (onClose) await onClose().catch(console.error)\n if (closeDialog) closeDialog()\n }, [onClose, closeDialog])\n\n return (\n <StartlibsConsumer>\n {({ ErrorDialog: { title, content, close } }) => (\n <Dialog as=\"div\" $maxWidth=\"30rem\">\n {closeDialog && <CloseIcon onClick={handleClose} />}\n <DialogErrorLayout>\n <DialogErrorBadge><Icon icon=\"warning\"/></DialogErrorBadge>\n {title && <DialogTitle fixTitleMargin>{title}</DialogTitle>}\n <DialogContent>{content}</DialogContent>\n <DialogFooter>\n <Button highlight rounded onClick={handleClose}>{close}</Button>\n </DialogFooter>\n </DialogErrorLayout>\n </Dialog>\n )}\n </StartlibsConsumer>\n )\n}\n\nexport const DialogError = ({ closeDialog, onClose }) => {\n const handleClose = React.useCallback(async () => {\n if (onClose) await onClose().catch(console.error)\n if (closeDialog) closeDialog()\n }, [onClose, closeDialog])\n\n return (\n <StartlibsConsumer>\n {({ ErrorDialog: { title } }) => (\n <Dialog closeDialog={handleClose} title={title}>\n <DialogErrorContent closeDialog={handleClose} onClose={onClose} />\n </Dialog>\n )}\n </StartlibsConsumer>\n )\n}\n"],"names":["DialogIcon","styled","Icon","withConfig","displayName","componentId","media","desktop","_templateObject","_taggedTemplateLiteral","CloseIcon","attrs","_assign","icon","DialogIllustration","img","mobile","_templateObject2","DialogContent","props","React","createElement","fixDoubledLastMarginBottom","children","illustration","src","css","_templateObject3","DialogTitle","h2","fixTitleMargin","_templateObject4","DialogFooter","div","sticky","_templateObject5","_templateObject6","isSticky","max","_templateObject7","Button","darken","getColor","FooterAuxiliaryContainer","DialogContentWrapper","LoadingDiv","_templateObject8","DialogAlwaysVisibleDiv","_templateObject9","Dialog","forwardRef","_ref","outerRef","className","skipWrap","wrapChildren","stickyFooter","skipCloseIcon","isLoading","footer","Content","title","auxiliarActions","container","onClose","_objectWithoutProperties","_excluded","ref","useEnsureRef","WithIsSticky","willUseIsSticky","handleClose","useCallback","catch","console","error","closeDialog","alwaysVisible","confirmCloseDialog","Fragment","onClick","callIfFunction","content","bottom","sentinel","dialog","DialogContainer","_extends","DialogErrorContent","_ref2","$maxWidth","_templateObject10","fullscreenOnMobile","customTheme","ConfirmDialog","placement","DefaultConfirmDialog","StartlibsConsumer","_ref3","confirmDialogLabels","handleCancel","onCancel","onConfirm","cancel","hover","onSaveInstead","confirm","autoFocus","alert","discard","DialogErrorLayout","DialogErrorBadge","_ref4","_ref5","ErrorDialog","close","as","highlight","rounded","DialogError","_ref6","_ref7"],"mappings":";;;;;;;;;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AAE,KAAC,GAAA4D,KAAA,CAAA;AAAA,IAAA,oBAC1BrG,KAAA,CAAAC,aAAA,CAAC4B,MAAM,EAAA;AAAC2B,MAAAA,WAAW,EAAEL,WAAY;AAACV,MAAAA,KAAK,EAAEA,KAAAA;AAAM,KAAA,eAC7CzC,KAAA,CAAAC,aAAA,CAACmE,kBAAkB,EAAA;AAACZ,MAAAA,WAAW,EAAEL,WAAY;AAACP,MAAAA,OAAO,EAAEA,OAAAA;AAAQ,KAAE,CAC3D,CAAC,CAAA;AAAA,GAEM,CAAC,CAAA;AAExB;;;;"}
package/lib/index.cjs CHANGED
@@ -1796,7 +1796,7 @@ const Dialog = /*#__PURE__*/styled__default["default"](/*#__PURE__*/React__defau
1796
1796
  })).withConfig({
1797
1797
  displayName: "Dialog",
1798
1798
  componentId: "sc-gai4ey-9"
1799
- })(["@supports (position:sticky){will-change:transform,opacity;&.JS-wc-off{will-change:auto;}}border-radius:24px;padding:2rem;background-color:white;width:100%;max-width:45rem;", " margin:auto;position:relative;align-self:baseline;display:block;overflow:clip;> h3:first-child{margin-top:0.5rem;}p{line-height:140%;}", " ", " ", ""], props => props.$maxWidth && styled.css(["max-width:", ";"], props.$maxWidth), utils.media.mobile(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral__default["default"](["\n padding: 1.75rem;\n max-width: 100%;\n ", ";\n "])), props => props.fullscreenOnMobile && "\n border-radius: 0;\n min-height: 100%;\n "), props => props.closeDialog && styled.css(["", "{padding-right:2rem;}"], DialogTitle), utils.customTheme('Dialog'));
1799
+ })(["@supports (position:sticky){will-change:transform,opacity;&.JS-wc-off{will-change:auto;}}border-radius:24px;padding:2rem;background-color:white;width:100%;max-width:45rem;", " margin:auto;position:relative;align-self:baseline;display:block;> h3:first-child{margin-top:0.5rem;}p{line-height:140%;}", " ", " ", ""], props => props.$maxWidth && styled.css(["max-width:", ";"], props.$maxWidth), utils.media.mobile(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral__default["default"](["\n padding: 1.75rem;\n max-width: 100%;\n ", ";\n "])), props => props.fullscreenOnMobile && "\n border-radius: 0;\n min-height: 100%;\n "), props => props.closeDialog && styled.css(["", "{padding-right:2rem;}"], DialogTitle), utils.customTheme('Dialog'));
1800
1800
  const ConfirmDialog = props => /*#__PURE__*/React__default["default"].createElement(Dialog, _extends__default["default"]({}, props, {
1801
1801
  placement: "Confirm-Dialog"
1802
1802
  }), props.children);