@redsift/design-system 9.0.0-alpha.1 → 9.0.0-alpha.11

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/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { useLocalizedStringFormatter, I18nProvider, useNumberFormatter } from '@react-aria/i18n';
2
2
  export { I18nProvider, useCollator, useDateFormatter, useFilter, useListFormatter, useLocale, useLocalizedStringFormatter, useNumberFormatter } from '@react-aria/i18n';
3
3
  export { SSRProvider, useIsSSR } from '@react-aria/ssr';
4
- import { rsiAsmLong, rsiBrandTrustLong, rsiCertificatesLong, rsiOndmarcLong, rsiRadarLong, rsiRojoDsLong, rsiVendorSecureLong, rsiRedSiftLong, mdiClose as mdiClose$1, mdiAlert, mdiCheckCircle, mdiAlertCircle, mdiInformation, mdiMenu, mdiCircleMedium as mdiCircleMedium$1, mdiChevronDown, mdiMenuOpen, mdiChevronUp, mdiCheckboxMarked, mdiMinusBox, mdiCheckboxBlankOutline, mdiPageLast, mdiKeyboardCaps, mdiRadioboxMarked, mdiRadioboxBlank } from '@redsift/icons';
4
+ import { rsiAsmHorizontal, rsiBrandTrustHorizontal, rsiCertificatesHorizontal, rsiOndmarcHorizontal, rsiPulseHorizontal, rsiRadarHorizontal, rsiRojoDsHorizontal, rsiVendorSecureHorizontal, rsiRedSiftHorizontal, mdiClose as mdiClose$1, mdiAlert, mdiCheckCircle, mdiAlertCircle, mdiInformation, mdiMenu, mdiCircleMedium as mdiCircleMedium$1, mdiChevronDown, mdiMenuOpen, mdiChevronUp, mdiCheckboxMarked, mdiMinusBox, mdiCheckboxBlankOutline, mdiPageLast, mdiKeyboardCaps, mdiRadioboxMarked, mdiRadioboxBlank } from '@redsift/icons';
5
5
  import * as React from 'react';
6
- import React__default, { useState, useEffect, forwardRef, useRef, useCallback, useContext, useMemo, useReducer, useLayoutEffect } from 'react';
6
+ import React__default, { useState, useEffect, forwardRef, useRef, useCallback, useContext, useReducer, useMemo, useLayoutEffect } from 'react';
7
7
  import classNames from 'classnames';
8
8
  import styled, { css, keyframes } from 'styled-components';
9
9
  import { useFocusRing } from '@react-aria/focus';
@@ -24,6 +24,7 @@ const Product = {
24
24
  'brand-trust': 'brand-trust',
25
25
  certificates: 'certificates',
26
26
  ondmarc: 'ondmarc',
27
+ pulse: 'pulse',
27
28
  radar: 'radar',
28
29
  'rojo-ds': 'rojo-ds',
29
30
  'vendor-secure': 'vendor-secure',
@@ -34,20 +35,22 @@ const ProductName = {
34
35
  'brand-trust': 'Brand Trust',
35
36
  certificates: 'Certificates',
36
37
  ondmarc: 'OnDMARC',
38
+ pulse: 'Pulse',
37
39
  radar: 'RADAR',
38
40
  'rojo-ds': 'ROJO DS',
39
41
  'vendor-secure': 'Vendor Secure',
40
42
  website: 'Website'
41
43
  };
42
44
  const ProductLogo = {
43
- asm: rsiAsmLong,
44
- 'brand-trust': rsiBrandTrustLong,
45
- certificates: rsiCertificatesLong,
46
- ondmarc: rsiOndmarcLong,
47
- radar: rsiRadarLong,
48
- 'rojo-ds': rsiRojoDsLong,
49
- 'vendor-secure': rsiVendorSecureLong,
50
- website: rsiRedSiftLong
45
+ asm: rsiAsmHorizontal,
46
+ 'brand-trust': rsiBrandTrustHorizontal,
47
+ certificates: rsiCertificatesHorizontal,
48
+ ondmarc: rsiOndmarcHorizontal,
49
+ pulse: rsiPulseHorizontal,
50
+ radar: rsiRadarHorizontal,
51
+ 'rojo-ds': rsiRojoDsHorizontal,
52
+ 'vendor-secure': rsiVendorSecureHorizontal,
53
+ website: rsiRedSiftHorizontal
51
54
  };
52
55
 
53
56
  /**
@@ -1464,7 +1467,8 @@ const DEFAULT_PROPS$L = {
1464
1467
  * For a semantic button that looks like a link, please use the LinkButton component.
1465
1468
  */
1466
1469
  const Button = /*#__PURE__*/forwardRef((props, ref) => {
1467
- const buttonRef = ref || useRef();
1470
+ const _ref = useRef();
1471
+ const buttonRef = ref || _ref;
1468
1472
  const {
1469
1473
  children,
1470
1474
  className,
@@ -1810,9 +1814,41 @@ const StyledFlexbox = styled.div`
1810
1814
  ${baseStyling}
1811
1815
  ${baseInternalSpacing}
1812
1816
  ${baseFlexbox}
1817
+
1818
+ ${_ref2 => {
1819
+ let {
1820
+ $divider
1821
+ } = _ref2;
1822
+ return $divider ? css`
1823
+ overflow: hidden;
1824
+ > *:not(:empty) {
1825
+ position: relative;
1826
+
1827
+ ::before {
1828
+ content: '';
1829
+ position: absolute;
1830
+ background-color: var(--redsift-color-neutral-lightgrey);
1831
+ inline-size: 1px;
1832
+ block-size: 100%;
1833
+ inset-inline-start: calc(${Math.max(1, $divider.colGap / 2)}px * -1);
1834
+ }
1835
+
1836
+ ::after {
1837
+ content: '';
1838
+ position: absolute;
1839
+ background-color: var(--redsift-color-neutral-lightgrey);
1840
+ inline-size: 200vw;
1841
+ block-size: 1px;
1842
+ inset-inline-start: -100vw;
1843
+ inset-block-start: calc(${Math.max(1, $divider.rowGap / 2)}px * -1);
1844
+ z-index: 0;
1845
+ }
1846
+ }
1847
+ ` : '';
1848
+ }}
1813
1849
  `;
1814
1850
 
1815
- const _excluded$I = ["children", "className"];
1851
+ const _excluded$I = ["children", "className", "divider", "gap"];
1816
1852
  const COMPONENT_NAME$I = 'Flexbox';
1817
1853
  const CLASSNAME$I = 'redsift-flex-box';
1818
1854
  const DEFAULT_PROPS$I = {
@@ -1825,12 +1861,16 @@ const DEFAULT_PROPS$I = {
1825
1861
  const Flexbox = /*#__PURE__*/forwardRef((props, ref) => {
1826
1862
  const {
1827
1863
  children,
1828
- className
1864
+ className,
1865
+ divider,
1866
+ gap
1829
1867
  } = props,
1830
1868
  forwardedProps = _objectWithoutProperties(props, _excluded$I);
1831
1869
  return /*#__PURE__*/React__default.createElement(StyledFlexbox, _extends$1({}, forwardedProps, {
1870
+ gap: divider ? `${divider.rowGap}px ${divider.colGap}px` : gap,
1832
1871
  className: classNames(Flexbox.className, className),
1833
- ref: ref
1872
+ ref: ref,
1873
+ $divider: divider
1834
1874
  }), children);
1835
1875
  });
1836
1876
  Flexbox.className = CLASSNAME$I;
@@ -1973,30 +2013,46 @@ const StyledAppBar = styled.header`
1973
2013
  color: var(--redsift-color-neutral-darkgrey);
1974
2014
  display: flex;
1975
2015
  flex-direction: row;
2016
+
1976
2017
  height: 92px;
2018
+ @media (max-width: 1080px) {
2019
+ height: 72px;
2020
+ }
2021
+
1977
2022
  justify-content: space-between;
1978
2023
  left: 0;
1979
- position: fixed;
2024
+ position: sticky;
1980
2025
  top: 0;
1981
2026
  z-index: var(--redsift-layout-z-index-header);
1982
2027
 
1983
2028
  ${_ref => {
1984
2029
  let {
1985
- $isSidePanelCollapsed
2030
+ $hasBorder
1986
2031
  } = _ref;
2032
+ return $hasBorder ? css`
2033
+ border-bottom: 2px solid #e1e1e1;
2034
+ ` : css`
2035
+ border-bottom: none;
2036
+ `;
2037
+ }}
2038
+
2039
+ ${_ref2 => {
2040
+ let {
2041
+ $isSidePanelCollapsed
2042
+ } = _ref2;
1987
2043
  return !$isSidePanelCollapsed ? css`
1988
2044
  transform: translate(250px);
1989
- width: calc(100% - 250px);
2045
+ width: calc(100vw - 250px);
1990
2046
  ` : css`
1991
2047
  transform: translate(64px);
1992
2048
  width: calc(100% - 64px);
1993
2049
  `;
1994
2050
  }}
1995
2051
 
1996
- ${_ref2 => {
2052
+ ${_ref3 => {
1997
2053
  let {
1998
2054
  $isLoaded
1999
- } = _ref2;
2055
+ } = _ref3;
2000
2056
  return $isLoaded ? css`
2001
2057
  transition: transform 0.25s ease-out, width 0.25s ease-out;
2002
2058
  ` : '';
@@ -2213,6 +2269,7 @@ const StyledAppSidePanel = styled.div`
2213
2269
  align-items: center;
2214
2270
  background-color: var(--redsift-side-navigation-color-background);
2215
2271
  border-right: 4px solid #e1e1e1;
2272
+ box-sizing: border-box;
2216
2273
  flex-direction: column;
2217
2274
  height: 100%;
2218
2275
  left: 0px;
@@ -2224,7 +2281,7 @@ const StyledAppSidePanel = styled.div`
2224
2281
  let {
2225
2282
  $variant
2226
2283
  } = _ref;
2227
- return $variant === AppSidePanelVariant.shrinked ? '64px' : '250px';
2284
+ return $variant === AppSidePanelVariant.shrinked ? '68px' : '254px';
2228
2285
  }};
2229
2286
  z-index: var(--redsift-layout-z-index-side-panel);
2230
2287
 
@@ -2239,7 +2296,12 @@ const StyledAppSidePanel = styled.div`
2239
2296
  }};
2240
2297
  margin-bottom: 16px;
2241
2298
  width: 100%;
2299
+
2242
2300
  height: 92px;
2301
+ @media (max-width: 1080px) {
2302
+ height: 72px;
2303
+ }
2304
+
2243
2305
  display: grid;
2244
2306
  justify-items: start;
2245
2307
  align-items: center;
@@ -2265,11 +2327,18 @@ const StyledAppSidePanel = styled.div`
2265
2327
  } = _ref3;
2266
2328
  return $variant === AppSidePanelVariant.shrinked ? '0' : '1';
2267
2329
  }};
2330
+
2268
2331
  height: 56px;
2332
+ @media (max-width: 1080px) {
2333
+ height: 36px;
2334
+ }
2269
2335
  }
2270
2336
 
2271
2337
  .redsift-app-side-panel-header__logo > img {
2272
2338
  max-height: 56px;
2339
+ @media (max-width: 1080px) {
2340
+ max-height: 36px;
2341
+ }
2273
2342
  max-width: 195px;
2274
2343
  }
2275
2344
 
@@ -2357,6 +2426,9 @@ const AppSidePanel = /*#__PURE__*/forwardRef((props, ref) => {
2357
2426
  iconButtonRef
2358
2427
  } = props,
2359
2428
  forwardedProps = _objectWithoutProperties(props, _excluded$F);
2429
+ const {
2430
+ width
2431
+ } = useWindowSize();
2360
2432
  const appContainerState = useContext(AppContainerContext);
2361
2433
  const stringFormatter = useLocalizedStringFormatter(intlMessages$3);
2362
2434
  useEffect(() => {
@@ -2381,12 +2453,12 @@ const AppSidePanel = /*#__PURE__*/forwardRef((props, ref) => {
2381
2453
  }, /*#__PURE__*/React__default.isValidElement(logo) ? logo : logo ? /*#__PURE__*/React__default.createElement("img", {
2382
2454
  src: logo.src,
2383
2455
  alt: logo.alt
2384
- }) : product ? /*#__PURE__*/React__default.createElement(Icon, {
2385
- icon: ProductLogo[product],
2456
+ }) : product && (typeof product === 'string' || product.logo) ? /*#__PURE__*/React__default.createElement(Icon, {
2457
+ icon: typeof product === 'string' ? ProductLogo[product] : product.logo,
2386
2458
  size: {
2387
- height: 41
2459
+ height: width && width > 1080 ? 41 : 36
2388
2460
  }
2389
- }) : null), appContainerState !== null && appContainerState !== void 0 && appContainerState.hasAppBar || onOpen ? /*#__PURE__*/React__default.createElement(IconButton, _extends$1({
2461
+ }) : null), /*#__PURE__*/React__default.createElement(IconButton, _extends$1({
2390
2462
  className: `${AppSidePanel.className}-header__expand-button`
2391
2463
  }, iconButtonProps, {
2392
2464
  "aria-label": stringFormatter.format('expand'),
@@ -2395,7 +2467,7 @@ const AppSidePanel = /*#__PURE__*/forwardRef((props, ref) => {
2395
2467
  ref: iconButtonRef,
2396
2468
  color: "question",
2397
2469
  isDisabled: computedVariant === 'standard'
2398
- })) : null), featuredElements ? /*#__PURE__*/React__default.createElement("div", {
2470
+ }))), featuredElements ? /*#__PURE__*/React__default.createElement("div", {
2399
2471
  className: `${AppSidePanel.className}__featured`
2400
2472
  }, featuredElements) : null, children);
2401
2473
  });
@@ -2450,6 +2522,7 @@ const StyledSideNavigationMenuItemIndicatorContainer = styled.div`
2450
2522
  min-width: 4px;
2451
2523
  `;
2452
2524
  const StyledSideNavigationMenuItemIndicator = styled.div`
2525
+ position: relative;
2453
2526
  width: 4px;
2454
2527
  height: 38px;
2455
2528
  border-radius: 0px 4px 4px 0px;
@@ -2568,10 +2641,11 @@ const StyledSideNavigationMenuItem = styled.a`
2568
2641
  */
2569
2642
 
2570
2643
  background-color: var(--redsift-side-navigation-color-background);
2571
- height: 30px;
2644
+ height: 38px;
2572
2645
  margin-bottom: 16px;
2646
+ margin-left: -4px;
2573
2647
  transition: padding 300ms ease-out;
2574
- padding: 5px 16px 5px ${$variant === SideNavigationMenuBarVariant.shrinked ? '12px' : '20px'};
2648
+ padding: 0 16px 0 ${$variant === SideNavigationMenuBarVariant.shrinked ? '16px' : '24px'};
2575
2649
 
2576
2650
  .redsift-icon.first {
2577
2651
  box-sizing: unset;
@@ -2608,6 +2682,7 @@ const BadgeVariant = {
2608
2682
  */
2609
2683
  const StyledBadge = styled.div`
2610
2684
  ${baseStyling}
2685
+ box-sizing: content-box;
2611
2686
 
2612
2687
  ${_ref => {
2613
2688
  let {
@@ -2833,8 +2908,6 @@ const StyledSideNavigationMenu = styled.div`
2833
2908
  } = _ref;
2834
2909
  return css`
2835
2910
  .redsift-side-navigation-menu__menu-container > button {
2836
- background-color: var(--redsift-side-navigation-color-background);
2837
- border: none;
2838
2911
  ${!$isDisabled ? css`
2839
2912
  &,
2840
2913
  .redsift-icon.first {
@@ -2847,6 +2920,8 @@ const StyledSideNavigationMenu = styled.div`
2847
2920
  }
2848
2921
  `}
2849
2922
  align-items: center;
2923
+ background-color: var(--redsift-side-navigation-color-background);
2924
+ border: none;
2850
2925
  border-radius: 0 4px 4px 0;
2851
2926
  display: flex;
2852
2927
  font-family: var(--redsift-typography-body-font-family);
@@ -2857,10 +2932,10 @@ const StyledSideNavigationMenu = styled.div`
2857
2932
  line-height: var(--redsift-typography-body-line-height);
2858
2933
  margin-left: -4px;
2859
2934
  transition: padding 300ms ease-out;
2860
- padding: 5px 16px 5px ${$variant === SideNavigationMenuBarVariant.shrinked ? '16px' : '24px'};
2935
+ padding: 0 16px 0 ${$variant === SideNavigationMenuBarVariant.shrinked ? '16px' : '24px'};
2861
2936
  text-decoration: none;
2862
2937
  text-transform: uppercase;
2863
- width: calc(100% + 4px);
2938
+ width: calc(100% + ${$variant === SideNavigationMenuBarVariant.shrinked ? '0px' : '4px'});
2864
2939
 
2865
2940
  :hover,
2866
2941
  :focus-visible {
@@ -2976,16 +3051,24 @@ const StyledSideNavigationMenu = styled.div`
2976
3051
  margin: unset;
2977
3052
  padding: unset;
2978
3053
  margin-left: -4px;
2979
- width: calc(100% + 4px);
3054
+
3055
+ ${_ref5 => {
3056
+ let {
3057
+ $variant
3058
+ } = _ref5;
3059
+ return css`
3060
+ width: calc(100% + ${$variant === SideNavigationMenuBarVariant.shrinked ? '0px' : '4px'});
3061
+ `;
3062
+ }}
2980
3063
  margin-bottom: 16px;
2981
3064
  max-width: 241px;
2982
3065
  transition: height 300ms ease-out;
2983
3066
  overflow: hidden;
2984
- ${_ref5 => {
3067
+ ${_ref6 => {
2985
3068
  let {
2986
3069
  $isExpanded,
2987
3070
  $numberOfChildren
2988
- } = _ref5;
3071
+ } = _ref6;
2989
3072
  return $isExpanded ? css`
2990
3073
  height: ${$numberOfChildren * 38}px;
2991
3074
  ` : css`
@@ -3019,7 +3102,9 @@ const SideNavigationMenuReducer = (state, action) => {
3019
3102
  /**
3020
3103
  * Component style.
3021
3104
  */
3022
- const StyledAppContainer = styled.div``;
3105
+ const StyledAppContainer = styled.div`
3106
+ box-sizing: content-box;
3107
+ `;
3023
3108
 
3024
3109
  const _excluded$C = ["children", "className", "locale", "product"];
3025
3110
  const COMPONENT_NAME$C = 'AppContainer';
@@ -3037,21 +3122,6 @@ const AppContainer = /*#__PURE__*/forwardRef((props, ref) => {
3037
3122
  product
3038
3123
  } = props,
3039
3124
  forwardedProps = _objectWithoutProperties(props, _excluded$C);
3040
- const {
3041
- hasAppBar,
3042
- hasAppSidePanel,
3043
- hasAppContent
3044
- } = useMemo(() => {
3045
- const [[appBar], [appSidePanel], [appContent]] = partitionComponents(React__default.Children.toArray(children), [isComponent('AppBar'), isComponent('AppSidePanel'), isComponent('AppContent')]);
3046
- return {
3047
- hasAppBar: Boolean(appBar),
3048
- hasAppSidePanel: Boolean(appSidePanel),
3049
- hasAppContent: Boolean(appContent)
3050
- };
3051
- }, [children]);
3052
- if ((hasAppBar || hasAppSidePanel || hasAppContent) && !(hasAppBar && hasAppSidePanel && hasAppContent)) {
3053
- console.warn('Missing AppSidePanel, AppBar or AppContent inside AppContainer. These components are meant to work together.');
3054
- }
3055
3125
  const [sidePanelVariant, setSidePanelVariant] = useState(AppSidePanelVariant.standard);
3056
3126
  const [breadcrumbs, setBreadcrumbs] = useState();
3057
3127
  const state = {
@@ -3061,9 +3131,6 @@ const AppContainer = /*#__PURE__*/forwardRef((props, ref) => {
3061
3131
  expandSidePanel() {
3062
3132
  setSidePanelVariant(AppSidePanelVariant.standard);
3063
3133
  },
3064
- hasAppBar,
3065
- hasAppSidePanel,
3066
- hasAppContent,
3067
3134
  setBreadcrumbs(breadcrumbs) {
3068
3135
  setBreadcrumbs(breadcrumbs);
3069
3136
  },
@@ -3428,6 +3495,7 @@ SideNavigationMenu.displayName = COMPONENT_NAME$B;
3428
3495
  */
3429
3496
  const StyledSideNavigationMenuBar = styled.nav`
3430
3497
  background-color: var(--redsift-side-navigation-color-background);
3498
+ box-sizing: content-box;
3431
3499
  overflow-x: hidden;
3432
3500
  overflow-y: auto;
3433
3501
  scrollbar-gutter: stable;
@@ -3927,6 +3995,7 @@ const DEFAULT_PROPS$x = {};
3927
3995
  * The AppBar component.
3928
3996
  */
3929
3997
  const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
3998
+ var _breadcrumbs$, _appContainerState$pr;
3930
3999
  const {
3931
4000
  breadcrumbs,
3932
4001
  children,
@@ -3937,12 +4006,19 @@ const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
3937
4006
  title: propsTitle
3938
4007
  } = props,
3939
4008
  forwardedProps = _objectWithoutProperties(props, _excluded$w);
4009
+ const [scroll, setScroll] = useState(false);
4010
+ useEffect(() => {
4011
+ window.addEventListener('scroll', () => {
4012
+ setScroll(window.scrollY > 8);
4013
+ });
4014
+ }, []);
3940
4015
  const {
3941
4016
  isLoaded
3942
4017
  } = useIsLoaded();
3943
4018
  const appContainerState = useContext(AppContainerContext);
3944
4019
  const stringFormatter = useLocalizedStringFormatter(intlMessages$4);
3945
4020
  return /*#__PURE__*/React__default.createElement(StyledAppBar, _extends$1({}, forwardedProps, {
4021
+ $hasBorder: scroll,
3946
4022
  $isLoaded: isLoaded,
3947
4023
  $isSidePanelCollapsed: appContainerState ? appContainerState.sidePanelVariant === AppSidePanelVariant.shrinked : true,
3948
4024
  className: classNames(AppBar.className, className),
@@ -3968,12 +4044,13 @@ const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
3968
4044
  }, propsTitle) : breadcrumbs ? /*#__PURE__*/React__default.createElement(Breadcrumbs, {
3969
4045
  "aria-label": "Breadcrumb"
3970
4046
  }, appContainerState && appContainerState.sidePanelVariant === AppSidePanelVariant.shrinked ? /*#__PURE__*/React__default.createElement(Breadcrumbs.Item, {
3971
- href: "/"
3972
- }, ProductName[appContainerState.product]) : null, breadcrumbs.map((breadcrumbItem, index) => /*#__PURE__*/React__default.createElement(Breadcrumbs.Item, _extends$1({
4047
+ href: "/",
4048
+ as: ((_breadcrumbs$ = breadcrumbs[0]) === null || _breadcrumbs$ === void 0 ? void 0 : _breadcrumbs$.as) || 'a'
4049
+ }, typeof appContainerState.product === 'string' ? ProductName[appContainerState.product] : (_appContainerState$pr = appContainerState.product) === null || _appContainerState$pr === void 0 ? void 0 : _appContainerState$pr.name) : null, breadcrumbs.map((breadcrumbItem, index) => /*#__PURE__*/React__default.createElement(Breadcrumbs.Item, _extends$1({
3973
4050
  key: index
3974
4051
  }, breadcrumbItem, {
3975
- isDisabled: breadcrumbItem.href === undefined,
3976
- as: index === breadcrumbs.length - 1 ? 'h1' : breadcrumbItem.href === undefined ? 'span' : 'a'
4052
+ isDisabled: breadcrumbItem.isDisabled || breadcrumbItem.href === undefined,
4053
+ as: index === breadcrumbs.length - 1 ? 'h1' : breadcrumbItem.href === undefined ? 'span' : breadcrumbItem.as || 'a'
3977
4054
  })))) : fallbackTitle ? /*#__PURE__*/React__default.createElement(Heading, {
3978
4055
  as: "h1"
3979
4056
  }, fallbackTitle) : null), /*#__PURE__*/React__default.createElement("div", {
@@ -3988,12 +4065,11 @@ AppBar.displayName = COMPONENT_NAME$x;
3988
4065
  * Component style.
3989
4066
  */
3990
4067
  const StyledAppContent = styled.main`
4068
+ padding: 16px 64px;
3991
4069
  ${baseContainer}
3992
4070
 
3993
4071
  box-sizing: border-box;
3994
- margin-top: 92px;
3995
4072
  min-height: calc(100vh - 92px);
3996
- padding: 16px 64px;
3997
4073
 
3998
4074
  @media screen and (max-width: 768px) {
3999
4075
  padding: 0px;
@@ -4004,11 +4080,11 @@ const StyledAppContent = styled.main`
4004
4080
  $isSidePanelCollapsed
4005
4081
  } = _ref;
4006
4082
  return !$isSidePanelCollapsed ? css`
4007
- transform: translate(250px);
4008
- width: calc(100% - 250px);
4083
+ transform: translate(254px);
4084
+ width: calc(100% - 254px);
4009
4085
  ` : css`
4010
- transform: translate(64px);
4011
- width: calc(100% - 64px);
4086
+ transform: translate(68px);
4087
+ width: calc(100% - 68px);
4012
4088
  `;
4013
4089
  }}
4014
4090
 
@@ -4022,7 +4098,7 @@ const StyledAppContent = styled.main`
4022
4098
  }}
4023
4099
  `;
4024
4100
 
4025
- const _excluded$v = ["children", "className", "product"];
4101
+ const _excluded$v = ["children", "className"];
4026
4102
  const COMPONENT_NAME$w = 'AppContent';
4027
4103
  const CLASSNAME$w = 'redsift-app-content';
4028
4104
  const DEFAULT_PROPS$w = {};
@@ -4033,8 +4109,7 @@ const DEFAULT_PROPS$w = {};
4033
4109
  const AppContent = /*#__PURE__*/forwardRef((props, ref) => {
4034
4110
  const {
4035
4111
  children,
4036
- className,
4037
- product
4112
+ className
4038
4113
  } = props,
4039
4114
  forwardedProps = _objectWithoutProperties(props, _excluded$v);
4040
4115
  const {
@@ -4044,7 +4119,6 @@ const AppContent = /*#__PURE__*/forwardRef((props, ref) => {
4044
4119
  return /*#__PURE__*/React__default.createElement(StyledAppContent, _extends$1({}, forwardedProps, {
4045
4120
  $isLoaded: isLoaded,
4046
4121
  $isSidePanelCollapsed: appContainerState ? appContainerState.sidePanelVariant === AppSidePanelVariant.shrinked : true,
4047
- $product: product,
4048
4122
  className: classNames(AppContent.className, className),
4049
4123
  ref: ref
4050
4124
  }), children);
@@ -4138,7 +4212,6 @@ const StyledCard = styled.div`
4138
4212
 
4139
4213
  display: flex;
4140
4214
  flex-direction: column;
4141
- padding: 16px;
4142
4215
 
4143
4216
  .redsift-card__header {
4144
4217
  align-items: flex-start;
@@ -4183,6 +4256,12 @@ const StyledCard = styled.div`
4183
4256
  * Component style.
4184
4257
  */
4185
4258
  const StyledCardHeader = styled.div`
4259
+ display: flex;
4260
+ flex-direction: column;
4261
+ width: 100%;
4262
+ ${baseStyling}
4263
+ ${baseFlexbox}
4264
+
4186
4265
  color: var(--redsift-color-neutral-black);
4187
4266
 
4188
4267
  .redsift-card-header__header {
@@ -4194,10 +4273,6 @@ const StyledCardHeader = styled.div`
4194
4273
 
4195
4274
  .redsift-icon {
4196
4275
  color: var(--redsift-color-neutral-black);
4197
- padding-right: 8px;
4198
- font-size: 30px;
4199
- line-height: 30px;
4200
- height: 30px;
4201
4276
  }
4202
4277
  }
4203
4278
 
@@ -4238,7 +4313,7 @@ const StyledSkeleton = styled.div`
4238
4313
  height: fit-content;
4239
4314
  width: fit-content;
4240
4315
 
4241
- > * {
4316
+ * {
4242
4317
  visibility: hidden;
4243
4318
  }
4244
4319
 
@@ -4438,7 +4513,7 @@ const Skeleton = Object.assign(BaseSkeleton, {
4438
4513
  Text: SkeletonText
4439
4514
  });
4440
4515
 
4441
- const _excluded$q = ["children", "className", "header", "headingProps", "icon", "isLoading", "subheader"];
4516
+ const _excluded$q = ["children", "className", "header", "headingProps", "icon", "iconProps", "isLoading", "subheader"];
4442
4517
  const COMPONENT_NAME$r = 'CardHeader';
4443
4518
  const CLASSNAME$r = 'redsift-card-header';
4444
4519
  const DEFAULT_PROPS$r = {};
@@ -4453,6 +4528,7 @@ const CardHeader = /*#__PURE__*/forwardRef((props, ref) => {
4453
4528
  header,
4454
4529
  headingProps,
4455
4530
  icon,
4531
+ iconProps,
4456
4532
  isLoading,
4457
4533
  subheader
4458
4534
  } = props,
@@ -4466,7 +4542,7 @@ const CardHeader = /*#__PURE__*/forwardRef((props, ref) => {
4466
4542
  }, /*#__PURE__*/React__default.createElement("div", {
4467
4543
  className: `${CardHeader.className}__subheader`
4468
4544
  }, subheader)) : null, header ? /*#__PURE__*/React__default.createElement(Skeleton.Text, {
4469
- variant: "h2",
4545
+ variant: (headingProps === null || headingProps === void 0 ? void 0 : headingProps.variant) || 'h2',
4470
4546
  isLoaded: !isLoading,
4471
4547
  marginTop: "10px",
4472
4548
  marginBottom: "10px"
@@ -4475,10 +4551,11 @@ const CardHeader = /*#__PURE__*/forwardRef((props, ref) => {
4475
4551
  color: "black",
4476
4552
  className: `${CardHeader.className}__header`,
4477
4553
  variant: "h2"
4478
- }, headingProps), icon ? /*#__PURE__*/React__default.createElement(Icon, {
4554
+ }, headingProps), icon ? /*#__PURE__*/React__default.createElement(Icon, _extends$1({
4479
4555
  icon: icon,
4480
- "aria-hidden": "true"
4481
- }) : null, header)) : null, children);
4556
+ "aria-hidden": "true",
4557
+ size: "large"
4558
+ }, iconProps)) : null, header)) : null, children);
4482
4559
  });
4483
4560
  CardHeader.className = CLASSNAME$r;
4484
4561
  CardHeader.defaultProps = DEFAULT_PROPS$r;
@@ -5353,7 +5430,7 @@ const StyledDetailedCardSection = styled.div`
5353
5430
 
5354
5431
  .redsift-detailed-card-section-header__title {
5355
5432
  font-size: 18px;
5356
- font-weight: 700;
5433
+ font-weight: 500;
5357
5434
  lineheight: 22px;
5358
5435
  padding: 6px 0px;
5359
5436
  }
@@ -5478,6 +5555,7 @@ const StyledDetailedCard = styled.div`
5478
5555
  background-color: var(--redsift-color-neutral-white);
5479
5556
  border-radius: 4px;
5480
5557
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
5558
+ box-sizing: content-box;
5481
5559
  padding: 16px;
5482
5560
 
5483
5561
  .redsift-detailed-card__banner {
@@ -5556,11 +5634,16 @@ const StyledPill = styled.div`
5556
5634
 
5557
5635
  padding: 2px 8px;
5558
5636
  text-align: center;
5559
- word-break: ${_ref => {
5637
+
5638
+ ${_ref => {
5560
5639
  let {
5561
5640
  $autoBreak
5562
5641
  } = _ref;
5563
- return $autoBreak ? 'break-word' : 'normal';
5642
+ return !$autoBreak ? css`
5643
+ text-wrap: nowrap;
5644
+ ` : css`
5645
+ word-break: break-word;
5646
+ `;
5564
5647
  }};
5565
5648
 
5566
5649
  ${_ref2 => {
@@ -9743,9 +9826,9 @@ const FocusWithinGroupReducer = (state, action) => {
9743
9826
  const currentTabStop = state.tabStops[index];
9744
9827
  return currentTabStop.isDisabled ? _objectSpread2(_objectSpread2({}, state), {}, {
9745
9828
  delayedAction: undefined
9746
- }) : selectTabStop(_objectSpread2(_objectSpread2({}, state), {}, {
9829
+ }, action.payload) : selectTabStop(_objectSpread2(_objectSpread2({}, state), {}, {
9747
9830
  delayedAction: undefined
9748
- }), currentTabStop, undefined, state.focusOnClick);
9831
+ }, action.payload), currentTabStop, undefined, state.focusOnClick);
9749
9832
  }
9750
9833
  case FocusWithinGroupActionType.BLUR_ON_LIST:
9751
9834
  {
@@ -9778,8 +9861,7 @@ const FocusWithinGroupReducer = (state, action) => {
9778
9861
  return _objectSpread2(_objectSpread2({}, state), action.payload);
9779
9862
  case FocusWithinGroupActionType.FILTER_LIST:
9780
9863
  return _objectSpread2(_objectSpread2({}, state), {}, {
9781
- selectedId: null,
9782
- activedescendant: ['', '']
9864
+ selectedId: null
9783
9865
  }, action.payload);
9784
9866
  case FocusWithinGroupActionType.DELAY_ACTION:
9785
9867
  return _objectSpread2(_objectSpread2({}, state), {}, {
@@ -10078,7 +10160,8 @@ const FocusWithinGroup = props => {
10078
10160
  loopAround,
10079
10161
  focusType,
10080
10162
  focusOnInit,
10081
- activedescendant
10163
+ activedescendant,
10164
+ maxOptionsLength
10082
10165
  } = props;
10083
10166
  const [state, dispatch] = useReducer(FocusWithinGroupReducer, _objectSpread2(_objectSpread2({}, FOCUS_WITHING_GROUP_INITIAL_STATE), {}, {
10084
10167
  direction,
@@ -10086,7 +10169,8 @@ const FocusWithinGroup = props => {
10086
10169
  loopAround,
10087
10170
  focusType,
10088
10171
  focusOnInit,
10089
- activedescendant
10172
+ activedescendant,
10173
+ maxOptionsLength
10090
10174
  }));
10091
10175
 
10092
10176
  // Update the options whenever they change:
@@ -10099,10 +10183,11 @@ const FocusWithinGroup = props => {
10099
10183
  loopAround: loopAround !== null && loopAround !== void 0 ? loopAround : FOCUS_WITHING_GROUP_INITIAL_STATE.loopAround,
10100
10184
  focusType: focusType !== null && focusType !== void 0 ? focusType : FOCUS_WITHING_GROUP_INITIAL_STATE.focusType,
10101
10185
  focusOnInit: focusOnInit !== null && focusOnInit !== void 0 ? focusOnInit : FOCUS_WITHING_GROUP_INITIAL_STATE.focusOnInit,
10102
- activedescendant: activedescendant !== null && activedescendant !== void 0 ? activedescendant : FOCUS_WITHING_GROUP_INITIAL_STATE.activedescendant
10186
+ activedescendant: activedescendant !== null && activedescendant !== void 0 ? activedescendant : FOCUS_WITHING_GROUP_INITIAL_STATE.activedescendant,
10187
+ maxOptionsLength: maxOptionsLength !== null && maxOptionsLength !== void 0 ? maxOptionsLength : FOCUS_WITHING_GROUP_INITIAL_STATE.maxOptionsLength
10103
10188
  }
10104
10189
  });
10105
- }, [direction, focusOnClick, focusOnInit, loopAround, focusType, activedescendant]);
10190
+ }, [direction, focusOnClick, focusOnInit, loopAround, focusType, activedescendant, maxOptionsLength]);
10106
10191
  const context = useMemo(() => ({
10107
10192
  state,
10108
10193
  dispatch
@@ -10301,10 +10386,43 @@ const StyledGrid = styled.div`
10301
10386
  } = _ref;
10302
10387
  return inline ? 'inline-grid' : 'grid';
10303
10388
  }};
10389
+ flex: 1;
10304
10390
 
10305
10391
  ${baseStyling}
10306
10392
  ${baseInternalSpacing}
10307
10393
  ${baseGrid}
10394
+
10395
+ ${_ref2 => {
10396
+ let {
10397
+ $divider
10398
+ } = _ref2;
10399
+ return $divider ? css`
10400
+ overflow: hidden;
10401
+ .redsift-grid-item:not(:empty) {
10402
+ position: relative;
10403
+
10404
+ ::before {
10405
+ content: '';
10406
+ position: absolute;
10407
+ background-color: var(--redsift-color-neutral-lightgrey);
10408
+ inline-size: 1px;
10409
+ block-size: 100%;
10410
+ inset-inline-start: calc(${Math.max(1, $divider.colGap / 2)}px * -1);
10411
+ }
10412
+
10413
+ ::after {
10414
+ content: '';
10415
+ position: absolute;
10416
+ background-color: var(--redsift-color-neutral-lightgrey);
10417
+ inline-size: 200vw;
10418
+ block-size: 1px;
10419
+ inset-inline-start: -100vw;
10420
+ inset-block-start: calc(${Math.max(1, $divider.rowGap / 2)}px * -1);
10421
+ z-index: 0;
10422
+ }
10423
+ }
10424
+ ` : '';
10425
+ }}
10308
10426
  `;
10309
10427
 
10310
10428
  /**
@@ -10340,7 +10458,7 @@ GridItem.className = CLASSNAME$b;
10340
10458
  GridItem.defaultProps = DEFAULT_PROPS$b;
10341
10459
  GridItem.displayName = COMPONENT_NAME$b;
10342
10460
 
10343
- const _excluded$c = ["children", "className"];
10461
+ const _excluded$c = ["children", "className", "divider", "gap"];
10344
10462
  const COMPONENT_NAME$a = 'Grid';
10345
10463
  const CLASSNAME$a = 'redsift-grid';
10346
10464
  const DEFAULT_PROPS$a = {};
@@ -10351,12 +10469,16 @@ const DEFAULT_PROPS$a = {};
10351
10469
  const BaseGrid = /*#__PURE__*/forwardRef((props, ref) => {
10352
10470
  const {
10353
10471
  children,
10354
- className
10472
+ className,
10473
+ divider,
10474
+ gap
10355
10475
  } = props,
10356
10476
  forwardedProps = _objectWithoutProperties(props, _excluded$c);
10357
10477
  return /*#__PURE__*/React__default.createElement(StyledGrid, _extends$1({}, forwardedProps, {
10478
+ gap: divider ? `${divider.rowGap}px ${divider.colGap}px` : gap,
10358
10479
  className: classNames(BaseGrid.className, className),
10359
- ref: ref
10480
+ ref: ref,
10481
+ $divider: divider
10360
10482
  }), children);
10361
10483
  });
10362
10484
  BaseGrid.className = CLASSNAME$a;
@@ -10370,9 +10492,9 @@ const Grid = Object.assign(BaseGrid, {
10370
10492
  * Component style.
10371
10493
  */
10372
10494
  const StyledItem = styled.div`
10373
- height: 20px;
10495
+ height: 36px;
10374
10496
  position: relative;
10375
- width: calc(100% - 32px);
10497
+ width: 100%;
10376
10498
  padding: 8px 16px;
10377
10499
 
10378
10500
  ${baseStyling}
@@ -10380,6 +10502,7 @@ const StyledItem = styled.div`
10380
10502
  align-items: center;
10381
10503
  background: none;
10382
10504
  border: none;
10505
+ box-sizing: border-box;
10383
10506
  display: inline-flex;
10384
10507
 
10385
10508
  ${_ref => {
@@ -12171,7 +12294,7 @@ const StyledTextField = styled.div`
12171
12294
  }}
12172
12295
  `;
12173
12296
 
12174
- const _excluded = ["aria-label", "aria-labelledby", "autoFocus", "className", "defaultValue", "hasClearButton", "after", "internal", "inputProps", "inputRef", "isColored", "isDisabled", "isInvalid", "isReadOnly", "isRequired", "label", "leftIcon", "name", "onBlur", "onChange", "onClear", "onFocus", "placeholder", "value", "variant"];
12297
+ const _excluded = ["aria-label", "aria-labelledby", "autoFocus", "className", "defaultValue", "hasClearButton", "after", "internal", "inputProps", "inputRef", "isColored", "isDisabled", "isInvalid", "isReadOnly", "isRequired", "label", "leftIcon", "name", "onBlur", "onChange", "onClear", "onFocus", "placeholder", "type", "value", "variant"];
12175
12298
  const COMPONENT_NAME = 'TextField';
12176
12299
  const CLASSNAME = 'redsift-text-field';
12177
12300
  const DEFAULT_PROPS = {
@@ -12209,6 +12332,7 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
12209
12332
  onClear,
12210
12333
  onFocus: onFocusProps,
12211
12334
  placeholder,
12335
+ type,
12212
12336
  value: propsValue,
12213
12337
  variant
12214
12338
  } = props,
@@ -12240,8 +12364,9 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
12240
12364
  }
12241
12365
  if (onChange) {
12242
12366
  onChange(event.target.value, name, event);
12367
+ } else {
12368
+ setValue(event.target.value);
12243
12369
  }
12244
- setValue(event.target.value);
12245
12370
  }, [onChange]);
12246
12371
  const handleClear = useCallback(() => {
12247
12372
  if (isDisabled || isReadOnly) {
@@ -12299,7 +12424,7 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
12299
12424
  onChange: handleChange,
12300
12425
  placeholder: placeholder,
12301
12426
  ref: inputRef,
12302
- type: "text",
12427
+ type: type,
12303
12428
  value: value
12304
12429
  })), hasClearButton || internal || after ? /*#__PURE__*/React__default.createElement(Flexbox, {
12305
12430
  className: `${TextField.className}-input-wrapper__toolbar`,
@@ -12315,12 +12440,12 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
12315
12440
  style: {
12316
12441
  borderLeft: '1px solid var(--redsift-color-neutral-midgrey)'
12317
12442
  }
12318
- }) : null, typeof after === 'function' ? after(value, isDisabled, isInvalid || isRequired && !value, isRequired) : after) : null, label ? /*#__PURE__*/React__default.createElement("fieldset", {
12443
+ }) : null, typeof after === 'function' ? after(value, isDisabled, isInvalid || isRequired && !value, isRequired) : after) : null, /*#__PURE__*/React__default.createElement("fieldset", {
12319
12444
  "aria-hidden": "true",
12320
12445
  className: `${TextField.className}-input-wrapper__fieldset`
12321
12446
  }, /*#__PURE__*/React__default.createElement("legend", {
12322
12447
  className: `${TextField.className}-input-wrapper-fieldset__legend`
12323
- }, /*#__PURE__*/React__default.createElement("span", null, label))) : null));
12448
+ }, label ? /*#__PURE__*/React__default.createElement("span", null, label) : null))));
12324
12449
  });
12325
12450
  TextField.className = CLASSNAME;
12326
12451
  TextField.defaultProps = DEFAULT_PROPS;