@7shifts/sous-chef 3.42.1 → 3.43.0
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/foundation/tokens/color/color-codes.d.ts +6 -0
- package/dist/foundation/tokens/color/color-constants.d.ts +6 -0
- package/dist/foundation/tokens/color/color-types.d.ts +1 -1
- package/dist/index.css +19 -6
- package/dist/index.js +31 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +31 -18
- package/dist/index.modern.js.map +1 -1
- package/dist/lists/Accordion/Accordion.d.ts +1 -0
- package/dist/lists/Accordion/AccordionItem/AccordionItem.d.ts +3 -5
- package/dist/overlay/Tooltip/Tooltip.d.ts +1 -0
- package/dist/overlay/Tooltip/TooltipOverlay/TooltipOverlay.d.ts +1 -0
- package/package.json +1 -1
|
@@ -43,4 +43,10 @@ export declare const COLOR_CODES: {
|
|
|
43
43
|
readonly 'grey-400': " #767676";
|
|
44
44
|
readonly 'grey-500': " #464646";
|
|
45
45
|
readonly 'grey-600': " #323232";
|
|
46
|
+
readonly 'oat-100': " #f1f0ec";
|
|
47
|
+
readonly 'oat-200': " #e2ded6";
|
|
48
|
+
readonly 'oat-300': " #c7c0b2";
|
|
49
|
+
readonly 'oat-400': " #6e6d6c";
|
|
50
|
+
readonly 'oat-500': " #4c4b49";
|
|
51
|
+
readonly 'oat-600': " #383430";
|
|
46
52
|
};
|
|
@@ -43,4 +43,10 @@ export declare const COLORS: {
|
|
|
43
43
|
readonly 'grey-400': "var(--color-grey-400)";
|
|
44
44
|
readonly 'grey-500': "var(--color-grey-500)";
|
|
45
45
|
readonly 'grey-600': "var(--color-grey-600)";
|
|
46
|
+
readonly 'oat-100': "var(--color-oat-100)";
|
|
47
|
+
readonly 'oat-200': "var(--color-oat-200)";
|
|
48
|
+
readonly 'oat-300': "var(--color-oat-300)";
|
|
49
|
+
readonly 'oat-400': "var(--color-oat-400)";
|
|
50
|
+
readonly 'oat-500': "var(--color-oat-500)";
|
|
51
|
+
readonly 'oat-600': "var(--color-oat-600)";
|
|
46
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Color = 'white' | 'black' | 'tangerine-100' | 'tangerine-200' | 'tangerine-300' | 'tangerine-400' | 'tangerine-500' | 'tangerine-600' | 'eggplant-100' | 'eggplant-200' | 'eggplant-300' | 'eggplant-400' | 'eggplant-500' | 'eggplant-600' | 'mint-100' | 'mint-200' | 'mint-300' | 'mint-400' | 'mint-500' | 'mint-600' | 'radish-100' | 'radish-200' | 'radish-300' | 'radish-400' | 'radish-500' | 'radish-600' | 'blueberry-100' | 'blueberry-200' | 'blueberry-300' | 'blueberry-400' | 'blueberry-500' | 'blueberry-600' | 'banana-100' | 'banana-200' | 'banana-300' | 'banana-400' | 'banana-500' | 'banana-600' | 'grey-100' | 'grey-200' | 'grey-300' | 'grey-400' | 'grey-500' | 'grey-600';
|
|
1
|
+
export type Color = 'white' | 'black' | 'tangerine-100' | 'tangerine-200' | 'tangerine-300' | 'tangerine-400' | 'tangerine-500' | 'tangerine-600' | 'eggplant-100' | 'eggplant-200' | 'eggplant-300' | 'eggplant-400' | 'eggplant-500' | 'eggplant-600' | 'mint-100' | 'mint-200' | 'mint-300' | 'mint-400' | 'mint-500' | 'mint-600' | 'radish-100' | 'radish-200' | 'radish-300' | 'radish-400' | 'radish-500' | 'radish-600' | 'blueberry-100' | 'blueberry-200' | 'blueberry-300' | 'blueberry-400' | 'blueberry-500' | 'blueberry-600' | 'banana-100' | 'banana-200' | 'banana-300' | 'banana-400' | 'banana-500' | 'banana-600' | 'grey-100' | 'grey-200' | 'grey-300' | 'grey-400' | 'grey-500' | 'grey-600' | 'oat-100' | 'oat-200' | 'oat-300' | 'oat-400' | 'oat-500' | 'oat-600';
|
package/dist/index.css
CHANGED
|
@@ -108,6 +108,18 @@
|
|
|
108
108
|
--color-grey-500-rgb: 70, 70, 70;
|
|
109
109
|
--color-grey-600: #323232;
|
|
110
110
|
--color-grey-600-rgb: 50, 50, 50;
|
|
111
|
+
--color-oat-100: #f1f0ec;
|
|
112
|
+
--color-oat-100-rgb: 241, 240, 236;
|
|
113
|
+
--color-oat-200: #e2ded6;
|
|
114
|
+
--color-oat-200-rgb: 226, 222, 214;
|
|
115
|
+
--color-oat-300: #c7c0b2;
|
|
116
|
+
--color-oat-300-rgb: 199, 192, 178;
|
|
117
|
+
--color-oat-400: #6e6d6c;
|
|
118
|
+
--color-oat-400-rgb: 110, 109, 108;
|
|
119
|
+
--color-oat-500: #4c4b49;
|
|
120
|
+
--color-oat-500-rgb: 76, 75, 73;
|
|
121
|
+
--color-oat-600: #383430;
|
|
122
|
+
--color-oat-600-rgb: 56, 52, 48;
|
|
111
123
|
}
|
|
112
124
|
:root {
|
|
113
125
|
--z-index-base: 1;
|
|
@@ -369,6 +381,7 @@ Just for future references:
|
|
|
369
381
|
opacity: 0;
|
|
370
382
|
transition: visibility 0s, opacity 0.05s linear;
|
|
371
383
|
max-width: 340px;
|
|
384
|
+
overflow: auto;
|
|
372
385
|
}
|
|
373
386
|
._1NSQY {
|
|
374
387
|
visibility: visible;
|
|
@@ -2551,9 +2564,9 @@ input:disabled + ._2W10t::after {
|
|
|
2551
2564
|
}
|
|
2552
2565
|
._3uthQ {
|
|
2553
2566
|
border-bottom: 1px solid var(--color-grey-200);
|
|
2554
|
-
margin-top:
|
|
2555
|
-
padding-left:
|
|
2556
|
-
padding-right:
|
|
2567
|
+
margin-top: 16px;
|
|
2568
|
+
padding-left: 16px;
|
|
2569
|
+
padding-right: 16px;
|
|
2557
2570
|
}
|
|
2558
2571
|
._23CMa {
|
|
2559
2572
|
all: unset;
|
|
@@ -2574,12 +2587,12 @@ input:disabled + ._2W10t::after {
|
|
|
2574
2587
|
visibility: hidden;
|
|
2575
2588
|
transition: 0.2s ease-in-out;
|
|
2576
2589
|
transition-property: margin-top;
|
|
2577
|
-
height:
|
|
2590
|
+
height: 16px;
|
|
2578
2591
|
}
|
|
2579
2592
|
._fCEkR {
|
|
2580
2593
|
font-weight: 400;
|
|
2581
|
-
margin-top:
|
|
2582
|
-
margin-bottom:
|
|
2594
|
+
margin-top: 16px;
|
|
2595
|
+
margin-bottom: 16px;
|
|
2583
2596
|
transition: 0.2s ease-in-out;
|
|
2584
2597
|
transition-property: margin-top;
|
|
2585
2598
|
}
|
package/dist/index.js
CHANGED
|
@@ -65,7 +65,13 @@ var COLORS = {
|
|
|
65
65
|
'grey-300': 'var(--color-grey-300)',
|
|
66
66
|
'grey-400': 'var(--color-grey-400)',
|
|
67
67
|
'grey-500': 'var(--color-grey-500)',
|
|
68
|
-
'grey-600': 'var(--color-grey-600)'
|
|
68
|
+
'grey-600': 'var(--color-grey-600)',
|
|
69
|
+
'oat-100': 'var(--color-oat-100)',
|
|
70
|
+
'oat-200': 'var(--color-oat-200)',
|
|
71
|
+
'oat-300': 'var(--color-oat-300)',
|
|
72
|
+
'oat-400': 'var(--color-oat-400)',
|
|
73
|
+
'oat-500': 'var(--color-oat-500)',
|
|
74
|
+
'oat-600': 'var(--color-oat-600)'
|
|
69
75
|
};
|
|
70
76
|
|
|
71
77
|
var ZINDEX = {
|
|
@@ -565,7 +571,8 @@ var TooltipOverlay = function TooltipOverlay(_ref) {
|
|
|
565
571
|
onFocusIn = _ref.onFocusIn,
|
|
566
572
|
onFocusOut = _ref.onFocusOut,
|
|
567
573
|
extraClass = _ref.extraClass,
|
|
568
|
-
testId = _ref.testId
|
|
574
|
+
testId = _ref.testId,
|
|
575
|
+
maxHeight = _ref.maxHeight;
|
|
569
576
|
var _useState = React.useState(false),
|
|
570
577
|
isVisible = _useState[0],
|
|
571
578
|
setIsVisible = _useState[1];
|
|
@@ -590,6 +597,7 @@ var TooltipOverlay = function TooltipOverlay(_ref) {
|
|
|
590
597
|
}, React__default.createElement("div", {
|
|
591
598
|
ref: tooltipRef,
|
|
592
599
|
style: _extends({}, position.overlay, {
|
|
600
|
+
maxHeight: maxHeight,
|
|
593
601
|
zIndex: getZIndex('tooltip')
|
|
594
602
|
}),
|
|
595
603
|
className: classnames(styles$4['tooltip-overlay'], extraClass, (_classnames = {}, _classnames[styles$4['tooltip-overlay--visible']] = isVisible, _classnames[styles$4['tooltip-overlay--black-theme']] = theme === TOOLTIP_THEME.BLACK, _classnames[styles$4['tooltip-overlay--white-theme']] = theme === TOOLTIP_THEME.WHITE, _classnames)),
|
|
@@ -624,7 +632,8 @@ var TooltipElement = function TooltipElement(_ref, forwardedRef) {
|
|
|
624
632
|
onClose = _ref.onClose,
|
|
625
633
|
onVisibleChange = _ref.onVisibleChange,
|
|
626
634
|
children = _ref.children,
|
|
627
|
-
testId = _ref.testId
|
|
635
|
+
testId = _ref.testId,
|
|
636
|
+
maxHeight = _ref.maxHeight;
|
|
628
637
|
var checkIsMounted = useIsMounted();
|
|
629
638
|
var internalRef = React.useRef(null);
|
|
630
639
|
var containerRef = forwardedRef || internalRef;
|
|
@@ -697,7 +706,8 @@ var TooltipElement = function TooltipElement(_ref, forwardedRef) {
|
|
|
697
706
|
closeTooltip();
|
|
698
707
|
},
|
|
699
708
|
extraClass: extraClass,
|
|
700
|
-
testId: testId
|
|
709
|
+
testId: testId,
|
|
710
|
+
maxHeight: maxHeight
|
|
701
711
|
}, theme === TOOLTIP_THEME.BLACK && !header ? null : overlay) : null;
|
|
702
712
|
};
|
|
703
713
|
if (React__default.Children.count(children) === 1) {
|
|
@@ -8919,11 +8929,12 @@ var DataTable$1 = function DataTable(_ref) {
|
|
|
8919
8929
|
var styles$P = {"accordion-item":"_3uthQ","accordion-item__link":"_23CMa","accordion-item__header":"_3LzWR","accordion-item__icon":"_34Ht7","accordion-item__icon--active":"_1D8Hh","accordion-item__content":"_1Ocs0","accordion-item__content--active":"_fCEkR"};
|
|
8920
8930
|
|
|
8921
8931
|
var AccordionItem = function AccordionItem(props) {
|
|
8922
|
-
var
|
|
8923
|
-
content = props.content,
|
|
8924
|
-
id = props.id,
|
|
8932
|
+
var item = props.item,
|
|
8925
8933
|
isOpen = props.isOpen,
|
|
8926
8934
|
handleAccordionItemOpen = props.handleAccordionItemOpen;
|
|
8935
|
+
var id = item.id,
|
|
8936
|
+
title = item.title,
|
|
8937
|
+
content = item.content;
|
|
8927
8938
|
var isFocusedByClickRef = React__default.useRef(false);
|
|
8928
8939
|
return React__default.createElement("div", {
|
|
8929
8940
|
className: styles$P['accordion-item']
|
|
@@ -8933,13 +8944,13 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
8933
8944
|
if (isOpen) {
|
|
8934
8945
|
handleAccordionItemOpen(null);
|
|
8935
8946
|
} else {
|
|
8936
|
-
handleAccordionItemOpen(
|
|
8947
|
+
handleAccordionItemOpen(item);
|
|
8937
8948
|
}
|
|
8938
8949
|
},
|
|
8939
8950
|
id: id,
|
|
8940
8951
|
onFocus: function onFocus() {
|
|
8941
8952
|
if (!isFocusedByClickRef.current) {
|
|
8942
|
-
handleAccordionItemOpen(
|
|
8953
|
+
handleAccordionItemOpen(item);
|
|
8943
8954
|
}
|
|
8944
8955
|
},
|
|
8945
8956
|
onBlur: function onBlur() {
|
|
@@ -8953,7 +8964,6 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
8953
8964
|
justifyContent: "space-between",
|
|
8954
8965
|
alignItems: "center"
|
|
8955
8966
|
}, React__default.createElement(Text, {
|
|
8956
|
-
as: "h3",
|
|
8957
8967
|
color: "grey-500",
|
|
8958
8968
|
emphasis: "bold"
|
|
8959
8969
|
}, title), React__default.createElement(IconChevronDown, {
|
|
@@ -8963,7 +8973,6 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
8963
8973
|
"data-testid": "" + (isOpen ? 'accordion-item-' + id + '-open' : 'accordion-item-' + id + '-closed'),
|
|
8964
8974
|
className: styles$P["accordion-item__content" + (isOpen ? '--active' : '')]
|
|
8965
8975
|
}, React__default.createElement(Text, {
|
|
8966
|
-
as: "h4",
|
|
8967
8976
|
color: "grey-500"
|
|
8968
8977
|
}, content)));
|
|
8969
8978
|
};
|
|
@@ -8971,12 +8980,14 @@ var AccordionItem = function AccordionItem(props) {
|
|
|
8971
8980
|
var styles$Q = {"accordion":"_31JZJ"};
|
|
8972
8981
|
|
|
8973
8982
|
var Accordion = function Accordion(props) {
|
|
8974
|
-
var items = props.items
|
|
8983
|
+
var items = props.items,
|
|
8984
|
+
onExpand = props.onExpand;
|
|
8975
8985
|
var _useState = React.useState(),
|
|
8976
8986
|
activeId = _useState[0],
|
|
8977
8987
|
setActiveId = _useState[1];
|
|
8978
|
-
var handleAccordionItemOpen = function handleAccordionItemOpen(
|
|
8979
|
-
setActiveId(id);
|
|
8988
|
+
var handleAccordionItemOpen = function handleAccordionItemOpen(item) {
|
|
8989
|
+
setActiveId(item ? item.id : null);
|
|
8990
|
+
item && onExpand && onExpand(item);
|
|
8980
8991
|
};
|
|
8981
8992
|
if (items.length < 1) {
|
|
8982
8993
|
return null;
|
|
@@ -8984,11 +8995,13 @@ var Accordion = function Accordion(props) {
|
|
|
8984
8995
|
return React__default.createElement("div", {
|
|
8985
8996
|
className: styles$Q['accordion']
|
|
8986
8997
|
}, items.map(function (item, index) {
|
|
8998
|
+
var id = item.id || index.toString();
|
|
8987
8999
|
return React__default.createElement(AccordionItem, {
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
9000
|
+
key: id,
|
|
9001
|
+
item: _extends({}, item, {
|
|
9002
|
+
id: id
|
|
9003
|
+
}),
|
|
9004
|
+
isOpen: id == activeId,
|
|
8992
9005
|
handleAccordionItemOpen: handleAccordionItemOpen
|
|
8993
9006
|
});
|
|
8994
9007
|
}));
|