UNPKG

storybook

Version:

Storybook: Develop, document, and test UI components in isolation

1,458 lines (1,403 loc) • 715 kB
import { ActionBar, ScrollArea, createCopyToClipboardFunction } from "../_browser-chunks/chunk-RD3KTAHR.js"; import { _objectWithoutPropertiesLoose } from "../_browser-chunks/chunk-242VQQM5.js"; import { curriedDarken$1, curriedLighten$1, curriedTransparentize$1, rgba } from "../_browser-chunks/chunk-S6TK43XQ.js"; import { _extends } from "../_browser-chunks/chunk-LE2LTDW3.js"; import { isTestEnvironment } from "../_browser-chunks/chunk-MEXTPDJG.js"; import { require_memoizerific } from "../_browser-chunks/chunk-ZCFV7BZB.js"; import { __export, __toESM } from "../_browser-chunks/chunk-A242L54C.js"; // src/components/index.ts import { createElement as createElement2, forwardRef as forwardRef18 } from "react"; // src/components/components/typography/components.tsx import React4 from "react"; // src/components/components/typography/DocumentFormatting.tsx var nameSpaceClassNames = ({ ...props }, key) => { let classes = [props.class, props.className]; return delete props.class, props.className = ["sbdocs", `sbdocs-${key}`, ...classes].filter(Boolean).join(" "), props; }; // src/components/components/typography/ResetWrapper.tsx import { styled } from "storybook/theming"; // src/components/components/typography/lib/common.tsx var headerCommon = ({ theme }) => ({ margin: "20px 0 8px", padding: 0, cursor: "text", position: "relative", color: theme.color.defaultText, "&:first-of-type": { marginTop: 0, paddingTop: 0 }, "&:hover a.anchor": { textDecoration: "none" }, "& tt, & code": { fontSize: "inherit" } }), codeCommon = ({ theme }) => ({ lineHeight: 1, margin: "0 2px", padding: "3px 5px", whiteSpace: "nowrap", borderRadius: 3, fontSize: theme.typography.size.s2 - 1, border: theme.base === "light" ? "1px solid hsl(0 0 0 / 0.05)" : "1px solid hsl(0 0 100 / 0.05)", color: theme.color.defaultText, backgroundColor: theme.base === "light" ? "hsl(0 0 0 / 0.01)" : "hsl(0 0 100 / 0.02)" }), withReset = ({ theme }) => ({ fontFamily: theme.typography.fonts.base, fontSize: theme.typography.size.s3, margin: 0, WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale", WebkitTapHighlightColor: "rgba(0, 0, 0, 0)", WebkitOverflowScrolling: "touch" }), withMargin = { margin: "16px 0" }; // src/components/components/typography/ResetWrapper.tsx var ResetWrapper = styled.div(withReset); // src/components/components/typography/elements/A.tsx import { styled as styled2 } from "storybook/theming"; // src/components/components/typography/elements/Link.tsx import React from "react"; var Link = ({ href: input = "", ...props }) => { let href = /^\//.test(input) ? `./?path=${input}` : input, target = /^#.*/.test(input) ? "_self" : "_top"; return React.createElement("a", { href, target, ...props }); }; // src/components/components/typography/elements/A.tsx var A = styled2(Link)(({ theme }) => ({ ...withReset({ theme }), fontSize: "inherit", lineHeight: "24px", color: theme.color.secondary, // Ensure WCAG Level A compliance (SC 1.4.1), see https://www.w3.org/WAI/WCAG22/Techniques/failures/F73 textDecoration: "underline", textDecorationThickness: "0.03125rem", textUnderlineOffset: "0.11em", "&.absent": { color: "#cc0000" }, "&.anchor": { display: "block", paddingLeft: 30, marginLeft: -30, cursor: "pointer", position: "absolute", top: 0, left: 0, bottom: 0, textDecoration: "none" }, "&.anchor:hover, &.anchor:focus": { textDecoration: "underline" } })); // src/components/components/typography/elements/Blockquote.tsx import { styled as styled3 } from "storybook/theming"; var Blockquote = styled3.blockquote(({ theme }) => ({ ...withReset({ theme }), ...withMargin, borderLeft: `4px solid ${theme.color.medium}`, padding: "0 15px", color: theme.color.dark, "& > :first-of-type": { marginTop: 0 }, "& > :last-child": { marginBottom: 0 } })); // src/components/components/typography/elements/Code.tsx import React3, { Children } from "react"; import { styled as styled4 } from "storybook/theming"; // src/components/components/syntaxhighlighter/lazy-syntaxhighlighter.tsx import React2, { Suspense, lazy } from "react"; var languages = [], Comp = null, LazySyntaxHighlighter = lazy(async () => { let { SyntaxHighlighter: SyntaxHighlighter2 } = await import("../_browser-chunks/syntaxhighlighter-OH4MV7E3.js"); return languages.length > 0 && (languages.forEach((args) => { SyntaxHighlighter2.registerLanguage(...args); }), languages = []), Comp === null && (Comp = SyntaxHighlighter2), { default: (props) => React2.createElement(SyntaxHighlighter2, { ...props }) }; }), LazySyntaxHighlighterWithFormatter = lazy(async () => { let [{ SyntaxHighlighter: SyntaxHighlighter2 }, { formatter }] = await Promise.all([ import("../_browser-chunks/syntaxhighlighter-OH4MV7E3.js"), import("../_browser-chunks/formatter-EIJCOSYU.js") ]); return languages.length > 0 && (languages.forEach((args) => { SyntaxHighlighter2.registerLanguage(...args); }), languages = []), Comp === null && (Comp = SyntaxHighlighter2), { default: (props) => React2.createElement(SyntaxHighlighter2, { ...props, formatter }) }; }), SyntaxHighlighter = (props) => React2.createElement(Suspense, { fallback: React2.createElement("div", null) }, props.format !== !1 ? React2.createElement(LazySyntaxHighlighterWithFormatter, { ...props }) : React2.createElement(LazySyntaxHighlighter, { ...props })); SyntaxHighlighter.registerLanguage = (...args) => { if (Comp !== null) { Comp.registerLanguage(...args); return; } languages.push(args); }; // src/components/components/typography/lib/isReactChildString.tsx var isReactChildString = (child) => typeof child == "string"; // src/components/components/typography/elements/Code.tsx var isInlineCodeRegex = /[\n\r]/g, DefaultCodeBlock = styled4.code(({ theme }) => ({ // from reset fontFamily: theme.typography.fonts.mono, WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale", display: "inline-block", paddingLeft: 2, paddingRight: 2, verticalAlign: "baseline", color: "inherit", ...codeCommon({ theme }) })), StyledSyntaxHighlighter = styled4(SyntaxHighlighter)(({ theme }) => ({ // DocBlocks-specific styling and overrides fontFamily: theme.typography.fonts.mono, fontSize: `${theme.typography.size.s2 - 1}px`, lineHeight: "19px", margin: "25px 0 40px", borderRadius: theme.appBorderRadius, boxShadow: theme.base === "light" ? "rgba(0, 0, 0, 0.10) 0 1px 3px 0" : "rgba(0, 0, 0, 0.20) 0 2px 5px 0", "pre.prismjs": { padding: 20, background: "inherit" } })), Code = ({ className, children, ...props }) => { let language = (className || "").match(/lang-(\S+)/), childrenArray = Children.toArray(children); return childrenArray.filter(isReactChildString).some((child) => child.match(isInlineCodeRegex)) ? React3.createElement( StyledSyntaxHighlighter, { bordered: !0, copyable: !0, language: language?.[1] ?? "text", format: !1, ...props }, children ) : React3.createElement(DefaultCodeBlock, { ...props, className }, childrenArray); }; // src/components/components/typography/elements/DL.tsx import { styled as styled5 } from "storybook/theming"; var DL = styled5.dl(({ theme }) => ({ ...withReset({ theme }), ...withMargin, padding: 0, "& dt": { fontSize: "14px", fontWeight: "bold", fontStyle: "italic", padding: 0, margin: "16px 0 4px" }, "& dt:first-of-type": { padding: 0 }, "& dt > :first-of-type": { marginTop: 0 }, "& dt > :last-child": { marginBottom: 0 }, "& dd": { margin: "0 0 16px", padding: "0 15px" }, "& dd > :first-of-type": { marginTop: 0 }, "& dd > :last-child": { marginBottom: 0 } })); // src/components/components/typography/elements/Div.tsx import { styled as styled6 } from "storybook/theming"; var Div = styled6.div(withReset); // src/components/components/typography/elements/H1.tsx import { styled as styled7 } from "storybook/theming"; var H1 = styled7.h1(({ theme }) => ({ ...withReset({ theme }), ...headerCommon({ theme }), fontSize: `${theme.typography.size.l1}px`, fontWeight: theme.typography.weight.bold })); // src/components/components/typography/elements/H2.tsx import { styled as styled8 } from "storybook/theming"; var H2 = styled8.h2(({ theme }) => ({ ...withReset({ theme }), ...headerCommon({ theme }), fontSize: `${theme.typography.size.m2}px`, paddingBottom: 4, borderBottom: `1px solid ${theme.appBorderColor}` })); // src/components/components/typography/elements/H3.tsx import { styled as styled9 } from "storybook/theming"; var H3 = styled9.h3(({ theme }) => ({ ...withReset({ theme }), ...headerCommon({ theme }), fontSize: `${theme.typography.size.m1}px` })); // src/components/components/typography/elements/H4.tsx import { styled as styled10 } from "storybook/theming"; var H4 = styled10.h4(({ theme }) => ({ ...withReset({ theme }), ...headerCommon({ theme }), fontSize: `${theme.typography.size.s3}px` })); // src/components/components/typography/elements/H5.tsx import { styled as styled11 } from "storybook/theming"; var H5 = styled11.h5(({ theme }) => ({ ...withReset({ theme }), ...headerCommon({ theme }), fontSize: `${theme.typography.size.s2}px` })); // src/components/components/typography/elements/H6.tsx import { styled as styled12 } from "storybook/theming"; var H6 = styled12.h6(({ theme }) => ({ ...withReset({ theme }), ...headerCommon({ theme }), fontSize: `${theme.typography.size.s2}px`, color: theme.color.dark })); // src/components/components/typography/elements/HR.tsx import { styled as styled13 } from "storybook/theming"; var HR = styled13.hr(({ theme }) => ({ border: "0 none", borderTop: `1px solid ${theme.appBorderColor}`, height: 4, padding: 0 })); // src/components/components/typography/elements/Img.tsx import { styled as styled14 } from "storybook/theming"; var Img = styled14.img({ maxWidth: "100%" }); // src/components/components/typography/elements/LI.tsx import { styled as styled15 } from "storybook/theming"; var LI = styled15.li(({ theme }) => ({ ...withReset({ theme }), fontSize: theme.typography.size.s2, color: theme.color.defaultText, lineHeight: "24px", "& + li": { marginTop: ".25em" }, "& ul, & ol": { marginTop: ".25em", marginBottom: 0 }, "& code": codeCommon({ theme }) })); // src/components/components/typography/elements/OL.tsx import { styled as styled16 } from "storybook/theming"; var listCommon = { paddingLeft: 30, "& :first-of-type": { marginTop: 0 }, "& :last-child": { marginBottom: 0 } }, OL = styled16.ol(({ theme }) => ({ ...withReset({ theme }), ...withMargin, ...listCommon, listStyle: "decimal" })); // src/components/components/typography/elements/P.tsx import { styled as styled17 } from "storybook/theming"; var P = styled17.p(({ theme }) => ({ ...withReset({ theme }), ...withMargin, fontSize: theme.typography.size.s2, lineHeight: "24px", color: theme.color.defaultText, "& code": codeCommon({ theme }) })); // src/components/components/typography/elements/Pre.tsx import { styled as styled18 } from "storybook/theming"; var Pre = styled18.pre(({ theme }) => ({ ...withReset({ theme }), ...withMargin, // reset fontFamily: theme.typography.fonts.mono, WebkitFontSmoothing: "antialiased", MozOsxFontSmoothing: "grayscale", lineHeight: "18px", padding: "11px 1rem", whiteSpace: "pre-wrap", color: "inherit", borderRadius: 3, margin: "1rem 0", "&:not(.prismjs)": { background: "transparent", border: "none", borderRadius: 0, padding: 0, margin: 0 }, "& pre, &.prismjs": { padding: 15, margin: 0, whiteSpace: "pre-wrap", color: "inherit", fontSize: "13px", lineHeight: "19px", code: { color: "inherit", fontSize: "inherit" } }, "& code": { whiteSpace: "pre" }, "& code, & tt": { border: "none" } })); // src/components/components/typography/elements/Span.tsx import { styled as styled19 } from "storybook/theming"; var Span = styled19.span(({ theme }) => ({ ...withReset({ theme }), "&.frame": { display: "block", overflow: "hidden", "& > span": { border: `1px solid ${theme.color.medium}`, display: "block", float: "left", overflow: "hidden", margin: "13px 0 0", padding: 7, width: "auto" }, "& span img": { display: "block", float: "left" }, "& span span": { clear: "both", color: theme.color.darkest, display: "block", padding: "5px 0 0" } }, "&.align-center": { display: "block", overflow: "hidden", clear: "both", "& > span": { display: "block", overflow: "hidden", margin: "13px auto 0", textAlign: "center" }, "& span img": { margin: "0 auto", textAlign: "center" } }, "&.align-right": { display: "block", overflow: "hidden", clear: "both", "& > span": { display: "block", overflow: "hidden", margin: "13px 0 0", textAlign: "right" }, "& span img": { margin: 0, textAlign: "right" } }, "&.float-left": { display: "block", marginRight: 13, overflow: "hidden", float: "left", "& span": { margin: "13px 0 0" } }, "&.float-right": { display: "block", marginLeft: 13, overflow: "hidden", float: "right", "& > span": { display: "block", overflow: "hidden", margin: "13px auto 0", textAlign: "right" } } })); // src/components/components/typography/elements/TT.tsx import { styled as styled20 } from "storybook/theming"; var TT = styled20.title(codeCommon); // src/components/components/typography/elements/Table.tsx import { styled as styled21 } from "storybook/theming"; var Table = styled21.table(({ theme }) => ({ ...withReset({ theme }), ...withMargin, fontSize: theme.typography.size.s2, lineHeight: "24px", padding: 0, borderCollapse: "collapse", "& tr": { borderTop: `1px solid ${theme.appBorderColor}`, backgroundColor: theme.appContentBg, margin: 0, padding: 0 }, "& tr:nth-of-type(2n)": { backgroundColor: theme.base === "dark" ? theme.color.darker : theme.color.lighter }, "& tr th": { fontWeight: "bold", color: theme.color.defaultText, border: `1px solid ${theme.appBorderColor}`, margin: 0, padding: "6px 13px" }, "& tr td": { border: `1px solid ${theme.appBorderColor}`, color: theme.color.defaultText, margin: 0, padding: "6px 13px" }, "& tr th :first-of-type, & tr td :first-of-type": { marginTop: 0 }, "& tr th :last-child, & tr td :last-child": { marginBottom: 0 } })); // src/components/components/typography/elements/UL.tsx import { styled as styled22 } from "storybook/theming"; var listCommon2 = { paddingLeft: 30, "& :first-of-type": { marginTop: 0 }, "& :last-child": { marginBottom: 0 } }, UL = styled22.ul(({ theme }) => ({ ...withReset({ theme }), ...withMargin, ...listCommon2, listStyle: "disc" })); // src/components/components/typography/components.tsx var components = { h1: (props) => React4.createElement(H1, { ...nameSpaceClassNames(props, "h1") }), h2: (props) => React4.createElement(H2, { ...nameSpaceClassNames(props, "h2") }), h3: (props) => React4.createElement(H3, { ...nameSpaceClassNames(props, "h3") }), h4: (props) => React4.createElement(H4, { ...nameSpaceClassNames(props, "h4") }), h5: (props) => React4.createElement(H5, { ...nameSpaceClassNames(props, "h5") }), h6: (props) => React4.createElement(H6, { ...nameSpaceClassNames(props, "h6") }), pre: (props) => React4.createElement(Pre, { ...nameSpaceClassNames(props, "pre") }), a: (props) => React4.createElement(A, { ...nameSpaceClassNames(props, "a") }), hr: (props) => React4.createElement(HR, { ...nameSpaceClassNames(props, "hr") }), dl: (props) => React4.createElement(DL, { ...nameSpaceClassNames(props, "dl") }), blockquote: (props) => React4.createElement(Blockquote, { ...nameSpaceClassNames(props, "blockquote") }), table: (props) => React4.createElement(Table, { ...nameSpaceClassNames(props, "table") }), img: (props) => React4.createElement(Img, { ...nameSpaceClassNames(props, "img") }), div: (props) => React4.createElement(Div, { ...nameSpaceClassNames(props, "div") }), span: (props) => React4.createElement(Span, { ...nameSpaceClassNames(props, "span") }), li: (props) => React4.createElement(LI, { ...nameSpaceClassNames(props, "li") }), ul: (props) => React4.createElement(UL, { ...nameSpaceClassNames(props, "ul") }), ol: (props) => React4.createElement(OL, { ...nameSpaceClassNames(props, "ol") }), p: (props) => React4.createElement(P, { ...nameSpaceClassNames(props, "p") }), code: (props) => React4.createElement(Code, { ...nameSpaceClassNames(props, "code") }), tt: (props) => React4.createElement(TT, { ...nameSpaceClassNames(props, "tt") }), resetwrapper: (props) => React4.createElement(ResetWrapper, { ...nameSpaceClassNames(props, "resetwrapper") }) }; // src/components/components/Badge/Badge.tsx import React5 from "react"; import { styled as styled23 } from "storybook/theming"; var BadgeWrapper = styled23.div( ({ theme, compact }) => ({ display: "inline-flex", alignItems: "center", justifyContent: "center", fontSize: theme.typography.size.s1, fontWeight: theme.typography.weight.bold, lineHeight: "12px", minWidth: 20, borderRadius: 20, padding: compact ? "4px 7px" : "4px 10px" }), { svg: { height: 12, width: 12, marginRight: 4, marginTop: -2, path: { fill: "currentColor" } } }, ({ theme, status }) => { switch (status) { case "critical": return { color: theme.fgColor.critical, background: theme.bgColor.critical, boxShadow: `inset 0 0 0 1px ${theme.borderColor.critical}` }; case "negative": return { color: theme.fgColor.negative, background: theme.bgColor.negative, boxShadow: `inset 0 0 0 1px ${theme.borderColor.negative}` }; case "warning": return { color: theme.fgColor.warning, background: theme.bgColor.warning, boxShadow: `inset 0 0 0 1px ${theme.borderColor.warning}` }; case "neutral": return { color: theme.fgColor.muted, background: theme.base === "dark" ? theme.barBg : theme.background.app, boxShadow: `inset 0 0 0 1px ${curriedTransparentize$1(0.8, theme.textMutedColor)}` }; case "positive": return { color: theme.fgColor.positive, background: theme.bgColor.positive, boxShadow: `inset 0 0 0 1px ${theme.borderColor.positive}` }; case "active": return { color: theme.base === "light" ? curriedDarken$1(0.1, theme.color.secondary) : theme.color.secondary, background: theme.background.hoverable, boxShadow: `inset 0 0 0 1px ${curriedTransparentize$1(0.9, theme.color.secondary)}` }; default: return {}; } } ), Badge = ({ ...props }) => React5.createElement(BadgeWrapper, { ...props }); // src/components/components/typography/link/link.tsx import React6, { forwardRef } from "react"; import { deprecate } from "storybook/internal/client-logger"; import { ChevronRightIcon } from "@storybook/icons"; import { styled as styled24 } from "storybook/theming"; var LEFT_BUTTON = 0, isPlainLeftClick = (e) => e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey, cancelled = (e, cb) => { isPlainLeftClick(e) && (e.preventDefault(), cb(e)); }, LinkInner = styled24.span( ({ withArrow }) => withArrow ? { "> svg:last-of-type": { height: "0.7em", width: "0.7em", marginRight: 0, marginLeft: "0.25em", bottom: "auto", verticalAlign: "inherit" } } : {}, ({ containsIcon }) => containsIcon ? { svg: { height: "1em", width: "1em", verticalAlign: "middle", position: "relative", bottom: 0, marginRight: 0 } } : {} ), A2 = styled24.a( ({ theme }) => ({ display: "inline-block", transition: "all 150ms ease-out", textDecoration: "none", color: theme.color.secondary, "&:hover, &:focus": { cursor: "pointer", color: curriedDarken$1(0.07, theme.color.secondary), "svg path:not([fill])": { fill: curriedDarken$1(0.07, theme.color.secondary) } }, "&:active": { color: curriedDarken$1(0.1, theme.color.secondary), "svg path:not([fill])": { fill: curriedDarken$1(0.1, theme.color.secondary) } }, svg: { display: "inline-block", height: "1em", width: "1em", verticalAlign: "text-top", position: "relative", bottom: "-0.125em", marginRight: "0.4em", "& path": { fill: theme.color.secondary } } }), ({ theme, secondary, tertiary }) => { let colors; return secondary && (colors = [theme.textMutedColor, theme.color.secondary, theme.color.secondary]), tertiary && (colors = [theme.color.dark, theme.color.secondary, theme.color.secondary]), colors ? { color: colors[0], "svg path:not([fill])": { fill: colors[0] }, "&:hover": { color: colors[1], "svg path:not([fill])": { fill: colors[1] } }, "&:active": { color: colors[2], "svg path:not([fill])": { fill: colors[2] } } } : {}; }, ({ nochrome }) => nochrome ? { color: "inherit", "&:hover, &:active": { color: "inherit", textDecoration: "underline" } } : {}, ({ theme, inverse }) => inverse ? { color: theme.color.lightest, ":not([fill])": { fill: theme.color.lightest }, "&:hover": { color: theme.color.lighter, "svg path:not([fill])": { fill: theme.color.lighter } }, "&:active": { color: theme.color.light, "svg path:not([fill])": { fill: theme.color.light } } } : {}, ({ isButton: isButton2, theme }) => isButton2 ? { border: 0, borderRadius: theme.input.borderRadius, background: "none", padding: 0, fontSize: "inherit", lineHeight: "inherit", "&:focus-visible": { outline: `2px solid ${theme.color.secondary}`, outlineOffset: 2, // Should ensure focus outline gets drawn above next sibling zIndex: "1" } } : {} ), Link2 = forwardRef( ({ cancel = !0, children, onClick = void 0, withArrow = !1, containsIcon = !1, className = void 0, isButton: isButton2 = void 0, href, ...rest }, ref) => (isButton2 !== void 0 && deprecate( "Link: `isButton` is deprecated and will be removed in Storybook 11. Links without a `href` are automatically rendered as buttons." ), React6.createElement( A2, { as: href ? "a" : "button", href, ...rest, ref, isButton: !href || isButton2 === !0, onClick: onClick && cancel ? (e) => cancelled(e, onClick) : onClick, className }, React6.createElement(LinkInner, { withArrow, containsIcon }, children, withArrow && React6.createElement(ChevronRightIcon, null)) )) ); Link2.displayName = "Link"; // src/components/components/typography/DocumentWrapper.tsx import { styled as styled25 } from "storybook/theming"; var DocumentWrapper = styled25.div(({ theme }) => ({ fontSize: `${theme.typography.size.s2}px`, lineHeight: "1.6", h1: { fontSize: `${theme.typography.size.l1}px`, fontWeight: theme.typography.weight.bold }, h2: { fontSize: `${theme.typography.size.m2}px`, borderBottom: `1px solid ${theme.appBorderColor}` }, h3: { fontSize: `${theme.typography.size.m1}px` }, h4: { fontSize: `${theme.typography.size.s3}px` }, h5: { fontSize: `${theme.typography.size.s2}px` }, h6: { fontSize: `${theme.typography.size.s2}px`, color: theme.color.dark }, "pre:not(.prismjs)": { background: "transparent", border: "none", borderRadius: 0, padding: 0, margin: 0 }, "pre pre, pre.prismjs": { padding: 15, margin: 0, whiteSpace: "pre-wrap", color: "inherit", fontSize: "13px", lineHeight: "19px" }, "pre pre code, pre.prismjs code": { color: "inherit", fontSize: "inherit" }, "pre code": { margin: 0, padding: 0, whiteSpace: "pre", border: "none", background: "transparent" }, "pre code, pre tt": { backgroundColor: "transparent", border: "none" }, /* GitHub inspired Markdown styles loosely from https://gist.github.com/tuzz/3331384 */ "body > *:first-of-type": { marginTop: "0 !important" }, "body > *:last-child": { marginBottom: "0 !important" }, a: { color: theme.color.secondary, // Ensure WCAG Level A compliance (SC 1.4.1), see https://www.w3.org/WAI/WCAG22/Techniques/failures/F73 textDecoration: "underline", textDecorationThickness: "0.03125rem", textUnderlineOffset: "0.11em" }, "a.absent": { color: "#cc0000" }, "a.anchor": { display: "block", paddingLeft: 30, marginLeft: -30, cursor: "pointer", position: "absolute", top: 0, left: 0, bottom: 0, textDecoration: "none" }, "&.anchor:hover, &.anchor:focus": { textDecoration: "underline" }, "h1, h2, h3, h4, h5, h6": { margin: "20px 0 10px", padding: 0, cursor: "text", position: "relative", "&:first-of-type": { marginTop: 0, paddingTop: 0 }, "&:hover a.anchor": { textDecoration: "none" }, "& tt, & code": { fontSize: "inherit" } }, "h1:first-of-type + h2": { marginTop: 0, paddingTop: 0 }, "p, blockquote, ul, ol, dl, li, table, pre": { margin: "15px 0" }, hr: { border: "0 none", borderTop: `1px solid ${theme.appBorderColor}`, height: 4, padding: 0 }, "body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type": { marginTop: 0, paddingTop: 0 }, "body > h1:first-of-type + h2": { marginTop: 0, paddingTop: 0 }, "a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6": { marginTop: 0, paddingTop: 0 }, "h1 p, h2 p, h3 p, h4 p, h5 p, h6 p": { marginTop: 0 }, "li p.first": { display: "inline-block" }, "ul, ol": { paddingLeft: 30, "& :first-of-type": { marginTop: 0 }, "& :last-child": { marginBottom: 0 } }, dl: { padding: 0 }, "dl dt": { fontSize: "14px", fontWeight: "bold", fontStyle: "italic", margin: "0 0 15px", padding: "0 15px", "&:first-of-type": { padding: 0 }, "& > :first-of-type": { marginTop: 0 }, "& > :last-child": { marginBottom: 0 } }, blockquote: { borderLeft: `4px solid ${theme.color.medium}`, padding: "0 15px", color: theme.color.dark, "& > :first-of-type": { marginTop: 0 }, "& > :last-child": { marginBottom: 0 } }, table: { padding: 0, borderCollapse: "collapse", "& tr": { borderTop: `1px solid ${theme.appBorderColor}`, backgroundColor: "white", margin: 0, padding: 0, "& th": { fontWeight: "bold", border: `1px solid ${theme.appBorderColor}`, textAlign: "left", margin: 0, padding: "6px 13px" }, "& td": { border: `1px solid ${theme.appBorderColor}`, textAlign: "left", margin: 0, padding: "6px 13px" }, "&:nth-of-type(2n)": { backgroundColor: theme.color.lighter }, "& th :first-of-type, & td :first-of-type": { marginTop: 0 }, "& th :last-child, & td :last-child": { marginBottom: 0 } } }, img: { maxWidth: "100%" }, "span.frame": { display: "block", overflow: "hidden", "& > span": { border: `1px solid ${theme.color.medium}`, display: "block", float: "left", overflow: "hidden", margin: "13px 0 0", padding: 7, width: "auto" }, "& span img": { display: "block", float: "left" }, "& span span": { clear: "both", color: theme.color.darkest, display: "block", padding: "5px 0 0" } }, "span.align-center": { display: "block", overflow: "hidden", clear: "both", "& > span": { display: "block", overflow: "hidden", margin: "13px auto 0", textAlign: "center" }, "& span img": { margin: "0 auto", textAlign: "center" } }, "span.align-right": { display: "block", overflow: "hidden", clear: "both", "& > span": { display: "block", overflow: "hidden", margin: "13px 0 0", textAlign: "right" }, "& span img": { margin: 0, textAlign: "right" } }, "span.float-left": { display: "block", marginRight: 13, overflow: "hidden", float: "left", "& span": { margin: "13px 0 0" } }, "span.float-right": { display: "block", marginLeft: 13, overflow: "hidden", float: "right", "& > span": { display: "block", overflow: "hidden", margin: "13px auto 0", textAlign: "right" } }, "code, tt": { margin: "0 2px", padding: "0 5px", whiteSpace: "nowrap", border: `1px solid ${theme.color.mediumlight}`, backgroundColor: theme.color.lighter, borderRadius: 3, color: theme.base === "dark" ? theme.color.darkest : theme.color.dark } })); // src/components/components/ActionList/ActionList.tsx import React16, { forwardRef as forwardRef6 } from "react"; import { styled as styled30 } from "storybook/theming"; // src/components/components/Button/Button.tsx import React14, { forwardRef as forwardRef4, useEffect, useMemo as useMemo2, useState as useState3 } from "react"; import { deprecate as deprecate3 } from "storybook/internal/client-logger"; // ../../node_modules/@radix-ui/react-slot/dist/index.mjs import * as React8 from "react"; // ../../node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs import * as React7 from "react"; function setRef(ref, value) { if (typeof ref == "function") return ref(value); ref != null && (ref.current = value); } function composeRefs(...refs) { return (node) => { let hasCleanup = !1, cleanups = refs.map((ref) => { let cleanup = setRef(ref, node); return !hasCleanup && typeof cleanup == "function" && (hasCleanup = !0), cleanup; }); if (hasCleanup) return () => { for (let i = 0; i < cleanups.length; i++) { let cleanup = cleanups[i]; typeof cleanup == "function" ? cleanup() : setRef(refs[i], null); } }; }; } // ../../node_modules/@radix-ui/react-slot/dist/index.mjs import { Fragment as Fragment2, jsx } from "react/jsx-runtime"; var REACT_LAZY_TYPE = Symbol.for("react.lazy"), use = React8[" use ".trim().toString()]; function isPromiseLike(value) { return typeof value == "object" && value !== null && "then" in value; } function isLazyComponent(element) { return element != null && typeof element == "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload); } function createSlot(ownerName) { let SlotClone = createSlotClone(ownerName), Slot2 = React8.forwardRef((props, forwardedRef) => { let { children, ...slotProps } = props; isLazyComponent(children) && typeof use == "function" && (children = use(children._payload)); let childrenArray = React8.Children.toArray(children), slottable = childrenArray.find(isSlottable); if (slottable) { let newElement = slottable.props.children, newChildren = childrenArray.map((child) => child === slottable ? React8.Children.count(newElement) > 1 ? React8.Children.only(null) : React8.isValidElement(newElement) ? newElement.props.children : null : child); return jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React8.isValidElement(newElement) ? React8.cloneElement(newElement, void 0, newChildren) : null }); } return jsx(SlotClone, { ...slotProps, ref: forwardedRef, children }); }); return Slot2.displayName = `${ownerName}.Slot`, Slot2; } var Slot = createSlot("Slot"); function createSlotClone(ownerName) { let SlotClone = React8.forwardRef((props, forwardedRef) => { let { children, ...slotProps } = props; if (isLazyComponent(children) && typeof use == "function" && (children = use(children._payload)), React8.isValidElement(children)) { let childrenRef = getElementRef(children), props2 = mergeProps(slotProps, children.props); return children.type !== React8.Fragment && (props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef), React8.cloneElement(children, props2); } return React8.Children.count(children) > 1 ? React8.Children.only(null) : null; }); return SlotClone.displayName = `${ownerName}.SlotClone`, SlotClone; } var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable"); function createSlottable(ownerName) { let Slottable2 = ({ children }) => jsx(Fragment2, { children }); return Slottable2.displayName = `${ownerName}.Slottable`, Slottable2.__radixId = SLOTTABLE_IDENTIFIER, Slottable2; } var Slottable = createSlottable("Slottable"); function isSlottable(child) { return React8.isValidElement(child) && typeof child.type == "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER; } function mergeProps(slotProps, childProps) { let overrideProps = { ...childProps }; for (let propName in childProps) { let slotPropValue = slotProps[propName], childPropValue = childProps[propName]; /^on[A-Z]/.test(propName) ? slotPropValue && childPropValue ? overrideProps[propName] = (...args) => { let result = childPropValue(...args); return slotPropValue(...args), result; } : slotPropValue && (overrideProps[propName] = slotPropValue) : propName === "style" ? overrideProps[propName] = { ...slotPropValue, ...childPropValue } : propName === "className" && (overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ")); } return { ...slotProps, ...overrideProps }; } function getElementRef(element) { let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref); } // src/components/components/Button/Button.tsx import { shortcutToAriaKeyshortcuts } from "storybook/manager-api"; import { isPropValid, styled as styled28 } from "storybook/theming"; // src/components/components/Button/helpers/InteractiveTooltipWrapper.tsx import React12, { useMemo } from "react"; import { shortcutToHumanString } from "storybook/manager-api"; // src/components/components/tooltip/TooltipNote.tsx import React9 from "react"; import { styled as styled26 } from "storybook/theming"; var Note = styled26.div(({ theme }) => ({ padding: "2px 6px", lineHeight: "16px", fontSize: 10, fontWeight: theme.typography.weight.bold, color: theme.color.lightest, boxShadow: "0 0 5px 0 rgba(0, 0, 0, 0.3)", borderRadius: 4, whiteSpace: "nowrap", pointerEvents: "none", zIndex: -1, background: theme.base === "light" ? "rgba(60, 60, 60, 0.9)" : "rgba(0, 0, 0, 0.95)" })), TooltipNote = ({ note, ...props }) => React9.createElement(Note, { ...props }, note); // src/components/components/tooltip/TooltipProvider.tsx import React11, { useCallback as useCallback2, useState as useState2 } from "react"; import { deprecate as deprecate2 } from "storybook/internal/client-logger"; // ../../node_modules/@react-aria/utils/dist/useLayoutEffect.mjs import $HgANd$react from "react"; var $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document < "u" ? $HgANd$react.useLayoutEffect : () => { }; // ../../node_modules/@react-aria/utils/dist/useValueEffect.mjs import { useState as $fCAlL$useState, useRef as $fCAlL$useRef, useCallback as $fCAlL$useCallback } from "react"; function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) { let [value, setValue] = $fCAlL$useState(defaultValue), currValue = $fCAlL$useRef(value), effect = $fCAlL$useRef(null), nextRef = $fCAlL$useRef(() => { if (!effect.current) return; let newValue = effect.current.next(); if (newValue.done) { effect.current = null; return; } currValue.current === newValue.value ? nextRef.current() : setValue(newValue.value); }); $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => { currValue.current = value, effect.current && nextRef.current(); }); let queue = $fCAlL$useCallback((fn) => { effect.current = fn(currValue.current), nextRef.current(); }, [ nextRef ]); return [ value, queue ]; } // ../../node_modules/@react-aria/utils/dist/useId.mjs import { useState as $eKkEp$useState, useRef as $eKkEp$useRef, useEffect as $eKkEp$useEffect, useCallback as $eKkEp$useCallback } from "react"; // ../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs import $670gB$react, { useContext as $670gB$useContext, useState as $670gB$useState, useMemo as $670gB$useMemo, useLayoutEffect as $670gB$useLayoutEffect, useRef as $670gB$useRef } from "react"; var $b5e257d569688ac6$var$defaultContext = { prefix: String(Math.round(Math.random() * 1e10)), current: 0 }, $b5e257d569688ac6$var$SSRContext = $670gB$react.createContext($b5e257d569688ac6$var$defaultContext), $b5e257d569688ac6$var$IsSSRContext = $670gB$react.createContext(!1); var $b5e257d569688ac6$var$canUseDOM = !!(typeof window < "u" && window.document && window.document.createElement), $b5e257d569688ac6$var$componentIds = /* @__PURE__ */ new WeakMap(); function $b5e257d569688ac6$var$useCounter(isDisabled = !1) { let ctx = $670gB$useContext($b5e257d569688ac6$var$SSRContext), ref = $670gB$useRef(null); if (ref.current === null && !isDisabled) { var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = $670gB$react.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 || (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current; if (currentOwner) { let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner); prevComponentValue == null ? $b5e257d569688ac6$var$componentIds.set(currentOwner, { id: ctx.current, state: currentOwner.memoizedState }) : currentOwner.memoizedState !== prevComponentValue.state && (ctx.current = prevComponentValue.id, $b5e257d569688ac6$var$componentIds.delete(currentOwner)); } ref.current = ++ctx.current; } return ref.current; } function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) { let ctx = $670gB$useContext($b5e257d569688ac6$var$SSRContext); ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && process.env.NODE_ENV !== "production" && console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."); let counter = $b5e257d569688ac6$var$useCounter(!!defaultId), prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${ctx.prefix}`; return defaultId || `${prefix}-${counter}`; } function $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) { let id = $670gB$react.useId(), [didSSR] = $670gB$useState($b5e257d569688ac6$export$535bd6ca7f90a273()), prefix = didSSR || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`; return defaultId || `${prefix}-${id}`; } var $b5e257d569688ac6$export$619500959fc48b26 = typeof $670gB$react.useId == "function" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId; function $b5e257d569688ac6$var$getSnapshot() { return !1; } function $b5e257d569688ac6$var$getServerSnapshot() { return !0; } function $b5e257d569688ac6$var$subscribe(onStoreChange) { return () => { }; } function $b5e257d569688ac6$export$535bd6ca7f90a273() { return typeof $670gB$react.useSyncExternalStore == "function" ? $670gB$react.useSyncExternalStore($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot) : $670gB$useContext($b5e257d569688ac6$var$IsSSRContext); } // ../../node_modules/@react-aria/utils/dist/useId.mjs var $bdb11010cef70236$var$canUseDOM = !!(typeof window < "u" && window.document && window.document.createElement), $bdb11010cef70236$export$d41a04c74483c6ef = /* @__PURE__ */ new Map(), $bdb11010cef70236$var$registry; typeof FinalizationRegistry < "u" && ($bdb11010cef70236$var$registry = new FinalizationRegistry((heldValue) => { $bdb11010cef70236$export$d41a04c74483c6ef.delete(heldValue); })); function $bdb11010cef70236$export$f680877a34711e37(defaultId) { let [value, setValue] = $eKkEp$useState(defaultId), nextId = $eKkEp$useRef(null), res = $b5e257d569688ac6$export$619500959fc48b26(value), cleanupRef = $eKkEp$useRef(null); if ($bdb11010cef70236$var$registry && $bdb11010cef70236$var$registry.register(cleanupRef, res), $bdb11010cef70236$var$canUseDOM) { let cacheIdRef = $bdb11010cef70236$export$d41a04c74483c6ef.get(res); cacheIdRef && !cacheIdRef.includes(nextId) ? cacheIdRef.push(nextId) : $bdb11010cef70236$export$d41a04c74483c6ef.set(res, [ nextId ]); } return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => { let r2 = res; return () => { $bdb11010cef70236$var$registry && $bdb11010cef70236$var$registry.unregister(cleanupRef), $bdb11010cef70236$export$d41a04c74483c6ef.delete(r2); }; }, [ res ]), $eKkEp$useEffect(() => { let newId = nextId.current; return newId && setValue(newId), () => { newId && (nextId.current = null); }; }), res; } function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) { if (idA === idB) return idA; let setIdsA = $bdb11010cef70236$export$d41a04c74483c6ef.get(idA); if (setIdsA) return setIdsA.forEach((ref) => ref.current = idB), idB; let setIdsB = $bdb11010cef70236$export$d41a04c74483c6ef.get(idB); return setIdsB ? (setIdsB.forEach((ref) => ref.current = idA), idA) : idB; } function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) { let id = $bdb11010cef70236$export$f680877a34711e37(), [resolvedId, setResolvedId] = $1dbecbe27a04f9af$export$14d238f342723f25(id), updateId = $eKkEp$useCallback(() => { setResolvedId(function* () { yield id, yield document.getElementById(id) ? id : void 0; }); }, [ id, setResolvedId ]); return $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(updateId, [ id, updateId, ...depArray ]), resolvedId; } // ../../node_modules/@react-aria/utils/dist/chain.mjs function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) { return (...args) => { for (let callback of callbacks) typeof callback == "function" && callback(...args); }; } // ../../node_modules/@react-aria/utils/dist/domHelpers.mjs var $431fbd86ca7dc216$export$b204af158042fbac = (el) => { var _el_ownerDocument; return (_el_ownerDocument = el?.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document; }, $431fbd86ca7dc216$export$f21a1ffae260145a = (el) => el && "window" in el && el.window === el ? el : $431fbd86ca7dc216$export$b204af158042fbac(el).defaultView || window; function $431fbd86ca7dc216$var$isNode(value) { return value !== null && typeof value == "object" && "nodeType" in value && typeof value.nodeType == "number"; } function $431fbd86ca7dc216$export$af51f0f06c0f328a(node) { return $431fbd86ca7dc216$var$isNode(node) && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in node; } // ../../node_modules/@react-stately/flags/dist/import.mjs var $f4e2df6bd15f8569$var$_shadowDOM = !1; function $f4e2df6bd15f8569$export$98658e8c59125e6a() { return $f4e2df6bd15f8569$var$_shadowDOM; } // ../../node_modules/@react-aria/utils/dist/DOMFunctions.mjs function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) { if (!$f4e2df6bd15f8569$export$98658e8c59125e6a()) return otherNode && node ? node.contains(otherNode) : !1; if (!node || !otherNode) return !1; let currentNode = otherNode; for (; currentNode !== null; ) { if (currentNode === node) return !0; currentNode.tagName === "SLOT" && currentNode.assignedSlot ? currentNode = currentNode.assignedSlot.parentNode : $431fbd86ca7dc216$export$af51f0f06c0f328a(currentNode) ? currentNode = currentNode.host : currentNode = currentNode.parentNode; } return !1; } var $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document) => { var _activeElement_shadowRoot; if (!$f4e2df6bd15f8569$export$98658e8c59125e6a()) return doc.activeElement; let activeElement = doc.activeElement; for (; activeElement && "shadowRoot" in activeElement && (!((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0) && _activeElement_shadowRoot.activeElement); ) activeElement = activeElement.shadowRoot.activeElement; return activeElement; }; function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) { return $f4e2df6bd15f8569$export$98658e8c59125e6a() && event.target.shadowRoot && event.composedPath ? event.composedPath()[0] : event.target; } // ../../node_modules/@react-aria/utils/dist/ShadowTreeWalker.mjs var $dfc540311bf7f109$export$63eb3ababa9c55c4 = class { get currentNode() { return this._currentNode; } set currentNode(node) { if (!$d4ee10de306f2510$export$4282f70798064fe0(this.root, node)) throw new Error("Cannot set currentNode to a node that is not contained by the root node."); let walkers = [], curNode = node, currentWalkerCurrentNode = node; for (this._currentNode = node; curNode && curNode !== this.root; ) if (curNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { let shadowRoot = curNode, walker2 = this._doc.createTreeWalker(shadowRoot, this.whatToShow, { acceptNode: this._acceptNode }); walkers.push(walker2), walker2.currentNode = currentWalkerCurrentNode, this._currentSetFor.add(walker2), curNode = currentWalkerCurrentNode = shadowRoot.host; } else curNode = curNode.parentNode; let walker = this._doc.createTreeWalker(this.root, this.whatToShow, { acceptNode: this._acceptNode }); walkers.push(walker), walker.currentNode = currentWalkerCurrentNode, this._currentSetFor.add(walker), this._walkerStack = walkers; } get doc() { return this._doc; } firstChild() { let currentNode = this.currentNode, newNode = this.nextNode(); return $d4ee10de306f2510$export$4282f70798064fe0(currentNode, newNode) ? (newNode && (this.currentNode = newNode), newNode) : (this.currentNode = currentNode, null); } lastChild() { let newNode = this._walkerStack[0].lastChild(); return newNode && (this.currentNode = newNode), newNode; } nextNode() { let nextNode = this._walkerStack[0].nextNode(); if (nextNode) { if (nextNode.shadowRoot) { var _this_filter; let nodeResult; if (typeof this.filter == "function" ? nodeResult = this.filter(nextNode) : !((_this_filter = this.filter) === null || _this_filter === void 0) && _this_filter.acceptNode && (nodeResult = this.filter.acceptNode(nextNode)), nodeResult === NodeFilter.FILTER_ACCEPT) return this.currentNode = nextNode, nextNode; let newNode = this.nextNode(); return newNode && (this.currentNode = newNode), newNode; } return nextNode && (this.currentNode = nextNode), nextNode; } else if (this._walkerStack.length > 1) { this._walkerStack.shift(); let newNode = this.nextNode(); return newNode && (this.currentNode = newNode), newNode; } else return null; } previousNode() { let currentWalker = this._walkerStack[0]; if (currentWalker.currentNode === currentWalker.root) { if (this._currentSetFor.has(currentWalker)) if (this._currentSetFor.delete(currentWalker), this._walkerStack.length > 1) { this._walkerStack.shift(); let newNode = this.previousNode(); return newNode && (this.currentNode = newNode), newNode; } else return null; return null; } let previousNode = currentWalker.previousNode(); if (previousNode) { if (previousNode.shadowRoot) { var _this_filter; let nodeResult; if (typeof this.filter == "function" ? nodeResult = this.filter(pre