storybook 10.1.0-beta.2 → 10.1.0-beta.3
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/_browser-chunks/{chunk-L4RMQ7D7.js → chunk-BRX2HXH7.js} +75 -5
- package/dist/_node-chunks/{builder-manager-DE5CZGPU.js → builder-manager-OAF6SRKJ.js} +14 -579
- package/dist/_node-chunks/{camelcase-3GPWEIYB.js → camelcase-UG5ZJHCD.js} +7 -7
- package/dist/_node-chunks/{chunk-77QRXLGA.js → chunk-473LXK7O.js} +6 -6
- package/dist/_node-chunks/chunk-5N3H43LE.js +23 -0
- package/dist/_node-chunks/{chunk-HFPMBHAF.js → chunk-6YYH64IJ.js} +13 -13
- package/dist/_node-chunks/{chunk-3FVKDIQ7.js → chunk-745GFLCZ.js} +6 -6
- package/dist/_node-chunks/{chunk-6T6VTXDE.js → chunk-7WOMK33B.js} +7 -7
- package/dist/_node-chunks/{chunk-4CHMPSHM.js → chunk-A5VW7257.js} +8 -8
- package/dist/_node-chunks/{chunk-NOLZUVQN.js → chunk-CRJ7M6EO.js} +22 -21
- package/dist/_node-chunks/chunk-DRN5YXX5.js +18 -0
- package/dist/_node-chunks/{chunk-45XWOXXM.js → chunk-H6HVK5J2.js} +7 -7
- package/dist/_node-chunks/{chunk-3GUEJ3O3.js → chunk-JOOO54RB.js} +6 -6
- package/dist/_node-chunks/chunk-LJRIVT23.js +61 -0
- package/dist/_node-chunks/{chunk-ODJGHT54.js → chunk-LZ2HPFRB.js} +7 -7
- package/dist/_node-chunks/{chunk-RZEXP6OF.js → chunk-N5IE6WWR.js} +7 -7
- package/dist/_node-chunks/{chunk-INMOMYVB.js → chunk-NKT3R6IH.js} +6 -6
- package/dist/_node-chunks/{chunk-F4HHDWJV.js → chunk-NOTIBODG.js} +6 -6
- package/dist/_node-chunks/{chunk-PJAOEV2K.js → chunk-Q65ED3UK.js} +6 -6
- package/dist/_node-chunks/{chunk-YZEOU7D5.js → chunk-RABBUYPA.js} +9 -9
- package/dist/_node-chunks/{chunk-UWKUW2OJ.js → chunk-SKFAHEPX.js} +14 -14
- package/dist/_node-chunks/{chunk-KIW5GZKQ.js → chunk-STYUJSG3.js} +10 -10
- package/dist/_node-chunks/{chunk-RSFKUYLE.js → chunk-SUILKNPA.js} +8 -8
- package/dist/_node-chunks/{chunk-43AQPYQJ.js → chunk-TUQOGYET.js} +7 -7
- package/dist/_node-chunks/{chunk-EXJNST6P.js → chunk-U24W5IIW.js} +7 -7
- package/dist/_node-chunks/{chunk-PQF6TGKN.js → chunk-UWK6Z4VL.js} +6 -6
- package/dist/_node-chunks/{chunk-ZH4F5JWQ.js → chunk-WBULWRM7.js} +12 -12
- package/dist/_node-chunks/{chunk-QAX2QIAO.js → chunk-WSIZMTN2.js} +6 -6
- package/dist/_node-chunks/{chunk-D2CQN4LQ.js → chunk-WYLXFNIP.js} +9 -9
- package/dist/_node-chunks/{chunk-HGDN3STX.js → chunk-XS5QCZP7.js} +7 -7
- package/dist/_node-chunks/{chunk-Z7F5CZXW.js → chunk-Y7VDA7NY.js} +7 -7
- package/dist/_node-chunks/{dist-RFQRGJD5.js → dist-N33YQ3NH.js} +9 -9
- package/dist/_node-chunks/{globby-WIMKMN5Q.js → globby-5IBS67N3.js} +9 -9
- package/dist/_node-chunks/{lib-OBEY3MUM.js → lib-2XH6KQ2B.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-7XA7LOVG.js → mdx-N42X6CFJ-3GGSRLVV.js} +8 -8
- package/dist/_node-chunks/{p-limit-VII3MYEU.js → p-limit-Z3A7N5MY.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -12
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.js +18 -18
- package/dist/common/index.js +19 -19
- package/dist/components/index.js +35 -29
- package/dist/core-server/index.js +33 -33
- package/dist/core-server/presets/common-manager.js +74 -108
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +25 -25
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +142 -65
- package/dist/manager/runtime.js +70 -20
- package/dist/manager-api/index.d.ts +178 -178
- package/dist/manager-api/index.js +1 -1
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/preview-api/index.d.ts +68 -67
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.js +23 -23
- package/dist/theming/create.d.ts +1 -1
- package/dist/theming/create.js +1 -1
- package/dist/theming/index.d.ts +65 -2
- package/dist/theming/index.js +6 -3
- package/package.json +1 -2
- package/dist/_node-chunks/chunk-CEFT3TLW.js +0 -18
- package/dist/_node-chunks/chunk-HG5BSY5V.js +0 -23
- package/dist/_node-chunks/chunk-Y35QWPHB.js +0 -61
package/dist/manager/runtime.js
CHANGED
|
@@ -293,9 +293,9 @@ var require_memoizerific = __commonJS({
|
|
|
293
293
|
module3.exports = function(limit) {
|
|
294
294
|
var cache = new MapOrSimilar(!1), lru = [];
|
|
295
295
|
return function(fn) {
|
|
296
|
-
var
|
|
296
|
+
var memoizerific3 = function() {
|
|
297
297
|
var currentCache = cache, newMap, fnResult, argsLengthMinusOne = arguments.length - 1, lruPath = Array(argsLengthMinusOne + 1), isMemoized = !0, i2;
|
|
298
|
-
if ((
|
|
298
|
+
if ((memoizerific3.numArgs || memoizerific3.numArgs === 0) && memoizerific3.numArgs !== argsLengthMinusOne + 1)
|
|
299
299
|
throw new Error("Memoizerific functions should always be called with the same number of arguments");
|
|
300
300
|
for (i2 = 0; i2 < argsLengthMinusOne; i2++) {
|
|
301
301
|
if (lruPath[i2] = {
|
|
@@ -310,9 +310,9 @@ var require_memoizerific = __commonJS({
|
|
|
310
310
|
return isMemoized && (currentCache.has(arguments[argsLengthMinusOne]) ? fnResult = currentCache.get(arguments[argsLengthMinusOne]) : isMemoized = !1), isMemoized || (fnResult = fn.apply(null, arguments), currentCache.set(arguments[argsLengthMinusOne], fnResult)), limit > 0 && (lruPath[argsLengthMinusOne] = {
|
|
311
311
|
cacheItem: currentCache,
|
|
312
312
|
arg: arguments[argsLengthMinusOne]
|
|
313
|
-
}, isMemoized ? moveToMostRecentLru(lru, lruPath) : lru.push(lruPath), lru.length > limit && removeCachedResult(lru.shift())),
|
|
313
|
+
}, isMemoized ? moveToMostRecentLru(lru, lruPath) : lru.push(lruPath), lru.length > limit && removeCachedResult(lru.shift())), memoizerific3.wasMemoized = isMemoized, memoizerific3.numArgs = argsLengthMinusOne + 1, fnResult;
|
|
314
314
|
};
|
|
315
|
-
return
|
|
315
|
+
return memoizerific3.limit = limit, memoizerific3.wasMemoized = !1, memoizerific3.cache = cache, memoizerific3.lru = lru, memoizerific3;
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
318
|
function moveToMostRecentLru(lru, lruPath) {
|
|
@@ -2259,7 +2259,7 @@ var icons_default = __STORYBOOK_ICONS__, { AccessibilityAltIcon, AccessibilityIc
|
|
|
2259
2259
|
var manager_api_default = __STORYBOOK_API__, { ActiveTabs, Consumer, ManagerContext, Provider, RequestResponseError, addons, combineParameters, controlOrMetaKey, controlOrMetaSymbol, eventMatchesShortcut, eventToShortcut, experimental_MockUniversalStore, experimental_UniversalStore, experimental_getStatusStore, experimental_getTestProviderStore, experimental_requestResponse, experimental_useStatusStore, experimental_useTestProviderStore, experimental_useUniversalStore, internal_checklistStore, internal_fullStatusStore, internal_fullTestProviderStore, internal_universalChecklistStore, internal_universalStatusStore, internal_universalTestProviderStore, isMacLike, isShortcutTaken, keyToSymbol, merge, mockChannel, optionOrAltSymbol, shortcutMatchesShortcut, shortcutToAriaKeyshortcuts, shortcutToHumanString, types, useAddonState, useArgTypes, useArgs, useChannel, useGlobalTypes, useGlobals, useParameter, useSharedState, useStoryPrepared, useStorybookApi, useStorybookState } = __STORYBOOK_API__;
|
|
2260
2260
|
|
|
2261
2261
|
// global-externals:storybook/theming
|
|
2262
|
-
var theming_default = __STORYBOOK_THEMING__, { CacheProvider, ClassNames, Global, ThemeProvider, background, color, convert, create, createCache, createGlobal, createReset, css, darken, ensure, getPreferredColorScheme, ignoreSsrWarning, isPropValid, jsx, keyframes, lighten, styled, themes, typography, useTheme, withTheme } = __STORYBOOK_THEMING__;
|
|
2262
|
+
var theming_default = __STORYBOOK_THEMING__, { CacheProvider, ClassNames, Global, ThemeProvider, background, color, convert, create, createCache, createGlobal, createReset, css, darken, ensure, getPreferredColorScheme, ignoreSsrWarning, isPropValid, jsx, keyframes, lighten, styled, themes, tokens, typography, useTheme, withTheme } = __STORYBOOK_THEMING__;
|
|
2263
2263
|
|
|
2264
2264
|
// global-externals:storybook/internal/components
|
|
2265
2265
|
var components_default = __STORYBOOK_COMPONENTS__, { A, AbstractToolbar, ActionBar, AddonPanel, Badge, Bar, Blockquote, Button, Card, ClipboardCode, Code, Collapsible, DL, Div, DocumentWrapper, EmptyTabContent, ErrorFormatter, FlexBar, Form, H1, H2, H3, H4, H5, H6, HR, IconButton, Img, LI, Link, ListItem, Listbox, Loader, Modal, ModalDecorator, OL, P, Placeholder, Popover, PopoverProvider, Pre, ProgressSpinner, ResetWrapper, ScrollArea, Select, Separator, Spaced, Span, StatelessTab, StatelessTabList, StatelessTabPanel, StatelessTabsView, StorybookIcon: StorybookIcon2, StorybookLogo, SyntaxHighlighter, TT, TabBar, TabButton, TabList, TabPanel, TabWrapper, Table, Tabs, TabsState, TabsView, ToggleButton, Toolbar, Tooltip, TooltipLinkList, TooltipMessage, TooltipNote, TooltipProvider, UL, WithTooltip, WithTooltipPure, Zoom, codeCommon, components, convertToReactAriaPlacement, createCopyToClipboardFunction, getStoryHref, interleaveSeparators, nameSpaceClassNames, resetComponents, useTabsState, withReset } = __STORYBOOK_COMPONENTS__;
|
|
@@ -13919,6 +13919,9 @@ var { document: document4, window: globalWindow3 } = scope, IndicatorPlacement =
|
|
|
13919
13919
|
return react_default.createElement(Message, { href: "https://storybook.js.org/docs/sharing/storybook-composition?ref=ui" }, react_default.createElement(LightningIcon, { color: theme.color.gold }), react_default.createElement("div", null, react_default.createElement(MessageTitle, null, "Reduce lag"), react_default.createElement("div", null, "Learn how to speed up Composition performance.")));
|
|
13920
13920
|
};
|
|
13921
13921
|
|
|
13922
|
+
// src/manager/utils/status.tsx
|
|
13923
|
+
var import_memoizerific3 = __toESM(require_memoizerific(), 1);
|
|
13924
|
+
|
|
13922
13925
|
// src/manager/components/sidebar/IconSymbols.tsx
|
|
13923
13926
|
var Svg2 = styled.svg`
|
|
13924
13927
|
position: absolute;
|
|
@@ -14015,7 +14018,7 @@ var SmallIcons = styled(CircleIcon)({
|
|
|
14015
14018
|
"status-value:success",
|
|
14016
14019
|
"status-value:warning",
|
|
14017
14020
|
"status-value:error"
|
|
14018
|
-
],
|
|
14021
|
+
], getStatus = (0, import_memoizerific3.default)(5)((theme, status) => ({
|
|
14019
14022
|
"status-value:unknown": [null, null],
|
|
14020
14023
|
"status-value:pending": [react_default.createElement(LoadingIcons, { key: "icon" }), "currentColor"],
|
|
14021
14024
|
"status-value:success": [
|
|
@@ -14024,13 +14027,13 @@ var SmallIcons = styled(CircleIcon)({
|
|
|
14024
14027
|
],
|
|
14025
14028
|
"status-value:warning": [
|
|
14026
14029
|
react_default.createElement("svg", { key: "icon", viewBox: "0 0 14 14", width: "14", height: "14" }, react_default.createElement(UseSymbol, { type: "warning" })),
|
|
14027
|
-
|
|
14030
|
+
theme.fgColor.warning
|
|
14028
14031
|
],
|
|
14029
14032
|
"status-value:error": [
|
|
14030
14033
|
react_default.createElement("svg", { key: "icon", viewBox: "0 0 14 14", width: "14", height: "14" }, react_default.createElement(UseSymbol, { type: "error" })),
|
|
14031
|
-
|
|
14034
|
+
theme.fgColor.negative
|
|
14032
14035
|
]
|
|
14033
|
-
}, getMostCriticalStatusValue = (statusValues) => statusPriority.reduce(
|
|
14036
|
+
})[status]), getMostCriticalStatusValue = (statusValues) => statusPriority.reduce(
|
|
14034
14037
|
(acc, value) => statusValues.includes(value) ? value : acc,
|
|
14035
14038
|
"status-value:unknown"
|
|
14036
14039
|
);
|
|
@@ -14575,7 +14578,7 @@ var statusOrder = [
|
|
|
14575
14578
|
setExpanded,
|
|
14576
14579
|
onSelectStoryId,
|
|
14577
14580
|
api
|
|
14578
|
-
} = props, { isDesktop, isMobile: isMobile2, setMobileMenuOpen } = useLayout(), { counts, statusesByValue } = useStatusSummary(item);
|
|
14581
|
+
} = props, theme = useTheme(), { isDesktop, isMobile: isMobile2, setMobileMenuOpen } = useLayout(), { counts, statusesByValue } = useStatusSummary(item);
|
|
14579
14582
|
if (!isDisplayed)
|
|
14580
14583
|
return null;
|
|
14581
14584
|
let statusLinks = useMemo(() => {
|
|
@@ -14617,6 +14620,52 @@ var statusOrder = [
|
|
|
14617
14620
|
return [];
|
|
14618
14621
|
}, [counts, item.id, item.type, onSelectStoryId, statuses, statusesByValue]), id = createId(item.id, refId), contextMenu = refId === "storybook_internal" ? useContextMenu(item, statusLinks, api) : { node: null, onMouseEnter: () => {
|
|
14619
14622
|
} };
|
|
14623
|
+
if (item.type === "story" && !("children" in item && item.children) && (!("subtype" in item) || item.subtype !== "test") || item.type === "docs") {
|
|
14624
|
+
let LeafNode3 = item.type === "docs" ? DocumentNode : StoryNode, statusValue = getMostCriticalStatusValue(
|
|
14625
|
+
Object.values(statuses || {}).map((s2) => s2.value)
|
|
14626
|
+
), [icon, textColor] = getStatus(theme, statusValue);
|
|
14627
|
+
return react_default.createElement(
|
|
14628
|
+
LeafNodeStyleWrapper,
|
|
14629
|
+
{
|
|
14630
|
+
key: id,
|
|
14631
|
+
className: "sidebar-item",
|
|
14632
|
+
"data-selected": isSelected,
|
|
14633
|
+
"data-ref-id": refId,
|
|
14634
|
+
"data-item-id": item.id,
|
|
14635
|
+
"data-parent-id": item.parent,
|
|
14636
|
+
"data-nodetype": item.type === "docs" ? "document" : "story",
|
|
14637
|
+
"data-highlightable": isDisplayed,
|
|
14638
|
+
onMouseEnter: contextMenu.onMouseEnter
|
|
14639
|
+
},
|
|
14640
|
+
react_default.createElement(
|
|
14641
|
+
LeafNode3,
|
|
14642
|
+
{
|
|
14643
|
+
style: isSelected ? {} : { color: textColor },
|
|
14644
|
+
href: getLink(item, refId),
|
|
14645
|
+
id,
|
|
14646
|
+
depth: isOrphan ? item.depth : item.depth - 1,
|
|
14647
|
+
onClick: (event) => {
|
|
14648
|
+
event.preventDefault(), onSelectStoryId(item.id), isMobile2 && setMobileMenuOpen(!1);
|
|
14649
|
+
},
|
|
14650
|
+
...item.type === "docs" && { docsMode }
|
|
14651
|
+
},
|
|
14652
|
+
item.renderLabel?.(item, api) || item.name
|
|
14653
|
+
),
|
|
14654
|
+
isSelected && react_default.createElement(SkipToContentLink, { asChild: !0, ariaLabel: !1 }, react_default.createElement("a", { href: "#storybook-preview-wrapper" }, "Skip to canvas")),
|
|
14655
|
+
contextMenu.node,
|
|
14656
|
+
icon ? react_default.createElement(
|
|
14657
|
+
StatusButton,
|
|
14658
|
+
{
|
|
14659
|
+
ariaLabel: `Test status: ${statusValue.replace("status-value:", "")}`,
|
|
14660
|
+
"data-testid": "tree-status-button",
|
|
14661
|
+
type: "button",
|
|
14662
|
+
status: statusValue,
|
|
14663
|
+
selectedItem: isSelected
|
|
14664
|
+
},
|
|
14665
|
+
icon
|
|
14666
|
+
) : null
|
|
14667
|
+
);
|
|
14668
|
+
}
|
|
14620
14669
|
if (item.type === "root")
|
|
14621
14670
|
return react_default.createElement(
|
|
14622
14671
|
RootNode,
|
|
@@ -14658,7 +14707,7 @@ var statusOrder = [
|
|
|
14658
14707
|
isFullyExpanded ? react_default.createElement(CollapseIcon, null) : react_default.createElement(ExpandAltIcon, null)
|
|
14659
14708
|
)
|
|
14660
14709
|
);
|
|
14661
|
-
let itemStatus = getMostCriticalStatusValue(Object.values(statuses || {}).map((s2) => s2.value)), [itemIcon, itemColor] =
|
|
14710
|
+
let itemStatus = getMostCriticalStatusValue(Object.values(statuses || {}).map((s2) => s2.value)), [itemIcon, itemColor] = getStatus(theme, itemStatus), itemStatusButton = itemIcon ? react_default.createElement(
|
|
14662
14711
|
StatusButton,
|
|
14663
14712
|
{
|
|
14664
14713
|
ariaLabel: `Test status: ${itemStatus.replace("status-value:", "")}`,
|
|
@@ -14671,7 +14720,7 @@ var statusOrder = [
|
|
|
14671
14720
|
itemIcon
|
|
14672
14721
|
) : null;
|
|
14673
14722
|
if (item.type === "component" || item.type === "group" || item.type === "story" && "children" in item && item.children) {
|
|
14674
|
-
let { children = [] } = item, BranchNode2 = { component: ComponentNode, group: GroupNode, story: StoryNode }[item.type], status = getMostCriticalStatusValue([itemStatus, groupStatus?.[item.id]]), color2 = status ?
|
|
14723
|
+
let { children = [] } = item, BranchNode2 = { component: ComponentNode, group: GroupNode, story: StoryNode }[item.type], status = getMostCriticalStatusValue([itemStatus, groupStatus?.[item.id]]), color2 = status ? getStatus(theme, status)[1] : null, showBranchStatus = status === "status-value:error" || status === "status-value:warning";
|
|
14675
14724
|
return react_default.createElement(
|
|
14676
14725
|
LeafNodeStyleWrapper,
|
|
14677
14726
|
{
|
|
@@ -14745,8 +14794,7 @@ var statusOrder = [
|
|
|
14745
14794
|
depth: isOrphan ? item.depth : item.depth - 1,
|
|
14746
14795
|
onClick: (event) => {
|
|
14747
14796
|
event.preventDefault(), onSelectStoryId(item.id), isMobile2 && setMobileMenuOpen(!1);
|
|
14748
|
-
}
|
|
14749
|
-
...item.type === "docs" && { docsMode }
|
|
14797
|
+
}
|
|
14750
14798
|
},
|
|
14751
14799
|
item.renderLabel?.(item, api) || item.name
|
|
14752
14800
|
),
|
|
@@ -17581,13 +17629,13 @@ var { document: document7 } = scope, DEFAULT_MAX_SEARCH_RESULTS = 50, options =
|
|
|
17581
17629
|
openMenu,
|
|
17582
17630
|
closeMenu,
|
|
17583
17631
|
inputValue,
|
|
17584
|
-
clearSelection,
|
|
17585
17632
|
getInputProps,
|
|
17586
17633
|
getItemProps,
|
|
17587
17634
|
getLabelProps,
|
|
17588
17635
|
getMenuProps,
|
|
17589
17636
|
getRootProps,
|
|
17590
|
-
highlightedIndex
|
|
17637
|
+
highlightedIndex,
|
|
17638
|
+
reset
|
|
17591
17639
|
}) => {
|
|
17592
17640
|
let input = inputValue ? inputValue.trim() : "", results = input ? getResults(input) : [], lastViewed = !input && getLastViewed();
|
|
17593
17641
|
lastViewed && lastViewed.length && (results = lastViewed.reduce((acc, { storyId, refId }) => {
|
|
@@ -17630,7 +17678,9 @@ var { document: document7 } = scope, DEFAULT_MAX_SEARCH_RESULTS = 50, options =
|
|
|
17630
17678
|
padding: "small",
|
|
17631
17679
|
variant: "ghost",
|
|
17632
17680
|
ariaLabel: "Clear search",
|
|
17633
|
-
onClick: () =>
|
|
17681
|
+
onClick: () => {
|
|
17682
|
+
reset({ inputValue: "" }), closeMenu();
|
|
17683
|
+
}
|
|
17634
17684
|
},
|
|
17635
17685
|
react_default.createElement(CloseIcon, null)
|
|
17636
17686
|
), searchFieldContent)
|
|
@@ -17745,7 +17795,7 @@ var { document: document8 } = scope, ResultsList = styled.ol({
|
|
|
17745
17795
|
}
|
|
17746
17796
|
}
|
|
17747
17797
|
})), Result = react_default.memo(function({ item, matches, onClick, ...props }) {
|
|
17748
|
-
let click = useCallback(
|
|
17798
|
+
let theme = useTheme(), click = useCallback(
|
|
17749
17799
|
(event) => {
|
|
17750
17800
|
event.preventDefault(), onClick?.(event);
|
|
17751
17801
|
},
|
|
@@ -17753,8 +17803,8 @@ var { document: document8 } = scope, ResultsList = styled.ol({
|
|
|
17753
17803
|
), api = useStorybookApi();
|
|
17754
17804
|
useEffect(() => {
|
|
17755
17805
|
api && props.isHighlighted && item.type === "component" && api.emit(PRELOAD_ENTRIES, { ids: [item.children[0]] }, { options: { target: item.refId } });
|
|
17756
|
-
}, [props.isHighlighted, item]);
|
|
17757
|
-
let nameMatch = matches.find((match) => match.key === "name"), pathMatches = matches.filter((match) => match.key === "path"), [icon] = item.status ?
|
|
17806
|
+
}, [api, props.isHighlighted, item]);
|
|
17807
|
+
let nameMatch = matches.find((match) => match.key === "name"), pathMatches = matches.filter((match) => match.key === "path"), [icon] = item.status ? getStatus(theme, item.status) : [];
|
|
17758
17808
|
return react_default.createElement(ResultRow, { ...props, onClick: click }, react_default.createElement(IconWrapper2, null, item.type === "component" && react_default.createElement(TypeIcon2, { viewBox: "0 0 14 14", width: "14", height: "14", type: "component" }, react_default.createElement(UseSymbol, { type: "component" })), item.type === "story" && react_default.createElement(TypeIcon2, { viewBox: "0 0 14 14", width: "14", height: "14", type: item.subtype }, react_default.createElement(UseSymbol, { type: item.subtype })), !(item.type === "component" || item.type === "story") && react_default.createElement(TypeIcon2, { viewBox: "0 0 14 14", width: "14", height: "14", type: "document" }, react_default.createElement(UseSymbol, { type: "document" }))), react_default.createElement(ResultRowContent, { className: "search-result-item--label" }, react_default.createElement(Title, null, react_default.createElement(Highlight, { match: nameMatch }, item.name)), react_default.createElement(Path, null, item.path.map((group, index) => react_default.createElement("span", { key: index }, react_default.createElement(Highlight, { match: pathMatches.find((match) => match.arrayIndex === index) }, group))))), item.status ? react_default.createElement(StatusLabel, { status: item.status }, icon) : null);
|
|
17759
17809
|
}), SearchResults = react_default.memo(function({
|
|
17760
17810
|
query,
|