@redsift/design-system 9.0.0-alpha.8 → 9.0.0-alpha.9
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.d.ts +2 -0
- package/index.js +50 -13
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -832,6 +832,7 @@ interface AppBarProps extends Omit<ComponentProps<'header'>, 'title'> {
|
|
|
832
832
|
title?: string | ReactElement;
|
|
833
833
|
}
|
|
834
834
|
type StyledAppBarProps = AppBarProps & {
|
|
835
|
+
$hasBorder: boolean;
|
|
835
836
|
$isLoaded: boolean;
|
|
836
837
|
$isSidePanelCollapsed: boolean;
|
|
837
838
|
};
|
|
@@ -1842,6 +1843,7 @@ type BaseFocusWithinGroupAction = {
|
|
|
1842
1843
|
type: FocusWithinGroupActionType.FOCUS_ON_LIST;
|
|
1843
1844
|
payload: {
|
|
1844
1845
|
id: TabStop['id'];
|
|
1846
|
+
filter?: FocusWithinGroupState['filter'];
|
|
1845
1847
|
};
|
|
1846
1848
|
} | {
|
|
1847
1849
|
type: FocusWithinGroupActionType.BLUR_ON_LIST;
|
package/index.js
CHANGED
|
@@ -1974,7 +1974,12 @@ const StyledAppBar = styled.header`
|
|
|
1974
1974
|
color: var(--redsift-color-neutral-darkgrey);
|
|
1975
1975
|
display: flex;
|
|
1976
1976
|
flex-direction: row;
|
|
1977
|
+
|
|
1977
1978
|
height: 92px;
|
|
1979
|
+
@media (max-width: 1080px) {
|
|
1980
|
+
height: 72px;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1978
1983
|
justify-content: space-between;
|
|
1979
1984
|
left: 0;
|
|
1980
1985
|
position: sticky;
|
|
@@ -1983,21 +1988,32 @@ const StyledAppBar = styled.header`
|
|
|
1983
1988
|
|
|
1984
1989
|
${_ref => {
|
|
1985
1990
|
let {
|
|
1986
|
-
$
|
|
1991
|
+
$hasBorder
|
|
1987
1992
|
} = _ref;
|
|
1993
|
+
return $hasBorder ? css`
|
|
1994
|
+
border-bottom: 2px solid #e1e1e1;
|
|
1995
|
+
` : css`
|
|
1996
|
+
border-bottom: none;
|
|
1997
|
+
`;
|
|
1998
|
+
}}
|
|
1999
|
+
|
|
2000
|
+
${_ref2 => {
|
|
2001
|
+
let {
|
|
2002
|
+
$isSidePanelCollapsed
|
|
2003
|
+
} = _ref2;
|
|
1988
2004
|
return !$isSidePanelCollapsed ? css`
|
|
1989
2005
|
transform: translate(250px);
|
|
1990
|
-
width: calc(
|
|
2006
|
+
width: calc(100vw - 250px);
|
|
1991
2007
|
` : css`
|
|
1992
2008
|
transform: translate(64px);
|
|
1993
2009
|
width: calc(100% - 64px);
|
|
1994
2010
|
`;
|
|
1995
2011
|
}}
|
|
1996
2012
|
|
|
1997
|
-
${
|
|
2013
|
+
${_ref3 => {
|
|
1998
2014
|
let {
|
|
1999
2015
|
$isLoaded
|
|
2000
|
-
} =
|
|
2016
|
+
} = _ref3;
|
|
2001
2017
|
return $isLoaded ? css`
|
|
2002
2018
|
transition: transform 0.25s ease-out, width 0.25s ease-out;
|
|
2003
2019
|
` : '';
|
|
@@ -2241,7 +2257,12 @@ const StyledAppSidePanel = styled.div`
|
|
|
2241
2257
|
}};
|
|
2242
2258
|
margin-bottom: 16px;
|
|
2243
2259
|
width: 100%;
|
|
2260
|
+
|
|
2244
2261
|
height: 92px;
|
|
2262
|
+
@media (max-width: 1080px) {
|
|
2263
|
+
height: 72px;
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2245
2266
|
display: grid;
|
|
2246
2267
|
justify-items: start;
|
|
2247
2268
|
align-items: center;
|
|
@@ -2267,11 +2288,18 @@ const StyledAppSidePanel = styled.div`
|
|
|
2267
2288
|
} = _ref3;
|
|
2268
2289
|
return $variant === AppSidePanelVariant.shrinked ? '0' : '1';
|
|
2269
2290
|
}};
|
|
2291
|
+
|
|
2270
2292
|
height: 56px;
|
|
2293
|
+
@media (max-width: 1080px) {
|
|
2294
|
+
height: 36px;
|
|
2295
|
+
}
|
|
2271
2296
|
}
|
|
2272
2297
|
|
|
2273
2298
|
.redsift-app-side-panel-header__logo > img {
|
|
2274
2299
|
max-height: 56px;
|
|
2300
|
+
@media (max-width: 1080px) {
|
|
2301
|
+
max-height: 36px;
|
|
2302
|
+
}
|
|
2275
2303
|
max-width: 195px;
|
|
2276
2304
|
}
|
|
2277
2305
|
|
|
@@ -2359,6 +2387,9 @@ const AppSidePanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2359
2387
|
iconButtonRef
|
|
2360
2388
|
} = props,
|
|
2361
2389
|
forwardedProps = _objectWithoutProperties(props, _excluded$F);
|
|
2390
|
+
const {
|
|
2391
|
+
width
|
|
2392
|
+
} = useWindowSize();
|
|
2362
2393
|
const appContainerState = useContext(AppContainerContext);
|
|
2363
2394
|
const stringFormatter = useLocalizedStringFormatter(intlMessages$3);
|
|
2364
2395
|
useEffect(() => {
|
|
@@ -2386,7 +2417,7 @@ const AppSidePanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2386
2417
|
}) : product ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
2387
2418
|
icon: ProductLogo[product],
|
|
2388
2419
|
size: {
|
|
2389
|
-
height: 41
|
|
2420
|
+
height: width && width > 1080 ? 41 : 36
|
|
2390
2421
|
}
|
|
2391
2422
|
}) : null), /*#__PURE__*/React__default.createElement(IconButton, _extends$1({
|
|
2392
2423
|
className: `${AppSidePanel.className}-header__expand-button`
|
|
@@ -2452,6 +2483,7 @@ const StyledSideNavigationMenuItemIndicatorContainer = styled.div`
|
|
|
2452
2483
|
min-width: 4px;
|
|
2453
2484
|
`;
|
|
2454
2485
|
const StyledSideNavigationMenuItemIndicator = styled.div`
|
|
2486
|
+
position: relative;
|
|
2455
2487
|
width: 4px;
|
|
2456
2488
|
height: 38px;
|
|
2457
2489
|
border-radius: 0px 4px 4px 0px;
|
|
@@ -2574,7 +2606,7 @@ const StyledSideNavigationMenuItem = styled.a`
|
|
|
2574
2606
|
margin-bottom: 16px;
|
|
2575
2607
|
margin-left: -4px;
|
|
2576
2608
|
transition: padding 300ms ease-out;
|
|
2577
|
-
padding:
|
|
2609
|
+
padding: 0 16px 0 ${$variant === SideNavigationMenuBarVariant.shrinked ? '16px' : '24px'};
|
|
2578
2610
|
|
|
2579
2611
|
.redsift-icon.first {
|
|
2580
2612
|
box-sizing: unset;
|
|
@@ -2861,7 +2893,7 @@ const StyledSideNavigationMenu = styled.div`
|
|
|
2861
2893
|
line-height: var(--redsift-typography-body-line-height);
|
|
2862
2894
|
margin-left: -4px;
|
|
2863
2895
|
transition: padding 300ms ease-out;
|
|
2864
|
-
padding:
|
|
2896
|
+
padding: 0 16px 0 ${$variant === SideNavigationMenuBarVariant.shrinked ? '16px' : '24px'};
|
|
2865
2897
|
text-decoration: none;
|
|
2866
2898
|
text-transform: uppercase;
|
|
2867
2899
|
width: calc(100% + ${$variant === SideNavigationMenuBarVariant.shrinked ? '0px' : '4px'});
|
|
@@ -3935,12 +3967,19 @@ const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3935
3967
|
title: propsTitle
|
|
3936
3968
|
} = props,
|
|
3937
3969
|
forwardedProps = _objectWithoutProperties(props, _excluded$w);
|
|
3970
|
+
const [scroll, setScroll] = useState(false);
|
|
3971
|
+
useEffect(() => {
|
|
3972
|
+
window.addEventListener('scroll', () => {
|
|
3973
|
+
setScroll(window.scrollY > 8);
|
|
3974
|
+
});
|
|
3975
|
+
}, []);
|
|
3938
3976
|
const {
|
|
3939
3977
|
isLoaded
|
|
3940
3978
|
} = useIsLoaded();
|
|
3941
3979
|
const appContainerState = useContext(AppContainerContext);
|
|
3942
3980
|
const stringFormatter = useLocalizedStringFormatter(intlMessages$4);
|
|
3943
3981
|
return /*#__PURE__*/React__default.createElement(StyledAppBar, _extends$1({}, forwardedProps, {
|
|
3982
|
+
$hasBorder: scroll,
|
|
3944
3983
|
$isLoaded: isLoaded,
|
|
3945
3984
|
$isSidePanelCollapsed: appContainerState ? appContainerState.sidePanelVariant === AppSidePanelVariant.shrinked : true,
|
|
3946
3985
|
className: classNames(AppBar.className, className),
|
|
@@ -5352,7 +5391,7 @@ const StyledDetailedCardSection = styled.div`
|
|
|
5352
5391
|
|
|
5353
5392
|
.redsift-detailed-card-section-header__title {
|
|
5354
5393
|
font-size: 18px;
|
|
5355
|
-
font-weight:
|
|
5394
|
+
font-weight: 500;
|
|
5356
5395
|
lineheight: 22px;
|
|
5357
5396
|
padding: 6px 0px;
|
|
5358
5397
|
}
|
|
@@ -9748,9 +9787,9 @@ const FocusWithinGroupReducer = (state, action) => {
|
|
|
9748
9787
|
const currentTabStop = state.tabStops[index];
|
|
9749
9788
|
return currentTabStop.isDisabled ? _objectSpread2(_objectSpread2({}, state), {}, {
|
|
9750
9789
|
delayedAction: undefined
|
|
9751
|
-
}) : selectTabStop(_objectSpread2(_objectSpread2({}, state), {}, {
|
|
9790
|
+
}, action.payload) : selectTabStop(_objectSpread2(_objectSpread2({}, state), {}, {
|
|
9752
9791
|
delayedAction: undefined
|
|
9753
|
-
}), currentTabStop, undefined, state.focusOnClick);
|
|
9792
|
+
}, action.payload), currentTabStop, undefined, state.focusOnClick);
|
|
9754
9793
|
}
|
|
9755
9794
|
case FocusWithinGroupActionType.BLUR_ON_LIST:
|
|
9756
9795
|
{
|
|
@@ -9783,8 +9822,7 @@ const FocusWithinGroupReducer = (state, action) => {
|
|
|
9783
9822
|
return _objectSpread2(_objectSpread2({}, state), action.payload);
|
|
9784
9823
|
case FocusWithinGroupActionType.FILTER_LIST:
|
|
9785
9824
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
9786
|
-
selectedId: null
|
|
9787
|
-
activedescendant: ['', '']
|
|
9825
|
+
selectedId: null
|
|
9788
9826
|
}, action.payload);
|
|
9789
9827
|
case FocusWithinGroupActionType.DELAY_ACTION:
|
|
9790
9828
|
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
@@ -10307,7 +10345,6 @@ const StyledGrid = styled.div`
|
|
|
10307
10345
|
return inline ? 'inline-grid' : 'grid';
|
|
10308
10346
|
}};
|
|
10309
10347
|
flex: 1;
|
|
10310
|
-
max-width: fit-content;
|
|
10311
10348
|
|
|
10312
10349
|
${baseStyling}
|
|
10313
10350
|
${baseInternalSpacing}
|