@semcore/fullscreen-modal 16.2.0-prerelease.1 → 16.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/FullscreenModal.js +21 -19
- package/lib/cjs/FullscreenModal.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/style/fullscreen-modal.shadow.css +5 -20
- package/lib/es6/FullscreenModal.js +16 -14
- package/lib/es6/FullscreenModal.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/fullscreen-modal.shadow.css +5 -20
- package/lib/esm/FullscreenModal.mjs +18 -16
- package/lib/esm/style/fullscreen-modal.shadow.css +5 -20
- package/lib/types/index.d.ts +2 -10
- package/package.json +8 -8
|
@@ -12,11 +12,11 @@ var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSup
|
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _core = require("@semcore/core");
|
|
15
|
+
var _baseComponents = require("@semcore/base-components");
|
|
15
16
|
var _button = _interopRequireDefault(require("@semcore/button"));
|
|
16
17
|
var _i18nEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/i18nEnhance"));
|
|
17
18
|
var _fire = _interopRequireDefault(require("@semcore/core/lib/utils/fire"));
|
|
18
19
|
var _uniqueID = _interopRequireDefault(require("@semcore/core/lib/utils/uniqueID"));
|
|
19
|
-
var _flexBox = require("@semcore/flex-box");
|
|
20
20
|
var _m = _interopRequireDefault(require("@semcore/icon/ArrowLeft/m"));
|
|
21
21
|
var _l = _interopRequireDefault(require("@semcore/icon/Close/l"));
|
|
22
22
|
var _modal = _interopRequireDefault(require("@semcore/modal"));
|
|
@@ -24,20 +24,20 @@ var _typography = require("@semcore/typography");
|
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
25
25
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
26
26
|
/*!__reshadow-styles__:"./style/fullscreen-modal.shadow.css"*/
|
|
27
|
-
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
27
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SFullscreenModal_1ht85_gg_,.___SFullscreenOverlay_1ht85_gg_>div{padding:0;width:100%;height:100%}.___SFullscreenModal_1ht85_gg_{display:flex;flex-direction:column;background:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255));border-radius:0}.___SClose_1ht85_gg_{position:absolute;top:17px;right:24px}.___SBack_1ht85_gg_{cursor:pointer;position:absolute;z-index:1;top:8px;left:32px;display:flex;align-items:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);color:var(--intergalactic-icon-primary-neutral, rgba(0, 4, 1, 0.526));font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);background:0 0;padding:0;border:0;outline:0}@media (hover:hover){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, rgba(0, 3, 0, 0.583))}@supports (color:color(display-p3 0 0 0%)){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}}.___SBackText_1ht85_gg_{margin-left:var(--intergalactic-spacing-1x, 4px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SDescription_1ht85_gg_,.___STitle_1ht85_gg_{word-wrap:break-word}.___STitle_1ht85_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%);font-weight:var(--intergalactic-bold, 700);color:var(--intergalactic-text-primary, rgba(1, 5, 0, 0.899))}.___SDescription_1ht85_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@supports (color:color(display-p3 0 0 0%)){.___SDescription_1ht85_gg_{color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SDescription_1ht85_gg_{color:var(--intergalactic-text-secondary, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}.___SHeader_1ht85_gg_{display:flex;flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);align-items:flex-start;padding-left:var(--intergalactic-spacing-8x, 32px);padding-bottom:var(--intergalactic-spacing-4x, 16px);padding-right:calc(var(--intergalactic-spacing-20x, 80px) - var(--intergalactic-spacing-2x, 8px));padding-top:var(--intergalactic-spacing-10x, 40px);box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));box-sizing:border-box}@supports (color:color(display-p3 0 0 0%)){.___SHeader_1ht85_gg_{box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SHeader_1ht85_gg_{box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SFooter_1ht85_gg_{min-height:52px;box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));box-sizing:border-box}@supports (color:color(display-p3 0 0 0%)){.___SFooter_1ht85_gg_{box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SFooter_1ht85_gg_{box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SBody_1ht85_gg_{display:flex;height:100%;overflow:auto}.___SSection_1ht85_gg_{padding-top:var(--intergalactic-spacing-6x, 24px);padding-bottom:var(--intergalactic-spacing-6x, 24px);padding-left:var(--intergalactic-spacing-8x, 32px);padding-right:var(--intergalactic-spacing-8x, 32px);flex:1 1 auto}@media (prefers-reduced-motion){.___SBackText_1ht85_gg_{transition:none}}", /*__inner_css_end__*/"1ht85_gg_"),
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__SFullscreenModal": "
|
|
31
|
-
"__SClose": "
|
|
32
|
-
"__SBackText": "
|
|
33
|
-
"__STitle": "
|
|
34
|
-
"__SDescription": "
|
|
35
|
-
"__SHeader": "
|
|
36
|
-
"__SFooter": "
|
|
37
|
-
"__SBody": "
|
|
38
|
-
"__SSection": "
|
|
39
|
-
"__SFullscreenOverlay": "
|
|
40
|
-
"__SBack": "
|
|
30
|
+
"__SFullscreenModal": "___SFullscreenModal_1ht85_gg_",
|
|
31
|
+
"__SClose": "___SClose_1ht85_gg_",
|
|
32
|
+
"__SBackText": "___SBackText_1ht85_gg_",
|
|
33
|
+
"__STitle": "___STitle_1ht85_gg_",
|
|
34
|
+
"__SDescription": "___SDescription_1ht85_gg_",
|
|
35
|
+
"__SHeader": "___SHeader_1ht85_gg_",
|
|
36
|
+
"__SFooter": "___SFooter_1ht85_gg_",
|
|
37
|
+
"__SBody": "___SBody_1ht85_gg_",
|
|
38
|
+
"__SSection": "___SSection_1ht85_gg_",
|
|
39
|
+
"__SFullscreenOverlay": "___SFullscreenOverlay_1ht85_gg_",
|
|
40
|
+
"__SBack": "___SBack_1ht85_gg_"
|
|
41
41
|
});
|
|
42
42
|
var FullscreenModalRoot = /*#__PURE__*/function (_Component) {
|
|
43
43
|
function FullscreenModalRoot() {
|
|
@@ -131,7 +131,7 @@ var FullscreenModalRoot = /*#__PURE__*/function (_Component) {
|
|
|
131
131
|
function Header(props) {
|
|
132
132
|
var _ref2 = arguments[0],
|
|
133
133
|
_ref1;
|
|
134
|
-
var SHeader =
|
|
134
|
+
var SHeader = _baseComponents.Box;
|
|
135
135
|
var Children = props.Children,
|
|
136
136
|
styles = props.styles,
|
|
137
137
|
title = props.title,
|
|
@@ -145,13 +145,13 @@ function Header(props) {
|
|
|
145
145
|
function Body(props) {
|
|
146
146
|
var _ref3 = arguments[0],
|
|
147
147
|
_ref10;
|
|
148
|
-
var SBody =
|
|
148
|
+
var SBody = _baseComponents.Box;
|
|
149
149
|
return _ref10 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SBody, _ref10.cn("SBody", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref3))));
|
|
150
150
|
}
|
|
151
151
|
function Section(props) {
|
|
152
152
|
var _ref4 = arguments[0],
|
|
153
153
|
_ref11;
|
|
154
|
-
var SSection =
|
|
154
|
+
var SSection = _baseComponents.Box;
|
|
155
155
|
return _ref11 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SSection, _ref11.cn("SSection", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
156
156
|
"tag": 'section'
|
|
157
157
|
}, _ref4))));
|
|
@@ -159,7 +159,7 @@ function Section(props) {
|
|
|
159
159
|
function Footer(props) {
|
|
160
160
|
var _ref5 = arguments[0],
|
|
161
161
|
_ref12;
|
|
162
|
-
var SFooter =
|
|
162
|
+
var SFooter = _baseComponents.Flex;
|
|
163
163
|
return _ref12 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SFooter, _ref12.cn("SFooter", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref5))));
|
|
164
164
|
}
|
|
165
165
|
function Close(props) {
|
|
@@ -195,12 +195,14 @@ function Description(props) {
|
|
|
195
195
|
var _ref8 = arguments[0],
|
|
196
196
|
_ref15;
|
|
197
197
|
var SDescription = _typography.Text;
|
|
198
|
-
return _ref15 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDescription, _ref15.cn("SDescription", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
198
|
+
return _ref15 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDescription, _ref15.cn("SDescription", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
199
|
+
"tag": 'p'
|
|
200
|
+
}, _ref8))));
|
|
199
201
|
}
|
|
200
202
|
function Back(props) {
|
|
201
203
|
var _ref9 = arguments[0],
|
|
202
204
|
_ref16;
|
|
203
|
-
var SBack =
|
|
205
|
+
var SBack = _baseComponents.Box;
|
|
204
206
|
var SBackText = _typography.Text;
|
|
205
207
|
var Children = props.Children,
|
|
206
208
|
styles = props.styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullscreenModal.js","names":["_core","require","_button","_interopRequireDefault","_i18nEnhance","_fire","_uniqueID","_flexBox","_m","_l","_modal","_typography","_react","_intergalacticDynamicLocales","style","sstyled","insert","FullscreenModalRoot","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","hasTitle","trigger","e","fire","_inherits2","_createClass2","key","value","getCloseProps","getI18nText","asProps","onClick","bindHandlerClose","getBackProps","getTitleProps","_this2","uid","setHasTitle","setState","id","render","_ref","_ref0","SFullscreenModal","Modal","Window","_this$asProps","styles","Children","onClose","visible","closable","duration","disablePortal","state","SFullscreenOverlay","Overlay","createElement","cn","_objectSpread2","assignProps","undefined","FullscreenModal","Close","Component","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","SBackText","createComponent","parent","_default","exports"],"sources":["../../src/FullscreenModal.jsx"],"sourcesContent":["import Button 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 { Flex, Box } from '@semcore/flex-box';\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} />);\n}\n\nfunction Back(props) {\n const SBack = Root;\n const SBackText = Text;\n const { Children, styles } = props;\n\n return sstyled(styles)(\n <SBack render={Box} tag='button' tabIndex={0}>\n <ArrowLeft />\n <SBackText>\n <Children />\n </SBackText>\n </SBack>,\n );\n}\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":";;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,SAAA,GAAAH,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GAAO,IAAA5G,aAAO,EAAC0C,MAAM,CAAC,eACpB7C,MAAA,YAAAuD,aAAA,CAACyD,KAAK,EAAAD,MAAA,CAAAvD,EAAA,cAAAC,cAAA,qBAAArE,KAAA,CAAAsE,WAAA;IAAA,OAAkB,QAAQ;IAAA,YAAW;EAAC,GAAAoD,KAAA,kBAC1C9G,MAAA,YAAAuD,aAAA,CAAC3D,EAAA,WAAS,EAAAmH,MAAA,CAAAvD,EAAA,iBAAE,CAAC,eACbxD,MAAA,YAAAuD,aAAA,CAAC0D,SAAS,EAAAF,MAAA,CAAAvD,EAAA,gCACRxD,MAAA,YAAAuD,aAAA,CAACT,QAAQ,EAAAiE,MAAA,CAAAvD,EAAA,gBAAE,CACF,CACN,CAAC;AAEZ;AAEA,IAAMI,eAAe,GAAG,IAAAsD,qBAAe,EACrC7G,mBAAmB,EACnB;EACE+D,MAAM,EAANA,MAAM;EACNoB,MAAM,EAANA,MAAM;EACN3B,KAAK,EAALA,KAAK;EACLgD,IAAI,EAAJA,IAAI;EACJ7B,IAAI,EAAJA,IAAI;EACJI,OAAO,EAAPA,OAAO;EACPP,KAAK,EAALA,KAAK;EACLE,WAAW,EAAXA;AACF,CAAC,EACD;EAAEoC,MAAM,EAAEzE;AAAM,CAClB,CAAC;AAAC,IAAA0E,QAAA,GAAAC,OAAA,cAEazD,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"FullscreenModal.js","names":["_core","require","_baseComponents","_button","_interopRequireDefault","_i18nEnhance","_fire","_uniqueID","_m","_l","_modal","_typography","_react","_intergalacticDynamicLocales","style","sstyled","insert","FullscreenModalRoot","_Component","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","_callSuper2","concat","_defineProperty2","hasTitle","trigger","e","fire","_inherits2","_createClass2","key","value","getCloseProps","getI18nText","asProps","onClick","bindHandlerClose","getBackProps","getTitleProps","_this2","uid","setHasTitle","setState","id","render","_ref","_ref0","SFullscreenModal","Modal","Window","_this$asProps","styles","Children","onClose","visible","closable","duration","disablePortal","state","SFullscreenOverlay","Overlay","createElement","cn","_objectSpread2","assignProps","undefined","FullscreenModal","Close","Component","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","SBackText","createComponent","parent","_default","exports"],"sources":["../../src/FullscreenModal.jsx"],"sourcesContent":["import { Flex, Box } from '@semcore/base-components';\nimport Button 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 SBackText = Text;\n const { Children, styles } = props;\n\n return sstyled(styles)(\n <SBack render={Box} tag='button' tabIndex={0}>\n <ArrowLeft />\n <SBackText>\n <Children />\n </SBackText>\n </SBack>,\n );\n}\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,sBAAA,CAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,SAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,EAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,EAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,MAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAR,sBAAA,CAAAH,OAAA;AAGA,IAAAY,4BAAA,GAAAZ,OAAA;AAAmF;AAAA,IAAAa,KAAA,8BAAAd,KAAA,CAAAe,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAE7EC,mBAAmB,0BAAAC,UAAA;EAAA,SAAAD,oBAAA;IAAA,IAAAE,KAAA;IAAA,IAAAC,gBAAA,mBAAAH,mBAAA;IAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,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;AACF,CAAC,EACD;EAAEoC,MAAM,EAAEzE;AAAM,CAClB,CAAC;AAAC,IAAA0E,QAAA,GAAAC,OAAA,cAEazD,eAAe","ignoreList":[]}
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type
|
|
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 { ModalProps } from '@semcore/modal';\nimport type { Text } from '@semcore/typography';\n\nexport type FullscreenModalProps = ModalProps & {\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":[]}
|
|
@@ -55,9 +55,7 @@ SBackText {
|
|
|
55
55
|
|
|
56
56
|
STitle,
|
|
57
57
|
SDescription {
|
|
58
|
-
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
text-overflow: ellipsis;
|
|
58
|
+
overflow-wrap: break-word;
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
STitle {
|
|
@@ -68,35 +66,22 @@ STitle {
|
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
SDescription {
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: baseline;
|
|
73
69
|
font-size: var(--intergalactic-fs-100, 12px);
|
|
74
70
|
line-height: var(--intergalactic-lh-100, 133%);
|
|
75
71
|
color: var(--intergalactic-text-secondary, oklch(0.088 0.026 147.7 / 0.583));
|
|
76
|
-
|
|
77
|
-
&::before {
|
|
78
|
-
content: '';
|
|
79
|
-
position: relative;
|
|
80
|
-
top: var(--intergalactic-spacing-1x, 4px);
|
|
81
|
-
display: block;
|
|
82
|
-
margin-left: var(--intergalactic-spacing-3x, 12px);
|
|
83
|
-
margin-right: var(--intergalactic-spacing-3x, 12px);
|
|
84
|
-
height: 24px;
|
|
85
|
-
width: 1px;
|
|
86
|
-
background-color: var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
|
|
87
|
-
}
|
|
88
72
|
}
|
|
89
73
|
|
|
90
74
|
SHeader {
|
|
91
75
|
display: flex;
|
|
92
|
-
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: var(--intergalactic-spacing-2x, 8px);
|
|
78
|
+
align-items: flex-start;
|
|
93
79
|
padding-left: var(--intergalactic-spacing-8x, 32px);
|
|
94
|
-
padding-bottom: var(--intergalactic-spacing-
|
|
80
|
+
padding-bottom: var(--intergalactic-spacing-4x, 16px);
|
|
95
81
|
padding-right: calc(
|
|
96
82
|
var(--intergalactic-spacing-20x, 80px) - var(--intergalactic-spacing-2x, 8px)
|
|
97
83
|
);
|
|
98
84
|
padding-top: var(--intergalactic-spacing-10x, 40px);
|
|
99
|
-
min-height: 76px;
|
|
100
85
|
box-shadow: inset 0 -1px 0 var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
|
|
101
86
|
box-sizing: border-box;
|
|
102
87
|
}
|
|
@@ -14,32 +14,32 @@ import { assignProps as _assignProps4 } from "@semcore/core";
|
|
|
14
14
|
import { assignProps as _assignProps3 } from "@semcore/core";
|
|
15
15
|
import { assignProps as _assignProps2 } from "@semcore/core";
|
|
16
16
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
17
|
+
import { Flex, Box } from '@semcore/base-components';
|
|
17
18
|
import Button from '@semcore/button';
|
|
18
19
|
import { createComponent, Component, sstyled, Root } from '@semcore/core';
|
|
19
20
|
import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
20
21
|
import fire from '@semcore/core/lib/utils/fire';
|
|
21
22
|
import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
|
|
22
|
-
import { Flex, Box } from '@semcore/flex-box';
|
|
23
23
|
import ArrowLeft from '@semcore/icon/ArrowLeft/m';
|
|
24
24
|
import CloseIcon from '@semcore/icon/Close/l';
|
|
25
25
|
import Modal from '@semcore/modal';
|
|
26
26
|
import { Text } from '@semcore/typography';
|
|
27
27
|
import React from 'react';
|
|
28
28
|
/*!__reshadow-styles__:"./style/fullscreen-modal.shadow.css"*/
|
|
29
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
29
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SFullscreenModal_1ht85_gg_,.___SFullscreenOverlay_1ht85_gg_>div{padding:0;width:100%;height:100%}.___SFullscreenModal_1ht85_gg_{display:flex;flex-direction:column;background:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255));border-radius:0}.___SClose_1ht85_gg_{position:absolute;top:17px;right:24px}.___SBack_1ht85_gg_{cursor:pointer;position:absolute;z-index:1;top:8px;left:32px;display:flex;align-items:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);color:var(--intergalactic-icon-primary-neutral, rgba(0, 4, 1, 0.526));font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);background:0 0;padding:0;border:0;outline:0}@media (hover:hover){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, rgba(0, 3, 0, 0.583))}@supports (color:color(display-p3 0 0 0%)){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}}.___SBackText_1ht85_gg_{margin-left:var(--intergalactic-spacing-1x, 4px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SDescription_1ht85_gg_,.___STitle_1ht85_gg_{word-wrap:break-word}.___STitle_1ht85_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%);font-weight:var(--intergalactic-bold, 700);color:var(--intergalactic-text-primary, rgba(1, 5, 0, 0.899))}.___SDescription_1ht85_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@supports (color:color(display-p3 0 0 0%)){.___SDescription_1ht85_gg_{color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SDescription_1ht85_gg_{color:var(--intergalactic-text-secondary, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}.___SHeader_1ht85_gg_{display:flex;flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);align-items:flex-start;padding-left:var(--intergalactic-spacing-8x, 32px);padding-bottom:var(--intergalactic-spacing-4x, 16px);padding-right:calc(var(--intergalactic-spacing-20x, 80px) - var(--intergalactic-spacing-2x, 8px));padding-top:var(--intergalactic-spacing-10x, 40px);box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));box-sizing:border-box}@supports (color:color(display-p3 0 0 0%)){.___SHeader_1ht85_gg_{box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SHeader_1ht85_gg_{box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SFooter_1ht85_gg_{min-height:52px;box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));box-sizing:border-box}@supports (color:color(display-p3 0 0 0%)){.___SFooter_1ht85_gg_{box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SFooter_1ht85_gg_{box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SBody_1ht85_gg_{display:flex;height:100%;overflow:auto}.___SSection_1ht85_gg_{padding-top:var(--intergalactic-spacing-6x, 24px);padding-bottom:var(--intergalactic-spacing-6x, 24px);padding-left:var(--intergalactic-spacing-8x, 32px);padding-right:var(--intergalactic-spacing-8x, 32px);flex:1 1 auto}@media (prefers-reduced-motion){.___SBackText_1ht85_gg_{transition:none}}", /*__inner_css_end__*/"1ht85_gg_"),
|
|
30
30
|
/*__reshadow_css_end__*/
|
|
31
31
|
{
|
|
32
|
-
"__SFullscreenModal": "
|
|
33
|
-
"__SClose": "
|
|
34
|
-
"__SBackText": "
|
|
35
|
-
"__STitle": "
|
|
36
|
-
"__SDescription": "
|
|
37
|
-
"__SHeader": "
|
|
38
|
-
"__SFooter": "
|
|
39
|
-
"__SBody": "
|
|
40
|
-
"__SSection": "
|
|
41
|
-
"__SFullscreenOverlay": "
|
|
42
|
-
"__SBack": "
|
|
32
|
+
"__SFullscreenModal": "___SFullscreenModal_1ht85_gg_",
|
|
33
|
+
"__SClose": "___SClose_1ht85_gg_",
|
|
34
|
+
"__SBackText": "___SBackText_1ht85_gg_",
|
|
35
|
+
"__STitle": "___STitle_1ht85_gg_",
|
|
36
|
+
"__SDescription": "___SDescription_1ht85_gg_",
|
|
37
|
+
"__SHeader": "___SHeader_1ht85_gg_",
|
|
38
|
+
"__SFooter": "___SFooter_1ht85_gg_",
|
|
39
|
+
"__SBody": "___SBody_1ht85_gg_",
|
|
40
|
+
"__SSection": "___SSection_1ht85_gg_",
|
|
41
|
+
"__SFullscreenOverlay": "___SFullscreenOverlay_1ht85_gg_",
|
|
42
|
+
"__SBack": "___SBack_1ht85_gg_"
|
|
43
43
|
});
|
|
44
44
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
45
45
|
var FullscreenModalRoot = /*#__PURE__*/function (_Component) {
|
|
@@ -198,7 +198,9 @@ function Description(props) {
|
|
|
198
198
|
var _ref8 = arguments[0],
|
|
199
199
|
_ref15;
|
|
200
200
|
var SDescription = Text;
|
|
201
|
-
return _ref15 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDescription, _ref15.cn("SDescription", _objectSpread({}, _assignProps8({
|
|
201
|
+
return _ref15 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDescription, _ref15.cn("SDescription", _objectSpread({}, _assignProps8({
|
|
202
|
+
"tag": 'p'
|
|
203
|
+
}, _ref8))));
|
|
202
204
|
}
|
|
203
205
|
function Back(props) {
|
|
204
206
|
var _ref9 = arguments[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullscreenModal.js","names":["Button","createComponent","Component","sstyled","Root","i18nEnhance","fire","uniqueIDEnhancement","Flex","Box","ArrowLeft","CloseIcon","Modal","Text","React","style","_sstyled","insert","localizedMessages","FullscreenModalRoot","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","hasTitle","trigger","e","_inherits","_createClass","key","value","getCloseProps","getI18nText","asProps","onClick","bindHandlerClose","getBackProps","getTitleProps","_this2","uid","setHasTitle","setState","id","render","_ref","_ref0","SFullscreenModal","Window","_this$asProps","styles","Children","onClose","visible","closable","duration","disablePortal","state","SFullscreenOverlay","Overlay","createElement","cn","_objectSpread","_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","SBackText","_assignProps9","parent"],"sources":["../../src/FullscreenModal.jsx"],"sourcesContent":["import Button 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 { Flex, Box } from '@semcore/flex-box';\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} />);\n}\n\nfunction Back(props) {\n const SBack = Root;\n const SBackText = Text;\n const { Children, styles } = props;\n\n return sstyled(styles)(\n <SBack render={Box} tag='button' tabIndex={0}>\n <ArrowLeft />\n <SBackText>\n <Children />\n </SBackText>\n </SBack>,\n );\n}\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,OAAOA,MAAM,MAAM,iBAAiB;AACpC,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,IAAI,MAAM,8BAA8B;AAC/C,OAAOC,mBAAmB,MAAM,kCAAkC;AAClE,SAASC,IAAI,EAAEC,GAAG,QAAQ,mBAAmB;AAC7C,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,KAAK,MAAM,gBAAgB;AAClC,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,IAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAG1B,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC,IAE7EC,mBAAmB,0BAAAC,UAAA;EAAA,SAAAD,oBAAA;IAAA,IAAAE,KAAA;IAAAC,eAAA,OAAAH,mBAAA;IAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAQ,UAAA,OAAAV,mBAAA,KAAAW,MAAA,CAAAJ,IAAA;IAAAK,eAAA,CAAAV,KAAA,WASf;MAAEW,QAAQ,EAAE;IAAM,CAA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CAA1BnB,QAAQ;IAAED,MAAM,GAAKoB,KAAK,CAAhBpB,MAAM;EAExB,OAAAgE,MAAA,GAAOtH,OAAO,CAACsD,MAAM,CAAC,eACpB3C,KAAA,CAAAqD,aAAA,CAACuD,KAAK,EAAAD,MAAA,CAAArD,EAAA,UAAAC,aAAA,KAAAuD,aAAA;IAAA,OAAkB,QAAQ;IAAA,YAAW;EAAC,GAAAJ,KAAA,kBAC1C1G,KAAA,CAAAqD,aAAA,CAACzD,SAAS,EAAA+G,MAAA,CAAArD,EAAA,iBAAE,CAAC,eACbtD,KAAA,CAAAqD,aAAA,CAACwD,SAAS,EAAAF,MAAA,CAAArD,EAAA,gCACRtD,KAAA,CAAAqD,aAAA,CAACT,QAAQ,EAAA+D,MAAA,CAAArD,EAAA,gBAAE,CACF,CACN,CAAC;AAEZ;AAEA,IAAMI,eAAe,GAAGvE,eAAe,CACrCkB,mBAAmB,EACnB;EACEyD,MAAM,EAANA,MAAM;EACNsB,MAAM,EAANA,MAAM;EACNzB,KAAK,EAALA,KAAK;EACL8C,IAAI,EAAJA,IAAI;EACJ/B,IAAI,EAAJA,IAAI;EACJK,OAAO,EAAPA,OAAO;EACPR,KAAK,EAALA,KAAK;EACLE,WAAW,EAAXA;AACF,CAAC,EACD;EAAEsC,MAAM,EAAEjH;AAAM,CAClB,CAAC;AAED,eAAe4D,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"FullscreenModal.js","names":["Flex","Box","Button","createComponent","Component","sstyled","Root","i18nEnhance","fire","uniqueIDEnhancement","ArrowLeft","CloseIcon","Modal","Text","React","style","_sstyled","insert","localizedMessages","FullscreenModalRoot","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","hasTitle","trigger","e","_inherits","_createClass","key","value","getCloseProps","getI18nText","asProps","onClick","bindHandlerClose","getBackProps","getTitleProps","_this2","uid","setHasTitle","setState","id","render","_ref","_ref0","SFullscreenModal","Window","_this$asProps","styles","Children","onClose","visible","closable","duration","disablePortal","state","SFullscreenOverlay","Overlay","createElement","cn","_objectSpread","_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","SBackText","_assignProps9","parent"],"sources":["../../src/FullscreenModal.jsx"],"sourcesContent":["import { Flex, Box } from '@semcore/base-components';\nimport Button 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 SBackText = Text;\n const { Children, styles } = props;\n\n return sstyled(styles)(\n <SBack render={Box} tag='button' tabIndex={0}>\n <ArrowLeft />\n <SBackText>\n <Children />\n </SBackText>\n </SBack>,\n );\n}\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,MAAM,iBAAiB;AACpC,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,IAAI,MAAM,8BAA8B;AAC/C,OAAOC,mBAAmB,MAAM,kCAAkC;AAClE,OAAOC,SAAS,MAAM,2BAA2B;AACjD,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,KAAK,MAAM,gBAAgB;AAClC,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,IAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAG1B,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC,IAE7EC,mBAAmB,0BAAAC,UAAA;EAAA,SAAAD,oBAAA;IAAA,IAAAE,KAAA;IAAAC,eAAA,OAAAH,mBAAA;IAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAQ,UAAA,OAAAV,mBAAA,KA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MC,KAAK,GAKMzH,GAAG;EAJpB,IAAM0H,SAAS,GAAG9G,IAAI;EACtB,IAAQ6C,QAAQ,GAAamB,KAAK,CAA1BnB,QAAQ;IAAED,MAAM,GAAKoB,KAAK,CAAhBpB,MAAM;EAExB,OAAAgE,MAAA,GAAOpH,OAAO,CAACoD,MAAM,CAAC,eACpB3C,KAAA,CAAAqD,aAAA,CAACuD,KAAK,EAAAD,MAAA,CAAArD,EAAA,UAAAC,aAAA,KAAAuD,aAAA;IAAA,OAAkB,QAAQ;IAAA,YAAW;EAAC,GAAAJ,KAAA,kBAC1C1G,KAAA,CAAAqD,aAAA,CAACzD,SAAS,EAAA+G,MAAA,CAAArD,EAAA,iBAAE,CAAC,eACbtD,KAAA,CAAAqD,aAAA,CAACwD,SAAS,EAAAF,MAAA,CAAArD,EAAA,gCACRtD,KAAA,CAAAqD,aAAA,CAACT,QAAQ,EAAA+D,MAAA,CAAArD,EAAA,gBAAE,CACF,CACN,CAAC;AAEZ;AAEA,IAAMI,eAAe,GAAGrE,eAAe,CACrCgB,mBAAmB,EACnB;EACEyD,MAAM,EAANA,MAAM;EACNsB,MAAM,EAANA,MAAM;EACNzB,KAAK,EAALA,KAAK;EACL8C,IAAI,EAAJA,IAAI;EACJ/B,IAAI,EAAJA,IAAI;EACJK,OAAO,EAAPA,OAAO;EACPR,KAAK,EAALA,KAAK;EACLE,WAAW,EAAXA;AACF,CAAC,EACD;EAAEsC,MAAM,EAAEjH;AAAM,CAClB,CAAC;AAED,eAAe4D,eAAe","ignoreList":[]}
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type
|
|
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 { ModalProps } from '@semcore/modal';\nimport type { Text } from '@semcore/typography';\n\nexport type FullscreenModalProps = ModalProps & {\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":[]}
|
|
@@ -55,9 +55,7 @@ SBackText {
|
|
|
55
55
|
|
|
56
56
|
STitle,
|
|
57
57
|
SDescription {
|
|
58
|
-
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
text-overflow: ellipsis;
|
|
58
|
+
overflow-wrap: break-word;
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
STitle {
|
|
@@ -68,35 +66,22 @@ STitle {
|
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
SDescription {
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: baseline;
|
|
73
69
|
font-size: var(--intergalactic-fs-100, 12px);
|
|
74
70
|
line-height: var(--intergalactic-lh-100, 133%);
|
|
75
71
|
color: var(--intergalactic-text-secondary, oklch(0.088 0.026 147.7 / 0.583));
|
|
76
|
-
|
|
77
|
-
&::before {
|
|
78
|
-
content: '';
|
|
79
|
-
position: relative;
|
|
80
|
-
top: var(--intergalactic-spacing-1x, 4px);
|
|
81
|
-
display: block;
|
|
82
|
-
margin-left: var(--intergalactic-spacing-3x, 12px);
|
|
83
|
-
margin-right: var(--intergalactic-spacing-3x, 12px);
|
|
84
|
-
height: 24px;
|
|
85
|
-
width: 1px;
|
|
86
|
-
background-color: var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
|
|
87
|
-
}
|
|
88
72
|
}
|
|
89
73
|
|
|
90
74
|
SHeader {
|
|
91
75
|
display: flex;
|
|
92
|
-
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: var(--intergalactic-spacing-2x, 8px);
|
|
78
|
+
align-items: flex-start;
|
|
93
79
|
padding-left: var(--intergalactic-spacing-8x, 32px);
|
|
94
|
-
padding-bottom: var(--intergalactic-spacing-
|
|
80
|
+
padding-bottom: var(--intergalactic-spacing-4x, 16px);
|
|
95
81
|
padding-right: calc(
|
|
96
82
|
var(--intergalactic-spacing-20x, 80px) - var(--intergalactic-spacing-2x, 8px)
|
|
97
83
|
);
|
|
98
84
|
padding-top: var(--intergalactic-spacing-10x, 40px);
|
|
99
|
-
min-height: 76px;
|
|
100
85
|
box-shadow: inset 0 -1px 0 var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
|
|
101
86
|
box-sizing: border-box;
|
|
102
87
|
}
|
|
@@ -4,12 +4,12 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
4
4
|
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import {
|
|
7
|
+
import { sstyled, assignProps, Component, createComponent } from "@semcore/core";
|
|
8
|
+
import { Box, Flex } from "@semcore/base-components";
|
|
8
9
|
import Button from "@semcore/button";
|
|
9
10
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
10
11
|
import fire from "@semcore/core/lib/utils/fire";
|
|
11
12
|
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
12
|
-
import { Box, Flex } from "@semcore/flex-box";
|
|
13
13
|
import ArrowLeft from "@semcore/icon/ArrowLeft/m";
|
|
14
14
|
import CloseIcon from "@semcore/icon/Close/l";
|
|
15
15
|
import Modal from "@semcore/modal";
|
|
@@ -21,22 +21,22 @@ var style = (
|
|
|
21
21
|
/*__reshadow_css_start__*/
|
|
22
22
|
(sstyled.insert(
|
|
23
23
|
/*__inner_css_start__*/
|
|
24
|
-
|
|
24
|
+
".___SFullscreenModal_1ht85_gg_,.___SFullscreenOverlay_1ht85_gg_>div{padding:0;width:100%;height:100%}.___SFullscreenModal_1ht85_gg_{display:flex;flex-direction:column;background:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255));border-radius:0}.___SClose_1ht85_gg_{position:absolute;top:17px;right:24px}.___SBack_1ht85_gg_{cursor:pointer;position:absolute;z-index:1;top:8px;left:32px;display:flex;align-items:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);color:var(--intergalactic-icon-primary-neutral, rgba(0, 4, 1, 0.526));font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);background:0 0;padding:0;border:0;outline:0}@media (hover:hover){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, rgba(0, 3, 0, 0.583))}@supports (color:color(display-p3 0 0 0%)){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SBack_1ht85_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}}.___SBackText_1ht85_gg_{margin-left:var(--intergalactic-spacing-1x, 4px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SDescription_1ht85_gg_,.___STitle_1ht85_gg_{word-wrap:break-word}.___STitle_1ht85_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%);font-weight:var(--intergalactic-bold, 700);color:var(--intergalactic-text-primary, rgba(1, 5, 0, 0.899))}.___SDescription_1ht85_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@supports (color:color(display-p3 0 0 0%)){.___SDescription_1ht85_gg_{color:var(--intergalactic-text-secondary, rgba(0, 3, 0, 0.583))}@media (color-gamut:p3){.___SDescription_1ht85_gg_{color:var(--intergalactic-text-secondary, color(display-p3 0.00228 0.01289 0.00252 / 0.583))}}}.___SHeader_1ht85_gg_{display:flex;flex-direction:column;gap:var(--intergalactic-spacing-2x, 8px);align-items:flex-start;padding-left:var(--intergalactic-spacing-8x, 32px);padding-bottom:var(--intergalactic-spacing-4x, 16px);padding-right:calc(var(--intergalactic-spacing-20x, 80px) - var(--intergalactic-spacing-2x, 8px));padding-top:var(--intergalactic-spacing-10x, 40px);box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));box-sizing:border-box}@supports (color:color(display-p3 0 0 0%)){.___SHeader_1ht85_gg_{box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SHeader_1ht85_gg_{box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SFooter_1ht85_gg_{min-height:52px;box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));box-sizing:border-box}@supports (color:color(display-p3 0 0 0%)){.___SFooter_1ht85_gg_{box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SFooter_1ht85_gg_{box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SBody_1ht85_gg_{display:flex;height:100%;overflow:auto}.___SSection_1ht85_gg_{padding-top:var(--intergalactic-spacing-6x, 24px);padding-bottom:var(--intergalactic-spacing-6x, 24px);padding-left:var(--intergalactic-spacing-8x, 32px);padding-right:var(--intergalactic-spacing-8x, 32px);flex:1 1 auto}@media (prefers-reduced-motion){.___SBackText_1ht85_gg_{transition:none}}",
|
|
25
25
|
/*__inner_css_end__*/
|
|
26
|
-
"
|
|
26
|
+
"1ht85_gg_"
|
|
27
27
|
), /*__reshadow_css_end__*/
|
|
28
28
|
{
|
|
29
|
-
"__SFullscreenModal": "
|
|
30
|
-
"__SClose": "
|
|
31
|
-
"__SBackText": "
|
|
32
|
-
"__STitle": "
|
|
33
|
-
"__SDescription": "
|
|
34
|
-
"__SHeader": "
|
|
35
|
-
"__SFooter": "
|
|
36
|
-
"__SBody": "
|
|
37
|
-
"__SSection": "
|
|
38
|
-
"__SFullscreenOverlay": "
|
|
39
|
-
"__SBack": "
|
|
29
|
+
"__SFullscreenModal": "___SFullscreenModal_1ht85_gg_",
|
|
30
|
+
"__SClose": "___SClose_1ht85_gg_",
|
|
31
|
+
"__SBackText": "___SBackText_1ht85_gg_",
|
|
32
|
+
"__STitle": "___STitle_1ht85_gg_",
|
|
33
|
+
"__SDescription": "___SDescription_1ht85_gg_",
|
|
34
|
+
"__SHeader": "___SHeader_1ht85_gg_",
|
|
35
|
+
"__SFooter": "___SFooter_1ht85_gg_",
|
|
36
|
+
"__SBody": "___SBody_1ht85_gg_",
|
|
37
|
+
"__SSection": "___SSection_1ht85_gg_",
|
|
38
|
+
"__SFullscreenOverlay": "___SFullscreenOverlay_1ht85_gg_",
|
|
39
|
+
"__SBack": "___SBack_1ht85_gg_"
|
|
40
40
|
})
|
|
41
41
|
);
|
|
42
42
|
var FullscreenModalRoot = /* @__PURE__ */ (function(_Component) {
|
|
@@ -175,7 +175,9 @@ function Title(props) {
|
|
|
175
175
|
function Description(props) {
|
|
176
176
|
var _ref8 = arguments[0], _ref15;
|
|
177
177
|
var SDescription = Text;
|
|
178
|
-
return _ref15 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SDescription, _ref15.cn("SDescription", _objectSpread({}, assignProps({
|
|
178
|
+
return _ref15 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SDescription, _ref15.cn("SDescription", _objectSpread({}, assignProps({
|
|
179
|
+
"tag": "p"
|
|
180
|
+
}, _ref8))));
|
|
179
181
|
}
|
|
180
182
|
function Back(props) {
|
|
181
183
|
var _ref9 = arguments[0], _ref16;
|
|
@@ -55,9 +55,7 @@ SBackText {
|
|
|
55
55
|
|
|
56
56
|
STitle,
|
|
57
57
|
SDescription {
|
|
58
|
-
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
text-overflow: ellipsis;
|
|
58
|
+
overflow-wrap: break-word;
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
STitle {
|
|
@@ -68,35 +66,22 @@ STitle {
|
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
SDescription {
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: baseline;
|
|
73
69
|
font-size: var(--intergalactic-fs-100, 12px);
|
|
74
70
|
line-height: var(--intergalactic-lh-100, 133%);
|
|
75
71
|
color: var(--intergalactic-text-secondary, oklch(0.088 0.026 147.7 / 0.583));
|
|
76
|
-
|
|
77
|
-
&::before {
|
|
78
|
-
content: '';
|
|
79
|
-
position: relative;
|
|
80
|
-
top: var(--intergalactic-spacing-1x, 4px);
|
|
81
|
-
display: block;
|
|
82
|
-
margin-left: var(--intergalactic-spacing-3x, 12px);
|
|
83
|
-
margin-right: var(--intergalactic-spacing-3x, 12px);
|
|
84
|
-
height: 24px;
|
|
85
|
-
width: 1px;
|
|
86
|
-
background-color: var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
|
|
87
|
-
}
|
|
88
72
|
}
|
|
89
73
|
|
|
90
74
|
SHeader {
|
|
91
75
|
display: flex;
|
|
92
|
-
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
gap: var(--intergalactic-spacing-2x, 8px);
|
|
78
|
+
align-items: flex-start;
|
|
93
79
|
padding-left: var(--intergalactic-spacing-8x, 32px);
|
|
94
|
-
padding-bottom: var(--intergalactic-spacing-
|
|
80
|
+
padding-bottom: var(--intergalactic-spacing-4x, 16px);
|
|
95
81
|
padding-right: calc(
|
|
96
82
|
var(--intergalactic-spacing-20x, 80px) - var(--intergalactic-spacing-2x, 8px)
|
|
97
83
|
);
|
|
98
84
|
padding-top: var(--intergalactic-spacing-10x, 40px);
|
|
99
|
-
min-height: 76px;
|
|
100
85
|
box-shadow: inset 0 -1px 0 var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
|
|
101
86
|
box-sizing: border-box;
|
|
102
87
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import type { Flex, Box, BoxProps } from '@semcore/base-components';
|
|
1
2
|
import type Button from '@semcore/button';
|
|
2
|
-
import type { PropGetterFn,
|
|
3
|
-
import type { Flex, Box, BoxProps } from '@semcore/flex-box';
|
|
3
|
+
import type { PropGetterFn, Intergalactic } from '@semcore/core';
|
|
4
4
|
import type { ModalProps } from '@semcore/modal';
|
|
5
5
|
import type { Text } from '@semcore/typography';
|
|
6
6
|
|
|
7
|
-
/** @deprecated */
|
|
8
|
-
export interface IFullscreenModalProps extends FullscreenModalProps, UnknownProperties {}
|
|
9
7
|
export type FullscreenModalProps = ModalProps & {
|
|
10
8
|
/** Function that is invoked when hiding a component */
|
|
11
9
|
onClose?: (
|
|
@@ -14,10 +12,6 @@ export type FullscreenModalProps = ModalProps & {
|
|
|
14
12
|
) => void;
|
|
15
13
|
};
|
|
16
14
|
|
|
17
|
-
/** @deprecated */
|
|
18
|
-
export interface IFullscreenModalHeaderProps
|
|
19
|
-
extends FullscreenModalHeaderProps,
|
|
20
|
-
UnknownProperties {}
|
|
21
15
|
export type FullscreenModalHeaderProps = BoxProps & {
|
|
22
16
|
/** Title content displayed in the modal header */
|
|
23
17
|
title?: React.ReactNode;
|
|
@@ -25,8 +19,6 @@ export type FullscreenModalHeaderProps = BoxProps & {
|
|
|
25
19
|
description?: React.ReactNode;
|
|
26
20
|
};
|
|
27
21
|
|
|
28
|
-
/** @deprecated */
|
|
29
|
-
export interface IFullscreenModalContext extends FullscreenModalContext, UnknownProperties {}
|
|
30
22
|
export type FullscreenModalContext = {
|
|
31
23
|
getBackProps: PropGetterFn;
|
|
32
24
|
getCloseProps: PropGetterFn;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/fullscreen-modal",
|
|
3
3
|
"description": "Semrush FullscreenModal Component",
|
|
4
|
-
"version": "16.2.0
|
|
4
|
+
"version": "16.2.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/icon": "16.8.0
|
|
18
|
-
"@semcore/modal": "16.2.0
|
|
19
|
-
"@semcore/typography": "16.4.0
|
|
20
|
-
"@semcore/button": "16.1.0
|
|
21
|
-
"@semcore/flex-box": "16.1.0
|
|
17
|
+
"@semcore/icon": "16.8.0",
|
|
18
|
+
"@semcore/modal": "16.2.0",
|
|
19
|
+
"@semcore/typography": "16.4.0",
|
|
20
|
+
"@semcore/button": "16.1.0",
|
|
21
|
+
"@semcore/flex-box": "16.1.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@semcore/base-components": "^16.6.0
|
|
24
|
+
"@semcore/base-components": "^16.6.0"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"directory": "semcore/fullscreen-modal"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@semcore/core": "16.6.0
|
|
32
|
+
"@semcore/core": "16.6.0",
|
|
33
33
|
"@semcore/testing-utils": "1.0.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|