@redsift/products 11.11.0-muiv5 → 12.0.0-muiv6

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/CONTRIBUTING.md CHANGED
@@ -62,10 +62,6 @@ The Design System is following a monorepo architecture, providing multiple packa
62
62
 
63
63
  This package provides ready-to-use implementation of components with a customize style to fit Red Sift's use cases. It is based on all other packages.
64
64
 
65
- - _Deprecated_ `@redsift/design-system-legacy`
66
-
67
- This package contains all components prior to the 6.0.0 version. These components are deprecated and contributing to this package is discouraged since it will be removed in the future.
68
-
69
65
  Please make sure to work inside the correct package when making contribution.
70
66
 
71
67
  If you need something inside more than one package, do not duplicate the code. Place it inside one package, export it from this package and import it inside the others.
@@ -410,8 +406,8 @@ yarn build:charts
410
406
  yarn build:dashboard
411
407
  yarn build:design-system
412
408
  yarn build:icons
413
- yarn build:legacy
414
409
  yarn build:table
410
+ yarn build:products
415
411
  ```
416
412
 
417
413
  ## Publishing a release
@@ -1,7 +1,7 @@
1
- import { a as _objectWithoutProperties, _ as _extends, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
1
+ import { b as _objectSpread2, a as _objectWithoutProperties, _ as _extends } from './_rollupPluginBabelHelpers.js';
2
2
  import * as React from 'react';
3
3
  import React__default, { useLayoutEffect, useEffect, useRef, forwardRef, useContext, useState, useCallback } from 'react';
4
- import { baseContainer, Theme, useBoundingClientRect, baseStyling, baseFlexbox, useId as useId$1, Skeleton, Heading, Icon, AppContainerContext, useTheme, useMessageFormatter, partitionComponents, isComponent, IconButton, ThemeProvider, Flexbox } from '@redsift/design-system';
4
+ import { baseContainer, Theme, getContainerStylingTransientProps, useBoundingClientRect, baseStyling, baseFlexbox, getStylingTransientProps, getFlexLayoutTransientProps, useId as useId$1, Skeleton, Heading, Icon, AppContainerContext, useTheme, useMessageFormatter, partitionComponents, isComponent, IconButton, ThemeProvider, Flexbox } from '@redsift/design-system';
5
5
  import styled, { css } from 'styled-components';
6
6
  import { mdiClose, rsiRedSiftHorizontal } from '@redsift/icons';
7
7
  import * as ReactDOM from 'react-dom';
@@ -6189,7 +6189,7 @@ const StyledDialogContentActions = styled.div`
6189
6189
  }
6190
6190
  `;
6191
6191
 
6192
- const _excluded$5 = ["children", "className", "flexDirection"];
6192
+ const _excluded$5 = ["children", "className"];
6193
6193
  const COMPONENT_NAME$5 = 'DialogContentActions';
6194
6194
  const CLASSNAME$5 = 'redsift-dialog-content-actions';
6195
6195
 
@@ -6197,19 +6197,23 @@ const CLASSNAME$5 = 'redsift-dialog-content-actions';
6197
6197
  * The DialogContentActions component.
6198
6198
  */
6199
6199
  const DialogContentActions = /*#__PURE__*/forwardRef((props, ref) => {
6200
+ const propsWithDefaults = _objectSpread2({
6201
+ flexDirection: 'row'
6202
+ }, props);
6203
+ const {
6204
+ transientProps,
6205
+ otherProps
6206
+ } = getContainerStylingTransientProps(propsWithDefaults);
6200
6207
  const {
6201
6208
  children,
6202
- className,
6203
- flexDirection = 'row'
6204
- } = props,
6205
- forwardedProps = _objectWithoutProperties(props, _excluded$5);
6209
+ className
6210
+ } = otherProps,
6211
+ forwardedProps = _objectWithoutProperties(otherProps, _excluded$5);
6206
6212
  const {
6207
6213
  actionsRef,
6208
6214
  initialFocus
6209
6215
  } = useDialogContext();
6210
- return /*#__PURE__*/React__default.createElement(StyledDialogContentActions, _extends({
6211
- flexDirection: flexDirection
6212
- }, forwardedProps, {
6216
+ return /*#__PURE__*/React__default.createElement(StyledDialogContentActions, _extends({}, forwardedProps, transientProps, {
6213
6217
  className: classNames(DialogContentActions.className, className),
6214
6218
  ref: useMergeRefs([ref, actionsRef]),
6215
6219
  tabIndex: initialFocus === 'actions' ? -1 : undefined
@@ -6225,15 +6229,12 @@ const StyledDialogContentBody = styled.div`
6225
6229
  ${baseContainer}
6226
6230
 
6227
6231
  overflow-y: auto;
6228
- ${_ref => {
6232
+ max-height: ${_ref => {
6229
6233
  let {
6230
- $marginTop,
6231
- $marginBottom
6234
+ $maxHeight
6232
6235
  } = _ref;
6233
- return css`
6234
- max-height: calc(100vh - ${$marginTop + $marginBottom}px);
6235
- `;
6236
- }}
6236
+ return $maxHeight;
6237
+ }};
6237
6238
 
6238
6239
  font-family: var(--redsift-typography-body-font-family);
6239
6240
  font-size: var(--redsift-typography-body-font-size);
@@ -6286,11 +6287,15 @@ const CLASSNAME$4 = 'redsift-dialog-content-body';
6286
6287
  * The DialogContentBody component.
6287
6288
  */
6288
6289
  const DialogContentBody = /*#__PURE__*/forwardRef((props, ref) => {
6290
+ const {
6291
+ transientProps,
6292
+ otherProps
6293
+ } = getContainerStylingTransientProps(props);
6289
6294
  const {
6290
6295
  children,
6291
6296
  className
6292
- } = props,
6293
- forwardedProps = _objectWithoutProperties(props, _excluded$4);
6297
+ } = otherProps,
6298
+ forwardedProps = _objectWithoutProperties(otherProps, _excluded$4);
6294
6299
  const {
6295
6300
  actionsRef,
6296
6301
  bodyRef,
@@ -6306,12 +6311,16 @@ const DialogContentBody = /*#__PURE__*/forwardRef((props, ref) => {
6306
6311
  } = useBoundingClientRect(actionsRef, [children, actionsRef]);
6307
6312
 
6308
6313
  /* istanbul ignore next */
6309
- return /*#__PURE__*/React__default.createElement(StyledDialogContentBody, _extends({}, forwardedProps, {
6314
+ const marginTop = Math.max(headerHeight, hasCloseButton ? 40 : 0) + 32;
6315
+ const marginBottom = (actionsHeight === 0 ? 0 : actionsHeight + 16) + 32;
6316
+ const maxHeight = `calc(100vh - ${marginTop + marginBottom}px)`;
6317
+ return /*#__PURE__*/React__default.createElement(StyledDialogContentBody, _extends({}, forwardedProps, transientProps, {
6310
6318
  className: classNames(DialogContentBody.className, className),
6311
6319
  ref: useMergeRefs([ref, bodyRef]),
6312
6320
  tabIndex: initialFocus === 'body' ? -1 : undefined,
6313
- $marginTop: Math.max(headerHeight, hasCloseButton ? 40 : 0) + 32,
6314
- $marginBottom: (actionsHeight === 0 ? 0 : actionsHeight + 16) + 32
6321
+ $marginTop: `${marginTop}px`,
6322
+ $marginBottom: `${marginBottom}px`,
6323
+ $maxHeight: maxHeight
6315
6324
  }), children);
6316
6325
  });
6317
6326
  DialogContentBody.className = CLASSNAME$4;
@@ -6351,6 +6360,18 @@ const CLASSNAME$3 = 'redsift-dialog-content-header';
6351
6360
  * The DialogContentHeader component.
6352
6361
  */
6353
6362
  const DialogContentHeader = /*#__PURE__*/forwardRef((props, ref) => {
6363
+ const propsWithDefaults = _objectSpread2({
6364
+ flexDirection: 'column'
6365
+ }, props);
6366
+ const {
6367
+ transientProps: stylingTransientProps,
6368
+ otherProps: propsWithoutStyling
6369
+ } = getStylingTransientProps(propsWithDefaults);
6370
+ const {
6371
+ transientProps: flexTransientProps,
6372
+ otherProps
6373
+ } = getFlexLayoutTransientProps(propsWithoutStyling);
6374
+ const transientProps = _objectSpread2(_objectSpread2({}, stylingTransientProps), flexTransientProps);
6354
6375
  const {
6355
6376
  children,
6356
6377
  className,
@@ -6361,8 +6382,8 @@ const DialogContentHeader = /*#__PURE__*/forwardRef((props, ref) => {
6361
6382
  isLoading,
6362
6383
  subheader,
6363
6384
  theme
6364
- } = props,
6365
- forwardedProps = _objectWithoutProperties(props, _excluded$3);
6385
+ } = otherProps,
6386
+ forwardedProps = _objectWithoutProperties(otherProps, _excluded$3);
6366
6387
  const {
6367
6388
  setLabelId,
6368
6389
  setDescriptionId,
@@ -6385,7 +6406,7 @@ const DialogContentHeader = /*#__PURE__*/forwardRef((props, ref) => {
6385
6406
  setDescriptionId(descriptionId);
6386
6407
  return () => setDescriptionId(undefined);
6387
6408
  }, [descriptionId, setDescriptionId]);
6388
- return /*#__PURE__*/React__default.createElement(StyledDialogContentHeader, _extends({}, forwardedProps, {
6409
+ return /*#__PURE__*/React__default.createElement(StyledDialogContentHeader, _extends({}, forwardedProps, transientProps, {
6389
6410
  className: classNames(DialogContentHeader.className, className),
6390
6411
  ref: useMergeRefs([ref, headerRef]),
6391
6412
  tabIndex: initialFocus === 'header' ? -1 : undefined