@alfalab/core-components-universal-modal 3.2.1 → 3.2.2-alfasans
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/components/base-content/index.css +2 -3
- package/components/base-content/index.module.css.js +1 -1
- package/components/base-footer/index.css +5 -7
- package/components/base-footer/index.module.css.js +1 -1
- package/components/base-header/index.css +4 -4
- package/components/base-header/index.module.css.js +1 -1
- package/cssm/components/base-content/index.module.css +1 -2
- package/cssm/components/base-footer/index.module.css +2 -4
- package/cssm/desktop/components/center-modal/center-modal.js +2 -1
- package/cssm/desktop/components/center-modal/center-modal.js.map +1 -1
- package/cssm/desktop/components/center-modal/index.module.css +1 -2
- package/cssm/desktop/components/footer/layout.module.css +3 -6
- package/cssm/desktop/components/header/desktop.module.css +14 -12
- package/cssm/desktop/components/side-modal/index.module.css +1 -2
- package/cssm/desktop/components/side-modal/side-modal.js +2 -1
- package/cssm/desktop/components/side-modal/side-modal.js.map +1 -1
- package/cssm/desktop/utils/get-hug-content-styles.d.ts +8 -0
- package/cssm/desktop/utils/get-hug-content-styles.js +19 -0
- package/cssm/desktop/utils/get-hug-content-styles.js.map +1 -0
- package/cssm/desktop/utils/get-margin-styles.d.ts +0 -1
- package/cssm/desktop/utils/get-margin-styles.js +8 -14
- package/cssm/desktop/utils/get-margin-styles.js.map +1 -1
- package/cssm/mobile/components/content/index.module.css +1 -2
- package/cssm/mobile/components/footer/index.module.css +1 -2
- package/cssm/mobile/components/footer/layout.mobile.module.css +1 -2
- package/cssm/mobile/components/header/index.module.css +13 -14
- package/desktop/components/center-modal/center-modal.js +2 -1
- package/desktop/components/center-modal/center-modal.js.map +1 -1
- package/desktop/components/center-modal/index.css +784 -785
- package/desktop/components/center-modal/index.module.css.js +1 -1
- package/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/desktop/components/footer/desktop.css +1 -1
- package/desktop/components/footer/desktop.module.css.js +1 -1
- package/desktop/components/footer/layout.css +12 -15
- package/desktop/components/footer/layout.module.css.js +1 -1
- package/desktop/components/header/desktop.css +19 -17
- package/desktop/components/header/desktop.module.css.js +1 -1
- package/desktop/components/modal-content/modal-content.css +4 -4
- package/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/desktop/components/side-modal/index.css +786 -787
- package/desktop/components/side-modal/index.module.css.js +1 -1
- package/desktop/components/side-modal/side-modal.js +2 -1
- package/desktop/components/side-modal/side-modal.js.map +1 -1
- package/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/desktop/utils/get-hug-content-styles.d.ts +8 -0
- package/desktop/utils/get-hug-content-styles.js +19 -0
- package/desktop/utils/get-hug-content-styles.js.map +1 -0
- package/desktop/utils/get-margin-styles.d.ts +0 -1
- package/desktop/utils/get-margin-styles.js +8 -14
- package/desktop/utils/get-margin-styles.js.map +1 -1
- package/esm/components/base-content/index.css +2 -3
- package/esm/components/base-content/index.module.css.js +1 -1
- package/esm/components/base-footer/index.css +5 -7
- package/esm/components/base-footer/index.module.css.js +1 -1
- package/esm/components/base-header/index.css +4 -4
- package/esm/components/base-header/index.module.css.js +1 -1
- package/esm/desktop/components/center-modal/center-modal.js +2 -1
- package/esm/desktop/components/center-modal/center-modal.js.map +1 -1
- package/esm/desktop/components/center-modal/index.css +784 -785
- package/esm/desktop/components/center-modal/index.module.css.js +1 -1
- package/esm/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/esm/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/esm/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/esm/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/esm/desktop/components/footer/desktop.css +1 -1
- package/esm/desktop/components/footer/desktop.module.css.js +1 -1
- package/esm/desktop/components/footer/layout.css +12 -15
- package/esm/desktop/components/footer/layout.module.css.js +1 -1
- package/esm/desktop/components/header/desktop.css +19 -17
- package/esm/desktop/components/header/desktop.module.css.js +1 -1
- package/esm/desktop/components/modal-content/modal-content.css +4 -4
- package/esm/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/esm/desktop/components/side-modal/index.css +786 -787
- package/esm/desktop/components/side-modal/index.module.css.js +1 -1
- package/esm/desktop/components/side-modal/side-modal.js +2 -1
- package/esm/desktop/components/side-modal/side-modal.js.map +1 -1
- package/esm/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/esm/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/esm/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/esm/desktop/utils/get-hug-content-styles.d.ts +8 -0
- package/esm/desktop/utils/get-hug-content-styles.js +15 -0
- package/esm/desktop/utils/get-hug-content-styles.js.map +1 -0
- package/esm/desktop/utils/get-margin-styles.d.ts +0 -1
- package/esm/desktop/utils/get-margin-styles.js +8 -14
- package/esm/desktop/utils/get-margin-styles.js.map +1 -1
- package/esm/mobile/components/content/index.css +4 -5
- package/esm/mobile/components/content/index.module.css.js +1 -1
- package/esm/mobile/components/footer/index.css +3 -4
- package/esm/mobile/components/footer/index.module.css.js +1 -1
- package/esm/mobile/components/footer/layout.mobile.css +10 -11
- package/esm/mobile/components/footer/layout.mobile.module.css.js +1 -1
- package/esm/mobile/components/header/index.css +16 -17
- package/esm/mobile/components/header/index.module.css.js +1 -1
- package/esm/mobile/mobile.css +3 -3
- package/esm/mobile/mobile.module.css.js +1 -1
- package/esm/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/esm/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/esm/mobile/transitions/transitions.mobile.css +7 -7
- package/esm/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/mobile/components/content/index.css +4 -5
- package/mobile/components/content/index.module.css.js +1 -1
- package/mobile/components/footer/index.css +3 -4
- package/mobile/components/footer/index.module.css.js +1 -1
- package/mobile/components/footer/layout.mobile.css +10 -11
- package/mobile/components/footer/layout.mobile.module.css.js +1 -1
- package/mobile/components/header/index.css +16 -17
- package/mobile/components/header/index.module.css.js +1 -1
- package/mobile/mobile.css +3 -3
- package/mobile/mobile.module.css.js +1 -1
- package/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/mobile/transitions/transitions.mobile.css +7 -7
- package/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/modern/components/base-content/index.css +2 -3
- package/modern/components/base-content/index.module.css.js +1 -1
- package/modern/components/base-footer/index.css +5 -7
- package/modern/components/base-footer/index.module.css.js +1 -1
- package/modern/components/base-header/index.css +4 -4
- package/modern/components/base-header/index.module.css.js +1 -1
- package/modern/desktop/components/center-modal/center-modal.js +3 -1
- package/modern/desktop/components/center-modal/center-modal.js.map +1 -1
- package/modern/desktop/components/center-modal/index.css +784 -785
- package/modern/desktop/components/center-modal/index.module.css.js +1 -1
- package/modern/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/modern/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/modern/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/modern/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/modern/desktop/components/footer/desktop.css +1 -1
- package/modern/desktop/components/footer/desktop.module.css.js +1 -1
- package/modern/desktop/components/footer/layout.css +12 -15
- package/modern/desktop/components/footer/layout.module.css.js +1 -1
- package/modern/desktop/components/header/desktop.css +19 -17
- package/modern/desktop/components/header/desktop.module.css.js +1 -1
- package/modern/desktop/components/modal-content/modal-content.css +4 -4
- package/modern/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/modern/desktop/components/side-modal/index.css +786 -787
- package/modern/desktop/components/side-modal/index.module.css.js +1 -1
- package/modern/desktop/components/side-modal/side-modal.js +3 -1
- package/modern/desktop/components/side-modal/side-modal.js.map +1 -1
- package/modern/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/modern/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/modern/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/modern/desktop/utils/get-hug-content-styles.d.ts +8 -0
- package/modern/desktop/utils/get-hug-content-styles.js +17 -0
- package/modern/desktop/utils/get-hug-content-styles.js.map +1 -0
- package/modern/desktop/utils/get-margin-styles.d.ts +0 -1
- package/modern/desktop/utils/get-margin-styles.js +11 -13
- package/modern/desktop/utils/get-margin-styles.js.map +1 -1
- package/modern/mobile/components/content/index.css +4 -5
- package/modern/mobile/components/content/index.module.css.js +1 -1
- package/modern/mobile/components/footer/index.css +3 -4
- package/modern/mobile/components/footer/index.module.css.js +1 -1
- package/modern/mobile/components/footer/layout.mobile.css +10 -11
- package/modern/mobile/components/footer/layout.mobile.module.css.js +1 -1
- package/modern/mobile/components/header/index.css +16 -17
- package/modern/mobile/components/header/index.module.css.js +1 -1
- package/modern/mobile/mobile.css +3 -3
- package/modern/mobile/mobile.module.css.js +1 -1
- package/modern/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/modern/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/modern/mobile/transitions/transitions.mobile.css +7 -7
- package/modern/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/moderncssm/desktop/components/center-modal/center-modal.js +3 -1
- package/moderncssm/desktop/components/center-modal/center-modal.js.map +1 -1
- package/moderncssm/desktop/components/header/desktop.module.css +8 -4
- package/moderncssm/desktop/components/side-modal/side-modal.js +3 -1
- package/moderncssm/desktop/components/side-modal/side-modal.js.map +1 -1
- package/moderncssm/desktop/utils/get-hug-content-styles.d.ts +8 -0
- package/moderncssm/desktop/utils/get-hug-content-styles.js +17 -0
- package/moderncssm/desktop/utils/get-hug-content-styles.js.map +1 -0
- package/moderncssm/desktop/utils/get-margin-styles.d.ts +0 -1
- package/moderncssm/desktop/utils/get-margin-styles.js +11 -13
- package/moderncssm/desktop/utils/get-margin-styles.js.map +1 -1
- package/moderncssm/mobile/components/header/index.module.css +6 -4
- package/package.json +9 -9
- package/src/desktop/components/center-modal/center-modal.tsx +3 -1
- package/src/desktop/components/side-modal/side-modal.tsx +3 -1
- package/src/desktop/utils/get-hug-content-styles.ts +24 -0
- package/src/desktop/utils/get-margin-styles.ts +11 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-hug-content-styles.js","sources":["../../src/desktop/utils/get-hug-content-styles.ts"],"sourcesContent":["import { hasOwnProperty } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\ninterface Params {\n styles: Record<string, string>;\n margin: UniversalModalDesktopProps['margin'];\n height: NonNullable<UniversalModalDesktopProps['height']>;\n}\n\nexport const getHugContentStyles = (params: Params): Record<string, boolean> => {\n const { margin, styles, height } = params;\n\n if (height !== 'hugContent') {\n return {};\n }\n\n return {\n [styles.hugContent]: true,\n ...(margin && hasOwnProperty(margin, 'top') && { [styles[`topGap-${margin.top}`]]: true }),\n ...(margin &&\n hasOwnProperty(margin, 'bottom') && { [styles[`bottomGap-${margin.bottom}`]]: true }),\n };\n};\n"],"names":["__assign","hasOwnProperty"],"mappings":";;;;;;;AAUO,IAAM,mBAAmB,GAAG,UAAC,MAAc,EAAA;;AACtC,IAAA,IAAA,MAAM,GAAqB,MAAM,CAAA,MAA3B,EAAE,MAAM,GAAa,MAAM,CAAA,MAAnB,EAAE,MAAM,GAAK,MAAM,OAAX;AAE9B,IAAA,IAAI,MAAM,KAAK,YAAY,EAAE;AACzB,QAAA,OAAO,EAAE;;AAGb,IAAA,OAAAA,cAAA,CAAAA,cAAA,EAAA,EAAA,GAAA,EAAA,EAAA,EAAA,CACK,MAAM,CAAC,UAAU,CAAA,GAAG,IAAI,EAAA,EAAA,IACrB,MAAM,IAAIC,mCAAc,CAAC,MAAM,EAAE,KAAK,CAAC,KAAM,EAAA,GAAA,EAAA,EAAA,EAAA,CAAC,MAAM,CAAC,SAAU,CAAA,MAAA,CAAA,MAAM,CAAC,GAAG,CAAE,CAAC,CAAA,GAAG,IAAI,EAAA,EAAA,CAAE,EAAC,GACtF,MAAM;AACN,QAAAA,mCAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAA,EAAA,GAAA,EAAA,EAAM,GAAC,MAAM,CAAC,oBAAa,MAAM,CAAC,MAAM,CAAE,CAAC,IAAG,IAAI,EAAA,EAAA,CAAE,EAC1F;AACN;;;;"}
|
|
@@ -2,7 +2,6 @@ import { type UniversalModalDesktopProps } from '../types/props';
|
|
|
2
2
|
interface Params {
|
|
3
3
|
styles: Record<string, string>;
|
|
4
4
|
margin: UniversalModalDesktopProps['margin'];
|
|
5
|
-
height: NonNullable<UniversalModalDesktopProps['height']>;
|
|
6
5
|
}
|
|
7
6
|
export declare const getMarginStyles: (params: Params) => Record<string, boolean>;
|
|
8
7
|
export {};
|
|
@@ -2,24 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var tslib = require('tslib');
|
|
5
6
|
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
6
7
|
|
|
7
8
|
var getMarginStyles = function (params) {
|
|
8
|
-
var _a;
|
|
9
|
-
var margin = params.margin, styles = params.styles
|
|
10
|
-
if (margin) {
|
|
11
|
-
|
|
12
|
-
return _a = {},
|
|
13
|
-
_a[styles["marginTop-".concat(margin.top)]] = coreComponentsShared.hasOwnProperty(margin, 'top'),
|
|
14
|
-
_a[styles["marginRight-".concat(margin.right)]] = coreComponentsShared.hasOwnProperty(margin, 'right'),
|
|
15
|
-
_a[styles["marginBottom-".concat(margin.bottom)]] = coreComponentsShared.hasOwnProperty(margin, 'bottom'),
|
|
16
|
-
_a[styles["marginLeft-".concat(margin.left)]] = coreComponentsShared.hasOwnProperty(margin, 'left'),
|
|
17
|
-
_a[styles.hugContent] = isHugContent,
|
|
18
|
-
_a[styles["topGap-".concat(margin.top)]] = isHugContent && coreComponentsShared.hasOwnProperty(margin, 'top'),
|
|
19
|
-
_a[styles["bottomGap-".concat(margin.bottom)]] = isHugContent && coreComponentsShared.hasOwnProperty(margin, 'bottom'),
|
|
20
|
-
_a;
|
|
9
|
+
var _a, _b, _c, _d;
|
|
10
|
+
var margin = params.margin, styles = params.styles;
|
|
11
|
+
if (!margin) {
|
|
12
|
+
return {};
|
|
21
13
|
}
|
|
22
|
-
return {}
|
|
14
|
+
return tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, (coreComponentsShared.hasOwnProperty(margin, 'top') && (_a = {}, _a[styles["marginTop-".concat(margin.top)]] = true, _a))), (coreComponentsShared.hasOwnProperty(margin, 'right') && (_b = {}, _b[styles["marginRight-".concat(margin.right)]] = true, _b))), (coreComponentsShared.hasOwnProperty(margin, 'bottom') && (_c = {},
|
|
15
|
+
_c[styles["marginBottom-".concat(margin.bottom)]] = true,
|
|
16
|
+
_c))), (coreComponentsShared.hasOwnProperty(margin, 'left') && (_d = {}, _d[styles["marginLeft-".concat(margin.left)]] = true, _d)));
|
|
23
17
|
};
|
|
24
18
|
|
|
25
19
|
exports.getMarginStyles = getMarginStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-margin-styles.js","sources":["../../src/desktop/utils/get-margin-styles.ts"],"sourcesContent":["import { hasOwnProperty } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\ninterface Params {\n styles: Record<string, string>;\n margin: UniversalModalDesktopProps['margin'];\n
|
|
1
|
+
{"version":3,"file":"get-margin-styles.js","sources":["../../src/desktop/utils/get-margin-styles.ts"],"sourcesContent":["import { hasOwnProperty } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\ninterface Params {\n styles: Record<string, string>;\n margin: UniversalModalDesktopProps['margin'];\n}\n\nexport const getMarginStyles = (params: Params): Record<string, boolean> => {\n const { margin, styles } = params;\n\n if (!margin) {\n return {};\n }\n\n return {\n ...(hasOwnProperty(margin, 'top') && { [styles[`marginTop-${margin.top}`]]: true }),\n ...(hasOwnProperty(margin, 'right') && { [styles[`marginRight-${margin.right}`]]: true }),\n ...(hasOwnProperty(margin, 'bottom') && {\n [styles[`marginBottom-${margin.bottom}`]]: true,\n }),\n ...(hasOwnProperty(margin, 'left') && { [styles[`marginLeft-${margin.left}`]]: true }),\n };\n};\n"],"names":["__assign","hasOwnProperty"],"mappings":";;;;;;;AASO,IAAM,eAAe,GAAG,UAAC,MAAc,EAAA;;IAClC,IAAA,MAAM,GAAa,MAAM,CAAA,MAAnB,EAAE,MAAM,GAAK,MAAM,CAAA,MAAX;IAEtB,IAAI,CAAC,MAAM,EAAE;AACT,QAAA,OAAO,EAAE;;IAGb,OACOA,cAAA,CAAAA,cAAA,CAAAA,cAAA,CAAAA,cAAA,CAAA,EAAA,GAACC,mCAAc,CAAC,MAAM,EAAE,KAAK,CAAC,KAAM,EAAA,GAAA,EAAA,EAAA,EAAA,CAAC,MAAM,CAAC,oBAAa,MAAM,CAAC,GAAG,CAAE,CAAC,CAAA,GAAG,IAAI,EAAE,EAAA,CAAA,EAC/E,GAACA,mCAAc,CAAC,MAAM,EAAE,OAAO,CAAC,KAAM,EAAA,GAAA,EAAA,EAAA,EAAA,CAAC,MAAM,CAAC,cAAA,CAAA,MAAA,CAAe,MAAM,CAAC,KAAK,CAAE,CAAC,CAAG,GAAA,IAAI,EAAE,EAAA,CAAA,EACrF,GAACA,mCAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAA,EAAA,GAAA,EAAA;QAChC,EAAC,CAAA,MAAM,CAAC,eAAgB,CAAA,MAAA,CAAA,MAAM,CAAC,MAAM,CAAE,CAAC,CAAA,GAAG,IAAI;WAClD,EAAC,GACEA,mCAAc,CAAC,MAAM,EAAE,MAAM,CAAC,KAAA,EAAA,GAAA,EAAA,EAAM,EAAC,CAAA,MAAM,CAAC,aAAc,CAAA,MAAA,CAAA,MAAM,CAAC,IAAI,CAAE,CAAC,CAAG,GAAA,IAAI,EAAE,EAAA,CAAA,EACvF;AACN;;;;"}
|
|
@@ -3,17 +3,15 @@
|
|
|
3
3
|
--color-light-neutral-300: #e7e8eb;
|
|
4
4
|
}
|
|
5
5
|
:root {
|
|
6
|
-
--gap-
|
|
7
|
-
--gap-
|
|
8
|
-
--gap-16: var(--gap-m);
|
|
9
|
-
--gap-32: var(--gap-2xl);
|
|
6
|
+
--gap-16: 16px;
|
|
7
|
+
--gap-32: 32px;
|
|
10
8
|
}
|
|
11
9
|
:root {
|
|
12
10
|
--universal-modal-footer-background: var(--color-light-modal-bg-primary);
|
|
13
11
|
--universal-modal-footer-highlight-background: var(--color-light-modal-bg-primary);
|
|
14
12
|
--universal-modal-footer-highlight-box-shadow: 0 -1px 0 0 var(--color-light-neutral-300);
|
|
15
13
|
}
|
|
16
|
-
.universal-
|
|
14
|
+
.universal-modal__footer_46wrl {
|
|
17
15
|
width: 100%;
|
|
18
16
|
box-sizing: border-box;
|
|
19
17
|
transition:
|
|
@@ -21,12 +19,12 @@
|
|
|
21
19
|
background 0.2s ease;
|
|
22
20
|
padding: var(--gap-16) var(--gap-32) var(--gap-32);
|
|
23
21
|
}
|
|
24
|
-
.universal-
|
|
22
|
+
.universal-modal__sticky_46wrl {
|
|
25
23
|
background: var(--universal-modal-footer-background);
|
|
26
24
|
position: sticky;
|
|
27
25
|
z-index: 1;
|
|
28
26
|
}
|
|
29
|
-
.universal-
|
|
27
|
+
.universal-modal__highlighted_46wrl {
|
|
30
28
|
background: var(--universal-modal-footer-highlight-background);
|
|
31
29
|
box-shadow: var(--universal-modal-footer-highlight-box-shadow);
|
|
32
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"footer":"universal-
|
|
3
|
+
var styles = {"footer":"universal-modal__footer_46wrl","sticky":"universal-modal__sticky_46wrl","highlighted":"universal-modal__highlighted_46wrl"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
--universal-modal-header-highlight-background: var(--color-light-modal-bg-primary);
|
|
11
11
|
--universal-modal-header-highlight-box-shadow: 0 1px 0 0 var(--color-light-neutral-300);
|
|
12
12
|
}
|
|
13
|
-
.universal-
|
|
13
|
+
.universal-modal__header_19f9y {
|
|
14
14
|
width: 100%;
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
transition:
|
|
17
17
|
box-shadow 0.2s ease,
|
|
18
18
|
background 0.2s ease;
|
|
19
19
|
}
|
|
20
|
-
.universal-
|
|
20
|
+
.universal-modal__header_19f9y.universal-modal__highlighted_19f9y {
|
|
21
21
|
background: var(--universal-modal-header-highlight-background);
|
|
22
22
|
box-shadow: var(--universal-modal-header-highlight-box-shadow);
|
|
23
23
|
}
|
|
24
|
-
.universal-
|
|
24
|
+
.universal-modal__header_19f9y.universal-modal__sticky_19f9y {
|
|
25
25
|
position: sticky;
|
|
26
26
|
top: var(--gap-0);
|
|
27
27
|
z-index: 1;
|
|
28
28
|
}
|
|
29
|
-
.universal-
|
|
29
|
+
.universal-modal__header_19f9y.universal-modal__sticky_19f9y.universal-modal__hasContent_19f9y {
|
|
30
30
|
background: var(--universal-modal-header-background);
|
|
31
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"header":"universal-
|
|
3
|
+
var styles = {"header":"universal-modal__header_19f9y","highlighted":"universal-modal__highlighted_19f9y","sticky":"universal-modal__sticky_19f9y","hasContent":"universal-modal__hasContent_19f9y"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -6,6 +6,7 @@ import { isMacOS, isSafari } from '@alfalab/core-components-shared/esm';
|
|
|
6
6
|
import { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref.js';
|
|
7
7
|
import { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions.js';
|
|
8
8
|
import { getHeightStyle } from '../../utils/get-height-style.js';
|
|
9
|
+
import { getHugContentStyles } from '../../utils/get-hug-content-styles.js';
|
|
9
10
|
import { getMarginStyles } from '../../utils/get-margin-styles.js';
|
|
10
11
|
import { getWidthStyle } from '../../utils/get-width-style.js';
|
|
11
12
|
import { ModalContent } from '../modal-content/modal-content.js';
|
|
@@ -30,7 +31,7 @@ var CenterModal = forwardRef(function (props, ref) {
|
|
|
30
31
|
_a[styles.wrapperJustifyCenter] = verticalAlign === 'center',
|
|
31
32
|
_a[styles.wrapperJustifyEnd] = verticalAlign === 'bottom',
|
|
32
33
|
_a[styles.withoutOverlay] = withoutOverlay,
|
|
33
|
-
_a)), className: cn(styles.component, className, styles.baseModalComponent, __assign({}, getMarginStyles({ styles: styles, margin: margin, height: height }))), transitionProps: __assign(__assign({ classNames: transitionProps }, (isFullSizeModal && fullSizeModalContentTransitions)), restProps.transitionProps), backdropProps: __assign(__assign({ shouldRender: overlay }, (isFullSizeModal && fullSizeModalBackdropTransitions)), restProps.backdropProps), componentDivProps: {
|
|
34
|
+
_a)), className: cn(styles.component, className, styles.baseModalComponent, __assign(__assign({}, getMarginStyles({ styles: styles, margin: margin })), getHugContentStyles({ styles: styles, margin: margin, height: height }))), transitionProps: __assign(__assign({ classNames: transitionProps }, (isFullSizeModal && fullSizeModalContentTransitions)), restProps.transitionProps), backdropProps: __assign(__assign({ shouldRender: overlay }, (isFullSizeModal && fullSizeModalBackdropTransitions)), restProps.backdropProps), componentDivProps: {
|
|
34
35
|
style: __assign({ width: getWidthStyle(width, margin) }, getHeightStyle(height, margin)),
|
|
35
36
|
}, onWheel: handleWheel, onClose: onClose }),
|
|
36
37
|
React.createElement(ModalContent, { height: height, scrollableContainerRef: scrollableContainerRef }, children)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"center-modal.js","sources":["../../../../src/desktop/components/center-modal/center-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\nimport { isMacOS, isSafari } from '@alfalab/core-components-shared';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightStyle } from '../../utils/get-height-style';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthStyle } from '../../utils/get-width-style';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport styles from './index.module.css';\nimport safariTransitions from './transitions/safari-transitions.module.css';\nimport transitions from './transitions/transitions.module.css';\n\n// в safari некорректно отрабатывает transform:scale (???), поэтому применяем немного другую анимацию\nconst transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;\n\nexport const CenterModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n dataTestId,\n className,\n open,\n children,\n width = 500,\n height = 'hugContent',\n verticalAlign = 'center',\n overlay = true,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n\n const componentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n scrollHandler='content'\n scrollLock={overlay}\n wrapperClassName={cn(styles.baseModalContainer, {\n [styles.wrapperJustifyStart]: verticalAlign === 'top',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(styles.component, className, styles.baseModalComponent, {\n ...getMarginStyles({ styles, margin, height }),\n })}\n transitionProps={{\n classNames: transitionProps,\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: getWidthStyle(width, margin),\n ...getHeightStyle(height, margin),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"center-modal.js","sources":["../../../../src/desktop/components/center-modal/center-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\nimport { isMacOS, isSafari } from '@alfalab/core-components-shared';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightStyle } from '../../utils/get-height-style';\nimport { getHugContentStyles } from '../../utils/get-hug-content-styles';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthStyle } from '../../utils/get-width-style';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport styles from './index.module.css';\nimport safariTransitions from './transitions/safari-transitions.module.css';\nimport transitions from './transitions/transitions.module.css';\n\n// в safari некорректно отрабатывает transform:scale (???), поэтому применяем немного другую анимацию\nconst transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;\n\nexport const CenterModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n dataTestId,\n className,\n open,\n children,\n width = 500,\n height = 'hugContent',\n verticalAlign = 'center',\n overlay = true,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n\n const componentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n scrollHandler='content'\n scrollLock={overlay}\n wrapperClassName={cn(styles.baseModalContainer, {\n [styles.wrapperJustifyStart]: verticalAlign === 'top',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(styles.component, className, styles.baseModalComponent, {\n ...getMarginStyles({ styles, margin }),\n ...getHugContentStyles({ styles, margin, height }),\n })}\n transitionProps={{\n classNames: transitionProps,\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: getWidthStyle(width, margin),\n ...getHeightStyle(height, margin),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAmBA;AACA,IAAM,eAAe,GAAG,OAAO,EAAE,IAAI,QAAQ,EAAE,GAAG,iBAAiB,GAAG,WAAW;IAEpE,WAAW,GAAG,UAAU,CAA6C,UAAC,KAAK,EAAE,GAAG,EAAA;;AAErF,IAAA,IAAA,UAAU,GAYV,KAAK,CAZK,UAAA,EACV,SAAS,GAWT,KAAK,CAXI,SAAA,EACT,IAAI,GAUJ,KAAK,CAVD,IAAA,EACJ,QAAQ,GASR,KAAK,CATG,QAAA,EACR,KAQA,KAAK,CAAA,KARM,EAAX,KAAK,mBAAG,GAAG,GAAA,EAAA,EACX,EAAA,GAOA,KAAK,CAPgB,M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