@crystaldesign/diva-core 25.16.0-rc.1 → 26.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { s as styleInject, u as useDivaCoreContext } from './index-833537d7.js';
1
+ import { s as styleInject, u as useDivaCoreContext } from './index-09afb072.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';
@@ -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":"25.16.0-rc.1"};
48
+ const env = {"STAGE":"production","VERSION":"26.1.0-beta.2"};
49
49
  try {
50
50
  if (process) {
51
51
  process.env = Object.assign({}, process.env);
@@ -9792,6 +9792,31 @@ var DrawerMenu = function DrawerMenu(_ref) {
9792
9792
  wrapperRef = _useSwipeToDismiss.wrapperRef;
9793
9793
  var iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);
9794
9794
  if (!(contentStore !== null && contentStore !== void 0 && contentStore.drawerMenu)) return /*#__PURE__*/jsx(Fragment, {});
9795
+ var paperProps = {
9796
+ className: classnames(drawerContent, direction === 'bottom' ? bottom : direction === 'left' ? left : direction === 'right' ? right : direction === 'top' ? top : undefined),
9797
+ style: _objectSpread$5({
9798
+ height: isVertical ? 'auto' : '100%',
9799
+ maxHeight: isVertical ? '85%' : undefined,
9800
+ maxWidth: maxWidth,
9801
+ position: 'absolute',
9802
+ borderTopRightRadius: ['bottom', 'left'].includes(direction) ? '10px' : '0px',
9803
+ borderTopLeftRadius: ['bottom', 'right'].includes(direction) ? '10px' : '0px',
9804
+ borderBottomRightRadius: ['top', 'right'].includes(direction) ? '10px' : '0px',
9805
+ borderBottomLeftRadius: ['top', 'left'].includes(direction) ? '10px' : '0px',
9806
+ display: 'flex',
9807
+ flexDirection: 'column',
9808
+ transform: isDragging ? "translate".concat(isVertical ? 'Y' : 'X', "(").concat(dragOffset, "px)") : undefined,
9809
+ transition: isDragging ? 'none' : 'transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1)',
9810
+ willChange: isDragging ? 'transform' : 'auto'
9811
+ }, drawerStyle),
9812
+ elevation: 0
9813
+ };
9814
+ var backdropProps = showOverlay ? {
9815
+ className: overlay,
9816
+ style: {
9817
+ position: 'absolute'
9818
+ }
9819
+ } : undefined;
9795
9820
  return /*#__PURE__*/jsxs(SwipeableDrawer, {
9796
9821
  anchor: anchor,
9797
9822
  open: !!isOpen,
@@ -9814,34 +9839,12 @@ var DrawerMenu = function DrawerMenu(_ref) {
9814
9839
  // Allow focus outside drawer when no overlay
9815
9840
  disableAutoFocus: !showOverlay // Don't auto-focus drawer content when no overlay
9816
9841
  },
9817
- slotProps: _objectSpread$5(_objectSpread$5({}, showOverlay ? {
9818
- backdrop: {
9819
- className: overlay,
9820
- style: {
9821
- position: 'absolute'
9822
- }
9823
- }
9824
- } : {}), {}, {
9825
- paper: {
9826
- className: classnames(drawerContent, direction === 'bottom' ? bottom : direction === 'left' ? left : direction === 'right' ? right : direction === 'top' ? top : undefined),
9827
- style: _objectSpread$5({
9828
- height: isVertical ? 'auto' : '100%',
9829
- maxHeight: isVertical ? '85%' : undefined,
9830
- maxWidth: maxWidth,
9831
- position: 'absolute',
9832
- borderTopRightRadius: ['bottom', 'left'].includes(direction) ? '10px' : '0px',
9833
- borderTopLeftRadius: ['bottom', 'right'].includes(direction) ? '10px' : '0px',
9834
- borderBottomRightRadius: ['top', 'right'].includes(direction) ? '10px' : '0px',
9835
- borderBottomLeftRadius: ['top', 'left'].includes(direction) ? '10px' : '0px',
9836
- display: 'flex',
9837
- flexDirection: 'column',
9838
- transform: isDragging ? "translate".concat(isVertical ? 'Y' : 'X', "(").concat(dragOffset, "px)") : undefined,
9839
- transition: isDragging ? 'none' : 'transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1)',
9840
- willChange: isDragging ? 'transform' : 'auto'
9841
- }, drawerStyle),
9842
- elevation: 0
9843
- }
9844
- }),
9842
+ PaperProps: paperProps,
9843
+ BackdropProps: backdropProps,
9844
+ slotProps: {
9845
+ backdrop: backdropProps,
9846
+ paper: paperProps
9847
+ },
9845
9848
  children: [isVertical && /*#__PURE__*/jsx("div", {
9846
9849
  className: drawerHandle,
9847
9850
  children: /*#__PURE__*/jsx("div", {
@@ -9893,7 +9896,7 @@ var DrawerMenu$1 = observer(DrawerMenu);
9893
9896
  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; }
9894
9897
  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; }
9895
9898
  var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
9896
- return import('./ModalsWrapper-71a2dfd3.js');
9899
+ return import('./ModalsWrapper-5af82ce7.js');
9897
9900
  });
9898
9901
  function Fullscreen(_ref) {
9899
9902
  var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
@@ -10353,10 +10356,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
10353
10356
  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; }
10354
10357
  var LOG$2 = getLogger('Framework', 'Root');
10355
10358
  var LazyAuth = /*#__PURE__*/React.lazy(function () {
10356
- return import('./index-012a5460.js');
10359
+ return import('./index-940eb1f6.js');
10357
10360
  });
10358
10361
  var LazyModals = /*#__PURE__*/React.lazy(function () {
10359
- return import('./ModalsWrapper-71a2dfd3.js');
10362
+ return import('./ModalsWrapper-5af82ce7.js');
10360
10363
  });
10361
10364
  function ContentComponent() {
10362
10365
  var context = useDivaCoreContext();
@@ -1,4 +1,4 @@
1
- import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-833537d7.js';
1
+ import { s as styleInject, u as useDivaCoreContext, g as getLogger } from './index-09afb072.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';
@@ -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, h as storyBookCoreMock, a as useDivaCore } from './index-833537d7.js';
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, h as storyBookCoreMock, a as useDivaCore } from './index-09afb072.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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/elements/DrawerMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;;;;AAqL5D,wBAAoC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/elements/DrawerMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;;;;AAyL5D,wBAAoC"}