@7shifts/sous-chef 3.80.0 → 3.81.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.
@@ -10226,9 +10226,9 @@ const AccordionItem = props => {
10226
10226
  }, React__default.createElement(Inline, {
10227
10227
  justifyContent: "space-between",
10228
10228
  alignItems: "center"
10229
- }, React__default.createElement(Text, {
10229
+ }, typeof title === 'string' ? React__default.createElement(Text, {
10230
10230
  emphasis: "bold"
10231
- }, title), React__default.createElement(IconChevronDown, {
10231
+ }, title) : title, React__default.createElement(IconChevronDown, {
10232
10232
  className: styles$x[`accordion-item__icon${isOpen ? '--active' : ''}`],
10233
10233
  color: 'surface-on-color-subtle'
10234
10234
  }))), React__default.createElement("div", {
@@ -10242,11 +10242,14 @@ var styles$w = {"accordion":"_058SP"};
10242
10242
  const Accordion = props => {
10243
10243
  const {
10244
10244
  items,
10245
- onExpand
10245
+ onExpand,
10246
+ defaultOpenId
10246
10247
  } = props;
10247
- const [activeId, setActiveId] = useState();
10248
+ const [activeId, setActiveId] = useState(() => {
10249
+ return defaultOpenId || null;
10250
+ });
10248
10251
  const handleAccordionItemOpen = item => {
10249
- setActiveId(item ? item.id : null);
10252
+ setActiveId((item == null ? void 0 : item.id) || null);
10250
10253
  item && onExpand && onExpand(item);
10251
10254
  };
10252
10255
  if (items.length < 1) {