@7shifts/sous-chef 3.44.17 → 3.45.1
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/dist/index.css +195 -158
- package/dist/index.d.ts +1 -0
- package/dist/index.js +38 -16
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +38 -16
- package/dist/index.modern.js.map +1 -1
- package/dist/lists/Accordion/AccordionContext.d.ts +7 -0
- package/dist/typography/Text/Text.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './foundation/tokens/typography/_typography-tokens.scss';
|
|
2
2
|
import './foundation/tokens/color/_color-tokens.scss';
|
|
3
|
+
import './foundation/tokens/border-radius/_border-radius.scss';
|
|
3
4
|
import './foundation/tokens/zindex/_z-index-tokens.scss';
|
|
4
5
|
import './foundation/_initital-setup.scss';
|
|
5
6
|
export * from './foundation/tokens/color/color-constants';
|
package/dist/index.js
CHANGED
|
@@ -5834,7 +5834,7 @@ var LINK_TARGET = {
|
|
|
5834
5834
|
BLANK: '_blank'
|
|
5835
5835
|
};
|
|
5836
5836
|
|
|
5837
|
-
var styles$8 = {"link
|
|
5837
|
+
var styles$8 = {"link":"_36SZq"};
|
|
5838
5838
|
|
|
5839
5839
|
var _excluded$2q = ["href", "target", "theme", "onClick", "children"];
|
|
5840
5840
|
var Link = function Link(_ref) {
|
|
@@ -6002,18 +6002,28 @@ var useModalContext = function useModalContext() {
|
|
|
6002
6002
|
return context || {};
|
|
6003
6003
|
};
|
|
6004
6004
|
|
|
6005
|
+
var AccordionContext = React.createContext({
|
|
6006
|
+
isAccordionMounted: false
|
|
6007
|
+
});
|
|
6008
|
+
var useAccordionContext = function useAccordionContext() {
|
|
6009
|
+
var context = React.useContext(AccordionContext);
|
|
6010
|
+
return context || {};
|
|
6011
|
+
};
|
|
6012
|
+
|
|
6005
6013
|
var useBackgroundColor = function useBackgroundColor() {
|
|
6006
6014
|
var _useModalContext = useModalContext(),
|
|
6007
6015
|
isInsideModal = _useModalContext.isModalMounted;
|
|
6016
|
+
var _useAccordionContext = useAccordionContext(),
|
|
6017
|
+
isInsideAccordion = _useAccordionContext.isAccordionMounted;
|
|
6008
6018
|
var _useState = React.useState(COLORS.white),
|
|
6009
6019
|
backgroundColor = _useState[0],
|
|
6010
6020
|
setBackgroundColor = _useState[1];
|
|
6011
6021
|
React.useLayoutEffect(function () {
|
|
6012
|
-
if (!isInsideModal) {
|
|
6022
|
+
if (!isInsideModal && !isInsideAccordion) {
|
|
6013
6023
|
var bodyStyles = window.getComputedStyle(document.body);
|
|
6014
6024
|
setBackgroundColor(bodyStyles.getPropertyValue('background-color'));
|
|
6015
6025
|
}
|
|
6016
|
-
}, [isInsideModal]);
|
|
6026
|
+
}, [isInsideModal, isInsideAccordion]);
|
|
6017
6027
|
return backgroundColor;
|
|
6018
6028
|
};
|
|
6019
6029
|
|
|
@@ -7122,7 +7132,7 @@ var ALIGNMENTS = {
|
|
|
7122
7132
|
|
|
7123
7133
|
var styles$p = {"text":"_32amZ","text__body":"_ayJRy","text__caption":"_3g1gi","text__insight":"_20Phg","text--bold":"_A0AyZ","text--italic":"_3jayQ","text--underline":"_GOcFw","text--monospace":"_3TfGK","text--align-left":"_b8gto","text--align-right":"_ecyH1","text--align-center":"_xBgXc","text--align-justify":"_280D5"};
|
|
7124
7134
|
|
|
7125
|
-
var _excluded$2v = ["children", "as", "emphasis", "alignment", "color", "testId"];
|
|
7135
|
+
var _excluded$2v = ["children", "as", "emphasis", "alignment", "color", "testId", "textWrap"];
|
|
7126
7136
|
var Text = function Text(_ref) {
|
|
7127
7137
|
var _classnames;
|
|
7128
7138
|
var children = _ref.children,
|
|
@@ -7132,11 +7142,13 @@ var Text = function Text(_ref) {
|
|
|
7132
7142
|
alignment = _ref.alignment,
|
|
7133
7143
|
color = _ref.color,
|
|
7134
7144
|
testId = _ref.testId,
|
|
7145
|
+
textWrap = _ref.textWrap,
|
|
7135
7146
|
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2v);
|
|
7136
7147
|
var positionStyles = usePositionStyles(positionProps);
|
|
7137
7148
|
var elementProps = {
|
|
7138
7149
|
style: _extends({
|
|
7139
|
-
color: getColor(color)
|
|
7150
|
+
color: getColor(color),
|
|
7151
|
+
textWrap: textWrap
|
|
7140
7152
|
}, positionStyles),
|
|
7141
7153
|
className: classnames(styles$p['text'], (_classnames = {}, _classnames[styles$p['text--bold']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.BOLD), _classnames[styles$p['text--italic']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.ITALIC), _classnames[styles$p['text--underline']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.UNDERLINE), _classnames[styles$p['text--monospace']] = emphasis === null || emphasis === void 0 ? void 0 : emphasis.includes(FONT_EMPHASIS.MONOSPACE), _classnames[styles$p['text--align-left']] = alignment === ALIGNMENTS.LEFT, _classnames[styles$p['text--align-right']] = alignment === ALIGNMENTS.RIGHT, _classnames[styles$p['text--align-center']] = alignment === ALIGNMENTS.CENTER, _classnames[styles$p['text--align-justify']] = alignment === ALIGNMENTS.JUSTIFY, _classnames[styles$p['text__body']] = as === TEXT_TYPES.BODY, _classnames[styles$p['text__insight']] = as === TEXT_TYPES.INSIGHT, _classnames[styles$p['text__caption']] = as === TEXT_TYPES.CAPTION, _classnames)),
|
|
7142
7154
|
'data-testid': testId
|
|
@@ -7203,15 +7215,20 @@ var DropdownListItem = function DropdownListItem(_ref) {
|
|
|
7203
7215
|
};
|
|
7204
7216
|
var childrenContainer = React__default.createElement("div", {
|
|
7205
7217
|
className: styles$o['dropdown-list-item__container']
|
|
7206
|
-
}, prefix
|
|
7218
|
+
}, prefix && React__default.createElement("div", {
|
|
7219
|
+
className: styles$o['dropdown-list-item__prefix']
|
|
7220
|
+
}, prefix), React__default.createElement("div", {
|
|
7207
7221
|
className: styles$o['dropdown-list-item__content']
|
|
7208
7222
|
}, React__default.createElement(Stack, {
|
|
7209
7223
|
space: 4,
|
|
7210
7224
|
flex: [1]
|
|
7211
7225
|
}, children, caption && React__default.createElement(Text, {
|
|
7212
7226
|
as: "caption",
|
|
7213
|
-
color: getCaptionColor()
|
|
7214
|
-
|
|
7227
|
+
color: getCaptionColor(),
|
|
7228
|
+
textWrap: "wrap"
|
|
7229
|
+
}, caption))), suffix && React__default.createElement("div", {
|
|
7230
|
+
className: styles$o['dropdown-list-item__suffix']
|
|
7231
|
+
}, suffix));
|
|
7215
7232
|
var linkItem = href && (reloadDocument ? React__default.createElement("a", {
|
|
7216
7233
|
href: href,
|
|
7217
7234
|
className: styles$o['dropdown-list-item__link'],
|
|
@@ -7403,7 +7420,7 @@ var CalloutCard = function CalloutCard(_ref) {
|
|
|
7403
7420
|
className: styles$r['callout-card__header']
|
|
7404
7421
|
}, React__default.createElement(Text, {
|
|
7405
7422
|
as: "body",
|
|
7406
|
-
color: "
|
|
7423
|
+
color: "blackberry-400"
|
|
7407
7424
|
}, header)), React__default.createElement(Text, {
|
|
7408
7425
|
as: "h2"
|
|
7409
7426
|
}, title), React__default.createElement(Text, {
|
|
@@ -9103,7 +9120,11 @@ var Accordion = function Accordion(props) {
|
|
|
9103
9120
|
if (items.length < 1) {
|
|
9104
9121
|
return null;
|
|
9105
9122
|
}
|
|
9106
|
-
return React__default.createElement(
|
|
9123
|
+
return React__default.createElement(AccordionContext.Provider, {
|
|
9124
|
+
value: {
|
|
9125
|
+
isAccordionMounted: true
|
|
9126
|
+
}
|
|
9127
|
+
}, React__default.createElement("div", {
|
|
9107
9128
|
className: styles$Q['accordion']
|
|
9108
9129
|
}, items.map(function (item, index) {
|
|
9109
9130
|
var id = item.id || index.toString();
|
|
@@ -9115,7 +9136,7 @@ var Accordion = function Accordion(props) {
|
|
|
9115
9136
|
isOpen: id == activeId,
|
|
9116
9137
|
handleAccordionItemOpen: handleAccordionItemOpen
|
|
9117
9138
|
});
|
|
9118
|
-
}));
|
|
9139
|
+
})));
|
|
9119
9140
|
};
|
|
9120
9141
|
|
|
9121
9142
|
var useSelectFieldControllers = function useSelectFieldControllers(_ref) {
|
|
@@ -9248,16 +9269,16 @@ var getSelectStyles = function getSelectStyles(_ref) {
|
|
|
9248
9269
|
flex: '1',
|
|
9249
9270
|
fontFamily: FONT_FAMILY,
|
|
9250
9271
|
minWidth: '110px',
|
|
9251
|
-
position: 'initial'
|
|
9252
|
-
borderRadius: '4px'
|
|
9272
|
+
position: 'initial'
|
|
9253
9273
|
});
|
|
9254
9274
|
},
|
|
9255
9275
|
control: function control(base, state) {
|
|
9256
9276
|
return Object.assign({}, base, {
|
|
9257
9277
|
backgroundColor: state.isDisabled ? COLORS['grey-100'] : COLORS['white'],
|
|
9258
|
-
borderColor: state.isFocused ? COLORS['
|
|
9278
|
+
borderColor: state.isFocused ? COLORS['blackberry-400'] : borderColor,
|
|
9259
9279
|
color: state.isDisabled ? COLORS['grey-400'] : COLORS['grey-500'],
|
|
9260
|
-
|
|
9280
|
+
borderRadius: 'var(--border-radius-400)',
|
|
9281
|
+
boxShadow: state.isFocused ? "0 0 8px " + COLORS['blackberry-300'] : 'none',
|
|
9261
9282
|
'&:hover': 'none',
|
|
9262
9283
|
fontSize: '14px',
|
|
9263
9284
|
cursor: 'pointer',
|
|
@@ -9354,6 +9375,7 @@ var getSelectStyles = function getSelectStyles(_ref) {
|
|
|
9354
9375
|
},
|
|
9355
9376
|
menu: function menu(base) {
|
|
9356
9377
|
return _extends({}, base, {
|
|
9378
|
+
borderRadius: 0,
|
|
9357
9379
|
zIndex: getZIndex('dropdown')
|
|
9358
9380
|
});
|
|
9359
9381
|
},
|
|
@@ -13086,7 +13108,7 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
13086
13108
|
space: 8
|
|
13087
13109
|
}, header && React__default.createElement(Text, {
|
|
13088
13110
|
as: "h4",
|
|
13089
|
-
color: isPaywall ? 'eggplant-500' : '
|
|
13111
|
+
color: isPaywall ? 'eggplant-500' : 'blackberry-400'
|
|
13090
13112
|
}, header), React__default.createElement(Text, {
|
|
13091
13113
|
as: "h1"
|
|
13092
13114
|
}, title)), React__default.createElement("div", {
|