@crystaldesign/diva-core 26.2.4-rc.0 → 26.2.4
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/build/esm/{ModalsWrapper-648320b1.js → ModalsWrapper-e8875fc3.js} +1 -1
- package/build/esm/{index-3d2aa1e9.js → index-1d11f5fb.js} +1 -1
- package/build/esm/{index-bee6acb8.js → index-d779ec92.js} +10 -8
- package/build/esm/index.js +1 -1
- package/build/types/core/src/utils/updateCssThemeVariables.d.ts +4 -2
- package/build/types/core/src/utils/updateCssThemeVariables.d.ts.map +1 -1
- package/build/umd/diva-core.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as styleInject, u as useDivaCoreContext } from './index-
|
|
1
|
+
import { s as styleInject, u as useDivaCoreContext } from './index-d779ec92.js';
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { observer } from 'mobx-react-lite';
|
|
4
4
|
import Button from '@mui/material/Button';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-
|
|
1
|
+
import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-d779ec92.js';
|
|
2
2
|
import { forwardRef, useState, useRef, useEffect, useMemo } from 'react';
|
|
3
3
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
@@ -45,7 +45,7 @@ import { actions } from '@storybook/addon-actions';
|
|
|
45
45
|
import * as Styles from '@mui/styles';
|
|
46
46
|
|
|
47
47
|
(function() {
|
|
48
|
-
const env = {"STAGE":"production","VERSION":"26.2.4
|
|
48
|
+
const env = {"STAGE":"production","VERSION":"26.2.4"};
|
|
49
49
|
try {
|
|
50
50
|
if (process) {
|
|
51
51
|
process.env = Object.assign({}, process.env);
|
|
@@ -2063,8 +2063,6 @@ var THEME_VARIABLES = [['--diva-theme-palette-primary-main', function (t) {
|
|
|
2063
2063
|
return t.palette.text.secondary;
|
|
2064
2064
|
}], ['--diva-typography-font-family', function (t) {
|
|
2065
2065
|
return t.typography.fontFamily;
|
|
2066
|
-
}], ['font-family', function (t) {
|
|
2067
|
-
return t.typography.fontFamily;
|
|
2068
2066
|
}]];
|
|
2069
2067
|
function applyToElement(element, theme) {
|
|
2070
2068
|
THEME_VARIABLES.forEach(function (_ref) {
|
|
@@ -2076,10 +2074,14 @@ function applyToElement(element, theme) {
|
|
|
2076
2074
|
}
|
|
2077
2075
|
|
|
2078
2076
|
/**
|
|
2079
|
-
* Applies theme
|
|
2080
|
-
* Body is included so portaled content (e.g. MUI Drawer without container) inherits
|
|
2077
|
+
* Applies theme CSS variables to the planner root and to document.body.
|
|
2078
|
+
* Body is included so portaled content (e.g. MUI Drawer without container) inherits CSS variables.
|
|
2079
|
+
* The raw `font-family` style is intentionally scoped to the planner root only,
|
|
2080
|
+
* so embedded integrations do not override the host page font.
|
|
2081
2081
|
*/
|
|
2082
2082
|
function updateCssThemeVariables (ref, theme) {
|
|
2083
|
+
applyToElement(ref, theme);
|
|
2084
|
+
ref.style.setProperty('font-family', theme.typography.fontFamily);
|
|
2083
2085
|
if (typeof document !== 'undefined') {
|
|
2084
2086
|
applyToElement(document.body, theme);
|
|
2085
2087
|
}
|
|
@@ -9932,7 +9934,7 @@ var DrawerMenu$1 = observer(DrawerMenu);
|
|
|
9932
9934
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9933
9935
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9934
9936
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9935
|
-
return import('./ModalsWrapper-
|
|
9937
|
+
return import('./ModalsWrapper-e8875fc3.js');
|
|
9936
9938
|
});
|
|
9937
9939
|
function Fullscreen(_ref) {
|
|
9938
9940
|
var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
|
|
@@ -10392,10 +10394,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
10392
10394
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10393
10395
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
10394
10396
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
10395
|
-
return import('./index-
|
|
10397
|
+
return import('./index-1d11f5fb.js');
|
|
10396
10398
|
});
|
|
10397
10399
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10398
|
-
return import('./ModalsWrapper-
|
|
10400
|
+
return import('./ModalsWrapper-e8875fc3.js');
|
|
10399
10401
|
});
|
|
10400
10402
|
function ContentComponent() {
|
|
10401
10403
|
var context = useDivaCoreContext();
|
package/build/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as AnalyticsHandler, A as AuthorizationHandler, e as ClientArticleHandler, C as Content, f as DivaMockProvider, D as DrawerMenuComponent, H as HelpButton, O as ONE_DAY_UNIX, d as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, b as default, g as getLogger, i as i18n, h as storyBookCoreMock, a as useDivaCore } from './index-
|
|
1
|
+
export { c as AnalyticsHandler, A as AuthorizationHandler, e as ClientArticleHandler, C as Content, f as DivaMockProvider, D as DrawerMenuComponent, H as HelpButton, O as ONE_DAY_UNIX, d as OrganizationHandler, P as ProductHandler, R as RequestStatus, S as SupportHandler, b as default, g as getLogger, i as i18n, h as storyBookCoreMock, a as useDivaCore } from './index-d779ec92.js';
|
|
2
2
|
export { DivaError, default as DivaUtils } from '@crystaldesign/diva-utils';
|
|
3
3
|
export { Trans, useTranslation } from 'react-i18next';
|
|
4
4
|
export * from '@crystaldesign/basket-model';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Theme } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* Applies theme
|
|
4
|
-
* Body is included so portaled content (e.g. MUI Drawer without container) inherits
|
|
3
|
+
* Applies theme CSS variables to the planner root and to document.body.
|
|
4
|
+
* Body is included so portaled content (e.g. MUI Drawer without container) inherits CSS variables.
|
|
5
|
+
* The raw `font-family` style is intentionally scoped to the planner root only,
|
|
6
|
+
* so embedded integrations do not override the host page font.
|
|
5
7
|
*/
|
|
6
8
|
export default function (ref: HTMLDivElement, theme: Theme): void;
|
|
7
9
|
//# sourceMappingURL=updateCssThemeVariables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateCssThemeVariables.d.ts","sourceRoot":"","sources":["../../../../../src/utils/updateCssThemeVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"updateCssThemeVariables.d.ts","sourceRoot":"","sources":["../../../../../src/utils/updateCssThemeVariables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAsBjC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,WAAW,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,QAOzD"}
|