@semcore/fullscreen-modal 17.2.2-prerelease.1 → 17.2.2-prerelease.2

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.
@@ -173,9 +173,7 @@ function Close(props) {
173
173
  }), /*#__PURE__*/_react.default.createElement(_button.default.Addon, {
174
174
  ml: "7px",
175
175
  mr: "7px"
176
- }, /*#__PURE__*/_react.default.createElement(_l.default, _ref13.cn("CloseIcon", {
177
- "title": getI18nText('close')
178
- }))));
176
+ }, /*#__PURE__*/_react.default.createElement(_l.default, _ref13.cn("CloseIcon", {}))));
179
177
  }
180
178
  function Title(props) {
181
179
  var _ref7 = arguments[0],
@@ -1 +1 @@
1
- {"version":3,"file":"FullscreenModal.js","names":["_core","require","_baseComponents","_button","_interopRequireWildcard","_i18nEnhance","_interopRequireDefault","_fire","_uniqueID","_m","_l","_modal","_typography","_react","_intergalacticDynamicLocales","style","sstyled","insert","FullscreenModalRoot","Component","constructor","args","_defineProperty2","default","hasTitle","trigger","e","fire","getCloseProps","getI18nText","asProps","onClick","bindHandlerClose","getBackProps","getTitleProps","uid","setHasTitle","setState","id","render","_ref","_ref0","SFullscreenModal","Modal","Window","styles","Children","onClose","visible","closable","duration","disablePortal","state","SFullscreenOverlay","Overlay","createElement","cn","assignProps","undefined","FullscreenModal","Close","i18nEnhance","localizedMessages","uniqueIDEnhancement","i18n","locale","Header","props","_ref2","arguments[0]","_ref1","SHeader","Box","title","description","Title","children","Description","Body","_ref3","_ref10","SBody","Section","_ref4","_ref11","SSection","Footer","_ref5","_ref12","SFooter","Flex","_ref6","_ref13","SClose","Button","Addon","ml","mr","_ref7","_ref14","STitle","Text","React","useEffect","_ref8","_ref15","SDescription","Back","_ref9","_ref16","SBack","ButtonLink","ArrowLeft","ellipsis","createComponent","parent","_default","exports"],"sources":["../../src/FullscreenModal.jsx"],"sourcesContent":["import { Flex, Box } from '@semcore/base-components';\nimport Button, { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport fire from '@semcore/core/lib/utils/fire';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport ArrowLeft from '@semcore/icon/ArrowLeft/m';\nimport CloseIcon from '@semcore/icon/Close/l';\nimport Modal from '@semcore/modal';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport style from './style/fullscreen-modal.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass FullscreenModalRoot extends Component {\n static displayName = 'FullscreenModal';\n static style = style;\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n };\n\n state = { hasTitle: false };\n\n bindHandlerClose = (trigger) => (e) => {\n fire(this, 'onClose', trigger, e);\n };\n\n getCloseProps() {\n const { getI18nText } = this.asProps;\n return {\n onClick: this.bindHandlerClose('onCloseClick'),\n getI18nText,\n };\n }\n\n getBackProps() {\n return {\n onClick: this.bindHandlerClose('onBackClick'),\n };\n }\n\n getTitleProps() {\n const { uid } = this.asProps;\n const setHasTitle = () => this.setState({ hasTitle: true });\n\n return {\n id: `igc-${uid}-title`,\n setHasTitle,\n };\n }\n\n render() {\n const SFullscreenModal = Root;\n const {\n styles,\n Children,\n onClose,\n visible,\n closable,\n duration,\n disablePortal,\n getI18nText,\n uid,\n } = this.asProps;\n const { hasTitle } = this.state;\n const SFullscreenOverlay = Modal.Overlay;\n\n return sstyled(styles)(\n <Modal\n closable={false}\n visible={visible}\n onClose={onClose}\n duration={duration}\n disablePortal={disablePortal}\n >\n <SFullscreenOverlay>\n <SFullscreenModal\n render={Modal.Window}\n use:closable={false}\n aria-label={hasTitle ? undefined : getI18nText('title')}\n aria-labelledby={hasTitle ? `igc-${uid}-title` : undefined}\n >\n {closable && <FullscreenModal.Close />}\n <Children />\n </SFullscreenModal>\n </SFullscreenOverlay>\n </Modal>,\n );\n }\n}\n\nfunction Header(props) {\n const SHeader = Root;\n const { Children, styles, title, description } = props;\n return sstyled(styles)(\n <SHeader render={Box}>\n {title && <FullscreenModal.Title children={title} />}\n {description && <FullscreenModal.Description children={description} />}\n <Children />\n </SHeader>,\n );\n}\n\nfunction Body(props) {\n const SBody = Root;\n return sstyled(props.styles)(<SBody render={Box} />);\n}\n\nfunction Section(props) {\n const SSection = Root;\n return sstyled(props.styles)(<SSection render={Box} tag='section' />);\n}\n\nfunction Footer(props) {\n const SFooter = Root;\n return sstyled(props.styles)(<SFooter render={Flex} />);\n}\n\nfunction Close(props) {\n const SClose = Root;\n const { getI18nText } = props;\n return sstyled(props.styles)(\n <SClose render={Button} use='tertiary' size='l' theme='muted' aria-label={getI18nText('close')}>\n <Button.Addon ml='7px' mr='7px'>\n <CloseIcon title={getI18nText('close')} />\n </Button.Addon>\n </SClose>,\n );\n}\n\nfunction Title(props) {\n const STitle = Root;\n const { setHasTitle } = props;\n\n React.useEffect(() => setHasTitle());\n\n return sstyled(props.styles)(<STitle render={Text} tag='h2' />);\n}\n\nfunction Description(props) {\n const SDescription = Root;\n return sstyled(props.styles)(<SDescription render={Text} tag='p' />);\n}\n\nfunction Back(props) {\n const SBack = Root;\n const { Children, styles } = props;\n\n return sstyled(styles)(\n <SBack render={ButtonLink} color='text-hint' size={200} addonLeft={ArrowLeft}>\n <ButtonLink.Text ellipsis>\n <Children />\n </ButtonLink.Text>\n </SBack>,\n );\n}\n\n/**\n * FullscreenModal\n *\n * {@link https://developer.semrush.com/intergalactic/components/fullscreen-modal/fullscreen-modal-api/|API} | {@link https://developer.semrush.com/intergalactic/components/fullscreen-modal/fullscreen-modal-code/|Examples}\n */\nconst FullscreenModal = createComponent(\n FullscreenModalRoot,\n {\n Header,\n Footer,\n Close,\n Back,\n Body,\n Section,\n Title,\n Description,\n },\n { parent: Modal },\n);\n\nexport default FullscreenModal;\n"],"mappings":";;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA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C,EACD;EAAEsC,MAAM,EAAExE;AAAM,CAClB,CAAC;AAAC,IAAAyE,QAAA,GAAAC,OAAA,CAAA9F,OAAA,GAEaoC,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"FullscreenModal.js","names":["_core","require","_baseComponents","_button","_interopRequireWildcard","_i18nEnhance","_interopRequireDefault","_fire","_uniqueID","_m","_l","_modal","_typography","_react","_intergalacticDynamicLocales","style","sstyled","insert","FullscreenModalRoot","Component","constructor","args","_defineProperty2","default","hasTitle","trigger","e","fire","getCloseProps","getI18nText","asProps","onClick","bindHandlerClose","getBackProps","getTitleProps","uid","setHasTitle","setState","id","render","_ref","_ref0","SFullscreenModal","Modal","Window","styles","Children","onClose","visible","closable","duration","disablePortal","state","SFullscreenOverlay","Overlay","createElement","cn","assignProps","undefined","FullscreenModal","Close","i18nEnhance","localizedMessages","uniqueIDEnhancement","i18n","locale","Header","props","_ref2","arguments[0]","_ref1","SHeader","Box","title","description","Title","children","Description","Body","_ref3","_ref10","SBody","Section","_ref4","_ref11","SSection","Footer","_ref5","_ref12","SFooter","Flex","_ref6","_ref13","SClose","Button","Addon","ml","mr","_ref7","_ref14","STitle","Text","React","useEffect","_ref8","_ref15","SDescription","Back","_ref9","_ref16","SBack","ButtonLink","ArrowLeft","ellipsis","createComponent","parent","_default","exports"],"sources":["../../src/FullscreenModal.jsx"],"sourcesContent":["import { Flex, Box } from '@semcore/base-components';\nimport Button, { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport fire from '@semcore/core/lib/utils/fire';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport ArrowLeft from '@semcore/icon/ArrowLeft/m';\nimport CloseIcon from '@semcore/icon/Close/l';\nimport Modal from '@semcore/modal';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport style from './style/fullscreen-modal.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass FullscreenModalRoot extends Component {\n static displayName = 'FullscreenModal';\n static style = style;\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n };\n\n state = { hasTitle: false };\n\n bindHandlerClose = (trigger) => (e) => {\n fire(this, 'onClose', trigger, e);\n };\n\n getCloseProps() {\n const { getI18nText } = this.asProps;\n return {\n onClick: this.bindHandlerClose('onCloseClick'),\n getI18nText,\n };\n }\n\n getBackProps() {\n return {\n onClick: this.bindHandlerClose('onBackClick'),\n };\n }\n\n getTitleProps() {\n const { uid } = this.asProps;\n const setHasTitle = () => this.setState({ hasTitle: true });\n\n return {\n id: `igc-${uid}-title`,\n setHasTitle,\n };\n }\n\n render() {\n const SFullscreenModal = Root;\n const {\n styles,\n Children,\n onClose,\n visible,\n closable,\n duration,\n disablePortal,\n getI18nText,\n uid,\n } = this.asProps;\n const { hasTitle } = this.state;\n const SFullscreenOverlay = Modal.Overlay;\n\n return sstyled(styles)(\n <Modal\n closable={false}\n visible={visible}\n onClose={onClose}\n duration={duration}\n disablePortal={disablePortal}\n >\n <SFullscreenOverlay>\n <SFullscreenModal\n render={Modal.Window}\n use:closable={false}\n aria-label={hasTitle ? undefined : getI18nText('title')}\n aria-labelledby={hasTitle ? `igc-${uid}-title` : undefined}\n >\n {closable && <FullscreenModal.Close />}\n <Children />\n </SFullscreenModal>\n </SFullscreenOverlay>\n </Modal>,\n );\n }\n}\n\nfunction Header(props) {\n const SHeader = Root;\n const { Children, styles, title, description } = props;\n return sstyled(styles)(\n <SHeader render={Box}>\n {title && <FullscreenModal.Title children={title} />}\n {description && <FullscreenModal.Description children={description} />}\n <Children />\n </SHeader>,\n );\n}\n\nfunction Body(props) {\n const SBody = Root;\n return sstyled(props.styles)(<SBody render={Box} />);\n}\n\nfunction Section(props) {\n const SSection = Root;\n return sstyled(props.styles)(<SSection render={Box} tag='section' />);\n}\n\nfunction Footer(props) {\n const SFooter = Root;\n return sstyled(props.styles)(<SFooter render={Flex} />);\n}\n\nfunction Close(props) {\n const SClose = Root;\n const { getI18nText } = props;\n return sstyled(props.styles)(\n <SClose render={Button} use='tertiary' size='l' theme='muted' aria-label={getI18nText('close')}>\n <Button.Addon ml='7px' mr='7px'>\n <CloseIcon />\n </Button.Addon>\n </SClose>,\n );\n}\n\nfunction Title(props) {\n const STitle = Root;\n const { setHasTitle } = props;\n\n React.useEffect(() => setHasTitle());\n\n return sstyled(props.styles)(<STitle render={Text} tag='h2' />);\n}\n\nfunction Description(props) {\n const SDescription = Root;\n return sstyled(props.styles)(<SDescription render={Text} tag='p' />);\n}\n\nfunction Back(props) {\n const SBack = Root;\n const { Children, styles } = props;\n\n return sstyled(styles)(\n <SBack render={ButtonLink} color='text-hint' size={200} addonLeft={ArrowLeft}>\n <ButtonLink.Text ellipsis>\n <Children />\n </ButtonLink.Text>\n </SBack>,\n );\n}\n\n/**\n * FullscreenModal\n *\n * {@link https://developer.semrush.com/intergalactic/components/fullscreen-modal/fullscreen-modal-api/|API} | {@link https://developer.semrush.com/intergalactic/components/fullscreen-modal/fullscreen-modal-code/|Examples}\n */\nconst FullscreenModal = createComponent(\n FullscreenModalRoot,\n {\n Header,\n Footer,\n Close,\n Back,\n Body,\n Section,\n Title,\n Description,\n },\n { parent: Modal },\n);\n\nexport default FullscreenModal;\n"],"mappings":";;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,uBAAA,CAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,KAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,SAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,EAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,EAAA,GAAAJ,sBAAA,CAAAL,OAAA;AACA,IAAAU,MAAA,GA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;AACrE;AAEA,SAASG,IAAIA,CAACxC,KAAK,EAAE;EAAA,IAAAyC,KAAA,GAAAvC,YAAA;IAAAwC,MAAA;EACnB,MAAMC,KAAK,GAIMC,kBAAU;EAH3B,MAAM;IAAEjE,QAAQ;IAAED;EAAO,CAAC,GAAGsB,KAAK;EAElC,OAAA0C,MAAA,GAAO,IAAA7F,aAAO,EAAC6B,MAAM,CAAC,eACpBhC,MAAA,CAAAU,OAAA,CAAAgC,aAAA,CAACuD,KAAK,EAAAD,MAAA,CAAArD,EAAA;IAAA,OAAAxD,KAAA,CAAAyD,WAAA;MAAA,SAA2B,WAAW;MAAA,QAAO,GAAG;MAAA,aAAauD;IAAS,GAAAJ,KAAA;EAAA,iBAC1E/F,MAAA,CAAAU,OAAA,CAAAgC,aAAA,CAACpD,OAAA,CAAA4G,UAAU,CAACV,IAAI;IAACY,QAAQ;EAAA,gBACvBpG,MAAA,CAAAU,OAAA,CAAAgC,aAAA,CAACT,QAAQ,EAAA+D,MAAA,CAAArD,EAAA,gBAAE,CACI,CACZ,CAAC;AAEZ;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAG,IAAAuD,qBAAe,EACrChG,mBAAmB,EACnB;EACEgD,MAAM;EACNoB,MAAM;EACN1B,KAAK;EACL+C,IAAI;EACJ7B,IAAI;EACJI,OAAO;EACPP,KAAK;EACLE;AACF,CAAC,EACD;EAAEsC,MAAM,EAAExE;AAAM,CAClB,CAAC;AAAC,IAAAyE,QAAA,GAAAC,OAAA,CAAA9F,OAAA,GAEaoC,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Flex, Box, BoxProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { NSModal } from '@semcore/modal';\nimport type { Text } from '@semcore/typography';\n\nexport type FullscreenModalProps = NSModal.Props & {\n /** Function that is invoked when hiding a component */\n onClose?: (\n trigger: 'onBackClick' | 'onCloseClick' | 'onEscape' | 'onOutsideClick',\n e?: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n};\n\nexport type FullscreenModalHeaderProps = BoxProps & {\n /** Title content displayed in the modal header */\n title?: React.ReactNode;\n /** Description text that appears alongside the title */\n description?: React.ReactNode;\n};\n\nexport type FullscreenModalContext = {\n getBackProps: PropGetterFn;\n getCloseProps: PropGetterFn;\n};\n\ndeclare const FullscreenModal: Intergalactic.Component<\n 'div',\n FullscreenModalProps,\n FullscreenModalContext\n> & {\n Header: Intergalactic.Component<'div', FullscreenModalHeaderProps>;\n Footer: typeof Flex;\n Close: typeof Button;\n Back: typeof Box;\n Body: typeof Box;\n Section: typeof Box;\n Title: typeof Text;\n Description: typeof Text;\n};\n\nexport default FullscreenModal;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { NSBox, NSFlex } from '@semcore/base-components';\nimport type { NSButton } from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { NSModal } from '@semcore/modal';\nimport type { NSText } from '@semcore/typography';\n\nexport type FullscreenModalProps = NSModal.Props & {\n /** Function that is invoked when hiding a component */\n onClose?: (\n trigger: 'onBackClick' | 'onCloseClick' | 'onEscape' | 'onOutsideClick',\n e?: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n};\n\nexport type FullscreenModalHeaderProps = NSBox.Props & {\n /** Title content displayed in the modal header */\n title?: React.ReactNode;\n /** Description text that appears alongside the title */\n description?: React.ReactNode;\n};\n\nexport type FullscreenModalContext = {\n getBackProps: PropGetterFn;\n getCloseProps: PropGetterFn;\n};\n\ndeclare const FullscreenModal: Intergalactic.Component<\n 'div',\n FullscreenModalProps,\n FullscreenModalContext\n> & {\n Header: Intergalactic.Component<'div', FullscreenModalHeaderProps>;\n Footer: NSFlex.Component;\n Close: NSButton.Component;\n Back: NSBox.Component;\n Body: NSBox.Component;\n Section: NSBox.Component;\n Title: NSText.Component;\n Description: NSText.Component;\n};\n\nexport default FullscreenModal;\n"],"mappings":"","ignoreList":[]}
@@ -175,9 +175,7 @@ function Close(props) {
175
175
  }), /*#__PURE__*/React.createElement(Button.Addon, {
176
176
  ml: "7px",
177
177
  mr: "7px"
178
- }, /*#__PURE__*/React.createElement(CloseIcon, _ref13.cn("CloseIcon", {
179
- "title": getI18nText('close')
180
- }))));
178
+ }, /*#__PURE__*/React.createElement(CloseIcon, _ref13.cn("CloseIcon", {}))));
181
179
  }
182
180
  function Title(props) {
183
181
  var _ref7 = arguments[0],
@@ -1 +1 @@
1
- {"version":3,"file":"FullscreenModal.js","names":["Flex","Box","Button","ButtonLink","createComponent","Component","sstyled","Root","i18nEnhance","fire","uniqueIDEnhancement","ArrowLeft","CloseIcon","Modal","Text","React","style","_sstyled","insert","localizedMessages","FullscreenModalRoot","constructor","args","_defineProperty","hasTitle","trigger","e","getCloseProps","getI18nText","asProps","onClick","bindHandlerClose","getBackProps","getTitleProps","uid","setHasTitle","setState","id","render","_ref","_ref0","SFullscreenModal","Window","styles","Children","onClose","visible","closable","duration","disablePortal","state","SFullscreenOverlay","Overlay","createElement","cn","_assignProps","undefined","FullscreenModal","Close","i18n","locale","Header","props","_ref2","arguments[0]","_ref1","SHeader","title","description","_assignProps2","Title","children","Description","Body","_ref3","_ref10","SBody","_assignProps3","Section","_ref4","_ref11","SSection","_assignProps4","Footer","_ref5","_ref12","SFooter","_assignProps5","_ref6","_ref13","SClose","_assignProps6","Addon","ml","mr","_ref7","_ref14","STitle","useEffect","_assignProps7","_ref8","_ref15","SDescription","_assignProps8","Back","_ref9","_ref16","SBack","_assignProps9","ellipsis","parent"],"sources":["../../src/FullscreenModal.jsx"],"sourcesContent":["import { Flex, Box } from '@semcore/base-components';\nimport Button, { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport fire from '@semcore/core/lib/utils/fire';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport ArrowLeft from '@semcore/icon/ArrowLeft/m';\nimport CloseIcon from '@semcore/icon/Close/l';\nimport Modal from '@semcore/modal';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport style from './style/fullscreen-modal.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass FullscreenModalRoot extends Component {\n static displayName = 'FullscreenModal';\n static style = style;\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n };\n\n state = { hasTitle: false };\n\n bindHandlerClose = (trigger) => (e) => {\n fire(this, 'onClose', trigger, e);\n };\n\n getCloseProps() {\n const { getI18nText } = this.asProps;\n return {\n onClick: this.bindHandlerClose('onCloseClick'),\n getI18nText,\n };\n }\n\n getBackProps() {\n return {\n onClick: this.bindHandlerClose('onBackClick'),\n };\n }\n\n getTitleProps() {\n const { uid } = this.asProps;\n const setHasTitle = () => this.setState({ hasTitle: true });\n\n return {\n id: `igc-${uid}-title`,\n setHasTitle,\n };\n }\n\n render() {\n const SFullscreenModal = Root;\n const {\n styles,\n Children,\n onClose,\n visible,\n closable,\n duration,\n disablePortal,\n getI18nText,\n uid,\n } = this.asProps;\n const { hasTitle } = this.state;\n const SFullscreenOverlay = Modal.Overlay;\n\n return sstyled(styles)(\n <Modal\n closable={false}\n visible={visible}\n onClose={onClose}\n duration={duration}\n disablePortal={disablePortal}\n >\n <SFullscreenOverlay>\n <SFullscreenModal\n render={Modal.Window}\n use:closable={false}\n aria-label={hasTitle ? undefined : getI18nText('title')}\n aria-labelledby={hasTitle ? `igc-${uid}-title` : undefined}\n >\n {closable && <FullscreenModal.Close />}\n <Children />\n </SFullscreenModal>\n </SFullscreenOverlay>\n </Modal>,\n );\n }\n}\n\nfunction Header(props) {\n const SHeader = Root;\n const { Children, styles, title, description } = props;\n return sstyled(styles)(\n <SHeader render={Box}>\n {title && <FullscreenModal.Title children={title} />}\n {description && <FullscreenModal.Description children={description} />}\n <Children />\n </SHeader>,\n );\n}\n\nfunction Body(props) {\n const SBody = Root;\n return sstyled(props.styles)(<SBody render={Box} />);\n}\n\nfunction Section(props) {\n const SSection = Root;\n return sstyled(props.styles)(<SSection render={Box} tag='section' />);\n}\n\nfunction Footer(props) {\n const SFooter = Root;\n return sstyled(props.styles)(<SFooter render={Flex} />);\n}\n\nfunction Close(props) {\n const SClose = Root;\n const { getI18nText } = props;\n return sstyled(props.styles)(\n <SClose render={Button} use='tertiary' size='l' theme='muted' aria-label={getI18nText('close')}>\n <Button.Addon ml='7px' mr='7px'>\n <CloseIcon title={getI18nText('close')} />\n </Button.Addon>\n </SClose>,\n );\n}\n\nfunction Title(props) {\n const STitle = Root;\n const { setHasTitle } = props;\n\n React.useEffect(() => setHasTitle());\n\n return sstyled(props.styles)(<STitle render={Text} tag='h2' />);\n}\n\nfunction Description(props) {\n const SDescription = Root;\n return sstyled(props.styles)(<SDescription render={Text} tag='p' />);\n}\n\nfunction Back(props) {\n const SBack = Root;\n const { Children, styles } = props;\n\n return sstyled(styles)(\n <SBack render={ButtonLink} color='text-hint' size={200} addonLeft={ArrowLeft}>\n <ButtonLink.Text ellipsis>\n <Children />\n </ButtonLink.Text>\n </SBack>,\n );\n}\n\n/**\n * FullscreenModal\n *\n * {@link https://developer.semrush.com/intergalactic/components/fullscreen-modal/fullscreen-modal-api/|API} | {@link https://developer.semrush.com/intergalactic/components/fullscreen-modal/fullscreen-modal-code/|Examples}\n */\nconst FullscreenModal = createComponent(\n FullscreenModalRoot,\n {\n Header,\n Footer,\n Close,\n Back,\n Body,\n Section,\n Title,\n Description,\n },\n { parent: Modal },\n);\n\nexport default FullscreenModal;\n"],"mappings":";;;;;;;;;;;AAAA,SAASA,IAAI,EAAEC,GAAG,QAAQ,0BAA0B;AACpD,OAAOC,MAAM,IAAIC,UAAU,QAAQ,iBA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K,EAAAD,MAAA,CAAApD,EAAA;IAAA,GAAAsD,aAAA;MAAA,SAA2B,WAAW;MAAA,QAAO,GAAG;MAAA,aAAajG;IAAS,GAAA8F,KAAA;EAAA,iBAC1E1F,KAAA,CAAAsC,aAAA,CAAClD,UAAU,CAACW,IAAI;IAAC+F,QAAQ;EAAA,gBACvB9F,KAAA,CAAAsC,aAAA,CAACT,QAAQ,EAAA8D,MAAA,CAAApD,EAAA,gBAAE,CACI,CACZ,CAAC;AAEZ;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAGrD,eAAe,CACrCgB,mBAAmB,EACnB;EACEyC,MAAM;EACNsB,MAAM;EACNzB,KAAK;EACL8C,IAAI;EACJ/B,IAAI;EACJK,OAAO;EACPR,KAAK;EACLE;AACF,CAAC,EACD;EAAEsC,MAAM,EAAEjG;AAAM,CAClB,CAAC;AAED,eAAe4C,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"FullscreenModal.js","names":["Flex","Box","Button","ButtonLink","createComponent","Component","sstyled","Root","i18nEnhance","fire","uniqueIDEnhancement","ArrowLeft","CloseIcon","Modal","Text","React","style","_sstyled","insert","localizedMessages","FullscreenModalRoot","constructor","args","_defineProperty","hasTitle","trigger","e","getCloseProps","getI18nText","asProps","onClick","bindHandlerClose","getBackProps","getTitleProps","uid","setHasTitle","setState","id","render","_ref","_ref0","SFullscreenModal","Window","styles","Children","onClose","visible","closable","duration","disablePortal","state","SFullscreenOverlay","Overlay","createElement","cn","_assignProps","undefined","FullscreenModal","Close","i18n","locale","Header","props","_ref2","arguments[0]","_ref1","SHeader","title","description","_assignProps2","Title","children","Description","Body","_ref3","_ref10","SBody","_assignProps3","Section","_ref4","_ref11","SSection","_assignProps4","Footer","_ref5","_ref12","SFooter","_assignProps5","_ref6","_ref13","SClose","_assignProps6","Addon","ml","mr","_ref7","_ref14","STitle","useEffect","_assignProps7","_ref8","_ref15","SDescription","_assignProps8","Back","_ref9","_ref16","SBack","_assignProps9","ellipsis","parent"],"sources":["../../src/FullscreenModal.jsx"],"sourcesContent":["import { Flex, Box } from '@semcore/base-components';\nimport Button, { ButtonLink } from '@semcore/button';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport fire from '@semcore/core/lib/utils/fire';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport ArrowLeft from '@semcore/icon/ArrowLeft/m';\nimport CloseIcon from '@semcore/icon/Close/l';\nimport Modal from '@semcore/modal';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport style from './style/fullscreen-modal.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass FullscreenModalRoot extends Component {\n static displayName = 'FullscreenModal';\n static style = style;\n static enhance = [i18nEnhance(localizedMessages), uniqueIDEnhancement()];\n static defaultProps = {\n i18n: localizedMessages,\n locale: 'en',\n };\n\n state = { hasTitle: false };\n\n bindHandlerClose = (trigger) => (e) => {\n fire(this, 'onClose', trigger, e);\n };\n\n getCloseProps() {\n const { getI18nText } = this.asProps;\n return {\n onClick: this.bindHandlerClose('onCloseClick'),\n getI18nText,\n };\n }\n\n getBackProps() {\n return {\n onClick: this.bindHandlerClose('onBackClick'),\n };\n }\n\n getTitleProps() {\n const { uid } = this.asProps;\n const setHasTitle = () => this.setState({ hasTitle: true });\n\n return {\n id: `igc-${uid}-title`,\n setHasTitle,\n };\n }\n\n render() {\n const SFullscreenModal = Root;\n const {\n styles,\n Children,\n onClose,\n visible,\n closable,\n duration,\n disablePortal,\n getI18nText,\n uid,\n } = this.asProps;\n const { hasTitle } = this.state;\n const SFullscreenOverlay = Modal.Overlay;\n\n return sstyled(styles)(\n <Modal\n closable={false}\n visible={visible}\n onClose={onClose}\n duration={duration}\n disablePortal={disablePortal}\n >\n <SFullscreenOverlay>\n <SFullscreenModal\n render={Modal.Window}\n use:closable={false}\n aria-label={hasTitle ? undefined : getI18nText('title')}\n aria-labelledby={hasTitle ? `igc-${uid}-title` : undefined}\n >\n {closable && <FullscreenModal.Close />}\n <Children />\n </SFullscreenModal>\n </SFullscreenOverlay>\n </Modal>,\n );\n }\n}\n\nfunction Header(props) {\n const SHeader = Root;\n const { Children, styles, title, description } = props;\n return sstyled(styles)(\n <SHeader render={Box}>\n {title && <FullscreenModal.Title children={title} />}\n {description && <FullscreenModal.Description children={description} />}\n <Children />\n </SHeader>,\n );\n}\n\nfunction Body(props) {\n const SBody = Root;\n return sstyled(props.styles)(<SBody render={Box} />);\n}\n\nfunction Section(props) {\n const SSection = Root;\n return sstyled(props.styles)(<SSection render={Box} tag='section' />);\n}\n\nfunction Footer(props) {\n const SFooter = Root;\n return sstyled(props.styles)(<SFooter render={Flex} />);\n}\n\nfunction Close(props) {\n const SClose = Root;\n const { getI18nText } = props;\n return sstyled(props.styles)(\n <SClose render={Button} use='tertiary' size='l' theme='muted' aria-label={getI18nText('close')}>\n <Button.Addon ml='7px' mr='7px'>\n <CloseIcon />\n </Button.Addon>\n </SClose>,\n );\n}\n\nfunction Title(props) {\n const STitle = Root;\n const { setHasTitle } = props;\n\n React.useEffect(() => setHasTitle());\n\n return sstyled(props.styles)(<STitle render={Text} tag='h2' />);\n}\n\nfunction Description(props) {\n const SDescription = Root;\n return sstyled(props.styles)(<SDescription render={Text} tag='p' />);\n}\n\nfunction Back(props) {\n const SBack = Root;\n const { Children, styles } = props;\n\n return sstyled(styles)(\n <SBack render={ButtonLink} color='text-hint' size={200} addonLeft={ArrowLeft}>\n <ButtonLink.Text ellipsis>\n <Children />\n </ButtonLink.Text>\n </SBack>,\n );\n}\n\n/**\n * FullscreenModal\n *\n * {@link https://developer.semrush.com/intergalactic/components/fullscreen-modal/fullscreen-modal-api/|API} | {@link https://developer.semrush.com/intergalactic/components/fullscreen-modal/fullscreen-modal-code/|Examples}\n */\nconst FullscreenModal = createComponent(\n FullscreenModalRoot,\n {\n Header,\n Footer,\n Close,\n Back,\n Body,\n Section,\n Title,\n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AC,GAAGmB,KAAK;EAElC,OAAA4C,MAAA,GAAOpG,OAAO,CAACqC,MAAM,CAAC,eACpB5B,KAAA,CAAAsC,aAAA,CAACsD,KAAK,EAAAD,MAAA,CAAApD,EAAA;IAAA,GAAAsD,aAAA;MAAA,SAA2B,WAAW;MAAA,QAAO,GAAG;MAAA,aAAajG;IAAS,GAAA8F,KAAA;EAAA,iBAC1E1F,KAAA,CAAAsC,aAAA,CAAClD,UAAU,CAACW,IAAI;IAAC+F,QAAQ;EAAA,gBACvB9F,KAAA,CAAAsC,aAAA,CAACT,QAAQ,EAAA8D,MAAA,CAAApD,EAAA,gBAAE,CACI,CACZ,CAAC;AAEZ;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAMG,eAAe,GAAGrD,eAAe,CACrCgB,mBAAmB,EACnB;EACEyC,MAAM;EACNsB,MAAM;EACNzB,KAAK;EACL8C,IAAI;EACJ/B,IAAI;EACJK,OAAO;EACPR,KAAK;EACLE;AACF,CAAC,EACD;EAAEsC,MAAM,EAAEjG;AAAM,CAClB,CAAC;AAED,eAAe4C,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { Flex, Box, BoxProps } from '@semcore/base-components';\nimport type Button from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { NSModal } from '@semcore/modal';\nimport type { Text } from '@semcore/typography';\n\nexport type FullscreenModalProps = NSModal.Props & {\n /** Function that is invoked when hiding a component */\n onClose?: (\n trigger: 'onBackClick' | 'onCloseClick' | 'onEscape' | 'onOutsideClick',\n e?: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n};\n\nexport type FullscreenModalHeaderProps = BoxProps & {\n /** Title content displayed in the modal header */\n title?: React.ReactNode;\n /** Description text that appears alongside the title */\n description?: React.ReactNode;\n};\n\nexport type FullscreenModalContext = {\n getBackProps: PropGetterFn;\n getCloseProps: PropGetterFn;\n};\n\ndeclare const FullscreenModal: Intergalactic.Component<\n 'div',\n FullscreenModalProps,\n FullscreenModalContext\n> & {\n Header: Intergalactic.Component<'div', FullscreenModalHeaderProps>;\n Footer: typeof Flex;\n Close: typeof Button;\n Back: typeof Box;\n Body: typeof Box;\n Section: typeof Box;\n Title: typeof Text;\n Description: typeof Text;\n};\n\nexport default FullscreenModal;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { NSBox, NSFlex } from '@semcore/base-components';\nimport type { NSButton } from '@semcore/button';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { NSModal } from '@semcore/modal';\nimport type { NSText } from '@semcore/typography';\n\nexport type FullscreenModalProps = NSModal.Props & {\n /** Function that is invoked when hiding a component */\n onClose?: (\n trigger: 'onBackClick' | 'onCloseClick' | 'onEscape' | 'onOutsideClick',\n e?: React.MouseEvent | React.KeyboardEvent,\n ) => void;\n};\n\nexport type FullscreenModalHeaderProps = NSBox.Props & {\n /** Title content displayed in the modal header */\n title?: React.ReactNode;\n /** Description text that appears alongside the title */\n description?: React.ReactNode;\n};\n\nexport type FullscreenModalContext = {\n getBackProps: PropGetterFn;\n getCloseProps: PropGetterFn;\n};\n\ndeclare const FullscreenModal: Intergalactic.Component<\n 'div',\n FullscreenModalProps,\n FullscreenModalContext\n> & {\n Header: Intergalactic.Component<'div', FullscreenModalHeaderProps>;\n Footer: NSFlex.Component;\n Close: NSButton.Component;\n Back: NSBox.Component;\n Body: NSBox.Component;\n Section: NSBox.Component;\n Title: NSText.Component;\n Description: NSText.Component;\n};\n\nexport default FullscreenModal;\n"],"mappings":"","ignoreList":[]}
@@ -166,9 +166,7 @@ function Close(props) {
166
166
  }), /* @__PURE__ */ React.createElement(Button.Addon, {
167
167
  ml: "7px",
168
168
  mr: "7px"
169
- }, /* @__PURE__ */ React.createElement(CloseIcon, _ref13.cn("CloseIcon", {
170
- "title": getI18nText("close")
171
- }))));
169
+ }, /* @__PURE__ */ React.createElement(CloseIcon, _ref13.cn("CloseIcon", {}))));
172
170
  }
173
171
  function Title(props) {
174
172
  var _ref7 = arguments[0], _ref14;
@@ -1,8 +1,8 @@
1
- import type { Flex, Box, BoxProps } from '@semcore/base-components';
2
- import type Button from '@semcore/button';
1
+ import type { NSBox, NSFlex } from '@semcore/base-components';
2
+ import type { NSButton } from '@semcore/button';
3
3
  import type { PropGetterFn, Intergalactic } from '@semcore/core';
4
4
  import type { NSModal } from '@semcore/modal';
5
- import type { Text } from '@semcore/typography';
5
+ import type { NSText } from '@semcore/typography';
6
6
 
7
7
  export type FullscreenModalProps = NSModal.Props & {
8
8
  /** Function that is invoked when hiding a component */
@@ -12,7 +12,7 @@ export type FullscreenModalProps = NSModal.Props & {
12
12
  ) => void;
13
13
  };
14
14
 
15
- export type FullscreenModalHeaderProps = BoxProps & {
15
+ export type FullscreenModalHeaderProps = NSBox.Props & {
16
16
  /** Title content displayed in the modal header */
17
17
  title?: React.ReactNode;
18
18
  /** Description text that appears alongside the title */
@@ -30,13 +30,13 @@ declare const FullscreenModal: Intergalactic.Component<
30
30
  FullscreenModalContext
31
31
  > & {
32
32
  Header: Intergalactic.Component<'div', FullscreenModalHeaderProps>;
33
- Footer: typeof Flex;
34
- Close: typeof Button;
35
- Back: typeof Box;
36
- Body: typeof Box;
37
- Section: typeof Box;
38
- Title: typeof Text;
39
- Description: typeof Text;
33
+ Footer: NSFlex.Component;
34
+ Close: NSButton.Component;
35
+ Back: NSBox.Component;
36
+ Body: NSBox.Component;
37
+ Section: NSBox.Component;
38
+ Title: NSText.Component;
39
+ Description: NSText.Component;
40
40
  };
41
41
 
42
42
  export default FullscreenModal;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/fullscreen-modal",
3
3
  "description": "Semrush FullscreenModal Component",
4
- "version": "17.2.2-prerelease.1",
4
+ "version": "17.2.2-prerelease.2",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,13 +14,13 @@
14
14
  "require": "./lib/cjs/index.js"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/modal": "^17.2.2-prerelease.1",
18
- "@semcore/typography": "^17.2.1",
19
- "@semcore/button": "^17.2.1"
17
+ "@semcore/modal": "^17.2.2-prerelease.2",
18
+ "@semcore/typography": "^17.2.1-prerelease.2",
19
+ "@semcore/button": "^17.2.2-prerelease.2"
20
20
  },
21
21
  "peerDependencies": {
22
- "@semcore/base-components": "^17.2.1",
23
- "@semcore/icon": "^17.2.0"
22
+ "@semcore/base-components": "^17.2.2",
23
+ "@semcore/icon": "^17.2.1"
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",
@@ -28,10 +28,10 @@
28
28
  "directory": "semcore/fullscreen-modal"
29
29
  },
30
30
  "devDependencies": {
31
- "@semcore/core": "17.2.1",
32
- "@semcore/testing-utils": "1.0.0",
33
- "@semcore/base-components": "17.2.1",
34
- "@semcore/icon": "17.2.0"
31
+ "@semcore/core": "17.3.1-prerelease.2",
32
+ "@semcore/base-components": "17.2.2-prerelease.2",
33
+ "@semcore/icon": "17.2.1-prerelease.2",
34
+ "@semcore/testing-utils": "1.0.0"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "pnpm semcore-builder --source=js && pnpm vite build"