{"v":0,"components":{"packages-accordion-accordionsection":{"id":"packages-accordion-accordionsection","name":"AccordionSection","path":"./__docs__/wonder-blocks-accordion/accordion-section.stories.tsx","stories":[{"id":"packages-accordion-accordionsection--default","name":"Default","snippet":"const Default = () => <AccordionSection\n    header=\"Standalone section\"\n    caretPosition=\"end\"\n    cornerKind=\"rounded\"\n    collapsible\n    expanded={false}>This is the information present in this standalone section</AccordionSection>;","description":"By default, an AccordionSection is an uncontrolled component. To make it a controlled component, pass in BOTH the `expanded` prop and the `onToggle` prop. See more in the [Controlled](#controlled) and [Uncontrolled](#uncontrolled) examples below. Visually by default, an AccordionSection has a caret at the end of the header block and rounded corners. Passing in a string into the header prop will automatically style the header and add spacing between the header and the caret. Passing in a string into the children prop will automatically give the children Body typography from Wonder Blocks Typography."},{"id":"packages-accordion-accordionsection--controlled","name":"Controlled","snippet":"const Controlled = function Render() {\n    const [expanded, setExpanded] = React.useState(false);\n\n    const handleToggle = () => {\n        // eslint-disable-next-line no-console\n        console.log(\"Click! This function is being called!\");\n        setExpanded(!expanded);\n    };\n\n    return (\n        <View>\n            <Button\n                onClick={() => setExpanded(!expanded)}\n                style={styles.button}\n            >\n                Click me to toggle the accordion section\n            </Button>\n            <BodyText weight=\"bold\" style={styles.space}>\n                {`Expanded state: ${expanded}`}\n            </BodyText>\n            <AccordionSection\n                expanded={expanded}\n                header=\"Controlled section\"\n                onToggle={handleToggle}\n            >\n                This is the information present in this controlled section\n            </AccordionSection>\n        </View>\n    );\n};","description":"AccordionSection is a controlled component if the `expanded` and `onToggle` props are passed in. The `expanded` prop determines whether the section is expanded or closed, and the `onToggle` prop function is called when the section header is clicked, and is generally used to set the `expanded` state outside where this section is used. Here is an example of how to set this up. The `expanded` prop is initially set to `false` and is toggled by the `handleToggle` function. The `handleToggle` function is passed into the `onToggle` prop of the AccordionSection. The `handleToggle` function is also called when the button is clicked."},{"id":"packages-accordion-accordionsection--uncontrolled","name":"Uncontrolled","snippet":"const Uncontrolled = function Render() {\n    return (\n        <AccordionSection\n            header=\"Uncontrolled section\"\n            onToggle={() =>\n                // eslint-disable-next-line no-console\n                console.log(\"Click! This function is being called!\")\n            }\n        >\n            This is the information present in this uncontrolled section\n        </AccordionSection>\n    );\n};","description":"AccordionSection is an uncontrolled component when the `expanded` prop is not passed in or the `onToggle` prop is not passed in. In this case, the AccordionSection will manage its own state. If the `onToggle` prop is passed in (and `expanded` is not), the `onToggle` function will be called; this is to ensure that any functions depending on the title click will still work (e.g. analytics). If the `expanded` prop is passed in (and `onToggle` is not), this `expanded` prop will be used to determine whether the section is expanded at first. In this example, you can see that there is no explicit state management (as opposed to the [Controlled](#controlled) example above). The AccordionSection manages its own state, but the `onToggle` prop function is still called when the section header is clicked."},{"id":"packages-accordion-accordionsection--react-element-in-header","name":"React Element In Header","snippet":"const ReactElementInHeader = function Render() {\n    return (\n        <View>\n            <AccordionSection\n                header={\n                    <DetailCell\n                        title=\"Header for article item\"\n                        leftAccessory={\n                            <PhosphorIcon\n                                icon={IconMappings.playCircle}\n                                size=\"medium\"\n                            />\n                        }\n                        horizontalRule=\"none\"\n                    />\n                }\n            >\n                This is the information present in the first section\n            </AccordionSection>\n            <Strut size={32} />\n            {/* The following AccordionSection is implemented\n            the same way as the CourseAccordion in the LearnableNodeSidebar\n            that can be found on Khan Academy. It should truncate the\n            text with ellipses when the window size is small.*/}\n            <AccordionSection\n                header={\n                    <View\n                        style={{\n                            flexDirection: \"row\",\n                            margin: sizing.size_160,\n                        }}\n                    >\n                        <View\n                            style={{\n                                backgroundSize: \"contain\",\n                                borderRadius: border.radius.radius_080,\n                                height: 40,\n                                marginInlineEnd: sizing.size_120,\n                                minInlineSize: 40,\n                                padding: sizing.size_080,\n                                width: 40,\n                            }}\n                        >\n                            <PhosphorIcon\n                                aria-hidden=\"true\"\n                                icon={magnifyingGlass}\n                                size=\"medium\"\n                                style={styles.icon}\n                            />\n                        </View>\n                        <BodyText\n                            weight=\"bold\"\n                            // Rendering as a span here to avoid introducing\n                            // an extra heading level, since h2 is already\n                            // set on the AccordionSection's clickable\n                            // header. This way we can avoid redundancy in\n                            // the a11y tree.\n                            tag=\"span\"\n                            style={{\n                                whiteSpace: \"nowrap\",\n                                overflow: \"hidden\",\n                                textOverflow: \"ellipsis\",\n                                alignSelf: \"center\",\n                                fontSize: font.heading.size.medium,\n                                lineHeight: font.heading.lineHeight.medium,\n                            }}\n                        >\n                            World History Project - Origins to the Present\n                            (Example of a long title)\n                        </BodyText>\n                    </View>\n                }\n            >\n                This is the information present in the second section\n            </AccordionSection>\n        </View>\n    );\n};","description":"An AccordionSection can have either a string or a React Element passed in as its header. Passing in a React Element means no built in styling will be applied to the header. The first example here shows how a DetailCell can be used as the header. The second example shows how a custom header can be created - note that in this example, a smaller window size will cause the header text to truncate with ellipses."},{"id":"packages-accordion-accordionsection--react-element-in-children","name":"React Element In Children","snippet":"const ReactElementInChildren = function Render() {\n    const [expanded, setExpanded] = React.useState(true);\n\n    return (\n        <AccordionSection\n            header=\"First section\"\n            expanded={expanded}\n            onToggle={setExpanded}\n        >\n            <DetailCell\n                title=\"Child article item\"\n                leftAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.playCircle}\n                        size=\"medium\"\n                    />\n                }\n                horizontalRule=\"none\"\n                styles={{\n                    root: {\n                        borderTop: `1px solid ${semanticColor.core.border.neutral.subtle}`,\n                    },\n                }}\n            />\n        </AccordionSection>\n    );\n};","description":"An AccordionSection can have either a string or a React Element passed in as its children. Passing in a React Element means no built in styling will be applied to the children. In this example, all the children styles are coming from the DetailCell component, including the horizontal line between the header and the content (added as a borderTop on the DetailCell). Note that if the AccordionSection has a `cornerKind` of `\"rounded\"` or `\"rounded-per-section\"`, the child React Element will have its corners cut off."},{"id":"packages-accordion-accordionsection--caret-positions","name":"Caret Positions","snippet":"const CaretPositions = function Render() {\n    const [expanded, setExpanded] = React.useState(Array(4).fill(false));\n\n    const handleToggle = (index: number) => {\n        const newExpanded = [...expanded];\n        newExpanded[index] = !newExpanded[index];\n        setExpanded(newExpanded);\n    };\n\n    return (\n        <View>\n            {/* Left-to-right */}\n            <View style={styles.sideBySide}>\n                <View style={styles.fullWidth}>\n                    <BodyText weight=\"bold\" style={styles.space}>\n                        Caret position: end, language direction: left to\n                        right\n                    </BodyText>\n                    <AccordionSection\n                        caretPosition=\"end\"\n                        header=\"Header\"\n                        expanded={expanded[0]}\n                        onToggle={() => handleToggle(0)}\n                    >\n                        Something\n                    </AccordionSection>\n                </View>\n                <Strut size={32} />\n                <View style={styles.fullWidth}>\n                    <BodyText weight=\"bold\" style={styles.space}>\n                        Caret position: start, language direction: left to\n                        right\n                    </BodyText>\n                    <AccordionSection\n                        caretPosition=\"start\"\n                        header=\"Header\"\n                        expanded={expanded[1]}\n                        onToggle={() => handleToggle(1)}\n                    >\n                        Something\n                    </AccordionSection>\n                </View>\n            </View>\n            <Strut size={32} />\n            {/* Right-to-left */}\n            <View dir=\"rtl\" style={styles.sideBySide}>\n                <View style={styles.fullWidth}>\n                    <BodyText weight=\"bold\" style={styles.space}>\n                        Caret position: end, language direction: right to\n                        left\n                    </BodyText>\n                    <AccordionSection\n                        caretPosition=\"end\"\n                        header=\"ہیڈر\"\n                        expanded={expanded[2]}\n                        onToggle={() => handleToggle(2)}\n                    >\n                        کچھ\n                    </AccordionSection>\n                </View>\n                <Strut size={32} />\n                <View style={styles.fullWidth}>\n                    <BodyText weight=\"bold\" style={styles.space}>\n                        Caret position: start, language direction: right to\n                        left\n                    </BodyText>\n                    <AccordionSection\n                        caretPosition=\"start\"\n                        header=\"ہیڈر\"\n                        expanded={expanded[3]}\n                        onToggle={() => handleToggle(3)}\n                    >\n                        کچھ\n                    </AccordionSection>\n                </View>\n            </View>\n        </View>\n    );\n};","description":"An AccordionSection can have the caret at the start or the end of the header block. \"start\" means it’s on the left of a left-to-right language (and on the right of a right-to-left language), and \"end\" means it’s on the right of a left-to-right language (and on the left of a right-to-left language). If the `caretPosition` prop is specified both here in the AccordionSection and within the parent Accordion component, the AccordionSection's `caretPosition` value is prioritized."},{"id":"packages-accordion-accordionsection--corner-kinds","name":"Corner Kinds","snippet":"const CornerKinds = function Render() {\n    const [expanded, setExpanded] = React.useState(Array(4).fill(false));\n\n    const handleToggle = (index: number) => {\n        const newExpanded = [...expanded];\n        newExpanded[index] = !newExpanded[index];\n        setExpanded(newExpanded);\n    };\n\n    return (\n        <View style={styles.sideBySide}>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\" style={styles.space}>\n                    Corner kind: square\n                </BodyText>\n                <AccordionSection\n                    cornerKind=\"square\"\n                    header=\"Header\"\n                    expanded={expanded[0]}\n                    onToggle={() => handleToggle(0)}\n                >\n                    Something\n                </AccordionSection>\n            </View>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\" style={styles.space}>\n                    Corner kind: rounded\n                </BodyText>\n                <AccordionSection\n                    cornerKind=\"rounded\"\n                    header=\"Header\"\n                    expanded={expanded[1]}\n                    onToggle={() => handleToggle(1)}\n                >\n                    Something\n                </AccordionSection>\n            </View>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\" style={styles.space}>\n                    Corner kind: rounded-per-section\n                </BodyText>\n                <AccordionSection\n                    cornerKind=\"rounded-per-section\"\n                    header=\"Header\"\n                    expanded={expanded[2]}\n                    onToggle={() => handleToggle(2)}\n                >\n                    Something\n                </AccordionSection>\n            </View>\n        </View>\n    );\n};","description":"An AccordionSection can have different corner kinds. If `cornerKind` is `square`, the corners have no border radius. If `cornerKind` is `rounded`, the corners are rounded. If `cornerKind` is `rounded-per-section`, the corners are rounded and there is a bottom margin. If `cornerKind` is specified both here in the AccordionSection and within a parent Accordion component, the AccordionSection’s `cornerKind value is prioritized."},{"id":"packages-accordion-accordionsection--not-collapsible","name":"Not Collapsible","snippet":"const NotCollapsible = () => (\n    <AccordionSection\n        header=\"This section is not collapsible\"\n        collapsible={false}\n    >\n        Something\n    </AccordionSection>\n);","description":"An AccordionSection can have its `collapsible` prop set to false. This means that the section's header will not be clickable, and the section will always be expanded. NOTE: It is recommended to only use this prop when the AccordionSection is used on its own, not within an Accordion."},{"id":"packages-accordion-accordionsection--with-animation","name":"With Animation","snippet":"const WithAnimation = () => {\n    return (\n        <AccordionSection header=\"This section is animated\" animated={true}>\n            Something\n        </AccordionSection>\n    );\n};","description":"An AccordionSection can be animated using the `animated` prop. This animation includes the caret, the expansion/collapse, and the border radius. If the user has `prefers-reduced-motion` opted in, this animation should be disabled. This can be done by passing `animated={false}` to the AccordionSection. If `animated` is specified both here in the AccordionSection and within a parent Accordion component, the AccordionSection's `animated` value is prioritized. **NOTE: HEIGHT ANIMATIONS ARE INHERENTLY NOT PERFORMANT.** USING ANIMATIONS *WILL* DECREASE PERFORMANCE. It is recommended that animations be used sparingly for this reason, and only on lighter accordions."},{"id":"packages-accordion-accordionsection--with-style","name":"With Style","snippet":"const WithStyle = function Render() {\n    const [expanded, setExpanded] = React.useState(true);\n\n    const customStyles = {\n        backgroundColor: semanticColor.core.background.neutral.subtle,\n        margin: sizing.size_240,\n        outline: `2px solid ${semanticColor.core.border.neutral.subtle}`,\n    };\n\n    return (\n        <AccordionSection\n            header=\"Section with style\"\n            style={customStyles}\n            expanded={expanded}\n            onToggle={setExpanded}\n        >\n            I have a gray background!\n        </AccordionSection>\n    );\n};","description":"An AccordionSection can have custom styles passed in. In this example, the AccordionSection has a gray background and a border, as well as extra margin."},{"id":"packages-accordion-accordionsection--with-header-style","name":"With Header Style","snippet":"const WithHeaderStyle = function Render() {\n    const [expanded, setExpanded] = React.useState(false);\n\n    const headerStyle = {\n        backgroundColor: semanticColor.core.background.neutral.subtle,\n    };\n\n    return (\n        <AccordionSection\n            header=\"Section with style\"\n            headerStyle={headerStyle}\n            expanded={expanded}\n            onToggle={setExpanded}\n        >\n            I have a gray background!\n        </AccordionSection>\n    );\n};","description":"An AccordionSection can have custom styles passed in for the header. In this example, the header has a gray background."},{"id":"packages-accordion-accordionsection--with-tag","name":"With Tag","snippet":"const WithTag = function Render() {\n    const [expanded, setExpanded] = React.useState(false);\n\n    return (\n        <AccordionSection\n            header=\"h3 section\"\n            tag=\"h3\"\n            expanded={expanded}\n            onToggle={setExpanded}\n        >\n            I am an h3!\n        </AccordionSection>\n    );\n};","description":"An AccordionSection can be given a semantic tag to apply to its header. This is h2 by default, but it should be changed to match the hierarchy of the page for accessibility!!! In this example, the AccordionSection has an h3 tag, so the header will show up as an h3 in the DOM."}],"import":"import { AccordionSection, ComponentInfo, Strut } from \"@khanacademy/wonder-blocks-accordion\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { DetailCell } from \"@khanacademy/wonder-blocks-cell\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"An AccordionSection displays a section of content that can be shown or hidden by clicking its header. This is generally used within the Accordion component, but it can also be used on its own if you need only one collapsible section. ### Usage ```jsx import { Accordion, AccordionSection } from \"@khanacademy/wonder-blocks-accordion\"; // Within an Accordion <Accordion> <AccordionSection header=\"First section\"> This is the information present in the first section </AccordionSection> <AccordionSection header=\"Second section\"> This is the information present in the second section </AccordionSection> <AccordionSection header=\"Third section\"> This is the information present in the third section </AccordionSection> </Accordion> // On its own, controlled const [expanded, setExpanded] = React.useState(false); <AccordionSection header=\"A standalone section\" expanded={expanded} onToggle={setExpanded} > This is the information present in the standalone section </AccordionSection> // On its own, uncontrolled <AccordionSection header=\"A standalone section\"> This is the information present in the standalone section </AccordionSection> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-accordion/src/index.ts","description":"An AccordionSection displays a section of content that can be shown or\nhidden by clicking its header. This is generally used within the Accordion\ncomponent, but it can also be used on its own if you need only one\ncollapsible section.\n\n### Usage\n\n```jsx\nimport {\n     Accordion,\n     AccordionSection\n} from \"@khanacademy/wonder-blocks-accordion\";\n\n// Within an Accordion\n<Accordion>\n  <AccordionSection header=\"First section\">\n      This is the information present in the first section\n  </AccordionSection>\n  <AccordionSection header=\"Second section\">\n      This is the information present in the second section\n  </AccordionSection>\n  <AccordionSection header=\"Third section\">\n      This is the information present in the third section\n  </AccordionSection>\n</Accordion>\n\n// On its own, controlled\nconst [expanded, setExpanded] = React.useState(false);\n<AccordionSection\n    header=\"A standalone section\"\n    expanded={expanded}\n    onToggle={setExpanded}\n>\n   This is the information present in the standalone section\n</AccordionSection>\n\n// On its own, uncontrolled\n<AccordionSection header=\"A standalone section\">\n  This is the information present in the standalone section\n</AccordionSection>\n```","displayName":"AccordionSection","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The unique identifier for the accordion section.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"The content to display when this section is shown. If a string is\npassed in, it will automatically be given Body typography from\nWonder Blocks Typography.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string | ReactElement<any, string | JSXElementConstructor<any>>"}},"header":{"defaultValue":null,"description":"The header for this section. If a string is passed in, it will\nautomatically be given Body typography from Wonder Blocks Typography.","name":"header","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string | ReactElement<any, string | JSXElementConstructor<any>>"}},"caretPosition":{"defaultValue":null,"description":"Whether to put the caret at the start or end of the header block\nin this section. \"start\" means it’s on the left of a left-to-right\nlanguage (and on the right of a right-to-left language), and \"end\"\nmeans it’s on the right of a left-to-right language\n(and on the left of a right-to-left language).\nDefaults to \"end\".\n\nIf this prop is specified both here in the AccordionSection and\nwithin a parent Accordion component, the AccordionSection’s caretPosition\nvalue is prioritized.","name":"caretPosition","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"start\" | \"end\"","value":[{"value":"\"start\""},{"value":"\"end\""}]}},"cornerKind":{"defaultValue":null,"description":"The preset styles for the corners of this accordion.\n`square` - corners have no border radius.\n`rounded` - the overall container's corners are rounded.\n`rounded-per-section` - each section's corners are rounded, and there\nis white space between each section.\n\nIf this prop is specified both here in the AccordionSection and\nwithin a parent Accordion component, the AccordionSection’s cornerKind\nvalue is prioritized.","name":"cornerKind","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AccordionCornerKindType","value":[{"value":"\"square\""},{"value":"\"rounded\""},{"value":"\"rounded-per-section\""}]}},"collapsible":{"defaultValue":null,"description":"Whether this section is collapsible. If false, the header will not be\nclickable, and the section will stay expanded at all times.","name":"collapsible","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"expanded":{"defaultValue":null,"description":"Whether this section is expanded or closed.\n\nNOTE: This prop is NOT used when this AccordionSection is rendered\nwithin an Accordion component. In that case, the Accordion component\nmanages the expanded state of the AccordionSection.","name":"expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"animated":{"defaultValue":null,"description":"Whether to include animation on the header. This should be false\nif the user has `prefers-reduced-motion` opted in. Defaults to false.\n\nIf this prop is specified both here in the AccordionSection and\nwithin a parent Accordion component, the AccordionSection’s animated\nvalue is prioritized.","name":"animated","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onToggle":{"defaultValue":null,"description":"Called when the header is clicked.\nTakes the new expanded state as an argument. This way, the function\nreturned from React.useState can be passed in directly.","name":"onToggle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((newExpandedState: boolean) => unknown)"}},"style":{"defaultValue":null,"description":"Custom styles for the overall accordion section container.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"headerStyle":{"defaultValue":null,"description":"Custom styles for the header.","name":"headerStyle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"tag":{"defaultValue":null,"description":"The semantic tag for this clickable header (e.g. \"h1\", \"h2\", etc).\nPlease use this to ensure that the header is hierarchically correct.\nDefaults to \"h2\".","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"TagType","value":[{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""}]}},"testId":{"defaultValue":null,"description":"The test ID used to locate this component in automated tests.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"isFirstSection":{"defaultValue":null,"description":"Whether this section is the first section in the accordion.\nFor internal use only.\n@ignore","name":"isFirstSection","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"isLastSection":{"defaultValue":null,"description":"Whether this section is the last section in the accordion.\nFor internal use only.\n@ignore","name":"isLastSection","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"isRegion":{"defaultValue":null,"description":"Whether this section should have role=\"region\". True by default.\nAccording to W3, the panel container should have role region except\nwhen there are more than six panels in an accordion, in which case\nwe should set this prop to false.\nFor internal use only.\n@ignore","name":"isRegion","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion-section.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLButtonElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"AccordionSection"}},"packages-accordion-accordion":{"id":"packages-accordion-accordion","name":"Accordion","path":"./__docs__/wonder-blocks-accordion/accordion.stories.tsx","stories":[{"id":"packages-accordion-accordion--default","name":"Default","snippet":"const Default = () => <Accordion caretPosition=\"end\" cornerKind=\"rounded\" allowMultipleExpanded>{exampleSections}</Accordion>;","description":"By default, an accordion has a caret at the end of the header block and rounded corners."},{"id":"packages-accordion-accordion--allow-multiple-expanded","name":"Allow Multiple Expanded","snippet":"const AllowMultipleExpanded = () => (\n    <View>\n        <View style={{maxInlineSize: 500, marginBlockEnd: sizing.size_240}}>\n            <BodyText weight=\"bold\">\n                Allow multiple expanded (default)\n            </BodyText>\n            <Accordion allowMultipleExpanded>{exampleSections}</Accordion>\n        </View>\n        <View style={styles.sideBySide}>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\">Allow only one expanded</BodyText>\n                <Accordion\n                    allowMultipleExpanded={false}\n                    cornerKind=\"square\"\n                >\n                    {exampleSections}\n                </Accordion>\n            </View>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\">Allow only one expanded</BodyText>\n                <Accordion\n                    allowMultipleExpanded={false}\n                    cornerKind=\"rounded\"\n                >\n                    {exampleSections}\n                </Accordion>\n            </View>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\">Allow only one expanded</BodyText>\n                <Accordion\n                    allowMultipleExpanded={false}\n                    cornerKind=\"rounded-per-section\"\n                >\n                    {exampleSections}\n                </Accordion>\n            </View>\n        </View>\n    </View>\n);","description":"An accordion allows multiple sections to be expanded at the same time by default. However, if `allowMultipleExpanded` is set to `false`, only one section can be expanded at a time."},{"id":"packages-accordion-accordion--caret-positions","name":"Caret Positions","snippet":"const CaretPositions = () => {\n    return (\n        <View>\n            {/* Left-to-right */}\n            <View style={styles.sideBySide}>\n                <View style={styles.fullWidth}>\n                    <BodyText weight=\"bold\">\n                        Caret position: end, language direction: left to\n                        right\n                    </BodyText>\n                    <Accordion caretPosition=\"end\">\n                        {exampleSections}\n                    </Accordion>\n                </View>\n                <Strut size={32} />\n                <View style={styles.fullWidth}>\n                    <BodyText weight=\"bold\">\n                        Caret position: start, language direction: left to\n                        right\n                    </BodyText>\n                    <Accordion caretPosition=\"start\">\n                        {exampleSections}\n                    </Accordion>\n                </View>\n            </View>\n            {/* Right-to-left */}\n            <View dir=\"rtl\" style={styles.sideBySide}>\n                <View style={styles.fullWidth}>\n                    <BodyText weight=\"bold\">\n                        Caret position: end, language direction: right to\n                        left\n                    </BodyText>\n                    <Accordion caretPosition=\"end\">\n                        <AccordionSection header=\"پہلا سیکشن\">\n                            یہ کچھ معلومات ہے۔\n                        </AccordionSection>\n\n                        <AccordionSection header=\"دوسرا سیکشن\">\n                            یہ کچھ معلومات ہے۔\n                        </AccordionSection>\n\n                        <AccordionSection header=\"تیسرا حصہ\">\n                            یہ کچھ معلومات ہے۔\n                        </AccordionSection>\n                    </Accordion>\n                </View>\n                <Strut size={32} />\n                <View style={styles.fullWidth}>\n                    <BodyText weight=\"bold\">\n                        Caret position: start, language direction: right to\n                        left\n                    </BodyText>\n                    <Accordion caretPosition=\"start\">\n                        <AccordionSection header=\"پہلا سیکشن\">\n                            یہ کچھ معلومات ہے۔\n                        </AccordionSection>\n\n                        <AccordionSection header=\"دوسرا سیکشن\">\n                            یہ کچھ معلومات ہے۔\n                        </AccordionSection>\n\n                        <AccordionSection header=\"تیسرا حصہ\">\n                            یہ کچھ معلومات ہے۔\n                        </AccordionSection>\n                    </Accordion>\n                </View>\n            </View>\n        </View>\n    );\n};","description":"An accordion can have the caret at the start or the end of the header block. \"start\" means it’s on the left of a left-to-right language (and on the right of a right-to-left language), and \"end\" means it’s on the right of a left-to-right language (and on the left of a right-to-left language). If the `caretPosition` prop is specified both here in the Accordion and within a child AccordionSection component, the AccordionSection's `caretPosition` value is prioritized."},{"id":"packages-accordion-accordion--corner-kinds","name":"Corner Kinds","snippet":"const CornerKinds = () => {\n    return (\n        <View style={styles.sideBySide}>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\">Corner kind: square</BodyText>\n                <Accordion cornerKind=\"square\">{exampleSections}</Accordion>\n            </View>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\">Corner kind: rounded</BodyText>\n                <Accordion cornerKind=\"rounded\">\n                    {exampleSections}\n                </Accordion>\n            </View>\n            <View style={[styles.fullWidth, styles.space]}>\n                <BodyText weight=\"bold\">\n                    Corner kind: rounded-per-section\n                </BodyText>\n                <Accordion cornerKind=\"rounded-per-section\">\n                    {exampleSections}\n                </Accordion>\n            </View>\n        </View>\n    );\n};","description":"An accordion can have different corner kinds. If `cornerKind` is `square`, the corners have no border radius. If `cornerKind` is `rounded`, the overall container's corners are rounded. If `cornerKind` is `rounded-per-section`, each section's corners are rounded, and there is vertical white space between each section. If `cornerKind` is specified both here in the Accordion and within a child AccordionSection component, the AccordionSection’s `cornerKind` value is prioritized."},{"id":"packages-accordion-accordion--with-initial-expanded-index","name":"With Initial Expanded Index","snippet":"const WithInitialExpandedIndex = () => {\n    return (\n        <Accordion initialExpandedIndex={1}>{exampleSections}</Accordion>\n    );\n};","description":"An Accordion can have an initial expanded index. If this prop is specified, the AccordionSection at that index will be expanded when the Accordion is first rendered. If this prop is not specified, no AccordionSections will be expanded when the Accordion is first rendered. In this example, the AccordionSection at index 1 (the second section) is expanded by default."},{"id":"packages-accordion-accordion--with-animation","name":"With Animation","snippet":"const WithAnimation = () => {\n    return (\n        <View>\n            <View style={styles.sideBySide}>\n                <View style={[styles.fullWidth, styles.space]}>\n                    <BodyText weight=\"bold\">cornerKind: square</BodyText>\n                    <Accordion cornerKind=\"square\" animated={true}>\n                        {exampleSections}\n                    </Accordion>\n                </View>\n                <View style={[styles.fullWidth, styles.space]}>\n                    <BodyText weight=\"bold\">cornerKind: rounded</BodyText>\n                    <Accordion cornerKind=\"rounded\" animated={true}>\n                        {exampleSections}\n                    </Accordion>\n                </View>\n                <View style={[styles.fullWidth, styles.space]}>\n                    <BodyText weight=\"bold\">\n                        cornerKind: rounded-per-section\n                    </BodyText>\n                    <Accordion\n                        cornerKind=\"rounded-per-section\"\n                        animated={true}\n                    >\n                        {exampleSections}\n                    </Accordion>\n                </View>\n            </View>\n            <View style={styles.sideBySide}>\n                <View style={[styles.fullWidth, styles.space]}>\n                    <BodyText weight=\"bold\">\n                        cornerKind: square, allowMultipleExpanded: false\n                    </BodyText>\n                    <Accordion\n                        cornerKind=\"square\"\n                        animated={true}\n                        allowMultipleExpanded={false}\n                    >\n                        {exampleSections}\n                    </Accordion>\n                </View>\n                <View style={[styles.fullWidth, styles.space]}>\n                    <BodyText weight=\"bold\">\n                        cornerKind: rounded, allowMultipleExpanded: false\n                    </BodyText>\n                    <Accordion\n                        cornerKind=\"rounded\"\n                        animated={true}\n                        allowMultipleExpanded={false}\n                    >\n                        {exampleSections}\n                    </Accordion>\n                </View>\n                <View style={[styles.fullWidth, styles.space]}>\n                    <BodyText weight=\"bold\">\n                        cornerKind: rounded-per-section,\n                        allowMultipleExpanded: false\n                    </BodyText>\n                    <Accordion\n                        cornerKind=\"rounded-per-section\"\n                        animated={true}\n                        allowMultipleExpanded={false}\n                    >\n                        {exampleSections}\n                    </Accordion>\n                </View>\n            </View>\n            <View style={{maxInlineSize: 500}}>\n                <BodyText weight=\"bold\">\n                    With unevenly sided sections, allowMultipleExpanded:\n                    false\n                </BodyText>\n                <Accordion animated={true} allowMultipleExpanded={false}>\n                    <AccordionSection header=\"First section\">\n                        <View\n                            style={{\n                                height: 500,\n                                padding: sizing.size_240,\n                            }}\n                        >\n                            This is the information present in the first\n                            section\n                        </View>\n                    </AccordionSection>\n                    <AccordionSection header=\"Second section\">\n                        <View\n                            style={{\n                                height: 100,\n                                padding: sizing.size_240,\n                            }}\n                        >\n                            This is the information present in the second\n                            section\n                        </View>\n                    </AccordionSection>\n                    <AccordionSection header=\"Second section\">\n                        <View\n                            style={{\n                                height: 300,\n                                padding: sizing.size_240,\n                            }}\n                        >\n                            This is the information present in the third\n                            section\n                        </View>\n                    </AccordionSection>\n                </Accordion>\n            </View>\n        </View>\n    );\n};","description":"An Accordion can be animated using the `animated` prop. This animation includes the caret, the expansion/collapse, and the last section's border radius. In this example, animated accordions with different corner kinds are shown to demonstrate the border radius transition, as well as accordions with `allowMultipleExpanded` set to `false`, and an accordion with sections of different heights. If the user has `prefers-reduced-motion` opted in, this animation should be disabled. This can be done by passing `animated={false}` to the Accordion. If `animated` is specified both here in the Accordion and within a child AccordionSection component, the AccordionSection's `animated` value is prioritized. **NOTE: HEIGHT ANIMATIONS ARE INHERENTLY NOT PERFORMANT.** USING ANIMATIONS *WILL* DECREASE PERFORMANCE. It is recommended that animations be used sparingly for this reason, and only on lighter accordions."},{"id":"packages-accordion-accordion--with-style","name":"With Style","snippet":"const WithStyle = () => {\n    const customStyles = {\n        border: `2px solid ${semanticColor.mastery.primary}`,\n        padding: sizing.size_320,\n    };\n\n    return (\n        <Accordion style={customStyles}>\n            <AccordionSection\n                header=\"This section has a custom border radius at the top?\"\n                cornerKind=\"square\"\n            >\n                Something\n            </AccordionSection>\n            <AccordionSection header=\"Just a section\">\n                Something\n            </AccordionSection>\n        </Accordion>\n    );\n};","description":"An Accordion with custom styles. The custom styles in this example include a purple border and extra padding. Note that the Accordion's border is different than the AccordionSection border styles. Passing custom styles here will not affect the sections' styles. If you want to change the corner kind of a single section, that can be done using the `cornerKind` prop (as demonstrated here). Passing in a custom border radius to the section is NOT recommended, as it would cause the header's focus outline to no longer match the section."},{"id":"packages-accordion-accordion--single-section","name":"Single Section","snippet":"const SingleSection = () => {\n    return (\n        <Accordion>\n            {[\n                <AccordionSection header=\"First section\" key={0}>\n                    This is the information present in the first section\n                </AccordionSection>,\n            ]}\n        </Accordion>\n    );\n};","description":"To use an Accordion with only one section, you must pass in an array of one element. Another approach to displaying a single AccordionSection can be to use the AccordionSection component directly (not as a child of an Accordion)."},{"id":"packages-accordion-accordion--long-sections","name":"Long sections (performance check)","snippet":"const LongSections = function Render() {\n    const [shown, setShown] = React.useState(false);\n\n    return (\n        <View>\n            <Button onClick={() => setShown(!shown)} style={styles.button}>\n                {shown ? \"Hide giant Accordion\" : \"Show giant Accordion\"}\n            </Button>\n            {shown && (\n                <Accordion animated={true}>\n                    {Array(20).fill(\n                        <AccordionSection\n                            header={`This is a section with a really, really, really,\n                really, really, really, really, really, really, really,\n                really, really, really, really, really, really, really,\n                really, really, really, really, really long header`}\n                        >\n                            <View>\n                                <img\n                                    src=\"logo.svg\"\n                                    width=\"100%\"\n                                    alt=\"Wonder Blocks logo\"\n                                />\n                                <Strut size={32} />\n                                <img\n                                    src=\"logo.svg\"\n                                    width=\"100%\"\n                                    alt=\"Wonder Blocks logo\"\n                                />\n                            </View>\n                        </AccordionSection>,\n                    )}\n                </Accordion>\n            )}\n        </View>\n    );\n};","description":"This is an example of an Accordion with many sections, as well as a lot of content within each section."},{"id":"packages-accordion-accordion--with-dropdown","name":"With Dropdown","snippet":"const WithDropdown = function Render() {\n    const [value, setValue] = React.useState<any>(null);\n    const [singleOpened, setSingleOpened] = React.useState(false);\n\n    const [values, setValues] = React.useState<any>([]);\n    const [multiOpened, setMultiOpened] = React.useState(false);\n\n    const items = [\n        <OptionItem label=\"Banana\" value=\"banana\" key={0} />,\n        <OptionItem\n            label=\"Strawberry\"\n            value=\"strawberry\"\n            disabled\n            key={1}\n        />,\n        <OptionItem label=\"Pear\" value=\"pear\" key={2} />,\n    ];\n\n    return (\n        <Accordion animated={true}>\n            <AccordionSection header={`Single Select`}>\n                {/* Adding height because overflow hidden in sections. */}\n                <View style={singleOpened && {height: 200}}>\n                    <SingleSelect\n                        placeholder=\"Select an option\"\n                        selectedValue={value}\n                        onChange={setValue}\n                        opened={singleOpened}\n                        onToggle={setSingleOpened}\n                    >\n                        {items}\n                    </SingleSelect>\n                </View>\n            </AccordionSection>\n            <AccordionSection header={`Multi Select`}>\n                <View style={multiOpened && {height: 200}}>\n                    <MultiSelect\n                        selectedValues={values}\n                        onChange={setValues}\n                        opened={multiOpened}\n                        onToggle={setMultiOpened}\n                    >\n                        {items}\n                    </MultiSelect>\n                </View>\n            </AccordionSection>\n        </Accordion>\n    );\n};","description":"This is an example of an Accordion with a dropdown within each section. This demonstrates how the accordion keyboard interactions do not interfere with the dropdown's keyboard interactions."},{"id":"packages-accordion-accordion--background-color-example","name":"Background Color Example","snippet":"const BackgroundColorExample = () => {\n    const accordionSectionStyle = {\n        backgroundColor: semanticColor.core.background.instructive.subtle,\n        // NOTE: This border color uses the opacity token to match the\n        // background color. By default, the border color is\n        // `fadedOffBlack16`, which is the HEX value of `offBlack16`.\n        borderColor: semanticColor.core.border.neutral.subtle,\n    };\n\n    const sections = [\n        <AccordionSection\n            key=\"first\"\n            header=\"First section\"\n            style={accordionSectionStyle}\n        >\n            This is the information present in the first section\n        </AccordionSection>,\n        <AccordionSection\n            key=\"second\"\n            header=\"Second section\"\n            style={accordionSectionStyle}\n        >\n            This is the information present in the second section\n        </AccordionSection>,\n        <AccordionSection\n            key=\"third\"\n            header=\"Third section\"\n            style={accordionSectionStyle}\n        >\n            This is the information present in the third section\n        </AccordionSection>,\n    ];\n\n    return (\n        <>\n            <Accordion cornerKind=\"rounded\">{sections}</Accordion>\n            <Strut size={24} />\n            <Accordion cornerKind=\"square\">{sections}</Accordion>\n            <Strut size={24} />\n            <Accordion cornerKind=\"rounded-per-section\">\n                {sections}\n            </Accordion>\n        </>\n    );\n};","description":"Accordion has a white background color by default. If you want to change the background color, you can pass in a custom style with the desired background color into each individual AccordionSection. NOTE: Passing in a background color to the Accordion itself is NOT recommended, because it will cause the color to overflow into the corners of a rounded Accordion and between the individual sections of a rounded-per-section Accordion."}],"import":"import { Accordion, AccordionSection, ComponentInfo, Strut } from \"@khanacademy/wonder-blocks-accordion\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { MultiSelect, OptionItem, SingleSelect } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"An accordion displays a vertically stacked list of sections, each of which contains content that can be shown or hidden by clicking its header. The Wonder Blocks Accordion component is a styled wrapper for a list of AccordionSection components. It also wraps the AccordionSection components in list items. ### Usage ```jsx import { Accordion, AccordionSection } from \"@khanacademy/wonder-blocks-accordion\"; <Accordion> <AccordionSection header=\"First section\"> This is the information present in the first section </AccordionSection> <AccordionSection header=\"Second section\"> This is the information present in the second section </AccordionSection> <AccordionSection header=\"Third section\"> This is the information present in the third section </AccordionSection> </Accordion> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-accordion/src/index.ts","description":"An accordion displays a vertically stacked list of sections, each of which\ncontains content that can be shown or hidden by clicking its header.\n\nThe Wonder Blocks Accordion component is a styled wrapper for a list of\nAccordionSection components. It also wraps the AccordionSection\ncomponents in list items.\n\n### Usage\n\n```jsx\nimport {\n     Accordion,\n     AccordionSection\n} from \"@khanacademy/wonder-blocks-accordion\";\n\n<Accordion>\n  <AccordionSection header=\"First section\">\n      This is the information present in the first section\n  </AccordionSection>\n  <AccordionSection header=\"Second section\">\n      This is the information present in the second section\n  </AccordionSection>\n  <AccordionSection header=\"Third section\">\n      This is the information present in the third section\n  </AccordionSection>\n</Accordion>\n```","displayName":"Accordion","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The unique identifier for the accordion.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"The AccordionSection components to display within this Accordion.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & { id?: string | undefined; children: string | ReactElement<any, string | JSXElementConstructor<any>>; header: string | ReactElement<any, string | JSXElementConstructor<any>>; caretPosition?: \"start\" | \"end\" | undefined; cornerKind?: AccordionCornerKindType | undefined; collapsible?: boolean | undefined; expanded?: boolean | undefined; animated?: boolean | undefined; onToggle?: ((newExpandedState: boolean) => unknown) | undefined; style?: StyleType; headerStyle?: StyleType; tag?: TagType | undefined; testId?: string | undefined; isFirstSection?: boolean | undefined; isLastSection?: boolean | undefined; isRegion?: boolean | undefined; } & RefAttributes<HTMLButtonElement>, string | JSXElementConstructor<any>>[]"}},"initialExpandedIndex":{"defaultValue":null,"description":"The index of the AccordionSection that should be expanded when the\nAccordion is first rendered. If not specified, no AccordionSections\nwill be expanded when the Accordion is first rendered.","name":"initialExpandedIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"allowMultipleExpanded":{"defaultValue":null,"description":"Whether multiple AccordionSections can be expanded at the same time.\nIf not specified, multiple AccordionSections can be expanded at a time.","name":"allowMultipleExpanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"caretPosition":{"defaultValue":null,"description":"Whether to put the caret at the start or end of the header block\nin this section. \"start\" means it’s on the left of a left-to-right\nlanguage (and on the right of a right-to-left language), and \"end\"\nmeans it’s on the right of a left-to-right language\n(and on the left of a right-to-left language).\nDefaults to \"end\".\n\nIf this prop is specified both here in the Accordion and within\na child AccordionSection component, the AccordionSection’s caretPosition\nvalue is prioritized.","name":"caretPosition","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"start\" | \"end\"","value":[{"value":"\"start\""},{"value":"\"end\""}]}},"cornerKind":{"defaultValue":null,"description":"The preset styles for the corners of this accordion.\n`square` - corners have no border radius.\n`rounded` - the overall container's corners are rounded.\n`rounded-per-section` - each section's corners are rounded,\nand there is vertical white space between each section.\n\nIf this prop is specified both here in the Accordion and within\na child AccordionSection component, the AccordionSection’s cornerKind\nvalue is prioritized.","name":"cornerKind","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AccordionCornerKindType","value":[{"value":"\"square\""},{"value":"\"rounded\""},{"value":"\"rounded-per-section\""}]}},"animated":{"defaultValue":null,"description":"Whether to include animation on the header. This should be false\nif the user has `prefers-reduced-motion` opted in. Defaults to false.\n\nIf this prop is specified both here in the Accordion and within\na child AccordionSection component, the AccordionSection’s animated\nvalue is prioritized.","name":"animated","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"style":{"defaultValue":null,"description":"Custom styles for the overall accordion container.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-accordion/src/components/accordion.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLUListElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Accordion"}},"packages-announcer":{"id":"packages-announcer","name":"AnnouncerExample","path":"./__docs__/wonder-blocks-announcer/announcer.stories.tsx","stories":[{"id":"packages-announcer--announce-message","name":"Announce Message","error":{"name":"Error","message":"Could not generate snippet without component name."}},{"id":"packages-announcer--announcer-in-modal","name":"Announcer In Modal","snippet":"const AnnouncerInModal = () => {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const [isOpen, setIsOpen] = React.useState(false);\n\n    const handleClose = () => {\n        setIsOpen(false);\n    };\n\n    const handleOpen = () => {\n        setIsOpen(true);\n    };\n\n    const ModalContent = ({closeModal}: {closeModal: () => void}) => (\n        <FlexibleDialog\n            title={<Heading>Announcer Test Modal</Heading>}\n            styles={{root: {maxWidth: \"80rem\"}}}\n            content={\n                <View>\n                    <BodyText>\n                        This modal contains an announcer. <br />\n                        Click the CTA button below to test screen reader\n                        announcements in a modal context.\n                    </BodyText>\n                    <View\n                        style={{\n                            gap: sizing.size_160,\n                            padding: `${sizing.size_240} 0`,\n                            marginBlockStart: \"auto\",\n                            maxInlineSize: \"40rem\",\n                            minBlockSize: \"20rem\",\n                        }}\n                    >\n                        <AnnouncerExample\n                            message={args.message}\n                            level={args.level}\n                            debounceThreshold={args.debounceThreshold}\n                            label=\"Announce in modal\"\n                        />\n                        <Button onClick={closeModal} kind=\"secondary\">\n                            Close Modal\n                        </Button>\n                    </View>\n                </View>\n            }\n        />\n    );\n\n    return (\n        <View style={{gap: sizing.size_160}}>\n            <BodyText>Click “Announce on page” to test the document\n                                    layer, then open the modal and click “Announce in\n                                    modal” to test the modal layer.\n                                </BodyText>\n            <AnnouncerExample\n                message=\"Message announced from the base page!\"\n                level=\"polite\"\n                debounceThreshold={args.debounceThreshold}\n                label=\"Announce on page\" />\n            {!isOpen && (\n                <Button onClick={handleOpen}>Open Modal to Test</Button>\n            )}\n            <ModalLauncher opened={isOpen} onClose={handleClose} modal={ModalContent} />\n        </View>\n    );\n};","description":"Test that screen reader announcements work correctly when a modal is open. When a WB modal dialog (any variant) is active with `aria-modal=\"true\"`, browsers hide everything outside it from the accessibility tree — including a live region at the body level. To work around this, Announcer injects a second set of live regions directly inside the `aria-modal` element when the modal mounts. - **\"Announce on page\"** fires into the document-level `wbAnnounce` node at `body`. - **\"Announce in modal\"** fires into the `wbAnnounce-modal` node inside the dialog. With a screen reader active, only the in-modal button should be audible while the modal is open."}],"import":"import { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo } from \"wonder-blocks\";\nimport { FlexibleDialog, ModalLauncher } from \"@khanacademy/wonder-blocks-modal\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"AnnouncerExample\" component.\n  110 |  * ```\n  111 |  **/\n> 112 | export default {\n      | ^\n  113 |     title: \"Packages / Announcer\",\n  114 |     component: AnnouncerExample,\n  115 |     decorators: [\n\n./__docs__/wonder-blocks-announcer/announcer.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {\n    announceMessage,\n    type AnnounceMessageProps,\n} from \"@khanacademy/wonder-blocks-announcer\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {ModalLauncher, FlexibleDialog} from \"@khanacademy/wonder-blocks-modal\";\nimport {Heading, BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport packageConfig from \"../../packages/wonder-blocks-announcer/package.json\";\nimport {sizing} from \"@khanacademy/wonder-blocks-tokens\";\n\nconst AnnouncerExample = ({\n    message = \"Clicked!\",\n    level,\n    debounceThreshold,\n    label = \"Announce\",\n}: AnnounceMessageProps & {label?: string}) => {\n    return (\n        <Button\n            onClick={async () => {\n                const idRef = await announceMessage({\n                    message,\n                    level,\n                    debounceThreshold,\n                });\n                /* eslint-disable-next-line */\n                console.log(idRef);\n            }}\n        >\n            {label}\n        </Button>\n    );\n};\ntype StoryComponentType = StoryObj<typeof AnnouncerExample>;\n\n/**\n * Announcer sends messages to screen readers using [ARIA Live Regions](https://www.w3.org/TR/wai-aria/#attrs_liveregions),\n * without moving keyboard focus. Useful for combobox filtering, toast\n * notifications, client-side routing, and similar patterns.\n *\n * It is a singleton — one instance is shared across the page. Live regions are\n * created automatically on first use and are visually hidden by default.\n *\n * Messages alternate between two regions per politeness level to prevent\n * assistive technology from swallowing repeated announcements. They are\n * removed from the DOM after 5000 ms.\n *\n * **Modal support:** When a Wonder Blocks modal is open, announcements are\n * automatically routed to a separate live region injected inside the\n * `aria-modal` element. This ensures screen readers inside the modal hear the\n * announcement — browsers hide content outside `aria-modal` from the\n * accessibility tree.\n *\n * > In Storybook, live regions are shown visually on the right side of the\n * screen (red outlined boxes) for debugging. Controlled via the\n * `addBodyClass: \"showAnnouncer\"` story parameter.\n *\n * ## API\n *\n * ### `announceMessage(options)`\n *\n * The main function. Creates the Announcer instance if one doesn't exist yet.\n *\n * **Options:**\n * - `message` `string` — The text to announce. Required.\n * - `level` `\"polite\" | \"assertive\"` — Default `\"polite\"`. Use `\"assertive\"` to interrupt.\n * - `debounceThreshold` `number` — ms to wait before sending (default `250`). Trailing-edge: last call wins.\n * - `initialTimeout` `number` — ms to delay the first announcement (default `150`). Helps with Safari/VoiceOver timing.\n *\n * **Returns:** `Promise<string>` — resolves with the ID of the targeted live region, e.g. `\"wbARegion-polite1\"`.\n *\n * ```jsx\n * import { announceMessage } from \"@khanacademy/wonder-blocks-announcer\";\n *\n * // In an event handler:\n * <button onClick={() => announceMessage({ message: \"Saved!\" })}>Save</button>\n *\n * // In a useEffect:\n * React.useEffect(() => {\n *     announceMessage({ message: `${results.length} results found` });\n * }, [results]);\n * ```\n *\n * ### `initAnnouncer(options)`\n *\n * Optional. Call once on page load to pre-create live regions before the first\n * announcement. Improves reliability with VoiceOver/Safari, which works best\n * when regions are registered before use.\n *\n * Without this, regions are created on the first `announceMessage` call, which\n * is fine for most cases.\n *\n * **Options:**\n * - `targetElement` `HTMLElement` — Where to mount the live regions (default `document.body`).\n * - `debounceThreshold` `number` — Sets the global debounce default.\n *\n * ```jsx\n * import { initAnnouncer } from \"@khanacademy/wonder-blocks-announcer\";\n *\n * // In a top-level component:\n * React.useEffect(() => {\n *     initAnnouncer();\n * }, []);\n * ```\n **/\nexport default {\n    title: \"Packages / Announcer\",\n    component: AnnouncerExample,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>\n                <Story />\n            </View>\n        ),\n    ],\n    parameters: {\n        addBodyClass: \"showAnnouncer\",\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {disableSnapshot: true},\n    },\n    argTypes: {\n        level: {\n            control: \"radio\",\n            options: [\"polite\", \"assertive\"],\n        },\n        debounceThreshold: {\n            control: \"number\",\n            type: \"number\",\n            description: \"(milliseconds)\",\n        },\n    },\n} as Meta<typeof AnnouncerExample>;\n\n/**\n * Click the button to send a polite announcement. The live region that receives\n * it is logged to the console and shown in the debug boxes on the right.\n *\n * Use the controls below to change the message text, politeness level, and\n * debounce threshold.\n */\nexport const AnnounceMessage: StoryComponentType = {\n    args: {\n        message: \"Here is some example text.\",\n        level: \"polite\",\n    },\n};\n\n/**\n * Test that screen reader announcements work correctly when a modal is open.\n *\n * When a WB modal dialog (any variant) is active with `aria-modal=\"true\"`,\n * browsers hide everything outside it from the accessibility tree — including a\n * live region at the body level. To work around this, Announcer injects a second\n * set of live regions directly inside the `aria-modal` element when the modal mounts.\n *\n * - **\"Announce on page\"** fires into the document-level `wbAnnounce` node at `body`.\n * - **\"Announce in modal\"** fires into the `wbAnnounce-modal` node inside the dialog.\n *\n * With a screen reader active, only the in-modal button should be audible while\n * the modal is open.\n */\nexport const AnnouncerInModal: StoryComponentType = {\n    render: (args) => {\n        // eslint-disable-next-line react-hooks/rules-of-hooks\n        const [isOpen, setIsOpen] = React.useState(false);\n\n        const handleClose = () => {\n            setIsOpen(false);\n        };\n\n        const handleOpen = () => {\n            setIsOpen(true);\n        };\n\n        const ModalContent = ({closeModal}: {closeModal: () => void}) => (\n            <FlexibleDialog\n                title={<Heading>Announcer Test Modal</Heading>}\n                styles={{root: {maxWidth: \"80rem\"}}}\n                content={\n                    <View>\n                        <BodyText>\n                            This modal contains an announcer. <br />\n                            Click the CTA button below to test screen reader\n                            announcements in a modal context.\n                        </BodyText>\n                        <View\n                            style={{\n                                gap: sizing.size_160,\n                                padding: `${sizing.size_240} 0`,\n                                marginBlockStart: \"auto\",\n                                maxInlineSize: \"40rem\",\n                                minBlockSize: \"20rem\",\n                            }}\n                        >\n                            <AnnouncerExample\n                                message={args.message}\n                                level={args.level}\n                                debounceThreshold={args.debounceThreshold}\n                                label=\"Announce in modal\"\n                            />\n                            <Button onClick={closeModal} kind=\"secondary\">\n                                Close Modal\n                            </Button>\n                        </View>\n                    </View>\n                }\n            />\n        );\n\n        return (\n            <View style={{gap: sizing.size_160}}>\n                <BodyText>\n                    Click &ldquo;Announce on page&rdquo; to test the document\n                    layer, then open the modal and click &ldquo;Announce in\n                    modal&rdquo; to test the modal layer.\n                </BodyText>\n                <AnnouncerExample\n                    message=\"Message announced from the base page!\"\n                    level={args.level}\n                    debounceThreshold={args.debounceThreshold}\n                    label=\"Announce on page\"\n                />\n                {!isOpen && (\n                    <Button onClick={handleOpen}>Open Modal to Test</Button>\n                )}\n                <ModalLauncher\n                    opened={isOpen}\n                    onClose={handleClose}\n                    modal={ModalContent}\n                />\n            </View>\n        );\n    },\n    args: {\n        message: \"Message announced from inside modal!\",\n        level: \"polite\",\n    },\n};\n\nconst styles = StyleSheet.create({\n    example: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n});\n"}},"packages-badge-badge":{"id":"packages-badge-badge","name":"Badge","path":"./__docs__/wonder-blocks-badge/badge.stories.tsx","stories":[{"id":"packages-badge-badge--default","name":"Default","snippet":"const Default = () => {\n    return (\n        <Badge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"The badge takes an icon and/or a label: - `icon`: The icon to display in the badge. It can be a `PhosphorIcon` or a `Icon` for custom icons (see Custom Icons docs for more details). If the icon conveys meaning, set the alt text on the icon being used - `label`: The label to display in the badge."},{"id":"packages-badge-badge--no-border","name":"No Border","snippet":"const NoBorder = () => {\n    return (\n        <Badge\n            showBorder={false}\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"A badge can be used without a border."},{"id":"packages-badge-badge--label-only","name":"Label Only","snippet":"const LabelOnly = () => {\n    return (\n        <Badge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"A badge can be used with only a label."},{"id":"packages-badge-badge--icon-only","name":"Icon Only","snippet":"const IconOnly = () => {\n    return (\n        <Badge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"A badge can be used with only an icon."},{"id":"packages-badge-badge--custom-icons","name":"Custom Icons","snippet":"const CustomIcons = () => {\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <Heading size=\"xlarge\">\n                Custom single colored svg icon using PhosphorIcon\n            </Heading>\n            <Badge\n                icon={\n                    <PhosphorIcon\n                        icon={singleColoredIcon}\n                        aria-label=\"Crown\"\n                    />\n                }\n                label=\"Custom Icon\"\n            />\n            <Heading size=\"xlarge\">\n                Custom single colored svg icon using PhosphorIcon and color\n                prop\n            </Heading>\n            <Badge\n                icon={\n                    <PhosphorIcon\n                        icon={singleColoredIcon}\n                        aria-label=\"Crown\"\n                        color={semanticColor.status.success.foreground}\n                    />\n                }\n                label=\"Custom Icon\"\n            />\n            <Heading size=\"xlarge\">\n                Custom multi-colored inline svg using the Icon component\n            </Heading>\n            <Badge\n                icon={<Icon>{multiColoredIcon}</Icon>}\n                label=\"Custom Icon\"\n            />\n            <Heading size=\"xlarge\">\n                Custom img element using the Icon component with a svg src\n            </Heading>\n            <Badge\n                icon={\n                    <Icon>\n                        <img src={\"logo.svg\"} alt=\"Wonder Blocks\" />\n                    </Icon>\n                }\n                label=\"Custom Icon\"\n            />\n            <Heading size=\"xlarge\">\n                Custom img element using the Icon component with a png src\n            </Heading>\n            <Badge\n                icon={\n                    <Icon>\n                        <img src=\"avatar.png\" alt=\"Example avatar\" />\n                    </Icon>\n                }\n                label=\"Custom Icon\"\n            />\n        </View>\n    );\n};","description":"A badge can be used with a custom icon using the `PhosphorIcon` or `Icon` components. Here are some examples with custom icons: - A custom single colored svg icon - Use with the `PhosphorIcon` component - If the svg has `fill=\"currentColor\"` and the `color` prop for `PhosphorIcon` is not set, then the icon will use the color specified by the `Badge` component. - A multi-colored inline svg - Use with the `Icon` component - The `Icon` component supports svg assets that define their own fill - An `img` element - Use with the `Icon` component - The `Icon` component supports `img` elements - For icons that are from the Phosphor library, continue using the `PhosphorIcon` component. If the icon conveys meaning, it should have alt text."},{"id":"packages-badge-badge--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => {\n    return (\n        <Badge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            }\n            styles={{\n                root: {\n                    backgroundColor:\n                        semanticColor.core.background.neutral.strong,\n                    borderColor: semanticColor.core.border.knockout.default,\n                    color: semanticColor.core.foreground.knockout.default,\n                },\n                icon: {\n                    color: semanticColor.core.foreground.knockout.default,\n                },\n                label: {\n                    fontWeight: font.weight.medium,\n                },\n            }} />\n    );\n};","description":"A badge can be used with custom styles. The following parts can be styled: - `root`: Styles the root element - `icon`: Styles the icon element - `label`: Styles the text in the element Here is an example of custom styles using semantic tokens."},{"id":"packages-badge-badge--tag","name":"Tag","snippet":"const Tag = () => {\n    return (\n        <Badge\n            tag=\"strong\"\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"When the `tag` prop is provided, the badge will render as the specified tag. For example, if a badge should have emphasis, use a `strong` tag."},{"id":"packages-badge-badge--badge-with-tooltip","name":"Badge With Tooltip","snippet":"const BadgeWithTooltip = () => {\n    return (\n        <Tooltip content=\"This is a tooltip\" opened={true}>\n            <Badge\n                label={args.label || \"\"}\n                icon={\n                    args.icon ? (\n                        <PhosphorIcon icon={args.icon} />\n                    ) : undefined\n                }\n                role=\"button\" />\n        </Tooltip>\n    );\n};","description":"When using a `Badge` with a `Tooltip`, make sure to add `role=\"button\"` on the `Badge`. This is so that it is interactive and the tooltip contents can be read out properly via the `aria-describedby` attribute on the `Badge` added by the Tooltip component. Note: The `Tooltip` component also sets the `tabIndex` of the `Badge` so that it is focusable."},{"id":"packages-badge-badge--badge-truncation","name":"Badge Truncation","snippet":"const BadgeTruncation = () => {\n    return (\n        <Badge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"By default, the label is truncated after `30ch` (approximately 30 characters). If you have long lines of text to communicate information, this badge pattern is not the right component for that purpose."}],"import":"import { Badge, ComponentInfo } from \"@khanacademy/wonder-blocks-badge\";\nimport { Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport Tooltip from \"@khanacademy/wonder-blocks-tooltip\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"Badges are visual indicators used to display concise information, such as a status, label, or count.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-badge/src/index.ts","description":"Badges are visual indicators used to display concise information, such as\na status, label, or count.","displayName":"Badge","methods":[],"props":{"icon":{"defaultValue":null,"description":"The icon to display in the badge. It should be a `PhosphorIcon` or `Icon`\ncomponent.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>>"}},"label":{"defaultValue":null,"description":"The label to display in the badge.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The id for the badge.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"The test id for the badge.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the Badge component.\n- `root`: Styles the root element\n- `icon`: Styles the icon element\n- `label`: Styles the text in the badge","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; icon?: StyleType; label?: StyleType; }"}},"tag":{"defaultValue":null,"description":"The HTML tag to render. Defaults to `div`.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"showBorder":{"defaultValue":null,"description":"Whether to show the border. Defaults to `true`.","name":"showBorder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/components/badge.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Badge"}},"packages-badge-duebadge":{"id":"packages-badge-duebadge","name":"DueBadge","path":"./__docs__/wonder-blocks-badge/due-badge.stories.tsx","stories":[{"id":"packages-badge-duebadge--default","name":"Default","snippet":"const Default = () => {\n    return <DueBadge showIcon label={args.label || \"\"} />;\n};"},{"id":"packages-badge-duebadge--kinds","name":"Kinds","snippet":"const Kinds = () => {\n    return (\n        <View style={{flexDirection: \"row\", gap: sizing.size_160}}>\n            <DueBadge showIcon label={\"Due\"} kind=\"due\" />\n            <DueBadge showIcon label={\"Overdue\"} kind=\"overdue\" />\n        </View>\n    );\n};","description":"The `DueBadge` supports two kinds: `due` and `overdue`. By default, the `due` kind is used."},{"id":"packages-badge-duebadge--label-only","name":"Label Only","snippet":"const LabelOnly = () => {\n    return (\n        <View style={{flexDirection: \"row\", gap: sizing.size_160}}>\n            <DueBadge label={args.label || \"\"} kind=\"due\" />\n            <DueBadge label={args.label || \"\"} kind=\"overdue\" />\n        </View>\n    );\n};","description":"A badge can be used with only a label."},{"id":"packages-badge-duebadge--icon-only","name":"Icon Only","snippet":"const IconOnly = (args: PropsFor<typeof DueBadge>) => {\n    return (\n        <View style={{flexDirection: \"row\", gap: sizing.size_160}}>\n            <DueBadge showIcon={true} iconAriaLabel=\"Due\" kind=\"due\" />\n            <DueBadge\n                showIcon={true}\n                iconAriaLabel=\"Overdue\"\n                kind=\"overdue\"\n            />\n        </View>\n    );\n};","description":"Set `showIcon` to `true` to show the icon only. Alt text for the icon can be set using the `iconAriaLabel` prop."}],"import":"import { ComponentInfo, DueBadge } from \"@khanacademy/wonder-blocks-badge\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A badge that communicates when a task is due. `DueBadge` uses the `Badge` component and applies the appropriate styles for the kinds. Note: The `iconAriaLabel` prop can be used to set an `aria-label` on the icon if `showIcon` is `true`. This is helpful for providing context to screen readers about what the badge is communicating. For more details, see the `Badge` docs.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-badge/src/index.ts","description":"A badge that communicates when a task is due.\n\n`DueBadge` uses the `Badge` component and applies the appropriate styles\nfor the kinds.\n\nNote: The `iconAriaLabel` prop can be used to set an `aria-label` on the icon\nif `showIcon` is `true`. This is helpful for providing context to screen\nreaders about what the badge is communicating.\n\nFor more details, see the `Badge` docs.","displayName":"DueBadge","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The id for the badge.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"The test id for the badge.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the Badge component.\n- `root`: Styles the root element\n- `icon`: Styles the icon element\n- `label`: Styles the text in the badge","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; icon?: StyleType; label?: StyleType; }"}},"tag":{"defaultValue":null,"description":"The HTML tag to render. Defaults to `div`.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"showIcon":{"defaultValue":null,"description":"Whether to show the icon. Defaults to `false`.","name":"showIcon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"label":{"defaultValue":null,"description":"The label to display in the badge.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"iconAriaLabel":{"defaultValue":null,"description":"Aria label for the icon.","name":"iconAriaLabel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"kind":{"defaultValue":null,"description":"The kind of due badge. Defaults to `due`.","name":"kind","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/components/due-badge.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"due\" | \"overdue\"","value":[{"value":"\"due\""},{"value":"\"overdue\""}]}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"DueBadge"}},"packages-badge-gembadge":{"id":"packages-badge-gembadge","name":"GemBadge","path":"./__docs__/wonder-blocks-badge/gem-badge.stories.tsx","stories":[{"id":"packages-badge-gembadge--default","name":"Default","snippet":"const Default = () => <GemBadge label=\"Badge\" showIcon iconAriaLabel=\"Gems\" />;"},{"id":"packages-badge-gembadge--no-icon","name":"No Icon","snippet":"const NoIcon = () => <GemBadge label=\"Badge\" showIcon={false} />;","description":"Set `showIcon` to `false` to hide the gem icon."},{"id":"packages-badge-gembadge--icon-only","name":"Icon Only","snippet":"const IconOnly = () => <GemBadge showIcon iconAriaLabel=\"Gems\" />;","description":"Set `showIcon` to `true` to show the gem icon. Alt text for the gem icon can be set using the `iconAriaLabel` prop."}],"import":"import { ComponentInfo, GemBadge } from \"@khanacademy/wonder-blocks-badge\";","jsDocTags":{},"description":"A badge that represents gem rewards. `GemBadge` uses the `Badge` component and applies the appropriate styles and icon. For more details, see the `Badge` docs.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-badge/src/index.ts","description":"A badge that represents gem rewards.\n\n`GemBadge` uses the `Badge` component and applies the appropriate styles\nand icon. For more details, see the `Badge` docs.","displayName":"GemBadge","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The id for the badge.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"The test id for the badge.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the Badge component.\n- `root`: Styles the root element\n- `icon`: Styles the icon element\n- `label`: Styles the text in the badge","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; icon?: StyleType; label?: StyleType; }"}},"tag":{"defaultValue":null,"description":"The HTML tag to render. Defaults to `div`.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"showIcon":{"defaultValue":null,"description":"Whether to show the icon. Defaults to `false`.","name":"showIcon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"label":{"defaultValue":null,"description":"The label to display in the badge.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"iconAriaLabel":{"defaultValue":null,"description":"Aria label for the icon.","name":"iconAriaLabel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"GemBadge"}},"packages-badge-neutral-badge":{"id":"packages-badge-neutral-badge","name":"NeutralBadge","path":"./__docs__/wonder-blocks-badge/neutral-badge.stories.tsx","stories":[{"id":"packages-badge-neutral-badge--default","name":"Default","snippet":"const Default = () => {\n    return (\n        <NeutralBadge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"The badge takes an icon and/or a label: - `icon`: The icon to display in the badge. It can be a `PhosphorIcon` or a `Icon` for custom icons (see Custom Icons docs for more details). If the icon conveys meaning, set the alt text on the icon being used - `label`: The label to display in the badge."},{"id":"packages-badge-neutral-badge--no-border","name":"No Border","snippet":"const NoBorder = () => {\n    return (\n        <NeutralBadge\n            showBorder={false}\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"A badge can be used without a border."},{"id":"packages-badge-neutral-badge--label-only","name":"Label Only","snippet":"const LabelOnly = () => {\n    return (\n        <NeutralBadge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"A badge can be used with only a label."},{"id":"packages-badge-neutral-badge--icon-only","name":"Icon Only","snippet":"const IconOnly = () => {\n    return (\n        <NeutralBadge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            } />\n    );\n};","description":"A badge can be used with only an icon."},{"id":"packages-badge-neutral-badge--custom-icons","name":"Custom Icons","snippet":"const CustomIcons = () => {\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <Heading size=\"large\">\n                Custom single colored svg icon using PhosphorIcon\n            </Heading>\n            <NeutralBadge\n                icon={\n                    <PhosphorIcon\n                        icon={singleColoredIcon}\n                        aria-label=\"Crown\"\n                    />\n                }\n                label=\"Custom Icon\"\n            />\n            <Heading size=\"large\">\n                Custom single colored svg icon using PhosphorIcon and color\n                prop\n            </Heading>\n            <NeutralBadge\n                icon={\n                    <PhosphorIcon\n                        icon={singleColoredIcon}\n                        aria-label=\"Crown\"\n                        color={semanticColor.status.success.foreground}\n                    />\n                }\n                label=\"Custom Icon\"\n            />\n            <Heading size=\"large\">\n                Custom multi-colored inline svg using the Icon component\n            </Heading>\n            <NeutralBadge\n                icon={<Icon>{multiColoredIcon}</Icon>}\n                label=\"Custom Icon\"\n            />\n            <Heading size=\"large\">\n                Custom img element using the Icon component with a svg src\n            </Heading>\n            <NeutralBadge\n                icon={\n                    <Icon>\n                        <img src={\"logo.svg\"} alt=\"Wonder Blocks\" />\n                    </Icon>\n                }\n                label=\"Custom Icon\"\n            />\n            <Heading size=\"large\">\n                Custom img element using the Icon component with a png src\n            </Heading>\n            <NeutralBadge\n                icon={\n                    <Icon>\n                        <img src=\"avatar.png\" alt=\"Example avatar\" />\n                    </Icon>\n                }\n                label=\"Custom Icon\"\n            />\n        </View>\n    );\n};","description":"A badge can be used with a custom icon using the `PhosphorIcon` or `Icon` components. Here are some examples with custom icons: - A custom single colored svg icon - Use with the `PhosphorIcon` component - If the svg has `fill=\"currentColor\"` and the `color` prop for `PhosphorIcon` is not set, then the icon will use the color specified by the `Badge` component. - A multi-colored inline svg - Use with the `Icon` component - The `Icon` component supports svg assets that define their own fill - An `img` element - Use with the `Icon` component - The `Icon` component supports `img` elements - For icons that are from the Phosphor library, continue using the `PhosphorIcon` component. If the icon conveys meaning, it should have alt text."},{"id":"packages-badge-neutral-badge--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => {\n    return (\n        <NeutralBadge\n            label={args.label || \"\"}\n            icon={\n                args.icon ? (\n                    <PhosphorIcon\n                        icon={args.icon}\n                        aria-label={\"Example icon\"}\n                    />\n                ) : undefined\n            }\n            styles={{\n                root: {\n                    backgroundColor:\n                        semanticColor.core.background.neutral.strong,\n                    borderColor: semanticColor.core.border.knockout.default,\n                    color: semanticColor.core.foreground.knockout.default,\n                },\n                icon: {\n                    color: semanticColor.core.foreground.knockout.default,\n                },\n                label: {\n                    fontWeight: font.weight.medium,\n                },\n            }} />\n    );\n};","description":"A badge can be used with custom styles. The following parts can be styled: - `root`: Styles the root element - `icon`: Styles the icon element - `label`: Styles the text in the element Here is an example of custom styles using semantic tokens."}],"import":"import { ComponentInfo, NeutralBadge } from \"@khanacademy/wonder-blocks-badge\";\nimport { Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A badge that represents information without conveying additional meaning through its visual presentation `NeutralBadge` uses the `Badge` component and applies the appropriate styles for the neutral styling. For more details, see the `Badge` docs.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-badge/src/index.ts","description":"A badge that represents information without conveying additional meaning\nthrough its visual presentation\n\n`NeutralBadge` uses the `Badge` component and applies the appropriate styles\nfor the neutral styling. For more details, see the `Badge` docs.","displayName":"NeutralBadge","methods":[],"props":{"showBorder":{"defaultValue":null,"description":"Whether to show the border. Defaults to `true`.","name":"showBorder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/components/neutral-badge.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The id for the badge.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"The test id for the badge.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the Badge component.\n- `root`: Styles the root element\n- `icon`: Styles the icon element\n- `label`: Styles the text in the badge","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; icon?: StyleType; label?: StyleType; }"}},"tag":{"defaultValue":null,"description":"The HTML tag to render. Defaults to `div`.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"icon":{"defaultValue":null,"description":"The icon to display in the badge. It should be a `PhosphorIcon` or `Icon`\ncomponent.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>>"}},"label":{"defaultValue":null,"description":"The label to display in the badge.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"NeutralBadge"}},"packages-badge-statusbadge":{"id":"packages-badge-statusbadge","name":"StatusBadge","path":"./__docs__/wonder-blocks-badge/status-badge.stories.tsx","stories":[{"id":"packages-badge-statusbadge--default","name":"Default","snippet":"const Default = () => <StatusBadge\n    label={args.label || \"\"}\n    icon={\n        args.icon ? (\n            <PhosphorIcon icon={args.icon} aria-label=\"Example icon\" />\n        ) : undefined\n    } />;"},{"id":"packages-badge-statusbadge--kinds","name":"Kinds","snippet":"const Kinds = (\n    args: Omit<PropsFor<typeof StatusBadge>, \"icon\"> & {icon: string},\n) => {\n    return (\n        <View style={styles.container}>\n            {kinds.map((kind) => {\n                return (\n                    <StatusBadge\n                        key={kind}\n                        {...args}\n                        kind={kind}\n                        label={args.label || \"\"}\n                        icon={\n                            args.icon ? (\n                                <PhosphorIcon\n                                    icon={args.icon}\n                                    aria-label={\"Example icon\"}\n                                />\n                            ) : undefined\n                        }\n                    />\n                );\n            })}\n        </View>\n    );\n};","description":"The different kinds of status badges."},{"id":"packages-badge-statusbadge--no-border","name":"No Border","snippet":"const NoBorder = (\n    args: Omit<PropsFor<typeof StatusBadge>, \"icon\"> & {icon: string},\n) => {\n    return (\n        <View style={styles.container}>\n            {kinds.map((kind) => {\n                return (\n                    <StatusBadge\n                        key={kind}\n                        {...args}\n                        kind={kind}\n                        label={args.label || \"\"}\n                        icon={\n                            args.icon ? (\n                                <PhosphorIcon\n                                    icon={args.icon}\n                                    aria-label={\"Example icon\"}\n                                />\n                            ) : undefined\n                        }\n                    />\n                );\n            })}\n        </View>\n    );\n};","description":"A status badge can be used without a border."},{"id":"packages-badge-statusbadge--label-only","name":"Label Only","snippet":"const LabelOnly = (\n    args: Omit<PropsFor<typeof StatusBadge>, \"icon\"> & {icon: string},\n) => {\n    return (\n        <View style={styles.container}>\n            {kinds.map((kind) => {\n                return (\n                    <StatusBadge\n                        key={kind}\n                        {...args}\n                        kind={kind}\n                        label={args.label || \"\"}\n                        icon={\n                            args.icon ? (\n                                <PhosphorIcon\n                                    icon={args.icon}\n                                    aria-label={\"Example icon\"}\n                                />\n                            ) : undefined\n                        }\n                    />\n                );\n            })}\n        </View>\n    );\n};","description":"A badge can be used with only a label."},{"id":"packages-badge-statusbadge--icon-only","name":"Icon Only","snippet":"const IconOnly = (\n    args: Omit<PropsFor<typeof StatusBadge>, \"icon\"> & {icon: string},\n) => {\n    return (\n        <View style={styles.container}>\n            {kinds.map((kind) => {\n                return (\n                    <StatusBadge\n                        key={kind}\n                        {...args}\n                        kind={kind}\n                        label={args.label || \"\"}\n                        icon={\n                            args.icon ? (\n                                <PhosphorIcon\n                                    icon={args.icon}\n                                    aria-label={\"Example icon\"}\n                                />\n                            ) : undefined\n                        }\n                    />\n                );\n            })}\n        </View>\n    );\n};","description":"A badge can be used with only an icon."},{"id":"packages-badge-statusbadge--custom-icons","name":"Custom Icons","snippet":"const CustomIcons = () => {\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <Heading size=\"xlarge\">\n                Custom single colored svg icon using PhosphorIcon\n            </Heading>\n            <View style={styles.container}>\n                {kinds.map((kind) => {\n                    return (\n                        <StatusBadge\n                            key={kind}\n                            kind={kind}\n                            icon={\n                                <PhosphorIcon\n                                    icon={singleColoredIcon}\n                                    aria-label=\"Crown\"\n                                />\n                            }\n                            label=\"Custom Icon\"\n                        />\n                    );\n                })}\n            </View>\n            <Heading size=\"xlarge\">\n                Custom single colored svg icon using PhosphorIcon and color\n                prop\n            </Heading>\n            <View style={styles.container}>\n                {kinds.map((kind) => {\n                    return (\n                        <StatusBadge\n                            key={kind}\n                            kind={kind}\n                            icon={\n                                <PhosphorIcon\n                                    icon={singleColoredIcon}\n                                    aria-label=\"Crown\"\n                                    color={\n                                        semanticColor.core.foreground\n                                            .neutral.default\n                                    }\n                                />\n                            }\n                            label=\"Custom Icon\"\n                        />\n                    );\n                })}\n            </View>\n            <Heading size=\"xlarge\">\n                Custom multi-colored inline svg using the Icon component\n            </Heading>\n            <View style={styles.container}>\n                {kinds.map((kind) => {\n                    return (\n                        <StatusBadge\n                            key={kind}\n                            kind={kind}\n                            icon={<Icon>{multiColoredIcon}</Icon>}\n                            label=\"Custom Icon\"\n                        />\n                    );\n                })}\n            </View>\n            <Heading size=\"xlarge\">\n                Custom img element using the Icon component with a svg src\n            </Heading>\n            <View style={styles.container}>\n                {kinds.map((kind) => {\n                    return (\n                        <StatusBadge\n                            key={kind}\n                            kind={kind}\n                            icon={\n                                <Icon>\n                                    <img\n                                        src=\"logo.svg\"\n                                        alt=\"Wonder Blocks\"\n                                    />\n                                </Icon>\n                            }\n                            label=\"Custom Icon\"\n                        />\n                    );\n                })}\n            </View>\n            <Heading size=\"xlarge\">\n                Custom img element using the Icon component with a png src\n            </Heading>\n            <View style={styles.container}>\n                {kinds.map((kind) => {\n                    return (\n                        <StatusBadge\n                            key={kind}\n                            kind={kind}\n                            icon={\n                                <Icon>\n                                    <img\n                                        src=\"avatar.png\"\n                                        alt=\"Example avatar\"\n                                    />\n                                </Icon>\n                            }\n                            label=\"Custom Icon\"\n                        />\n                    );\n                })}\n            </View>\n        </View>\n    );\n};","description":"For more details about using custom icons, see the Badge docs for custom icons."}],"import":"import { ComponentInfo, StatusBadge } from \"@khanacademy/wonder-blocks-badge\";\nimport { Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A badge that represents a status. `StatusBadge` uses the `Badge` component and applies the appropriate styles for the status kinds. For more details, see the `Badge` docs.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-badge/src/index.ts","description":"A badge that represents a status.\n\n`StatusBadge` uses the `Badge` component and applies the appropriate styles\nfor the status kinds. For more details, see the `Badge` docs.","displayName":"StatusBadge","methods":[],"props":{"kind":{"defaultValue":null,"description":"The kind of badge to display. Defaults to `info`.","name":"kind","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/components/status-badge.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"info\" | \"success\" | \"warning\" | \"critical\"","value":[{"value":"\"info\""},{"value":"\"success\""},{"value":"\"warning\""},{"value":"\"critical\""}]}},"showBorder":{"defaultValue":null,"description":"Whether to show the border. Defaults to `true`.","name":"showBorder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/components/status-badge.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The id for the badge.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"The test id for the badge.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the Badge component.\n- `root`: Styles the root element\n- `icon`: Styles the icon element\n- `label`: Styles the text in the badge","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; icon?: StyleType; label?: StyleType; }"}},"tag":{"defaultValue":null,"description":"The HTML tag to render. Defaults to `div`.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"icon":{"defaultValue":null,"description":"The icon to display in the badge. It should be a `PhosphorIcon` or `Icon`\ncomponent.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>>"}},"label":{"defaultValue":null,"description":"The label to display in the badge.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"StatusBadge"}},"packages-badge-streakbadge":{"id":"packages-badge-streakbadge","name":"StreakBadge","path":"./__docs__/wonder-blocks-badge/streak-badge.stories.tsx","stories":[{"id":"packages-badge-streakbadge--default","name":"Default","snippet":"const Default = () => <StreakBadge label=\"Badge\" showIcon iconAriaLabel=\"Streak\" />;"},{"id":"packages-badge-streakbadge--no-icon","name":"No Icon","snippet":"const NoIcon = () => <StreakBadge label=\"Badge\" showIcon={false} />;","description":"Set `showIcon` to `false` to hide the streak icon."},{"id":"packages-badge-streakbadge--icon-only","name":"Icon Only","snippet":"const IconOnly = () => <StreakBadge showIcon iconAriaLabel=\"Streak\" />;","description":"Set `showIcon` to `true` to show the streak icon. Alt text for the streak icon can be set using the `iconAriaLabel` prop."}],"import":"import { ComponentInfo, StreakBadge } from \"@khanacademy/wonder-blocks-badge\";","jsDocTags":{},"description":"A badge that represents streaks. `StreakBadge` uses the `Badge` component and applies the appropriate styles and icon. For more details, see the `Badge` docs.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-badge/src/index.ts","description":"A badge that represents streaks.\n\n`StreakBadge` uses the `Badge` component and applies the appropriate styles\nand icon. For more details, see the `Badge` docs.","displayName":"StreakBadge","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The id for the badge.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"The test id for the badge.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the Badge component.\n- `root`: Styles the root element\n- `icon`: Styles the icon element\n- `label`: Styles the text in the badge","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; icon?: StyleType; label?: StyleType; }"}},"tag":{"defaultValue":null,"description":"The HTML tag to render. Defaults to `div`.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"showIcon":{"defaultValue":null,"description":"Whether to show the icon. Defaults to `false`.","name":"showIcon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"label":{"defaultValue":null,"description":"The label to display in the badge.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"iconAriaLabel":{"defaultValue":null,"description":"Aria label for the icon.","name":"iconAriaLabel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-badge/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"StreakBadge"}},"packages-banner":{"id":"packages-banner","name":"Banner","path":"./__docs__/wonder-blocks-banner/banner.stories.tsx","stories":[{"id":"packages-banner--default","name":"Default","snippet":"const Default = () => <Banner text=\"Here is some example text.\" />;","description":"This is an example of a banner with all the props set to their default values and the `text` prop set to some example text."},{"id":"packages-banner--kinds","name":"Kinds","snippet":"const Kinds = () => (\n    <View style={styles.container}>\n        <Banner\n            text=\"kind: info - This is a message about something informative like an announcement.\"\n            kind=\"info\"\n        />\n        <Banner\n            text=\"kind: success - This is a message about something positive or successful!\"\n            kind=\"success\"\n        />\n        <Banner\n            text=\"kind: warning - This is a message warning the user about a potential issue.\"\n            kind=\"warning\"\n        />\n        <Banner\n            text=\"kind: critical - This is a message about something critical or an error.\"\n            kind=\"critical\"\n        />\n    </View>\n);","description":"Banners have four possible kinds (`kind` prop) - info (default), success, warning, and critical. Info is blue with an info \"i\" icon, success is green with a smiling icon, warning is yellow with a triangular \"!\" icon, and critical is red with a round \"!\" icon."},{"id":"packages-banner--long-text","name":"Long Text","snippet":"const LongText = () => <Banner\n    text=\"We couldn't deliver your sign-up email to Adolph.Blaine.Charles.David.Earl.Frederick.Gerald.Hubert.Irvin.John.Kenneth.Lloyd.Martin.Nero.Oliver.Paul.Quincy.Randolph.Sherman.Thomas.Uncas.Victor.William.Xerxes.Yancy.Zeus.Wolfe­schlegel­stein­hausen­berger­dorff­welche­vor­altern­waren­gewissen­haft­schafers­wessen­schafe­waren­wohl­gepflege­und­sorg­faltig­keit­be­schutzen­vor­an­greifen­durch­ihr­raub­gierig­feinde­welche­vor­altern­zwolf­hundert­tausend­jah­res­voran­die­er­scheinen­von­der­erste­erde­mensch­der­raum­schiff­genacht­mit­tung­stein­und­sieben­iridium­elek­trisch­motors­ge­brauch­licht­als­sein­ur­sprung­von­kraft­ge­start­sein­lange­fahrt­hin­zwischen­stern­artig­raum­auf­de­suchen­nach­bar­schaft­der­stern­welche­ge­habt­be­wohn­bar­planeten­kreise­drehen­sich­und­wo­hin­der­neue­rasse­von­ver­stand­ig­mensch­lich­keit­konnte­fort­pflanzen­und­sicher­freuen­an­lebens­lang­lich­freude­und­ru­he­mit­nicht­ein­furcht­vor­an­greifen­vor­anderer­intelligent­ge­schopfs­von­hin­zwischen­stern­art­ig­raum.Sr@khanacademy.org. You may need to change it.\"\n    kind=\"critical\"\n    onDismiss={() => {}}\n    actions={[\n        {\n            type: \"button\",\n            title: \"Change your email\",\n            onClick: () => {},\n        },\n    ]} />;","description":"Here is an example of a banner with long text. In this case, the email address is one giant word. Notice that the `overflow-wrap` property here is set to `break-word` so that the email address will wrap to the next line."},{"id":"packages-banner--dark-background","name":"Dark Background","snippet":"const DarkBackground = () => (\n    <View style={styles.container}>\n        <Banner text=\"kind: info\" kind=\"info\" />\n        <Banner text=\"kind: success\" kind=\"success\" />\n        <Banner text=\"kind: warning\" kind=\"warning\" />\n        <Banner text=\"kind: critical\" kind=\"critical\" />\n    </View>\n);","description":"This is how banners look on a dark background."},{"id":"packages-banner--with-buttons","name":"With Buttons","snippet":"const WithButtons = () => <Banner\n    text=\"This is a banner with buttons.\"\n    actions={[\n        {type: \"button\", title: \"Button 1\", onClick: () => {}},\n        {type: \"button\", title: \"Button 2\", onClick: () => {}},\n    ]} />;","description":"This is a banner with buttons. An action, passed into the `actions` prop, becomes a button when it has an `onClick` value and does not have an `href` value."},{"id":"packages-banner--with-links","name":"With Links","snippet":"const WithLinks = () => <Banner\n    text=\"This is a banner with links.\"\n    actions={[\n        {type: \"link\", title: \"Link 1\", href: \"/\"},\n        {type: \"link\", title: \"Link 2\", href: \"/\", onClick: () => {}},\n    ]} />;","description":"This is a banner with links. An action, passed into the `actions` prop, becomes a link when it has an `href` value. It can also have an `onClick` value, but it will be a link regardless if it navigates to a URL via `href`."},{"id":"packages-banner--with-inline-links","name":"With Inline Links","snippet":"const WithInlineLinks = () => (\n    <View style={styles.container}>\n        <Banner\n            text=\"Oh no! The button and link on the right look different! Don't mix button and link actions.\"\n            kind=\"critical\"\n            actions={[\n                {type: \"link\", title: \"Link\", href: \"/\"},\n                {type: \"button\", title: \"Button\", onClick: () => {}},\n            ]}\n        />\n        <Banner\n            text={\n                <>\n                    Use inline links in the body of the text instead. Click{\" \"}\n                    {\n                        <Link href=\"#link\" inline={true}>\n                            link example\n                        </Link>\n                    }{\" \"}\n                    to go to some other page.\n                </>\n            }\n            kind=\"success\"\n            actions={[{type: \"button\", title: \"Button\", onClick: () => {}}]}\n        />\n    </View>\n);","description":"A banner can have inline links passed into the `text` prop. Here, the Wonder Blocks `<Link>` component is inline with the text that is in a span. One place to use this is in the case that a banner needs to have a link action _and_ a button action. That is to say, one action navigates to a URL and the other doesn't. This may be unfavorable because buttons and links look different. One workaround is to make the link inline and only have buttons as actions."},{"id":"packages-banner--multiline","name":"Multiline","snippet":"const Multiline = () => (\n    <View style={styles.narrowBanner}>\n        <Banner\n            text={\n                \"This is a multi-line banner. These have wrapping text and actions would be below.\"\n            }\n        />\n    </View>\n);","description":"This is an example of a banner with multiple lines of text."},{"id":"packages-banner--multiline-with-buttons","name":"Multiline With Buttons","snippet":"const MultilineWithButtons = () => (\n    <View style={styles.narrowBanner}>\n        <Banner\n            text={\n                \"This is a multi-line banner. These have wrapping text and actions are below.\"\n            }\n            actions={[\n                {type: \"button\", title: \"Button 1\", onClick: () => {}},\n                {type: \"button\", title: \"Button 2\", onClick: () => {}},\n            ]}\n        />\n    </View>\n);","description":"When a banner has long text, the actions move from the right of the text to the bottom. Here, the actions are buttons."},{"id":"packages-banner--multiline-with-links","name":"Multiline With Links","snippet":"const MultilineWithLinks = () => (\n    <View style={styles.narrowBanner}>\n        <Banner\n            text={\n                \"This is a multi-line banner. These have wrapping text and actions are below.\"\n            }\n            actions={[\n                {type: \"link\", title: \"Link 1\", href: \"/\"},\n                {type: \"link\", title: \"Link 2\", href: \"/\"},\n            ]}\n        />\n    </View>\n);","description":"When a banner has long text, the actions move from the right of the text to the bottom. Here, the actions are links."},{"id":"packages-banner--with-dismissal","name":"With Dismissal","snippet":"const WithDismissal = () => {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const [dismissed, setDismissed] = React.useState(false);\n\n    const handleDismiss = () => {\n        // eslint-disable-next-line no-console\n        console.log(\"Dismiss!\");\n        setDismissed(true);\n    };\n\n    const handleReset = () => {\n        // eslint-disable-next-line no-console\n        console.log(\"Reset!\");\n        setDismissed(false);\n    };\n\n    return dismissed ? (\n        <Button onClick={handleReset}>Reset banner</Button>\n    ) : (\n        <Banner\n            text=\"This banner can be dismissed\"\n            kind=\"critical\"\n            onDismiss={handleDismiss}\n            actions={[\n                {\n                    type: \"button\",\n                    title: \"Also dismiss\",\n                    onClick: handleDismiss,\n                },\n            ]}\n            aria-label=\"Notification banner.\"\n        />\n    );\n};","description":"This is a banner that can be dismissed. For the \"X\" dismiss button to show up, a function must be passed into the `onDismiss` prop. Here, pressing the \"X\" button or the \"Also dismiss\" button will dismiss the banner. Pressing either button sets the `dismissed` state to true, which causes the banner not to render due to a conditional. Instead, there is a button whose `onClick` function sets the `dismissed` state to false. This causes the banner to reappear and the button to disappear."},{"id":"packages-banner--with-custom-action","name":"With Custom Action","snippet":"const WithCustomAction = () => (\n    <Banner\n        text=\"some text\"\n        actions={[\n            {\n                type: \"custom\",\n                node: (\n                    <Button\n                        aria-label=\"Loading\"\n                        kind=\"tertiary\"\n                        size=\"small\"\n                        onClick={() => {}}\n                        spinner={true}\n                    >\n                        Spinner Button\n                    </Button>\n                ),\n            },\n        ]}\n    />\n);","description":"**NOTE: Custom actions are discouraged and should only be used as a last resort!**. There are a number of other props that Buttons and Links may have that are not currently supported by the `actions` prop in Banner. These would require the use of custom actions. If it absolutely necessary to have a custom action, it can be done by passing in an object into the `actions` prop array that has `type:\"custom\"`, and your desired element in the `node` field. Here is an example of a case where the built in actions may not be enough - a button with a `spinner` prop would need a custom implementation here."},{"id":"packages-banner--with-custom-action-primary","name":"With Custom Action Primary","snippet":"const WithCustomActionPrimary = () => (\n    <Banner\n        text=\"some text\"\n        actions={[\n            {\n                type: \"custom\",\n                node: (\n                    <Button size=\"small\" onClick={() => {}}>\n                        Custom Action\n                    </Button>\n                ),\n            },\n        ]}\n    />\n);","description":"**NOTE: Custom actions are discouraged and should only be used as a last resort!**. Another example with a custom action using a primary button. See **With Custom Action** story for more details."},{"id":"packages-banner--with-mixed-actions","name":"With Mixed Actions","snippet":"const WithMixedActions = () => (\n    <Banner\n        text=\"some text\"\n        actions={[\n            {\n                type: \"button\",\n                title: \"Normal button\",\n                onClick: () => {},\n            },\n            {\n                type: \"custom\",\n                node: (\n                    <Button kind=\"tertiary\" size=\"small\" onClick={() => {}}>\n                        Custom button\n                    </Button>\n                ),\n            },\n            {\n                type: \"custom\",\n                node: (\n                    <Button size=\"small\" onClick={() => {}}>\n                        Custom button 2\n                    </Button>\n                ),\n            },\n            {\n                type: \"custom\",\n                node: (\n                    <Button\n                        kind=\"tertiary\"\n                        size=\"small\"\n                        onClick={() => {}}\n                        spinner={true}\n                        aria-label=\"Loading\"\n                    >\n                        Spinner Button\n                    </Button>\n                ),\n            },\n        ]}\n    />\n);","description":"Here is an example that includes both a normal action and a custom action."},{"id":"packages-banner--with-phosphor-icon","name":"With Phosphor Icon","snippet":"const WithPhosphorIcon = () => <Banner icon={magnifyingGlass} text=\"Here is an example with a Phosphor Icon\" />;","description":"Use the `icon` prop to show a specific Phosphor icon in the banner instead. If the `icon` prop is not set, a default icon will be used in the banner depending on the `kind` prop. __NOTE:__ Icons are available from the [Phosphor Icons](https://phosphoricons.com/) library. To use a Phosphor icon, you can use the following syntax: ```jsx import magnifyingGlass from \"@phosphor-icons/core/regular/magnifying-glass.svg\"; <Banner icon={magnifyingGlass} text=\"text\" /> ``` __Accessibility__: The icon chosen for the banner is decorative and will always have an `aria-label` that communicates the kind of banner (e.g. \"info\")."},{"id":"packages-banner--with-custom-solid-icon","name":"With Custom Solid Icon","snippet":"const WithCustomSolidIcon = () => <Banner icon={crownIcon} text=\"Here is an example with a custom icon\" />;","description":"Use the `icon` prop to show a custom icon in the banner instead. If the `icon` prop is not set, a default icon will be used in the banner depending on the `kind` prop. To use a custom icon that has a solid fill, you can use the following syntax: ```jsx // This SVG should have the following attributes: // - viewBox=\"0 0 256 256\" // - fill=\"currentColor\" // - A path (or paths) scaled up to fit in the 256x256 viewport. import crownIcon from \"./icons/crown.svg\"; <Banner icon={crownIcon} text=\"text\" /> ``` __Accessibility__: The icon chosen for the banner is decorative and will always have an `aria-label` that communicates the kind of banner (e.g. \"info\")."},{"id":"packages-banner--with-custom-icon","name":"With Custom Icon","snippet":"const WithCustomIcon = () => <Banner\n    icon={\n        <Icon>\n            <img src=\"logo.svg\" alt=\"Wonder Blocks\" />\n        </Icon>\n    }\n    kind=\"success\"\n    text=\"Success! Here is an example with a custom icon\" />;","description":"For non-Phosphor icons, you can use the Wonder Blocks Icon component to wrap a custom icon. The Banner component will handle the sizing for the icon. Accessibility: When customizing the icon, make sure to: - Provide alt text for the icon - Make sure important information about the banner kind is still communicated to the user so that color alone isn't used to convey meaning."},{"id":"packages-banner--with-no-icon","name":"With No Icon","snippet":"const WithNoIcon = () => <Banner\n    icon=\"none\"\n    text=\"Success! Here is an example with no icon.\"\n    kind=\"success\" />;","description":"When `icon=\"none\"`, no icon is displayed. For accessibility, make sure important information about the kind is still conveyed to the user so that color alone isn't used to convey meaning."},{"id":"packages-banner--right-to-left","name":"Right To Left","snippet":"const RightToLeft = () => (\n    <View dir=\"rtl\" style={styles.container}>\n        <Banner\n            text=\"یہ اردو میں لکھا ہے۔\"\n            actions={[\n                {type: \"button\", title: \"پہلا بٹن\", onClick: () => {}},\n                {type: \"button\", title: \"دوسرا بٹن\", onClick: () => {}},\n            ]}\n        />\n        <Banner\n            text=\"یہ اردو میں لکھا ہے۔\"\n            actions={[\n                {type: \"button\", title: \"پہلا بٹن\", onClick: () => {}},\n                {type: \"button\", title: \"دوسرا بٹن\", onClick: () => {}},\n            ]}\n        />\n    </View>\n);","description":"When in the right-to-left direction, the banner is mirrored. This example has text in Urdu, which is a right-to-left language."},{"id":"packages-banner--right-to-left-multiline","name":"Right To Left Multiline","snippet":"const RightToLeftMultiline = () => (\n    <View dir=\"rtl\">\n        <Banner\n            text={`یہ اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ\n         اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ\n         اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ\n         اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ\n         اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔\n         اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔\n         اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔یہ اردو میں لکھا ہے۔`}\n            actions={[\n                {type: \"button\", title: \"پہلا بٹن\", onClick: () => {}},\n                {type: \"button\", title: \"دوسرا بٹن\", onClick: () => {}},\n            ]}\n        />\n    </View>\n);","description":"When in the right-to-left direction, the banner is mirrored. This example has text in Urdu, which is a right-to-left language. This example also has multiple lines with the butotns on the bottom of the text."},{"id":"packages-banner--with-custom-styles","name":"With Custom Styles","snippet":"const WithCustomStyles = () => (\n    <View style={{height: \"500px\", width: \"300px\", gap: sizing.size_160}}>\n        <Banner text={reallyLongText} styles={{root: {flexShrink: 0}}} />\n        <View\n            style={{\n                backgroundColor:\n                    semanticColor.core.background.neutral.subtle,\n                flexGrow: 1,\n                overflowY: \"auto\",\n            }}\n            tabIndex={0}\n        >\n            <View style={{padding: sizing.size_160}}>\n                {reallyLongText}\n                {reallyLongText}\n            </View>\n        </View>\n    </View>\n);","description":"There are times where custom styles need to be applied to the Banner component, especially for layout purposes. Custom styles can be applied by using the `styles` prop. The following parts can be styled: - `root`: Styles the root element If there are other parts you need to customize, please reach out to the Wonder Blocks team!"}],"import":"import Banner, { ComponentInfo } from \"@khanacademy/wonder-blocks-banner\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { Icon } from \"@khanacademy/wonder-blocks-icon\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"Banner. A banner displays a prominent message and related optional actions. It can be used as a way of informing the user of important changes. Typically, it is displayed toward the top of the screen. ### Usage ```jsx import Banner from \"@khanacademy/wonder-blocks-banner\"; <Banner text=\"Here is some example text.\" kind=\"success\" actions={[ {title: \"Button 1\", onClick: () => {}}, {title: \"Button 2\", onClick: () => {}}, ]} onDismiss={() => {console.log(\"Has been dismissed.\")}} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-banner/src/index.ts","description":"Banner. A banner displays a prominent message and related optional actions.\nIt can be used as a way of informing the user of important changes.\nTypically, it is displayed toward the top of the screen.\n\n### Usage\n```jsx\nimport Banner from \"@khanacademy/wonder-blocks-banner\";\n\n<Banner\n    text=\"Here is some example text.\"\n    kind=\"success\"\n    actions={[\n        {title: \"Button 1\", onClick: () => {}},\n        {title: \"Button 2\", onClick: () => {}},\n    ]}\n    onDismiss={() => {console.log(\"Has been dismissed.\")}}\n/>\n```","displayName":"src","methods":[],"props":{"aria-label":{"defaultValue":null,"description":"Accessible label for the banner.\nThis is read out before the other contents of the banner.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"kind":{"defaultValue":null,"description":"Determines the color and icon of the banner.","name":"kind","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"BannerKind","value":[{"value":"\"info\""},{"value":"\"success\""},{"value":"\"warning\""},{"value":"\"critical\""}]}},"text":{"defaultValue":null,"description":"Text on the banner or a node if you want something different. For the\nbest results, use the default styles provided by the Banner component and\navoid using typography components for the `text` prop.","name":"text","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactNode"}},"actions":{"defaultValue":null,"description":"Links or tertiary Buttons that appear to the right of the text.\n\nThe ActionTrigger must have either an onClick or an href field, or both.","name":"actions","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"readonly ActionTrigger[]"}},"onDismiss":{"defaultValue":null,"description":"If present, dismiss button is on right side. If not, no button appears.","name":"onDismiss","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => void | null)"}},"dismissAriaLabel":{"defaultValue":null,"description":"The accessible label for the dismiss button.\nPlease pass in a translated string.","name":"dismissAriaLabel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"icon":{"defaultValue":null,"description":"An optional icon to display. This is a reference to the icon asset (imported as a\nstatic SVG file). If not provided, a default icon will be used based on\nthe \"kind\" prop.\n\nIt supports the following types:\n- `PhosphorIconAsset`: a reference to a Phosphor SVG asset.\n- `string`: an import referencing an arbitrary SVG file.\n- `\"none\"`: no icon is displayed.\n\nNote: When using `icon=\"none\"`, make sure important information is\nconveyed in the text of the banner, since color should not be the only\nway to convey status information.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string | ReactElement<any, string | JSXElementConstructor<any>> | PhosphorIconAsset"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the Banner component.\n- `root`: Styles the root element","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-banner/src/components/banner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; }"}}},"exportName":"src"}},"packages-birthdaypicker":{"id":"packages-birthdaypicker","name":"BirthdayPicker","path":"./__docs__/wonder-blocks-birthday-picker/birthday-picker.stories.tsx","stories":[{"id":"packages-birthdaypicker--birthday-picker-default","name":"Birthday Picker Default","snippet":"const BirthdayPickerDefault = () => <BirthdayPicker locale=\"en-US\" onChange={() => {}} defaultValue=\"\" />;","description":"Default BirthdayPicker example. It will be rendered as the first/default story and it can be interacted with the controls panel in the Browser."},{"id":"packages-birthdaypicker--birthday-picker-with-default-value","name":"Birthday Picker With Default Value","snippet":"const BirthdayPickerWithDefaultValue = () => <BirthdayPicker locale=\"en-US\" onChange={() => {}} defaultValue=\"2021-07-19\" />;"},{"id":"packages-birthdaypicker--invalid-birthday-picker","name":"Invalid Birthday Picker","snippet":"const InvalidBirthdayPicker = () => <BirthdayPicker locale=\"en-US\" onChange={() => {}} defaultValue=\"2030-07-19\" />;"},{"id":"packages-birthdaypicker--birthday-picker-with-custom-labels","name":"Birthday Picker With Custom Labels","snippet":"const BirthdayPickerWithCustomLabels = () => <BirthdayPicker\n    locale=\"en-US\"\n    onChange={() => {}}\n    defaultValue=\"\"\n    labels={{\n        day: \"Día\",\n        month: \"Mes\",\n        year: \"Año\",\n        errorMessage: \"Por favor seleccione una fecha válida.\",\n    }} />;"},{"id":"packages-birthdaypicker--disabled-birthday-picker","name":"Disabled Birthday Picker","snippet":"const DisabledBirthdayPicker = () => <BirthdayPicker locale=\"en-US\" onChange={() => {}} disabled />;","description":"A BirthdayPicker can be disabled by passing the `disabled` prop. This will disable all the dropdown controls and prevent them from being interacted with. Note: The `disabled` prop sets the `aria-disabled` attribute to `true` instead of setting the `disabled` attribute. This is so that the component remains focusable while communicating to screen readers that it is disabled."},{"id":"packages-birthdaypicker--birthday-picker-with-year-and-month-only","name":"Birthday Picker With Year And Month Only","snippet":"const BirthdayPickerWithYearAndMonthOnly = () => <BirthdayPicker\n    locale=\"en-US\"\n    monthYearOnly\n    onChange={(date?: string | null) => {\n        // eslint-disable-next-line no-console\n        console.log(\"Date selected: \", date);\n    }} />;"},{"id":"packages-birthdaypicker--birthday-picker-vertical","name":"Birthday Picker Vertical","snippet":"const BirthdayPickerVertical = () => <BirthdayPicker\n    locale=\"en-US\"\n    style={{flexDirection: \"column\"}}\n    dropdownStyle={{width: \"100%\"}}\n    onChange={(date?: string | null) => {\n        // eslint-disable-next-line no-console\n        console.log(\"Date selected: \", date);\n    }} />;"},{"id":"packages-birthdaypicker--birthday-picker-vertical-with-error","name":"Birthday Picker Vertical With Error","snippet":"const BirthdayPickerVerticalWithError = () => <BirthdayPicker\n    locale=\"en-US\"\n    style={{flexDirection: \"column\"}}\n    onChange={(date?: string | null) => {\n        // eslint-disable-next-line no-console\n        console.log(\"Date selected: \", date);\n    }}\n    defaultValue=\"2030-07-19\" />;"},{"id":"packages-birthdaypicker--birthday-picker-mobile","name":"Birthday Picker Mobile","snippet":"const BirthdayPickerMobile = () => <BirthdayPicker\n    locale=\"en-US\"\n    onChange={(date?: string | null) => {\n        // eslint-disable-next-line no-console\n        console.log(\"Date selected: \", date);\n    }} />;"},{"id":"packages-birthdaypicker--locale","name":"Locale","snippet":"const Locale = () => <BirthdayPicker locale=\"es\" defaultValue=\"2021-01-19\" />;","description":"A BirthdayPicker can be configured to render the month names in a different locale. This can be useful when we want to display the component in a different language. If no locale is provided, the browser's `navigator.language` value will be used."}],"import":"import BirthdayPicker, { ComponentInfo } from \"@khanacademy/wonder-blocks-birthday-picker\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-birthday-picker/src/index.ts","description":"","displayName":"src","methods":[],"props":{"defaultValue":{"defaultValue":null,"description":"The default value to populate the birthdate with. Should be in the\nformat: YYYY-MM-DD (e.g. 2021-05-26). It's only used to populate the\ninitial value as this is an uncontrolled component.","name":"defaultValue","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-birthday-picker/src/components/birthday-picker.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"disabled":{"defaultValue":null,"description":"Whether the birthdate fields are disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-birthday-picker/src/components/birthday-picker.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"labels":{"defaultValue":null,"description":"The object containing the custom labels used inside this component.","name":"labels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-birthday-picker/src/components/birthday-picker.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"Labels"}},"monthYearOnly":{"defaultValue":null,"description":"Whether we want to hide the day field.\n\n**NOTE:** We will set the day to the _last_ day of the _selected_ month\nif the day field is hidden. Please make sure to modify the passed date\nvalue to fit different needs (e.g. if you want to set the _last_ day of\nthe _following_ month instead).","name":"monthYearOnly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-birthday-picker/src/components/birthday-picker.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onChange":{"defaultValue":null,"description":"Listen for changes to the birthdate. Could be a string in the YYYY-MM-DD\nformat or `null`.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-birthday-picker/src/components/birthday-picker.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(date?: string | null | undefined) => unknown"}},"style":{"defaultValue":null,"description":"Additional styles applied to the root element of the component.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-birthday-picker/src/components/birthday-picker.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"dropdownStyle":{"defaultValue":null,"description":"Additional styles applied to the dropdowns.","name":"dropdownStyle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-birthday-picker/src/components/birthday-picker.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"locale":{"defaultValue":null,"description":"The locale to use for the month names. If not provided, the browser's\n`navigator.language` value will be used.","name":"locale","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-birthday-picker/src/components/birthday-picker.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}}},"exportName":"src"}},"packages-breadcrumbs":{"id":"packages-breadcrumbs","name":"Breadcrumbs","path":"./__docs__/wonder-blocks-breadcrumbs/breadcrumbs.stories.tsx","stories":[{"id":"packages-breadcrumbs--default","name":"Default","snippet":"const Default = () => <Breadcrumbs aria-label=\"Navigation Menu\">{[\n        <BreadcrumbsItem>\n            <Link href=\"#course\">Course</Link>\n        </BreadcrumbsItem>,\n        <BreadcrumbsItem>\n            <Link href=\"#unit\">Unit</Link>\n        </BreadcrumbsItem>,\n        <BreadcrumbsItem>Lesson</BreadcrumbsItem>,\n    ]}</Breadcrumbs>;","description":"Default Breadcrumbs example. It will be rendered as the first/default story and it can be interacted with the controls panel in the Browser."}],"import":"import { Breadcrumbs, BreadcrumbsItem, ComponentInfo } from \"@khanacademy/wonder-blocks-breadcrumbs\";\nimport Link from \"@khanacademy/wonder-blocks-link\";","jsDocTags":{},"description":"A breadcrumb trail consists of a list of links to the parent pages of the current page in hierarchical order. It helps users find their place within a website or web application. Breadcrumbs are often placed horizontally before a page's main content. The Breadcrumbs component will have the following structure: 1. Breadcrumbs Item: Represents a section within the page. 2. Separator: Adds a separator between each item. NOTE: `<BreadcrumbsItem />` only accepts two element types: 1. `string` 2. `<Link />` ## Usage ```jsx import { Breadcrumbs, BreadcrumbsItem } from \"@khanacademy/wonder-blocks-breadcrumbs\"; <Breadcrumbs> <BreadcrumbsItem> <Link href=\"\">Course</Link> </BreadcrumbsItem> <BreadcrumbsItem> <Link href=\"\">Unit</Link> </BreadcrumbsItem> <BreadcrumbsItem> Lesson </BreadcrumbsItem> </Breadcrumbs> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-breadcrumbs/src/index.ts","description":"A breadcrumb trail consists of a list of links to the parent pages\nof the current page in hierarchical order. It helps users find their\nplace within a website or web application.\nBreadcrumbs are often placed horizontally before a page's main content.\n\nThe Breadcrumbs component will have the following structure:\n\n1. Breadcrumbs Item: Represents a section within the page.\n2. Separator: Adds a separator between each item.\n\nNOTE: `<BreadcrumbsItem />` only accepts two element types:\n\n1. `string`\n2. `<Link />`\n\n## Usage\n\n```jsx\nimport {\n    Breadcrumbs,\n    BreadcrumbsItem\n} from \"@khanacademy/wonder-blocks-breadcrumbs\";\n\n<Breadcrumbs>\n    <BreadcrumbsItem>\n        <Link href=\"\">Course</Link>\n    </BreadcrumbsItem>\n    <BreadcrumbsItem>\n        <Link href=\"\">Unit</Link>\n    </BreadcrumbsItem>\n    <BreadcrumbsItem>\n        Lesson\n    </BreadcrumbsItem>\n</Breadcrumbs>\n```","displayName":"Breadcrumbs","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\nAccessible label for the breadcrumbs.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-breadcrumbs/src/components/breadcrumbs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"children":{"defaultValue":null,"description":"This is the content for the collection of Breadcrumbs","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-breadcrumbs/src/components/breadcrumbs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & { children: string | ReactElement<SharedProps & RefAttributes<HTMLAnchorElement | ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>>, string | JSXElementConstructor<any>>; showSeparator?: boolean | undefined; testId?: string | undefined; } & RefAttributes<HTMLLIElement>, string | JSXElementConstructor<any>> | ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & { children: string | ReactElement<SharedProps & RefAttributes<HTMLAnchorElement | ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>>, string | JSXElementConstructor<any>>; showSeparator?: boolean | undefined; testId?: string | undefined; } & RefAttributes<HTMLLIElement>, string | JSXElementConstructor<any>>[]"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-breadcrumbs/src/components/breadcrumbs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Breadcrumbs"},"docs":{"packages-breadcrumbs--accessibility":{"id":"packages-breadcrumbs--accessibility","name":"accessibility","path":"./__docs__/wonder-blocks-breadcrumbs/accessibility.mdx","title":"Packages / Breadcrumbs","content":"import {Meta, Canvas} from \"@storybook/addon-docs/blocks\";\n\nimport * as BreadcrumbsStories from \"./breadcrumbs.stories\";\n\n<Meta title=\"Packages / Breadcrumbs / Accessibility\" of={BreadcrumbsStories} />\n\n## Accessibility\n\n### Labeling\n\n`Breadcrumbs` has an `aria-label` prop that sets the accessible name on the\nthe component. By default, this is \"Breadcrumbs\" as per recommended guidelines.\n\nThis is an example of a component with an accessible label:\n\n<Canvas of={BreadcrumbsStories.Default} />\n\n### Nav Role\n\nBreadcrumbs are `nav` elements. They show up as navigation landmarks to\nscreen readers.\n\n### Current Page\n\nGuidelines state that the last link in a list of breadcrumbs (the last\n`BreadcrumbsItem`) should have the attribute `aria-current=\"page\"` to\nindicate that it represents the current page. The implementation already\nsets `aria-current=\"page` to the last element, so developers do not need\nto add it themeselves.\n\n### References\n\n[W3C Breadcrumbs Guidelines](https://www.w3.org/TR/wai-aria-practices-1.1/examples/breadcrumb/index.html)\n"}}},"packages-button-guides-accessibility":{"id":"packages-button-guides-accessibility","name":"Button","path":"./__docs__/wonder-blocks-button/accessibility.stories.tsx","stories":[{"id":"packages-button-guides-accessibility--labeling","name":"Labeling","snippet":"const Labeling = () => (\n    <View>\n        <Button spinner={true} aria-label=\"The action is being saved...\">\n            Label\n        </Button>\n    </View>\n);"},{"id":"packages-button-guides-accessibility--disabled-state","name":"Disabled state","snippet":"const DisabledState = () => (\n    <View\n        style={{\n            flexDirection: \"row\",\n        }}\n    >\n        <Button\n            style={styles.button}\n            // eslint-disable-next-line no-console\n            onClick={(e) => console.log(\"Hello, world!\")}\n            disabled={true}\n        >\n            Primary\n        </Button>\n        <Button\n            style={styles.button}\n            href={\"/foo\"}\n            kind=\"secondary\"\n            disabled={true}\n        >\n            Secondary\n        </Button>\n        <Button\n            style={styles.button}\n            // eslint-disable-next-line no-console\n            onClick={(e) => console.log(\"Hello, world!\")}\n            kind=\"tertiary\"\n            disabled={true}\n        >\n            Tertiary\n        </Button>\n    </View>\n);"}],"import":"import Button from \"@khanacademy/wonder-blocks-button\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Button\" component.\n  11 | });\n  12 |\n> 13 | export default {\n     | ^\n  14 |     title: \"Packages / Button / Guides / Accessibility\",\n  15 |     component: Button,\n  16 |\n\n./__docs__/wonder-blocks-button/accessibility.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\n\nconst styles = StyleSheet.create({\n    button: {\n        marginInlineEnd: 10,\n    },\n});\n\nexport default {\n    title: \"Packages / Button / Guides / Accessibility\",\n    component: Button,\n\n    // Disables chromatic testing for these stories.\n    parameters: {\n        previewTabs: {\n            canvas: {\n                hidden: true,\n            },\n        },\n\n        viewMode: \"docs\",\n\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const Labeling = {\n    render: () => (\n        <View>\n            <Button spinner={true} aria-label=\"The action is being saved...\">\n                Label\n            </Button>\n        </View>\n    ),\n};\n\nexport const DisabledState = {\n    render: () => (\n        <View\n            style={{\n                flexDirection: \"row\",\n            }}\n        >\n            <Button\n                style={styles.button}\n                // eslint-disable-next-line no-console\n                onClick={(e) => console.log(\"Hello, world!\")}\n                disabled={true}\n            >\n                Primary\n            </Button>\n            <Button\n                style={styles.button}\n                href={\"/foo\"}\n                kind=\"secondary\"\n                disabled={true}\n            >\n                Secondary\n            </Button>\n            <Button\n                style={styles.button}\n                // eslint-disable-next-line no-console\n                onClick={(e) => console.log(\"Hello, world!\")}\n                kind=\"tertiary\"\n                disabled={true}\n            >\n                Tertiary\n            </Button>\n        </View>\n    ),\n\n    name: \"Disabled state\",\n};\n"},"docs":{"packages-button-guides-accessibility--docs":{"id":"packages-button-guides-accessibility--docs","name":"Docs","path":"./__docs__/wonder-blocks-button/accessibility.mdx","title":"Packages / Button / Guides / Accessibility","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as AccessibilityStories from './accessibility.stories';\n\n<Meta of={AccessibilityStories} />\n\n## Accessibility\n\n### Labeling\n\n`Button` has an accessible label by default. The accessible name is computed from\nthe `children` prop. However, `aria-label` should be used when `spinner={true}`\nto let people using screen readers that the action taken by clicking the button\nwill take some time to complete.\n\nThis is an example of a component with an accessible label:\n\n<Canvas of={AccessibilityStories.Labeling} />\n\n### Disabled state\n\nWhen the `disabled` prop is set, the `aria-disabled` attribute will be set.\nBy using `aria-disabled` instead of the `disabled` attribute, the element\nwill remain focusable and will be included in the tab order.\n\nWhen it is in a disabled state, the component will have disabled styling and\ncannot be pressed.\n\n<Canvas of={AccessibilityStories.DisabledState} />\n\n### References\n\n* [Implicit ARIA semantics](https://www.w3.org/TR/wai-aria-1.1/#implicit_semantics)\n* [Document conformance requirements](https://www.w3.org/TR/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html)\n\nFor more details, see the [Accessibility section](https://www.w3.org/TR/wai-aria-practices-1.1/#button) in w3.org.\n"}}},"packages-button-activitybutton":{"id":"packages-button-activitybutton","name":"ActivityButton","path":"./__docs__/wonder-blocks-button/activity-button.stories.tsx","stories":[{"id":"packages-button-activitybutton--default","name":"Default","snippet":"const Default = () => <ActivityButton\n    kind=\"primary\"\n    onClick={(e: React.SyntheticEvent) => {\n        action(\"clicked\")(e);\n    }}\n    disabled={false}>Search</ActivityButton>;","description":"Minimal activity button which only includes a label and an `onClick` handler. The `kind` prop is set to `primary` by default."},{"id":"packages-button-activitybutton--with-start-icon","name":"With Start Icon","snippet":"const WithStartIcon = () => <ActivityButton\n    kind=\"primary\"\n    onClick={(e: React.SyntheticEvent) => {\n        action(\"clicked\")(e);\n    }}\n    startIcon={magnifyingGlass}\n    disabled={false}>Search</ActivityButton>;","description":"This example includes a start icon, which is specified using the `startIcon` prop. The `endIcon` prop can also be used to specify an icon that appears at the end of the button."},{"id":"packages-button-activitybutton--with-custom-icons","name":"With Custom Icons","snippet":"const WithCustomIcons = () => <ActivityButton\n    kind=\"secondary\"\n    onClick={(e: React.SyntheticEvent) => {\n        action(\"clicked\")(e);\n    }}\n    startIcon={(<Icon>\n        <img alt=\"\" src=\"logo.svg\" />\n    </Icon>)}\n    endIcon={(<Icon>\n        <img alt=\"\" src=\"logo.svg\" />\n    </Icon>)}>Action</ActivityButton>;","description":"For non-Phosphor icons, you can use the Wonder Blocks Icon component for the `startIcon` and `endIcon` props. ```tsx import {Icon} from \"@khanacademy/wonder-blocks-icon\"; <ActivityButton startIcon={<Icon><img alt=\"\" src=\"logo.svg\" /></Icon>} endIcon={<Icon><img alt=\"\" src=\"logo.svg\" /></Icon>} > Action </ActivityButton> ``` Note: The ActivityButton component will handle the sizing for the icons."},{"id":"packages-button-activitybutton--kinds","name":"Kinds","snippet":"const Kinds = () => {\n    return (\n        <View style={{gap: sizing.size_160, flexDirection: \"row\"}}>\n            <ActivityButton\n                kind=\"primary\"\n                onClick={(e: React.SyntheticEvent) => {\n                    action(\"clicked\")(e);\n                }}>Search</ActivityButton>\n            <ActivityButton\n                onClick={(e: React.SyntheticEvent) => {\n                    action(\"clicked\")(e);\n                }}\n                kind=\"secondary\">Search</ActivityButton>\n            <ActivityButton\n                onClick={(e: React.SyntheticEvent) => {\n                    action(\"clicked\")(e);\n                }}\n                kind=\"tertiary\">Search</ActivityButton>\n            <ActivityButton\n                kind=\"primary\"\n                onClick={(e: React.SyntheticEvent) => {\n                    action(\"clicked\")(e);\n                }}\n                disabled={true}>Search</ActivityButton>\n        </View>\n    );\n};","description":"In this example, we have `primary (default)`, `secondary`, `tertiary` and `disabled` `ActivityButton`'s from left to right."},{"id":"packages-button-activitybutton--action-type","name":"ActionType","snippet":"const ActionType = (args) => (\n    <View style={{gap: sizing.size_160}}>\n        {actionTypes.map((actionType, index) => (\n            <View\n                key={index}\n                style={{gap: sizing.size_160, flexDirection: \"row\"}}\n            >\n                {kinds.map((kind, index) => (\n                    <ActivityButton\n                        {...args}\n                        onClick={() => {}}\n                        actionType={actionType}\n                        kind={kind}\n                        key={`${kind}-${actionType}-${index}`}\n                    />\n                ))}\n                <ActivityButton\n                    {...args}\n                    disabled={true}\n                    onClick={(e) => action(\"clicked\")(e)}\n                    actionType={actionType}\n                    key={`disabled-${actionType}-${index}`}\n                />\n            </View>\n        ))}\n    </View>\n);","description":"ActivityButton has an `actionType` prop that is either `progressive` (the default) or `neutral`:"},{"id":"packages-button-activitybutton--with-custom-styles","name":"With Custom Styles","snippet":"const WithCustomStyles = () => <ActivityButton\n    kind=\"primary\"\n    onClick={(e: React.SyntheticEvent) => {\n        action(\"clicked\")(e);\n    }}\n    startIcon={magnifyingGlass}\n    endIcon={caretRight}\n    styles={{\n        root: {\n            gap: sizing.size_200,\n        },\n        box: {\n            gap: sizing.size_320,\n        },\n        startIcon: {\n            alignSelf: \"flex-start\",\n        },\n        endIcon: {\n            alignSelf: \"flex-end\",\n        },\n        label: {\n            border: `${border.width.thin} solid ${semanticColor.core.border.instructive.subtle}`,\n            padding: sizing.size_120,\n        },\n    }}>Search</ActivityButton>;","description":"Sometimes you may want to apply custom styles to the button. In this example, we apply this by passing a `style` prop to the button. Note that we recommend using the default styles, but if you need to customize the button, we encourage to use it for layout purposes only. The following parts can be styled: - `root`: Styles the root element (button) - `box`: Styles the \"chonky\" box element - `startIcon`: Styles the start icon element - `endIcon`: Styles the end icon element - `label`: Styles the text in the button"},{"id":"packages-button-activitybutton--receiving-focus-programmatically","name":"Receiving Focus Programmatically","snippet":"const ReceivingFocusProgrammatically = () => {\n    // This story is used to test the focus ring when the button receives\n    // focus programmatically. The button is focused when the story is\n    // rendered.\n    const buttonRef = React.useRef<HTMLButtonElement | null>(null);\n\n    return (\n        <View style={{gap: sizing.size_160, flexDirection: \"row\"}}>\n            <ActivityButton\n                kind=\"primary\"\n                startIcon={magnifyingGlass}\n                endIcon={caretRight}\n                ref={buttonRef}\n                onClick={(e) => action(\"clicked\")(e)}>Search</ActivityButton>\n            <Button\n                onClick={() => {\n                    // Focus the button when the button is clicked.\n                    if (buttonRef.current) {\n                        buttonRef.current.focus();\n                    }\n                }}\n                kind=\"secondary\">Focus on the Activity Button (left)\n                                </Button>\n        </View>\n    );\n};","description":"This button can receive focus programmatically. This is useful for cases where you want to focus the button when the user interacts with another component, such as a form field or another button. To do this, we use a `ref` to the button and call the `focus()` method on it, so the `ActivityButton` receives focus."},{"id":"packages-button-activitybutton--press-duration-tracking","name":"Press Duration Tracking","snippet":"const PressDurationTracking = () => {\n    const [pressStartTime, setPressStartTime] = React.useState<\n        number | null\n    >(null);\n    const [pressDuration, setPressDuration] = React.useState<number | null>(\n        null,\n    );\n    const [lastEvent, setLastEvent] = React.useState<string>(\"none\");\n    const [interactionHistory, setInteractionHistory] = React.useState<\n        string[]\n    >([]);\n\n    const logEvent = (eventName: string, duration?: number) => {\n        const timestamp = new Date().toLocaleTimeString();\n        const message =\n            duration !== undefined\n                ? `${timestamp}: ${eventName} (${duration}ms)`\n                : `${timestamp}: ${eventName}`;\n\n        setInteractionHistory((prev) => [message, ...prev.slice(0, 4)]); // Keep last 5 events\n        setLastEvent(eventName);\n    };\n\n    const baseActions = {\n        onMouseDown: action(\"onMouseDown\"),\n        onMouseUp: action(\"onMouseUp\"),\n        onMouseLeave: action(\"onMouseLeave\"),\n        onClick: action(\"onClick\"),\n        onMouseEnter: action(\"onMouseEnter\"),\n    };\n\n    const handleMouseDown = (e: React.MouseEvent) => {\n        const startTime = Date.now();\n        setPressStartTime(startTime);\n        setPressDuration(null);\n        logEvent(\"Mouse Down - Press Started\");\n        baseActions.onMouseDown?.(e);\n    };\n\n    const handleMouseUp = (e: React.MouseEvent) => {\n        if (pressStartTime) {\n            const duration = Date.now() - pressStartTime;\n            setPressDuration(duration);\n            logEvent(\"Mouse Up - Press Completed\", duration);\n        }\n        baseActions.onMouseUp?.(e);\n    };\n\n    const handleMouseEnter = (e: React.MouseEvent) => {\n        logEvent(\"Mouse Enter\");\n        baseActions.onMouseEnter?.(e);\n    };\n\n    const handleMouseLeave = (e: React.MouseEvent) => {\n        if (pressStartTime) {\n            const duration = Date.now() - pressStartTime;\n            setPressDuration(duration);\n            logEvent(\"Mouse Leave - Press Abandoned\", duration);\n        }\n        setPressStartTime(null);\n        baseActions.onMouseLeave?.(e);\n    };\n\n    const handleClick = (e: React.SyntheticEvent) => {\n        logEvent(\"Click - Action Executed\");\n        baseActions.onClick?.(e);\n    };\n\n    const resetTracking = () => {\n        setPressStartTime(null);\n        setPressDuration(null);\n        setLastEvent(\"none\");\n        setInteractionHistory([]);\n    };\n\n    const isCurrentlyPressed =\n        pressStartTime !== null &&\n        lastEvent === \"Mouse Down - Press Started\";\n\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <View\n                style={{\n                    gap: sizing.size_160,\n                    flexDirection: \"row\",\n                    alignItems: \"center\",\n                }}>\n                <ActivityButton\n                    kind=\"primary\"\n                    startIcon={clock}\n                    onMouseEnter={handleMouseEnter}\n                    onMouseDown={handleMouseDown}\n                    onMouseUp={handleMouseUp}\n                    onMouseLeave={handleMouseLeave}\n                    onClick={handleClick}>\n                    {isCurrentlyPressed\n                        ? \"Pressed!\"\n                        : \"Track Press Duration\"}\n                </ActivityButton>\n                <Button kind=\"secondary\" size=\"small\" onClick={resetTracking}>Reset\n                                        </Button>\n            </View>\n            <View\n                style={{\n                    gap: sizing.size_120,\n                    padding: sizing.size_160,\n                    backgroundColor:\n                        semanticColor.core.background.neutral.subtle,\n                    borderRadius: sizing.size_080,\n                    minBlockSize: \"120px\",\n                }}>\n                <BodyText size=\"medium\" weight=\"semi\">Press Tracking Information\n                                        </BodyText>\n                <View style={{gap: sizing.size_060}}>\n                    <BodyText>\n                        <strong>Current State:</strong>{\" \"}\n                        {isCurrentlyPressed\n                            ? `Pressed (${pressStartTime ? Math.round((Date.now() - pressStartTime) / 10) * 10 : 0}ms+)`\n                            : \"Released\"}\n                    </BodyText>\n                    {pressDuration !== null && (\n                        <BodyText>\n                            <strong>Last Press Duration:</strong>{\" \"}\n                            {pressDuration}ms\n                        </BodyText>\n                    )}\n                    <BodyText>\n                        <strong>Last Event:</strong> {lastEvent}\n                    </BodyText>\n                </View>\n                {interactionHistory.length > 0 && (\n                    <View style={{gap: sizing.size_040}}>\n                        <BodyText weight=\"semi\">Recent Events:</BodyText>\n                        {interactionHistory.map((event, index) => (\n                            <BodyText\n                                key={index}\n                                size=\"small\"\n                                style={{\n                                    opacity: 1 - index * 0.15,\n                                    fontFamily: \"monospace\",\n                                }}\n                            >\n                                {event}\n                            </BodyText>\n                        ))}\n                    </View>\n                )}\n            </View>\n        </View>\n    );\n};","description":"This story demonstrates how to use the mouse event handlers (`onMouseDown`, `onMouseUp`, and `onMouseLeave`) to track the duration of button presses. This is useful for analytics, accessibility features, or UI feedback that depends on how long a user interacts with a button. **Use cases:** - Measuring engagement time before click completion - Detecting accidental clicks vs intentional presses - Providing haptic feedback based on press duration - Analytics tracking for user interaction patterns **Try it:** Press and hold the button for different lengths of time, or press and drag away from the button to see how the events are tracked."}],"import":"import Button, { ActivityButton, ComponentInfo } from \"@khanacademy/wonder-blocks-button\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { Icon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`ActivityButton` is a button that is used for actions in the context of learner activities. It uses a \"chonky\" design, which is a more playful and engaging design that is suitable for learner activities. ```tsx import magnifyingGlassIcon from \"@phosphor-icons/core/regular/magnifying-glass.svg\"; import {ActivityButton} from \"@khanacademy/wonder-blocks-button\"; <ActivityButton startIcon={magnifyingGlassIcon} onClick={(e) => console.log(\"Hello, world!\")} > Hello, world! </ActivityButton> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-button/src/index.ts","description":"`ActivityButton` is a button that is used for actions in the context of\nlearner activities. It uses a \"chonky\" design, which is a more playful and\nengaging design that is suitable for learner activities.\n\n```tsx\nimport magnifyingGlassIcon from\n\"@phosphor-icons/core/regular/magnifying-glass.svg\";\nimport {ActivityButton} from \"@khanacademy/wonder-blocks-button\";\n\n<ActivityButton\n    startIcon={magnifyingGlassIcon}\n    onClick={(e) => console.log(\"Hello, world!\")}\n>\n Hello, world!\n</ActivityButton>\n```","displayName":"ActivityButton","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"children":{"defaultValue":null,"description":"Text to appear on the button.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"startIcon":{"defaultValue":null,"description":"A Phosphor icon asset (imported as a static SVG file) that\nwill appear at the start of the button (left for LTR, right for RTL).\n\nFor non-Phosphor icons, pass in a WB Icon component that wraps\nthe custom icon.","name":"startIcon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | PhosphorIconAsset"}},"endIcon":{"defaultValue":null,"description":"A Phosphor icon asset (imported as a static SVG file) that\nwill appear at the end of the button (right for LTR, left for RTL).\n\nFor non-Phosphor icons, pass in a WB Icon component that wraps\nthe custom icon.","name":"endIcon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | PhosphorIconAsset"}},"kind":{"defaultValue":null,"description":"The kind of the button, either primary, secondary, or tertiary.\n\nIn default state:\n\n- Primary buttons have background colors\n- Secondary buttons have a border and no background color\n- Tertiary buttons have no background or border","name":"kind","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"ButtonKind","value":[{"value":"\"primary\""},{"value":"\"secondary\""},{"value":"\"tertiary\""}]}},"disabled":{"defaultValue":null,"description":"Whether the button is disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"id":{"defaultValue":null,"description":"An optional id attribute.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"rel":{"defaultValue":null,"description":"Specifies the type of relationship between the current document and the\nlinked document. Should only be used when `href` is specified. This\ndefaults to \"noopener noreferrer\" when `target=\"_blank\"`, but can be\noverridden by setting this prop to something else.","name":"rel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"A target destination window for a link to open in. Should only be used\nwhen `href` is specified.\n\nTODO(WB-1262): only allow this prop when `href` is also set.t","name":"target","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"_blank\"","value":[{"value":"\"_blank\""}]}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"skipClientNav":{"defaultValue":null,"description":"Whether to avoid using client-side navigation.\n\nIf the URL passed to href is local to the client-side, e.g.\n/math/algebra/eval-exprs, then it tries to use react-router-dom's Link\ncomponent which handles the client-side navigation. You can set\n`skipClientNav` to true avoid using client-side nav entirely.\n\nNOTE: All URLs containing a protocol are considered external, e.g.\nhttps://khanacademy.org/math/algebra/eval-exprs will trigger a full\npage reload.","name":"skipClientNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"href":{"defaultValue":null,"description":"URL to navigate to.","name":"href","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"type":{"defaultValue":null,"description":"Used for buttons within forms.","name":"type","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"submit\"","value":[{"value":"\"submit\""}]}},"className":{"defaultValue":null,"description":"Adds CSS classes to the Button.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onClick":{"defaultValue":null,"description":"Function to call when button is clicked.\n\nThis callback should be used for running synchronous code, like\ndispatching a Redux action. For asynchronous code see the\nbeforeNav and safeWithNav props. It should NOT be used to redirect\nto a different URL.\n\nNote: onClick is optional if href is present, but must be defined if\nhref is not","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: SyntheticEvent<Element, Event>) => unknown)"}},"onMouseDown":{"defaultValue":null,"description":"Respond to a raw \"mousedown\" event.","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseUp":{"defaultValue":null,"description":"Respond to a raw \"mouseup\" event.","name":"onMouseUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseEnter":{"defaultValue":null,"description":"Respond to a raw \"mouseenter\" event.","name":"onMouseEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseLeave":{"defaultValue":null,"description":"Respond to a raw \"mouseleave\" event.","name":"onMouseLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onBlur":{"defaultValue":null,"description":"Respond to a raw \"blur\" event.","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"onFocus":{"defaultValue":null,"description":"Respond to a raw \"focus\" event.","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"beforeNav":{"defaultValue":null,"description":"Run async code before navigating. If the promise returned rejects then\nnavigation will not occur.\n\nIf both safeWithNav and beforeNav are provided, beforeNav will be run\nfirst and safeWithNav will only be run if beforeNav does not reject.\n\nWARNING: Do not use with `type=\"submit\"`.","name":"beforeNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => Promise<unknown>)"}},"safeWithNav":{"defaultValue":null,"description":"Run async code in the background while client-side navigating. If the\nbrowser does a full page load navigation, the callback promise must be\nsettled before the navigation will occur. Errors are ignored so that\nnavigation is guaranteed to succeed.\n\nWARNING: Do not use with `type=\"submit\"`.","name":"safeWithNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => Promise<unknown>)"}},"actionType":{"defaultValue":null,"description":"The action type of the button. This determines the visual style of the\nbutton.\n\n- `progressive` is used for actions that move the user forward in a flow.\n- `neutral` is used for buttons that indicate a neutral action.","name":"actionType","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"ActivityButtonActionType","value":[{"value":"\"progressive\""},{"value":"\"neutral\""}]}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the ActivityButton component.\n- `root`: Styles the root element (button)\n- `box`: Styles the \"chonky\" box element\n- `startIcon`: Styles the start icon element\n- `endIcon`: Styles the end icon element\n- `label`: Styles the text in the button","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-button/src/util/button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; box?: StyleType; startIcon?: StyleType; endIcon?: StyleType; label?: StyleType; }"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<ButtonRef>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"ActivityButton"}},"packages-button-guides-best-practices":{"id":"packages-button-guides-best-practices","name":"Button","path":"./__docs__/wonder-blocks-button/best-practices.stories.tsx","stories":[{"id":"packages-button-guides-best-practices--full-bleed-button","name":"Full-bleed button","snippet":"const FullBleedButton = () => (\n    <View>\n        <Button>Label</Button>\n    </View>\n);"},{"id":"packages-button-guides-best-practices--buttons-in-rows","name":"Buttons in rows","snippet":"const ButtonsInRows = () => (\n    <View>\n        <View style={styles.row}>\n            <Button>Button in a row</Button>\n        </View>\n        <View style={styles.gap} />\n        <View style={styles.column}>\n            <Button>Button in a column</Button>\n        </View>\n    </View>\n);"},{"id":"packages-button-guides-best-practices--using-min-width","name":"Using minWidth","snippet":"const UsingMinWidth = () => (\n    <View style={styles.row}>\n        <Button style={styles.buttonMinWidth} kind=\"secondary\">\n            label\n        </Button>\n        <Button style={styles.buttonMinWidth}>\n            label in a different language\n        </Button>\n    </View>\n);"},{"id":"packages-button-guides-best-practices--truncating-text","name":"Truncating text","snippet":"const TruncatingText = () => (\n    <View\n        style={{\n            flexDirection: \"row\",\n            width: 300,\n        }}\n    >\n        <Button style={styles.buttonMinWidth} kind=\"secondary\">\n            label\n        </Button>\n        <Button style={styles.buttonMinWidth}>\n            label too long for the parent container\n        </Button>\n    </View>\n);"}],"import":"import Button from \"@khanacademy/wonder-blocks-button\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Button\" component.\n  24 | });\n  25 |\n> 26 | export default {\n     | ^\n  27 |     title: \"Packages / Button / Guides / Best practices\",\n  28 |     component: Button,\n  29 |\n\n./__docs__/wonder-blocks-button/best-practices.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\n\nconst styles = StyleSheet.create({\n    column: {\n        alignItems: \"flex-start\",\n    },\n    row: {\n        flexDirection: \"row\",\n    },\n    gap: {\n        height: 16,\n    },\n    button: {\n        marginInlineEnd: 10,\n    },\n    buttonMinWidth: {\n        marginInlineEnd: 10,\n        minInlineSize: 144,\n    },\n});\n\nexport default {\n    title: \"Packages / Button / Guides / Best practices\",\n    component: Button,\n\n    // Disables chromatic testing for these stories.\n    parameters: {\n        previewTabs: {\n            canvas: {\n                hidden: true,\n            },\n        },\n\n        viewMode: \"docs\",\n\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const FullBleedButton = {\n    render: () => (\n        <View>\n            <Button>Label</Button>\n        </View>\n    ),\n\n    name: \"Full-bleed button\",\n};\n\nexport const ButtonsInRows = {\n    render: () => (\n        <View>\n            <View style={styles.row}>\n                <Button>Button in a row</Button>\n            </View>\n            <View style={styles.gap} />\n            <View style={styles.column}>\n                <Button>Button in a column</Button>\n            </View>\n        </View>\n    ),\n\n    name: \"Buttons in rows\",\n};\n\nexport const UsingMinWidth = {\n    render: () => (\n        <View style={styles.row}>\n            <Button style={styles.buttonMinWidth} kind=\"secondary\">\n                label\n            </Button>\n            <Button style={styles.buttonMinWidth}>\n                label in a different language\n            </Button>\n        </View>\n    ),\n\n    name: \"Using minWidth\",\n};\n\nexport const TruncatingText = {\n    render: () => (\n        <View\n            style={{\n                flexDirection: \"row\",\n                width: 300,\n            }}\n        >\n            <Button style={styles.buttonMinWidth} kind=\"secondary\">\n                label\n            </Button>\n            <Button style={styles.buttonMinWidth}>\n                label too long for the parent container\n            </Button>\n        </View>\n    ),\n\n    name: \"Truncating text\",\n};\n"},"docs":{"packages-button-guides-best-practices--docs":{"id":"packages-button-guides-best-practices--docs","name":"Docs","path":"./__docs__/wonder-blocks-button/best-practices.mdx","title":"Packages / Button / Guides / Best practices","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport {StyleSheet} from \"aphrodite\";\nimport * as BestPracticesStories from './best-practices.stories';\n\n<Meta of={BestPracticesStories} />\n\n## Best Practices\n\n### Layout\n\nIn vertical layouts, buttons will stretch horizontally to fill the available\nspace. This is probably not what you want unless you're on a very narrow\nscreen.\n\n<Canvas of={BestPracticesStories.FullBleedButton} />\n\nThis can be corrected by applying appropriate flex styles to the container.\n\n<Canvas of={BestPracticesStories.ButtonsInRows} />\n\n### Usign minWidth for internationalization\n\nLayouts often specify a specific width of button. When implementing such designs\nuse `minWidth` instead of `width`. `minWidth` allows the button to resize to fit\nthe content whereas `width` does not. This is important for international sites\nsince sometimes strings for UI elements can be much longer in other languages.\nBoth of the buttons below have a \"natural\" width of `144px`. The one on the\nright is wider but it accommodates the full string instead of wrapping it.\n\n<Canvas of={BestPracticesStories.UsingMinWidth} />\n\n### Truncating text\n\nIf the parent container of the button doesn't have enough room to accommodate\nthe width of the button, the text will truncate. This should ideally never\nhappen, but it's sometimes a necessary fallback.\n\n<Canvas of={BestPracticesStories.TruncatingText} />\n"}}},"packages-button-button":{"id":"packages-button-button","name":"Button","path":"./__docs__/wonder-blocks-button/button.stories.tsx","stories":[{"id":"packages-button-button--default","name":"Default","snippet":"const Default = () => <Button\n    kind=\"primary\"\n    actionType=\"progressive\"\n    size=\"medium\"\n    disabled={false}\n    style={{maxWidth: 200}}\n    labelStyle={{}}\n    onClick={() => {\n        // eslint-disable-next-line no-alert\n        alert(\"Click!\");\n    }}>Hello, world!</Button>;"},{"id":"packages-button-button--kinds","name":"Kinds","snippet":"const Kinds = () => (\n    <View style={{padding: sizing.size_160, gap: sizing.size_160}}>\n        <View style={styles.rowWithGap}>\n            <Button onClick={() => {}}>Hello, world!</Button>\n            <Button onClick={() => {}} kind=\"secondary\">\n                Hello, world!\n            </Button>\n            <Button onClick={() => {}} kind=\"tertiary\">\n                Hello, world!\n            </Button>\n        </View>\n        <View style={styles.rowWithGap}>\n            <Button onClick={() => {}} disabled={true}>\n                Hello, world!\n            </Button>\n            <Button onClick={() => {}} disabled={true} kind=\"secondary\">\n                Hello, world!\n            </Button>\n            <Button onClick={() => {}} disabled={true} kind=\"tertiary\">\n                Hello, world!\n            </Button>\n        </View>\n        <View style={styles.rowWithGap}>\n            <Button onClick={() => {}} actionType=\"destructive\">\n                Hello, world!\n            </Button>\n            <Button\n                onClick={() => {}}\n                kind=\"secondary\"\n                actionType=\"destructive\"\n            >\n                Hello, world!\n            </Button>\n            <Button\n                onClick={() => {}}\n                kind=\"tertiary\"\n                actionType=\"destructive\"\n            >\n                Hello, world!\n            </Button>\n        </View>\n        <View style={styles.rowWithGap}>\n            <Button onClick={() => {}} actionType=\"neutral\">\n                Hello, world!\n            </Button>\n            <Button\n                onClick={() => {}}\n                kind=\"secondary\"\n                actionType=\"neutral\"\n            >\n                Hello, world!\n            </Button>\n            <Button onClick={() => {}} kind=\"tertiary\" actionType=\"neutral\">\n                Hello, world!\n            </Button>\n        </View>\n    </View>\n);","description":"There are three kinds of buttons: `primary` (default), `secondary`, and `tertiary`."},{"id":"packages-button-button--action-type","name":"ActionType","snippet":"const ActionType = () => (\n    <View style={{gap: sizing.size_160}}>\n        <View style={styles.row}>\n            <Button\n                style={styles.button}\n                onClick={() => {}}\n                actionType=\"destructive\"\n            >\n                Primary\n            </Button>\n            <Button\n                style={styles.button}\n                onClick={() => {}}\n                kind=\"secondary\"\n                actionType=\"destructive\"\n            >\n                Secondary\n            </Button>\n            <Button\n                style={styles.button}\n                onClick={() => {}}\n                kind=\"tertiary\"\n                actionType=\"destructive\"\n            >\n                Tertiary\n            </Button>\n        </View>\n        <View style={styles.row}>\n            <Button\n                style={styles.button}\n                onClick={() => {}}\n                actionType=\"neutral\"\n            >\n                Primary\n            </Button>\n            <Button\n                style={styles.button}\n                onClick={() => {}}\n                kind=\"secondary\"\n                actionType=\"neutral\"\n            >\n                Secondary\n            </Button>\n            <Button\n                style={styles.button}\n                onClick={() => {}}\n                kind=\"tertiary\"\n                actionType=\"neutral\"\n            >\n                Tertiary\n            </Button>\n        </View>\n    </View>\n);","description":"Buttons have an `actionType` prop that is either `progressive` (the default, as shown above), `destructive` or `neutral` (as can seen below):"},{"id":"packages-button-button--with-icon","name":"Icon","snippet":"const WithIcon = () => <IconExample />;","description":"Buttons can have a start icon or an end icon. The `startIcon` prop results in the icon appearing before the label (left for LTR, right for RTL) and the `endIcon` prop results in the icon appearing after the label (right for LTR, left for RTL). __NOTE:__ Icons are available from the [Phosphor Icons](https://phosphoricons.com/) library. To use a Phosphor icon, you can use the following syntax: ```tsx import pencilSimple from \"@phosphor-icons/core/regular/pencil-simple.svg\"; export const ButtonExample = () => ( <Button startIcon={pencilSimple}> Example button </Button> ); ``` For custom icons, you can use the Wonder Blocks Icon component: ```tsx import {Icon} from \"@khanacademy/wonder-blocks-icon\"; export const ButtonExample = () => ( <Button startIcon={<Icon><img src=\"example.svg\" alt=\"Example icon\" /></Icon>}> Example button </Button> ); ``` Note: The Button component will handle the sizing for the icons"},{"id":"packages-button-button--icons-with-accessible-names","name":"Icons With Accessible Names","snippet":"const IconsWithAccessibleNames = () => {\n    return (\n        <View style={styles.row}>\n            <Button\n                style={styles.button}\n                startIcon={\n                    <PhosphorIcon\n                        icon={IconMappings.cookie}\n                        aria-label=\"Cookie\"\n                    />\n                }\n                endIcon={\n                    <PhosphorIcon\n                        icon={IconMappings.iceCream}\n                        aria-label=\"Ice Cream\"\n                    />\n                }\n            >\n                With PhosphorIcon aria-label\n            </Button>\n            <Button\n                style={styles.button}\n                startIcon={\n                    <Icon>\n                        <img\n                            src={\"logo.svg\"}\n                            alt=\"Wonder Blocks start icon\"\n                        />\n                    </Icon>\n                }\n                endIcon={\n                    <Icon>\n                        <img\n                            src={\"logo.svg\"}\n                            alt=\"Wonder Blocks end icon\"\n                        />\n                    </Icon>\n                }\n            >\n                With Icon and img alt\n            </Button>\n        </View>\n    );\n};","description":"If the `startIcon` or `endIcon` provide meaning, you can provide an accessible name for the icons so that it is included in the accessible name of the button. For example, when using a `PhosphorIcon`, you can use the `aria-label` prop to provide an accessible name. When using a `Icon` component, you can provide the accessible name to the `children` element (ie the `alt` attribute on the `img` element)."},{"id":"packages-button-button--size","name":"Size","snippet":"const Size = () => (\n    <View>\n        <View style={styles.row}>\n            <BodyText style={styles.fillSpace}>small</BodyText>\n            <View style={[styles.row, styles.example]}>\n                <Button style={styles.button} onClick={() => {}} size=\"small\">\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    size=\"small\"\n                >\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    size=\"small\"\n                >\n                    Label\n                </Button>\n            </View>\n        </View>\n        <View style={styles.row}>\n            <BodyText style={styles.fillSpace}>medium (default)</BodyText>\n\n            <View style={[styles.row, styles.example]}>\n                <Button style={styles.button} onClick={() => {}} size=\"medium\">\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    size=\"medium\"\n                >\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    size=\"medium\"\n                >\n                    Label\n                </Button>\n            </View>\n        </View>\n        <View style={styles.row}>\n            <BodyText style={styles.fillSpace}>large</BodyText>\n            <View style={[styles.row, styles.example]}>\n                <Button style={styles.button} onClick={() => {}} size=\"large\">\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    size=\"large\"\n                >\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    size=\"large\"\n                >\n                    Label\n                </Button>\n            </View>\n        </View>\n    </View>\n);"},{"id":"packages-button-button--spinner","name":"Spinner","snippet":"const Spinner = () => (\n    <View style={{flexDirection: \"row\"}}>\n        <Button\n            onClick={() => {}}\n            spinner={true}\n            size=\"large\"\n            aria-label={\"waiting\"}\n        >\n            Hello, world\n        </Button>\n        <Strut size={16} />\n        <Button onClick={() => {}} spinner={true} aria-label={\"waiting\"}>\n            Hello, world\n        </Button>\n        <Strut size={16} />\n        <Button\n            onClick={() => {}}\n            spinner={true}\n            size=\"small\"\n            aria-label={\"waiting\"}\n        >\n            Hello, world\n        </Button>\n    </View>\n);"},{"id":"packages-button-button--truncating-labels","name":"Truncating labels","snippet":"const TruncatingLabels = () => (\n    <View style={{flexDirection: \"row\", flexWrap: \"wrap\"}}>\n        <Button onClick={() => {}} style={styles.truncatedButton}>\n            label too long for the parent container\n        </Button>\n        <Strut size={16} />\n        <Button\n            onClick={() => {}}\n            style={styles.truncatedButton}\n            startIcon={plus}\n        >\n            label too long for the parent container\n        </Button>\n        <Strut size={16} />\n        <Button\n            size=\"small\"\n            onClick={() => {}}\n            style={styles.truncatedButton}\n        >\n            label too long for the parent container\n        </Button>\n        <Strut size={16} />\n        <Button\n            size=\"small\"\n            onClick={() => {}}\n            style={styles.truncatedButton}\n            startIcon={plus}\n        >\n            label too long for the parent container\n        </Button>\n    </View>\n);"},{"id":"packages-button-button--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => <View style={{gap: sizing.size_160}}>\n    <View style={{flexDirection: \"row\", gap: sizing.size_160}}>\n        <Button\n            disabled={false}\n            onClick={() => {}}\n            style={{\n                maxWidth: 200,\n                minHeight: 32,\n                height: \"auto\",\n            }}\n            labelStyle={{\n                textOverflow: \"initial\",\n                whiteSpace: \"normal\",\n            }}\n            kind=\"primary\">{`This button does not truncate its label and can appear in multiple lines`}</Button>\n        <Button\n            disabled={false}\n            onClick={() => {}}\n            style={{\n                maxWidth: 200,\n                minHeight: 32,\n                height: \"auto\",\n            }}\n            labelStyle={{\n                textOverflow: \"initial\",\n                whiteSpace: \"normal\",\n            }}\n            kind=\"secondary\">{`This button does not truncate its label and can appear in multiple lines`}</Button>\n        <Button\n            disabled={false}\n            onClick={() => {}}\n            style={{\n                maxWidth: 200,\n                minHeight: 32,\n                height: \"auto\",\n            }}\n            labelStyle={{\n                textOverflow: \"initial\",\n                whiteSpace: \"normal\",\n            }}\n            kind=\"tertiary\">{`This button does not truncate its label and can appear in multiple lines`}</Button>\n    </View>\n</View>;","description":"Buttons can be styled with custom styles. This story shows a button with a custom width and height (using the `style` prop), and also a custom label style that prevents the label from being truncated (`labelStyle`). __NOTE:__ Please use this feature sparingly. This could be useful for simple cases like the one shown below, but it could cause some issues if used in more complex cases."},{"id":"packages-button-button--custom-icon-size","name":"Custom Icon Size","snippet":"const CustomIconSize = () => <Button\n    startIcon={plus}\n    kind=\"secondary\"\n    styles={{\n        startIcon: {width: sizing.size_240, height: sizing.size_240},\n    }}\n    onClick={action(\"clicked\")}>Custom icon size</Button>;","description":"The `styles` prop allows overriding styles for specific sub-elements within the Button. In this example, the start icon is rendered at 24x24 instead of the default theme size. **Note:** Use this prop sparingly and only when the default theme styling does not meet your needs (e.g. a custom trigger button that requires a non-standard icon size)."},{"id":"packages-button-button--submitting-forms","name":"Submitting forms","snippet":"const SubmittingForms = () => (\n    <form\n        onSubmit={(e) => {\n            e.preventDefault();\n            window.alert(\"form submitted\"); // eslint-disable-line no-alert\n        }}\n    >\n        <View>\n            <LabeledField\n                label=\"Foo\"\n                field={\n                    <TextField id=\"foo\" value=\"bar\" onChange={() => {}} />\n                }\n            />\n            <Button type=\"submit\">Submit</Button>\n        </View>\n    </form>\n);"},{"id":"packages-button-button--prevent-navigation","name":"Preventing navigation","snippet":"const PreventNavigation = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View style={styles.row}>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    onClick={(e) => {\n                        e.preventDefault();\n                    }}\n                >\n                    This button prevents navigation.\n                </Button>\n                <Routes>\n                    <Route\n                        path=\"/foo\"\n                        element={<View id=\"foo\">Hello, world!</View>}\n                    />\n                </Routes>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);"},{"id":"packages-button-button--with-router","name":"Navigation with React Router","snippet":"const WithRouter = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View style={styles.row}>\n                <Button href=\"/foo\" style={styles.button}>\n                    Uses Client-side Nav\n                </Button>\n                <Button href=\"/foo\" style={styles.button} skipClientNav>\n                    Avoids Client-side Nav\n                </Button>\n                <Routes>\n                    <Route\n                        path=\"/foo\"\n                        element={<View id=\"foo\">Hello, world!</View>}\n                    />\n                </Routes>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);"},{"id":"packages-button-button--receiving-focus-programmatically","name":"Receiving Focus Programmatically","snippet":"const ReceivingFocusProgrammatically = () => {\n    // This story is used to test the focus ring when the button receives\n    // focus programmatically. The button is focused when the story is\n    // rendered.\n    const buttonRef = React.useRef<HTMLButtonElement | null>(null);\n\n    return (\n        <View style={{gap: sizing.size_160, flexDirection: \"row\"}}>\n            <Button\n                startIcon={magnifyingGlass}\n                endIcon={caretRight}\n                ref={buttonRef}\n                onClick={(e) => action(\"clicked\")(e)}>Search</Button>\n            <Button\n                onClick={() => {\n                    // Focus the button when the button is clicked.\n                    if (buttonRef.current) {\n                        buttonRef.current.focus();\n                    }\n                }}\n                kind=\"secondary\">Focus on the Button (left)\n                                </Button>\n        </View>\n    );\n};","description":"This button can receive focus programmatically. This is useful for cases where you want to focus the button when the user interacts with another component, such as a form field or another button. To do this, we use a `ref` to the button and call the `focus()` method on it, so the `ActivityButton` receives focus."},{"id":"packages-button-button--press-duration-tracking","name":"Press Duration Tracking","snippet":"const PressDurationTracking = () => {\n    const [pressStartTime, setPressStartTime] = React.useState<\n        number | null\n    >(null);\n    const [pressDuration, setPressDuration] = React.useState<number | null>(\n        null,\n    );\n    const [lastEvent, setLastEvent] = React.useState<string>(\"none\");\n    const [interactionHistory, setInteractionHistory] = React.useState<\n        string[]\n    >([]);\n\n    const logEvent = (eventName: string, duration?: number) => {\n        const timestamp = new Date().toLocaleTimeString();\n        const logEntry = duration\n            ? `${eventName} (${duration}ms) - ${timestamp}`\n            : `${eventName} - ${timestamp}`;\n        setInteractionHistory((prev) => [...prev.slice(-4), logEntry]);\n        setLastEvent(eventName);\n    };\n\n    // Create base actions for Storybook logging\n    const baseActions = {\n        onMouseDown: action(\"onMouseDown\"),\n        onMouseUp: action(\"onMouseUp\"),\n        onMouseLeave: action(\"onMouseLeave\"),\n        onClick: action(\"onClick\"),\n        onMouseEnter: action(\"onMouseEnter\"),\n    };\n\n    const handleMouseDown = (e: React.MouseEvent) => {\n        const startTime = Date.now();\n        setPressStartTime(startTime);\n        setPressDuration(null);\n        logEvent(\"onMouseDown\");\n        baseActions.onMouseDown(e);\n    };\n\n    const handleMouseUp = (e: React.MouseEvent) => {\n        if (pressStartTime) {\n            const duration = Date.now() - pressStartTime;\n            setPressDuration(duration);\n            logEvent(\"onMouseUp\", duration);\n        } else {\n            logEvent(\"onMouseUp\");\n        }\n        setPressStartTime(null);\n        baseActions.onMouseUp(e);\n    };\n\n    const handleMouseLeave = (e: React.MouseEvent) => {\n        if (pressStartTime) {\n            const duration = Date.now() - pressStartTime;\n            setPressDuration(duration);\n            logEvent(\"onMouseLeave\", duration);\n            setPressStartTime(null);\n        } else {\n            logEvent(\"onMouseLeave\");\n        }\n        baseActions.onMouseLeave(e);\n    };\n\n    const handleMouseEnter = (e: React.MouseEvent) => {\n        logEvent(\"onMouseEnter\");\n        baseActions.onMouseEnter(e);\n    };\n\n    const handleClick = (e: React.SyntheticEvent) => {\n        logEvent(\"onClick\");\n        baseActions.onClick(e);\n    };\n\n    return (\n        <View>\n            <Button\n                kind=\"primary\"\n                style={{maxWidth: 240}}\n                startIcon={clock}\n                onMouseEnter={handleMouseEnter}\n                onMouseDown={handleMouseDown}\n                onMouseUp={handleMouseUp}\n                onMouseLeave={handleMouseLeave}\n                onClick={handleClick}>Track Press Duration\n                                </Button>\n            <Strut size={16} />\n            <View\n                style={{\n                    padding: sizing.size_160,\n                    backgroundColor:\n                        semanticColor.core.background.base.subtle,\n                    borderRadius: 4,\n                    maxInlineSize: 400,\n                }}>\n                <BodyText size=\"medium\" weight=\"bold\">Press Duration Tracker\n                                        </BodyText>\n                <Strut size={8} />\n                <BodyText size=\"medium\">Last Event: <strong>{lastEvent}</strong>\n                </BodyText>\n                <BodyText size=\"medium\">Press Duration:{\" \"}\n                    <strong>\n                        {pressDuration !== null\n                            ? `${pressDuration}ms`\n                            : \"N/A\"}\n                    </strong>\n                </BodyText>\n                <BodyText size=\"medium\">Currently Pressing:{\" \"}\n                    <strong>{pressStartTime ? \"Yes\" : \"No\"}</strong>\n                </BodyText>\n                <Strut size={12} />\n                <BodyText size=\"medium\" weight=\"bold\">Interaction History:\n                                        </BodyText>\n                {interactionHistory.length > 0 ? (\n                    <View style={{marginBlockStart: sizing.size_080}}>\n                        {interactionHistory.map((entry, index) => (\n                            <BodyText\n                                key={index}\n                                size=\"small\"\n                                style={{fontFamily: \"monospace\"}}\n                            >\n                                {entry}\n                            </BodyText>\n                        ))}\n                    </View>\n                ) : (\n                    <BodyText size=\"small\" style={{fontStyle: \"italic\"}}>\n                        No interactions yet\n                    </BodyText>\n                )}\n            </View>\n        </View>\n    );\n};","description":"This story demonstrates tracking press duration from `onMouseDown` to `onMouseUp`, useful for measuring how long a user holds down on a button. The tracking also handles cases where the mouse leaves the button area during the press."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button, { ComponentInfo, Strut } from \"@khanacademy/wonder-blocks-button\";\nimport { CompatRouter, Route, Routes } from \"react-router-dom-v5-compat\";\nimport { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { MemoryRouter } from \"react-router-dom\";\nimport { TextField } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Button\" component.\n  32 | import {IconMappings} from \"../wonder-blocks-icon/phosphor-icon.argtypes\";\n  33 |\n> 34 | export default {\n     | ^\n  35 |     title: \"Packages / Button / Button\",\n  36 |     component: Button,\n  37 |     parameters: {\n\n./__docs__/wonder-blocks-button/button.stories.tsx:\n/* eslint-disable max-lines */\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport {action} from \"storybook/actions\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {MemoryRouter} from \"react-router-dom\";\nimport {CompatRouter, Route, Routes} from \"react-router-dom-v5-compat\";\n\nimport type {StyleDeclaration} from \"aphrodite\";\n\nimport pencilSimple from \"@phosphor-icons/core/regular/pencil-simple.svg\";\nimport pencilSimpleBold from \"@phosphor-icons/core/bold/pencil-simple-bold.svg\";\nimport plus from \"@phosphor-icons/core/regular/plus.svg\";\nimport magnifyingGlass from \"@phosphor-icons/core/regular/magnifying-glass.svg\";\nimport caretRight from \"@phosphor-icons/core/regular/caret-right.svg\";\nimport clock from \"@phosphor-icons/core/regular/clock.svg\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {Strut} from \"@khanacademy/wonder-blocks-layout\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport packageConfig from \"../../packages/wonder-blocks-button/package.json\";\nimport ComponentInfo from \"../components/component-info\";\n\nimport ButtonArgTypes from \"./button.argtypes\";\nimport {LabeledField} from \"@khanacademy/wonder-blocks-labeled-field\";\nimport {Icon, PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport {TextField} from \"@khanacademy/wonder-blocks-form\";\nimport {IconMappings} from \"../wonder-blocks-icon/phosphor-icon.argtypes\";\n\nexport default {\n    title: \"Packages / Button / Button\",\n    component: Button,\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n    },\n    argTypes: ButtonArgTypes,\n    excludeStories: [\"styles\"],\n} as Meta<typeof Button>;\n\ntype StoryComponentType = StoryObj<typeof Button>;\n\nexport const Default: StoryComponentType = {\n    args: {\n        children: \"Hello, world!\",\n        kind: \"primary\",\n        actionType: \"progressive\",\n        size: \"medium\",\n        disabled: false,\n        style: {maxWidth: 200},\n        labelStyle: {},\n        onClick: () => {\n            // eslint-disable-next-line no-alert\n            alert(\"Click!\");\n        },\n    },\n    parameters: {\n        chromatic: {\n            // We already have screenshots of other stories that cover more of\n            // the button states\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const styles: StyleDeclaration = StyleSheet.create({\n    row: {\n        flexDirection: \"row\",\n        alignItems: \"center\",\n        marginBlockEnd: sizing.size_080,\n    },\n    rowWithGap: {\n        flexDirection: \"row\",\n        alignItems: \"center\",\n        gap: sizing.size_160,\n    },\n    button: {\n        marginInlineEnd: sizing.size_080,\n    },\n    truncatedButton: {\n        maxInlineSize: 200,\n        marginBlockEnd: sizing.size_160,\n    },\n    fillSpace: {\n        minInlineSize: 140,\n    },\n    example: {\n        background: semanticColor.core.background.base.subtle,\n        padding: sizing.size_160,\n    },\n    label: {\n        marginBlockStart: sizing.size_240,\n        marginBlockEnd: sizing.size_080,\n    },\n});\n\n/**\n * There are three kinds of buttons: `primary` (default), `secondary`, and\n * `tertiary`.\n */\nexport const Kinds: StoryComponentType = {\n    render: () => (\n        <View style={{padding: sizing.size_160, gap: sizing.size_160}}>\n            <View style={styles.rowWithGap}>\n                <Button onClick={() => {}}>Hello, world!</Button>\n                <Button onClick={() => {}} kind=\"secondary\">\n                    Hello, world!\n                </Button>\n                <Button onClick={() => {}} kind=\"tertiary\">\n                    Hello, world!\n                </Button>\n            </View>\n            <View style={styles.rowWithGap}>\n                <Button onClick={() => {}} disabled={true}>\n                    Hello, world!\n                </Button>\n                <Button onClick={() => {}} disabled={true} kind=\"secondary\">\n                    Hello, world!\n                </Button>\n                <Button onClick={() => {}} disabled={true} kind=\"tertiary\">\n                    Hello, world!\n                </Button>\n            </View>\n            <View style={styles.rowWithGap}>\n                <Button onClick={() => {}} actionType=\"destructive\">\n                    Hello, world!\n                </Button>\n                <Button\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    actionType=\"destructive\"\n                >\n                    Hello, world!\n                </Button>\n                <Button\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    actionType=\"destructive\"\n                >\n                    Hello, world!\n                </Button>\n            </View>\n            <View style={styles.rowWithGap}>\n                <Button onClick={() => {}} actionType=\"neutral\">\n                    Hello, world!\n                </Button>\n                <Button\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    actionType=\"neutral\"\n                >\n                    Hello, world!\n                </Button>\n                <Button onClick={() => {}} kind=\"tertiary\" actionType=\"neutral\">\n                    Hello, world!\n                </Button>\n            </View>\n        </View>\n    ),\n    parameters: {\n        chromatic: {\n            // We already have screenshots of other stories that cover more of\n            // the button states\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * Buttons have an `actionType` prop that is either `progressive` (the default,\n * as shown above), `destructive` or `neutral` (as can seen below):\n */\nexport const ActionType: StoryComponentType = {\n    name: \"ActionType\",\n    render: () => (\n        <View style={{gap: sizing.size_160}}>\n            <View style={styles.row}>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    actionType=\"destructive\"\n                >\n                    Primary\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    actionType=\"destructive\"\n                >\n                    Secondary\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    actionType=\"destructive\"\n                >\n                    Tertiary\n                </Button>\n            </View>\n            <View style={styles.row}>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    actionType=\"neutral\"\n                >\n                    Primary\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    actionType=\"neutral\"\n                >\n                    Secondary\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    actionType=\"neutral\"\n                >\n                    Tertiary\n                </Button>\n            </View>\n        </View>\n    ),\n    parameters: {\n        chromatic: {\n            // NOTE: We already have screenshots of other stories that cover more of\n            // the button states (see Variants).\n            disableSnapshot: true,\n        },\n    },\n};\n\nconst kinds = [\"primary\", \"secondary\", \"tertiary\"] as const;\n\nconst IconExample = () => (\n    <View>\n        <BodyText weight=\"bold\" style={styles.label}>\n            Using `startIcon` prop\n        </BodyText>\n        <View style={styles.row}>\n            {kinds.map((kind, idx) => (\n                <Button\n                    kind={kind}\n                    startIcon={pencilSimple}\n                    style={styles.button}\n                    key={idx}\n                >\n                    {kind}\n                </Button>\n            ))}\n        </View>\n        <View style={styles.row}>\n            {kinds.map((kind, idx) => (\n                <Button\n                    kind={kind}\n                    startIcon={pencilSimpleBold}\n                    style={styles.button}\n                    key={idx}\n                    size=\"small\"\n                >\n                    {`${kind} small`}\n                </Button>\n            ))}\n        </View>\n        <BodyText weight=\"bold\" style={styles.label}>\n            Using `endIcon` prop\n        </BodyText>\n        <View style={styles.row}>\n            {kinds.map((kind, idx) => (\n                <Button\n                    kind={kind}\n                    endIcon={pencilSimple}\n                    style={styles.button}\n                    key={idx}\n                >\n                    {kind}\n                </Button>\n            ))}\n        </View>\n        <View style={styles.row}>\n            {kinds.map((kind, idx) => (\n                <Button\n                    kind={kind}\n                    endIcon={pencilSimpleBold}\n                    style={styles.button}\n                    key={idx}\n                    size=\"small\"\n                >\n                    {`${kind} small`}\n                </Button>\n            ))}\n        </View>\n        <BodyText weight=\"bold\" style={styles.label}>\n            Using both `startIcon` and `endIcon` props\n        </BodyText>\n        <View style={styles.row}>\n            {kinds.map((kind, idx) => (\n                <Button\n                    kind={kind}\n                    startIcon={pencilSimple}\n                    endIcon={plus}\n                    style={styles.button}\n                    key={idx}\n                >\n                    {kind}\n                </Button>\n            ))}\n        </View>\n        <View style={styles.row}>\n            {kinds.map((kind, idx) => (\n                <Button\n                    kind={kind}\n                    startIcon={pencilSimpleBold}\n                    endIcon={plus}\n                    style={styles.button}\n                    key={idx}\n                    size=\"small\"\n                >\n                    {`${kind} small`}\n                </Button>\n            ))}\n        </View>\n        <BodyText weight=\"bold\" style={styles.label}>\n            Using Icon component for custom icons\n        </BodyText>\n        <View style={styles.row}>\n            {kinds.map((kind, idx) => (\n                <Button\n                    kind={kind}\n                    startIcon={\n                        <Icon>\n                            <img src={\"logo.svg\"} alt=\"\" />\n                        </Icon>\n                    }\n                    endIcon={\n                        <Icon>\n                            <img src={\"logo.svg\"} alt=\"\" />\n                        </Icon>\n                    }\n                    style={styles.button}\n                    key={idx}\n                >\n                    {kind}\n                </Button>\n            ))}\n        </View>\n        <View style={styles.row}>\n            {kinds.map((kind, idx) => (\n                <Button\n                    kind={kind}\n                    startIcon={\n                        <Icon>\n                            <img src={\"logo.svg\"} alt=\"\" />\n                        </Icon>\n                    }\n                    endIcon={\n                        <Icon>\n                            <img src={\"logo.svg\"} alt=\"\" />\n                        </Icon>\n                    }\n                    style={styles.button}\n                    key={idx}\n                    size=\"small\"\n                >\n                    {`${kind} small`}\n                </Button>\n            ))}\n        </View>\n    </View>\n);\n\n/**\n * Buttons can have a start icon or an end icon. The `startIcon` prop\n * results in the icon appearing before the label (left for LTR, right for RTL)\n * and the `endIcon` prop results in the icon appearing after the label (right\n * for LTR, left for RTL).\n *\n * __NOTE:__ Icons are available from the [Phosphor\n * Icons](https://phosphoricons.com/) library.\n *\n * To use a Phosphor icon, you can use the following syntax:\n *\n * ```tsx\n * import pencilSimple from \"@phosphor-icons/core/regular/pencil-simple.svg\";\n *\n * export const ButtonExample = () => (\n *     <Button startIcon={pencilSimple}>\n *         Example button\n *     </Button>\n * );\n * ```\n *\n * For custom icons, you can use the Wonder Blocks Icon component:\n *\n * ```tsx\n * import {Icon} from \"@khanacademy/wonder-blocks-icon\";\n *\n * export const ButtonExample = () => (\n *     <Button startIcon={<Icon><img src=\"example.svg\" alt=\"Example icon\" /></Icon>}>\n *         Example button\n *     </Button>\n * );\n * ```\n *\n * Note: The Button component will handle the sizing for the icons\n */\nexport const WithIcon: StoryComponentType = {\n    name: \"Icon\",\n    render: () => <IconExample />,\n};\n\n/**\n * If the `startIcon` or `endIcon` provide meaning, you can provide an accessible\n * name for the icons so that it is included in the accessible name of the button.\n *\n * For example, when using a `PhosphorIcon`, you can use the `aria-label` prop\n * to provide an accessible name. When using a `Icon` component, you can provide\n * the accessible name to the `children` element (ie the `alt` attribute on the\n * `img` element).\n */\nexport const IconsWithAccessibleNames: StoryComponentType = {\n    render: () => {\n        return (\n            <View style={styles.row}>\n                <Button\n                    style={styles.button}\n                    startIcon={\n                        <PhosphorIcon\n                            icon={IconMappings.cookie}\n                            aria-label=\"Cookie\"\n                        />\n                    }\n                    endIcon={\n                        <PhosphorIcon\n                            icon={IconMappings.iceCream}\n                            aria-label=\"Ice Cream\"\n                        />\n                    }\n                >\n                    With PhosphorIcon aria-label\n                </Button>\n                <Button\n                    style={styles.button}\n                    startIcon={\n                        <Icon>\n                            <img\n                                src={\"logo.svg\"}\n                                alt=\"Wonder Blocks start icon\"\n                            />\n                        </Icon>\n                    }\n                    endIcon={\n                        <Icon>\n                            <img\n                                src={\"logo.svg\"}\n                                alt=\"Wonder Blocks end icon\"\n                            />\n                        </Icon>\n                    }\n                >\n                    With Icon and img alt\n                </Button>\n            </View>\n        );\n    },\n    parameters: {\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const Size: StoryComponentType = () => (\n    <View>\n        <View style={styles.row}>\n            <BodyText style={styles.fillSpace}>small</BodyText>\n            <View style={[styles.row, styles.example]}>\n                <Button style={styles.button} onClick={() => {}} size=\"small\">\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    size=\"small\"\n                >\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    size=\"small\"\n                >\n                    Label\n                </Button>\n            </View>\n        </View>\n        <View style={styles.row}>\n            <BodyText style={styles.fillSpace}>medium (default)</BodyText>\n\n            <View style={[styles.row, styles.example]}>\n                <Button style={styles.button} onClick={() => {}} size=\"medium\">\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    size=\"medium\"\n                >\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    size=\"medium\"\n                >\n                    Label\n                </Button>\n            </View>\n        </View>\n        <View style={styles.row}>\n            <BodyText style={styles.fillSpace}>large</BodyText>\n            <View style={[styles.row, styles.example]}>\n                <Button style={styles.button} onClick={() => {}} size=\"large\">\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    size=\"large\"\n                >\n                    Label\n                </Button>\n                <Button\n                    style={styles.button}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    size=\"large\"\n                >\n                    Label\n                </Button>\n            </View>\n        </View>\n    </View>\n);\n\nSize.parameters = {\n    docs: {\n        description: {\n            story: \"Buttons have a size that's either `medium` (default), `small`, or `large`.\",\n        },\n    },\n    chromatic: {\n        // We already have screenshots of other stories that cover more of\n        // the button states\n        disableSnapshot: true,\n    },\n};\n\nexport const Spinner: StoryComponentType = () => (\n    <View style={{flexDirection: \"row\"}}>\n        <Button\n            onClick={() => {}}\n            spinner={true}\n            size=\"large\"\n            aria-label={\"waiting\"}\n        >\n            Hello, world\n        </Button>\n        <Strut size={16} />\n        <Button onClick={() => {}} spinner={true} aria-label={\"waiting\"}>\n            Hello, world\n        </Button>\n        <Strut size={16} />\n        <Button\n            onClick={() => {}}\n            spinner={true}\n            size=\"small\"\n            aria-label={\"waiting\"}\n        >\n            Hello, world\n        </Button>\n    </View>\n);\n\nSpinner.parameters = {\n    docs: {\n        description: {\n            story: \"Buttons can show a spinner. This is useful when indicating to a user that their input has been recognized but that the operation will take some time. While the spinner property is set to true the button is disabled.\",\n        },\n    },\n};\n\nexport const TruncatingLabels: StoryComponentType = {\n    name: \"Truncating labels\",\n    render: () => (\n        <View style={{flexDirection: \"row\", flexWrap: \"wrap\"}}>\n            <Button onClick={() => {}} style={styles.truncatedButton}>\n                label too long for the parent container\n            </Button>\n            <Strut size={16} />\n            <Button\n                onClick={() => {}}\n                style={styles.truncatedButton}\n                startIcon={plus}\n            >\n                label too long for the parent container\n            </Button>\n            <Strut size={16} />\n            <Button\n                size=\"small\"\n                onClick={() => {}}\n                style={styles.truncatedButton}\n            >\n                label too long for the parent container\n            </Button>\n            <Strut size={16} />\n            <Button\n                size=\"small\"\n                onClick={() => {}}\n                style={styles.truncatedButton}\n                startIcon={plus}\n            >\n                label too long for the parent container\n            </Button>\n        </View>\n    ),\n};\n\nTruncatingLabels.parameters = {\n    docs: {\n        description: {\n            story: \"If the label is too long for the button width, the text will be truncated.\",\n        },\n    },\n};\n\n/**\n * Buttons can be styled with custom styles. This story shows a button with a\n * custom width and height (using the `style` prop), and also a custom label\n * style that prevents the label from being truncated (`labelStyle`).\n *\n * __NOTE:__ Please use this feature sparingly. This could be useful for simple\n * cases like the one shown below, but it could cause some issues if used in\n * more complex cases.\n */\nexport const CustomStyles = {\n    args: {\n        children: `This button does not truncate its label and can appear in multiple lines`,\n        disabled: false,\n        kind: \"secondary\",\n        onClick: () => {},\n        style: {\n            maxWidth: 200,\n            minHeight: 32,\n            height: \"auto\",\n        },\n        labelStyle: {\n            textOverflow: \"initial\",\n            whiteSpace: \"normal\",\n        },\n    },\n    render: (args: any) => (\n        <View style={{gap: sizing.size_160}}>\n            <View style={{flexDirection: \"row\", gap: sizing.size_160}}>\n                <Button {...args} kind=\"primary\" />\n                <Button {...args} kind=\"secondary\" />\n                <Button {...args} kind=\"tertiary\" />\n            </View>\n        </View>\n    ),\n};\n\n/**\n * The `styles` prop allows overriding styles for specific sub-elements\n * within the Button. In this example, the start icon is rendered at 24x24\n * instead of the default theme size.\n *\n * **Note:** Use this prop sparingly and only when the default theme styling\n * does not meet your needs (e.g. a custom trigger button that requires a\n * non-standard icon size).\n */\nexport const CustomIconSize: StoryComponentType = {\n    args: {\n        children: \"Custom icon size\",\n        startIcon: plus,\n        kind: \"secondary\",\n        styles: {\n            startIcon: {width: sizing.size_240, height: sizing.size_240},\n        },\n        onClick: action(\"clicked\"),\n    },\n    parameters: {\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const SubmittingForms: StoryComponentType = {\n    name: \"Submitting forms\",\n    render: () => (\n        <form\n            onSubmit={(e) => {\n                e.preventDefault();\n                window.alert(\"form submitted\"); // eslint-disable-line no-alert\n            }}\n        >\n            <View>\n                <LabeledField\n                    label=\"Foo\"\n                    field={\n                        <TextField id=\"foo\" value=\"bar\" onChange={() => {}} />\n                    }\n                />\n                <Button type=\"submit\">Submit</Button>\n            </View>\n        </form>\n    ),\n};\n\nSubmittingForms.parameters = {\n    docs: {\n        description: {\n            story: 'If the button is inside a form, you can use the `type=\"submit\"` variant, so the form will be submitted on click.',\n        },\n    },\n    options: {\n        showAddonPanel: true,\n    },\n    chromatic: {\n        // We already have screenshots of other stories that cover more of the\n        // button states.\n        disableSnapshot: true,\n    },\n};\n\nexport const PreventNavigation: StoryComponentType = {\n    name: \"Preventing navigation\",\n    render: () => (\n        <MemoryRouter>\n            <CompatRouter>\n                <View style={styles.row}>\n                    <Button\n                        href=\"/foo\"\n                        style={styles.button}\n                        onClick={(e) => {\n                            e.preventDefault();\n                        }}\n                    >\n                        This button prevents navigation.\n                    </Button>\n                    <Routes>\n                        <Route\n                            path=\"/foo\"\n                            element={<View id=\"foo\">Hello, world!</View>}\n                        />\n                    </Routes>\n                </View>\n            </CompatRouter>\n        </MemoryRouter>\n    ),\n};\n\nPreventNavigation.parameters = {\n    docs: {\n        description: {\n            story: \"Sometimes you may need to perform an async action either before or during navigation. This can be accomplished with `beforeNav` and `safeWithNav` respectively.\",\n        },\n    },\n    chromatic: {\n        disableSnapshot: true,\n    },\n};\n\nexport const WithRouter: StoryComponentType = {\n    name: \"Navigation with React Router\",\n    render: () => (\n        <MemoryRouter>\n            <CompatRouter>\n                <View style={styles.row}>\n                    <Button href=\"/foo\" style={styles.button}>\n                        Uses Client-side Nav\n                    </Button>\n                    <Button href=\"/foo\" style={styles.button} skipClientNav>\n                        Avoids Client-side Nav\n                    </Button>\n                    <Routes>\n                        <Route\n                            path=\"/foo\"\n                            element={<View id=\"foo\">Hello, world!</View>}\n                        />\n                    </Routes>\n                </View>\n            </CompatRouter>\n        </MemoryRouter>\n    ),\n};\n\nWithRouter.parameters = {\n    docs: {\n        description: {\n            story: \"Buttons do client-side navigation by default, if React Router exists:\",\n        },\n    },\n    chromatic: {\n        disableSnapshot: true,\n    },\n};\n\n/**\n * This button can receive focus programmatically. This is useful for cases where\n * you want to focus the button when the user interacts with another\n * component, such as a form field or another button.\n *\n * To do this, we use a `ref` to the button and call the `focus()` method\n * on it, so the `ActivityButton` receives focus.\n */\nexport const ReceivingFocusProgrammatically: StoryComponentType = {\n    render: function Render(args) {\n        // This story is used to test the focus ring when the button receives\n        // focus programmatically. The button is focused when the story is\n        // rendered.\n        const buttonRef = React.useRef<HTMLButtonElement | null>(null);\n\n        return (\n            <View style={{gap: sizing.size_160, flexDirection: \"row\"}}>\n                <Button\n                    {...args}\n                    ref={buttonRef}\n                    onClick={(e) => action(\"clicked\")(e)}\n                />\n                <Button\n                    onClick={() => {\n                        // Focus the button when the button is clicked.\n                        if (buttonRef.current) {\n                            buttonRef.current.focus();\n                        }\n                    }}\n                    kind=\"secondary\"\n                >\n                    Focus on the Button (left)\n                </Button>\n            </View>\n        );\n    },\n    args: {\n        children: \"Search\",\n        startIcon: magnifyingGlass,\n        endIcon: caretRight,\n    },\n    parameters: {\n        chromatic: {\n            // Disable since it requires user interaction to see the focus ring.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * This story demonstrates tracking press duration from `onMouseDown` to `onMouseUp`,\n * useful for measuring how long a user holds down on a button. The tracking also\n * handles cases where the mouse leaves the button area during the press.\n */\nexport const PressDurationTracking: StoryComponentType = {\n    render: function Render(args) {\n        const [pressStartTime, setPressStartTime] = React.useState<\n            number | null\n        >(null);\n        const [pressDuration, setPressDuration] = React.useState<number | null>(\n            null,\n        );\n        const [lastEvent, setLastEvent] = React.useState<string>(\"none\");\n        const [interactionHistory, setInteractionHistory] = React.useState<\n            string[]\n        >([]);\n\n        const logEvent = (eventName: string, duration?: number) => {\n            const timestamp = new Date().toLocaleTimeString();\n            const logEntry = duration\n                ? `${eventName} (${duration}ms) - ${timestamp}`\n                : `${eventName} - ${timestamp}`;\n            setInteractionHistory((prev) => [...prev.slice(-4), logEntry]);\n            setLastEvent(eventName);\n        };\n\n        // Create base actions for Storybook logging\n        const baseActions = {\n            onMouseDown: action(\"onMouseDown\"),\n            onMouseUp: action(\"onMouseUp\"),\n            onMouseLeave: action(\"onMouseLeave\"),\n            onClick: action(\"onClick\"),\n            onMouseEnter: action(\"onMouseEnter\"),\n        };\n\n        const handleMouseDown = (e: React.MouseEvent) => {\n            const startTime = Date.now();\n            setPressStartTime(startTime);\n            setPressDuration(null);\n            logEvent(\"onMouseDown\");\n            baseActions.onMouseDown(e);\n        };\n\n        const handleMouseUp = (e: React.MouseEvent) => {\n            if (pressStartTime) {\n                const duration = Date.now() - pressStartTime;\n                setPressDuration(duration);\n                logEvent(\"onMouseUp\", duration);\n            } else {\n                logEvent(\"onMouseUp\");\n            }\n            setPressStartTime(null);\n            baseActions.onMouseUp(e);\n        };\n\n        const handleMouseLeave = (e: React.MouseEvent) => {\n            if (pressStartTime) {\n                const duration = Date.now() - pressStartTime;\n                setPressDuration(duration);\n                logEvent(\"onMouseLeave\", duration);\n                setPressStartTime(null);\n            } else {\n                logEvent(\"onMouseLeave\");\n            }\n            baseActions.onMouseLeave(e);\n        };\n\n        const handleMouseEnter = (e: React.MouseEvent) => {\n            logEvent(\"onMouseEnter\");\n            baseActions.onMouseEnter(e);\n        };\n\n        const handleClick = (e: React.SyntheticEvent) => {\n            logEvent(\"onClick\");\n            baseActions.onClick(e);\n        };\n\n        return (\n            <View>\n                <Button\n                    {...args}\n                    startIcon={clock}\n                    onMouseEnter={handleMouseEnter}\n                    onMouseDown={handleMouseDown}\n                    onMouseUp={handleMouseUp}\n                    onMouseLeave={handleMouseLeave}\n                    onClick={handleClick}\n                >\n                    Track Press Duration\n                </Button>\n                <Strut size={16} />\n                <View\n                    style={{\n                        padding: sizing.size_160,\n                        backgroundColor:\n                            semanticColor.core.background.base.subtle,\n                        borderRadius: 4,\n                        maxInlineSize: 400,\n                    }}\n                >\n                    <BodyText size=\"medium\" weight=\"bold\">\n                        Press Duration Tracker\n                    </BodyText>\n                    <Strut size={8} />\n                    <BodyText size=\"medium\">\n                        Last Event: <strong>{lastEvent}</strong>\n                    </BodyText>\n                    <BodyText size=\"medium\">\n                        Press Duration:{\" \"}\n                        <strong>\n                            {pressDuration !== null\n                                ? `${pressDuration}ms`\n                                : \"N/A\"}\n                        </strong>\n                    </BodyText>\n                    <BodyText size=\"medium\">\n                        Currently Pressing:{\" \"}\n                        <strong>{pressStartTime ? \"Yes\" : \"No\"}</strong>\n                    </BodyText>\n                    <Strut size={12} />\n                    <BodyText size=\"medium\" weight=\"bold\">\n                        Interaction History:\n                    </BodyText>\n                    {interactionHistory.length > 0 ? (\n                        <View style={{marginBlockStart: sizing.size_080}}>\n                            {interactionHistory.map((entry, index) => (\n                                <BodyText\n                                    key={index}\n                                    size=\"small\"\n                                    style={{fontFamily: \"monospace\"}}\n                                >\n                                    {entry}\n                                </BodyText>\n                            ))}\n                        </View>\n                    ) : (\n                        <BodyText size=\"small\" style={{fontStyle: \"italic\"}}>\n                            No interactions yet\n                        </BodyText>\n                    )}\n                </View>\n            </View>\n        );\n    },\n    args: {\n        kind: \"primary\",\n        style: {maxWidth: 240},\n    },\n    parameters: {\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n"}},"packages-button-guides-navigation-callbacks":{"id":"packages-button-guides-navigation-callbacks","name":"Button","path":"./__docs__/wonder-blocks-button/navigation-callbacks.stories.tsx","stories":[{"id":"packages-button-guides-navigation-callbacks--before-nav-callbacks","name":"beforeNav Callbacks","snippet":"const BeforeNavCallbacks_ = () => <BeforeNavCallbacks />;"},{"id":"packages-button-guides-navigation-callbacks--safe-with-nav-callbacks","name":"safeWithNav Callbacks","snippet":"const SafeWithNavCallbacks_ = () => <SafeWithNavCallbacks />;"}],"import":"import Button from \"@khanacademy/wonder-blocks-button\";\nimport { CompatRouter, Route, Routes } from \"react-router-dom-v5-compat\";\nimport { MemoryRouter } from \"react-router-dom\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Button\" component.\n  108 | );\n  109 |\n> 110 | export default {\n      | ^\n  111 |     title: \"Packages / Button / Guides / Navigation Callbacks\",\n  112 |     component: Button,\n  113 |\n\n./__docs__/wonder-blocks-button/navigation-callbacks.stories.tsx:\nimport * as React from \"react\";\nimport {MemoryRouter} from \"react-router-dom\";\nimport {CompatRouter, Route, Routes} from \"react-router-dom-v5-compat\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\n\nimport {styles} from \"./button.stories\";\n\nconst BeforeNavCallbacks = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View style={styles.row}>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    beforeNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    beforeNav, client-side nav\n                </Button>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    skipClientNav={true}\n                    beforeNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    beforeNav, server-side nav\n                </Button>\n                <Button\n                    href=\"https://google.com\"\n                    style={styles.button}\n                    skipClientNav={true}\n                    beforeNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    beforeNav, open URL in new tab\n                </Button>\n                <Routes>\n                    <Route\n                        path=\"/foo\"\n                        element={<View id=\"foo\">Hello, world!</View>}\n                    />\n                </Routes>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);\n\nconst SafeWithNavCallbacks = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View style={styles.row}>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    safeWithNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    safeWithNav, client-side nav\n                </Button>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    skipClientNav={true}\n                    safeWithNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    safeWithNav, server-side nav\n                </Button>\n                <Button\n                    href=\"https://google.com\"\n                    style={styles.button}\n                    skipClientNav={true}\n                    safeWithNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    safeWithNav, open URL in new tab\n                </Button>\n                <Routes>\n                    <Route\n                        path=\"/foo\"\n                        element={<View id=\"foo\">Hello, world!</View>}\n                    />\n                </Routes>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);\n\nexport default {\n    title: \"Packages / Button / Guides / Navigation Callbacks\",\n    component: Button,\n\n    // Disables chromatic testing for these stories.\n    parameters: {\n        previewTabs: {\n            canvas: {\n                hidden: true,\n            },\n        },\n\n        viewMode: \"docs\",\n\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const BeforeNavCallbacks_ = {\n    render: () => <BeforeNavCallbacks />,\n    name: \"beforeNav Callbacks\",\n};\n\nexport const SafeWithNavCallbacks_ = {\n    render: () => <SafeWithNavCallbacks />,\n    name: \"safeWithNav Callbacks\",\n};\n"},"docs":{"packages-button-guides-navigation-callbacks--docs":{"id":"packages-button-guides-navigation-callbacks--docs","name":"Docs","path":"./__docs__/wonder-blocks-button/navigation-callbacks.mdx","title":"Packages / Button / Guides / Navigation Callbacks","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport {MemoryRouter} from \"react-router-dom\";\nimport {CompatRouter, Route, Routes} from \"react-router-dom-v5-compat\";\nimport * as NavigationCallbacksStories from \"./navigation-callbacks.stories\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\n\nimport {styles} from \"./button.stories\";\n\n<Meta of={NavigationCallbacksStories} />\n\n# Running Callbacks on Navigation\n\nSometimes you may need to run some code and also navigate when the user\nclicks the button. For example, you might want to send a request to the\nserver and also send the user to a different page. You can do this by\npassing in a URL to the `href` prop and also passing in a callback\nfunction to either the `onClick`, `beforeNav`, or `safeWithNav` prop.\nWhich prop you choose depends on your use case.\n\n- `onClick` is guaranteed to run to completion before navigation starts,\n  but it is not async aware, so it should only be used if all of the code\n  in your callback function executes synchronously.\n\n- `beforeNav` is guaranteed to run async operations before navigation\n  starts. You must return a promise from the callback function passed in\n  to this prop, and the navigation will happen after the promise\n  resolves. If the promise rejects, the navigation will not occur.\n  This prop should be used if it's important that the async code\n  completely finishes before the next URL starts loading.\n\n- `safeWithNav` runs async code concurrently with navigation when safe,\n  but delays navigation until the async code is finished when\n  concurrent execution is not safe. You must return a promise from the\n  callback function passed in to this prop, and Wonder Blocks will run\n  the async code in parallel with client-side navigation or while opening\n  a new tab, but will wait until the async code finishes to start a\n  server-side navigation. If the promise rejects the navigation will\n  happen anyway. This prop should be used when it's okay to load\n  the next URL while the async callback code is running.\n\nThis table gives an overview of the options:\n\n| Prop        | Async safe? | Completes before navigation? |\n| ----------- | ----------- | ---------------------------- |\n| onClick     | no          | yes                          |\n| beforeNav   | yes         | yes                          |\n| safeWithNav | yes         | no                           |\n\nIt is possible to use more than one of these props on the same element.\nIf multiple props are used, they will run in this order: first `onClick`,\nthen `beforeNav`, then `safeWithNav`. If both `beforeNav` and `safeWithNav`\nare used, the `safeWithNav` callback will not be called until the\n`beforeNav` promise resolves successfully. If the `beforeNav` promise\nrejects, `safeWithNav` will not be run.\n\nIf the `onClick` handler calls `preventDefault()`, then `beforeNav`\nand `safeWithNav` will still run, but navigation will not occur.\n\nexport const BeforeNavCallbacks = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View style={styles.row}>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    beforeNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    beforeNav, client-side nav\n                </Button>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    skipClientNav={true}\n                    beforeNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    beforeNav, server-side nav\n                </Button>\n                <Button\n                    href=\"https://google.com\"\n                    style={styles.button}\n                    skipClientNav={true}\n                    beforeNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    beforeNav, open URL in new tab\n                </Button>\n                <Routes>\n                    <Route\n                        path=\"/foo\"\n                        element={<View id=\"foo\">Hello, world!</View>}\n                    />\n                </Routes>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);\n\nexport const SafeWithNavCallbacks = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View style={styles.row}>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    safeWithNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    safeWithNav, client-side nav\n                </Button>\n                <Button\n                    href=\"/foo\"\n                    style={styles.button}\n                    skipClientNav={true}\n                    safeWithNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    safeWithNav, server-side nav\n                </Button>\n                <Button\n                    href=\"https://google.com\"\n                    style={styles.button}\n                    skipClientNav={true}\n                    safeWithNav={() =>\n                        new Promise((resolve, reject) => {\n                            setTimeout(resolve, 1000);\n                        })\n                    }\n                >\n                    safeWithNav, open URL in new tab\n                </Button>\n                <Routes>\n                    <Route\n                        path=\"/foo\"\n                        element={<View id=\"foo\">Hello, world!</View>}\n                    />\n                </Routes>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);\n\n## Stories\n\n### beforeNav Callbacks\n\nThese buttons always wait until the async callback code completes before\nstarting navigation.\n\n<Canvas of={NavigationCallbacksStories.BeforeNavCallbacks_} />\n\n### safeWithNav Callbacks\n\nIf the `onClick` callback calls `preventDefault()`, then navigation will not occur.\n\n<Canvas of={NavigationCallbacksStories.SafeWithNavCallbacks_} />\n"}}},"packages-card":{"id":"packages-card","name":"Card","path":"./__docs__/wonder-blocks-card/card.stories.tsx","stories":[{"id":"packages-card--default-card","name":"Default Card","snippet":"const DefaultCard = () => <Card styles={{root: styles.card}}>\n    <Heading>Some Contents</Heading>\n    <BodyText>This is a basic card.</BodyText>\n</Card>;","description":"The most basic Card has simple contents as `children`."},{"id":"packages-card--gem-card","name":"Gem Card","snippet":"const GemCard = () => (\n    <Card styles={{root: styles.card}}>\n        <View style={[styles.gemRow, styles.gemHeaderRow]}>\n            <View style={styles.gemColumn}>\n                <View style={styles.gemRow}>\n                    <Heading tag=\"h3\" size=\"large\">\n                        Gem challenge\n                    </Heading>\n                    <PhosphorIcon\n                        icon={infoIcon}\n                        size=\"small\"\n                        color={semanticColor.feedback.info.strong.icon}\n                    />\n                </View>\n                <GemBadge label=\"30 days left\" showIcon={false} />\n            </View>\n            <View style={styles.gemIcon}>\n                <Icon size=\"large\">\n                    <GemIcon aria-label=\"Gem\" />\n                </Icon>\n            </View>\n        </View>\n        <View style={styles.gemColumn}>\n            {/* progress bar here */}\n            <View style={styles.gemRow}>\n                <BodyText size=\"small\" style={{marginInlineEnd: \"auto\"}}>\n                    Class gems\n                </BodyText>\n                <BodyText>\n                    <span>0</span> of <span>1500</span>\n                </BodyText>\n            </View>\n            <View style={styles.gemRow}>\n                <BodyText size=\"small\" style={{marginInlineEnd: \"auto\"}}>\n                    Remaining\n                </BodyText>\n                <BodyText>\n                    <span>1500</span>\n                </BodyText>\n            </View>\n            <View style={styles.gemRow}>\n                <BodyText size=\"small\" style={{marginInlineEnd: \"auto\"}}>\n                    Reward\n                </BodyText>\n                {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n                <Link href=\"#\" style={{fontSize: font.body.size.small}}>\n                    Set Reward\n                </Link>\n            </View>\n            <Button kind=\"secondary\">Learn more about gems</Button>\n            <Button kind=\"tertiary\">View previous challenges</Button>\n        </View>\n    </Card>\n);","description":"The Gem Challenge Card has more complex content structure including icons, badges, tabular data, and multiple buttons."},{"id":"packages-card--with-dismiss-button","name":"With Dismiss Button","snippet":"const WithDismissButton = () => {\n    const CardWithRef = () => {\n        const wrapperRef = React.useRef<HTMLDivElement>(null);\n        const cardRef = React.useRef<HTMLDivElement>(null);\n        const onDismiss = () => {\n            // Remove the card from the DOM\n            cardRef.current?.remove();\n\n            // Ensure focus is handled gracefully across browsers\n            wrapperRef.current?.focus();\n        };\n\n        return (\n            <View ref={wrapperRef} tabIndex={-1}>\n                <Card\n                    labels={{\n                        dismissButtonAriaLabel: \"Dismiss\",\n                        dismissButtonAriaDescribedBy: \"dismiss-button-body\",\n                    }}\n                    onDismiss={onDismiss}\n                    ref={cardRef}\n                    styles={{root: styles.card}}\n                >\n                    <Heading>Dismissable Card</Heading>\n                    <BodyText id=\"dismiss-button-body\">\n                        This is a card with a close button. Click the button\n                        to dismiss.\n                    </BodyText>\n                </Card>\n            </View>\n        );\n    };\n\n    return <CardWithRef />;\n};","description":"Cards also have the option to display a \"close\" button that can dismiss the card from the DOM. If a Card is removed onDismiss, focus should be moved to a wrapper or neighoring interactive element."},{"id":"packages-card--with-tag","name":"With Tag","snippet":"const WithTag = () => (\n    <View tag=\"ul\">\n        <Card tag=\"li\" styles={{root: styles.card}}>\n            <Heading>Card 1</Heading>\n        </Card>\n        <Card tag=\"li\" styles={{root: styles.card}}>\n            <Heading>Card 2</Heading>\n        </Card>\n    </View>\n);","description":"Cards can be marked up with different HTML tags via the `tag` prop. Any HTML tag is allowed except for `button` and `a` tags, which should use Wonder Blocks Button and Link components as children instead. When using `section` or `figure` tags, a label must be provided for accessibility via the `labels.cardAriaLabel` prop. See the \"In a Stack\" story for an example of using listitems with Cards."},{"id":"packages-card--with-background-image","name":"With Background Image","snippet":"const WithBackgroundImage = () => (\n    <Card styles={{root: [styles.card, styles.eotCard]}}>\n        <View style={styles.eotPattern} tag=\"span\" aria-hidden={true} />\n        <View\n            style={{\n                alignItems: \"center\",\n            }}\n        >\n            <Heading size=\"small\" style={styles.eotCardText}>\n                Practice\n            </Heading>\n            <img\n                src={eotIcon}\n                alt=\"\"\n                style={{maxInlineSize: sizing.size_640}}\n            />\n            <Heading\n                size=\"small\"\n                weight=\"semi\"\n                tag=\"h3\"\n                style={styles.eotCardText}\n            >\n                Proficient\n            </Heading>\n            <Heading size=\"xxlarge\" tag=\"h4\" style={styles.eotCardText}>\n                100%\n            </Heading>\n        </View>\n    </Card>\n);","description":"Avoid using a CSS background image with text placed on top. In dark mode the image stays the same while the text color inverts, which can make the text illegible. Instead, paint the card with a semantic background color and layer the background pattern on top with a CSS `mask-image` filled with a semantic color token. This way both the background color and the pattern adapt across themes, keeping the text legible. See the [Dark Mode best practices](./?path=/docs/best-practices-dark-mode--docs) for more details."},{"id":"packages-card--with-split-background-image","name":"With Split Background Image","snippet":"const WithSplitBackgroundImage = () => (\n    <Card paddingSize=\"none\" styles={{root: styles.card}}>\n        <View style={styles.blooketStrip}>\n            <StyledImg\n                src={blooketShapes}\n                alt=\"\"\n                aria-hidden={true}\n                style={styles.blooketShapes}\n            />\n        </View>\n        <View\n            style={{\n                padding: sizing.size_160,\n            }}\n        >\n            <Heading size=\"medium\">Khanmigo and Blooket</Heading>\n            <BodyText>\n                Gamify learning without adding more work to your plate!\n            </BodyText>\n            <View\n                style={{\n                    insetBlockStart: sizing.size_160,\n                    marginBlockEnd: sizing.size_160,\n                    flexDirection: \"unset\",\n                }}\n            >\n                <Button kind=\"secondary\">Try it out</Button>\n            </View>\n        </View>\n    </Card>\n);","description":"When a card has a decorative header illustration, avoid painting it with a CSS background image: it stays the same in dark mode while the rest of the card adapts, so the header can look out of place. Instead, paint the header with a semantic background color and place the illustration on top as a decorative (`aria-hidden`) graphic. The illustration has its baked-in background removed so the semantic color shows through and adapts across themes. See the [Dark Mode best practices](./?path=/docs/best-practices-dark-mode--docs) for more details."},{"id":"packages-card--in-a-stack","name":"In A Stack","snippet":"const InAStack = () => (\n    <>\n        <Heading>Cards in a stack</Heading>\n        <View tag=\"ul\">\n            <View tag=\"li\" style={styles.stackedCard}>\n                <Card styles={{root: styles.card}}>\n                    <Heading>Active Card</Heading>\n                    <Button>CTA</Button>\n                </Card>\n            </View>\n            <View tag=\"li\" style={[styles.stackedCard, styles.dimmed]}>\n                <Card inert={true} styles={{root: styles.card}}>\n                    <Heading>Inactive Card</Heading>\n                    <Button>CTA</Button>\n                </Card>\n            </View>\n        </View>\n    </>\n);"},{"id":"packages-card--in-a-grid","name":"In A Grid","snippet":"const InAGrid = () => (\n    <>\n        <Heading>Cards in a grid</Heading>\n        <View\n            style={[\n                styles.gemRow,\n                {flexWrap: \"wrap\", gap: sizing.size_100},\n            ]}\n        >\n            <Card styles={{root: styles.card}}>\n                <Heading>Card 1</Heading>\n                <BodyText>This is a basic card.</BodyText>\n            </Card>\n            <Card styles={{root: styles.card}}>\n                <Heading>Card 2</Heading>\n                <BodyText>This is a basic card.</BodyText>\n            </Card>\n            <Card styles={{root: styles.card}}>\n                <Heading>Card 3</Heading>\n                <BodyText>This is a basic card.</BodyText>\n            </Card>\n            <Card styles={{root: styles.card}}>\n                <Heading>Card 4</Heading>\n                <BodyText>This is a basic card.</BodyText>\n            </Card>\n        </View>\n    </>\n);"},{"id":"packages-card--with-style-props","name":"With Style Props","snippet":"const WithStyleProps = () => (\n    <>\n        <Heading>Style props</Heading>\n        <View tag=\"ul\">\n            <Card\n                styles={{root: styles.card}}\n                tag=\"li\"\n                borderRadius=\"small\"\n            >\n                <Heading>borderRadius=small</Heading>\n            </Card>\n            <Card\n                tag=\"li\"\n                styles={{root: styles.card}}\n                paddingSize=\"medium\"\n            >\n                <Heading>paddingSize=medium</Heading>\n            </Card>\n            <Card\n                tag=\"li\"\n                styles={{root: styles.card}}\n                background=\"base-subtle\"\n            >\n                <Heading>background=base-subtle</Heading>\n            </Card>\n            <Card tag=\"li\" styles={{root: styles.card}} elevation=\"low\">\n                <Heading>elevation=low</Heading>\n            </Card>\n        </View>\n    </>\n);"}],"import":"import { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { Card, ComponentInfo } from \"@khanacademy/wonder-blocks-card\";\nimport { GemBadge } from \"@khanacademy/wonder-blocks-badge\";\nimport { GemIcon, Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"The Card component is a flexible, reusable UI building block designed to encapsulate content within a structured, visually distinct container. Its primary goal is to present grouped or related information in a way that is visually consistent, easily scannable, and modular across different parts of the application. Cards provide a defined surface area with clear visual boundaries (via border-radius and box-shadow elevation tokens), making them ideal for use cases that involve displaying comparable content items side-by-side or in structured layouts such as grids, lists, or dashboards. Note: cards do not set a default width. Width styles should be set by the consumer with the `styles.root` prop, or a parent flex or grid container. ### Usage ```jsx import {Card} from \"@khanacademy/wonder-blocks-card\"; <Card> <Heading>This is a basic card.</Heading> </Card> ``` ### Accessibility When the `onDismiss` prop is provided, a dismiss button will be rendered. In this case, the `labels.dismissButtonAriaLabel` prop is required to provide a translatable screen reader label for the dismiss button. See additional Accessibility docs.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-card/src/index.ts","description":"The Card component is a flexible, reusable UI building block designed to\nencapsulate content within a structured, visually distinct container.\nIts primary goal is to present grouped or related information in a way that\nis visually consistent, easily scannable, and modular across different\nparts of the application.\n\nCards provide a defined surface area with clear visual boundaries\n(via border-radius and box-shadow elevation tokens), making them ideal for\nuse cases that involve displaying comparable content items side-by-side or\nin structured layouts such as grids, lists, or dashboards.\n\nNote: cards do not set a default width. Width styles should be set by the consumer\nwith the `styles.root` prop, or a parent flex or grid container.\n\n### Usage\n\n```jsx\nimport {Card} from \"@khanacademy/wonder-blocks-card\";\n\n<Card>\n  <Heading>This is a basic card.</Heading>\n</Card>\n```\n\n### Accessibility\n\nWhen the `onDismiss` prop is provided, a dismiss button will be rendered.\nIn this case, the `labels.dismissButtonAriaLabel` prop is required to provide\na translatable screen reader label for the dismiss button.\n\nSee additional Accessibility docs.","displayName":"Card","methods":[],"props":{"aria-busy":{"defaultValue":null,"description":"","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-labelledby":{"defaultValue":null,"description":"ID reference for aria-labelledby","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-roledescription":{"defaultValue":null,"description":"","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"children":{"defaultValue":null,"description":"The content for the card.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactNode"}},"tag":{"defaultValue":null,"description":"","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"symbol\" | \"object\" | \"search\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"style\" | \"time\" | \"menu\" | \"dialog\" | \"text\" | \"article\" | \"figure\" | \"form\" | \"img\" | \"main\" | \"menuitem\" | \"option\" | \"switch\" | \"table\" | \"header\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"span\" | \"title\" | \"p\" | \"map\" | \"filter\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"base\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"body\" | \"br\" | \"canvas\" | \"caption\" | \"center\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"data\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"footer\" | \"head\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"input\" | \"ins\" | \"kbd\" | \"keygen\" | \"label\" | \"legend\" | \"li\" | \"mark\" | \"meta\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"output\" | \"param\" | \"picture\" | \"pre\" | \"progress\" | \"q\" | \"rp\" | \"rt\" | \"ruby\" | \"s\" | \"samp\" | \"slot\" | \"script\" | \"section\" | \"select\" | \"source\" | \"strong\" | \"summary\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"svg\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"desc\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"image\" | \"line\" | \"linearGradient\" | \"marker\" | \"mask\" | \"metadata\" | \"mpath\" | \"path\" | \"pattern\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"set\" | \"stop\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"testId":{"defaultValue":null,"description":"The test ID used to locate this component in automated tests.\n\nThe test ID will also be passed to the dismiss button as\n`{testId}-dismiss-button` if the `onDismiss` prop is provided.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"styles":{"defaultValue":null,"description":"Optional styles to be applied to the root element and the dismiss button.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; dismissButton?: StyleType; }"}},"inert":{"defaultValue":null,"description":"An optional attribute to remove this component from the accessibility tree\nand keyboard tab order, such as for inactive cards in a stack.","name":"inert","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"labels":{"defaultValue":null,"description":"Translatable label string for aria-label","name":"labels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"({ cardAriaLabel?: string; dismissButtonAriaLabel?: string; } & { dismissButtonAriaLabel: string; dismissButtonAriaDescribedBy?: string | undefined; } & Record<string, any>) | ({ cardAriaLabel?: string | undefined; dismissButtonAriaLabel?: string | undefined; } & Record<string, any>) | ({ cardAriaLabel?: undefined; dismissButtonAriaLabel?: string | undefined; } & { dismissButtonAriaLabel: string; dismissButtonAriaDescribedBy?: string | undefined; } & Record<string, any>) | ({ cardAriaLabel?: undefined; dismissButtonAriaLabel?: string | undefined; } & Record<string, any>) | undefined"}},"background":{"defaultValue":{"value":"base-default"},"description":"The background style of the card, as a string identifier that matches a semanticColor token.\nThis can be one of:\n- `\"base-subtle\"` (color), `semanticColor.core.background.base.subtle`: a light gray background.\n- `\"base-default\"` (color), `semanticColor.core.background.base.default`: a white background.\n- `Image` (image), a URL string for a background image. Can be an imported image file or a URL string.\n\nFor additional background styling such as repeat or size, use the `styles.root` prop to pass in custom styles.\n\nDefault: `\"base-default\"`","name":"background","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"\"base-subtle\" | \"base-default\" | (new (width?: number, height?: number) => HTMLImageElement) | null | undefined"}},"borderRadius":{"defaultValue":{"value":"small"},"description":"The border radius of the card, as a string identifier that matches a border.radius token.\nThis can be one of:\n- `\"radius_080\"`, matching `border.radius.radius_080`.\n- `\"radius_120\"`, matching `border.radius.radius_120`.\n\nDefault: `\"radius_080\"`","name":"borderRadius","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"small\" | \"medium\"","value":[{"value":"\"small\""},{"value":"\"medium\""}]}},"paddingSize":{"defaultValue":{"value":"small"},"description":"The padding inside the card, as a string identifier that matches a sizing token.\nThis can be one of:\n- `\"none\"`: no padding.\n- `\"small\"`, matching `sizing.size_160`.\n- `\"medium\"`, matching `sizing.size_240`.\n\nDefault: `\"size_160\"`","name":"paddingSize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"small\" | \"none\" | \"medium\"","value":[{"value":"\"small\""},{"value":"\"none\""},{"value":"\"medium\""}]}},"elevation":{"defaultValue":{"value":"none"},"description":"The box-shadow for the card, as a string identifier that matches a sizing token.\nThis can be one of:\n- `\"none\"`: no elevation.\n- `\"low\"`, matching `boxShadow.low`.\n\nDefault: `\"none\"`","name":"elevation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"low\"","value":[{"value":"\"none\""},{"value":"\"low\""}]}},"onDismiss":{"defaultValue":null,"description":"","name":"onDismiss","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-card/src/components/card.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e?: SyntheticEvent<Element, Event>) => void)"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Card"}},"packages-cell-compactcell":{"id":"packages-cell-compactcell","name":"CompactCell","path":"./__docs__/wonder-blocks-cell/compact-cell.stories.tsx","stories":[{"id":"packages-cell-compactcell--default-compact-cell","name":"Default Compact Cell","snippet":"const DefaultCompactCell = () => <CompactCell\n    title=\"Basic Cell\"\n    rightAccessory={<PhosphorIcon icon={IconMappings.caretRight} />} />;","description":"Default CompactCell example. It will be rendered as the first/default story and it can be interacted with the controls panel in the Browser."},{"id":"packages-cell-compactcell--compact-cell-left","name":"Compact Cell Left","snippet":"const CompactCellLeft = () => (\n    <CompactCell\n        title=\"Intro to rational & irrational numbers\"\n        leftAccessory={\n            <PhosphorIcon icon={IconMappings.article} size=\"medium\" />\n        }\n    />\n);","description":"You can create a minimal cell that only uses a title and an PhosphorIcon that can be placed on the left or right (or both). In this case, we will place the icon on the left to show you how cell is flexible. Note that you can pass any of the existing WB components such as `PhosphorIcon`, `IconButton`, `Tooltip`, etc."},{"id":"packages-cell-compactcell--compact-cell-right","name":"Compact Cell Right","snippet":"const CompactCellRight = () => (\n    <CompactCell\n        title=\"Intro to rational & irrational numbers\"\n        rightAccessory={\n            <PhosphorIcon icon={IconMappings.caretRight} size=\"medium\" />\n        }\n    />\n);","description":"You can also create a cell with an accessory placed on the right. Note that you can pass any of the existing WB components such as `PhosphorIcon`."},{"id":"packages-cell-compactcell--compact-cell-with-different-heights","name":"Compact Cell With Different Heights","snippet":"const CompactCellWithDifferentHeights = () => (\n    <>\n        <CompactCell\n            title=\"Single line with short accessory.\"\n            rightAccessory={AccessoryMappings.withCaret}\n        />\n        <Strut size={8} />\n        <CompactCell\n            title=\"Single line with tall accessory.\"\n            rightAccessory={AccessoryMappings.withIconText}\n        />\n        <Strut size={8} />\n        <CompactCell\n            title=\"Multi line title with tall accessory. Content should fit within the container and the cell height should be consistent no matter the content length.\"\n            rightAccessory={AccessoryMappings.withIconText}\n        />\n    </>\n);","description":"Cells should keep a consistent height no matter the content passed in the title prop. It should also respect a `minHeight` of 48px."},{"id":"packages-cell-compactcell--compact-cell-both","name":"CompactCell with both accessories","snippet":"const CompactCellBoth = () => (\n    <CompactCell\n        title=\"Intro to rational & irrational numbers\"\n        leftAccessory={\n            <PhosphorIcon icon={IconMappings.article} size=\"medium\" />\n        }\n        rightAccessory={\n            <PhosphorIcon icon={IconMappings.calendar} size=\"medium\" />\n        }\n    />\n);","description":"You can also create a more complex cell with accessories placed on both sides. Note that you can extend the PhosphorIcon component with custom paths such as the following example."},{"id":"packages-cell-compactcell--compact-cell-accessory-styles","name":"CompactCell accessories with custom styles","snippet":"const CompactCellAccessoryStyles = () => (\n    <CompactCell\n        title=\"CompactCell with custom accessory styles\"\n        leftAccessory={\n            <PhosphorIcon icon={IconMappings.article} size=\"medium\" />\n        }\n        rightAccessory={\n            <PhosphorIcon icon={IconMappings.caretRightBold} size=\"small\" />\n        }\n        styles={{\n            leftAccessory: {\n                minWidth: sizing.size_480,\n                alignSelf: \"flex-start\",\n                alignItems: \"flex-start\",\n            },\n            rightAccessory: {\n                minWidth: sizing.size_240,\n                alignSelf: \"flex-end\",\n                alignItems: \"flex-end\",\n            },\n        }}\n    />\n);","description":"Accessories can also be customized to adapt to different sizes and alignments. In this example, we can see how a cell can be customized for both accessories."},{"id":"packages-cell-compactcell--compact-cell-horizontal-rules","name":"Defining horizontal rule variants","snippet":"const CompactCellHorizontalRules = () => (\n    <>\n        <CompactCell\n            title=\"This is a basic cell with an 'inset' horizontal rule\"\n            leftAccessory={\n                <PhosphorIcon icon={IconMappings.article} size=\"medium\" />\n            }\n            horizontalRule=\"inset\"\n        />\n        <CompactCell\n            title=\"This is a basic cell with a 'full-width' horizontal rule\"\n            leftAccessory={\n                <PhosphorIcon icon={IconMappings.article} size=\"medium\" />\n            }\n            horizontalRule=\"full-width\"\n        />\n        <CompactCell\n            title=\"This is a basic cell without a horizontal rule\"\n            leftAccessory={\n                <PhosphorIcon icon={IconMappings.article} size=\"medium\" />\n            }\n            horizontalRule=\"none\"\n        />\n    </>\n);","description":"Cell components can use the `horizontalRule` prop to use a set of predefined variants that we can use to match our needs."},{"id":"packages-cell-compactcell--compact-cell-with-custom-styles","name":"Compact Cell With Custom Styles","snippet":"const CompactCellWithCustomStyles = () => (\n    <CompactCell\n        title=\"CompactCell with a different background\"\n        leftAccessory={\n            <PhosphorIcon icon={IconMappings.article} size=\"medium\" />\n        }\n        rightAccessory={<PhosphorIcon icon={IconMappings.calendar} />}\n        styles={{\n            root: {\n                background: semanticColor.core.background.neutral.subtle,\n            },\n        }}\n        onClick={() => {}}\n    />\n);","description":"`CompactCell` can be used with custom styles. The following parts can be styled: - `root`: Styles the root element - `content`: Styles the content area (between the accessories) - `leftAccessory`: Styles the left accessory element - `rightAccessory`: Styles the right accessory element"},{"id":"packages-cell-compactcell--clickable-compact-cell","name":"Clickable Compact Cell","snippet":"const ClickableCompactCell = () => (\n    <CompactCell\n        title=\"Intro to rational & irrational numbers\"\n        rightAccessory={<PhosphorIcon icon={IconMappings.caretRight} />}\n        onClick={() => {}}\n        aria-label=\"Press to navigate to the article\"\n    />\n);"},{"id":"packages-cell-compactcell--compact-cell-active","name":"Compact Cell Active","snippet":"const CompactCellActive = () => (\n    <CompactCell\n        title=\"Title for article item\"\n        leftAccessory={\n            <PhosphorIcon\n                icon={IconMappings.playCircle}\n                size=\"medium\"\n                color={semanticColor.core.foreground.neutral.strong}\n            />\n        }\n        rightAccessory={\n            <PhosphorIcon icon={IconMappings.calendarBold} size=\"small\" />\n        }\n        active={true}\n        onClick={() => {}}\n    />\n);","description":"The cell also supports different states within itself. The different styles are defined internally (e.g hover, focused, pressed, active, disabled) and we allow passing some props to use the `active` or `disabled` state."},{"id":"packages-cell-compactcell--compact-cell-disabled","name":"Compact Cell Disabled","snippet":"const CompactCellDisabled = () => (\n    <CompactCell\n        title=\"Title for article item\"\n        leftAccessory={AccessoryMappings.withImage}\n        rightAccessory={\n            <PhosphorIcon icon={IconMappings.calendarBold} size=\"small\" />\n        }\n        disabled={true}\n        onClick={() => {}}\n    />\n);","description":"In the following example we can see how the `disabled` state works. Note that we apply an opacity to all the elements to make it more apparent that the cell is disabled. This includes text, SVG icons, images, etc."},{"id":"packages-cell-compactcell--compact-cells-as-list-items","name":"Compact Cells As List Items","snippet":"const CompactCellsAsListItems = () => (\n    <View role=\"list\">\n        <View role=\"listitem\">\n            <CompactCell\n                title=\"Active Cell\"\n                leftAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.article}\n                        size=\"medium\"\n                    />\n                }\n                active={true}\n                href=\"https://khanacademy.org\"\n                horizontalRule=\"full-width\"\n            />\n        </View>\n        <View role=\"listitem\">\n            <CompactCell\n                title=\"Cell with default bg color\"\n                leftAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.article}\n                        size=\"medium\"\n                    />\n                }\n                href=\"https://khanacademy.org\"\n                horizontalRule=\"full-width\"\n            />\n        </View>\n        <View role=\"listitem\">\n            <CompactCell\n                title=\"Cell with a faded background color\"\n                leftAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.article}\n                        size=\"medium\"\n                    />\n                }\n                href=\"https://khanacademy.org\"\n                horizontalRule=\"full-width\"\n                styles={{\n                    root: {\n                        background:\n                            semanticColor.core.background.overlay.default,\n                    },\n                }}\n            />\n        </View>\n        <View role=\"listitem\">\n            <CompactCell\n                title=\"Cell with a solid background color\"\n                leftAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.article}\n                        size=\"medium\"\n                    />\n                }\n                onClick={() => {}}\n                styles={{\n                    root: {\n                        background:\n                            semanticColor.core.background.warning.subtle,\n                    },\n                }}\n                horizontalRule=\"full-width\"\n            />\n        </View>\n    </View>\n);","description":"These are `CompactCell` instances with custom background colors. Note that we use the `style` prop to pass a custom style object to the cell. We recommend using a faded background color (third cell) to make the cell look as expected with different states (e.g. hover, focus, active). If you use a solid background color (last cell), the cell states will not change the background color. _NOTE:_ We use custom roles here to make sure that the cell focus ring is displayed correctly while using `View` elements as parent containers. We encourage using semantic HTML elements (e.g. `ul`, `li`) when possible (via `addStyle(\"ul\")` if you need to add Aphrodite Styles)."}],"import":"import { CompactCell, ComponentInfo, Strut } from \"@khanacademy/wonder-blocks-cell\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`CompactCell` is the simplest form of the Cell. It is a compacted-height Cell with limited subviews and accessories. Typically they represent additional info or selection lists. It has a minimum height of 48px and a non-bold title. It does not have subtitles or a progress bar, and in general it has less vertical space around text and accessories. ### Usage ```jsx import {CompactCell} from \"@khanacademy/wonder-blocks-cell\"; import {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\"; import caretRightIcon from \"@phosphor-icons/core/regular/caret-right.svg\"; <CompactCell title=\"Compact cell\" rightAccessory={<PhosphorIcon icon={caretRightIcon} size=\"medium\" />} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-cell/src/index.ts","description":"`CompactCell` is the simplest form of the Cell. It is a compacted-height Cell\nwith limited subviews and accessories. Typically they represent additional\ninfo or selection lists. It has a minimum height of 48px and a non-bold\ntitle. It does not have subtitles or a progress bar, and in general it has\nless vertical space around text and accessories.\n\n### Usage\n\n```jsx\nimport {CompactCell} from \"@khanacademy/wonder-blocks-cell\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport caretRightIcon from \"@phosphor-icons/core/regular/caret-right.svg\";\n\n<CompactCell\n title=\"Compact cell\"\n rightAccessory={<PhosphorIcon icon={caretRightIcon} size=\"medium\" />}\n/>\n```","displayName":"CompactCell","methods":[],"props":{"title":{"defaultValue":null,"description":"The title / main content of the cell. You can either provide a string or\na Typography component. If a string is provided, typography defaults to\n`BodyText` with a `medium` size.","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":true,"type":{"name":"TypographyText"}},"leftAccessory":{"defaultValue":null,"description":"If provided, this adds a left accessory to the cell. Left\nAccessories can be defined using WB components such as Icon,\nIconButton, or it can even be used for a custom node/component if\nneeded. What ever is passed in will occupy the \"LeftAccessory” area\nof the Cell.","name":"leftAccessory","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"rightAccessory":{"defaultValue":null,"description":"If provided, this adds a right accessory to the cell. Right\nAccessories can be defined using WB components such as Icon,\nIconButton, or it can even be used for a custom node/component if\nneeded. What ever is passed in will occupy the “RightAccessory”\narea of the Cell.","name":"rightAccessory","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"horizontalRule":{"defaultValue":null,"description":"Adds a horizontal rule at the bottom of the cell that can be used to\nseparate cells within groups such as lists. Defaults to `inset`.","name":"horizontalRule","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"HorizontalRuleVariant","value":[{"value":"\"none\""},{"value":"\"full-width\""},{"value":"\"inset\""}]}},"role":{"defaultValue":null,"description":"A custom role for the cell.","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"ClickableRole","value":[{"value":"\"link\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"button\""},{"value":"\"checkbox\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"option\""},{"value":"\"radio\""},{"value":"\"switch\""},{"value":"\"tab\""}]}},"styles":{"defaultValue":null,"description":"Custom styles for the elements of Cell. Useful if there are\nspecific cases where spacing between elements needs to be customized.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; content?: StyleType; leftAccessory?: StyleType; rightAccessory?: StyleType; }"}},"id":{"defaultValue":null,"description":"The unique identifier of the cell.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onClick":{"defaultValue":null,"description":"Called when the cell is clicked.\n\nIf not provided, the Cell can’t be hovered and/or pressed (highlighted on\nhover).","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: SyntheticEvent<Element, Event>) => unknown)"}},"active":{"defaultValue":null,"description":"Whether the cell is active (or currently selected).","name":"active","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Whether the cell is disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"aria-label":{"defaultValue":null,"description":"Used to announce the cell's content to screen readers.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-selected":{"defaultValue":null,"description":"Used to indicate the current element is selected.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Used to indicate the current item is checked.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"href":{"defaultValue":null,"description":"Optinal href which Cell should direct to, uses client-side routing\nby default if react-router is present.","name":"href","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"A target destination window for a link to open in. Should only be used\nwhen `href` is specified.\n\nTODO(WB-1262): only allow this prop when `href` is also set.t","name":"target","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"_blank\"","value":[{"value":"\"_blank\""}]}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}}},"exportName":"CompactCell"}},"packages-cell-detailcell":{"id":"packages-cell-detailcell","name":"DetailCell","path":"./__docs__/wonder-blocks-cell/detail-cell.stories.tsx","stories":[{"id":"packages-cell-detailcell--default-detail-cell","name":"Default Detail Cell","snippet":"const DefaultDetailCell = () => <DetailCell\n    title=\"Title for article item\"\n    subtitle1=\"Subtitle 1 for article item\"\n    subtitle2=\"Subtitle 2 for article item\"\n    leftAccessory={(<PhosphorIcon icon={IconMappings.playCircle} size=\"medium\" />)}\n    rightAccessory={<PhosphorIcon icon={IconMappings.caretRight} />} />;"},{"id":"packages-cell-detailcell--detail-cell-active","name":"Detail Cell Active","snippet":"const DetailCellActive = () => (\n    <DetailCell\n        title=\"Title for article item\"\n        subtitle1=\"Subtitle for article item\"\n        subtitle2=\"Subtitle for article item\"\n        leftAccessory={\n            <PhosphorIcon icon={IconMappings.playCircle} size=\"medium\" />\n        }\n        rightAccessory={\n            <PhosphorIcon icon={IconMappings.caretRightBold} size=\"small\" />\n        }\n        active={true}\n    />\n);","description":"For more complex scenarios where we need to use more content such as subtitles, we provide a DetailCell component that can be used to cover these cases. The following example shows how to include a subtitle and use the active state."},{"id":"packages-cell-detailcell--detail-cell-disabled","name":"Detail Cell Disabled","snippet":"const DetailCellDisabled = () => (\n    <DetailCell\n        title=\"Title for article item\"\n        subtitle1=\"Subtitle for article item\"\n        subtitle2=\"Subtitle for article item\"\n        leftAccessory={\n            <PhosphorIcon icon={IconMappings.playCircle} size=\"medium\" />\n        }\n        rightAccessory={\n            <PhosphorIcon icon={IconMappings.caretRightBold} size=\"small\" />\n        }\n        onClick={() => {}} // To show the disabled state, the cell needs to be clickable\n        disabled={true}\n    />\n);","description":"For more complex scenarios where we need to use more content such as subtitles, we provide a DetailCell component that can be used to cover these cases. The following example shows how to include a subtitle and use the active state."},{"id":"packages-cell-detailcell--detail-cell-with-custom-styles","name":"Detail Cell With Custom Styles","snippet":"const DetailCellWithCustomStyles = () => (\n    <DetailCell\n        title=\"Title for article item\"\n        leftAccessory={\n            <PhosphorIcon icon={IconMappings.caretLeftBold} size=\"small\" />\n        }\n        rightAccessory={\n            <PhosphorIcon icon={IconMappings.caretRightBold} size=\"small\" />\n        }\n        styles={{\n            root: {\n                textAlign: \"center\",\n                minHeight: 88,\n            },\n            content: {\n                alignSelf: \"flex-start\",\n            },\n            leftAccessory: {\n                alignSelf: \"flex-start\",\n            },\n            rightAccessory: {\n                alignSelf: \"flex-start\",\n            },\n        }}\n    />\n);","description":"`DetailCell` can be used with custom styles. The following parts can be styled: - `root`: Styles the root element - `content`: Styles the content area (between the accessories) - `leftAccessory`: Styles the left accessory element - `rightAccessory`: Styles the right accessory element"},{"id":"packages-cell-detailcell--clickable-detail-cell","name":"Clickable Detail Cell","snippet":"const ClickableDetailCell = () => (\n    <DetailCell\n        title=\"Title for article item\"\n        subtitle1=\"Subtitle for article item\"\n        subtitle2=\"Subtitle for article item\"\n        leftAccessory={\n            <PhosphorIcon icon={IconMappings.playCircle} size=\"medium\" />\n        }\n        rightAccessory={<PhosphorIcon icon={IconMappings.caretRight} />}\n        onClick={() => {}}\n        aria-label=\"Press to navigate to the article\"\n    />\n);","description":"Cell components can also also be clickable. This is done by passing a `onClick` prop to the component."},{"id":"packages-cell-detailcell--detail-cell-navigation","name":"Client-side navigation with DetailCell","snippet":"const DetailCellNavigation = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View>\n                <DetailCell\n                    title=\"Data\"\n                    subtitle2=\"Subtitle for article item\"\n                    leftAccessory={\n                        <PhosphorIcon\n                            icon={IconMappings.playCircle}\n                            size=\"medium\"\n                        />\n                    }\n                    rightAccessory={\n                        <PhosphorIcon icon={IconMappings.caretRight} />\n                    }\n                    href=\"/math/algebra\"\n                    aria-label=\"Press to navigate to the article\"\n                />\n                <DetailCell\n                    title=\"Geometry\"\n                    subtitle2=\"Subtitle for article item\"\n                    leftAccessory={\n                        <PhosphorIcon\n                            icon={IconMappings.playCircle}\n                            size=\"medium\"\n                        />\n                    }\n                    rightAccessory={\n                        <PhosphorIcon icon={IconMappings.caretRight} />\n                    }\n                    href=\"/math/geometry\"\n                    aria-label=\"Press to navigate to the article\"\n                    horizontalRule=\"none\"\n                />\n            </View>\n\n            <View style={styles.navigation}>\n                <Routes>\n                    <Route\n                        path=\"/math/algebra\"\n                        element={<View>Navigates to /math/algebra</View>}\n                    />\n                    <Route\n                        path=\"/math/geometry\"\n                        element={<View>Navigates to /math/geometry</View>}\n                    />\n                    <Route\n                        path=\"*\"\n                        element={<View>See navigation changes here</View>}\n                    />\n                </Routes>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);","description":"Cells accept an `href` prop to be able to navigate to a different URL. Note that this will use client-side navigation if the Cell component is within a React-Router environment."},{"id":"packages-cell-detailcell--detail-cells-as-list-items","name":"Detail Cells As List Items","snippet":"const DetailCellsAsListItems = () => (\n    <View role=\"list\">\n        <View role=\"listitem\">\n            <DetailCell\n                title=\"Active Cell\"\n                rightAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.caretRight}\n                        size=\"medium\"\n                    />\n                }\n                active={true}\n                href=\"https://khanacademy.org\"\n                horizontalRule=\"full-width\"\n            />\n        </View>\n        <View role=\"listitem\">\n            <DetailCell\n                title=\"Cell with default bg color\"\n                rightAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.caretRight}\n                        size=\"medium\"\n                    />\n                }\n                href=\"https://khanacademy.org\"\n                horizontalRule=\"full-width\"\n            />\n        </View>\n        <View role=\"listitem\">\n            <DetailCell\n                title=\"Disabled Cell\"\n                rightAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.caretRight}\n                        size=\"medium\"\n                    />\n                }\n                disabled={true}\n                href=\"https://khanacademy.org\"\n                horizontalRule=\"full-width\"\n            />\n        </View>\n        <View role=\"listitem\">\n            <DetailCell\n                title=\"Cell with a faded background color\"\n                rightAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.caretRight}\n                        size=\"medium\"\n                    />\n                }\n                href=\"https://khanacademy.org\"\n                horizontalRule=\"full-width\"\n                styles={{\n                    root: {\n                        background:\n                            semanticColor.core.background.overlay.default,\n                    },\n                }}\n            />\n        </View>\n        <View role=\"listitem\">\n            <DetailCell\n                title=\"Cell with a solid background color\"\n                rightAccessory={\n                    <PhosphorIcon\n                        icon={IconMappings.caretRight}\n                        size=\"medium\"\n                    />\n                }\n                onClick={() => {}}\n                styles={{\n                    root: {\n                        background:\n                            semanticColor.core.background.warning.subtle,\n                    },\n                }}\n                horizontalRule=\"full-width\"\n            />\n        </View>\n    </View>\n);","description":"These are `DetailCell` instances with custom background colors. Note that we use the `style` prop to pass a custom style object to the cell. We recommend using a faded background color (third cell) to make the cell look as expected with different states (e.g. hover, focus, active). If you use a solid background color (last cell), the cell states will not change the background color. _NOTE:_ We use custom roles here to make sure that the cell focus ring is displayed correctly while using `View` elements as parent containers. We encourage using semantic HTML elements (e.g. `ul`, `li`) when possible (via `addStyle(\"ul\")` if you need to add Aphrodite Styles)."},{"id":"packages-cell-detailcell--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => <DetailCell\n    title=\"Title for article item\"\n    subtitle1=\"Subtitle for article item\"\n    subtitle2=\"Subtitle for article item\"\n    leftAccessory={(<PhosphorIcon icon={IconMappings.playCircle} size=\"medium\" />)}\n    rightAccessory={(<PhosphorIcon icon={IconMappings.checkCircleFill} size=\"medium\" />)} />;","description":"Custom styling can be applied to the component using the `styles` prop."}],"import":"import { CompatRouter, Route, Routes } from \"react-router-dom-v5-compat\";\nimport { ComponentInfo, DetailCell } from \"@khanacademy/wonder-blocks-cell\";\nimport { MemoryRouter } from \"react-router-dom\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"This is a variant of CompactCell that allows adding subtitles, before and after the cell title. They typically represent an item that can be clicked/tapped to view more complex details. They vary in height depending on the presence or absence of subtitles, and they allow for a wide range of functionality depending on which accessories are active. ### Usage ```jsx import {DetailCell} from \"@khanacademy/wonder-blocks-cell\"; import {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\"; <DetailCell leftAccessory={<PhosphorIcon icon={contentVideo} size=\"medium\" />} subtitle1=\"Subtitle 1\" title=\"Detail cell\" subtitle1=\"Subtitle 2\" rightAccessory={<PhosphorIcon icon={caretRight} size=\"medium\" />} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-cell/src/index.ts","description":"This is a variant of CompactCell that allows adding subtitles, before and\nafter the cell title. They typically represent an item that can be\nclicked/tapped to view more complex details. They vary in height depending on\nthe presence or absence of subtitles, and they allow for a wide range of\nfunctionality depending on which accessories are active.\n\n### Usage\n\n```jsx\nimport {DetailCell} from \"@khanacademy/wonder-blocks-cell\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\n\n<DetailCell\n leftAccessory={<PhosphorIcon icon={contentVideo} size=\"medium\" />}\n subtitle1=\"Subtitle 1\"\n title=\"Detail cell\"\n subtitle1=\"Subtitle 2\"\n rightAccessory={<PhosphorIcon icon={caretRight} size=\"medium\" />}\n/>\n```","displayName":"DetailCell","methods":[],"props":{"title":{"defaultValue":null,"description":"The title / main content of the cell. You can either provide a string or\na Typography component. If a string is provided, typography defaults to\n`BodyText` with a `medium` size.","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":true,"type":{"name":"TypographyText"}},"leftAccessory":{"defaultValue":null,"description":"If provided, this adds a left accessory to the cell. Left\nAccessories can be defined using WB components such as Icon,\nIconButton, or it can even be used for a custom node/component if\nneeded. What ever is passed in will occupy the \"LeftAccessory” area\nof the Cell.","name":"leftAccessory","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"rightAccessory":{"defaultValue":null,"description":"If provided, this adds a right accessory to the cell. Right\nAccessories can be defined using WB components such as Icon,\nIconButton, or it can even be used for a custom node/component if\nneeded. What ever is passed in will occupy the “RightAccessory”\narea of the Cell.","name":"rightAccessory","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"horizontalRule":{"defaultValue":null,"description":"Adds a horizontal rule at the bottom of the cell that can be used to\nseparate cells within groups such as lists. Defaults to `inset`.","name":"horizontalRule","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"HorizontalRuleVariant","value":[{"value":"\"none\""},{"value":"\"full-width\""},{"value":"\"inset\""}]}},"role":{"defaultValue":null,"description":"A custom role for the cell.","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"ClickableRole","value":[{"value":"\"link\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"button\""},{"value":"\"checkbox\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"option\""},{"value":"\"radio\""},{"value":"\"switch\""},{"value":"\"tab\""}]}},"styles":{"defaultValue":null,"description":"Custom styles for the elements of Cell. Useful if there are\nspecific cases where spacing between elements needs to be customized.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; content?: StyleType; leftAccessory?: StyleType; rightAccessory?: StyleType; }"}},"id":{"defaultValue":null,"description":"The unique identifier of the cell.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onClick":{"defaultValue":null,"description":"Called when the cell is clicked.\n\nIf not provided, the Cell can’t be hovered and/or pressed (highlighted on\nhover).","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: SyntheticEvent<Element, Event>) => unknown)"}},"active":{"defaultValue":null,"description":"Whether the cell is active (or currently selected).","name":"active","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Whether the cell is disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"aria-label":{"defaultValue":null,"description":"Used to announce the cell's content to screen readers.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-selected":{"defaultValue":null,"description":"Used to indicate the current element is selected.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Used to indicate the current item is checked.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"href":{"defaultValue":null,"description":"Optinal href which Cell should direct to, uses client-side routing\nby default if react-router is present.","name":"href","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"A target destination window for a link to open in. Should only be used\nwhen `href` is specified.\n\nTODO(WB-1262): only allow this prop when `href` is also set.t","name":"target","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"_blank\"","value":[{"value":"\"_blank\""}]}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"subtitle1":{"defaultValue":null,"description":"You can either provide a string or a custom node Typography element (or\nnothing at all). Both a string or a custom node Typography element will\noccupy the “Subtitle1” area of the Cell.","name":"subtitle1","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/components/detail-cell.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"TypographyText"}},"subtitle2":{"defaultValue":null,"description":"You can either provide a string or a custom node Typography element (or\nnothing at all). Both a string or a custom node Typography element will\noccupy the “Subtitle2” area of the Cell.","name":"subtitle2","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-cell/src/components/detail-cell.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"TypographyText"}}},"exportName":"DetailCell"}},"packages-clickable-clickable-accessibility":{"id":"packages-clickable-clickable-accessibility","name":"Clickable","path":"./__docs__/wonder-blocks-clickable/accessibility.stories.tsx","stories":[{"id":"packages-clickable-clickable-accessibility--labeling","name":"Labeling","snippet":"const Labeling = () => (\n    <View>\n        <Clickable\n            onClick={() => {}}\n            aria-label=\"More information about this subject\"\n        >\n            {() => <PhosphorIcon icon={IconMappings.info} />}\n        </Clickable>\n    </View>\n);"},{"id":"packages-clickable-clickable-accessibility--disabled-state","name":"Disabled state","snippet":"const DisabledState = () => (\n    <Clickable\n        // eslint-disable-next-line no-console\n        onClick={(e) => console.log(\"Hello, world!\")}\n        disabled={true}\n    >\n        {() => \"This is a disabled clickable element\"}\n    </Clickable>\n);"},{"id":"packages-clickable-clickable-accessibility--keyboard-navigation","name":"Keyboard navigation","snippet":"const KeyboardNavigation = () => (\n    <View>\n        <Clickable\n            role=\"button\"\n            aria-expanded=\"false\" // Example shows aria attributes can be set\n            id=\"button-1\"\n            style={styles.tabButton}\n        >\n            {({hovered, focused, pressed}) => (\n                <View\n                    style={[\n                        styles.rest,\n                        hovered && styles.hover,\n                        focused && styles.focus,\n                        pressed && styles.press,\n                    ]}\n                >\n                    <BodyText tag=\"span\">School Info</BodyText>\n                </View>\n            )}\n        </Clickable>\n    </View>\n);"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Clickable from \"@khanacademy/wonder-blocks-clickable\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Clickable\" component.\n  45 | });\n  46 |\n> 47 | export default {\n     | ^\n  48 |     title: \"Packages / Clickable / Clickable / Accessibility\",\n  49 |     component: Clickable,\n  50 |     parameters: {\n\n./__docs__/wonder-blocks-clickable/accessibility.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\n\nimport Clickable from \"@khanacademy/wonder-blocks-clickable\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport {\n    boxShadow,\n    semanticColor,\n    sizing,\n} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {IconMappings} from \"../wonder-blocks-icon/phosphor-icon.argtypes\";\n\nconst actionCategory = semanticColor.action.secondary.progressive;\n\nconst styles = StyleSheet.create({\n    rest: {\n        border: `1px solid ${actionCategory.default.border}`,\n        padding: sizing.size_080,\n    },\n    hover: {\n        textDecoration: \"underline\",\n        borderColor: actionCategory.hover.border,\n        backgroundColor: actionCategory.hover.background,\n        color: actionCategory.hover.foreground,\n    },\n    press: {\n        background: actionCategory.press.background,\n        borderColor: actionCategory.press.border,\n        color: actionCategory.press.foreground,\n    },\n    focus: {\n        outline: `solid 1px ${semanticColor.focus.outer}`,\n        outlineOffset: sizing.size_020,\n    },\n    panel: {\n        padding: sizing.size_160,\n        boxShadow: boxShadow.mid,\n    },\n    tabButton: {\n        width: \"100%\",\n    },\n});\n\nexport default {\n    title: \"Packages / Clickable / Clickable / Accessibility\",\n    component: Clickable,\n    parameters: {\n        // Disables chromatic testing for these stories.\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n    // Include these stories in the Docs tab, but hide them from the sidebar.\n    tags: [\"autodocs\", \"!dev\"],\n};\n\nexport const Labeling = {\n    render: () => (\n        <View>\n            <Clickable\n                onClick={() => {}}\n                aria-label=\"More information about this subject\"\n            >\n                {() => <PhosphorIcon icon={IconMappings.info} />}\n            </Clickable>\n        </View>\n    ),\n};\n\nexport const DisabledState = {\n    render: () => (\n        <Clickable\n            // eslint-disable-next-line no-console\n            onClick={(e) => console.log(\"Hello, world!\")}\n            disabled={true}\n        >\n            {() => \"This is a disabled clickable element\"}\n        </Clickable>\n    ),\n\n    name: \"Disabled state\",\n};\n\nexport const KeyboardNavigation = {\n    render: () => (\n        <View>\n            <Clickable\n                role=\"button\"\n                aria-expanded=\"false\" // Example shows aria attributes can be set\n                id=\"button-1\"\n                style={styles.tabButton}\n            >\n                {({hovered, focused, pressed}) => (\n                    <View\n                        style={[\n                            styles.rest,\n                            hovered && styles.hover,\n                            focused && styles.focus,\n                            pressed && styles.press,\n                        ]}\n                    >\n                        <BodyText tag=\"span\">School Info</BodyText>\n                    </View>\n                )}\n            </Clickable>\n        </View>\n    ),\n\n    name: \"Keyboard navigation\",\n};\n"},"docs":{"packages-clickable-clickable-accessibility--docs":{"id":"packages-clickable-clickable-accessibility--docs","name":"Docs","path":"./__docs__/wonder-blocks-clickable/accessibility.mdx","title":"Packages / Clickable / Clickable / Accessibility","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as AccessibilityStories from './accessibility.stories';\n\n<Meta of={AccessibilityStories} />\n\n# Accessibility\n\n## Keyboard interactions\n\n| Key            | Action                          |\n| -------------- | ------------------------------- |\n| Enter or Space | Activates the clickable element |\n\n## Roles\n\n| Component                                         | Role   | Usage                                                    |\n| ------------------------------------------------- | ------ | -------------------------------------------------------- |\n| `<Clickable onClick={} />`                        | button | A clickable button element                               |\n| `<Clickable href=\"/math\" skipClientNav={true} />` | link   | A clickable anchor element                               |\n| `<Clickable href=\"/math\" />`                      | link   | A clickable anchor element (using `react-router`'s Link) |\n\n## Attributes\n\n| Attribute            | Usage                                                                                                                                                    |\n| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| tabindex=\"0\"         | Includes the clickable element in the tab sequence.                                                                                                      |\n| aria-disabled=\"true\" | Indicates that the element is perceivable but disabled.                                                                                                  |\n| aria-label=\"value\"   | Defines a string value that labels the clickable element. Use it in case the clickable element doesn't include any descriptive text (e.g. Icons, images) |\n\n## Examples\n\n### Labeling\n\n`Clickable` has an `ariaLabel` prop that sets the component's accessible name.\nariaLabel should be passed when using graphical elements to let screen reader\nusers know the purpose of the clickable element.\n\n*NOTE:* If the clickable element is not graphical, it's best to avoid using `ariaLabel` as the text content of the element itself, which is read by default, should ideally be descriptive enough to not need to manually pass in the label.\n\nThis is an example of a component with an accessible label:\n\n<Canvas of={AccessibilityStories.Labeling} />\n\n### Disabled state\n\nClickable does not need an `aria-disabled` attribute, if it also has a\n`disabled` component prop. We internally take care of defining the behavior so\nusers can use these type of controls (including Screen Readers). By defining the\ninternal behavior we can ensure that the component is accessible via Keyboard\nbut not interactable/operatable.\n\n<Canvas of={AccessibilityStories.DisabledState} />\n\n### Keyboard navigation\n\nClickable adds support to keyboard navigation and setting ARIA attributes. This\nway, your components are accessible and emulate better the browser's behavior.\n\n**NOTE:** If you want to navigate to an external URL and/or reload the window,\nmake sure to use `href` and `skipClientNav={true}`.\n\n<Canvas of={AccessibilityStories.KeyboardNavigation} />\n"}}},"packages-clickable-clickablebehavior":{"id":"packages-clickable-clickablebehavior","name":"ClickableBehavior as unknown","path":"./__docs__/wonder-blocks-clickable/clickable-behavior.stories.tsx","stories":[{"id":"packages-clickable-clickablebehavior--default","name":"Default","snippet":"const Default = () => {\n    const ClickableBehavior = getClickableBehavior();\n\n    return (\n        <ClickableBehavior role=\"button\" disabled={false}>\n            {(state, childrenProps) => {\n                const {pressed, hovered, focused} = state;\n                return (\n                    <View\n                        style={[\n                            styles.clickable,\n                            hovered && styles.hover,\n                            focused && styles.focus,\n                            pressed && styles.press,\n                        ]}\n                        {...childrenProps}\n                    >\n                        This is an element wrapped with ClickableBehavior\n                    </View>\n                );\n            }}\n        </ClickableBehavior>\n    );\n};"},{"id":"packages-clickable-clickablebehavior--with-tab-index","name":"With Tab Index","snippet":"const WithTabIndex = () => {\n    const ClickableBehavior = getClickableBehavior();\n\n    return (\n        <ClickableBehavior role=\"button\" tabIndex={0}>\n            {(state, childrenProps) => {\n                const {pressed, hovered, focused} = state;\n                return (\n                    <View\n                        style={[\n                            styles.clickable,\n                            hovered && styles.hover,\n                            focused && styles.focus,\n                            pressed && styles.press,\n                        ]}\n                        {...childrenProps}\n                    >\n                        This is an element wrapped with ClickableBehavior\n                    </View>\n                );\n            }}\n        </ClickableBehavior>\n    );\n};"}],"import":"import { ComponentInfo } from \"wonder-blocks\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"ClickableBehavior as unknown\" component.\n  14 | const ClickableBehavior = getClickableBehavior();\n  15 |\n> 16 | export default {\n     | ^\n  17 |     title: \"Packages / Clickable / ClickableBehavior\",\n  18 |     component: ClickableBehavior as unknown,\n  19 |     argTypes: argTypes,\n\n./__docs__/wonder-blocks-clickable/clickable-behavior.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\n\nimport {getClickableBehavior} from \"@khanacademy/wonder-blocks-clickable\";\nimport packageConfig from \"../../packages/wonder-blocks-clickable/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport argTypes from \"./clickable-behavior.argtypes\";\n\nconst ClickableBehavior = getClickableBehavior();\n\nexport default {\n    title: \"Packages / Clickable / ClickableBehavior\",\n    component: ClickableBehavior as unknown,\n    argTypes: argTypes,\n    args: {\n        disabled: false,\n    },\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            description: {\n                component: null,\n            },\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n    },\n} as Meta<typeof ClickableBehavior>;\n\ntype StoryComponentType = StoryObj<typeof ClickableBehavior>;\n\nexport const Default: StoryComponentType = (args: any) => {\n    const ClickableBehavior = getClickableBehavior();\n\n    return (\n        <ClickableBehavior role=\"button\" {...args}>\n            {(state, childrenProps) => {\n                const {pressed, hovered, focused} = state;\n                return (\n                    <View\n                        style={[\n                            styles.clickable,\n                            hovered && styles.hover,\n                            focused && styles.focus,\n                            pressed && styles.press,\n                        ]}\n                        {...childrenProps}\n                    >\n                        This is an element wrapped with ClickableBehavior\n                    </View>\n                );\n            }}\n        </ClickableBehavior>\n    );\n};\n\nDefault.parameters = {\n    chromatic: {\n        // we don't need screenshots because this story only displays the\n        // resting/default state.\n        disableSnapshot: true,\n    },\n};\n\nexport const WithTabIndex: StoryComponentType = () => {\n    const ClickableBehavior = getClickableBehavior();\n\n    return (\n        <ClickableBehavior role=\"button\" tabIndex={0}>\n            {(state, childrenProps) => {\n                const {pressed, hovered, focused} = state;\n                return (\n                    <View\n                        style={[\n                            styles.clickable,\n                            hovered && styles.hover,\n                            focused && styles.focus,\n                            pressed && styles.press,\n                        ]}\n                        {...childrenProps}\n                    >\n                        This is an element wrapped with ClickableBehavior\n                    </View>\n                );\n            }}\n        </ClickableBehavior>\n    );\n};\n\nWithTabIndex.parameters = {\n    chromatic: {\n        // we don't need screenshots because this story only displays the\n        // resting/default state.\n        disableSnapshot: true,\n    },\n    docs: {\n        description: {\n            story: `A \\`<ClickableBehavior>\\` element does not have\n            a tabIndex by default, as many elements it could wrap may have\n            their own built in tabIndex attribute, such as buttons. If this\n            is not the case, a tabIndex should be passed in using the\n            \\`tabIndex\\` prop.`,\n        },\n    },\n};\n\nconst actionCategory = semanticColor.action.secondary.progressive;\n\nconst styles = StyleSheet.create({\n    clickable: {\n        cursor: \"pointer\",\n        padding: sizing.size_160,\n        textAlign: \"center\",\n    },\n    hover: {\n        textDecoration: \"underline\",\n        backgroundColor: actionCategory.hover.background,\n        color: actionCategory.hover.foreground,\n    },\n    press: {\n        backgroundColor: actionCategory.press.background,\n    },\n    focus: {\n        outline: `solid 1px ${semanticColor.focus.outer}`,\n        outlineOffset: sizing.size_020,\n    },\n});\n"}},"packages-clickable-clickable":{"id":"packages-clickable-clickable","name":"Clickable","path":"./__docs__/wonder-blocks-clickable/clickable.stories.tsx","stories":[{"id":"packages-clickable-clickable--default","name":"Default","snippet":"const Default = () => <Clickable\n    testId=\"\"\n    disabled={false}\n    hideDefaultFocusRing={false}\n    onClick={() => {\n        // eslint-disable-next-line no-alert\n        alert(\"Click!\");\n    }}>\n    {({hovered, pressed, focused}) => (\n        <View\n            style={[\n                styles.clickable,\n                hovered && styles.hovered,\n                pressed && styles.pressed,\n                focused && styles.focused,\n            ]}\n        >\n            <BodyText tag=\"span\">This text is clickable!</BodyText>\n        </View>\n    )}\n</Clickable>;"},{"id":"packages-clickable-clickable--basic","name":"Basic","snippet":"const Basic = () => (\n    <View style={styles.centerText}>\n        <Clickable\n            href=\"https://www.khanacademy.org/about/tos\"\n            skipClientNav={true}\n        >\n            {({hovered, pressed}) => (\n                <View\n                    style={[\n                        hovered && styles.hovered,\n                        pressed && styles.pressed,\n                    ]}\n                >\n                    <BodyText tag=\"span\">This text is clickable!</BodyText>\n                </View>\n            )}\n        </Clickable>\n    </View>\n);"},{"id":"packages-clickable-clickable--disabled","name":"Disabled","snippet":"const Disabled = () => <>\n    <Clickable onClick={() => {}} testId=\"\" disabled hideDefaultFocusRing={false}>\n        {({hovered, pressed}) => (\n            <View\n                style={[\n                    styles.clickable,\n                    hovered && styles.hovered,\n                    pressed && styles.pressed,\n                ]}\n            >\n                <BodyText tag=\"span\">\n                    Disabled clickable using the default disabled style\n                </BodyText>\n            </View>\n        )}\n    </Clickable>\n    <Clickable onClick={() => {}} testId=\"\" disabled hideDefaultFocusRing={false}>\n        {({hovered, focused, pressed}) => (\n            <View\n                style={[\n                    styles.clickable,\n                    hovered && styles.hovered,\n                    pressed && styles.pressed,\n                    args.disabled && styles.disabled,\n                ]}\n            >\n                <BodyText tag=\"span\">\n                    Disabled clickable passing custom disabled styles\n                </BodyText>\n            </View>\n        )}\n    </Clickable>\n</>;","description":"Disabled state"},{"id":"packages-clickable-clickable--client-side-navigation","name":"Client-side Navigation","snippet":"const ClientSideNavigation = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View>\n                <View style={styles.row}>\n                    <Clickable\n                        href=\"/foo\"\n                        style={styles.heading}\n                        onClick={() => {\n                            // eslint-disable-next-line no-console\n                            console.log(\"I'm still on the same page!\");\n                        }}\n                    >\n                        {(eventState) => (\n                            <BodyText tag=\"span\" weight=\"bold\">\n                                Uses Client-side Nav\n                            </BodyText>\n                        )}\n                    </Clickable>\n                    <Clickable\n                        href=\"/iframe.html?id=clickable-clickable--default&viewMode=story\"\n                        style={styles.heading}\n                        skipClientNav\n                    >\n                        {(eventState) => (\n                            <BodyText tag=\"span\" weight=\"bold\">\n                                Avoids Client-side Nav\n                            </BodyText>\n                        )}\n                    </Clickable>\n                </View>\n                <View style={styles.navigation}>\n                    <Routes>\n                        <Route\n                            path=\"/foo\"\n                            element={\n                                <View id=\"foo\">\n                                    The first clickable element does client-side\n                                    navigation here.\n                                </View>\n                            }\n                        />\n                        <Route\n                            path=\"*\"\n                            element={<View>See navigation changes here</View>}\n                        />\n                    </Routes>\n                </View>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);"},{"id":"packages-clickable-clickable--ref","name":"Ref","snippet":"const Ref = () => {\n    const clickableRef: React.RefObject<HTMLAnchorElement> = React.createRef();\n    const handleSubmit = () => {\n        if (clickableRef.current) {\n            clickableRef.current.focus();\n        }\n    };\n\n    return (\n        <View style={[styles.centerText, styles.centered]}>\n            <Clickable ref={clickableRef}>\n                {({hovered, focused, pressed}) => (\n                    <View\n                        style={[\n                            hovered && styles.hovered,\n                            pressed && styles.pressed,\n                            focused && styles.focused,\n                        ]}\n                    >\n                        <BodyText tag=\"span\">Press below to focus me!</BodyText>\n                    </View>\n                )}\n            </Clickable>\n            <Button style={styles.button} onClick={handleSubmit}>\n                Focus\n            </Button>\n        </View>\n    );\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport Clickable, { ComponentInfo } from \"@khanacademy/wonder-blocks-clickable\";\nimport { CompatRouter, Route, Routes } from \"react-router-dom-v5-compat\";\nimport { MemoryRouter } from \"react-router-dom\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Clickable\" component.\n  16 | import Button from \"@khanacademy/wonder-blocks-button\";\n  17 |\n> 18 | export default {\n     | ^\n  19 |     title: \"Packages / Clickable / Clickable\",\n  20 |     component: Clickable,\n  21 |     argTypes: argTypes,\n\n./__docs__/wonder-blocks-clickable/clickable.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport {MemoryRouter} from \"react-router-dom\";\nimport {CompatRouter, Route, Routes} from \"react-router-dom-v5-compat\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport Clickable from \"@khanacademy/wonder-blocks-clickable\";\nimport packageConfig from \"../../packages/wonder-blocks-clickable/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport argTypes from \"./clickable.argtypes\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\n\nexport default {\n    title: \"Packages / Clickable / Clickable\",\n    component: Clickable,\n    argTypes: argTypes,\n    args: {\n        testId: \"\",\n        disabled: false,\n        hideDefaultFocusRing: false,\n    },\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.centerText}>\n                <Story />\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            description: {\n                component: null,\n            },\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n    },\n} as Meta<typeof Clickable>;\n\ntype StoryComponentType = StoryObj<typeof Clickable>;\n\nexport const Default: StoryComponentType = (args: any) => (\n    <Clickable {...args}>\n        {({hovered, pressed, focused}) => (\n            <View\n                style={[\n                    styles.clickable,\n                    hovered && styles.hovered,\n                    pressed && styles.pressed,\n                    focused && styles.focused,\n                ]}\n            >\n                <BodyText tag=\"span\">This text is clickable!</BodyText>\n            </View>\n        )}\n    </Clickable>\n);\n\nDefault.args = {\n    onClick: () => {\n        // eslint-disable-next-line no-alert\n        alert(\"Click!\");\n    },\n};\n\nexport const Basic: StoryComponentType = () => (\n    <View style={styles.centerText}>\n        <Clickable\n            href=\"https://www.khanacademy.org/about/tos\"\n            skipClientNav={true}\n        >\n            {({hovered, pressed}) => (\n                <View\n                    style={[\n                        hovered && styles.hovered,\n                        pressed && styles.pressed,\n                    ]}\n                >\n                    <BodyText tag=\"span\">This text is clickable!</BodyText>\n                </View>\n            )}\n        </Clickable>\n    </View>\n);\n\nBasic.parameters = {\n    docs: {\n        description: {\n            story: \"You can make custom components Clickable by returning them in a function of the Clickable child. The eventState parameter the function takes allows access to states pressed, hovered and clicked, which you may use to create custom styles.\\n\\nClickable has a default focus ring style built-in.  If you are creating your own custom focus ring it should be disabled using by setting `hideDefaultFocusRing={true}` in the props passed to `Clickable`.\",\n        },\n    },\n    chromatic: {\n        // we don't need screenshots because this story is already covered in\n        // `Default`. We add this story to the `Docs` tab to present the\n        // description above along with the example.\n        disableSnapshot: true,\n    },\n};\n\n/**\n * Disabled state\n */\nexport const Disabled: StoryComponentType = (args: any) => (\n    <>\n        <Clickable onClick={() => {}} {...args}>\n            {({hovered, pressed}) => (\n                <View\n                    style={[\n                        styles.clickable,\n                        hovered && styles.hovered,\n                        pressed && styles.pressed,\n                    ]}\n                >\n                    <BodyText tag=\"span\">\n                        Disabled clickable using the default disabled style\n                    </BodyText>\n                </View>\n            )}\n        </Clickable>\n        <Clickable onClick={() => {}} {...args}>\n            {({hovered, focused, pressed}) => (\n                <View\n                    style={[\n                        styles.clickable,\n                        hovered && styles.hovered,\n                        pressed && styles.pressed,\n                        args.disabled && styles.disabled,\n                    ]}\n                >\n                    <BodyText tag=\"span\">\n                        Disabled clickable passing custom disabled styles\n                    </BodyText>\n                </View>\n            )}\n        </Clickable>\n    </>\n);\n\nDisabled.args = {\n    disabled: true,\n};\n\nDisabled.parameters = {\n    docs: {\n        description: {\n            story: \"Clickable has a `disabled` prop which prevents the element from being operable. Note that the default disabled style is applied to the element, but you can also pass custom styles to the children element by passing any `disabled` styles (see the second clickable element in the example below).\",\n        },\n    },\n};\n\nexport const ClientSideNavigation: StoryComponentType = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View>\n                <View style={styles.row}>\n                    <Clickable\n                        href=\"/foo\"\n                        style={styles.heading}\n                        onClick={() => {\n                            // eslint-disable-next-line no-console\n                            console.log(\"I'm still on the same page!\");\n                        }}\n                    >\n                        {(eventState) => (\n                            <BodyText tag=\"span\" weight=\"bold\">\n                                Uses Client-side Nav\n                            </BodyText>\n                        )}\n                    </Clickable>\n                    <Clickable\n                        href=\"/iframe.html?id=clickable-clickable--default&viewMode=story\"\n                        style={styles.heading}\n                        skipClientNav\n                    >\n                        {(eventState) => (\n                            <BodyText tag=\"span\" weight=\"bold\">\n                                Avoids Client-side Nav\n                            </BodyText>\n                        )}\n                    </Clickable>\n                </View>\n                <View style={styles.navigation}>\n                    <Routes>\n                        <Route\n                            path=\"/foo\"\n                            element={\n                                <View id=\"foo\">\n                                    The first clickable element does client-side\n                                    navigation here.\n                                </View>\n                            }\n                        />\n                        <Route\n                            path=\"*\"\n                            element={<View>See navigation changes here</View>}\n                        />\n                    </Routes>\n                </View>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);\n\nClientSideNavigation.storyName = \"Client-side Navigation\";\n\nClientSideNavigation.parameters = {\n    docs: {\n        description: {\n            story:\n                \"Clickable adds support to keyboard navigation. This way, your components are accessible and emulate better the browser's behavior.\\n\\n\" +\n                \"**NOTE:** If you want to navigate to an external URL and/or reload the window, make sure to use `href` and `skipClientNav={true}`\",\n        },\n    },\n    chromatic: {\n        // we don't need screenshots because this story only tests behavior.\n        disableSnapshot: true,\n    },\n};\n\nexport const Ref: StoryComponentType = () => {\n    const clickableRef: React.RefObject<HTMLAnchorElement> = React.createRef();\n    const handleSubmit = () => {\n        if (clickableRef.current) {\n            clickableRef.current.focus();\n        }\n    };\n\n    return (\n        <View style={[styles.centerText, styles.centered]}>\n            <Clickable ref={clickableRef}>\n                {({hovered, focused, pressed}) => (\n                    <View\n                        style={[\n                            hovered && styles.hovered,\n                            pressed && styles.pressed,\n                            focused && styles.focused,\n                        ]}\n                    >\n                        <BodyText tag=\"span\">Press below to focus me!</BodyText>\n                    </View>\n                )}\n            </Clickable>\n            <Button style={styles.button} onClick={handleSubmit}>\n                Focus\n            </Button>\n        </View>\n    );\n};\n\nRef.parameters = {\n    docs: {\n        description: {\n            story: `If you need to save a reference to the \\`Clickable\\` element , you can do\n        so using the \\`ref\\` prop. In this example, we want the element to receive focus when the\n        button is pressed. We can do this by creating a React ref of type \\`HTMLButtonElement\\` and\n        passing it into \\`Clickable\\`'s \\`ref\\` prop. Now we can use the ref variable in the\n        \\`handleSubmit\\` function to shift focus to the field.`,\n        },\n    },\n    chromatic: {\n        // we don't need screenshots because this story only tests behavior.\n        disableSnapshot: true,\n    },\n};\n\nconst progressive = semanticColor.action.secondary.progressive;\n\nconst styles = StyleSheet.create({\n    clickable: {\n        borderWidth: 1,\n        padding: sizing.size_160,\n    },\n    hovered: {\n        textDecoration: \"underline\",\n        backgroundColor: progressive.hover.background,\n    },\n    pressed: {\n        color: progressive.press.foreground,\n    },\n    focused: {\n        outline: `solid 4px ${semanticColor.focus.outer}`,\n    },\n    centerText: {\n        gap: sizing.size_160,\n        textAlign: \"center\",\n    },\n    dark: {\n        backgroundColor: semanticColor.core.background.neutral.strong,\n        color: semanticColor.core.foreground.knockout.default,\n        padding: sizing.size_080,\n    },\n    row: {\n        flexDirection: \"row\",\n        alignItems: \"center\",\n    },\n    heading: {\n        marginInlineEnd: sizing.size_240,\n    },\n    navigation: {\n        border: `1px dashed ${semanticColor.core.border.neutral.subtle}`,\n        marginBlockStart: sizing.size_240,\n        padding: sizing.size_240,\n    },\n    disabled: {\n        color: semanticColor.action.primary.disabled.foreground,\n        backgroundColor: semanticColor.action.primary.disabled.background,\n    },\n    button: {\n        maxInlineSize: 150,\n    },\n    centered: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n});\n"}},"packages-core-addstyle":{"id":"packages-core-addstyle","name":"addStyle","path":"./__docs__/wonder-blocks-core/add-style.stories.tsx","stories":[{"id":"packages-core-addstyle--with-default-style","name":"With default style","snippet":"const WithDefaultStyle = () => (\n    <StyledInput type=\"text\" placeholder=\"This is a styled input\" />\n);"},{"id":"packages-core-addstyle--override-styles","name":"Override styles","snippet":"const OverrideStyles = () => (\n    <StyledInput\n        style={styles.error}\n        type=\"text\"\n        placeholder=\"With an error style\"\n    />\n);"},{"id":"packages-core-addstyle--adding-styles-dynamically","name":"Adding styles dynamically","snippet":"const AddingStylesDynamically = () => <DynamicStyledInput />;"}],"import":"import { Checkbox } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n  41 | };\n  42 |\n> 43 | export default {\n     | ^\n  44 |     title: \"Packages / Core / addStyle\",\n  45 | };\n  46 |\n\n./__docs__/wonder-blocks-core/add-style.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\n\nimport {border, semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {addStyle, View} from \"@khanacademy/wonder-blocks-core\";\nimport {Checkbox} from \"@khanacademy/wonder-blocks-form\";\n\nconst styles = StyleSheet.create({\n    input: {\n        // default style for all instances of StyledInput\n        background: semanticColor.core.background.base.default,\n        border: `1px solid ${semanticColor.core.border.neutral.subtle}`,\n        borderRadius: border.radius.radius_040,\n        fontSize: sizing.size_160,\n        padding: sizing.size_080,\n    },\n    error: {\n        background: semanticColor.core.background.critical.subtle,\n        borderColor: semanticColor.core.border.critical.default,\n    },\n});\n\nconst StyledInput = addStyle(\"input\", styles.input);\n\nconst DynamicStyledInput = () => {\n    const [error, setError] = React.useState(false);\n    return (\n        <View>\n            <Checkbox\n                label=\"Click here to add the error style to the input\"\n                checked={error}\n                onChange={() => setError(!error)}\n            />\n            <StyledInput\n                style={[styles.input, error && styles.error]}\n                type=\"text\"\n                placeholder=\"Lorem ipsum\"\n            />\n        </View>\n    );\n};\n\nexport default {\n    title: \"Packages / Core / addStyle\",\n};\n\nexport const WithDefaultStyle = {\n    render: () => (\n        <StyledInput type=\"text\" placeholder=\"This is a styled input\" />\n    ),\n    name: \"With default style\",\n};\n\nexport const OverrideStyles = {\n    render: () => (\n        <StyledInput\n            style={styles.error}\n            type=\"text\"\n            placeholder=\"With an error style\"\n        />\n    ),\n    name: \"Override styles\",\n};\n\nexport const AddingStylesDynamically = {\n    render: () => <DynamicStyledInput />,\n    name: \"Adding styles dynamically\",\n};\n"},"docs":{"packages-core-addstyle--docs":{"id":"packages-core-addstyle--docs","name":"Docs","path":"./__docs__/wonder-blocks-core/add-style.mdx","title":"Packages / Core / addStyle","content":"import * as React from \"react\";\nimport {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as AddStyleStories from \"./add-style.stories\";\n\n<Meta of={AddStyleStories} />\n\n# addStyle\n\nThe `addStyle` function is a HOC that accepts a **React Component** or a **DOM**\n**intrinsic** (\"div\", \"span\", etc.) as its first argument and optional default\nstyles as its second argument. This HOC returns a **React Component** with a\n`style` prop included ready to be rendered.\n\n_Note: this differs from using a bare **DOM** **intrinsic** with a `style`\nprop. The bare **DOM** **intrinsic** will generate inline styles whereas a\ncomponent that has been wrapped with `addStyle` will process the styles with\n[Aphrodite](https://github.com/Khan/aphrodite). As a result, always use\n`addStyle` if you need to style the component/element._\n\n## Usage\n\n```js\nimport {addStyle} from \"@khanacademy/wonder-blocks-core\";\n\naddStyle(\n    Component: React.Element | \"string\",\n    defaultStyle?: StyleType\n): React.Element;\n```\n\n## API\n\n| Argument       | TypeScript Type                | Default    | Description                           |\n| -------------- | ------------------------------ | ---------- | ------------------------------------- |\n| `Component`    | `React.ReactElement`, `string` | _Required_ | The component that will be decorated. |\n| `defaultStyle` | `StyleType`                    | null       | The initial styles to be applied.     |\n\n## Types\n\n### StyleType\n\n```ts\ntype NestedArray<T> = $ReadOnlyArray<T | NestedArray<T>>;\ntype Falsy = false | 0 | null | void;\n\nexport type StyleType =\n    | CSSProperties\n    | Falsy\n    | NestedArray<CSSProperties | Falsy>;\n```\n\n**Note:** `StyleType` can contain a combination of style rules from an Aphrodite\nStyleSheet as well inline style objects (see example 3).\n\n### CSSProperties\n\n[See source file](https://github.com/Khan/wonder-blocks/blob/main/flow-typed/aphrodite.flow.js#L13)\n\n## Examples\n\nIt's recommended to create your styled component using `addStyle` outside of the\ncomponent so we don't have to create a new instance on every render.\n\n```js\nimport {StyleSheet} from \"aphrodite\";\nimport {border, color, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {addStyle} from \"@khanacademy/wonder-blocks-core\";\n\nconst StyledInput = addStyle(\"input\", styles.input);\n\nconst styles = StyleSheet.create({\n    // default style for all instances of StyledInput\n    input: {\n        background: color.white,\n        borderColor: color.offBlack16,\n        borderRadius: border.radius.radius_040,\n        fontSize: sizing.size_160,\n        padding: sizing.size_080,\n    },\n    error: {\n        background: fade(color.red, 0.16),\n        borderColor: color.red,\n    },\n});\n```\n\n### 1. Adding default styles\n\nYou can create a new styled component by using the `addStyle` function. Note\nhere that you can also define default styles for this component by passing an\ninitial style object to this function.\n\n<Canvas withSource=\"open\" of={AddStyleStories.WithDefaultStyle} />\n\n### 2. Overriding a default style\n\nAfter defining default styles, you can also customize the instance by adding\nand/or merging styles using the `style` prop in your newly created styled\ncomponent.\n\n<Canvas sourceState=\"shown\" of={AddStyleStories.OverrideStyles} />\n\n### 3. Adding styles dynamically\n\nThis example shows that you can dynamically create styles by adding them to the\n`style` prop only when you need them.\n\n<Canvas sourceState=\"shown\" of={AddStyleStories.AddingStylesDynamically} />\n"}}},"packages-core-id":{"id":"packages-core-id","name":"Id","path":"./__docs__/wonder-blocks-core/id.stories.tsx","stories":[],"import":"import { BodyMonospace, BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { Id, Strut, View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`Id` is a component that provides an identifier to its children. It is useful for situations where the `useId` hook cannot be easily used, such as in class-based components. If an `id` prop is provided, that is passed through to the children; otherwise, a unique identifier is generated.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-core/src/index.ts","description":"`Id` is a component that provides an identifier to its children.\n\nIt is useful for situations where the `useId` hook cannot be easily used,\nsuch as in class-based components.\n\nIf an `id` prop is provided, that is passed through to the children;\notherwise, a unique identifier is generated.","displayName":"Id","methods":[],"props":{"id":{"defaultValue":null,"description":"An identifier to use.\n\nIf this is omitted, an identifier is generated.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/components/id.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"A function that to render children with the given identifier.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/components/id.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(id: string) => ReactNode"}}},"exportName":"Id"},"docs":{"packages-core-id--docs":{"id":"packages-core-id--docs","name":"Docs","path":"./__docs__/wonder-blocks-core/id.mdx","title":"Packages / Core / Id","content":"import * as React from \"react\";\nimport {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as IdStories from \"./id.stories\";\n\n<Meta of={IdStories} />\n\n# Id\n\n`Id` is a component that provides an identifier to its children.\n\nIt is useful for situations where the `useId` hook cannot be easily used,\nsuch as in class-based components.\n\nIf an `id` prop is provided, that is passed through to the children;\notherwise, a unique identifier is generated.\n\n## Usage\n\n```tsx\nimport {Id} from \"@khanacademy/wonder-blocks-core\";\n\n<Id id={maybeId}>{(id) => <div id={id}>Hello, world!</div>}</Id>;\n```\n\n## Examples\n\n### 1. Generating an id\n\nAn identifier will always be generated if an `id` prop is not provided, or the\nprovided `id` property is falsy.\n\n<Canvas withSource=\"open\" of={IdStories.GeneratedIdExample} />\n\n### 2. Passthrough an id\n\nIf an `id` prop is provided and it is truthy, that value will be passed through\nto the children.\n\n<Canvas sourceState=\"shown\" of={IdStories.PassedThroughIdExample} />\n"}}},"packages-core-initialfallback":{"id":"packages-core-initialfallback","name":"InitialFallback","path":"./__docs__/wonder-blocks-core/initial-fallback.stories.tsx","stories":[{"id":"packages-core-initialfallback--default","name":"Default","snippet":"const Default = () => <InitialFallback\n    fallback={(): React.ReactElement => (\n        <View>\n            This gets rendered on server, and also on the client for the\n            very first render (the rehydration render)\n        </View>\n    )}>{(): React.ReactElement => (\n        <View>\n            This is rendered only by the client, for all renders after the\n            rehydration render.\n        </View>\n    )}</InitialFallback>;"},{"id":"packages-core-initialfallback--without-placeholder","name":"Without Placeholder","snippet":"const WithoutPlaceholder = () => (\n    <InitialFallback fallback={null}>\n        {() => (\n            <View>\n                This is rendered only by the client, while nothing was rendered\n                on the server.\n            </View>\n        )}\n    </InitialFallback>\n);"},{"id":"packages-core-initialfallback--nested-component","name":"Nested Component","snippet":"const NestedComponent = (): React.ReactElement => {\n    const trackingArray: Array<string> = [];\n    const resultsId = \"nossr-example-2-results\";\n    const newLi = (text: string) => {\n        const li = document.createElement(\"li\");\n        li.appendChild(document.createTextNode(text));\n        return li;\n    };\n\n    const addTrackedRender = (text: string) => {\n        const el = document.getElementById(resultsId);\n        if (el) {\n            for (let i = 0; i < trackingArray.length; i++) {\n                el.append(newLi(trackingArray[i]));\n            }\n            trackingArray.length = 0;\n            el.append(newLi(text));\n        } else {\n            // We may not have rendered the results element yet, so if we haven't\n            // use an array to keep track of the things until we have.\n            trackingArray.push(text);\n        }\n    };\n\n    const trackAndRender = (text: string) => {\n        addTrackedRender(text);\n        return text;\n    };\n\n    return (\n        <View>\n            <BodyText>\n                The list below should have three render entries; root\n                placeholder, root children render, and child children render. If\n                there are two child renders that means that the second forced\n                render is still occurring for nested InitialFallback components,\n                which would be a bug.\n            </BodyText>\n            <ul id={resultsId} />\n            <BodyText>\n                And below this is the actual InitialFallback nesting, which\n                should just show the child render.\n            </BodyText>\n            <InitialFallback\n                fallback={() => (\n                    <View>{trackAndRender(\"Root: placeholder\")}</View>\n                )}\n            >\n                {() => {\n                    addTrackedRender(\"Root: render\");\n                    return (\n                        <InitialFallback\n                            fallback={() => (\n                                <View>\n                                    {trackAndRender(\n                                        \"Child: placeholder (should never see me)\",\n                                    )}\n                                </View>\n                            )}\n                        >\n                            {() => (\n                                <View>{trackAndRender(\"Child: render\")}</View>\n                            )}\n                        </InitialFallback>\n                    );\n                }}\n            </InitialFallback>\n        </View>\n    );\n};"},{"id":"packages-core-initialfallback--side-by-side","name":"Side By Side","snippet":"const SideBySide = (): React.ReactElement => {\n    const trackingArray: Array<string> = [];\n    const resultsId = \"nossr-example-3-results\";\n    const newLi = (text: string) => {\n        const li = document.createElement(\"li\");\n        li.appendChild(document.createTextNode(text));\n        return li;\n    };\n\n    const addTrackedRender = (text: string) => {\n        const el = document.getElementById(resultsId);\n        if (el) {\n            for (let i = 0; i < trackingArray.length; i++) {\n                el.append(newLi(trackingArray[i]));\n            }\n            trackingArray.length = 0;\n            el.append(newLi(text));\n        } else {\n            // We may not have rendered the results element yet, so if we haven't\n            // use an array to keep track of the things until we have.\n            trackingArray.push(text);\n        }\n    };\n\n    const trackAndRender = (text: string) => {\n        addTrackedRender(text);\n        return text;\n    };\n\n    return (\n        <View>\n            <BodyText>\n                The list below should have six render entries; 2 x root\n                placeholder, 2 x root children render, and 2 x child children\n                render.\n            </BodyText>\n            <ul id={resultsId} />\n            <BodyText>\n                And below this are the InitialFallback component trees, which\n                should just show their child renders.\n            </BodyText>\n            <InitialFallback\n                fallback={() => (\n                    <View>{trackAndRender(\"Root 1: placeholder\")}</View>\n                )}\n            >\n                {() => {\n                    addTrackedRender(\"Root 1: render\");\n                    return (\n                        <InitialFallback\n                            fallback={() => (\n                                <View>\n                                    {trackAndRender(\n                                        \"Child 1: placeholder (should never see me)\",\n                                    )}\n                                </View>\n                            )}\n                        >\n                            {() => (\n                                <View>{trackAndRender(\"Child 1: render\")}</View>\n                            )}\n                        </InitialFallback>\n                    );\n                }}\n            </InitialFallback>\n            <InitialFallback\n                fallback={() => (\n                    <View>{trackAndRender(\"Root 2: placeholder\")}</View>\n                )}\n            >\n                {() => {\n                    addTrackedRender(\"Root 2: render\");\n                    return (\n                        <InitialFallback\n                            fallback={() => (\n                                <View>\n                                    {trackAndRender(\n                                        \"Child 2: placeholder (should never see me)\",\n                                    )}\n                                </View>\n                            )}\n                        >\n                            {() => (\n                                <View>{trackAndRender(\"Child 2: render\")}</View>\n                            )}\n                        </InitialFallback>\n                    );\n                }}\n            </InitialFallback>\n        </View>\n    );\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, InitialFallback, View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"InitialFallback\" component.\n  10 | type StoryComponentType = StoryObj<typeof InitialFallback>;\n  11 |\n> 12 | export default {\n     | ^\n  13 |     title: \"Packages / Core / InitialFallback\",\n  14 |     component: InitialFallback,\n  15 |     parameters: {\n\n./__docs__/wonder-blocks-core/initial-fallback.stories.tsx:\nimport * as React from \"react\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {View, InitialFallback} from \"@khanacademy/wonder-blocks-core\";\nimport packageConfig from \"../../packages/wonder-blocks-core/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\n\ntype StoryComponentType = StoryObj<typeof InitialFallback>;\n\nexport default {\n    title: \"Packages / Core / InitialFallback\",\n    component: InitialFallback,\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            description: {\n                component: null,\n            },\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n    args: {\n        fallback: (): React.ReactElement => (\n            <View>\n                This gets rendered on server, and also on the client for the\n                very first render (the rehydration render)\n            </View>\n        ),\n        children: (): React.ReactElement => (\n            <View>\n                This is rendered only by the client, for all renders after the\n                rehydration render.\n            </View>\n        ),\n    },\n} as Meta<typeof InitialFallback>;\n\nexport const Default: StoryComponentType = {};\n\nexport const WithoutPlaceholder: StoryComponentType = () => (\n    <InitialFallback fallback={null}>\n        {() => (\n            <View>\n                This is rendered only by the client, while nothing was rendered\n                on the server.\n            </View>\n        )}\n    </InitialFallback>\n);\n\nWithoutPlaceholder.parameters = {\n    docs: {\n        description: {\n            story: \"This example shows how you can use a `null` placeholder to display nothing during server-side render.\",\n        },\n    },\n};\n\nexport const NestedComponent: StoryComponentType = (): React.ReactElement => {\n    const trackingArray: Array<string> = [];\n    const resultsId = \"nossr-example-2-results\";\n    const newLi = (text: string) => {\n        const li = document.createElement(\"li\");\n        li.appendChild(document.createTextNode(text));\n        return li;\n    };\n\n    const addTrackedRender = (text: string) => {\n        const el = document.getElementById(resultsId);\n        if (el) {\n            for (let i = 0; i < trackingArray.length; i++) {\n                el.append(newLi(trackingArray[i]));\n            }\n            trackingArray.length = 0;\n            el.append(newLi(text));\n        } else {\n            // We may not have rendered the results element yet, so if we haven't\n            // use an array to keep track of the things until we have.\n            trackingArray.push(text);\n        }\n    };\n\n    const trackAndRender = (text: string) => {\n        addTrackedRender(text);\n        return text;\n    };\n\n    return (\n        <View>\n            <BodyText>\n                The list below should have three render entries; root\n                placeholder, root children render, and child children render. If\n                there are two child renders that means that the second forced\n                render is still occurring for nested InitialFallback components,\n                which would be a bug.\n            </BodyText>\n            <ul id={resultsId} />\n            <BodyText>\n                And below this is the actual InitialFallback nesting, which\n                should just show the child render.\n            </BodyText>\n            <InitialFallback\n                fallback={() => (\n                    <View>{trackAndRender(\"Root: placeholder\")}</View>\n                )}\n            >\n                {() => {\n                    addTrackedRender(\"Root: render\");\n                    return (\n                        <InitialFallback\n                            fallback={() => (\n                                <View>\n                                    {trackAndRender(\n                                        \"Child: placeholder (should never see me)\",\n                                    )}\n                                </View>\n                            )}\n                        >\n                            {() => (\n                                <View>{trackAndRender(\"Child: render\")}</View>\n                            )}\n                        </InitialFallback>\n                    );\n                }}\n            </InitialFallback>\n        </View>\n    );\n};\n\nNestedComponent.parameters = {\n    docs: {\n        description: {\n            story: \"Here, we nest two `InitialFallback` components and use an array to track rendering, so that we can see how only the top level `InitialFallback` component skips the initial render.\",\n        },\n    },\n};\n\nexport const SideBySide: StoryComponentType = (): React.ReactElement => {\n    const trackingArray: Array<string> = [];\n    const resultsId = \"nossr-example-3-results\";\n    const newLi = (text: string) => {\n        const li = document.createElement(\"li\");\n        li.appendChild(document.createTextNode(text));\n        return li;\n    };\n\n    const addTrackedRender = (text: string) => {\n        const el = document.getElementById(resultsId);\n        if (el) {\n            for (let i = 0; i < trackingArray.length; i++) {\n                el.append(newLi(trackingArray[i]));\n            }\n            trackingArray.length = 0;\n            el.append(newLi(text));\n        } else {\n            // We may not have rendered the results element yet, so if we haven't\n            // use an array to keep track of the things until we have.\n            trackingArray.push(text);\n        }\n    };\n\n    const trackAndRender = (text: string) => {\n        addTrackedRender(text);\n        return text;\n    };\n\n    return (\n        <View>\n            <BodyText>\n                The list below should have six render entries; 2 x root\n                placeholder, 2 x root children render, and 2 x child children\n                render.\n            </BodyText>\n            <ul id={resultsId} />\n            <BodyText>\n                And below this are the InitialFallback component trees, which\n                should just show their child renders.\n            </BodyText>\n            <InitialFallback\n                fallback={() => (\n                    <View>{trackAndRender(\"Root 1: placeholder\")}</View>\n                )}\n            >\n                {() => {\n                    addTrackedRender(\"Root 1: render\");\n                    return (\n                        <InitialFallback\n                            fallback={() => (\n                                <View>\n                                    {trackAndRender(\n                                        \"Child 1: placeholder (should never see me)\",\n                                    )}\n                                </View>\n                            )}\n                        >\n                            {() => (\n                                <View>{trackAndRender(\"Child 1: render\")}</View>\n                            )}\n                        </InitialFallback>\n                    );\n                }}\n            </InitialFallback>\n            <InitialFallback\n                fallback={() => (\n                    <View>{trackAndRender(\"Root 2: placeholder\")}</View>\n                )}\n            >\n                {() => {\n                    addTrackedRender(\"Root 2: render\");\n                    return (\n                        <InitialFallback\n                            fallback={() => (\n                                <View>\n                                    {trackAndRender(\n                                        \"Child 2: placeholder (should never see me)\",\n                                    )}\n                                </View>\n                            )}\n                        >\n                            {() => (\n                                <View>{trackAndRender(\"Child 2: render\")}</View>\n                            )}\n                        </InitialFallback>\n                    );\n                }}\n            </InitialFallback>\n        </View>\n    );\n};\n\nSideBySide.parameters = {\n    docs: {\n        description: {\n            story: \"In this example, we have side-by-side `InitialFallback` components. This demonstrates how component non-nested `InitialFallback` components independently track the first render.\",\n        },\n    },\n};\n"}},"packages-core-view":{"id":"packages-core-view","name":"View","path":"./__docs__/wonder-blocks-core/view.stories.tsx","stories":[{"id":"packages-core-view--default","name":"Default","snippet":"const Default = () => <View>This is a View!</View>;"},{"id":"packages-core-view--inline-styles","name":"Inline Styles","snippet":"const InlineStyles = () => (\n    <View style={styles.container}>\n        <Heading size=\"large\">Hello, world!</Heading>\n        <View\n            style={[\n                styles.container,\n                {\n                    background:\n                        semanticColor.core.background.instructive.subtle,\n                    border: `1px solid ${semanticColor.core.border.instructive.default}`,\n                    padding: sizing.size_040,\n                },\n            ]}\n        >\n            The style prop can accept a (nested) array of Aphrodite styles\n            and inline styles.\n        </View>\n    </View>\n);","description":"Styles can be applied inline to the component, or by passing an Aphrodite style object."},{"id":"packages-core-view--other-props","name":"Using other props","snippet":"const OtherProps = () => (\n    <View style={styles.container}>\n        <View style={styles.item}>View with custom styles!</View>\n\n        <View aria-hidden=\"true\">\n            This text is hidden from screen readers.\n        </View>\n    </View>\n);","description":"Other props can be passed through `View`s as if they were normal tags."},{"id":"packages-core-view--defining-layout","name":"Defining Layout","snippet":"const DefiningLayout = () => (\n    <View style={styles.container}>\n        <Heading size=\"large\">View as a column</Heading>\n        <View style={styles.view}>\n            <View style={styles.item}>\n                <BodyText>First item</BodyText>\n            </View>\n            <View style={styles.item}>\n                <BodyText>Second item</BodyText>\n            </View>\n        </View>\n\n        <Heading size=\"large\">View as a row</Heading>\n        <View style={[styles.view, {flexDirection: \"row\"}]}>\n            <View style={styles.item}>\n                <BodyText>First item</BodyText>\n            </View>\n            <View style={styles.item}>\n                <BodyText>Second item</BodyText>\n            </View>\n        </View>\n    </View>\n);","description":"`View` can also be used to wrap elements and apply different flexbox layouts. By default, `View` uses `flexDirection: \"column\"`."}],"import":"import { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"View is a building block for constructing other components. `View` roughly maps to `div`. You can override which tag is used to render the component (for semantic purposes) by specifying the `tag` prop. These components can take styles (via the `style` prop) in a variety of manners: - An inline style object - An `aphrodite` StyleSheet style - An array combining the above `View` sets the following defaults: - `display: \"flex\"` - `flexDirection: \"column\"` - they each get their own stacking context. ### Usage ```jsx import {View} from \"@khanacademy/wonder-blocks-core\"; <View>This is a View!</View> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-core/src/index.ts","description":"View is a building block for constructing other components. `View` roughly\nmaps to `div`. You can override which tag is used to render the component\n(for semantic purposes) by specifying the `tag` prop.\n\nThese components can take styles (via the `style` prop) in a variety of\nmanners:\n\n- An inline style object\n- An `aphrodite` StyleSheet style\n- An array combining the above\n\n`View` sets the following defaults:\n\n- `display: \"flex\"`\n- `flexDirection: \"column\"`\n- they each get their own stacking context.\n\n### Usage\n\n```jsx\nimport {View} from \"@khanacademy/wonder-blocks-core\";\n\n<View>This is a View!</View>\n```","displayName":"View","methods":[],"props":{"children":{"defaultValue":null,"description":"Text to appear on the button.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"style":{"defaultValue":null,"description":"Optional custom styles.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"lang":{"defaultValue":null,"description":"Optional attribute to indicate to the Screen Reader which language the\nitem text is in.","name":"lang","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Optional CSS classes for the entire dropdown component.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"dir":{"defaultValue":null,"description":"The text direction for the element.","name":"dir","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"auto\" | \"ltr\" | \"rtl\"","value":[{"value":"\"auto\""},{"value":"\"ltr\""},{"value":"\"rtl\""}]}},"htmlFor":{"defaultValue":null,"description":"","name":"htmlFor","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"id":{"defaultValue":null,"description":"","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"title":{"defaultValue":null,"description":"","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"data-modal-launcher-portal":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-modal-launcher-portal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"data-placement":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-placement","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"onMouseDown":{"defaultValue":null,"description":"","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseUp":{"defaultValue":null,"description":"","name":"onMouseUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseMove":{"defaultValue":null,"description":"","name":"onMouseMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onClick":{"defaultValue":null,"description":"","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDoubleClick":{"defaultValue":null,"description":"","name":"onDoubleClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseEnter":{"defaultValue":null,"description":"","name":"onMouseEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseLeave":{"defaultValue":null,"description":"","name":"onMouseLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOut":{"defaultValue":null,"description":"","name":"onMouseOut","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOver":{"defaultValue":null,"description":"","name":"onMouseOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrag":{"defaultValue":null,"description":"","name":"onDrag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnd":{"defaultValue":null,"description":"","name":"onDragEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnter":{"defaultValue":null,"description":"","name":"onDragEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragExit":{"defaultValue":null,"description":"","name":"onDragExit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragLeave":{"defaultValue":null,"description":"","name":"onDragLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragOver":{"defaultValue":null,"description":"","name":"onDragOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragStart":{"defaultValue":null,"description":"","name":"onDragStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrop":{"defaultValue":null,"description":"","name":"onDrop","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onKeyDown":{"defaultValue":null,"description":"","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyPress":{"defaultValue":null,"description":"","name":"onKeyPress","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyUp":{"defaultValue":null,"description":"","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onChange":{"defaultValue":null,"description":"","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInput":{"defaultValue":null,"description":"","name":"onInput","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInvalid":{"defaultValue":null,"description":"","name":"onInvalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onSubmit":{"defaultValue":null,"description":"","name":"onSubmit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onTouchCancel":{"defaultValue":null,"description":"","name":"onTouchCancel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchEnd":{"defaultValue":null,"description":"","name":"onTouchEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchMove":{"defaultValue":null,"description":"","name":"onTouchMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchStart":{"defaultValue":null,"description":"","name":"onTouchStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onFocus":{"defaultValue":null,"description":"","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"onBlur":{"defaultValue":null,"description":"","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"tag":{"defaultValue":null,"description":"The HTML tag to render.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/components/view.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"View"}},"packages-datepicker-datepicker":{"id":"packages-datepicker-datepicker","name":"DatePicker","path":"./__docs__/wonder-blocks-date-picker/date-picker.stories.tsx","stories":[{"id":"packages-datepicker-datepicker--selected-date-is-now","name":"Selected Date Is Now","snippet":"const SelectedDateIsNow = () => <DatePickerWrapper\n    disabled={false}\n    minDate={Temporal.Now.plainDateISO().subtract({days: 2})}\n    selectedDate={Temporal.Now.plainDateISO()}\n    updateDate={() => {}} />;","description":"Selected date is now, min is 2 days ago from now"},{"id":"packages-datepicker-datepicker--disabled-state","name":"Disabled State","snippet":"const DisabledState = () => <DatePicker\n    disabled\n    dateFormat=\"MMMM D, YYYY\"\n    selectedDate={Temporal.PlainDate.from(\"2025-05-07\")}\n    updateDate={() => {}}\n    inputAriaLabel=\"Disabled date picker\" />;","description":"Displays the disabled state"},{"id":"packages-datepicker-datepicker--with-label","name":"With Label","snippet":"const WithLabel = () => <>\n    <BodyText\n        tag=\"label\"\n        htmlFor=\"labeled-date-picker\"\n        style={{marginBlockEnd: sizing.size_100}}>Choose or enter a date\n                    </BodyText>\n    <DatePicker\n        dateFormat=\"MMMM D, YYYY\"\n        placeholder=\"Select a date\"\n        updateDate={() => {}}\n        id=\"labeled-date-picker\" />\n</>;","description":"Example with an explicit label and id pairing. Note: using LabeledField is preferred!"},{"id":"packages-datepicker-datepicker--with-labeled-field-and-validation","name":"With Labeled Field And Validation","snippet":"const WithLabeledFieldAndValidation = () => <DatePickerWithValidation />;","description":"Example with validation feedback using LabeledField. Disables resetInvalidValueOnBlur to retain user input for validation. Shows an error message when the user types a date outside the allowed range. Try editing the date to be before January 10, 2026 or after January 31, 2026."},{"id":"packages-datepicker-datepicker--with-input-aria-label","name":"With Input Aria Label","snippet":"const WithInputAriaLabel = () => <ControlledDatePicker\n    dateFormat=\"MMMM D, YYYY\"\n    placeholder=\"Select a date\"\n    updateDate={() => {}}\n    inputAriaLabel=\"Super fancy input label\" />;","description":"Example using the inputAriaLabel prop"},{"id":"packages-datepicker-datepicker--with-placeholder","name":"With Placeholder","snippet":"const WithPlaceholder = () => <DatePicker\n    dateFormat=\"MMMM D, YYYY\"\n    placeholder=\"Select a date\"\n    updateDate={() => {}} />;","description":"Example with no selected date and a placeholder"},{"id":"packages-datepicker-datepicker--dont-close-on-select","name":"Dont Close On Select","snippet":"const DontCloseOnSelect = () => <ControlledDatePicker\n    closeOnSelect={false}\n    disabled={false}\n    dateFormat=\"MMM D, YYYY\"\n    minDate={Temporal.Now.plainDateISO().subtract({days: 2})}\n    selectedDate={Temporal.Now.plainDateISO()}\n    updateDate={() => {}} />;","description":"This example shows how we can preserve the date picker element open with the closeOnSelect prop."},{"id":"packages-datepicker-datepicker--open-calendar-overlay","name":"Open Calendar Overlay","snippet":"const OpenCalendarOverlay = () => <DatePickerWithOpenOverlay\n    selectedDate={Temporal.PlainDate.from(\"2025-11-01\")}\n    minDate={Temporal.PlainDate.from(\"2025-11-01\")}\n    maxDate={Temporal.PlainDate.from(\"2026-12-31\")}\n    updateDate={() => {}} />;","description":"DatePicker with the calendar overlay already open. The calendar automatically opens when the story loads, showing a month view with the current date selection and available dates within the min/max range."},{"id":"packages-datepicker-datepicker--with-alternate-locale","name":"With Alternate Locale","snippet":"const WithAlternateLocale = () => <DatePickerWithOpenOverlay\n    selectedDate={Temporal.PlainDate.from(\"2025-11-01\")}\n    minDate={Temporal.PlainDate.from(\"2025-11-01\")}\n    maxDate={Temporal.PlainDate.from(\"2026-12-31\")}\n    updateDate={() => {}}\n    locale={fr}\n    inputAriaLabel=\"Choisir ou entrer une date\" />;","description":"DatePicker with a different locale than US English. This story is useful for testing localization functionality."},{"id":"packages-datepicker-datepicker--spanish-localization-text-format","name":"Spanish Localization Text Format","snippet":"const SpanishLocalizationTextFormat = () => <DatePickerWithOpenOverlay\n    selectedDate={Temporal.PlainDate.from(\"2026-01-16\")}\n    updateDate={() => {}}\n    locale={es}\n    dateFormat=\"LL\"\n    inputAriaLabel=\"Elegir o introducir una fecha\" />;","description":"DatePicker with Spanish localization showing text-based date format. For example, \"January 16, 2026\" displays as \"enero 16, 2026\" in the input field. The calendar overlay also shows Spanish month names and day abbreviations. This uses the \"LL\" dateFormat which displays the full month name in Spanish."},{"id":"packages-datepicker-datepicker--spanish-localization-numeric-format","name":"Spanish Localization Numeric Format","snippet":"const SpanishLocalizationNumericFormat = () => <DatePickerWithOpenOverlay\n    selectedDate={Temporal.PlainDate.from(\"2026-01-16\")}\n    updateDate={() => {}}\n    locale={es}\n    inputAriaLabel=\"Elegir o introducir una fecha\" />;","description":"DatePicker with Spanish localization showing numeric date format. Displays dates in \"L\"\" format for accuracy across locales. For example, January 16, 2026 displays as \"01/16/2026\" in the input field."},{"id":"packages-datepicker-datepicker--inside-modal","name":"Inside Modal","snippet":"const InsideModal = () => <DatePickerInsideModalExample />;","description":"DatePicker inside a Modal to test that pressing Escape only closes the calendar overlay, not the modal itself."},{"id":"packages-datepicker-datepicker--with-custom-styles","name":"With Custom Styles","snippet":"const WithCustomStyles = () => <View style={{gap: sizing.size_240, maxInlineSize: 600}}>\n    <View style={{gap: sizing.size_080}}>\n        <BodyText weight=\"bold\" tag=\"label\" htmlFor=\"custom-example1\">Date with default size (225px × 40px)\n                            </BodyText>\n        <DatePicker updateDate={() => {}} placeholder=\"MM/DD/YYYY\" id=\"custom-example1\" />\n    </View>\n    <View style={{gap: sizing.size_080}}>\n        <BodyText weight=\"bold\" tag=\"label\" htmlFor=\"custom-example2\">Date with custom width (350px)\n                            </BodyText>\n        <DatePicker\n            updateDate={() => {}}\n            placeholder=\"MM/DD/YYYY\"\n            id=\"custom-example2\"\n            style={{width: 350}} />\n    </View>\n    <View style={{gap: sizing.size_080}}>\n        <BodyText weight=\"bold\" tag=\"label\" htmlFor=\"custom-example3\">Date with full width (100%)\n                            </BodyText>\n        <DatePicker\n            updateDate={() => {}}\n            placeholder=\"MM/DD/YYYY\"\n            id=\"custom-example3\"\n            style={{width: \"100%\"}} />\n    </View>\n    <View style={{gap: sizing.size_080}}>\n        <BodyText weight=\"bold\" tag=\"label\" htmlFor=\"custom-example4\">Date with custom height for larger touch target (48px)\n                            </BodyText>\n        <DatePicker\n            updateDate={() => {}}\n            placeholder=\"MM/DD/YYYY\"\n            id=\"custom-example4\"\n            style={{height: sizing.size_480}} />\n    </View>\n</View>;","description":"DatePicker with custom styling to demonstrate that the style prop works. This example shows how to override the default width (225px) and height (40px) using the style prop. **Examples shown:** - Default width (225px) and height (40px) - Custom width (350px) with default height - Full width (100%) to fill parent container - Custom height (48px) for larger touch targets"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, DatePicker } from \"@khanacademy/wonder-blocks-date-picker\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { ModalLauncher, OnePaneDialog } from \"@khanacademy/wonder-blocks-modal\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"DatePicker component for selecting dates. It opens a calendar overlay when interacting with the input field.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-date-picker/src/index.ts","description":"A UI component that allows the user to pick a date by using an input element\nor the calendar popup exposed by `react-day-picker`.","displayName":"DatePicker","methods":[],"props":{"locale":{"defaultValue":null,"description":"The locale to use for the dates: a string name matching a Locale object\nimported from react-day-picker.\nIf not provided, it will fall back to enUS.","name":"locale","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"Locale"}},"updateDate":{"defaultValue":null,"description":"When the selected date changes, this callback is passed a Temporal object\nfor midnight on the selected date, set to the user's local time zone.\n\nNote: This callback is called as the user types based on resetInvalidValueOnBlur:\n\nWith resetInvalidValueOnBlur={false}:\n- Called immediately for all parsed dates (valid or out-of-range)\n- Called immediately with null for invalid/unparseable text\n- Enables real-time validation feedback\n\nWith resetInvalidValueOnBlur={true} (default):\n- Called immediately only for valid in-range dates\n- Out-of-range dates and invalid text only notify on blur (will auto-reset)\n\nFor validation feedback, use resetInvalidValueOnBlur={false} and always update selectedDate\nin your callback to display invalid values with error messages.","name":"updateDate","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":true,"type":{"name":"(arg1?: PlainDate | null | undefined) => any"}},"dateFormat":{"defaultValue":null,"description":"Used to format the value as a valid Date.\nWhen nullish (undefined or omitted), defaults to locale-aware short date (same as \"L\").\n\nSupported formats:\n- **undefined** (omit or pass undefined): Locale-aware short date (same as \"L\")\n- **\"L\"**: Locale-aware short date (e.g., \"1/20/2026\" in en-US, \"20.01.2026\" in de-DE, \"20/01/2026\" in bg)\n- **\"LL\"**: Locale-aware long date (e.g., \"January 20, 2026\" in en-US, \"20 de enero de 2026\" in es)\n  - Supports manual text editing using locale-specific month names\n- **\"MM/DD/YYYY\"**: Fixed US format (e.g., \"01/20/2026\") - always US order regardless of locale\n- **\"MMMM D, YYYY\"**: Text format (e.g., \"January 20, 2026\") - month name localized but US order\n- **\"dateStyle:short|medium|long|full\"**: Explicit Intl.DateTimeFormat dateStyle values","name":"dateFormat","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"disabled":{"defaultValue":null,"description":"Whether the DatePicker component is disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"id":{"defaultValue":null,"description":"Unique identifier attached to the input field. see DatePickerInput.id for\nmore details.","name":"id","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"maxDate":{"defaultValue":null,"description":"The maximum date to be allowed to select in the picker container.","name":"maxDate","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"PlainDate | null"}},"minDate":{"defaultValue":null,"description":"The minimum date to be allowed to select in the picker container.","name":"minDate","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"PlainDate | null"}},"inputAriaLabel":{"defaultValue":null,"description":"The aria-label to be used for the date picker. This is only needed if there\nis no visible label associated with the date picker, such as with LabeledField.","name":"inputAriaLabel","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"placeholder":{"defaultValue":null,"description":"The placeholder assigned to the date field","name":"placeholder","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"string"}},"selectedDate":{"defaultValue":null,"description":"The current valid date associated to the DatePicker component.","name":"selectedDate","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"PlainDate | null"}},"style":{"defaultValue":null,"description":"Styles for the date picker container.","name":"style","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"StyleType"}},"closeOnSelect":{"defaultValue":{"value":"true"},"description":"Whether the date picker overlay should close when a date is selected\nor when Enter key is pressed in the input.\nDefaults to true.","name":"closeOnSelect","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"resetInvalidValueOnBlur":{"defaultValue":null,"description":"Whether to reset invalid/unparseable text to the last valid value on blur.\n\nWhen true (default):\n- Invalid values (out-of-range dates and unparseable text) auto-reset to last valid value on blur\n- updateDate only called on blur for invalid values (not during typing)\n- Cleaner UX when not using external validation\n\nWhen false:\n- Invalid values stay in field and updateDate is called immediately as user types\n- Enables real-time validation feedback with LabeledField error messages\n- Parent should always update selectedDate to show errors","name":"resetInvalidValueOnBlur","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"boolean"}},"footer":{"defaultValue":null,"description":"Allows including elements below the date selection area that can close\nthe date picker.","name":"footer","parent":{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"},"declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-date-picker/src/components/date-picker.tsx","name":"Props"}],"required":false,"type":{"name":"((arg1: { close: () => unknown; }) => ReactNode)"}}},"exportName":"DatePicker"}},"packages-dropdown-actionitem":{"id":"packages-dropdown-actionitem","name":"ActionItem","path":"./__docs__/wonder-blocks-dropdown/action-item.stories.tsx","stories":[{"id":"packages-dropdown-actionitem--default","name":"Default","snippet":"const Default = () => <ActionItem label=\"Action Item\" onClick={() => {}} />;","description":"The default action item with a `label` and an `onClick` handler. This is used to trigger actions, such as opening a modal."},{"id":"packages-dropdown-actionitem--with-href","name":"With Href","snippet":"const WithHref = () => <ActionItem label=\"Action Item\" href=\"https://khanacademy.org\" />;","description":"The action item with a `label` and an `href` prop. This is used to trigger navigation to a different page."},{"id":"packages-dropdown-actionitem--disabled","name":"Disabled","snippet":"const Disabled = () => <ActionItem label=\"Action Item\" onClick={() => {}} disabled />;","description":"ActionItem can be `disabled`. This is used to indicate that the action is not available."},{"id":"packages-dropdown-actionitem--custom-action-item","name":"Custom Action Item","snippet":"const CustomActionItem = () => <ActionItem\n    label=\"Action Item\"\n    subtitle1=\"Subtitle 1\"\n    subtitle2=\"Subtitle 2\"\n    onClick={() => {}}\n    leftAccessory={(<PhosphorIcon icon={IconMappings.calendar} size=\"medium\" />)}\n    rightAccessory={(<PhosphorIcon icon={IconMappings.caretRight} size=\"medium\" />)} />;","description":"ActionItem can have more complex content, such as icons and subtitles. This can be done by passing in a `subtitle1`, `subtitle2`, `leftAccessory` and/or `rightAccessory` props. These can be any React node, and internally use the WB `DetailCell` component to render."},{"id":"packages-dropdown-actionitem--custom-action-item-multi-line","name":"Custom Action Item Multi Line","snippet":"const CustomActionItemMultiLine = () => <ActionItem\n    label={(<View>\n        <BodyText weight=\"bold\">Title</BodyText>\n        <BodyText>Subtitle</BodyText>\n    </View>)}\n    onClick={() => {}}\n    leftAccessory={(<PhosphorIcon icon={IconMappings.calendar} size=\"medium\" />)}\n    rightAccessory={(<PhosphorIcon icon={IconMappings.caretRight} size=\"medium\" />)} />;","description":"Another example of a custom action item with a larger label"},{"id":"packages-dropdown-actionitem--horizontal-rule","name":"Horizontal Rule","snippet":"const HorizontalRule = () => <View style={styles.items}>\n    <ActionItem onClick={() => {}} label=\"full-width\" horizontalRule=\"full-width\" />\n    <ActionItem onClick={() => {}} label=\"inset\" horizontalRule=\"inset\" />\n    <ActionItem onClick={() => {}} label=\"none\" />\n    <ActionItem label=\"Action Item\" onClick={() => {}} />\n</View>;","description":"`horizontalRule` can be used to separate items within ActionMenu instances. It defaults to `none`, but can be set to `inset` or `full-width` to add a horizontal rule at the bottom of the cell."}],"import":"import { ActionItem, ComponentInfo } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"ActionItem\" component.\n  52 |  * ```\n  53 |  */\n> 54 | export default {\n     | ^\n  55 |     title: \"Packages / Dropdown / ActionItem\",\n  56 |     component: ActionItem,\n  57 |     argTypes: actionItemArgtypes,\n\n./__docs__/wonder-blocks-dropdown/action-item.stories.tsx:\nimport {Meta} from \"@storybook/react-vite\";\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport {PropsFor, View} from \"@khanacademy/wonder-blocks-core\";\nimport {ActionItem} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport packageConfig from \"../../packages/wonder-blocks-dropdown/package.json\";\nimport {IconMappings} from \"../wonder-blocks-icon/phosphor-icon.argtypes\";\nimport actionItemArgtypes from \"./action-item.argtypes\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nconst defaultArgs = {\n    label: \"Action Item\",\n    onClick: () => {},\n    disabled: false,\n    testId: \"\",\n    lang: \"\",\n    role: \"menuitem\",\n    style: {},\n    horizontalRule: \"none\",\n    leftAccessory: null,\n    rightAccessory: null,\n};\n\nconst styles = StyleSheet.create({\n    example: {\n        background: semanticColor.core.background.base.subtle,\n        padding: sizing.size_160,\n        width: 300,\n    },\n    items: {\n        background: semanticColor.core.background.base.default,\n    },\n});\n\n/**\n * The action item trigger actions, such as navigating to a different page or\n * opening a modal. Supply the `href` and/or `onClick` props. This component is\n * as a child of `ActionMenu`.\n *\n * ### Usage\n *\n * ```tsx\n * import {ActionItem, ActionMenu} from \"@khanacademy/wonder-blocks-dropdown\";\n *\n * <ActionMenu {...props}>\n *   <ActionItem label=\"Action Item\" onClick={() => {}} />\n * </ActionMenu>\n * ```\n */\nexport default {\n    title: \"Packages / Dropdown / ActionItem\",\n    component: ActionItem,\n    argTypes: actionItemArgtypes,\n    args: defaultArgs,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>\n                <div role=\"menu\" aria-label=\"Example\">\n                    <Story />\n                </div>\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        // These stories are being tested in action-item-variants.stories.tsx\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n} as Meta<typeof ActionItem>;\n\n/**\n * The default action item with a `label` and an `onClick` handler. This is used\n * to trigger actions, such as opening a modal.\n */\nexport const Default = {\n    args: {\n        label: \"Action Item\",\n        onClick: () => {},\n    },\n};\n\n/**\n * The action item with a `label` and an `href` prop. This is used to trigger\n * navigation to a different page.\n */\nexport const WithHref = {\n    args: {\n        label: \"Action Item\",\n        href: \"https://khanacademy.org\",\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this doesn't test anything visual.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * ActionItem can be `disabled`. This is used to indicate that the action is not\n * available.\n */\nexport const Disabled = {\n    args: {\n        label: \"Action Item\",\n        onClick: () => {},\n        disabled: true,\n    },\n};\n\n/**\n * ActionItem can have more complex content, such as icons and subtitles.\n *\n * This can be done by passing in a `subtitle1`, `subtitle2`, `leftAccessory`\n * and/or `rightAccessory` props. These can be any React node, and internally\n * use the WB `DetailCell` component to render.\n */\nexport const CustomActionItem = {\n    args: {\n        label: \"Action Item\",\n        subtitle1: \"Subtitle 1\",\n        subtitle2: \"Subtitle 2\",\n        onClick: () => {},\n        leftAccessory: (\n            <PhosphorIcon icon={IconMappings.calendar} size=\"medium\" />\n        ),\n        rightAccessory: (\n            <PhosphorIcon icon={IconMappings.caretRight} size=\"medium\" />\n        ),\n    },\n};\n\n/**\n * Another example of a custom action item with a larger label\n */\nexport const CustomActionItemMultiLine = {\n    args: {\n        label: (\n            <View>\n                <BodyText weight=\"bold\">Title</BodyText>\n                <BodyText>Subtitle</BodyText>\n            </View>\n        ),\n        onClick: () => {},\n        leftAccessory: (\n            <PhosphorIcon icon={IconMappings.calendar} size=\"medium\" />\n        ),\n        rightAccessory: (\n            <PhosphorIcon icon={IconMappings.caretRight} size=\"medium\" />\n        ),\n    },\n};\n\n/**\n * `horizontalRule` can be used to separate items within ActionMenu instances.\n * It defaults to `none`, but can be set to `inset` or `full-width` to add a\n * horizontal rule at the bottom of the cell.\n */\nexport const HorizontalRule = {\n    args: {\n        label: \"Action Item\",\n        onClick: () => {},\n    },\n    render: (args: PropsFor<typeof ActionItem>): React.ReactNode => (\n        <View style={styles.items}>\n            <ActionItem\n                {...args}\n                label=\"full-width\"\n                horizontalRule=\"full-width\"\n            />\n            <ActionItem {...args} label=\"inset\" horizontalRule=\"inset\" />\n            <ActionItem {...args} label=\"none\" />\n            <ActionItem {...args} />\n        </View>\n    ),\n    parameters: {\n        chromatic: {\n            // Enabling to test how the horizontal rule looks.\n            disableSnapshot: false,\n        },\n    },\n};\n"}},"packages-dropdown-actionmenu":{"id":"packages-dropdown-actionmenu","name":"ActionMenu","path":"./__docs__/wonder-blocks-dropdown/action-menu.stories.tsx","stories":[{"id":"packages-dropdown-actionmenu--default","name":"Default","snippet":"const Default = () => <ActionMenu />;"},{"id":"packages-dropdown-actionmenu--right-aligned","name":"Right Aligned","snippet":"const RightAligned = () => <ActionMenu />;","description":"This menu shows different type of possible items in this type of menu: 1. leads to a different page (the profile). 2. leads to the teacher dashboard. 3. has an onClick callback, which could be used for conversion logging. 4. is a disabled item. 5. is a separator. 6. leads to the logout link. This menu is also left-aligned."},{"id":"packages-dropdown-actionmenu--truncated-opener","name":"Truncated Opener","snippet":"const TruncatedOpener = () => <ActionMenu />;","description":"The text in the menu opener should be truncated with ellipsis at the end and the down caret should be the same size as it is for the other examples."},{"id":"packages-dropdown-actionmenu--with-option-items","name":"With Option Items","snippet":"const WithOptionItems = function Render() {\n    const [selectedValues, setSelectedValues] = React.useState<\n        Array<string>\n    >([]);\n    const [showHiddenOption, setShowHiddenOption] = React.useState(false);\n\n    const handleChange = (selectedItems: Array<string>) => {\n        setSelectedValues(selectedItems);\n        setShowHiddenOption(selectedItems.includes(\"in-class\"));\n    };\n\n    return (\n        <ActionMenu\n            menuText=\"Assignments\"\n            onChange={handleChange}\n            selectedValues={selectedValues}\n        >\n            <ActionItem\n                label=\"Create...\"\n                onClick={() => console.log(\"create action\")}\n            />\n            <ActionItem\n                label=\"Edit...\"\n                disabled={true}\n                onClick={() => console.log(\"edit action\")}\n            />\n            <ActionItem\n                label=\"Delete\"\n                disabled={true}\n                onClick={() => console.log(\"delete action\")}\n            />\n            {showHiddenOption && (\n                <ActionItem\n                    label=\"Hidden menu for class\"\n                    disabled={!showHiddenOption}\n                    onClick={() => console.log(\"hidden menu is clicked!\")}\n                />\n            )}\n            <SeparatorItem />\n            <OptionItem\n                label=\"Show homework assignments\"\n                value=\"homework\"\n                onClick={() =>\n                    console.log(`Show homework assignments toggled`)\n                }\n            />\n            <OptionItem\n                label=\"Show in-class assignments\"\n                value=\"in-class\"\n                onClick={() =>\n                    console.log(`Show in-class assignments toggled`)\n                }\n            />\n        </ActionMenu>\n    );\n};","description":"The following menu demonstrates a hybrid menu with both action items and items that can toggle to change the state of the application. The user of this menu must keep track of the state of the selected items."},{"id":"packages-dropdown-actionmenu--empty-menu","name":"Empty Menu","snippet":"const EmptyMenu = () => <ActionMenu menuText=\"Empty\" />;","description":"Empty menus are disabled automatically."},{"id":"packages-dropdown-actionmenu--custom-dropdown-style","name":"Custom dropdownStyle","snippet":"const CustomDropdownStyle = () => <ActionMenu />;","description":"This example shows how we can add custom styles to the dropdown menu."},{"id":"packages-dropdown-actionmenu--controlled","name":"Controlled","snippet":"const Controlled = function Render() {\n    const [opened, setOpened] = React.useState(false);\n\n    return (\n        <View style={styles.row}>\n            <Checkbox\n                label=\"Click to toggle\"\n                onChange={setOpened}\n                checked={opened}\n            />\n            <ActionMenu\n                menuText=\"Betsy Appleseed\"\n                opened={opened}\n                onToggle={setOpened}\n            >\n                {actionItems.map((actionItem, index) => actionItem)}\n            </ActionMenu>\n        </View>\n    );\n};","description":"Sometimes you'll want to trigger a dropdown programmatically. This can be done by setting a value to the opened prop (true or false). In this situation the ActionMenu is a controlled component. The parent is responsible for managing the opening/closing of the dropdown when using this prop. This means that you'll also have to update opened to the value triggered by the onToggle prop."},{"id":"packages-dropdown-actionmenu--with-custom-opener","name":"With custom opener","snippet":"const WithCustomOpener = () => {\n    const [opened, setOpened] = React.useState(false);\n\n    return (\n        <ActionMenu\n            opened={opened}\n            onToggle={setOpened}\n            opener={({hovered, pressed, text}: OpenerProps) => (\n                <CustomOpener\n                    testId=\"teacher-menu-custom-opener\"\n                    styles={{\n                        root: [\n                            styles.customOpener,\n                            hovered && styles.customOpenerHovered,\n                            pressed && styles.customOpenerPressed,\n                            args.disabled && styles.customOpenerDisabled,\n                        ],\n                    }}\n                >\n                    <BodyText tag=\"span\" weight=\"bold\">\n                        {text}\n                    </BodyText>\n                </CustomOpener>\n            )}>\n            {actionItems.map((actionItem, index) => actionItem)}\n        </ActionMenu>\n    );\n};","description":"When you need a fully custom-styled opener, use `CustomOpener`. It provides a blank-slate `<button>` with the WB focus ring baked in and correct ref forwarding for the dropdown's focus management wiring. The `opener` render prop receives `hovered`, `focused`, `pressed`, `text`, and `opened` values that can be passed to child content for conditional styling. Focus ring styles are handled automatically by `CustomOpener` via CSS — you do not need to apply `focusStyles` yourself. **Note:** Pass `testId` directly to `CustomOpener` for e2e test targeting. **Accessibility:** When a custom opener is used, `aria-expanded`, `aria-haspopup`, and `aria-controls` are added automatically."},{"id":"packages-dropdown-actionmenu--with-popper-placement","name":"With popper placement","snippet":"const WithPopperPlacement = () => {\n    const [opened, setOpened] = React.useState(false);\n\n    React.useEffect(() => {\n        setOpened(true);\n    }, []);\n\n    return (\n        <ActionMenu opened={opened} onToggle={setOpened}>\n            {actionItems.map((actionItem, index) => actionItem)}\n        </ActionMenu>\n    );\n};","description":"Sometimes you may want to align the dropdown somewhere besides below the opener. In these cases, you can specify any valid popper placement as the alignment."},{"id":"packages-dropdown-actionmenu--action-menu-with-lang","name":"Using the lang attribute","snippet":"const ActionMenuWithLang = () => (\n    <ActionMenu menuText=\"Locales\">\n        {locales.map((locale) => (\n            <ActionItem\n                key={locale.locale}\n                label={locale.localName}\n                lang={locale.locale}\n                testId={\"language_picker_\" + locale.locale}\n            />\n        ))}\n    </ActionMenu>\n);","description":"You can use the `lang` attribute to specify the language of the action item(s). This is useful if you want to avoid issues with Screen Readers trying to read the proper language for the rendered text."},{"id":"packages-dropdown-actionmenu--custom-action-items","name":"Custom Action Items","snippet":"const CustomActionItems = () => {\n    const [{selectedValues}, updateArgs] = useArgs();\n    const handleChange = (selectedItems: Array<string>) => {\n        updateArgs({selectedValues: selectedItems});\n    };\n\n    return (\n        <ActionMenu\n            menuText=\"Custom Action Items\"\n            onChange={handleChange}\n            selectedValues={selectedValues} />\n    );\n};","description":"ActionMenu can be used with custom action items. This is useful when you want to use more rich action items, such as the ones used in context menus. ActionItem internally uses the `DetailCell` component, which is a component that allows you to pass: - `subtitle1`: a subtitle before the label - `subtitle2`: a subtitle after the label - `leftAccessory`: An accessory at the start of the item. - `rightAccessory`: An accessory at the end of the item."},{"id":"packages-dropdown-actionmenu--opening-modal","name":"Opening a Modal","snippet":"const OpeningModal = () => {\n    const [opened, setOpened] = React.useState(false);\n\n    return (\n        <>\n            <ActionMenu>\n                <ActionItem\n                    key=\"1\"\n                    label=\"Profile\"\n                    href=\"http://khanacademy.org/profile\"\n                    target=\"_blank\"\n                    testId=\"profile\" />\n                <ActionItem\n                    key=\"2\"\n                    label=\"Open modal\"\n                    testId=\"modal\"\n                    onClick={() => {\n                        console.log(\"open modal\");\n                        setOpened(true);\n                    }} />\n            </ActionMenu>\n            <ModalLauncher\n                onClose={() => {\n                    setOpened(false);\n                }}\n                opened={opened}\n                modal={({closeModal}) => (\n                    <OnePaneDialog\n                        title=\"Are you sure?\"\n                        content=\"This is just a test\"\n                        style={{maxBlockSize: \"fit-content\"}}\n                        footer={\n                            <View\n                                style={{\n                                    flexDirection: \"row\",\n                                    gap: sizing.size_160,\n                                }}\n                            >\n                                <Button\n                                    kind=\"tertiary\"\n                                    onClick={closeModal}\n                                >\n                                    Cancel\n                                </Button>\n                                <Button\n                                    actionType=\"destructive\"\n                                    onClick={closeModal}\n                                >\n                                    Delete\n                                </Button>\n                            </View>\n                        }\n                    />\n                )} />\n        </>\n    );\n};","description":"This example shows how to use the ActionMenu with a modal. The modal is opened when the user presses the \"Open modal\" action item. This could be done by pressing `Enter`/`Space` when the opener is focused. Use the keyboard to navigate to the \"Open modal\" action item and press `Enter` or `Space` to open the modal. Then navigate on the modal by pressing Tab and `Shift` + `Tab`."},{"id":"packages-dropdown-actionmenu--aria-label","name":"Aria Label","snippet":"const AriaLabel = () => {\n    const [selectedItem, setSelectedItem] = React.useState<string | null>(\n        null,\n    );\n\n    const classOptions = [\n        {\n            label: \"Math\",\n            ariaLabel: \"Select Math class\",\n        },\n        {\n            label: \"Science\",\n            ariaLabel: \"Select Science class\",\n        },\n        {\n            label: \"History\",\n            ariaLabel: \"Select History class\",\n        },\n    ];\n\n    return (\n        <ActionMenu\n            aria-label={\n                selectedItem\n                    ? `${selectedItem} - List of classes`\n                    : \"List of classes\"\n            }\n            opener={() => (\n                <Button endIcon={IconMappings.caretDown}>\n                    {selectedItem ? selectedItem : \"List of classes\"}\n                </Button>\n            )}>\n            {classOptions.map((opt) => (\n                <ActionItem\n                    key={opt.label}\n                    label={opt.label}\n                    aria-label={opt.ariaLabel}\n                    onClick={() => {\n                        setSelectedItem(opt.label);\n                        action(`Selected ${opt.label}`);\n                    }}\n                />\n            ))}\n        </ActionMenu>\n    );\n};","description":"This example shows how to use `aria-label` on the ActionMenu opener and `ActionItem` children. This is especially useful if you do **not** have a visible label component but want to ensure accessibility. For more details, see the [accessibility documentation](./?path=/docs/packages-dropdown-actionmenu-accessibility--docs). As you can see, the `ActionMenu` opener visually shows the selected item, but the `aria-label` attribute on the opener provides a more descriptive label for the action menu. **NOTE:** Make sure to include relevant information in `aria-label` if the ActionMenu is used to select an item from a list."}],"import":"import {\n    ActionItem,\n    ActionMenu,\n    ComponentInfo,\n    CustomOpener,\n    OptionItem,\n    SeparatorItem,\n} from \"@khanacademy/wonder-blocks-dropdown\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { Checkbox } from \"@khanacademy/wonder-blocks-form\";\nimport IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport { ModalLauncher, OnePaneDialog } from \"@khanacademy/wonder-blocks-modal\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { StatusBadge } from \"@khanacademy/wonder-blocks-badge\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A menu that consists of various types of items. ### Usage ```tsx import {ActionMenu, ActionItem} from \"@khanacademy/wonder-blocks-dropdown\"; <ActionMenu menuText=\"Menu\"> <ActionItem href=\"/profile\" label=\"Profile\" /> <ActionItem label=\"Settings\" onClick={() => {}} /> </ActionMenu> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-dropdown/src/index.ts","description":"A menu that consists of various types of items.\n\n## Usage\n\n```jsx\nimport {ActionMenu, ActionItem} from \"@khanacademy/wonder-blocks-dropdown\";\n\n<ActionMenu menuText=\"Menu\">\n <ActionItem href=\"/profile\" label=\"Profile\" />\n <ActionItem label=\"Settings\" onClick={() => {}} />\n</ActionMenu>\n```","displayName":"ActionMenu","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"children":{"defaultValue":null,"description":"The items in this dropdown.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"Item | Item[]"}},"menuText":{"defaultValue":null,"description":"Text for the opener of this menu.","name":"menuText","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"opened":{"defaultValue":null,"description":"Can be used to override the state of the ActionMenu by parent elements","name":"opened","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onToggle":{"defaultValue":null,"description":"In controlled mode, use this prop in case the parent needs to be notified\nwhen the menu opens/closes.","name":"onToggle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((opened: boolean) => unknown)"}},"onChange":{"defaultValue":null,"description":"A callback that returns items that are newly selected. Use only if this\nmenu contains select items (and make sure selectedValues is defined).","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((selectedItems: string[]) => unknown)"}},"selectedValues":{"defaultValue":null,"description":"The values of the items that are currently selected. Use only if this\nmenu contains select items (and make sure onChange is defined).","name":"selectedValues","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string[]"}},"alignment":{"defaultValue":{"value":"left"},"description":"The alignment of the menu component in relation to the opener\ncomponent. Defaults to \"left\", which is below the opener and left\naligned. Any valid Popper placement is also supported.","name":"alignment","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"Placement","value":[{"value":"\"auto\""},{"value":"\"left\""},{"value":"\"right\""},{"value":"\"auto-start\""},{"value":"\"auto-end\""},{"value":"\"top\""},{"value":"\"bottom\""},{"value":"\"top-start\""},{"value":"\"top-end\""},{"value":"\"bottom-start\""},{"value":"\"bottom-end\""},{"value":"\"right-start\""},{"value":"\"right-end\""},{"value":"\"left-start\""},{"value":"\"left-end\""}]}},"disabled":{"defaultValue":{"value":"false"},"description":"Whether this component is disabled. A disabled dropdown may not be opened\nand does not support interaction. Defaults to false.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"dropdownStyle":{"defaultValue":null,"description":"Styling specific to the dropdown component that isn't part of the opener,\npassed by the specific implementation of the dropdown menu,","name":"dropdownStyle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"style":{"defaultValue":null,"description":"Optional styling for the entire dropdown component.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Optional CSS classes for the entire dropdown component.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"opener":{"defaultValue":null,"description":"The child function that returns the anchor the ActionMenu will be\nactivated by. This function takes eventState, which allows the opener\nelement to access pointer event state.","name":"opener","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((openerProps: OpenerProps) => ReactElement<any, string | JSXElementConstructor<any>>)"}},"dropdownId":{"defaultValue":null,"description":"Unique identifier attached to the menu dropdown. If used, we need to\nguarantee that the ID is unique within everything rendered on a page.\nIf one is not provided, one is auto-generated. It is used for the\nopener's `aria-controls` attribute for screenreaders.","name":"dropdownId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"id":{"defaultValue":null,"description":"Unique identifier attached to the field control. If this is used, we\nneed to guarantee that the ID is unique within everything rendered on\na page. If one is not provided, one is auto-generated.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/action-menu.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}}},"exportName":"ActionMenu"}},"packages-dropdown-combobox":{"id":"packages-dropdown-combobox","name":"Combobox","path":"./__docs__/wonder-blocks-dropdown/combobox.stories.tsx","stories":[{"id":"packages-dropdown-combobox--default","name":"Default","snippet":"const Default = () => {\n    const [{selectionType, value}, updateArgs] = useArgs();\n    const prevSelectionTypeRef = React.useRef(args.selectionType);\n\n    // Allows switching between single and multiple selection types without\n    // losing the selected value.\n    React.useEffect(() => {\n        // Try to keep the value in sync with the selection type\n        if (selectionType !== prevSelectionTypeRef.current) {\n            if (selectionType === \"single\") {\n                updateArgs({\n                    value: Array.isArray(value) ? value[0] : value,\n                });\n            } else if (selectionType === \"multiple\") {\n                updateArgs({value: Array.isArray(value) ? value : [value]});\n            }\n        }\n        prevSelectionTypeRef.current = selectionType;\n    }, [updateArgs, selectionType, value]);\n\n    return (\n        <Combobox\n            selectionType=\"single\"\n            key={prevSelectionTypeRef.current}\n            value={value}\n            onChange={(newValue) => {\n                updateArgs({value: newValue});\n                action(\"onChange\")(newValue);\n            }}>{items}</Combobox>\n    );\n};","description":"The default Combobox with a list of items."},{"id":"packages-dropdown-combobox--single-select-combobox","name":"Combobox with single selection","snippet":"const SingleSelectCombobox = () => <Combobox value=\"pear\">{items}</Combobox>;","description":"Combobox supports by default single selection. This means that only one element can be selected from the listbox at a time. In this example, we show how this is done by setting a state variable in the parent component."},{"id":"packages-dropdown-combobox--single-selection","name":"Single selection (Controlled input)","snippet":"const SingleSelection = () => {\n    const [value, setValue] = React.useState(args.value);\n\n    return (\n        <Combobox\n            value={value}\n            onChange={(newValue) => {\n                setValue(newValue);\n                action(\"onChange\")(newValue);\n            }}>{items}</Combobox>\n    );\n};","description":"`Combobox` can also be used in controlled mode. In this example, the selected value is \"pear\". If another item is selected, the previously selected item is deselected. This is the default selection type, and it is also set by specifying value as a `string`."},{"id":"packages-dropdown-combobox--controlled-combobox","name":"Controlled Combobox (opened state)","snippet":"const ControlledCombobox = () => {\n    const [opened, setOpened] = React.useState(args.opened);\n    const [value, setValue] = React.useState(args.value);\n\n    React.useEffect(() => {\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <View style={{gap: sizing.size_160}}>\n            <Checkbox label=\"Open\" onChange={setOpened} checked={opened} />\n            <Combobox\n                opened={opened}\n                onToggle={() => {\n                    setOpened(!opened);\n                    action(\"onToggle\")();\n                }}\n                onChange={(newValue) => {\n                    setValue(newValue);\n                    action(\"onChange\")(newValue);\n                }}\n                value={value}>{items}</Combobox>\n        </View>\n    );\n};","description":"`Combobox` can work as a controlled component. This can be done by setting a value to the `opened` prop (`true` or `false`). In this case, the parent is responsible for managing the opening/closing of the listbox when using this prop. This means that you'll also have to update `opened` to the value triggered by the `onToggle` prop."},{"id":"packages-dropdown-combobox--disabled","name":"Disabled","snippet":"const Disabled = () => <Combobox disabled value=\"pear\" />;","description":"A Combobox can be disabled. When disabled, the Combobox cannot be interacted with."},{"id":"packages-dropdown-combobox--multiple-selection","name":"Multiple Selection","snippet":"const MultipleSelection = () => {\n    const [value, setValue] = React.useState(args.value);\n\n    return (\n        <Combobox\n            selectionType=\"multiple\"\n            value={value}\n            onChange={(newValue) => {\n                setValue(newValue);\n                action(\"onChange\")(newValue);\n            }}>{items}</Combobox>\n    );\n};","description":"Combobox supports multiple selection. This means that more than one element can be selected from the listbox at a time. In this example, we show how this is done by using an array of strings as the value and setting the `selectionType` prop to \"multiple\". To navigate using the keyboard, use: - Arrow keys (`up`, `down`) to navigate through the listbox. - `Enter` to select an item. - Arrow keys (`left`, `right`) to navigate through the selected items."},{"id":"packages-dropdown-combobox--controlled-multilple-combobox","name":"Controlled Multi-select Combobox (opened state)","snippet":"const ControlledMultilpleCombobox = () => {\n    const [opened, setOpened] = React.useState(args.opened);\n    const [value, setValue] = React.useState(args.value);\n\n    return (\n        <Combobox\n            selectionType=\"multiple\"\n            testId=\"test-combobox\"\n            opened={opened}\n            onToggle={() => {\n                setOpened(!opened);\n                action(\"onToggle\")();\n            }}\n            onChange={(newValue) => {\n                setValue(newValue);\n                action(\"onChange\")(newValue);\n            }}\n            value={value}>{items}</Combobox>\n    );\n};","description":"This example shows how to use the multi-select `Combobox` component in controlled mode."},{"id":"packages-dropdown-combobox--auto-complete","name":"Autocomplete","snippet":"const AutoComplete = () => <Combobox placeholder=\"Type to search\" autoComplete=\"list\">{items}</Combobox>;","description":"`Combobox` supports autocompletion. This means that the listbox will show options that match the user's input. Note that the search is case-insensitive and it will match any part of the option item's label. This is useful when using custom option items that could contain Typography components or other elements. In this example, we show how this is done by setting the `autoComplete` prop to \"list\"."},{"id":"packages-dropdown-combobox--auto-complete-multi-select","name":"Autocomplete (Multi-select)","snippet":"const AutoCompleteMultiSelect = () => <Combobox placeholder=\"Type to search\" autoComplete=\"list\" selectionType=\"multiple\">{customItems}</Combobox>;","description":"Below you can see an example of a multi-select `Combobox` with custom option items and autocompletion. This means that the listbox will show options that match the user's input. **NOTE:** If you want to use a custom Typography component in the option label, you'll need to set the `labelAsText` prop to the text you want to search for."},{"id":"packages-dropdown-combobox--error","name":"Error","snippet":"const Error = () => {\n    const [error, setError] = React.useState(args.error);\n    const [value, setValue] = React.useState(args.value);\n\n    return (\n        <Combobox\n            error={error}\n            value={value}\n            onChange={(newValue) => {\n                setValue(newValue);\n                setError(newValue !== \"\" ? false : true);\n                action(\"onChange\")(newValue);\n            }}>{items}</Combobox>\n    );\n};","description":"This `Combobox` is in an error state. Selecting any option will clear the error state by updating the `error` prop to `false`. **NOTE:** We internally apply the correct `aria-invalid` attribute based on the `error` prop."},{"id":"packages-dropdown-combobox--start-icon","name":"Start Icon","snippet":"const StartIcon = () => {\n    const [_, updateArgs] = useArgs();\n\n    return (\n        <View style={{gap: sizing.size_160}}>\n            <BodyText>With default size and color:</BodyText>\n            <Combobox\n                startIcon={<PhosphorIcon icon={magnifyingGlassIcon} />}\n                onChange={(newValue) => {\n                    updateArgs({value: newValue});\n                    action(\"onChange\")(newValue);\n                }}>{items}</Combobox>\n            <BodyText>With custom size:</BodyText>\n            <Combobox\n                startIcon={\n                    <PhosphorIcon\n                        icon={magnifyingGlassIcon}\n                        size=\"medium\"\n                    />\n                }\n                onChange={(newValue) => {\n                    updateArgs({value: newValue});\n                    action(\"onChange\")(newValue);\n                }}>{items}</Combobox>\n            <BodyText>With custom color:</BodyText>\n            <Combobox\n                startIcon={\n                    <PhosphorIcon\n                        icon={magnifyingGlassIcon}\n                        size=\"small\"\n                        color={\n                            semanticColor.core.foreground.instructive.strong\n                        }\n                    />\n                }\n                onChange={(newValue) => {\n                    updateArgs({value: newValue});\n                    action(\"onChange\")(newValue);\n                }}>{items}</Combobox>\n            <BodyText>Disabled (overrides color prop):</BodyText>\n            <Combobox\n                startIcon={\n                    <PhosphorIcon\n                        icon={magnifyingGlassIcon}\n                        size=\"small\"\n                        color={\n                            semanticColor.core.foreground.instructive.strong\n                        }\n                    />\n                }\n                disabled={true}\n                onChange={(newValue) => {\n                    updateArgs({value: newValue});\n                    action(\"onChange\")(newValue);\n                }}>{items}</Combobox>\n        </View>\n    );\n};","description":"With `startIcon`, you can customize the icon that appears at the beginning of the Combobox. This is useful when you want to add a custom icon to the component. **NOTE:** When `startIcon` is set, we set some default values for the icon: - `size`: \"small\" - `color`: `semanticColor.core.foreground.neutral.default` You can customize the size and color of the icon by passing the `size` and `color` props to the `PhosphorIcon` component."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { Checkbox } from \"@khanacademy/wonder-blocks-form\";\nimport { Combobox, ComponentInfo, OptionItem } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Combobox\" component.\n  69 | };\n  70 |\n> 71 | export default {\n     | ^\n  72 |     title: \"Packages / Dropdown / Combobox\",\n  73 |     component: Combobox,\n  74 |     args: defaultArgs,\n\n./__docs__/wonder-blocks-dropdown/combobox.stories.tsx:\nimport {action} from \"storybook/actions\";\nimport {useArgs} from \"storybook/preview-api\";\nimport {Meta, StoryObj} from \"@storybook/react-vite\";\nimport {expect, userEvent, within} from \"storybook/test\";\nimport {StyleSheet} from \"aphrodite\";\nimport * as React from \"react\";\nimport magnifyingGlassIcon from \"@phosphor-icons/core/bold/magnifying-glass-bold.svg\";\n\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {Checkbox} from \"@khanacademy/wonder-blocks-form\";\nimport {Combobox, OptionItem} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport {PropsFor, View} from \"@khanacademy/wonder-blocks-core\";\nimport {allProfilesWithPictures} from \"./option-item-examples\";\n\nimport argTypes from \"./combobox.argtypes\";\n\nimport packageConfig from \"../../packages/wonder-blocks-dropdown/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\n\nconst items = [\n    <OptionItem label=\"Banana\" value=\"banana\" key={0} />,\n    <OptionItem label=\"Strawberry\" value=\"strawberry\" disabled key={1} />,\n    <OptionItem label=\"Pear\" value=\"pear\" key={2} />,\n    <OptionItem label=\"Pineapple\" value=\"pineapple\" key={3} />,\n    <OptionItem label=\"Orange\" value=\"orange\" key={4} />,\n    <OptionItem label=\"Watermelon\" value=\"watermelon\" key={5} />,\n    <OptionItem label=\"Apple\" value=\"apple\" key={6} />,\n    <OptionItem label=\"Grape\" value=\"grape\" key={7} />,\n    <OptionItem label=\"Lemon\" value=\"lemon\" key={8} />,\n    <OptionItem label=\"Mango\" value=\"mango\" key={9} />,\n];\n\nconst customItems = allProfilesWithPictures.map((user, index) => (\n    <OptionItem\n        key={user.id}\n        value={user.id}\n        horizontalRule=\"full-width\"\n        label={<BodyText weight=\"bold\">{user.name}</BodyText>}\n        // TODO(WB-1752): Refactor API and types to enforce this prop when\n        // `label` is not a string.\n        labelAsText={user.name}\n        leftAccessory={user.picture}\n        subtitle2={user.email}\n    />\n));\n\nconst styles = StyleSheet.create({\n    example: {\n        background: semanticColor.core.background.base.subtle,\n        padding: sizing.size_160,\n        width: 300,\n    },\n    wrapper: {\n        height: 550,\n    },\n});\n\nconst defaultArgs = {\n    children: items,\n    disabled: false,\n    placeholder: \"Select an item\",\n    testId: \"\",\n    autoComplete: \"none\",\n    loading: false,\n    \"aria-label\": \"\", // Setting to empty string to avoid SB control showing as an object to represent undefined\n};\n\nexport default {\n    title: \"Packages / Dropdown / Combobox\",\n    component: Combobox,\n    args: defaultArgs,\n    argTypes,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>\n                <Story />\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n    },\n} as Meta<typeof Combobox>;\n\ntype Story = StoryObj<typeof Combobox>;\n\n/**\n * The default Combobox with a list of items.\n */\nexport const Default: Story = {\n    render: function Render(args: PropsFor<typeof Combobox>) {\n        const [{selectionType, value}, updateArgs] = useArgs();\n        const prevSelectionTypeRef = React.useRef(args.selectionType);\n\n        // Allows switching between single and multiple selection types without\n        // losing the selected value.\n        React.useEffect(() => {\n            // Try to keep the value in sync with the selection type\n            if (selectionType !== prevSelectionTypeRef.current) {\n                if (selectionType === \"single\") {\n                    updateArgs({\n                        value: Array.isArray(value) ? value[0] : value,\n                    });\n                } else if (selectionType === \"multiple\") {\n                    updateArgs({value: Array.isArray(value) ? value : [value]});\n                }\n            }\n            prevSelectionTypeRef.current = selectionType;\n        }, [updateArgs, selectionType, value]);\n\n        return (\n            <Combobox\n                {...args}\n                key={prevSelectionTypeRef.current}\n                value={value}\n                onChange={(newValue) => {\n                    updateArgs({value: newValue});\n                    action(\"onChange\")(newValue);\n                }}\n            />\n        );\n    },\n    args: {\n        children: items,\n        selectionType: \"single\",\n    },\n    // Hide the story in the Docs page (useful for snapshots).\n    tags: [\"!autodocs\"],\n};\n\n/**\n * Combobox supports by default single selection. This means that only one\n * element can be selected from the listbox at a time. In this example, we show\n * how this is done by setting a state variable in the parent component.\n */\nexport const SingleSelectCombobox = {\n    name: \"Combobox with single selection\",\n    args: {\n        children: items,\n        value: \"pear\",\n    },\n};\n\n/**\n * `Combobox` can also be used in controlled mode. In this example, the selected\n * value is \"pear\". If another item is selected, the previously selected item is\n * deselected. This is the default selection type, and it is also set by\n * specifying value as a `string`.\n */\nexport const SingleSelection: Story = {\n    name: \"Single selection (Controlled input)\",\n    render: function Render(args: PropsFor<typeof Combobox>) {\n        const [value, setValue] = React.useState(args.value);\n\n        return (\n            <Combobox\n                {...args}\n                value={value}\n                onChange={(newValue) => {\n                    setValue(newValue);\n                    action(\"onChange\")(newValue);\n                }}\n            />\n        );\n    },\n    args: {\n        children: items,\n        value: \"pear\",\n    },\n    parameters: {\n        chromatic: {\n            // we don't need screenshots because this story only tests behavior.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * `Combobox` can work as a controlled component. This can be done by setting a\n * value to the `opened` prop (`true` or `false`). In this case, the parent is\n * responsible for managing the opening/closing of the listbox when using this\n * prop.\n *\n * This means that you'll also have to update `opened` to the value triggered by\n * the `onToggle` prop.\n */\nexport const ControlledCombobox: Story = {\n    name: \"Controlled Combobox (opened state)\",\n    render: function Render(args: PropsFor<typeof Combobox>) {\n        const [opened, setOpened] = React.useState(args.opened);\n        const [value, setValue] = React.useState(args.value);\n\n        React.useEffect(() => {\n            setOpened(args.opened);\n        }, [args.opened]);\n\n        return (\n            <View style={{gap: sizing.size_160}}>\n                <Checkbox label=\"Open\" onChange={setOpened} checked={opened} />\n                <Combobox\n                    {...args}\n                    opened={opened}\n                    onToggle={() => {\n                        setOpened(!opened);\n                        action(\"onToggle\")();\n                    }}\n                    onChange={(newValue) => {\n                        setValue(newValue);\n                        action(\"onChange\")(newValue);\n                    }}\n                    value={value}\n                />\n            </View>\n        );\n    },\n    args: {\n        children: items,\n        opened: false,\n    },\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.wrapper}>{Story()}</View>\n        ),\n    ],\n    play: async ({canvasElement}) => {\n        // Arrange\n        const canvas = within(canvasElement.ownerDocument.body);\n\n        // Act\n        // Open the combobox by clicking the checkbox\n        await userEvent.click(canvas.getByRole(\"checkbox\"));\n\n        // Assert\n        await expect(canvas.getByRole(\"listbox\")).toBeVisible();\n    },\n};\n\n/**\n * A Combobox can be disabled. When disabled, the Combobox cannot be interacted\n * with.\n */\nexport const Disabled = {\n    args: {\n        disabled: true,\n        value: \"pear\",\n    },\n};\n\n/**\n * Combobox supports multiple selection. This means that more than one element\n * can be selected from the listbox at a time. In this example, we show how this\n * is done by using an array of strings as the value and setting the\n * `selectionType` prop to \"multiple\".\n *\n * To navigate using the keyboard, use:\n * - Arrow keys (`up`, `down`) to navigate through the listbox.\n * - `Enter` to select an item.\n * - Arrow keys (`left`, `right`) to navigate through the selected items.\n */\nexport const MultipleSelection: Story = {\n    render: function Render(args: PropsFor<typeof Combobox>) {\n        const [value, setValue] = React.useState(args.value);\n\n        return (\n            <Combobox\n                {...args}\n                value={value}\n                onChange={(newValue) => {\n                    setValue(newValue);\n                    action(\"onChange\")(newValue);\n                }}\n            />\n        );\n    },\n    args: {\n        children: items,\n        value: [\"pear\", \"grape\"],\n        selectionType: \"multiple\",\n    },\n    parameters: {\n        chromatic: {\n            // we don't need screenshots because this story only tests behavior.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * This example shows how to use the multi-select `Combobox` component in\n * controlled mode.\n */\nexport const ControlledMultilpleCombobox: Story = {\n    name: \"Controlled Multi-select Combobox (opened state)\",\n    render: function Render(args: PropsFor<typeof Combobox>) {\n        const [opened, setOpened] = React.useState(args.opened);\n        const [value, setValue] = React.useState(args.value);\n\n        return (\n            <Combobox\n                {...args}\n                testId=\"test-combobox\"\n                opened={opened}\n                onToggle={() => {\n                    setOpened(!opened);\n                    action(\"onToggle\")();\n                }}\n                onChange={(newValue) => {\n                    setValue(newValue);\n                    action(\"onChange\")(newValue);\n                }}\n                value={value}\n            />\n        );\n    },\n    args: {\n        children: items,\n        opened: true,\n        value: [\"pear\", \"grape\"],\n        selectionType: \"multiple\",\n    },\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.wrapper}>{Story()}</View>\n        ),\n    ],\n\n    play: async ({canvasElement}) => {\n        const canvas = within(canvasElement.ownerDocument.body);\n\n        // Move to second option item\n        await userEvent.keyboard(\"{ArrowDown}\");\n\n        // Act\n        // Select the second option item\n        await userEvent.keyboard(\"{Enter}\");\n\n        // Assert\n        expect(canvas.getByTestId(\"test-combobox-status\")).toHaveTextContent(\n            \"Pineapple selected, 4 of 10. 10 results available.\",\n        );\n    },\n    // Hide the story in the Docs page (useful for snapshots).\n    tags: [\"!autodocs\"],\n};\n\n/**\n * `Combobox` supports autocompletion. This means that the listbox will show\n * options that match the user's input. Note that the search is case-insensitive\n * and it will match any part of the option item's label. This is useful when\n * using custom option items that could contain Typography components or other\n * elements.\n *\n * In this example, we show how this is done by setting the `autoComplete` prop\n * to \"list\".\n */\nexport const AutoComplete: Story = {\n    args: {\n        children: items,\n        placeholder: \"Type to search\",\n        autoComplete: \"list\",\n    },\n    name: \"Autocomplete\",\n    parameters: {\n        chromatic: {\n            // Disabling because this doesn't test anything visual.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * Below you can see an example of a multi-select `Combobox` with custom option\n * items and autocompletion. This means that the listbox will show options that\n * match the user's input.\n *\n * **NOTE:** If you want to use a custom Typography component in the option\n * label, you'll need to set the `labelAsText` prop to the text you want to\n * search for.\n */\nexport const AutoCompleteMultiSelect: Story = {\n    args: {\n        children: customItems,\n        placeholder: \"Type to search\",\n        autoComplete: \"list\",\n        selectionType: \"multiple\",\n    },\n    name: \"Autocomplete (Multi-select)\",\n    parameters: {\n        chromatic: {\n            // Disabling because this doesn't test anything visual.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * This `Combobox` is in an error state. Selecting any option will clear the\n * error state by updating the `error` prop to `false`.\n *\n * **NOTE:** We internally apply the correct `aria-invalid` attribute based on\n * the `error` prop.\n */\n\nexport const Error: Story = {\n    render: function Render(args: PropsFor<typeof Combobox>) {\n        const [error, setError] = React.useState(args.error);\n        const [value, setValue] = React.useState(args.value);\n\n        return (\n            <Combobox\n                {...args}\n                error={error}\n                value={value}\n                onChange={(newValue) => {\n                    setValue(newValue);\n                    setError(newValue !== \"\" ? false : true);\n                    action(\"onChange\")(newValue);\n                }}\n            />\n        );\n    },\n    args: {\n        children: items,\n        error: true,\n    },\n};\n\n/**\n * With `startIcon`, you can customize the icon that appears at the beginning of\n * the Combobox. This is useful when you want to add a custom icon to the\n * component.\n *\n * **NOTE:** When `startIcon` is set, we set some default values for the icon:\n * - `size`: \"small\"\n * - `color`: `semanticColor.core.foreground.neutral.default`\n *\n * You can customize the size and color of the icon by passing the `size` and\n * `color` props to the `PhosphorIcon` component.\n */\nexport const StartIcon: Story = {\n    render: function Render(args: PropsFor<typeof Combobox>) {\n        const [_, updateArgs] = useArgs();\n\n        return (\n            <View style={{gap: sizing.size_160}}>\n                <BodyText>With default size and color:</BodyText>\n                <Combobox\n                    {...args}\n                    startIcon={<PhosphorIcon icon={magnifyingGlassIcon} />}\n                    onChange={(newValue) => {\n                        updateArgs({value: newValue});\n                        action(\"onChange\")(newValue);\n                    }}\n                />\n                <BodyText>With custom size:</BodyText>\n                <Combobox\n                    {...args}\n                    startIcon={\n                        <PhosphorIcon\n                            icon={magnifyingGlassIcon}\n                            size=\"medium\"\n                        />\n                    }\n                    onChange={(newValue) => {\n                        updateArgs({value: newValue});\n                        action(\"onChange\")(newValue);\n                    }}\n                />\n                <BodyText>With custom color:</BodyText>\n                <Combobox\n                    {...args}\n                    startIcon={\n                        <PhosphorIcon\n                            icon={magnifyingGlassIcon}\n                            size=\"small\"\n                            color={\n                                semanticColor.core.foreground.instructive.strong\n                            }\n                        />\n                    }\n                    onChange={(newValue) => {\n                        updateArgs({value: newValue});\n                        action(\"onChange\")(newValue);\n                    }}\n                />\n                <BodyText>Disabled (overrides color prop):</BodyText>\n                <Combobox\n                    {...args}\n                    startIcon={\n                        <PhosphorIcon\n                            icon={magnifyingGlassIcon}\n                            size=\"small\"\n                            color={\n                                semanticColor.core.foreground.instructive.strong\n                            }\n                        />\n                    }\n                    disabled={true}\n                    onChange={(newValue) => {\n                        updateArgs({value: newValue});\n                        action(\"onChange\")(newValue);\n                    }}\n                />\n            </View>\n        );\n    },\n    args: {\n        children: items,\n    },\n};\n"}},"packages-dropdown-customopener":{"id":"packages-dropdown-customopener","name":"CustomOpener","path":"./__docs__/wonder-blocks-dropdown/custom-opener.stories.tsx","stories":[{"id":"packages-dropdown-customopener--default","name":"Default","snippet":"const Default = function Render() {\n    const [value, setValue] = React.useState<string>(\"\");\n\n    return (\n        <SingleSelect\n            aria-label=\"Fruit\"\n            placeholder=\"Choose a fruit\"\n            selectedValue={value}\n            onChange={setValue}\n            opener={({hovered, pressed, text}) => (\n                <CustomOpener\n                    styles={{\n                        root: [\n                            styles.opener,\n                            hovered && styles.openerHovered,\n                            pressed && styles.openerPressed,\n                        ],\n                    }}\n                >\n                    <BodyText tag=\"span\">{text}</BodyText>\n                    <PhosphorIcon icon={caretDownIcon} size=\"small\" />\n                </CustomOpener>\n            )}\n        >\n            <OptionItem label=\"Mango\" value=\"mango\" />\n            <OptionItem label=\"Strawberry\" value=\"strawberry\" />\n            <OptionItem label=\"Pear\" value=\"pear\" />\n        </SingleSelect>\n    );\n};","description":"A minimal `CustomOpener` inside a `SingleSelect`. The opener uses `hovered` and `pressed` from the render prop to adjust background color. The WB focus ring is applied automatically when the button receives keyboard focus — no extra wiring needed."},{"id":"packages-dropdown-customopener--disabled","name":"Disabled","snippet":"const Disabled = function Render() {\n    return (\n        <SingleSelect\n            aria-label=\"Fruit\"\n            placeholder=\"Choose a fruit\"\n            selectedValue=\"\"\n            onChange={() => {}}\n            disabled\n            opener={({text}) => (\n                <CustomOpener\n                    styles={{root: [styles.opener, styles.openerDisabled]}}\n                >\n                    <BodyText tag=\"span\">{text}</BodyText>\n                    <PhosphorIcon icon={caretDownIcon} size=\"small\" />\n                </CustomOpener>\n            )}\n        >\n            <OptionItem label=\"Mango\" value=\"mango\" />\n            <OptionItem label=\"Strawberry\" value=\"strawberry\" />\n        </SingleSelect>\n    );\n};","description":"When `disabled` is set on the parent dropdown, it is forwarded to `CustomOpener` via `aria-disabled`. The opener stays focusable but non-interactive. You must supply visual disabled styles yourself via `styles.root` — `CustomOpener` only sets `cursor: not-allowed`. In this example, the text color and border are muted using `semanticColor` disabled tokens."},{"id":"packages-dropdown-customopener--all-states","name":"All States","snippet":"const AllStates = function Render() {\n    const states = [\n        {label: \"Rest\", hovered: false, pressed: false, disabled: false},\n        {label: \"Hover\", hovered: true, pressed: false, disabled: false},\n        {label: \"Pressed\", hovered: false, pressed: true, disabled: false},\n        {label: \"Disabled\", hovered: false, pressed: false, disabled: true},\n    ];\n\n    return (\n        <View style={styles.allStatesContainer}>\n            {states.map(({label, hovered, pressed, disabled}) => (\n                <View key={label} style={styles.stateRow}>\n                    <BodyText style={styles.stateLabel}>{label}</BodyText>\n                    <CustomOpener\n                        disabled={disabled}\n                        styles={{\n                            root: [\n                                styles.opener,\n                                hovered && styles.openerHovered,\n                                pressed && styles.openerPressed,\n                                disabled && styles.openerDisabled,\n                            ],\n                        }}\n                    >\n                        <BodyText tag=\"span\">Choose a fruit</BodyText>\n                        <PhosphorIcon icon={caretDownIcon} size=\"small\" />\n                    </CustomOpener>\n                </View>\n            ))}\n            <View style={styles.stateRow}>\n                <BodyText style={styles.stateLabel}>\n                    Focus (tab to see)\n                </BodyText>\n                <CustomOpener styles={{root: styles.opener}}>\n                    <BodyText tag=\"span\">Choose a fruit</BodyText>\n                    <PhosphorIcon icon={caretDownIcon} size=\"small\" />\n                </CustomOpener>\n            </View>\n        </View>\n    );\n};","description":"A full state demo showing how the opener should look in rest, hover, pressed, focus, and disabled states side-by-side. Because `CustomOpener` gives you a blank slate, **all visual states except focus are your responsibility**. This story shows a reference implementation using `semanticColor` tokens."},{"id":"packages-dropdown-customopener--with-action-menu","name":"With Action Menu","snippet":"const WithActionMenu = function Render() {\n    const [opened, setOpened] = React.useState(false);\n    return (\n        <ActionMenu\n            menuText=\"Actions\"\n            opened={opened}\n            onToggle={setOpened}\n            opener={({hovered, pressed, text}) => (\n                <CustomOpener\n                    styles={{\n                        root: [\n                            styles.opener,\n                            hovered && styles.openerHovered,\n                            pressed && styles.openerPressed,\n                        ],\n                    }}\n                >\n                    <BodyText tag=\"span\">{text}</BodyText>\n                    <PhosphorIcon icon={caretDownIcon} size=\"small\" />\n                </CustomOpener>\n            )}\n        >\n            <ActionItem label=\"Edit\" onClick={() => {}} />\n            <ActionItem label=\"Delete\" onClick={() => {}} />\n        </ActionMenu>\n    );\n};","description":"A full implementation inside an `ActionMenu`, demonstrating that `CustomOpener` works with all three dropdown components (`SingleSelect`, `MultiSelect`, `ActionMenu`)."}],"import":"import {\n    ActionItem,\n    ActionMenu,\n    ComponentInfo,\n    CustomOpener,\n    OptionItem,\n    SingleSelect,\n} from \"@khanacademy/wonder-blocks-dropdown\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`CustomOpener` is a blank-slate button primitive for use inside the `opener` render prop of `SingleSelect`, `MultiSelect`, and `ActionMenu`. It provides correct semantics (`<button>`), the WB focus ring via `:focus-visible`, `aria-disabled` support, and ref forwarding — all required by the dropdown opener wiring. **Prefer the default opener** when it meets your design needs. `CustomOpener` is intended for cases where the default visual design cannot be used. ### States your implementation must handle The default opener automatically handles all interactive states. When you use `CustomOpener`, you are responsible for styling: - **Hover** — use the `hovered` value from the `opener` render prop - **Pressed** — use the `pressed` value from the `opener` render prop - **Disabled** — apply muted colors via `semanticColor` disabled tokens via the `style` prop (`cursor: not-allowed` is included automatically) Focus ring styles are provided automatically — you do not need to add them.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-dropdown/src/index.ts","description":"A blank-slate button primitive for use inside the `opener` render prop of\n`SingleSelect`, `MultiSelect`, and `ActionMenu`.\n\n`CustomOpener` provides:\n- A real `<button>` element (correct semantics, tab order, keyboard\n  activation via Space/Enter)\n- The WB focus ring via `:focus-visible`, baked in — no need to import\n  `focusStyles` yourself\n- `aria-disabled` instead of the native `disabled` attribute, keeping the\n  element focusable\n- Ref forwarding, which is required by the dropdown opener wiring\n- A CSS reset as a starting point so you control all visual styling\n\nThe `hovered`, `focused`, and `pressed` values from the `opener` render\nprop are available to pass to child content if your design needs them.\n\n## Disabled styling\n\n`CustomOpener` sets `cursor: not-allowed` when `disabled` is true, but you\nare responsible for applying visual disabled styles (e.g. reduced opacity or\nmuted colors using `semanticColor` disabled tokens) via `styles.root`.\nThe default opener handles this automatically, which is one reason it is\npreferred over custom implementations.\n\n## Usage\n\n```tsx\nimport {SingleSelect, CustomOpener} from \"@khanacademy/wonder-blocks-dropdown\";\n\n<SingleSelect\n  placeholder=\"Choose an option\"\n  opener={({hovered, focused, text}) => (\n    <CustomOpener styles={{root: styles.myOpener}}>\n      <MyOpenerContent hovered={hovered} focused={focused} text={text} />\n    </CustomOpener>\n  )}\n  onChange={handleChange}\n>\n  <OptionItem label=\"Option 1\" value=\"1\" />\n</SingleSelect>\n```\n\n## Ref forwarding note\n\n`CustomOpener` **must be the direct return value** of the `opener` render\nprop. The dropdown internals use `ReactDOM.findDOMNode` on the ref injected\nvia `cloneElement` to locate the opener element for focus management. This\nonly works correctly when the ref reaches an `HTMLElement` — which\n`CustomOpener` ensures by forwarding directly to its underlying `<button>`.\n\nIf you wrap `CustomOpener` in your own function component, that wrapper\n**must** use `React.forwardRef` and pass the ref through to `CustomOpener`,\notherwise the dropdown will lose focus management on close.","displayName":"CustomOpener","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"children":{"defaultValue":null,"description":"Content to render inside the button.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactNode"}},"disabled":{"defaultValue":null,"description":"Whether the opener is disabled.\n\nInternally, `aria-disabled` is used so the element remains focusable\nand included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the opener element.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"id":{"defaultValue":null,"description":"An optional id attribute.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the opener element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"testId":{"defaultValue":null,"description":"Test ID for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onClick":{"defaultValue":null,"description":"Called when the opener is clicked.","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onKeyDown":{"defaultValue":null,"description":"Called when the opener receives keyboard input.","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyUp":{"defaultValue":null,"description":"Called when a keyboard key is released on the opener.","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onFocus":{"defaultValue":null,"description":"Called when the opener receives focus.","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"onBlur":{"defaultValue":null,"description":"Called when the opener loses focus.","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"onMouseEnter":{"defaultValue":null,"description":"Called when the pointer enters the opener.","name":"onMouseEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseLeave":{"defaultValue":null,"description":"Called when the pointer leaves the opener.","name":"onMouseLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"styles":{"defaultValue":null,"description":"Optional custom styles for sub-elements within `CustomOpener`.\n\n- `root`: Styles applied to the root `<button>` element. Use this to\n  apply your visual design — layout, colors, borders, etc. The WB\n  focus ring is already included and does not need to be added here.\n- `label`: Styles applied to the `BodyText` element that wraps\n  `children`. Use this to customize typography (e.g. font weight,\n  color) without replacing the component entirely.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/custom-opener.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; label?: StyleType; }"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLButtonElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"CustomOpener"}},"packages-dropdown-listbox":{"id":"packages-dropdown-listbox","name":"Listbox","path":"./__docs__/wonder-blocks-dropdown/listbox.stories.tsx","stories":[{"id":"packages-dropdown-listbox--default","name":"Default","snippet":"const Default = () => <Listbox>{items}</Listbox>;","description":"The default listbox with a list of items. By default, the listbox is single-select and there are no selected items. This means that the listbox is in uncontrolled mode. To navigate the listbox, focus on it, then use the arrow keys. To select an item, press `Enter` or `Space`."},{"id":"packages-dropdown-listbox--single-selection","name":"Single selection (Controlled)","snippet":"const SingleSelection = () => {\n    const [value, setValue] = React.useState(args.value);\n\n    return (\n        <Listbox\n            value={value}\n            onChange={(newValue) => {\n                setValue(newValue);\n                action(\"onChange\")(newValue);\n            }}>{items}</Listbox>\n    );\n};","description":"`Listbox` can also be used in controlled mode. In this example, the selected value is \"pear\". If another item is selected, the previously selected item is deselected. This is the default selection type, and it is also set by specifying value as a `string`."},{"id":"packages-dropdown-listbox--multiple-selection","name":"Multiple Selection","snippet":"const MultipleSelection = () => <Listbox\n    value={[\"pear\", \"grape\"]}\n    onChange={(values) => {\n        action(\"onChange\")(values);\n    }}\n    selectionType=\"multiple\">{items}</Listbox>;","description":"Listbox can also have multiple selection. This is set by adding `selectionType=\"multiple\"` and specifying `value` as an array of strings."},{"id":"packages-dropdown-listbox--multiple-selection-controlled","name":"Multiple selection (Controlled)","snippet":"const MultipleSelectionControlled = () => {\n    const [value, setValue] = React.useState(args.value);\n\n    return (\n        <Listbox\n            selectionType=\"multiple\"\n            value={value}\n            onChange={(newValue) => {\n                setValue(newValue);\n                action(\"onChange\")(newValue);\n            }}>{items}</Listbox>\n    );\n};","description":"This example shows a controlled multi-select listbox with a default value of \"pear\" and \"grape\"."},{"id":"packages-dropdown-listbox--disabled","name":"Disabled","snippet":"const Disabled = () => <Listbox disabled value=\"pear\" />;","description":"A listbox with a list of items that are all disabled."},{"id":"packages-dropdown-listbox--using-aria-label","name":"Using Aria Label","snippet":"const UsingAriaLabel = () => <Listbox value=\"pear\" aria-label=\"Favorite fruit\">{items}</Listbox>;","description":"Aria attributes are used to describe the listbox. In this case, the listbox will be announced as \"Favorite fruit\" by screen readers."},{"id":"packages-dropdown-listbox--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => <Listbox value=\"pear\" style={styles.customListbox}>{items}</Listbox>;","description":"The listbox element can use custom styles when needed. In this example, we are passing a custom style to the listbox container, via the `style` prop."},{"id":"packages-dropdown-listbox--single-selection-custom-option-items","name":"Single selection with custom OptionItems","snippet":"const SingleSelectionCustomOptionItems = () => <Listbox\n    aria-label=\"Profiles\"\n    onChange={(value) => {\n        action(\"onChange\")(value);\n    }}>{allProfilesWithPictures.map((user, index) => (\n        <OptionItem\n            key={user.id}\n            value={user.id}\n            horizontalRule=\"full-width\"\n            label={user.name}\n            leftAccessory={user.picture}\n            subtitle1={\n                index === 1 ? (\n                    <StatusBadge label=\"New\" kind=\"info\" />\n                ) : undefined\n            }\n            subtitle2={user.email}\n        />\n    ))}</Listbox>;","description":"This example illustrates how you can use the `OptionItem` component to display a `listbox` with custom option items. Note that in this example, we are using `leftAccessory` to display a custom icon for each option item, `subtitle1` to optionally display a pill and `subtitle2` to display the email."},{"id":"packages-dropdown-listbox--multiple-selection-custom-option-items","name":"Multiple selection with custom OptionItems","snippet":"const MultipleSelectionCustomOptionItems = () => <Listbox selectionType=\"multiple\" />;","description":"This example illustrates how you can use the custom `OptionItem` component with a multi-select `Listbox`."}],"import":"import { ComponentInfo, Listbox, OptionItem } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { StatusBadge } from \"@khanacademy/wonder-blocks-badge\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Listbox\" component.\n  54 | };\n  55 |\n> 56 | export default {\n     | ^\n  57 |     title: \"Packages / Dropdown / Listbox\",\n  58 |     component: Listbox,\n  59 |     args: defaultArgs,\n\n./__docs__/wonder-blocks-dropdown/listbox.stories.tsx:\nimport {action} from \"storybook/actions\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\nimport {StyleSheet} from \"aphrodite\";\nimport * as React from \"react\";\n\nimport {PropsFor, View} from \"@khanacademy/wonder-blocks-core\";\nimport {Listbox, OptionItem} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\n\nimport {allProfilesWithPictures} from \"./option-item-examples\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport packageConfig from \"../../packages/wonder-blocks-dropdown/package.json\";\nimport {StatusBadge} from \"@khanacademy/wonder-blocks-badge\";\n\nconst items = [\n    <OptionItem label=\"Banana\" value=\"banana\" key={0} />,\n    <OptionItem label=\"Strawberry\" value=\"strawberry\" disabled key={1} />,\n    <OptionItem label=\"Pear\" value=\"pear\" key={2} />,\n    <OptionItem label=\"Orange\" value=\"orange\" key={3} />,\n    <OptionItem label=\"Watermelon\" value=\"watermelon\" key={4} />,\n    <OptionItem label=\"Apple\" value=\"apple\" key={5} />,\n    <OptionItem label=\"Grape\" value=\"grape\" key={6} />,\n    <OptionItem label=\"Lemon\" value=\"lemon\" key={7} />,\n    <OptionItem label=\"Mango\" value=\"mango\" key={8} />,\n];\n\nconst styles = StyleSheet.create({\n    example: {\n        background: semanticColor.core.background.base.subtle,\n        padding: sizing.size_160,\n        width: 360,\n    },\n    customListbox: {\n        border: `5px solid ${semanticColor.core.border.neutral.subtle}`,\n        width: 250,\n    },\n});\n\n/**\n * The default listbox with a list of items.\n *\n * When used separately, the listbox needs an aria-label. When bundled with a\n * component component like SingleSelect or MultiSelect, the listbox doesn't\n * need its own aria-label.\n *\n * These examples use an aria-label to allow them to stand alone.\n */\nconst defaultArgs = {\n    children: items,\n    disabled: false,\n    testId: \"\",\n    \"aria-label\": \"Fruit\",\n};\n\nexport default {\n    title: \"Packages / Dropdown / Listbox\",\n    component: Listbox,\n    args: defaultArgs,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>\n                <Story />\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n    },\n} as Meta<typeof Listbox>;\n\ntype Story = StoryObj<typeof Listbox>;\n\n/**\n * The default listbox with a list of items.\n *\n * By default, the listbox is single-select and there are no selected items.\n * This means that the listbox is in uncontrolled mode.\n *\n * To navigate the listbox, focus on it, then use the arrow keys. To select an\n * item, press `Enter` or `Space`.\n */\nexport const Default: Story = {\n    args: {\n        children: items,\n    },\n};\n\n/**\n * `Listbox` can also be used in controlled mode. In this example, the selected\n * value is \"pear\". If another item is selected, the previously selected item is\n * deselected. This is the default selection type, and it is also set by\n * specifying value as a `string`.\n */\nexport const SingleSelection: Story = {\n    name: \"Single selection (Controlled)\",\n    render: function Render(args: PropsFor<typeof Listbox>) {\n        const [value, setValue] = React.useState(args.value);\n\n        return (\n            <Listbox\n                {...args}\n                value={value}\n                onChange={(newValue) => {\n                    setValue(newValue);\n                    action(\"onChange\")(newValue);\n                }}\n            />\n        );\n    },\n    args: {\n        children: items,\n        value: \"pear\",\n    },\n};\n\n/**\n * Listbox can also have multiple selection. This is set by adding\n * `selectionType=\"multiple\"` and specifying `value` as an array of strings.\n */\nexport const MultipleSelection: Story = {\n    args: {\n        children: items,\n        value: [\"pear\", \"grape\"],\n        onChange: (values) => {\n            action(\"onChange\")(values);\n        },\n        selectionType: \"multiple\",\n    },\n};\n\n/**\n * This example shows a controlled multi-select listbox with a default value of\n * \"pear\" and \"grape\".\n */\nexport const MultipleSelectionControlled: Story = {\n    name: \"Multiple selection (Controlled)\",\n    render: function Render(args: PropsFor<typeof Listbox>) {\n        const [value, setValue] = React.useState(args.value);\n\n        return (\n            <Listbox\n                {...args}\n                value={value}\n                onChange={(newValue) => {\n                    setValue(newValue);\n                    action(\"onChange\")(newValue);\n                }}\n            />\n        );\n    },\n    args: {\n        children: items,\n        value: [\"pear\", \"grape\"],\n        selectionType: \"multiple\",\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this snapshot is already covered in the\n            // MultipleSelection story.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * A listbox with a list of items that are all disabled.\n */\nexport const Disabled: Story = {\n    args: {\n        disabled: true,\n        value: \"pear\",\n    },\n};\n\n/**\n * Aria attributes are used to describe the listbox. In this case, the listbox\n * will be announced as \"Favorite fruit\" by screen readers.\n */\nexport const UsingAriaLabel: Story = {\n    args: {\n        children: items,\n        value: \"pear\",\n        \"aria-label\": \"Favorite fruit\",\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this snapshot is only for screen reader users.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * The listbox element can use custom styles when needed. In this example, we\n * are passing a custom style to the listbox container, via the `style` prop.\n */\nexport const CustomStyles: Story = {\n    args: {\n        children: items,\n        value: \"pear\",\n        style: styles.customListbox,\n    },\n};\n\n/**\n * This example illustrates how you can use the `OptionItem` component to\n * display a `listbox` with custom option items. Note that in this example, we\n * are using `leftAccessory` to display a custom icon for each option item,\n * `subtitle1` to optionally display a pill and `subtitle2` to display the\n * email.\n */\nexport const SingleSelectionCustomOptionItems: Story = {\n    name: \"Single selection with custom OptionItems\",\n    args: {\n        \"aria-label\": \"Profiles\",\n        children: allProfilesWithPictures.map((user, index) => (\n            <OptionItem\n                key={user.id}\n                value={user.id}\n                horizontalRule=\"full-width\"\n                label={user.name}\n                leftAccessory={user.picture}\n                subtitle1={\n                    index === 1 ? (\n                        <StatusBadge label=\"New\" kind=\"info\" />\n                    ) : undefined\n                }\n                subtitle2={user.email}\n            />\n        )),\n        onChange: (value) => {\n            action(\"onChange\")(value);\n        },\n    },\n};\n\n/**\n * This example illustrates how you can use the custom `OptionItem` component\n * with a multi-select `Listbox`.\n */\nexport const MultipleSelectionCustomOptionItems: Story = {\n    name: \"Multiple selection with custom OptionItems\",\n    args: {\n        ...SingleSelectionCustomOptionItems.args,\n        selectionType: \"multiple\",\n    },\n};\n"}},"packages-dropdown-multiselect":{"id":"packages-dropdown-multiselect","name":"MultiSelect as unknown as React.ComponentType<any>","path":"./__docs__/wonder-blocks-dropdown/multi-select.stories.tsx","stories":[{"id":"packages-dropdown-multiselect--default","name":"Default","snippet":"const Default = () => {\n    const [selectedValues, setSelectedValues] = React.useState(\n        args.selectedValues,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <MultiSelect\n            isFilterable={false}\n            error={false}\n            disabled={false}\n            readOnly={false}\n            shortcuts={false}\n            implicitAllEnabled={false}\n            id=\"\"\n            testId=\"\"\n            aria-label=\"Planets\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n            opened={opened}\n            onToggle={setOpened}>\n            {items}\n        </MultiSelect>\n    );\n};"},{"id":"packages-dropdown-multiselect--student-multi-select","name":"Student Multi Select","snippet":"const StudentMultiSelect = function Render() {\n    const [selectedValues, setSelectedValues] = React.useState(\n        studentData.map((student) => student.kaid),\n    );\n    const [opened, setOpened] = React.useState(false);\n\n    return (\n        <MultiSelect\n            aria-label=\"Students\"\n            id=\"students-multiselect\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n            shortcuts={true}\n            isFilterable={true}\n            labels={studentLabels}\n            opened={opened}\n            onToggle={setOpened}\n        >\n            {studentData.map((student) => (\n                <OptionItem\n                    key={student.kaid}\n                    label={student.coachNickname}\n                    value={student.kaid}\n                />\n            ))}\n        </MultiSelect>\n    );\n};","description":"This example demonstrates a StudentMultiSelect with all students initially selected. The screen reader will not announce the initial values on mount, but will announce when values change through user interaction."},{"id":"packages-dropdown-multiselect--with-labeled-field","name":"With Labeled Field","snippet":"const WithLabeledField = function LabeledFieldStory(args) {\n    const [value, setValue] = React.useState(args.selectedValues || []);\n    const [errorMessage, setErrorMessage] = React.useState<\n        string | null | undefined\n    >();\n    return (\n        <LabeledField\n            label=\"Label\"\n            field={\n                <MultiSelect\n                    {...args}\n                    selectedValues={value}\n                    onChange={setValue}\n                    onValidate={setErrorMessage}\n                    required={true}\n                >\n                    {optionItems}\n                </MultiSelect>\n            }\n            description=\"Description\"\n            errorMessage={errorMessage}\n            contextLabel=\"required\"\n        />\n    );\n};","description":"The field can be used with the LabeledField component to provide a label, description, required indicator, and/or error message for the field. Using the field with the LabeledField component will ensure that the field has the relevant accessibility attributes set."},{"id":"packages-dropdown-multiselect--controlled-opened","name":"Controlled (opened)","snippet":"const ControlledOpened = () => <ControlledWrapper\n    isFilterable={false}\n    error={false}\n    opened={false}\n    disabled={false}\n    readOnly={false}\n    shortcuts={false}\n    implicitAllEnabled={false}\n    id=\"\"\n    testId=\"\"\n    aria-label=\"Planets\" />;","description":"Sometimes you'll want to trigger a dropdown programmatically. This can be done by `MultiSelect` is a controlled component. The parent is responsible for managing the opening/closing of the dropdown when using this prop. This means that you'll also have to update `opened` to the value triggered by the `onToggle` prop."},{"id":"packages-dropdown-multiselect--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => {\n    const [selectedValues, setSelectedValues] = React.useState(\n        args.selectedValues,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <MultiSelect\n            isFilterable={false}\n            error={false}\n            disabled={false}\n            readOnly={false}\n            shortcuts={false}\n            implicitAllEnabled={false}\n            id=\"\"\n            testId=\"\"\n            aria-label=\"Planets\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n            opened={opened}\n            onToggle={setOpened}>\n            {items}\n        </MultiSelect>\n    );\n};","description":"Sometimes, we may want to customize the dropdown style (for example, to limit the height of the list). For this purpose, we have the `dropdownStyle` prop. **NOTE:** We are overriding the max height of the dropdown in this example but we recommend letting the dropdown calculate its own height, as we already have a max height set for the dropdown internally."},{"id":"packages-dropdown-multiselect--custom-styles-opened","name":"Custom styles (opened)","snippet":"const CustomStylesOpened = () => {\n    const [selectedValues, setSelectedValues] = React.useState(\n        args.selectedValues,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <MultiSelect\n            isFilterable={false}\n            error={false}\n            disabled={false}\n            readOnly={false}\n            shortcuts={false}\n            implicitAllEnabled={false}\n            id=\"\"\n            testId=\"\"\n            aria-label=\"Planets\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n            opened={opened}\n            onToggle={setOpened}>\n            {items}\n        </MultiSelect>\n    );\n};","description":"Here you can see an example of the previous dropdown opened."},{"id":"packages-dropdown-multiselect--error","name":"Error","snippet":"const Error = (\n    storyArgs: PropsFor<typeof MultiSelect> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [opened, setOpened] = React.useState(false);\n    const [selectedValues, setSelectedValues] = React.useState<string[]>(\n        args.selectedValues || [],\n    );\n    const [errorMessage, setErrorMessage] = React.useState<\n        null | string | void\n    >(null);\n    return (\n        <LabeledField\n            label={label || \"MultiSelect\"}\n            errorMessage={\n                errorMessage || (args.error && \"Error from error prop\")\n            }\n            field={\n                <MultiSelect\n                    {...args}\n                    opened={opened}\n                    onToggle={setOpened}\n                    selectedValues={selectedValues}\n                    onChange={setSelectedValues}\n                    validate={(values) => {\n                        if (values.includes(\"jupiter\")) {\n                            return \"Don't pick jupiter!\";\n                        }\n                    }}\n                    onValidate={setErrorMessage}\n                >\n                    {items}\n                </MultiSelect>\n            }\n        />\n    );\n};","description":"If the `error` prop is set to true, the field will have error styling and `aria-invalid` set to `true`. This is useful for scenarios where we want to show an error on a specific field after a form is submitted (server validation). Note: The `required` and `validate` props can also put the field in an error state."},{"id":"packages-dropdown-multiselect--required","name":"Required","snippet":"const Required = (\n    storyArgs: PropsFor<typeof MultiSelect> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [opened, setOpened] = React.useState(false);\n    const [selectedValues, setSelectedValues] = React.useState<string[]>(\n        args.selectedValues || [],\n    );\n    const [errorMessage, setErrorMessage] = React.useState<\n        null | string | void\n    >(null);\n    return (\n        <LabeledField\n            label={label || \"MultiSelect\"}\n            errorMessage={\n                errorMessage || (args.error && \"Error from error prop\")\n            }\n            field={\n                <MultiSelect\n                    {...args}\n                    opened={opened}\n                    onToggle={setOpened}\n                    selectedValues={selectedValues}\n                    onChange={setSelectedValues}\n                    validate={(values) => {\n                        if (values.includes(\"jupiter\")) {\n                            return \"Don't pick jupiter!\";\n                        }\n                    }}\n                    onValidate={setErrorMessage}\n                >\n                    {items}\n                </MultiSelect>\n            }\n        />\n    );\n};","description":"A required field will have error styling and aria-invalid set to true if the select is left blank. When `required` is set to `true`, validation is triggered: - When a user tabs away from the select (opener's onBlur event) - When a user closes the dropdown without selecting a value (either by pressing escape, clicking away, or clicking on the opener). Validation errors are cleared when a valid value is selected. The component will set aria-invalid to \"false\" and call the onValidate prop with null."},{"id":"packages-dropdown-multiselect--error-from-validation","name":"Error From Validation","snippet":"const ErrorFromValidation = () => {\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <ControlledMultiSelect\n                isFilterable={false}\n                error={false}\n                opened={false}\n                disabled={false}\n                readOnly={false}\n                shortcuts\n                implicitAllEnabled={false}\n                id=\"\"\n                testId=\"\"\n                aria-label=\"Planets\"\n                label=\"Validation example (try picking jupiter)\">\n                {items}\n            </ControlledMultiSelect>\n            <ControlledMultiSelect\n                isFilterable={false}\n                error={false}\n                opened={false}\n                disabled={false}\n                readOnly={false}\n                shortcuts\n                implicitAllEnabled={false}\n                id=\"\"\n                testId=\"\"\n                aria-label=\"Planets\"\n                label=\"Validation example (on mount)\"\n                selectedValues={[\"jupiter\"]}>\n                {items}\n            </ControlledMultiSelect>\n        </View>\n    );\n};","description":"If a selected value fails validation, the field will have error styling. This is useful for scenarios where we want to show errors while a user is filling out a form (client validation). Note that we will internally set the correct `aria-invalid` attribute to the field: - aria-invalid=\"true\" if there is an error. - aria-invalid=\"false\" if there is no error. Validation is triggered: - On mount if the `value` prop is not empty and it is not required - When the dropdown is closed after updating the selected values Validation errors are cleared when the value is updated. The component will set aria-invalid to \"false\" and call the onValidate prop with null."},{"id":"packages-dropdown-multiselect--shortcuts","name":"Shortcuts","snippet":"const Shortcuts = () => {\n    const [selectedValues, setSelectedValues] = React.useState(\n        args.selectedValues,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <MultiSelect\n            isFilterable={false}\n            error={false}\n            disabled={false}\n            readOnly={false}\n            shortcuts={false}\n            implicitAllEnabled={false}\n            id=\"\"\n            testId=\"\"\n            aria-label=\"Planets\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n            opened={opened}\n            onToggle={setOpened}>\n            {items}\n        </MultiSelect>\n    );\n};","description":"This example starts with one item selected and has selection shortcuts for select all and select none. This one does not have a predefined placeholder."},{"id":"packages-dropdown-multiselect--dropdown-in-modal","name":"Dropdown in a modal","snippet":"const DropdownInModal = () => <DropdownInModalWrapper\n    isFilterable={false}\n    error={false}\n    opened={false}\n    disabled={false}\n    readOnly={false}\n    shortcuts={false}\n    implicitAllEnabled={false}\n    id=\"\"\n    testId=\"\"\n    aria-label=\"Planets\" />;","description":"Sometimes we want to include Dropdowns inside a Modal, and these controls can be accessed only by scrolling down. This example help us to demonstrate that `MultiSelect` components can correctly be displayed within the visible scrolling area."},{"id":"packages-dropdown-multiselect--disabled","name":"Disabled","snippet":"const Disabled = () => (\n    <View style={{gap: sizing.size_320}}>\n        <LabeledField\n            label=\"Disabled prop is set to true\"\n            field={\n                <MultiSelect disabled={true} onChange={() => {}}>\n                    <OptionItem label=\"Mercury\" value=\"1\" />\n                    <OptionItem label=\"Venus\" value=\"2\" />\n                </MultiSelect>\n            }\n        />\n        <LabeledField\n            label=\"No items\"\n            field={<MultiSelect onChange={() => {}} />}\n        />\n\n        <LabeledField\n            label=\"All items are disabled\"\n            field={\n                <MultiSelect onChange={() => {}}>\n                    <OptionItem label=\"Mercury\" value=\"1\" disabled={true} />\n                    <OptionItem label=\"Venus\" value=\"2\" disabled={true} />\n                </MultiSelect>\n            }\n        />\n    </View>\n);","description":"`MultiSelect` can be disabled by passing `disabled={true}`. This can be useful when you want to disable a control temporarily. It is also disabled when: - there are no items - there are items and they are all disabled Note: The `disabled` prop sets the `aria-disabled` attribute to `true` instead of setting the `disabled` attribute. This is so that the component remains focusable while communicating to screen readers that it is disabled."},{"id":"packages-dropdown-multiselect--read-only","name":"Read Only","snippet":"const ReadOnly = function ReadOnlyStory(args) {\n    const [selectedValue, setSelectedValue] = React.useState([\n        items[0].props.value,\n    ]);\n    return (\n        <LabeledField\n            field={\n                <MultiSelect\n                    {...args}\n                    readOnly={true}\n                    onChange={setSelectedValue}\n                    selectedValues={selectedValue}\n                >\n                    {items}\n                </MultiSelect>\n            }\n            label=\"Example Label\"\n            readOnlyMessage=\"Message about why it is read only\"\n        />\n    );\n};","description":"A MultiSelect can be set to read-only by passing `readOnly` to `true`. When `true`, read-only styling is applied and the aria-disabled attribute is set to \"true\". A user won't be able to open the dropdown or change the selected values. We recommend using the MultiSelect with `LabeledField`. The `readOnlyMessage` prop in `LabeledField` can be set so that users know why the field is marked as read only. Note: We set `aria-disabled` instead of `aria-readonly` due to low browser + screen reader support for `aria-readonly`. If it is expected that the user will select multiple values, consider using a custom opener to display the selected values."},{"id":"packages-dropdown-multiselect--implicit-all-enabled","name":"Implicit All Enabled","snippet":"const ImplicitAllEnabled = () => {\n    const [selectedValues, setSelectedValues] = React.useState(\n        args.selectedValues,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <MultiSelect\n            isFilterable={false}\n            error={false}\n            disabled={false}\n            readOnly={false}\n            shortcuts={false}\n            implicitAllEnabled={false}\n            id=\"\"\n            testId=\"\"\n            aria-label=\"Planets\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n            opened={opened}\n            onToggle={setOpened}>\n            {items}\n        </MultiSelect>\n    );\n};","description":"When nothing is selected, show the menu text as \"All selected\". Note that the actual selection logic doesn't change. (Only the menu text)"},{"id":"packages-dropdown-multiselect--virtualized-filterable","name":"Virtualized (isFilterable)","snippet":"const VirtualizedFilterable = () => <VirtualizedMultiSelect opened={true} />;","description":"When there are many options, you could use a search filter in the `MultiSelect`. The search filter will be performed toward the labels of the option items. Note that this example shows how we can add custom styles to the dropdown as well."},{"id":"packages-dropdown-multiselect--with-custom-opener","name":"With custom opener","snippet":"const WithCustomOpener = () => {\n    const [selectedValues, setSelectedValues] = React.useState<string[]>(\n        args.selectedValues ?? [],\n    );\n\n    return (\n        <MultiSelect\n            isFilterable={false}\n            error={false}\n            opened={false}\n            disabled={false}\n            readOnly={false}\n            shortcuts={false}\n            implicitAllEnabled={false}\n            id=\"\"\n            testId=\"\"\n            aria-label=\"Planets\"\n            selectedValues={selectedValues}\n            onChange={setSelectedValues}\n            opener={({hovered, pressed, text}) => (\n                <CustomOpener\n                    testId=\"multi-select-custom-opener\"\n                    styles={{\n                        root: [\n                            styles.customOpener,\n                            hovered && styles.customOpenerHovered,\n                            pressed && styles.customOpenerPressed,\n                            args.disabled && styles.customOpenerDisabled,\n                        ],\n                    }}\n                >\n                    <PhosphorIcon\n                        icon={IconMappings.plusCircle}\n                        size=\"small\"\n                    />\n                    <BodyText tag=\"span\" weight=\"bold\">\n                        {text}\n                    </BodyText>\n                </CustomOpener>\n            )}>\n            {items}\n        </MultiSelect>\n    );\n};","description":"When you need a fully custom-styled opener, use `CustomOpener`. It provides a blank-slate `<button>` with the WB focus ring baked in and correct ref forwarding for the dropdown's focus management wiring. The `opener` render prop receives `hovered`, `focused`, `pressed`, `text`, and `opened` values that can be passed to child content for conditional styling. Focus ring styles are handled automatically by `CustomOpener` via CSS — you do not need to apply `focusStyles` yourself. **Note:** Pass `testId` directly to `CustomOpener` for e2e test targeting. **Accessibility:** When a custom opener is used, `aria-expanded`, `aria-haspopup`, and `aria-controls` are added automatically. You are still responsible for labeling the `MultiSelect` by wrapping it in a `LabeledField` or using `aria-label` on the parent component, because a combobox's value cannot double as its label."},{"id":"packages-dropdown-multiselect--custom-labels","name":"Custom Labels","snippet":"const CustomLabels = function Render() {\n    const [selectedValues, setSelectedValues] = React.useState<\n        Array<string>\n    >([]);\n    const [opened, setOpened] = React.useState(true);\n\n    const labels: LabelsValues = {\n        clearSearch: \"Limpiar busqueda\",\n        filter: \"Filtrar\",\n        noResults: \"Sin resultados\",\n        selectAllLabel: (numOptions: number) =>\n            `Seleccionar todas (${numOptions})`,\n        selectNoneLabel: \"No seleccionar ninguno\",\n        noneSelected: \"0 escuelas seleccionadas\",\n        allSelected: \"Todas las escuelas\",\n        someSelected: (numSelectedValues: number) =>\n            `${numSelectedValues} escuelas seleccionadas`,\n    };\n\n    return (\n        <View style={styles.wrapper}>\n            <MultiSelect\n                aria-label=\"Escuelas\"\n                shortcuts={true}\n                isFilterable={true}\n                onChange={setSelectedValues}\n                selectedValues={selectedValues}\n                labels={labels}\n                opened={opened}\n                onToggle={setOpened}\n            >\n                {translatedItems}\n            </MultiSelect>\n        </View>\n    );\n};","description":"This example illustrates how you can pass custom labels to the MultiSelect component."},{"id":"packages-dropdown-multiselect--custom-option-items","name":"Custom Option Items","snippet":"const CustomOptionItems = function Render() {\n    const [opened, setOpened] = React.useState(true);\n    const [selectedValues, setSelectedValues] = React.useState<\n        Array<string>\n    >([]);\n\n    const handleChange = (selectedValues: Array<string>) => {\n        setSelectedValues(selectedValues);\n    };\n\n    const handleToggle = (opened: boolean) => {\n        setOpened(opened);\n    };\n\n    return (\n        <MultiSelect\n            aria-label=\"Users\"\n            onChange={handleChange}\n            selectedValues={selectedValues}\n            onToggle={handleToggle}\n            opened={opened}\n        >\n            {allProfilesWithPictures.map((user, index) => (\n                <OptionItem\n                    key={user.id}\n                    value={user.id}\n                    label={user.name}\n                    leftAccessory={user.picture}\n                    subtitle1={\n                        index === 1 ? (\n                            <StatusBadge label=\"New\" kind=\"info\" />\n                        ) : undefined\n                    }\n                    subtitle2={user.email}\n                />\n            ))}\n        </MultiSelect>\n    );\n};","description":"Custom option items This example illustrates how you can use the `OptionItem` component to display a list with custom option items. Note that in this example, we are using `leftAccessory` to display a custom icon for each option item, `subtitle1` to optionally display a pill and `subtitle2` to display the email. **Note:** As these are custom option items, we strongly recommend to pass the `labelAsText` prop to display a summarized label in the menu."},{"id":"packages-dropdown-multiselect--custom-option-items-with-node-label","name":"Custom Option Items With Node Label","snippet":"const CustomOptionItemsWithNodeLabel = function Render() {\n    const [opened, setOpened] = React.useState(true);\n    const [selectedValues, setSelectedValues] = React.useState<\n        Array<string>\n    >([]);\n\n    const handleChange = (selectedValues: Array<string>) => {\n        setSelectedValues(selectedValues);\n    };\n\n    const handleToggle = (opened: boolean) => {\n        setOpened(opened);\n    };\n\n    return (\n        <MultiSelect\n            aria-label=\"Languages\"\n            onChange={handleChange}\n            selectedValues={selectedValues}\n            onToggle={handleToggle}\n            opened={opened}\n            showOpenerLabelAsText={false}\n            isFilterable={true}\n        >\n            {locales.map((locale, index) => (\n                <OptionItem\n                    key={index}\n                    value={String(index)}\n                    label={\n                        <span>\n                            {chatIcon} {locale}\n                        </span>\n                    }\n                    labelAsText={locale}\n                />\n            ))}\n        </MultiSelect>\n    );\n};","description":"This example illustrates how a JSX Element can appear as the label by setting `showOpenerLabelAsText` to false. Note that in this example, we define `labelAsText` on the OptionItems to ensure that filtering works correctly."},{"id":"packages-dropdown-multiselect--two-multi-selects","name":"Two Multi Selects","snippet":"const TwoMultiSelects = function Render() {\n    const [gradeValues, setGradeValues] = React.useState<Array<string>>([\n        \"6\",\n        \"7\",\n    ]);\n    const [categoryValues, setCategoryValues] = React.useState<\n        Array<string>\n    >([]);\n\n    return (\n        <View style={styles.twoSelectsContainer}>\n            <LabeledField\n                label=\"Grade Level\"\n                field={\n                    <MultiSelect\n                        aria-label=\"Select grade levels\"\n                        isFilterable={true}\n                        labels={{\n                            noneSelected: \"All grades\",\n                            someSelected: (n: number) =>\n                                n === 1\n                                    ? \"1 grade selected\"\n                                    : `${n} grades selected`,\n                        }}\n                        onChange={setGradeValues}\n                        selectedValues={gradeValues}\n                        style={styles.fullWidth}\n                    >\n                        <OptionItem label=\"Grade 3\" value=\"3\" />\n                        <OptionItem label=\"Grade 4\" value=\"4\" />\n                        <OptionItem label=\"Grade 5\" value=\"5\" />\n                        <OptionItem label=\"Grade 6\" value=\"6\" />\n                        <OptionItem label=\"Grade 7\" value=\"7\" />\n                        <OptionItem label=\"Grade 8\" value=\"8\" />\n                    </MultiSelect>\n                }\n            />\n            <LabeledField\n                label=\"Categories\"\n                field={\n                    <MultiSelect\n                        aria-label=\"Select categories\"\n                        labels={{\n                            noneSelected: \"All categories\",\n                            someSelected: (n: number) =>\n                                n === 1\n                                    ? \"1 category selected\"\n                                    : `${n} categories selected`,\n                        }}\n                        onChange={setCategoryValues}\n                        selectedValues={categoryValues}\n                        style={styles.fullWidth}\n                    >\n                        <OptionItem label=\"Argumentative\" value=\"arg\" />\n                        <OptionItem label=\"Expository\" value=\"exp\" />\n                        <OptionItem label=\"Narrative\" value=\"nar\" />\n                        <OptionItem label=\"Persuasive\" value=\"per\" />\n                    </MultiSelect>\n                }\n            />\n        </View>\n    );\n};","description":"Two MultiSelects side by side for manual screen reader testing. - Only the interacted select announces — the neighboring select stays silent even as the parent re-renders. - Selecting items announces the updated count while the dropdown is open. - Closing the dropdown after making selections announces the final state (VoiceOver/Safari workaround for stale combobox values)."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { Checkbox } from \"@khanacademy/wonder-blocks-form\";\nimport { ComponentInfo } from \"wonder-blocks\";\nimport { CustomOpener, MultiSelect, OptionItem } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { ModalLauncher, OnePaneDialog } from \"@khanacademy/wonder-blocks-modal\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { StatusBadge } from \"@khanacademy/wonder-blocks-badge\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"MultiSelect as unknown as React.ComponentType<any>\" component.\n  63 |  * ```\n  64 |  */\n> 65 | export default {\n     | ^\n  66 |     title: \"Packages / Dropdown / MultiSelect\",\n  67 |     component: MultiSelect as unknown as React.ComponentType<any>,\n  68 |     argTypes: multiSelectArgtypes,\n\n./__docs__/wonder-blocks-dropdown/multi-select.stories.tsx:\n/* eslint-disable max-lines */\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\n\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\nimport {PropsFor, View} from \"@khanacademy/wonder-blocks-core\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport {Checkbox} from \"@khanacademy/wonder-blocks-form\";\nimport {OnePaneDialog, ModalLauncher} from \"@khanacademy/wonder-blocks-modal\";\nimport {border, semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {\n    MultiSelect,\n    OptionItem,\n    CustomOpener,\n} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\nimport type {LabelsValues} from \"@khanacademy/wonder-blocks-dropdown\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport packageConfig from \"../../packages/wonder-blocks-dropdown/package.json\";\nimport multiSelectArgtypes from \"./multi-select.argtypes\";\nimport {\n    allCountries,\n    allProfilesWithPictures,\n    locales,\n    chatIcon,\n} from \"./option-item-examples\";\n\nimport {LabeledField} from \"@khanacademy/wonder-blocks-labeled-field\";\nimport {StatusBadge} from \"@khanacademy/wonder-blocks-badge\";\nimport {IconMappings} from \"../wonder-blocks-icon/phosphor-icon.argtypes\";\n\ntype StoryComponentType = StoryObj<typeof MultiSelect>;\n\ntype MultiSelectArgs = Partial<typeof MultiSelect>;\n\n/**\n * A dropdown that consists of multiple selection items. This select allows\n * multiple options to be selected. Clients are responsible for keeping track of\n * the selected items.\n *\n * The multi select stays open until closed by the user. The onChange callback\n * happens every time there is a change in the selection of the items.\n *\n * Make sure to provide a label for the field. This can be done by either:\n * - (recommended) Using the **LabeledField** component to provide a label,\n * description, and/or error message for the field\n * - Using a `label` html tag with the `htmlFor` prop set to the unique id of\n * the field\n * - Using an `aria-label` attribute on the field\n * - Using an `aria-labelledby` attribute on the field\n *\n * ### Usage\n *\n * ```tsx\n * import {OptionItem, MultiSelect} from \"@khanacademy/wonder-blocks-dropdown\";\n *\n * <MultiSelect aria-label=\"Fruits\" onChange={setSelectedValues} selectedValues={selectedValues}>\n *  <OptionItem value=\"pear\">Pear</OptionItem>\n *  <OptionItem value=\"mango\">Mango</OptionItem>\n * </MultiSelect>\n * ```\n */\nexport default {\n    title: \"Packages / Dropdown / MultiSelect\",\n    component: MultiSelect as unknown as React.ComponentType<any>,\n    argTypes: multiSelectArgtypes,\n    args: {\n        isFilterable: false,\n        error: false,\n        opened: false,\n        disabled: false,\n        readOnly: false,\n        shortcuts: false,\n        implicitAllEnabled: false,\n        id: \"\",\n        testId: \"\",\n        \"aria-label\": \"Planets\",\n    },\n    globals: {\n        backgrounds: {\n            value: \"baseDefault\",\n        },\n    },\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ) as any,\n        backgrounds: {\n            value: \"baseSubtle\",\n        },\n    },\n} as Meta<typeof MultiSelect>;\n\nconst styles = StyleSheet.create({\n    setWidth: {\n        minInlineSize: 170,\n        width: \"100%\",\n    },\n    twoSelectsContainer: {\n        flexDirection: \"row\",\n        gap: sizing.size_080,\n        alignItems: \"flex-start\",\n    },\n    fullWidth: {\n        inlineSize: \"100%\",\n    },\n    customDropdown: {\n        maxBlockSize: 200,\n    },\n    wrapper: {\n        height: \"600px\",\n        width: \"600px\",\n    },\n    gap: {\n        gap: sizing.size_010,\n    },\n    centered: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n    scrolledWrapper: {\n        height: 200,\n        overflow: \"auto\",\n        border: `1px solid ${semanticColor.core.border.neutral.subtle}`,\n        borderRadius: border.radius.radius_040,\n        margin: sizing.size_080,\n        padding: sizing.size_160,\n    },\n    scrollableArea: {\n        height: \"200vh\",\n    },\n    /**\n     * Custom opener styles\n     */\n    customOpener: {\n        display: \"inline-flex\",\n        alignItems: \"center\",\n        gap: sizing.size_080,\n        height: sizing.size_400,\n        paddingInline: sizing.size_160,\n        border: `${border.width.thin} solid ${semanticColor.core.border.instructive.default}`,\n        borderInlineStart: `${border.width.thick} solid ${semanticColor.core.border.instructive.default}`,\n        borderRadius: border.radius.radius_040,\n        color: semanticColor.core.foreground.instructive.default,\n        background: semanticColor.core.background.base.default,\n    },\n    customOpenerHovered: {\n        background: semanticColor.core.background.instructive.subtle,\n    },\n    customOpenerPressed: {\n        background: semanticColor.core.background.instructive.default,\n    },\n    customOpenerDisabled: {\n        color: semanticColor.core.foreground.neutral.subtle,\n        borderColor: semanticColor.core.border.neutral.subtle,\n        background: semanticColor.core.background.base.default,\n        cursor: \"not-allowed\",\n    },\n});\n\nconst items = [\n    <OptionItem label=\"Mercury\" value=\"mercury\" key={1} />,\n    <OptionItem label=\"Venus\" value=\"venus\" key={2} />,\n    <OptionItem label=\"Earth\" value=\"earth\" disabled key={3} />,\n    <OptionItem label=\"Mars\" value=\"mars\" key={4} />,\n    <OptionItem label=\"Jupiter\" value=\"jupiter\" key={5} />,\n    <OptionItem label=\"Saturn\" value=\"saturn\" key={6} />,\n    <OptionItem label=\"Neptune\" value=\"neptune\" key={7} />,\n    <OptionItem label=\"Uranus\" value=\"uranus\" key={8} />,\n];\n\nconst Template = (args: any) => {\n    const [selectedValues, setSelectedValues] = React.useState(\n        args.selectedValues,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <MultiSelect\n            {...args}\n            aria-label={args[\"aria-label\"]}\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n            opened={opened}\n            onToggle={setOpened}\n        >\n            {items}\n        </MultiSelect>\n    );\n};\n\nexport const Default: StoryComponentType = {\n    render: Template,\n    parameters: {\n        chromatic: {\n            // We don't need screenshots b/c the dropdown is initially closed.\n            disableSnapshot: true,\n        },\n    },\n};\n\nconst studentData = [\n    {kaid: \"kaid_1\", coachNickname: \"Alice Smith\"},\n    {kaid: \"kaid_2\", coachNickname: \"Bob Jones\"},\n    {kaid: \"kaid_3\", coachNickname: \"Carol Wilson\"},\n    {kaid: \"kaid_4\", coachNickname: \"David Brown\"},\n    {kaid: \"kaid_5\", coachNickname: \"Eve Taylor\"},\n];\n\nconst studentLabels: LabelsValues = {\n    clearSearch: \"Clear search\",\n    filter: \"Search\",\n    noResults: \"None found\",\n    selectAllLabel: (count) =>\n        count === 1 ? \"Select 1 student\" : `Select all ${count} students`,\n    selectNoneLabel: \"Clear selection\",\n    noneSelected: \"No students\",\n    someSelected: (numSelected) =>\n        numSelected === 1 ? \"1 student\" : `${numSelected} students`,\n    allSelected: \"All students\",\n};\n\n/**\n * This example demonstrates a StudentMultiSelect with all students initially selected.\n * The screen reader will not announce the initial values on mount, but will\n * announce when values change through user interaction.\n */\nexport const StudentMultiSelect: StoryComponentType = {\n    render: function Render() {\n        const [selectedValues, setSelectedValues] = React.useState(\n            studentData.map((student) => student.kaid),\n        );\n        const [opened, setOpened] = React.useState(false);\n\n        return (\n            <MultiSelect\n                aria-label=\"Students\"\n                id=\"students-multiselect\"\n                onChange={setSelectedValues}\n                selectedValues={selectedValues}\n                shortcuts={true}\n                isFilterable={true}\n                labels={studentLabels}\n                opened={opened}\n                onToggle={setOpened}\n            >\n                {studentData.map((student) => (\n                    <OptionItem\n                        key={student.kaid}\n                        label={student.coachNickname}\n                        value={student.kaid}\n                    />\n                ))}\n            </MultiSelect>\n        );\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this is for manual testing purposes\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * The field can be used with the LabeledField component to provide a label,\n * description, required indicator, and/or error message for the field.\n *\n * Using the field with the LabeledField component will ensure that the field\n * has the relevant accessibility attributes set.\n */\nexport const WithLabeledField: StoryComponentType = {\n    render: function LabeledFieldStory(args) {\n        const [value, setValue] = React.useState(args.selectedValues || []);\n        const [errorMessage, setErrorMessage] = React.useState<\n            string | null | undefined\n        >();\n        return (\n            <LabeledField\n                label=\"Label\"\n                field={\n                    <MultiSelect\n                        {...args}\n                        selectedValues={value}\n                        onChange={setValue}\n                        onValidate={setErrorMessage}\n                        required={true}\n                    >\n                        {optionItems}\n                    </MultiSelect>\n                }\n                description=\"Description\"\n                errorMessage={errorMessage}\n                contextLabel=\"required\"\n            />\n        );\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this is for documentation purposes and is\n            // covered by the LabeledField stories\n            disableSnapshot: true,\n        },\n    },\n};\n\nconst ControlledWrapper = (args: any) => {\n    const [selectedValues, setSelectedValues] = React.useState<Array<string>>(\n        [],\n    );\n    const [opened, setOpened] = React.useState(Boolean(args.opened));\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(Boolean(args.opened));\n    }, [args.opened]);\n\n    return (\n        <View style={[styles.wrapper, styles.gap]}>\n            <Checkbox label=\"Open\" onChange={setOpened} checked={opened} />\n            <MultiSelect\n                {...args}\n                onChange={setSelectedValues}\n                selectedValues={selectedValues}\n                opened={opened}\n                onToggle={setOpened}\n            >\n                {items}\n            </MultiSelect>\n        </View>\n    );\n};\n\n/**\n * Sometimes you'll want to trigger a dropdown programmatically. This can be\n * done by `MultiSelect` is a controlled component. The parent is responsible\n * for managing the opening/closing of the dropdown when using this prop.\n *\n * This means that you'll also have to update `opened` to the value triggered by\n * the `onToggle` prop.\n */\nexport const ControlledOpened: StoryComponentType = {\n    name: \"Controlled (opened)\",\n    render: (args) => <ControlledWrapper {...args} />,\n    args: {\n        opened: true,\n    } as MultiSelectArgs,\n    parameters: {\n        // Added to ensure that the dropdown menu is rendered using PopperJS.\n        chromatic: {delay: 500},\n    },\n};\n\n// Custom MultiSelect labels\nconst dropdownLabels: Partial<LabelsValues> = {\n    noneSelected: \"Solar system\",\n    someSelected: (numSelectedValues: number) => `${numSelectedValues} planets`,\n};\n\n/**\n * Sometimes, we may want to customize the dropdown style (for example, to limit\n * the height of the list). For this purpose, we have the `dropdownStyle` prop.\n *\n * **NOTE:** We are overriding the max height of the dropdown in this example\n * but we recommend letting the dropdown calculate its own height, as we already\n * have a max height set for the dropdown internally.\n */\nexport const CustomStyles: StoryComponentType = {\n    render: Template,\n    args: {\n        labels: dropdownLabels,\n        dropdownStyle: styles.customDropdown,\n        style: styles.setWidth,\n    } as MultiSelectArgs,\n    parameters: {\n        chromatic: {\n            // we don't need screenshots because this story only tests behavior.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * Here you can see an example of the previous dropdown opened.\n */\nexport const CustomStylesOpened: StoryComponentType = {\n    render: Template,\n    args: {\n        labels: dropdownLabels,\n        dropdownStyle: styles.customDropdown,\n        style: styles.setWidth,\n        opened: true,\n    } as MultiSelectArgs,\n    name: \"Custom styles (opened)\",\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.wrapper}>\n                <Story />\n            </View>\n        ),\n    ],\n};\n\nconst ControlledMultiSelect = (\n    storyArgs: PropsFor<typeof MultiSelect> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [opened, setOpened] = React.useState(false);\n    const [selectedValues, setSelectedValues] = React.useState<string[]>(\n        args.selectedValues || [],\n    );\n    const [errorMessage, setErrorMessage] = React.useState<\n        null | string | void\n    >(null);\n    return (\n        <LabeledField\n            label={label || \"MultiSelect\"}\n            errorMessage={\n                errorMessage || (args.error && \"Error from error prop\")\n            }\n            field={\n                <MultiSelect\n                    {...args}\n                    opened={opened}\n                    onToggle={setOpened}\n                    selectedValues={selectedValues}\n                    onChange={setSelectedValues}\n                    validate={(values) => {\n                        if (values.includes(\"jupiter\")) {\n                            return \"Don't pick jupiter!\";\n                        }\n                    }}\n                    onValidate={setErrorMessage}\n                >\n                    {items}\n                </MultiSelect>\n            }\n        />\n    );\n};\n\n/**\n * If the `error` prop is set to true, the field will have error styling and\n * `aria-invalid` set to `true`.\n *\n * This is useful for scenarios where we want to show an error on a\n * specific field after a form is submitted (server validation).\n *\n * Note: The `required` and `validate` props can also put the field in an\n * error state.\n */\nexport const Error: StoryComponentType = {\n    render: ControlledMultiSelect,\n    args: {\n        error: true,\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this is covered by variants story\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * A required field will have error styling and aria-invalid set to true if the\n * select is left blank.\n *\n * When `required` is set to `true`, validation is triggered:\n * - When a user tabs away from the select (opener's onBlur event)\n * - When a user closes the dropdown without selecting a value\n * (either by pressing escape, clicking away, or clicking on the opener).\n *\n * Validation errors are cleared when a valid value is selected. The component\n * will set aria-invalid to \"false\" and call the onValidate prop with null.\n *\n */\nexport const Required: StoryComponentType = {\n    render: ControlledMultiSelect,\n    args: {\n        required: \"Custom required error message\",\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this doesn't test anything visual.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * If a selected value fails validation, the field will have error styling.\n *\n * This is useful for scenarios where we want to show errors while a\n * user is filling out a form (client validation).\n *\n * Note that we will internally set the correct `aria-invalid` attribute to the\n * field:\n * - aria-invalid=\"true\" if there is an error.\n * - aria-invalid=\"false\" if there is no error.\n *\n * Validation is triggered:\n * - On mount if the `value` prop is not empty and it is not required\n * - When the dropdown is closed after updating the selected values\n *\n * Validation errors are cleared when the value is updated. The component\n * will set aria-invalid to \"false\" and call the onValidate prop with null.\n */\nexport const ErrorFromValidation: StoryComponentType = {\n    render: (args: PropsFor<typeof MultiSelect>) => {\n        return (\n            <View style={{gap: sizing.size_240}}>\n                <ControlledMultiSelect\n                    {...args}\n                    label=\"Validation example (try picking jupiter)\"\n                >\n                    {items}\n                </ControlledMultiSelect>\n                <ControlledMultiSelect\n                    {...args}\n                    label=\"Validation example (on mount)\"\n                    selectedValues={[\"jupiter\"]}\n                >\n                    {items}\n                </ControlledMultiSelect>\n            </View>\n        );\n    },\n    args: {\n        shortcuts: true,\n    },\n};\n\n/**\n * This example starts with one item selected and has selection shortcuts for\n * select all and select none. This one does not have a predefined placeholder.\n */\nexport const Shortcuts: StoryComponentType = {\n    render: Template,\n    args: {\n        shortcuts: true,\n        opened: true,\n    } as MultiSelectArgs,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.wrapper}>\n                <Story />\n            </View>\n        ),\n    ],\n};\n\n/**\n * In a Modal\n */\nconst DropdownInModalWrapper = (args: MultiSelectArgs) => {\n    const [selectedValues, setSelectedValues] = React.useState<Array<string>>(\n        [],\n    );\n    const [opened, setOpened] = React.useState(true);\n\n    const modalContent = (\n        <View style={styles.scrollableArea}>\n            <View style={styles.scrolledWrapper}>\n                <View style={{minBlockSize: \"100vh\"}}>\n                    <MultiSelect\n                        {...args}\n                        onChange={setSelectedValues}\n                        isFilterable={true}\n                        opened={opened}\n                        onToggle={setOpened}\n                        selectedValues={selectedValues}\n                    >\n                        {items}\n                    </MultiSelect>\n                </View>\n            </View>\n        </View>\n    );\n\n    const modal = (\n        <OnePaneDialog title=\"Dropdown in a Modal\" content={modalContent} />\n    );\n\n    return (\n        <View style={styles.centered}>\n            <ModalLauncher modal={modal}>\n                {({openModal}) => (\n                    <Button onClick={openModal}>Click here!</Button>\n                )}\n            </ModalLauncher>\n        </View>\n    );\n};\n\n/**\n * Sometimes we want to include Dropdowns inside a Modal, and these controls can\n * be accessed only by scrolling down. This example help us to demonstrate that\n * `MultiSelect` components can correctly be displayed within the visible\n * scrolling area.\n */\nexport const DropdownInModal: StoryComponentType = {\n    render: (args) => <DropdownInModalWrapper {...args} />,\n    name: \"Dropdown in a modal\",\n    parameters: {\n        chromatic: {\n            // We don't need screenshots because this story can be tested after\n            // the modal is opened.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * `MultiSelect` can be disabled by passing `disabled={true}`. This can be\n * useful when you want to disable a control temporarily. It is also disabled\n * when:\n * - there are no items\n * - there are items and they are all disabled\n *\n *\n * Note: The `disabled` prop sets the `aria-disabled` attribute to `true`\n * instead of setting the `disabled` attribute. This is so that the component\n * remains focusable while communicating to screen readers that it is disabled.\n */\nexport const Disabled: StoryComponentType = {\n    render: () => (\n        <View style={{gap: sizing.size_320}}>\n            <LabeledField\n                label=\"Disabled prop is set to true\"\n                field={\n                    <MultiSelect disabled={true} onChange={() => {}}>\n                        <OptionItem label=\"Mercury\" value=\"1\" />\n                        <OptionItem label=\"Venus\" value=\"2\" />\n                    </MultiSelect>\n                }\n            />\n            <LabeledField\n                label=\"No items\"\n                field={<MultiSelect onChange={() => {}} />}\n            />\n\n            <LabeledField\n                label=\"All items are disabled\"\n                field={\n                    <MultiSelect onChange={() => {}}>\n                        <OptionItem label=\"Mercury\" value=\"1\" disabled={true} />\n                        <OptionItem label=\"Venus\" value=\"2\" disabled={true} />\n                    </MultiSelect>\n                }\n            />\n        </View>\n    ),\n};\n\n/**\n * A MultiSelect can be set to read-only by passing `readOnly` to `true`.\n * When `true`, read-only styling is applied and the aria-disabled attribute is\n * set to \"true\". A user won't be able to open the dropdown or change the\n * selected values.\n *\n * We recommend using the MultiSelect with `LabeledField`. The\n * `readOnlyMessage` prop in `LabeledField` can be set so that users know why\n * the field is marked as read only.\n *\n * Note: We set `aria-disabled` instead of `aria-readonly` due to low\n * browser + screen reader support for `aria-readonly`.\n *\n * If it is expected that the user will select multiple values, consider using\n * a custom opener to display the selected values.\n */\nexport const ReadOnly: StoryComponentType = {\n    render: function ReadOnlyStory(args) {\n        const [selectedValue, setSelectedValue] = React.useState([\n            items[0].props.value,\n        ]);\n        return (\n            <LabeledField\n                field={\n                    <MultiSelect\n                        {...args}\n                        readOnly={true}\n                        onChange={setSelectedValue}\n                        selectedValues={selectedValue}\n                    >\n                        {items}\n                    </MultiSelect>\n                }\n                label=\"Example Label\"\n                readOnlyMessage=\"Message about why it is read only\"\n            />\n        );\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this is covered in testing snapshots story\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * When nothing is selected, show the menu text as \"All selected\". Note that the\n * actual selection logic doesn't change. (Only the menu text)\n */\nexport const ImplicitAllEnabled: StoryComponentType = {\n    render: Template,\n    args: {\n        implicitAllEnabled: true,\n        labels: {\n            someSelected: (numSelectedValues: number) =>\n                `${numSelectedValues} fruits`,\n            allSelected: \"All planets selected\",\n        },\n    } as MultiSelectArgs,\n    parameters: {\n        chromatic: {\n            // We don't need screenshots b/c the dropdown is initially closed.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * Virtualized with search filter\n */\nconst optionItems = allCountries.map(([code, translatedName]) => (\n    <OptionItem key={code} value={code} label={translatedName} />\n));\n\ntype Props = {\n    opened?: boolean;\n};\n\nconst VirtualizedMultiSelect = function (props: Props): React.ReactElement {\n    const [selectedValues, setSelectedValues] = React.useState<Array<string>>(\n        [],\n    );\n    const [opened, setOpened] = React.useState(props.opened || false);\n\n    return (\n        <View style={styles.wrapper}>\n            <MultiSelect\n                aria-label=\"Countries\"\n                onChange={setSelectedValues}\n                shortcuts={true}\n                isFilterable={true}\n                opened={opened}\n                onToggle={setOpened}\n                selectedValues={selectedValues}\n            >\n                {optionItems}\n            </MultiSelect>\n        </View>\n    );\n};\n\n/**\n * When there are many options, you could use a search filter in the\n * `MultiSelect`. The search filter will be performed toward the labels of the\n * option items. Note that this example shows how we can add custom styles to\n * the dropdown as well.\n */\nexport const VirtualizedFilterable: StoryComponentType = {\n    name: \"Virtualized (isFilterable)\",\n    render: () => <VirtualizedMultiSelect opened={true} />,\n};\n\n/**\n * When you need a fully custom-styled opener, use `CustomOpener`. It provides\n * a blank-slate `<button>` with the WB focus ring baked in and correct ref\n * forwarding for the dropdown's focus management wiring.\n *\n * The `opener` render prop receives `hovered`, `focused`, `pressed`, `text`,\n * and `opened` values that can be passed to child content for conditional\n * styling. Focus ring styles are handled automatically by `CustomOpener` via\n * CSS — you do not need to apply `focusStyles` yourself.\n *\n * **Note:** Pass `testId` directly to `CustomOpener` for e2e test targeting.\n *\n * **Accessibility:** When a custom opener is used, `aria-expanded`,\n * `aria-haspopup`, and `aria-controls` are added automatically. You are still\n * responsible for labeling the `MultiSelect` by wrapping it in a `LabeledField`\n * or using `aria-label` on the parent component, because a combobox's value\n * cannot double as its label.\n */\nexport const WithCustomOpener: StoryComponentType = {\n    render: function Render(args) {\n        const [selectedValues, setSelectedValues] = React.useState<string[]>(\n            args.selectedValues ?? [],\n        );\n        return (\n            <MultiSelect\n                {...args}\n                selectedValues={selectedValues}\n                onChange={setSelectedValues}\n                opener={({hovered, pressed, text}) => (\n                    <CustomOpener\n                        testId=\"multi-select-custom-opener\"\n                        styles={{\n                            root: [\n                                styles.customOpener,\n                                hovered && styles.customOpenerHovered,\n                                pressed && styles.customOpenerPressed,\n                                args.disabled && styles.customOpenerDisabled,\n                            ],\n                        }}\n                    >\n                        <PhosphorIcon\n                            icon={IconMappings.plusCircle}\n                            size=\"small\"\n                        />\n                        <BodyText tag=\"span\" weight=\"bold\">\n                            {text}\n                        </BodyText>\n                    </CustomOpener>\n                )}\n            >\n                {items}\n            </MultiSelect>\n        );\n    },\n    args: {\n        selectedValues: [],\n        \"aria-label\": \"Custom opener\",\n        disabled: false,\n    } as MultiSelectArgs,\n    name: \"With custom opener\",\n};\n\n/**\n * Custom labels\n */\nconst translatedItems = new Array(10)\n    .fill(null)\n    .map((_, i) => (\n        <OptionItem\n            key={i}\n            value={(i + 1).toString()}\n            label={`Escuela # ${i + 1}`}\n        />\n    ));\n\n/**\n * This example illustrates how you can pass custom labels to the MultiSelect\n * component.\n */\nexport const CustomLabels: StoryComponentType = {\n    render: function Render() {\n        const [selectedValues, setSelectedValues] = React.useState<\n            Array<string>\n        >([]);\n        const [opened, setOpened] = React.useState(true);\n\n        const labels: LabelsValues = {\n            clearSearch: \"Limpiar busqueda\",\n            filter: \"Filtrar\",\n            noResults: \"Sin resultados\",\n            selectAllLabel: (numOptions: number) =>\n                `Seleccionar todas (${numOptions})`,\n            selectNoneLabel: \"No seleccionar ninguno\",\n            noneSelected: \"0 escuelas seleccionadas\",\n            allSelected: \"Todas las escuelas\",\n            someSelected: (numSelectedValues: number) =>\n                `${numSelectedValues} escuelas seleccionadas`,\n        };\n\n        return (\n            <View style={styles.wrapper}>\n                <MultiSelect\n                    aria-label=\"Escuelas\"\n                    shortcuts={true}\n                    isFilterable={true}\n                    onChange={setSelectedValues}\n                    selectedValues={selectedValues}\n                    labels={labels}\n                    opened={opened}\n                    onToggle={setOpened}\n                >\n                    {translatedItems}\n                </MultiSelect>\n            </View>\n        );\n    },\n};\n\n/**\n * Custom option items\n */\n\n/**\n * This example illustrates how you can use the `OptionItem` component to\n * display a list with custom option items. Note that in this example, we are\n * using `leftAccessory` to display a custom icon for each option item,\n * `subtitle1` to optionally display a pill and `subtitle2` to display the\n * email.\n *\n * **Note:** As these are custom option items, we strongly recommend to pass the\n * `labelAsText` prop to display a summarized label in the menu.\n */\nexport const CustomOptionItems: StoryComponentType = {\n    render: function Render() {\n        const [opened, setOpened] = React.useState(true);\n        const [selectedValues, setSelectedValues] = React.useState<\n            Array<string>\n        >([]);\n\n        const handleChange = (selectedValues: Array<string>) => {\n            setSelectedValues(selectedValues);\n        };\n\n        const handleToggle = (opened: boolean) => {\n            setOpened(opened);\n        };\n\n        return (\n            <MultiSelect\n                aria-label=\"Users\"\n                onChange={handleChange}\n                selectedValues={selectedValues}\n                onToggle={handleToggle}\n                opened={opened}\n            >\n                {allProfilesWithPictures.map((user, index) => (\n                    <OptionItem\n                        key={user.id}\n                        value={user.id}\n                        label={user.name}\n                        leftAccessory={user.picture}\n                        subtitle1={\n                            index === 1 ? (\n                                <StatusBadge label=\"New\" kind=\"info\" />\n                            ) : undefined\n                        }\n                        subtitle2={user.email}\n                    />\n                ))}\n            </MultiSelect>\n        );\n    },\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.wrapper}>{Story()}</View>\n        ),\n    ],\n};\n\n/**\n * This example illustrates how a JSX Element can appear as the label by setting\n * `showOpenerLabelAsText` to false. Note that in this example, we define\n * `labelAsText` on the OptionItems to ensure that filtering works correctly.\n */\nexport const CustomOptionItemsWithNodeLabel: StoryComponentType = {\n    render: function Render() {\n        const [opened, setOpened] = React.useState(true);\n        const [selectedValues, setSelectedValues] = React.useState<\n            Array<string>\n        >([]);\n\n        const handleChange = (selectedValues: Array<string>) => {\n            setSelectedValues(selectedValues);\n        };\n\n        const handleToggle = (opened: boolean) => {\n            setOpened(opened);\n        };\n\n        return (\n            <MultiSelect\n                aria-label=\"Languages\"\n                onChange={handleChange}\n                selectedValues={selectedValues}\n                onToggle={handleToggle}\n                opened={opened}\n                showOpenerLabelAsText={false}\n                isFilterable={true}\n            >\n                {locales.map((locale, index) => (\n                    <OptionItem\n                        key={index}\n                        value={String(index)}\n                        label={\n                            <span>\n                                {chatIcon} {locale}\n                            </span>\n                        }\n                        labelAsText={locale}\n                    />\n                ))}\n            </MultiSelect>\n        );\n    },\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.wrapper}>{Story()}</View>\n        ),\n    ],\n};\n\n/**\n * Two MultiSelects side by side for manual screen reader testing.\n * - Only the interacted select announces — the neighboring select stays silent\n *   even as the parent re-renders.\n * - Selecting items announces the updated count while the dropdown is open.\n * - Closing the dropdown after making selections announces the final state\n *   (VoiceOver/Safari workaround for stale combobox values).\n */\nexport const TwoMultiSelects: StoryComponentType = {\n    render: function Render() {\n        const [gradeValues, setGradeValues] = React.useState<Array<string>>([\n            \"6\",\n            \"7\",\n        ]);\n        const [categoryValues, setCategoryValues] = React.useState<\n            Array<string>\n        >([]);\n\n        return (\n            <View style={styles.twoSelectsContainer}>\n                <LabeledField\n                    label=\"Grade Level\"\n                    field={\n                        <MultiSelect\n                            aria-label=\"Select grade levels\"\n                            isFilterable={true}\n                            labels={{\n                                noneSelected: \"All grades\",\n                                someSelected: (n: number) =>\n                                    n === 1\n                                        ? \"1 grade selected\"\n                                        : `${n} grades selected`,\n                            }}\n                            onChange={setGradeValues}\n                            selectedValues={gradeValues}\n                            style={styles.fullWidth}\n                        >\n                            <OptionItem label=\"Grade 3\" value=\"3\" />\n                            <OptionItem label=\"Grade 4\" value=\"4\" />\n                            <OptionItem label=\"Grade 5\" value=\"5\" />\n                            <OptionItem label=\"Grade 6\" value=\"6\" />\n                            <OptionItem label=\"Grade 7\" value=\"7\" />\n                            <OptionItem label=\"Grade 8\" value=\"8\" />\n                        </MultiSelect>\n                    }\n                />\n                <LabeledField\n                    label=\"Categories\"\n                    field={\n                        <MultiSelect\n                            aria-label=\"Select categories\"\n                            labels={{\n                                noneSelected: \"All categories\",\n                                someSelected: (n: number) =>\n                                    n === 1\n                                        ? \"1 category selected\"\n                                        : `${n} categories selected`,\n                            }}\n                            onChange={setCategoryValues}\n                            selectedValues={categoryValues}\n                            style={styles.fullWidth}\n                        >\n                            <OptionItem label=\"Argumentative\" value=\"arg\" />\n                            <OptionItem label=\"Expository\" value=\"exp\" />\n                            <OptionItem label=\"Narrative\" value=\"nar\" />\n                            <OptionItem label=\"Persuasive\" value=\"per\" />\n                        </MultiSelect>\n                    }\n                />\n            </View>\n        );\n    },\n    parameters: {\n        chromatic: {\n            // Manual screen reader testing story — no snapshot needed\n            disableSnapshot: true,\n        },\n    },\n};\n"}},"packages-dropdown-multiselect-accessibility":{"id":"packages-dropdown-multiselect-accessibility","name":"MultiSelect","path":"./__docs__/wonder-blocks-dropdown/multi-select.accessibility.stories.tsx","stories":[{"id":"packages-dropdown-multiselect-accessibility--using-aria-attributes","name":"Using LabeledField","snippet":"const UsingAriaAttributes = () => <MultiSelectAccessibility />;"},{"id":"packages-dropdown-multiselect-accessibility--using-opener-aria-label","name":"Using aria-label attributes","snippet":"const UsingOpenerAriaLabel = () => <MultiSelectAriaLabel />;"},{"id":"packages-dropdown-multiselect-accessibility--using-custom-opener-labeled-field","name":"Using custom opener in a LabeledField","snippet":"const UsingCustomOpenerLabeledField = () => <MultiSelectCustomOpenerLabeledField />;"},{"id":"packages-dropdown-multiselect-accessibility--using-custom-opener-aria-label","name":"Using aria-label on custom opener","snippet":"const UsingCustomOpenerAriaLabel = () => <MultiSelectCustomOpenerLabel />;"},{"id":"packages-dropdown-multiselect-accessibility--with-visible-announcer","name":"With visible Announcer","snippet":"const WithVisibleAnnouncer = () => <MultiSelectWithVisibleAnnouncer />;"},{"id":"packages-dropdown-multiselect-accessibility--using-labeled-field-for-read-only","name":"Using Labeled Field For Read Only","snippet":"const UsingLabeledFieldForReadOnly = function UsingLabeledFieldForReadOnlyStory() {\n    return (\n        <LabeledField\n            field={\n                <MultiSelect\n                    readOnly={true}\n                    onChange={() => {}}\n                    selectedValues={[\"1\"]}\n                >\n                    <OptionItem label=\"item 1\" value=\"1\" />\n                    <OptionItem label=\"item 2\" value=\"2\" />\n                    <OptionItem label=\"item 3\" value=\"3\" />\n                </MultiSelect>\n            }\n            label=\"Example Label\"\n            readOnlyMessage=\"Message about why it is read only\"\n        />\n    );\n};"}],"import":"import IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { MultiSelect, OptionItem } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A dropdown that consists of multiple selection items. This select allows multiple options to be selected. Clients are responsible for keeping track of the selected items. The multi select stays open until closed by the user. The onChange callback happens every time there is a change in the selection of the items. Make sure to provide a label for the field. This can be done by either: - (recommended) Using the **LabeledField** component to provide a label, description, and/or error message for the field - Using a `label` html tag with the `htmlFor` prop set to the unique id of the field - Using an `aria-label` attribute on the field - Using an `aria-labelledby` attribute on the field ## Usage ```jsx import {OptionItem, MultiSelect} from \"@khanacademy/wonder-blocks-dropdown\"; <MultiSelect aria-label=\"Fruits\" onChange={setSelectedValues} selectedValues={selectedValues}> <OptionItem value=\"pear\">Pear</OptionItem> <OptionItem value=\"mango\">Mango</OptionItem> </MultiSelect> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-dropdown/src/index.ts","description":"A dropdown that consists of multiple selection items. This select allows\nmultiple options to be selected. Clients are responsible for keeping track\nof the selected items.\n\nThe multi select stays open until closed by the user. The onChange callback\nhappens every time there is a change in the selection of the items.\n\nMake sure to provide a label for the field. This can be done by either:\n- (recommended) Using the **LabeledField** component to provide a label,\ndescription, and/or error message for the field\n- Using a `label` html tag with the `htmlFor` prop set to the unique id of\nthe field\n- Using an `aria-label` attribute on the field\n- Using an `aria-labelledby` attribute on the field\n\n## Usage\n\n```jsx\nimport {OptionItem, MultiSelect} from \"@khanacademy/wonder-blocks-dropdown\";\n\n<MultiSelect aria-label=\"Fruits\" onChange={setSelectedValues} selectedValues={selectedValues}>\n <OptionItem value=\"pear\">Pear</OptionItem>\n <OptionItem value=\"mango\">Mango</OptionItem>\n</MultiSelect>\n```","displayName":"MultiSelect","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"alignment":{"defaultValue":null,"description":"Whether this dropdown should be left-aligned or right-aligned with the\nopener component. Defaults to left-aligned.","name":"alignment","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"left\" | \"right\"","value":[{"value":"\"left\""},{"value":"\"right\""}]}},"disabled":{"defaultValue":null,"description":"Whether this component is disabled. A disabled dropdown may not be opened\nand does not support interaction. Defaults to false.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"readOnly":{"defaultValue":null,"description":"Specifies if the dropdown is read-only. Defaults to false.","name":"readOnly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"error":{"defaultValue":null,"description":"Whether this component is in an error state. Defaults to false.","name":"error","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"selectedValues":{"defaultValue":null,"description":"The values of the items that are currently selected.","name":"selectedValues","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string[]"}},"shortcuts":{"defaultValue":null,"description":"Whether to display shortcuts for Select All and Select None.","name":"shortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"showOpenerLabelAsText":{"defaultValue":null,"description":"When false, the SelectOpener can show a Node as a value. When true, the\nSelectOpener will use a string as a value. If using custom OptionItems, a\nplain text label can be provided with the `labelAsText` prop.\nDefaults to true.","name":"showOpenerLabelAsText","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"children":{"defaultValue":null,"description":"The items in this select.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(false | ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole; }> & { label: OptionLabel; labelAsText?: string; value: string; disabled: boolean; onClick?: (() => unknown) | undefined; onToggle: (value: string) => unknown; selected: boolean; focused: boolean; role: \"menuitem\" | \"menuitemcheckbox\" | \"option\"; testId?: string | undefined; variant?: \"checkbox\" | \"check\" | undefined; style?: StyleType; parentComponent?: \"listbox\" | \"dropdown\" | undefined; id?: string | undefined; horizontalRule: HorizontalRuleVariant | undefined; leftAccessory?: ReactNode; rightAccessory?: ReactNode; subtitle1?: TypographyText | undefined; subtitle2?: TypographyText | undefined; }, string | JSXElementConstructor<any>> | null | undefined)[] | undefined"}},"dropdownStyle":{"defaultValue":null,"description":"Optional styling to add to the dropdown wrapper.","name":"dropdownStyle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"id":{"defaultValue":null,"description":"Unique identifier attached to the field control. If used, we need to\nguarantee that the ID is unique within everything rendered on a page.\nUsed to match `<label>` with `<button>` elements for screenreaders.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"implicitAllEnabled":{"defaultValue":null,"description":"When this is true, the menu text shows either \"All items\" or the value\nset in `props.labels.allSelected` when no item is selected.","name":"implicitAllEnabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"isFilterable":{"defaultValue":null,"description":"When this is true, the dropdown body shows a search text input at the\ntop. The items will be filtered by the input.\nSelected items will be moved to the top when the dropdown is re-opened.","name":"isFilterable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"labels":{"defaultValue":null,"description":"The object containing the custom labels and placeholder values used inside this component.","name":"labels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"Partial<LabelsValues>"}},"onChange":{"defaultValue":null,"description":"Callback for when the selection changes. Parameter is an updated array of\nthe values that are now selected.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(selectedValues: string[]) => unknown"}},"onToggle":{"defaultValue":null,"description":"In controlled mode, use this prop in case the parent needs to be notified\nwhen the menu opens/closes.","name":"onToggle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((opened: boolean) => unknown)"}},"opened":{"defaultValue":null,"description":"Can be used to override the state of the ActionMenu by parent elements","name":"opened","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"opener":{"defaultValue":null,"description":"The child function that returns the anchor the MultiSelect will be\nactivated by. This function takes eventState, which allows the opener\nelement to access pointer event state.","name":"opener","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((openerProps: OpenerProps) => ReactElement<any, string | JSXElementConstructor<any>>)"}},"style":{"defaultValue":null,"description":"Optional styling to add to the opener component wrapper.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the opener component wrapper.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"dropdownId":{"defaultValue":null,"description":"Unique identifier attached to the listbox dropdown. If used, we need to\nguarantee that the ID is unique within everything rendered on a page.\nIf one is not provided, one is auto-generated. It is used for the\nopener's `aria-controls` attribute for screenreaders.","name":"dropdownId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"required":{"defaultValue":null,"description":"Whether this field is required to continue, or the error message to\nrender if this field is left blank.\n\nThis can be a boolean or a string.\n\nString:\nPlease pass in a translated string to use as the error message that will\nrender if the user leaves this field blank. If this field is required,\nand a string is not passed in, a default untranslated string will render\nupon error.\nNote: The string will not be used if a `validate` prop is passed in.\n\nExample message: i18n._(\"A password is required to log in.\")\n\nBoolean:\nTrue/false indicating whether this field is required. Please do not pass\nin `true` if possible - pass in the error string instead.\nIf `true` is passed, and a `validate` prop is not passed, that means\nthere is no corresponding message and the default untranlsated message\nwill be used.","name":"required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string | boolean"}},"validate":{"defaultValue":null,"description":"Provide a validation for the field value.\nReturn a string error message or null | void for a valid input.\n\nUse this for errors that are shown to the user while they are filling out\na form.","name":"validate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((value: string[]) => string | void | null)"}},"onValidate":{"defaultValue":null,"description":"Called right after the field is validated.","name":"onValidate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/multi-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((errorMessage?: string | null) => unknown)"}}},"exportName":"MultiSelect"},"docs":{"packages-dropdown-multiselect-accessibility--docs":{"id":"packages-dropdown-multiselect-accessibility--docs","name":"Docs","path":"./__docs__/wonder-blocks-dropdown/multi-select.accessibility.mdx","title":"Packages / Dropdown / MultiSelect / Accessibility","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as MultiSelectAccessibilityStories from './multi-select.accessibility.stories';\n\nimport {OptionItem, MultiSelect} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {LabeledField} from \"@khanacademy/wonder-blocks-labeled-field\";\n\n<Meta of={MultiSelectAccessibilityStories} />\n\n# Accessibility\n\n## Using `LabeledField` with `MultiSelect`\n\nTo associate a `MultiSelect` with another visible element (e.g. a `<label>`),\nwrap it in a `LabeledField` component. The label will apply to the `MultiSelect`\nopener. With `LabeledField`, you can supply label text (or a JSX node)\nusing the `label` prop to generate a paired `<label>` element. It comes with\nfield validation and other features baked in!\n\nIf for some reason you can't use `LabeledField` for a visible label, you can still\nmake `MultiSelect` accessible in a screen reader by associating it with `<label for=\"\">`.\nPass the `id` of the `MultiSelect` to the `for` attribute.\n\nAlternatively, you can create an accessible name for `MultiSelect` using `aria-labelledby`.\nPut `aria-labelledby` on `MultiSelect` pointing to the `id` of any other element.\nIt won't give you the same enhanced click target as a paired `<label>`, but it still\nhelps to create a more accessible experience.\n\n<Canvas of={MultiSelectAccessibilityStories.UsingAriaAttributes} />\n\n## Using `aria-label` for the opener and/or child options\n\nA visible label with `<LabeledField>` is preferred. However, for specific cases\nwhere the `MultiSelect` is not paired with a `LabeledField` or other visible\n`<label>` element, you **must** supply an `aria-label` attribute for an\naccessible name on the opener.\n\nThis will ensure the `MultiSelect` as a whole has a name that describes its purpose.\n\nAlso, if you need screen readers to understand relevant information on\noption items, you can use `aria-label` on each item. e.g. You can use it to let\nscreen readers know the current selected/unselected status of the item when it\nreceives focus. This can be useful when the options contain icons or other information\nthat would need to be omitted from the visible label.\n\n<Canvas of={MultiSelectAccessibilityStories.UsingOpenerAriaLabel} />\n\n## Naming the listbox\n\nThe listbox that contains the options is rendered in a portal, so it is\ndisconnected in the DOM from the opener that labels it. To give the options\ncontext when a screen reader user navigates into the listbox, `MultiSelect`\nlabels the listbox with the same name as the opener, using whichever of these\nlabels the opener has:\n\n1. The `<label>` element associated with the opener, such as the one rendered by\n`LabeledField`. The listbox refers to the same label element, which is the\nlabelling recommended for the\n[combobox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/).\n2. The element referenced by `aria-labelledby` on the `MultiSelect`.\n3. The `aria-label` on the `MultiSelect`.\n\nSo, a `MultiSelect` labelled \"Students\" has a listbox named \"Students\". If the\n`MultiSelect` has no label at all, neither does its listbox, which is another\nreason to always give it one.\n\n## Automatic screen reader announcements in `MultiSelect`\n\n`MultiSelect` uses the [Wonder Blocks Announcer](/?path=/docs/packages-announcer--docs)\nunder the hood for content updates in screen readers, such as the number of items\nand the selected value.\n\nThis integration works around 2 bugs in VoiceOver and Safari on Mac OSX 14 and 15\nwhere the combobox opener value is cut off and cached incorrectly. The value is\nbuggy when announced, differing from its current visual presentation and DOM content.\n\nBugs filed in WebKit include:\n\n1. AX: combobox button value text clipped https://bugs.webkit.org/show_bug.cgi?id=285047\n2. AX: VoiceOver does not perceive changes to combobox value in an opener\nhttps://bugs.webkit.org/show_bug.cgi?id=286828\n\n### Testing the Announcer\n\nTo observe the affect of the Announcer, you have a few options:\n\n1. Turn on a screen reader such as VoiceOver or NVDA while using the `MultiSelect`\n2. Inspect the DOM in the browser and look at the `#wbAnnounce` DIV element\n3. Look at the `With visible Announcer` story to see messages appended\nvisually to the DOM\n\n<Canvas of={MultiSelectAccessibilityStories.WithVisibleAnnouncer} />\n\n## Read only state\n\nWe recommend using `MultiSelect` with `LabeledField` so that `LabeledField`'s\n`readOnlyMessage` prop can be used to provide context for users on why the field\nis in a read only state.\n\nNote: The component uses `aria-disabled` instead of `aria-readonly` to indicate\nthat the user can't change the value. This is because `aria-readonly` has low\nbrowser + screen reader support currently with `combobox` roles. Using\n`aria-disabled` and the `readOnlyMessage` provides contextual information to\nusers (`LabeledField`'s `readOnlyMessage` is included in the combobox element's\n`aria-describedby` attribute)\n\n<Canvas of={MultiSelectAccessibilityStories.UsingLabeledFieldForReadOnly} />"}}},"packages-dropdown-optionitem":{"id":"packages-dropdown-optionitem","name":"OptionItem","path":"./__docs__/wonder-blocks-dropdown/option-item.stories.tsx","stories":[{"id":"packages-dropdown-optionitem--default","name":"Default","snippet":"const Default = () => <OptionItem label=\"Option Item\" onClick={() => {}} />;","description":"The default option item with a `label` and an `onClick` handler. This is used to trigger actions (if needed)."},{"id":"packages-dropdown-optionitem--disabled","name":"Disabled","snippet":"const Disabled = () => <OptionItem label=\"Option Item\" onClick={() => {}} disabled />;","description":"OptionItem can be `disabled`. This is used to indicate that the Option is not available."},{"id":"packages-dropdown-optionitem--custom-option-item","name":"Custom Option Item","snippet":"const CustomOptionItem = () => <OptionItem\n    label=\"Option Item\"\n    onClick={() => {}}\n    subtitle1={AccessoryMappings.badge}\n    subtitle2=\"Subtitle 2\"\n    leftAccessory={(<PhosphorIcon icon={IconMappings.calendar} size=\"medium\" />)}\n    rightAccessory={(<PhosphorIcon icon={IconMappings.caretRight} size=\"medium\" />)} />;","description":"OptionItem can have more complex content, such as icons. This can be done by passing in a `leftAccessory` and/or `rightAccessory` prop. These can be any React node, and internally use the WB DetailCell component to render. If you need more control over the content, you can also use `subtitle1` and `subtitle2` props. These can be any React node, and internally use the WB `LabelSmall` component to render."},{"id":"packages-dropdown-optionitem--horizontal-rule","name":"Horizontal Rule","snippet":"const HorizontalRule = () => <View style={styles.items}>\n    <OptionItem onClick={() => {}} label=\"full-width\" horizontalRule=\"full-width\" />\n    <OptionItem onClick={() => {}} label=\"inset\" horizontalRule=\"inset\" />\n    <OptionItem onClick={() => {}} label=\"none\" />\n    <OptionItem label=\"Option Item\" onClick={() => {}} />\n</View>;","description":"`horizontalRule` can be used to separate items within SingleSelect/MultiSelect instances. It defaults to `none`, but can be set to `inset` or `full-width` to add a horizontal rule at the bottom of the cell."}],"import":"import { ComponentInfo, OptionItem } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"OptionItem\" component.\n  48 |  * ```\n  49 |  */\n> 50 | export default {\n     | ^\n  51 |     title: \"Packages / Dropdown / OptionItem\",\n  52 |     component: OptionItem,\n  53 |     argTypes: optionItemArgtypes,\n\n./__docs__/wonder-blocks-dropdown/option-item.stories.tsx:\nimport {Meta} from \"@storybook/react-vite\";\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport {PropsFor, View} from \"@khanacademy/wonder-blocks-core\";\nimport {OptionItem} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport packageConfig from \"../../packages/wonder-blocks-dropdown/package.json\";\nimport {IconMappings} from \"../wonder-blocks-icon/phosphor-icon.argtypes\";\nimport optionItemArgtypes, {AccessoryMappings} from \"./option-item.argtypes\";\n\nconst defaultArgs = {\n    label: \"Option Item\",\n    onClick: () => {},\n    disabled: false,\n    testId: \"\",\n    horizontalRule: \"none\",\n    leftAccessory: null,\n    rightAccessory: null,\n};\n\nconst styles = StyleSheet.create({\n    example: {\n        background: semanticColor.core.background.base.subtle,\n        padding: sizing.size_160,\n        width: 300,\n    },\n    items: {\n        background: semanticColor.core.background.base.default,\n    },\n});\n\n/**\n * For option items that can be selected in a dropdown, selection denoted either\n * with a check ✔️ or a checkbox ☑️. Use as children in `SingleSelect` or\n * `MultiSelect`.\n *\n * ### Usage\n *\n * ```tsx\n * import {OptionItem, SingleSelect} from \"@khanacademy/wonder-blocks-dropdown\";\n *\n * <SingleSelect {...props}>\n *   <OptionItem label=\"Option Item\" onClick={() => {}} />\n * </SingleSelect>\n * ```\n */\nexport default {\n    title: \"Packages / Dropdown / OptionItem\",\n    component: OptionItem,\n    argTypes: optionItemArgtypes,\n    args: defaultArgs,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>\n                <div role=\"listbox\" aria-label=\"Example\">\n                    <Story />\n                </div>\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        // These stories are being tested in option-item-variants.stories.tsx\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n} as Meta<typeof OptionItem>;\n\n/**\n * The default option item with a `label` and an `onClick` handler. This is used\n * to trigger actions (if needed).\n */\nexport const Default = {\n    args: {\n        label: \"Option Item\",\n        onClick: () => {},\n    },\n};\n\n/**\n * OptionItem can be `disabled`. This is used to indicate that the Option is not\n * available.\n */\nexport const Disabled = {\n    args: {\n        label: \"Option Item\",\n        onClick: () => {},\n        disabled: true,\n    },\n};\n\n/**\n * OptionItem can have more complex content, such as icons.\n *\n * This can be done by passing in a `leftAccessory` and/or `rightAccessory`\n * prop. These can be any React node, and internally use the WB DetailCell\n * component to render.\n *\n * If you need more control over the content, you can also use `subtitle1` and\n * `subtitle2` props. These can be any React node, and internally use the WB\n * `LabelSmall` component to render.\n */\nexport const CustomOptionItem = {\n    args: {\n        label: \"Option Item\",\n        onClick: () => {},\n        subtitle1: AccessoryMappings.badge,\n        subtitle2: \"Subtitle 2\",\n        leftAccessory: (\n            <PhosphorIcon icon={IconMappings.calendar} size=\"medium\" />\n        ),\n        rightAccessory: (\n            <PhosphorIcon icon={IconMappings.caretRight} size=\"medium\" />\n        ),\n    },\n};\n\n/**\n * `horizontalRule` can be used to separate items within\n * SingleSelect/MultiSelect instances. It defaults to `none`, but can be set to\n * `inset` or `full-width` to add a horizontal rule at the bottom of the cell.\n */\nexport const HorizontalRule = {\n    args: {\n        label: \"Option Item\",\n        onClick: () => {},\n    },\n    render: (args: PropsFor<typeof OptionItem>): React.ReactNode => (\n        <View style={styles.items}>\n            <OptionItem\n                {...args}\n                label=\"full-width\"\n                horizontalRule=\"full-width\"\n            />\n            <OptionItem {...args} label=\"inset\" horizontalRule=\"inset\" />\n            <OptionItem {...args} label=\"none\" />\n            <OptionItem {...args} />\n        </View>\n    ),\n    parameters: {\n        chromatic: {\n            // Enabling to test how the horizontal rule looks.\n            disableSnapshot: false,\n        },\n    },\n};\n"}},"packages-dropdown-singleselect":{"id":"packages-dropdown-singleselect","name":"SingleSelect as unknown as React.ComponentType<any>","path":"./__docs__/wonder-blocks-dropdown/single-select.stories.tsx","stories":[{"id":"packages-dropdown-singleselect--default","name":"Default","snippet":"const Default = () => {\n    const [selectedValue, setSelectedValue] = React.useState(\n        args.selectedValue,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <SingleSelect\n            error={false}\n            isFilterable\n            disabled={false}\n            readOnly={false}\n            placeholder=\"Choose a fruit\"\n            aria-label=\"Fruit\"\n            onChange={setSelectedValue}\n            selectedValue={selectedValue}\n            opened={opened}\n            onToggle={setOpened}>\n            {items}\n        </SingleSelect>\n    );\n};"},{"id":"packages-dropdown-singleselect--with-initial-value","name":"With Initial Value","snippet":"const WithInitialValue = () => {\n    const [selectedValue, setSelectedValue] = React.useState(\n        args.selectedValue,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <SingleSelect\n            error={false}\n            isFilterable\n            disabled={false}\n            readOnly={false}\n            placeholder=\"Choose a fruit\"\n            aria-label=\"Fruit\"\n            onChange={setSelectedValue}\n            selectedValue={selectedValue}\n            opened={opened}\n            onToggle={setOpened}>\n            {items}\n        </SingleSelect>\n    );\n};","description":"This example demonstrates how SingleSelect behaves with an initial value. The screen reader will not announce the initial value on mount, but will announce when the value changes through user interaction."},{"id":"packages-dropdown-singleselect--with-labeled-field","name":"With Labeled Field","snippet":"const WithLabeledField = function LabeledFieldStory(args) {\n    const [value, setValue] = React.useState(args.selectedValue || \"\");\n    const [errorMessage, setErrorMessage] = React.useState<\n        string | null | undefined\n    >();\n    return (\n        <LabeledField\n            label=\"Label\"\n            field={\n                <SingleSelect\n                    {...args}\n                    selectedValue={value}\n                    onChange={setValue}\n                    onValidate={setErrorMessage}\n                    required={true}\n                >\n                    {optionItems}\n                </SingleSelect>\n            }\n            description=\"Description\"\n            errorMessage={errorMessage}\n            contextLabel=\"required\"\n        />\n    );\n};","description":"The field can be used with the LabeledField component to provide a label, description, required indicator, and/or error message for the field. Using the field with the LabeledField component will ensure that the field has the relevant accessibility attributes set."},{"id":"packages-dropdown-singleselect--controlled-opened","name":"Controlled (opened)","snippet":"const ControlledOpened = () => <ControlledOpenedWrapper\n    error={false}\n    isFilterable\n    opened={false}\n    disabled={false}\n    readOnly={false}\n    aria-label=\"Fruit\"\n    placeholder=\"Choose a fruit\"\n    selectedValue=\"\" />;","description":"Sometimes you'll want to trigger a dropdown programmatically. This can be done by setting a value to the `opened` prop (`true` or `false`). In this situation the `SingleSelect` is a controlled component. The parent is responsible for managing the opening/closing of the dropdown when using this prop. This means that you'll also have to update `opened` to the value triggered by the `onToggle` prop."},{"id":"packages-dropdown-singleselect--long-option-labels","name":"Long Option Labels","snippet":"const LongOptionLabels = function Render() {\n    const [selectedValue, setSelectedValue] = React.useState(\"\");\n    const [opened, setOpened] = React.useState(false);\n\n    const smallWidthStyle = {width: 200};\n\n    return (\n        <SingleSelect\n            aria-label=\"Fruit\"\n            onChange={setSelectedValue}\n            selectedValue={selectedValue}\n            opened={opened}\n            onToggle={setOpened}\n            placeholder=\"Fruit placeholder is also long\"\n            style={smallWidthStyle}\n        >\n            <OptionItem\n                label=\"Bananas are the most amazing fruit I've ever had in my entire life.\"\n                value=\"banana\"\n                key={0}\n                style={smallWidthStyle}\n            />\n            <OptionItem\n                label=\"Strawberries are the most amazing fruit I've ever had in my entire life.\"\n                value=\"strawberry\"\n                disabled\n                key={1}\n                style={smallWidthStyle}\n            />\n            <OptionItem\n                label=\"Pears are the most amazing fruit I've ever had in my entire life.\"\n                value=\"pear\"\n                key={2}\n                style={smallWidthStyle}\n            />\n            <OptionItem\n                label=\"Oranges are the most amazing fruit I've ever had in my entire life.\"\n                value=\"orange\"\n                key={3}\n                style={smallWidthStyle}\n            />\n            <OptionItem\n                label=\"Watermelons are the most amazing fruit I've ever had in my entire life.\"\n                value=\"watermelon\"\n                key={4}\n                style={smallWidthStyle}\n            />\n            <OptionItem\n                label=\"Apples are the most amazing fruit I've ever had in my entire life.\"\n                value=\"apple\"\n                key={5}\n                style={smallWidthStyle}\n            />\n            <OptionItem\n                label=\"Grapes are the most amazing fruit I've ever had in my entire life.\"\n                value=\"grape\"\n                key={6}\n                style={smallWidthStyle}\n            />\n            <OptionItem\n                label=\"Lemons are the most amazing fruit I've ever had in my entire life.\"\n                value=\"lemon\"\n                key={7}\n                style={smallWidthStyle}\n            />\n            <OptionItem\n                label=\"Mangos are the most amazing fruit I've ever had in my entire life.\"\n                value=\"mango\"\n                key={8}\n                style={smallWidthStyle}\n            />\n        </SingleSelect>\n    );\n};","description":"If the label for the opener or the OptionItem(s) is longer than its bounding box, it will be truncated with an ellipsis at the end."},{"id":"packages-dropdown-singleselect--disabled","name":"Disabled","snippet":"const Disabled = () => (\n    <View style={{gap: sizing.size_320}}>\n        <LabeledField\n            label=\"Disabled prop is set to true\"\n            field={\n                <SingleSelect\n                    placeholder=\"Choose a fruit\"\n                    onChange={() => {}}\n                    selectedValue=\"\"\n                    disabled={true}\n                >\n                    {items}\n                </SingleSelect>\n            }\n        />\n        <LabeledField\n            label=\"No items\"\n            field={\n                <SingleSelect\n                    placeholder=\"Choose a fruit\"\n                    onChange={() => {}}\n                />\n            }\n        />\n        <LabeledField\n            label=\"All items are disabled\"\n            field={\n                <SingleSelect\n                    placeholder=\"Choose a fruit\"\n                    onChange={() => {}}\n                >\n                    <OptionItem label=\"Apple\" value=\"1\" disabled={true} />\n                    <OptionItem label=\"Orange\" value=\"2\" disabled={true} />\n                </SingleSelect>\n            }\n        />\n    </View>\n);","description":"`SingleSelect` can be disabled by passing `disabled={true}`. This can be useful when you want to disable a control temporarily. It is also disabled when: - there are no items - there are items and they are all disabled Note: The `disabled` prop sets the `aria-disabled` attribute to `true` instead of setting the `disabled` attribute. This is so that the component remains focusable while communicating to screen readers that it is disabled."},{"id":"packages-dropdown-singleselect--read-only","name":"Read Only","snippet":"const ReadOnly = function ReadOnlyStory(args) {\n    const [selectedValue, setSelectedValue] = React.useState(\n        items[0].props.value,\n    );\n    return (\n        <LabeledField\n            label=\"Example Label\"\n            field={\n                <SingleSelect\n                    {...args}\n                    placeholder=\"Choose a fruit\"\n                    readOnly={true}\n                    onChange={setSelectedValue}\n                    selectedValue={selectedValue}\n                >\n                    {items}\n                </SingleSelect>\n            }\n            readOnlyMessage=\"Message about why it is read only\"\n        />\n    );\n};","description":"A SingleSelect can be set to read-only by passing `readOnly` to `true`. When `true`, read-only styling is applied and the aria-disabled attribute is set to \"true\". A user won't be able to open the dropdown or change the selected value. We recommend using the SingleSelect with `LabeledField`. The `readOnlyMessage` prop in `LabeledField` can be set so that users know why the field is marked as read only. Note: We set `aria-disabled` instead of `aria-readonly` due to low browser + screen reader support for `aria-readonly`."},{"id":"packages-dropdown-singleselect--error","name":"Error","snippet":"const Error = (\n    storyArgs: PropsFor<typeof SingleSelect> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [opened, setOpened] = React.useState(false);\n    const [selectedValue, setSelectedValue] = React.useState(\n        args.selectedValue,\n    );\n    const [errorMessage, setErrorMessage] = React.useState<\n        null | string | void\n    >(null);\n    return (\n        <LabeledField\n            label={label || \"SingleSelect\"}\n            errorMessage={\n                errorMessage || (args.error && \"Error from error prop\")\n            }\n            field={\n                <SingleSelect\n                    {...args}\n                    opened={opened}\n                    onToggle={setOpened}\n                    selectedValue={selectedValue}\n                    onChange={setSelectedValue}\n                    placeholder=\"Choose a fruit\"\n                    validate={(value) => {\n                        if (value === \"lemon\") {\n                            return \"Pick another option!\";\n                        }\n                    }}\n                    onValidate={setErrorMessage}\n                >\n                    {items}\n                </SingleSelect>\n            }\n        />\n    );\n};","description":"If the `error` prop is set to true, the field will have error styling and `aria-invalid` set to `true`. This is useful for scenarios where we want to show an error on a specific field after a form is submitted (server validation). Note: The `required` and `validate` props can also put the field in an error state."},{"id":"packages-dropdown-singleselect--required","name":"Required","snippet":"const Required = (\n    storyArgs: PropsFor<typeof SingleSelect> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [opened, setOpened] = React.useState(false);\n    const [selectedValue, setSelectedValue] = React.useState(\n        args.selectedValue,\n    );\n    const [errorMessage, setErrorMessage] = React.useState<\n        null | string | void\n    >(null);\n    return (\n        <LabeledField\n            label={label || \"SingleSelect\"}\n            errorMessage={\n                errorMessage || (args.error && \"Error from error prop\")\n            }\n            field={\n                <SingleSelect\n                    {...args}\n                    opened={opened}\n                    onToggle={setOpened}\n                    selectedValue={selectedValue}\n                    onChange={setSelectedValue}\n                    placeholder=\"Choose a fruit\"\n                    validate={(value) => {\n                        if (value === \"lemon\") {\n                            return \"Pick another option!\";\n                        }\n                    }}\n                    onValidate={setErrorMessage}\n                >\n                    {items}\n                </SingleSelect>\n            }\n        />\n    );\n};","description":"A required field will have error styling and aria-invalid set to true if the select is left blank. When `required` is set to `true`, validation is triggered: - When a user tabs away from the select (opener's onBlur event) - When a user closes the dropdown without selecting a value (either by pressing escape, clicking away, or clicking on the opener). Validation errors are cleared when a valid value is selected. The component will set aria-invalid to \"false\" and call the onValidate prop with null."},{"id":"packages-dropdown-singleselect--error-from-validation","name":"Error From Validation","snippet":"const ErrorFromValidation = () => {\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <ControlledSingleSelect\n                error={false}\n                isFilterable\n                opened={false}\n                disabled={false}\n                readOnly={false}\n                aria-label=\"Fruit\"\n                placeholder=\"Choose a fruit\"\n                selectedValue=\"\"\n                label=\"Validation example (try picking lemon to trigger an error)\"\n                validate={(value) => {\n                    if (value === \"lemon\") {\n                        return \"Pick another option!\";\n                    }\n                }}>\n                {items}\n            </ControlledSingleSelect>\n            <ControlledSingleSelect\n                error={false}\n                isFilterable\n                opened={false}\n                disabled={false}\n                readOnly={false}\n                aria-label=\"Fruit\"\n                placeholder=\"Choose a fruit\"\n                label=\"Validation example (on mount)\"\n                validate={(value) => {\n                    if (value === \"lemon\") {\n                        return \"Pick another option!\";\n                    }\n                }}\n                selectedValue=\"lemon\">\n                {items}\n            </ControlledSingleSelect>\n        </View>\n    );\n};","description":"If a selected value fails validation, the field will have error styling. This is useful for scenarios where we want to show errors while a user is filling out a form (client validation). Note that we will internally set the correct `aria-invalid` attribute to the field: - aria-invalid=\"true\" if there is an error. - aria-invalid=\"false\" if there is no error. Validation is triggered: - On mount if the `value` prop is not empty and it is not required - When an option is selected Validation errors are cleared when a valid value is selected. The component will set aria-invalid to \"false\" and call the onValidate prop with null."},{"id":"packages-dropdown-singleselect--two-with-text","name":"Two With Text","snippet":"const TwoWithText = () => {\n    const [selectedValue, setSelectedValue] = React.useState(\n        args.selectedValue,\n    );\n    const [secondSelectedValue, setSecondSelectedValue] = React.useState(\n        args.selectedValue,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    const [secondOpened, setSecondOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <div>Here is some text to nest the dropdown\n                            <SingleSelect\n                error={false}\n                isFilterable\n                disabled={false}\n                readOnly={false}\n                aria-label=\"Fruit\"\n                placeholder=\"Choose a fruit\"\n                onChange={setSelectedValue}\n                selectedValue={selectedValue}\n                opened={opened}\n                onToggle={setOpened}\n                style={{display: \"inline-block\"}}>\n                {[...items, <OptionItem label=\"\" value=\"\" key={9} />]}\n            </SingleSelect>. And here is more text to compare!\n                            <SingleSelect\n                error={false}\n                isFilterable\n                disabled={false}\n                readOnly={false}\n                aria-label=\"Fruit\"\n                placeholder=\"Choose a fruit\"\n                onChange={setSecondSelectedValue}\n                selectedValue={secondSelectedValue}\n                opened={secondOpened}\n                onToggle={setSecondOpened}\n                style={{display: \"inline-block\"}}>\n                {[...items, <OptionItem label=\"\" value=\"\" key={9} />]}\n            </SingleSelect>\n        </div>\n    );\n};","description":"This story has two selects nested inline within text."},{"id":"packages-dropdown-singleselect--virtualized-filterable-without-enable-type-ahead","name":"Virtualized (isFilterable:true, enableTypeAhead:false)","snippet":"const VirtualizedFilterableWithoutEnableTypeAhead = () => (\n    <VirtualizedSingleSelect enableTypeAhead={false} selectedValue={\"ZW\"} />\n);","description":"When there are many options, you could use a search filter in the SingleSelect. The search filter will be performed toward the labels of the option items. Note that this example shows how we can add custom styles to the dropdown as well."},{"id":"packages-dropdown-singleselect--virtualized-filterable","name":"Virtualized (isFilterable:true, enableTypeAhead:true)","snippet":"const VirtualizedFilterable = () => <VirtualizedSingleSelect enableTypeAhead={true} />;","description":"When there are many options, you could use a search filter in the SingleSelect. The search filter will be performed toward the labels of the option items. The enableTypeAhead will focus on the first dropdown item whose label starts with the search filter. Note that this example shows how we can add custom styles to the dropdown as well."},{"id":"packages-dropdown-singleselect--virtualized-opened","name":"Virtualized (opened)","snippet":"const VirtualizedOpened = () => <VirtualizedSingleSelect opened={true} />;","description":"This example shows how to use the `opened` prop to open the dropdown."},{"id":"packages-dropdown-singleselect--virtualized-opened-no-selection","name":"Virtualized (opened, no selection)","snippet":"const VirtualizedOpenedNoSelection = () => (\n    <VirtualizedSingleSelect opened={true} selectedValue={null} />\n);","description":"This example shows how the focus is set to the search field if there's no current selection."},{"id":"packages-dropdown-singleselect--dropdown-in-modal","name":"Dropdown in a modal","snippet":"const DropdownInModal = function Render() {\n    const [value, setValue] = React.useState<any>(null);\n    const [opened, setOpened] = React.useState(true);\n\n    const modalContent = (\n        <View style={styles.scrollableArea}>\n            <View style={{gap: sizing.size_240}}>\n                <BodyText>\n                    Sometimes we want to include Dropdowns inside a Modal,\n                    and these controls can be accessed only by scrolling\n                    down. This example help us to demonstrate that\n                    SingleSelect components can correctly be displayed\n                    within the visible scrolling area.\n                </BodyText>\n                <SingleSelect\n                    onChange={(selected) => setValue(selected)}\n                    isFilterable={true}\n                    opened={opened}\n                    onToggle={(opened) => setOpened(opened)}\n                    placeholder=\"Select a country\"\n                    selectedValue={value}\n                >\n                    {optionItems}\n                </SingleSelect>\n            </View>\n        </View>\n    );\n\n    const modal = (\n        <OnePaneDialog title=\"Dropdown in a Modal\" content={modalContent} />\n    );\n\n    return (\n        <View style={styles.centered}>\n            <ModalLauncher modal={modal}>\n                {({openModal}) => (\n                    <Button onClick={openModal}>Click here!</Button>\n                )}\n            </ModalLauncher>\n        </View>\n    );\n};","description":"Sometimes we want to include Dropdowns inside a Modal, and these controls can be accessed only by scrolling down. This example help us to demonstrate that `SingleSelect` components can correctly be displayed within the visible scrolling area."},{"id":"packages-dropdown-singleselect--with-custom-opener","name":"With custom opener","snippet":"const WithCustomOpener = () => {\n    const [selectedValue, setSelectedValue] = React.useState(\n        args.selectedValue ?? \"\",\n    );\n\n    return (\n        <SingleSelect\n            error={false}\n            isFilterable\n            opened={false}\n            disabled={false}\n            readOnly={false}\n            aria-label=\"Fruit\"\n            placeholder=\"Choose a fruit\"\n            selectedValue={selectedValue}\n            onChange={setSelectedValue}\n            opener={({hovered, pressed, text}) => (\n                <CustomOpener\n                    testId=\"single-select-custom-opener\"\n                    styles={{\n                        root: [\n                            styles.customOpener,\n                            hovered && styles.customOpenerHovered,\n                            pressed && styles.customOpenerPressed,\n                            args.disabled && styles.customOpenerDisabled,\n                        ],\n                    }}\n                >\n                    <PhosphorIcon\n                        icon={IconMappings.plusCircle}\n                        size=\"small\"\n                    />\n                    <BodyText tag=\"span\" weight=\"bold\">\n                        {text}\n                    </BodyText>\n                </CustomOpener>\n            )}>\n            {items}\n        </SingleSelect>\n    );\n};","description":"When you need a fully custom-styled opener, use `CustomOpener`. It provides a blank-slate `<button>` with the WB focus ring baked in and correct ref forwarding for the dropdown's focus management wiring. The `opener` render prop receives `hovered`, `focused`, `pressed`, `text`, and `opened` values that can be passed to child content for conditional styling. Focus ring styles are handled automatically by `CustomOpener` via CSS — you do not need to apply `focusStyles` yourself. **Note:** Pass `testId` directly to `CustomOpener` for e2e test targeting. **Accessibility:** When a custom opener is used, `aria-expanded`, `aria-haspopup`, and `aria-controls` are added automatically."},{"id":"packages-dropdown-singleselect--right-to-left","name":"Right to Left","snippet":"const RightToLeft = () => <SingleSelect as unknown as React.ComponentType<any>\n    error={false}\n    isFilterable\n    opened={false}\n    disabled={false}\n    readOnly={false}\n    aria-label=\"Fruit\"\n    placeholder=\"Choose a fruit\"\n    selectedValue=\"\" />;","description":"When in the right-to-left direction, the single select is mirrored."},{"id":"packages-dropdown-singleselect--custom-labels","name":"Custom Labels","snippet":"const CustomLabels = function Render() {\n    const [value, setValue] = React.useState<any>(null);\n    const [opened, setOpened] = React.useState(true);\n\n    const translatedLabels: SingleSelectLabelsValues = {\n        clearSearch: \"Limpiar busqueda\",\n        filter: \"Filtrar\",\n        noResults: \"Sin resultados\",\n        someResults: (numResults: number) => `${numResults} frutas`,\n    };\n\n    return (\n        <View style={styles.wrapper}>\n            <SingleSelect\n                aria-label=\"Fruta\"\n                isFilterable={true}\n                onChange={setValue}\n                selectedValue={value}\n                labels={translatedLabels}\n                opened={opened}\n                onToggle={setOpened}\n                placeholder=\"Selecciona una fruta\"\n            >\n                {translatedItems}\n            </SingleSelect>\n        </View>\n    );\n};","description":"This example illustrates how you can pass custom labels to the `SingleSelect` component."},{"id":"packages-dropdown-singleselect--auto-focus-disabled","name":"Auto Focus Disabled","snippet":"const AutoFocusDisabled = function Render() {\n    const textFieldRef = React.useRef(null);\n    const [value, setValue] = React.useState<any>(null);\n    const [opened, setOpened] = React.useState(false);\n\n    return (\n        <View style={styles.wrapper}>\n            <SingleSelect\n                autoFocus={false}\n                enableTypeAhead={false}\n                onChange={setValue}\n                selectedValue={value}\n                opened={opened}\n                onToggle={setOpened}\n                placeholder=\"Choose a time\"\n                opener={({focused, hovered, pressed, text}) => (\n                    <View style={styles.row}>\n                        <TextField\n                            placeholder=\"Choose a time\"\n                            id=\"single-select-opener\"\n                            onChange={setValue}\n                            value={value ?? \"\"}\n                            ref={textFieldRef}\n                            autoComplete=\"off\"\n                            style={styles.fullBleed}\n                        />\n                        <PhosphorIcon\n                            color={semanticColor.status.notice.foreground}\n                            icon={IconMappings.clockBold}\n                            size=\"small\"\n                            style={styles.icon}\n                        />\n                    </View>\n                )}\n            >\n                {timeSlotOptions}\n            </SingleSelect>\n        </View>\n    );\n};","description":"This example illustrates how you can disable the auto focus of the `SingleSelect` component. Note that for this example, we are using a `TextField` component as a custom opener to ilustrate how the focus remains on the opener. **Note:** We also disabled the `enableTypeAhead` prop to be able to use the textbox properly."},{"id":"packages-dropdown-singleselect--custom-option-items","name":"Custom Option Items","snippet":"const CustomOptionItems = function Render() {\n    const [opened, setOpened] = React.useState(true);\n    const [selectedValue, setSelectedValue] = React.useState(\"\");\n\n    const handleChange = (selectedValue: string) => {\n        setSelectedValue(selectedValue);\n    };\n\n    const handleToggle = (opened: boolean) => {\n        setOpened(opened);\n    };\n\n    return (\n        <View style={styles.wrapper}>\n            <SingleSelect\n                aria-label=\"Profile\"\n                placeholder=\"Select a profile\"\n                onChange={handleChange}\n                selectedValue={selectedValue}\n                onToggle={handleToggle}\n                opened={opened}\n            >\n                {allProfilesWithPictures.map((user, index) => (\n                    <OptionItem\n                        key={user.id}\n                        value={user.id}\n                        horizontalRule=\"full-width\"\n                        label={user.name}\n                        leftAccessory={user.picture}\n                        subtitle1={\n                            index === 1 ? (\n                                <StatusBadge label=\"New\" kind=\"info\" />\n                            ) : undefined\n                        }\n                        subtitle2={user.email}\n                    />\n                ))}\n            </SingleSelect>\n        </View>\n    );\n};","description":"Custom option items This example illustrates how you can use the `OptionItem` component to display a list with custom option items. Note that in this example, we are using `leftAccessory` to display a custom icon for each option item, `subtitle1` to optionally display a pill and `subtitle2` to display the email. **Note:** As these are custom option items, we strongly recommend to pass the `labelAsText` prop to display a summarized label in the menu."},{"id":"packages-dropdown-singleselect--custom-option-item-with-node-label","name":"Custom Option Item With Node Label","snippet":"const CustomOptionItemWithNodeLabel = function Render() {\n    const [opened, setOpened] = React.useState(true);\n    const [selectedValue, setSelectedValue] = React.useState(\"\");\n\n    const handleChange = (selectedValue: string) => {\n        setSelectedValue(selectedValue);\n    };\n\n    const handleToggle = (opened: boolean) => {\n        setOpened(opened);\n    };\n\n    return (\n        <View style={styles.wrapper}>\n            <SingleSelect\n                aria-label=\"Currency\"\n                placeholder=\"Select your currency\"\n                onChange={handleChange}\n                selectedValue={selectedValue}\n                onToggle={handleToggle}\n                opened={opened}\n                showOpenerLabelAsText={false}\n                isFilterable={true}\n            >\n                {currencies.map((currency, index) => (\n                    <OptionItem\n                        key={index}\n                        value={String(index)}\n                        horizontalRule=\"full-width\"\n                        label={\n                            <span>\n                                <PhosphorIcon\n                                    icon={currency.icon}\n                                    size={\"small\"}\n                                />\n                                {currency.name}\n                            </span>\n                        }\n                        labelAsText={currency.name}\n                    />\n                ))}\n            </SingleSelect>\n        </View>\n    );\n};","description":"This example illustrates how a JSX Element can appear as the label if `labelAsText` is undefined. Note that in this example, we define `labelAsText` on the OptionItems to ensure that filtering works correctly."},{"id":"packages-dropdown-singleselect--custom-option-items-virtualized","name":"Custom option items (virtualized)","snippet":"const CustomOptionItemsVirtualized = function Render() {\n    const [opened, setOpened] = React.useState(true);\n    const [selectedValue, setSelectedValue] = React.useState(\n        allCountries[0][0],\n    );\n\n    const handleToggle = (opened: boolean) => {\n        setOpened(opened);\n    };\n\n    const handleChange = (selectedValue: string) => {\n        setSelectedValue(selectedValue);\n    };\n\n    return (\n        <SingleSelect\n            aria-label=\"Country\"\n            placeholder=\"Select a country\"\n            isFilterable={true}\n            onChange={handleChange}\n            selectedValue={selectedValue}\n            onToggle={handleToggle}\n            opened={opened}\n        >\n            {allCountries.map(([code, translatedName]) => (\n                <OptionItem\n                    key={code}\n                    value={code}\n                    label={translatedName}\n                    leftAccessory={\n                        <PhosphorIcon\n                            icon={planetIcon}\n                            role=\"img\"\n                            size=\"medium\"\n                            aria-hidden={true}\n                        />\n                    }\n                />\n            ))}\n        </SingleSelect>\n    );\n};","description":"This example illustrates how you can use the `OptionItem` component to display a virtualized list with custom option items. Note that in this example, we are using `leftAccessory` to display a custom icon for each option item. **Note:** The virtualized version doesn't support custom option items with multiple lines at the moment. This is a known issue and we are working on fixing it."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo } from \"wonder-blocks\";\nimport { CustomOpener, OptionItem, SingleSelect } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { ModalLauncher, OnePaneDialog } from \"@khanacademy/wonder-blocks-modal\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { StatusBadge } from \"@khanacademy/wonder-blocks-badge\";\nimport { TextField } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"SingleSelect as unknown as React.ComponentType<any>\" component.\n  74 |  * ```\n  75 |  */\n> 76 | export default {\n     | ^\n  77 |     title: \"Packages / Dropdown / SingleSelect\",\n  78 |     component: SingleSelect as unknown as React.ComponentType<any>,\n  79 |     subcomponents: {OptionItem, SeparatorItem},\n\n./__docs__/wonder-blocks-dropdown/single-select.stories.tsx:\n/* eslint-disable max-lines */\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport planetIcon from \"@phosphor-icons/core/regular/planet.svg\";\n\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {border, semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {PropsFor, View} from \"@khanacademy/wonder-blocks-core\";\nimport {TextField} from \"@khanacademy/wonder-blocks-form\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport {OnePaneDialog, ModalLauncher} from \"@khanacademy/wonder-blocks-modal\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\nimport {\n    SingleSelect,\n    OptionItem,\n    SeparatorItem,\n    CustomOpener,\n} from \"@khanacademy/wonder-blocks-dropdown\";\n\nimport type {SingleSelectLabelsValues} from \"@khanacademy/wonder-blocks-dropdown\";\nimport packageConfig from \"../../packages/wonder-blocks-dropdown/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport singleSelectArgtypes from \"./single-select.argtypes\";\nimport {IconMappings} from \"../wonder-blocks-icon/phosphor-icon.argtypes\";\nimport {defaultLabels} from \"../../packages/wonder-blocks-dropdown/src/util/constants\";\nimport {\n    allCountries,\n    allProfilesWithPictures,\n    currencies,\n} from \"./option-item-examples\";\n\nimport {LabeledField} from \"@khanacademy/wonder-blocks-labeled-field\";\nimport {StatusBadge} from \"@khanacademy/wonder-blocks-badge\";\n\ntype StoryComponentType = StoryObj<typeof SingleSelect>;\ntype SingleSelectArgs = Partial<typeof SingleSelect>;\n\n/**\n * The single select allows the selection of one item. Clients are responsible\n * for keeping track of the selected item in the select.\n *\n * The single select dropdown closes after the selection of an item. If the same\n * item is selected, there is no callback.\n *\n * **NOTE:** If there are more than 125 items, the component automatically uses\n * [react-window](https://github.com/bvaughn/react-window) to improve\n * performance when rendering these elements and is capable of handling many\n * hundreds of items without performance problems.\n *\n * Make sure to provide a label for the field. This can be done by either:\n * - (recommended) Using the **LabeledField** component to provide a label,\n * description, and/or error message for the field\n * - Using a `label` html tag with the `htmlFor` prop set to the unique id of\n * the field\n * - Using an `aria-label` attribute on the field\n * - Using an `aria-labelledby` attribute on the field\n *\n * ### Usage\n *\n * #### General usage\n *\n * ```tsx\n * import {OptionItem, SingleSelect} from \"@khanacademy/wonder-blocks-dropdown\";\n *\n * const [selectedValue, setSelectedValue] = React.useState(\"\");\n *\n * <SingleSelect aria-label=\"Fruit\" placeholder=\"Choose a fruit\" onChange={setSelectedValue} selectedValue={selectedValue}>\n *     <OptionItem label=\"Pear\" value=\"pear\" />\n *     <OptionItem label=\"Mango\" value=\"mango\" />\n * </SingleSelect>\n * ```\n */\nexport default {\n    title: \"Packages / Dropdown / SingleSelect\",\n    component: SingleSelect as unknown as React.ComponentType<any>,\n    subcomponents: {OptionItem, SeparatorItem},\n    argTypes: {\n        ...singleSelectArgtypes,\n        labels: {\n            defaultValue: defaultLabels,\n        },\n    },\n    args: {\n        error: false,\n        isFilterable: true,\n        opened: false,\n        disabled: false,\n        readOnly: false,\n        \"aria-label\": \"Fruit\",\n        placeholder: \"Choose a fruit\",\n        selectedValue: \"\",\n    },\n    globals: {\n        backgrounds: {\n            value: \"baseDefault\",\n        },\n    },\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        backgrounds: {\n            value: \"baseSubtle\",\n        },\n    },\n} as Meta<typeof SingleSelect>;\n\nconst styles = StyleSheet.create({\n    rowRight: {\n        flexDirection: \"row\",\n        justifyContent: \"flex-end\",\n    },\n    row: {\n        flexDirection: \"row\",\n        alignItems: \"center\",\n        justifyContent: \"space-between\",\n    },\n    dropdown: {\n        maxBlockSize: 200,\n    },\n    /**\n     * Custom opener styles\n     */\n    customOpener: {\n        display: \"inline-flex\",\n        alignItems: \"center\",\n        gap: sizing.size_080,\n        height: sizing.size_400,\n        paddingInline: sizing.size_160,\n        border: `${border.width.thin} solid ${semanticColor.core.border.instructive.default}`,\n        borderInlineStart: `${border.width.thick} solid ${semanticColor.core.border.instructive.default}`,\n        borderRadius: border.radius.radius_040,\n        color: semanticColor.core.foreground.instructive.default,\n        background: semanticColor.core.background.base.default,\n    },\n    customOpenerHovered: {\n        background: semanticColor.core.background.instructive.subtle,\n    },\n    customOpenerPressed: {\n        background: semanticColor.core.background.instructive.default,\n    },\n    customOpenerDisabled: {\n        color: semanticColor.core.foreground.neutral.subtle,\n        borderColor: semanticColor.core.border.neutral.subtle,\n        background: semanticColor.core.background.base.default,\n        cursor: \"not-allowed\",\n    },\n\n    fullBleed: {\n        width: \"100%\",\n    },\n    wrapper: {\n        height: \"500px\",\n        width: \"600px\",\n    },\n    centered: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        height: `calc(100vh - 16px)`,\n    },\n    scrollableArea: {\n        height: \"200vh\",\n    },\n    // AutoFocus\n    icon: {\n        position: \"absolute\",\n        insetInlineEnd: sizing.size_160,\n    },\n});\n\nconst items = [\n    <OptionItem label=\"Banana\" value=\"banana\" key={0} />,\n    <OptionItem label=\"Strawberry\" value=\"strawberry\" disabled key={1} />,\n    <OptionItem label=\"Pear\" value=\"pear\" key={2} />,\n    <OptionItem label=\"Orange\" value=\"orange\" key={3} />,\n    <OptionItem label=\"Watermelon\" value=\"watermelon\" key={4} />,\n    <OptionItem label=\"Apple\" value=\"apple\" key={5} />,\n    <OptionItem label=\"Grape\" value=\"grape\" key={6} />,\n    <OptionItem label=\"Lemon\" value=\"lemon\" key={7} />,\n    <OptionItem label=\"Mango\" value=\"mango\" key={8} />,\n];\n\nconst Template = (args: any) => {\n    const [selectedValue, setSelectedValue] = React.useState(\n        args.selectedValue,\n    );\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <SingleSelect\n            {...args}\n            aria-label={args[\"aria-label\"]}\n            onChange={setSelectedValue}\n            selectedValue={selectedValue}\n            opened={opened}\n            onToggle={setOpened}\n        >\n            {items}\n        </SingleSelect>\n    );\n};\n\nexport const Default: StoryComponentType = {\n    render: Template,\n};\n\n/**\n * This example demonstrates how SingleSelect behaves with an initial value.\n * The screen reader will not announce the initial value on mount, but will\n * announce when the value changes through user interaction.\n */\nexport const WithInitialValue: StoryComponentType = {\n    render: Template,\n    args: {\n        selectedValue: \"banana\",\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this is for manual testing purposes\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * The field can be used with the LabeledField component to provide a label,\n * description, required indicator, and/or error message for the field.\n *\n * Using the field with the LabeledField component will ensure that the field\n * has the relevant accessibility attributes set.\n */\nexport const WithLabeledField: StoryComponentType = {\n    render: function LabeledFieldStory(args) {\n        const [value, setValue] = React.useState(args.selectedValue || \"\");\n        const [errorMessage, setErrorMessage] = React.useState<\n            string | null | undefined\n        >();\n        return (\n            <LabeledField\n                label=\"Label\"\n                field={\n                    <SingleSelect\n                        {...args}\n                        selectedValue={value}\n                        onChange={setValue}\n                        onValidate={setErrorMessage}\n                        required={true}\n                    >\n                        {optionItems}\n                    </SingleSelect>\n                }\n                description=\"Description\"\n                errorMessage={errorMessage}\n                contextLabel=\"required\"\n            />\n        );\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this is for documentation purposes and is\n            // covered by the LabeledField stories\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * Controlled SingleSelect\n */\nconst ControlledOpenedWrapper = (args: any) => {\n    const [selectedValue, setSelectedValue] = React.useState(\"pear\");\n    const [opened, setOpened] = React.useState(args.opened);\n    React.useEffect(() => {\n        // Only update opened if the args.opened prop changes (using the\n        // controls panel).\n        setOpened(args.opened);\n    }, [args.opened]);\n\n    return (\n        <View style={styles.wrapper}>\n            <SingleSelect\n                {...args}\n                onChange={setSelectedValue}\n                selectedValue={selectedValue}\n                opened={opened}\n                onToggle={setOpened}\n            >\n                {items}\n            </SingleSelect>\n        </View>\n    );\n};\n\n/**\n * Sometimes you'll want to trigger a dropdown programmatically. This can be\n * done by setting a value to the `opened` prop (`true` or `false`). In this\n * situation the `SingleSelect` is a controlled component. The parent is\n * responsible for managing the opening/closing of the dropdown when using this\n * prop.\n *\n * This means that you'll also have to update `opened` to the value triggered by\n * the `onToggle` prop.\n */\nexport const ControlledOpened: StoryComponentType = {\n    render: (args) => <ControlledOpenedWrapper {...args} />,\n    args: {\n        opened: true,\n    } as SingleSelectArgs,\n    name: \"Controlled (opened)\",\n    parameters: {\n        // Added to ensure that the dropdown menu is rendered using PopperJS.\n        chromatic: {delay: 500},\n    },\n};\n\n/**\n * If the label for the opener or the OptionItem(s) is longer than its bounding\n * box, it will be truncated with an ellipsis at the end.\n */\nexport const LongOptionLabels: StoryComponentType = {\n    render: function Render() {\n        const [selectedValue, setSelectedValue] = React.useState(\"\");\n        const [opened, setOpened] = React.useState(false);\n\n        const smallWidthStyle = {width: 200};\n\n        return (\n            <SingleSelect\n                aria-label=\"Fruit\"\n                onChange={setSelectedValue}\n                selectedValue={selectedValue}\n                opened={opened}\n                onToggle={setOpened}\n                placeholder=\"Fruit placeholder is also long\"\n                style={smallWidthStyle}\n            >\n                <OptionItem\n                    label=\"Bananas are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"banana\"\n                    key={0}\n                    style={smallWidthStyle}\n                />\n                <OptionItem\n                    label=\"Strawberries are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"strawberry\"\n                    disabled\n                    key={1}\n                    style={smallWidthStyle}\n                />\n                <OptionItem\n                    label=\"Pears are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"pear\"\n                    key={2}\n                    style={smallWidthStyle}\n                />\n                <OptionItem\n                    label=\"Oranges are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"orange\"\n                    key={3}\n                    style={smallWidthStyle}\n                />\n                <OptionItem\n                    label=\"Watermelons are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"watermelon\"\n                    key={4}\n                    style={smallWidthStyle}\n                />\n                <OptionItem\n                    label=\"Apples are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"apple\"\n                    key={5}\n                    style={smallWidthStyle}\n                />\n                <OptionItem\n                    label=\"Grapes are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"grape\"\n                    key={6}\n                    style={smallWidthStyle}\n                />\n                <OptionItem\n                    label=\"Lemons are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"lemon\"\n                    key={7}\n                    style={smallWidthStyle}\n                />\n                <OptionItem\n                    label=\"Mangos are the most amazing fruit I've ever had in my entire life.\"\n                    value=\"mango\"\n                    key={8}\n                    style={smallWidthStyle}\n                />\n            </SingleSelect>\n        );\n    },\n};\n\n/**\n * `SingleSelect` can be disabled by passing `disabled={true}`. This can be\n * useful when you want to disable a control temporarily. It is also disabled\n * when:\n * - there are no items\n * - there are items and they are all disabled\n *\n * Note: The `disabled` prop sets the `aria-disabled` attribute to `true`\n * instead of setting the `disabled` attribute. This is so that the component\n * remains focusable while communicating to screen readers that it is disabled.\n */\nexport const Disabled: StoryComponentType = {\n    render: () => (\n        <View style={{gap: sizing.size_320}}>\n            <LabeledField\n                label=\"Disabled prop is set to true\"\n                field={\n                    <SingleSelect\n                        placeholder=\"Choose a fruit\"\n                        onChange={() => {}}\n                        selectedValue=\"\"\n                        disabled={true}\n                    >\n                        {items}\n                    </SingleSelect>\n                }\n            />\n            <LabeledField\n                label=\"No items\"\n                field={\n                    <SingleSelect\n                        placeholder=\"Choose a fruit\"\n                        onChange={() => {}}\n                    />\n                }\n            />\n            <LabeledField\n                label=\"All items are disabled\"\n                field={\n                    <SingleSelect\n                        placeholder=\"Choose a fruit\"\n                        onChange={() => {}}\n                    >\n                        <OptionItem label=\"Apple\" value=\"1\" disabled={true} />\n                        <OptionItem label=\"Orange\" value=\"2\" disabled={true} />\n                    </SingleSelect>\n                }\n            />\n        </View>\n    ),\n};\n\n/**\n * A SingleSelect can be set to read-only by passing `readOnly` to `true`.\n * When `true`, read-only styling is applied and the aria-disabled attribute is\n * set to \"true\". A user won't be able to open the dropdown or change the\n * selected value.\n *\n * We recommend using the SingleSelect with `LabeledField`. The\n * `readOnlyMessage` prop in `LabeledField` can be set so that users know why\n * the field is marked as read only.\n *\n * Note: We set `aria-disabled` instead of `aria-readonly` due to low\n * browser + screen reader support for `aria-readonly`.\n */\nexport const ReadOnly: StoryComponentType = {\n    render: function ReadOnlyStory(args) {\n        const [selectedValue, setSelectedValue] = React.useState(\n            items[0].props.value,\n        );\n        return (\n            <LabeledField\n                label=\"Example Label\"\n                field={\n                    <SingleSelect\n                        {...args}\n                        placeholder=\"Choose a fruit\"\n                        readOnly={true}\n                        onChange={setSelectedValue}\n                        selectedValue={selectedValue}\n                    >\n                        {items}\n                    </SingleSelect>\n                }\n                readOnlyMessage=\"Message about why it is read only\"\n            />\n        );\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this is covered in testing snapshots story\n            disableSnapshot: true,\n        },\n    },\n};\n\nconst ControlledSingleSelect = (\n    storyArgs: PropsFor<typeof SingleSelect> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [opened, setOpened] = React.useState(false);\n    const [selectedValue, setSelectedValue] = React.useState(\n        args.selectedValue,\n    );\n    const [errorMessage, setErrorMessage] = React.useState<\n        null | string | void\n    >(null);\n    return (\n        <LabeledField\n            label={label || \"SingleSelect\"}\n            errorMessage={\n                errorMessage || (args.error && \"Error from error prop\")\n            }\n            field={\n                <SingleSelect\n                    {...args}\n                    opened={opened}\n                    onToggle={setOpened}\n                    selectedValue={selectedValue}\n                    onChange={setSelectedValue}\n                    placeholder=\"Choose a fruit\"\n                    validate={(value) => {\n                        if (value === \"lemon\") {\n                            return \"Pick another option!\";\n                        }\n                    }}\n                    onValidate={setErrorMessage}\n                >\n                    {items}\n                </SingleSelect>\n            }\n        />\n    );\n};\n\n/**\n * If the `error` prop is set to true, the field will have error styling and\n * `aria-invalid` set to `true`.\n *\n * This is useful for scenarios where we want to show an error on a\n * specific field after a form is submitted (server validation).\n *\n * Note: The `required` and `validate` props can also put the field in an\n * error state.\n */\nexport const Error: StoryComponentType = {\n    render: ControlledSingleSelect,\n    args: {\n        error: true,\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this is covered by variants story\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * A required field will have error styling and aria-invalid set to true if the\n * select is left blank.\n *\n * When `required` is set to `true`, validation is triggered:\n * - When a user tabs away from the select (opener's onBlur event)\n * - When a user closes the dropdown without selecting a value\n * (either by pressing escape, clicking away, or clicking on the opener).\n *\n * Validation errors are cleared when a valid value is selected. The component\n * will set aria-invalid to \"false\" and call the onValidate prop with null.\n *\n */\nexport const Required: StoryComponentType = {\n    render: ControlledSingleSelect,\n    args: {\n        required: \"Custom required error message\",\n    },\n    parameters: {\n        chromatic: {\n            // Disabling because this doesn't test anything visual.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * If a selected value fails validation, the field will have error styling.\n *\n * This is useful for scenarios where we want to show errors while a\n * user is filling out a form (client validation).\n *\n * Note that we will internally set the correct `aria-invalid` attribute to the\n * field:\n * - aria-invalid=\"true\" if there is an error.\n * - aria-invalid=\"false\" if there is no error.\n *\n * Validation is triggered:\n * - On mount if the `value` prop is not empty and it is not required\n * - When an option is selected\n *\n * Validation errors are cleared when a valid value is selected. The component\n * will set aria-invalid to \"false\" and call the onValidate prop with null.\n */\nexport const ErrorFromValidation: StoryComponentType = {\n    render: (args: PropsFor<typeof SingleSelect>) => {\n        return (\n            <View style={{gap: sizing.size_240}}>\n                <ControlledSingleSelect\n                    {...args}\n                    label=\"Validation example (try picking lemon to trigger an error)\"\n                    validate={(value) => {\n                        if (value === \"lemon\") {\n                            return \"Pick another option!\";\n                        }\n                    }}\n                >\n                    {items}\n                </ControlledSingleSelect>\n                <ControlledSingleSelect\n                    {...args}\n                    label=\"Validation example (on mount)\"\n                    validate={(value) => {\n                        if (value === \"lemon\") {\n                            return \"Pick another option!\";\n                        }\n                    }}\n                    selectedValue=\"lemon\"\n                >\n                    {items}\n                </ControlledSingleSelect>\n            </View>\n        );\n    },\n};\n\n/**\n * This story has two selects nested inline within text.\n */\nexport const TwoWithText: StoryComponentType = {\n    render: function Render(args: any) {\n        const [selectedValue, setSelectedValue] = React.useState(\n            args.selectedValue,\n        );\n        const [secondSelectedValue, setSecondSelectedValue] = React.useState(\n            args.selectedValue,\n        );\n        const [opened, setOpened] = React.useState(args.opened);\n        const [secondOpened, setSecondOpened] = React.useState(args.opened);\n        React.useEffect(() => {\n            // Only update opened if the args.opened prop changes (using the\n            // controls panel).\n            setOpened(args.opened);\n        }, [args.opened]);\n\n        return (\n            <div>\n                Here is some text to nest the dropdown\n                <SingleSelect\n                    {...args}\n                    onChange={setSelectedValue}\n                    selectedValue={selectedValue}\n                    opened={opened}\n                    onToggle={setOpened}\n                    style={{display: \"inline-block\"}}\n                >\n                    {[...items, <OptionItem label=\"\" value=\"\" key={9} />]}\n                </SingleSelect>\n                . And here is more text to compare!\n                <SingleSelect\n                    {...args}\n                    onChange={setSecondSelectedValue}\n                    selectedValue={secondSelectedValue}\n                    opened={secondOpened}\n                    onToggle={setSecondOpened}\n                    style={{display: \"inline-block\"}}\n                >\n                    {[...items, <OptionItem label=\"\" value=\"\" key={9} />]}\n                </SingleSelect>\n            </div>\n        );\n    },\n};\n\nconst optionItems = allCountries.map(([code, translatedName]) => (\n    <OptionItem key={code} value={code} label={translatedName} />\n));\n\ntype Props = {\n    enableTypeAhead?: boolean;\n    selectedValue?: string | null | undefined;\n    opened?: boolean;\n};\n\nconst VirtualizedSingleSelect = function (props: Props): React.ReactElement {\n    const [selectedValue, setSelectedValue] = React.useState(\n        props.selectedValue,\n    );\n    const [opened, setOpened] = React.useState(props.opened || false);\n\n    return (\n        <View style={styles.wrapper}>\n            <SingleSelect\n                aria-label=\"Country\"\n                onChange={setSelectedValue}\n                isFilterable={true}\n                opened={opened}\n                onToggle={setOpened}\n                placeholder=\"Select a country\"\n                selectedValue={selectedValue}\n                dropdownStyle={styles.fullBleed}\n                style={styles.fullBleed}\n                enableTypeAhead={props.enableTypeAhead}\n            >\n                {optionItems}\n            </SingleSelect>\n        </View>\n    );\n};\n\n/**\n * When there are many options, you could use a search filter in the\n * SingleSelect. The search filter will be performed toward the labels of the\n * option items. Note that this example shows how we can add custom styles to\n * the dropdown as well.\n */\nexport const VirtualizedFilterableWithoutEnableTypeAhead: StoryComponentType = {\n    name: \"Virtualized (isFilterable:true, enableTypeAhead:false)\",\n    render: () => (\n        <VirtualizedSingleSelect enableTypeAhead={false} selectedValue={\"ZW\"} />\n    ),\n    parameters: {\n        chromatic: {\n            // we don't need screenshots because this story only tests behavior.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * When there are many options, you could use a search filter in the\n * SingleSelect. The search filter will be performed toward the labels of the\n * option items. The enableTypeAhead will focus on the first dropdown item\n * whose label starts with the search filter.\n * Note that this example shows how we can add custom styles to the dropdown\n * as well.\n */\nexport const VirtualizedFilterable: StoryComponentType = {\n    name: \"Virtualized (isFilterable:true, enableTypeAhead:true)\",\n    render: () => <VirtualizedSingleSelect enableTypeAhead={true} />,\n    parameters: {\n        chromatic: {\n            // we don't need screenshots because this story only tests behavior.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * This example shows how to use the `opened` prop to open the dropdown.\n */\nexport const VirtualizedOpened: StoryComponentType = {\n    render: () => <VirtualizedSingleSelect opened={true} />,\n    name: \"Virtualized (opened)\",\n};\n\n/**\n * This example shows how the focus is set to the search field if there's no\n * current selection.\n */\nexport const VirtualizedOpenedNoSelection: StoryComponentType = {\n    render: () => (\n        <VirtualizedSingleSelect opened={true} selectedValue={null} />\n    ),\n    name: \"Virtualized (opened, no selection)\",\n};\n\n/**\n * Sometimes we want to include Dropdowns inside a Modal, and these controls can\n * be accessed only by scrolling down. This example help us to demonstrate that\n * `SingleSelect` components can correctly be displayed within the visible\n * scrolling area.\n */\nexport const DropdownInModal: StoryComponentType = {\n    name: \"Dropdown in a modal\",\n    render: function Render() {\n        const [value, setValue] = React.useState<any>(null);\n        const [opened, setOpened] = React.useState(true);\n\n        const modalContent = (\n            <View style={styles.scrollableArea}>\n                <View style={{gap: sizing.size_240}}>\n                    <BodyText>\n                        Sometimes we want to include Dropdowns inside a Modal,\n                        and these controls can be accessed only by scrolling\n                        down. This example help us to demonstrate that\n                        SingleSelect components can correctly be displayed\n                        within the visible scrolling area.\n                    </BodyText>\n                    <SingleSelect\n                        onChange={(selected) => setValue(selected)}\n                        isFilterable={true}\n                        opened={opened}\n                        onToggle={(opened) => setOpened(opened)}\n                        placeholder=\"Select a country\"\n                        selectedValue={value}\n                    >\n                        {optionItems}\n                    </SingleSelect>\n                </View>\n            </View>\n        );\n\n        const modal = (\n            <OnePaneDialog title=\"Dropdown in a Modal\" content={modalContent} />\n        );\n\n        return (\n            <View style={styles.centered}>\n                <ModalLauncher modal={modal}>\n                    {({openModal}) => (\n                        <Button onClick={openModal}>Click here!</Button>\n                    )}\n                </ModalLauncher>\n            </View>\n        );\n    },\n    parameters: {\n        chromatic: {\n            // We don't need screenshots because this story can be tested after\n            // the modal is opened.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * When you need a fully custom-styled opener, use `CustomOpener`. It provides\n * a blank-slate `<button>` with the WB focus ring baked in and correct ref\n * forwarding for the dropdown's focus management wiring.\n *\n * The `opener` render prop receives `hovered`, `focused`, `pressed`, `text`,\n * and `opened` values that can be passed to child content for conditional\n * styling. Focus ring styles are handled automatically by `CustomOpener` via\n * CSS — you do not need to apply `focusStyles` yourself.\n *\n * **Note:** Pass `testId` directly to `CustomOpener` for e2e test targeting.\n *\n * **Accessibility:** When a custom opener is used, `aria-expanded`,\n * `aria-haspopup`, and `aria-controls` are added automatically.\n */\nexport const WithCustomOpener: StoryComponentType = {\n    render: function Render(args) {\n        const [selectedValue, setSelectedValue] = React.useState(\n            args.selectedValue ?? \"\",\n        );\n        return (\n            <SingleSelect\n                {...args}\n                selectedValue={selectedValue}\n                onChange={setSelectedValue}\n                opener={({hovered, pressed, text}) => (\n                    <CustomOpener\n                        testId=\"single-select-custom-opener\"\n                        styles={{\n                            root: [\n                                styles.customOpener,\n                                hovered && styles.customOpenerHovered,\n                                pressed && styles.customOpenerPressed,\n                                args.disabled && styles.customOpenerDisabled,\n                            ],\n                        }}\n                    >\n                        <PhosphorIcon\n                            icon={IconMappings.plusCircle}\n                            size=\"small\"\n                        />\n                        <BodyText tag=\"span\" weight=\"bold\">\n                            {text}\n                        </BodyText>\n                    </CustomOpener>\n                )}\n            >\n                {items}\n            </SingleSelect>\n        );\n    },\n    args: {\n        selectedValue: \"\",\n        disabled: false,\n    } as SingleSelectArgs,\n    name: \"With custom opener\",\n};\n\n/**\n * When in the right-to-left direction, the single select is mirrored.\n */\nexport const RightToLeft: StoryComponentType = {\n    ...ControlledOpened,\n    name: \"Right to Left\",\n    globals: {\n        direction: \"rtl\",\n    },\n};\n\n/**\n * Custom labels\n */\nconst translatedItems = [\n    <OptionItem label=\"Banano\" value=\"banano\" key={0} />,\n    <OptionItem label=\"Fresa\" value=\"fresa\" disabled key={1} />,\n    <OptionItem label=\"Pera\" value=\"pera\" key={2} />,\n    <OptionItem label=\"Naranja\" value=\"naranja\" key={3} />,\n    <OptionItem label=\"Sandia\" value=\"sandia\" key={4} />,\n    <OptionItem label=\"Manzana\" value=\"manzana\" key={5} />,\n    <OptionItem label=\"Uva\" value=\"uva\" key={6} />,\n    <OptionItem label=\"Limon\" value=\"limon\" key={7} />,\n    <OptionItem label=\"Mango\" value=\"mango\" key={8} />,\n];\n\n/**\n * This example illustrates how you can pass custom labels to the `SingleSelect`\n * component.\n */\nexport const CustomLabels: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState<any>(null);\n        const [opened, setOpened] = React.useState(true);\n\n        const translatedLabels: SingleSelectLabelsValues = {\n            clearSearch: \"Limpiar busqueda\",\n            filter: \"Filtrar\",\n            noResults: \"Sin resultados\",\n            someResults: (numResults: number) => `${numResults} frutas`,\n        };\n\n        return (\n            <View style={styles.wrapper}>\n                <SingleSelect\n                    aria-label=\"Fruta\"\n                    isFilterable={true}\n                    onChange={setValue}\n                    selectedValue={value}\n                    labels={translatedLabels}\n                    opened={opened}\n                    onToggle={setOpened}\n                    placeholder=\"Selecciona una fruta\"\n                >\n                    {translatedItems}\n                </SingleSelect>\n            </View>\n        );\n    },\n};\n\n/**\n * Auto focus disabled\n */\nconst timeSlots = [\n    \"12:00 AM\",\n    \"2:00 AM\",\n    \"4:00 AM\",\n    \"6:00 AM\",\n    \"8:00 AM\",\n    \"10:00 AM\",\n    \"12:00 PM\",\n    \"2:00 PM\",\n    \"4:00 PM\",\n    \"6:00 PM\",\n    \"8:00 PM\",\n    \"10:00 PM\",\n    \"11:59 PM\",\n];\n\nconst timeSlotOptions = timeSlots.map((timeSlot, index) => (\n    <OptionItem label={timeSlot} value={timeSlot} key={index} />\n));\n\n/**\n * This example illustrates how you can disable the auto focus of the\n * `SingleSelect` component. Note that for this example, we are using a\n * `TextField` component as a custom opener to ilustrate how the focus remains\n * on the opener.\n *\n * **Note:** We also disabled the `enableTypeAhead` prop to be able to use the\n * textbox properly.\n */\nexport const AutoFocusDisabled: StoryComponentType = {\n    render: function Render() {\n        const textFieldRef = React.useRef(null);\n        const [value, setValue] = React.useState<any>(null);\n        const [opened, setOpened] = React.useState(false);\n\n        return (\n            <View style={styles.wrapper}>\n                <SingleSelect\n                    autoFocus={false}\n                    enableTypeAhead={false}\n                    onChange={setValue}\n                    selectedValue={value}\n                    opened={opened}\n                    onToggle={setOpened}\n                    placeholder=\"Choose a time\"\n                    opener={({focused, hovered, pressed, text}) => (\n                        <View style={styles.row}>\n                            <TextField\n                                placeholder=\"Choose a time\"\n                                id=\"single-select-opener\"\n                                onChange={setValue}\n                                value={value ?? \"\"}\n                                ref={textFieldRef}\n                                autoComplete=\"off\"\n                                style={styles.fullBleed}\n                            />\n                            <PhosphorIcon\n                                color={semanticColor.status.notice.foreground}\n                                icon={IconMappings.clockBold}\n                                size=\"small\"\n                                style={styles.icon}\n                            />\n                        </View>\n                    )}\n                >\n                    {timeSlotOptions}\n                </SingleSelect>\n            </View>\n        );\n    },\n    parameters: {\n        chromatic: {\n            // we don't need screenshots because this story only tests focus +\n            // keyboard behavior.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * Custom option items\n */\n\n/**\n * This example illustrates how you can use the `OptionItem` component to\n * display a list with custom option items. Note that in this example, we are\n * using `leftAccessory` to display a custom icon for each option item,\n * `subtitle1` to optionally display a pill and `subtitle2` to display the\n * email.\n *\n * **Note:** As these are custom option items, we strongly recommend to pass the\n * `labelAsText` prop to display a summarized label in the menu.\n */\nexport const CustomOptionItems: StoryComponentType = {\n    render: function Render() {\n        const [opened, setOpened] = React.useState(true);\n        const [selectedValue, setSelectedValue] = React.useState(\"\");\n\n        const handleChange = (selectedValue: string) => {\n            setSelectedValue(selectedValue);\n        };\n\n        const handleToggle = (opened: boolean) => {\n            setOpened(opened);\n        };\n\n        return (\n            <View style={styles.wrapper}>\n                <SingleSelect\n                    aria-label=\"Profile\"\n                    placeholder=\"Select a profile\"\n                    onChange={handleChange}\n                    selectedValue={selectedValue}\n                    onToggle={handleToggle}\n                    opened={opened}\n                >\n                    {allProfilesWithPictures.map((user, index) => (\n                        <OptionItem\n                            key={user.id}\n                            value={user.id}\n                            horizontalRule=\"full-width\"\n                            label={user.name}\n                            leftAccessory={user.picture}\n                            subtitle1={\n                                index === 1 ? (\n                                    <StatusBadge label=\"New\" kind=\"info\" />\n                                ) : undefined\n                            }\n                            subtitle2={user.email}\n                        />\n                    ))}\n                </SingleSelect>\n            </View>\n        );\n    },\n};\n\n/**\n * This example illustrates how a JSX Element can appear as the label if\n * `labelAsText` is undefined. Note that in this example, we define `labelAsText`\n * on the OptionItems to ensure that filtering works correctly.\n */\nexport const CustomOptionItemWithNodeLabel: StoryComponentType = {\n    render: function Render() {\n        const [opened, setOpened] = React.useState(true);\n        const [selectedValue, setSelectedValue] = React.useState(\"\");\n\n        const handleChange = (selectedValue: string) => {\n            setSelectedValue(selectedValue);\n        };\n\n        const handleToggle = (opened: boolean) => {\n            setOpened(opened);\n        };\n\n        return (\n            <View style={styles.wrapper}>\n                <SingleSelect\n                    aria-label=\"Currency\"\n                    placeholder=\"Select your currency\"\n                    onChange={handleChange}\n                    selectedValue={selectedValue}\n                    onToggle={handleToggle}\n                    opened={opened}\n                    showOpenerLabelAsText={false}\n                    isFilterable={true}\n                >\n                    {currencies.map((currency, index) => (\n                        <OptionItem\n                            key={index}\n                            value={String(index)}\n                            horizontalRule=\"full-width\"\n                            label={\n                                <span>\n                                    <PhosphorIcon\n                                        icon={currency.icon}\n                                        size={\"small\"}\n                                    />\n                                    {currency.name}\n                                </span>\n                            }\n                            labelAsText={currency.name}\n                        />\n                    ))}\n                </SingleSelect>\n            </View>\n        );\n    },\n};\n\n/**\n * This example illustrates how you can use the `OptionItem` component to\n * display a virtualized list with custom option items. Note that in this\n * example, we are using `leftAccessory` to display a custom icon for each\n * option item.\n *\n * **Note:** The virtualized version doesn't support custom option items with\n * multiple lines at the moment. This is a known issue and we are working on\n * fixing it.\n */\nexport const CustomOptionItemsVirtualized: StoryComponentType = {\n    name: \"Custom option items (virtualized)\",\n    render: function Render() {\n        const [opened, setOpened] = React.useState(true);\n        const [selectedValue, setSelectedValue] = React.useState(\n            allCountries[0][0],\n        );\n\n        const handleToggle = (opened: boolean) => {\n            setOpened(opened);\n        };\n\n        const handleChange = (selectedValue: string) => {\n            setSelectedValue(selectedValue);\n        };\n\n        return (\n            <SingleSelect\n                aria-label=\"Country\"\n                placeholder=\"Select a country\"\n                isFilterable={true}\n                onChange={handleChange}\n                selectedValue={selectedValue}\n                onToggle={handleToggle}\n                opened={opened}\n            >\n                {allCountries.map(([code, translatedName]) => (\n                    <OptionItem\n                        key={code}\n                        value={code}\n                        label={translatedName}\n                        leftAccessory={\n                            <PhosphorIcon\n                                icon={planetIcon}\n                                role=\"img\"\n                                size=\"medium\"\n                                aria-hidden={true}\n                            />\n                        }\n                    />\n                ))}\n            </SingleSelect>\n        );\n    },\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.wrapper}>{Story()}</View>\n        ),\n    ],\n};\n"}},"packages-dropdown-singleselect-accessibility":{"id":"packages-dropdown-singleselect-accessibility","name":"SingleSelect","path":"./__docs__/wonder-blocks-dropdown/single-select.accessibility.stories.tsx","stories":[{"id":"packages-dropdown-singleselect-accessibility--using-aria-attributes","name":"Using LabeledField","snippet":"const UsingAriaAttributes = () => <SingleSelectAccessibility />;"},{"id":"packages-dropdown-singleselect-accessibility--using-opener-aria-label","name":"Using aria-label for opener","snippet":"const UsingOpenerAriaLabel = () => <SingleSelectAriaLabel />;"},{"id":"packages-dropdown-singleselect-accessibility--using-custom-opener-labeled-field","name":"Using custom opener in a LabeledField","snippet":"const UsingCustomOpenerLabeledField = () => <SingleSelectCustomOpenerLabeledField />;"},{"id":"packages-dropdown-singleselect-accessibility--using-custom-opener-aria-label","name":"Using aria-label on custom opener","snippet":"const UsingCustomOpenerAriaLabel = () => <SingleSelectCustomOpenerLabel />;"},{"id":"packages-dropdown-singleselect-accessibility--with-visible-announcer","name":"With visible Announcer","snippet":"const WithVisibleAnnouncer = () => <SingleSelectWithVisibleAnnouncer />;"},{"id":"packages-dropdown-singleselect-accessibility--using-keyboard-selection","name":"Using the keyboard","snippet":"const UsingKeyboardSelection = () => <SingleSelectKeyboardSelection />;"},{"id":"packages-dropdown-singleselect-accessibility--using-labeled-field-for-read-only","name":"Using Labeled Field For Read Only","snippet":"const UsingLabeledFieldForReadOnly = function UsingLabeledFieldForReadOnlyStory() {\n    return (\n        <LabeledField\n            field={\n                <SingleSelect\n                    placeholder=\"Choose\"\n                    readOnly={true}\n                    onChange={() => {}}\n                    selectedValue=\"1\"\n                >\n                    <OptionItem label=\"item 1\" value=\"1\" />\n                    <OptionItem label=\"item 2\" value=\"2\" />\n                    <OptionItem label=\"item 3\" value=\"3\" />\n                </SingleSelect>\n            }\n            label=\"Example Label\"\n            readOnlyMessage=\"Message about why it is read only\"\n        />\n    );\n};"}],"import":"import IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { OptionItem, SingleSelect } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"The single select allows the selection of one item. Clients are responsible for keeping track of the selected item in the select. The single select dropdown closes after the selection of an item. If the same item is selected, there is no callback. Make sure to provide a label for the field. This can be done by either: - (recommended) Using the **LabeledField** component to provide a label, description, and/or error message for the field - Using a `label` html tag with the `htmlFor` prop set to the unique id of the field - Using an `aria-label` attribute on the field - Using an `aria-labelledby` attribute on the field **NOTE:** If there are more than 125 items, the component automatically uses [react-window](https://github.com/bvaughn/react-window) to improve performance when rendering these elements and is capable of handling many hundreds of items without performance problems. ## Usage General usage ```jsx import {OptionItem, SingleSelect} from \"@khanacademy/wonder-blocks-dropdown\"; const [selectedValue, setSelectedValue] = React.useState(\"\"); <SingleSelect aria-label=\"Your Favorite Fruits\" placeholder=\"Choose a fruit\" onChange={setSelectedValue} selectedValue={selectedValue}> <OptionItem label=\"Pear\" value=\"pear\" /> <OptionItem label=\"Mango\" value=\"mango\" /> </SingleSelect> ``` Mapping a list ```jsx import {OptionItem, SingleSelect} from \"@khanacademy/wonder-blocks-dropdown\"; const [selectedValue, setSelectedValue] = React.useState(\"\"); const fruitArray = [\"Apple\", \"Banana\", \"Orange\", \"Mango\", \"Pear\"]; <SingleSelect aria-label=\"Your Favorite Fruits\" placeholder=\"Choose a fruit\" onChange={setSelectedValue} selectedValue={selectedValue} > {fruitArray.map((value, index) => ( <OptionItem key={index} value={value} label={value} /> ))} </SingleSelect> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-dropdown/src/index.ts","description":"The single select allows the selection of one item. Clients are responsible\nfor keeping track of the selected item in the select.\n\nThe single select dropdown closes after the selection of an item. If the same\nitem is selected, there is no callback.\n\nMake sure to provide a label for the field. This can be done by either:\n- (recommended) Using the **LabeledField** component to provide a label,\ndescription, and/or error message for the field\n- Using a `label` html tag with the `htmlFor` prop set to the unique id of\nthe field\n- Using an `aria-label` attribute on the field\n- Using an `aria-labelledby` attribute on the field\n\n**NOTE:** If there are more than 125 items, the component automatically uses\n[react-window](https://github.com/bvaughn/react-window) to improve\nperformance when rendering these elements and is capable of handling many\nhundreds of items without performance problems.\n\n## Usage\nGeneral usage\n\n```jsx\nimport {OptionItem, SingleSelect} from \"@khanacademy/wonder-blocks-dropdown\";\n\nconst [selectedValue, setSelectedValue] = React.useState(\"\");\n\n<SingleSelect aria-label=\"Your Favorite Fruits\" placeholder=\"Choose a fruit\" onChange={setSelectedValue} selectedValue={selectedValue}>\n    <OptionItem label=\"Pear\" value=\"pear\" />\n    <OptionItem label=\"Mango\" value=\"mango\" />\n</SingleSelect>\n```\n\nMapping a list\n\n```jsx\nimport {OptionItem, SingleSelect} from \"@khanacademy/wonder-blocks-dropdown\";\n\nconst [selectedValue, setSelectedValue] = React.useState(\"\");\nconst fruitArray = [\"Apple\", \"Banana\", \"Orange\", \"Mango\", \"Pear\"];\n\n<SingleSelect\n    aria-label=\"Your Favorite Fruits\"\n    placeholder=\"Choose a fruit\"\n    onChange={setSelectedValue}\n    selectedValue={selectedValue}\n>\n    {fruitArray.map((value, index) => (\n        <OptionItem key={index} value={value} label={value} />\n    ))}\n</SingleSelect>\n```","displayName":"SingleSelect","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"alignment":{"defaultValue":null,"description":"Whether this dropdown should be left-aligned or right-aligned with the\nopener component. Defaults to left-aligned.","name":"alignment","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"left\" | \"right\"","value":[{"value":"\"left\""},{"value":"\"right\""}]}},"autoFocus":{"defaultValue":null,"description":"Whether to auto focus an option. Defaults to true.","name":"autoFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Whether this component is disabled. A disabled dropdown may not be opened\nand does not support interaction. Defaults to false.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"readOnly":{"defaultValue":null,"description":"Specifies if the dropdown is read-only. Defaults to false.","name":"readOnly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"enableTypeAhead":{"defaultValue":null,"description":"Whether to enable the type-ahead suggestions feature. Defaults to true.\n\nThis feature allows to navigate the listbox using the keyboard.\n- Type a character: focus moves to the next item with a name that starts\n  with the typed character.\n- Type multiple characters in rapid succession: focus moves to the next\n  item with a name that starts with the string of characters typed.\n\n**NOTE:** Type-ahead is recommended for all listboxes, but there might be\nsome cases where it's not desirable (for example when using a `TextField`\nas the opener element).","name":"enableTypeAhead","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"error":{"defaultValue":null,"description":"Whether or not the input in is an error state. Defaults to false.","name":"error","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"labels":{"defaultValue":null,"description":"The object containing the custom labels and placeholder values used inside this component.","name":"labels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"SingleSelectLabelsValues"}},"showOpenerLabelAsText":{"defaultValue":null,"description":"When false, the SelectOpener can show a Node as a value. When true, the\nSelectOpener will use a string as a value. If using custom OptionItems, a\nplain text label can be provided with the `labelAsText` prop.\nDefaults to true.","name":"showOpenerLabelAsText","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"children":{"defaultValue":null,"description":"The items in this select.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(false | ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole; }> & { label: OptionLabel; labelAsText?: string; value: string; disabled: boolean; onClick?: (() => unknown) | undefined; onToggle: (value: string) => unknown; selected: boolean; focused: boolean; role: \"menuitem\" | \"menuitemcheckbox\" | \"option\"; testId?: string | undefined; variant?: \"checkbox\" | \"check\" | undefined; style?: StyleType; parentComponent?: \"listbox\" | \"dropdown\" | undefined; id?: string | undefined; horizontalRule: HorizontalRuleVariant | undefined; leftAccessory?: ReactNode; rightAccessory?: ReactNode; subtitle1?: TypographyText | undefined; subtitle2?: TypographyText | undefined; }, string | JSXElementConstructor<any>> | null | undefined)[] | undefined"}},"onChange":{"defaultValue":null,"description":"Callback for when the selection. Parameter is the value of the newly\nselected item.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(selectedValue: string) => unknown"}},"opened":{"defaultValue":null,"description":"Can be used to override the state of the ActionMenu by parent elements","name":"opened","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onToggle":{"defaultValue":null,"description":"In controlled mode, use this prop in case the parent needs to be notified\nwhen the menu opens/closes.","name":"onToggle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((opened: boolean) => unknown)"}},"id":{"defaultValue":null,"description":"Unique identifier attached to the field control. If used, we need to\nguarantee that the ID is unique within everything rendered on a page.\nUsed to match `<label>` with `<button>` elements for screenreaders.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"placeholder":{"defaultValue":null,"description":"Placeholder value for the opening component when there are no items selected.\nNote: a label is still necessary to describe the purpose of the select.","name":"placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"selectedValue":{"defaultValue":null,"description":"Value of the currently selected item.","name":"selectedValue","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string | null"}},"style":{"defaultValue":null,"description":"Optional styling to add to the opener component wrapper.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the opener component wrapper.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"dropdownStyle":{"defaultValue":null,"description":"Optional styling to add to the dropdown wrapper.","name":"dropdownStyle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"opener":{"defaultValue":null,"description":"The child function that returns the anchor the ActionMenu will be\nactivated by. This function takes eventState, which allows the opener\nelement to access pointer event state.","name":"opener","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((openerProps: OpenerProps) => ReactElement<any, string | JSXElementConstructor<any>>)"}},"isFilterable":{"defaultValue":null,"description":"When this is true, the dropdown body shows a search text input at the\ntop. The items will be filtered by the input.","name":"isFilterable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"dropdownId":{"defaultValue":null,"description":"Unique identifier attached to the listbox dropdown. If used, we need to\nguarantee that the ID is unique within everything rendered on a page.\nIf one is not provided, one is auto-generated. It is used for the\nopener's `aria-controls` attribute for screenreaders.","name":"dropdownId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"required":{"defaultValue":null,"description":"Whether this field is required to continue, or the error message to\nrender if this field is left blank.\n\nThis can be a boolean or a string.\n\nString:\nPlease pass in a translated string to use as the error message that will\nrender if the user leaves this field blank. If this field is required,\nand a string is not passed in, a default untranslated string will render\nupon error.\nNote: The string will not be used if a `validate` prop is passed in.\n\nExample message: i18n._(\"A password is required to log in.\")\n\nBoolean:\nTrue/false indicating whether this field is required. Please do not pass\nin `true` if possible - pass in the error string instead.\nIf `true` is passed, and a `validate` prop is not passed, that means\nthere is no corresponding message and the default untranlsated message\nwill be used.","name":"required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string | boolean"}},"validate":{"defaultValue":null,"description":"Provide a validation for the field value.\nReturn a string error message or null | void for a valid input.\n\nUse this for errors that are shown to the user while they are filling out\na form.","name":"validate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((value?: string | null) => string | void | null)"}},"onValidate":{"defaultValue":null,"description":"Called right after the field is validated.","name":"onValidate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-dropdown/src/components/single-select.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((errorMessage?: string | null) => unknown)"}}},"exportName":"SingleSelect"},"docs":{"packages-dropdown-singleselect-accessibility--docs":{"id":"packages-dropdown-singleselect-accessibility--docs","name":"Docs","path":"./__docs__/wonder-blocks-dropdown/single-select.accessibility.mdx","title":"Packages / Dropdown / SingleSelect / Accessibility","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as SingleSelectAccessibilityStories from './single-select.accessibility.stories';\n\nimport {OptionItem, SingleSelect} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {LabeledField} from \"@khanacademy/wonder-blocks-labeled-field\";\n\n<Meta of={SingleSelectAccessibilityStories} />\n\n# Accessibility\n\n## Using `LabeledField` with `SingleSelect`\n\nTo associate a `SingleSelect` with another visible element (e.g. a `<label>`),\nwrap it in a `LabeledField` component. The label will apply to the `SingleSelect`\nopener. With `LabeledField`, you can supply label text (or a JSX node)\nusing the `label` prop to generate a paired `<label>` element. It comes with\nfield validation and other features baked in!\n\nIf for some reason you can't use `LabeledField` for a visible label, you can still\nmake `SingleSelect` accessible in a screen reader by associating it with `<label for=\"\">`.\nPass the `id` of the `SingleSelect` to the `for` attribute.\n\nAlternatively, you can create an accessible name for `SingleSelect` using `aria-labelledby`.\nPut `aria-labelledby` on `SingleSelect` pointing to the `id` of any other element.\nIt won't give you the same enhanced click target as a paired `<label>`, but it still\nhelps to create a more accessible experience.\n\n<Canvas of={SingleSelectAccessibilityStories.UsingAriaAttributes} />\n\n## Using `aria-label` for the opener and/or child options\n\nA visible label with `<LabeledField>` is preferred. However, for specific cases\nwhere the `SingleSelect` is not paired with a `LabeledField` or other\nvisible `<label>` element, you **must** supply an `aria-label` attribute\nfor an accessible name on the opener.\n\nThis will ensure the `SingleSelect` has a name that describes its purpose.\n\nFor example, an `aria-label` for `SingleSelect` in a compact UI could be \"Division\"\nwhile its value would be one of the selected options, such as specific division names.\nIt might also have a placeholder such as \"e.g., Division I (D1)\", which would go away\nwhen the user selected an option.\n\nAlso, if you need screen readers to understand relevant information on\noption items, you can use `aria-label` on each item. e.g. You can use it to let\nscreen readers know the current selected/unselected status of the item when it\nreceives focus. This can be useful when the options contain icons or other information\nthat would need to be omitted from the visible label.\n\n<Canvas of={SingleSelectAccessibilityStories.UsingOpenerAriaLabel} />\n\n## Naming the listbox\n\nThe listbox that contains the options is rendered in a portal, so it is\ndisconnected in the DOM from the opener that labels it. To give the options\ncontext when a screen reader user navigates into the listbox, `SingleSelect`\nlabels the listbox with the same name as the opener, using whichever of these\nlabels the opener has:\n\n1. The `<label>` element associated with the opener, such as the one rendered by\n`LabeledField`. The listbox refers to the same label element, which is the\nlabelling recommended for the\n[combobox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/).\n2. The element referenced by `aria-labelledby` on the `SingleSelect`.\n3. The `aria-label` on the `SingleSelect`.\n\nSo, a `SingleSelect` labelled \"Fruit\" has a listbox named \"Fruit\". If the\n`SingleSelect` has no label at all, neither does its listbox, which is another\nreason to always give it one.\n\n## Automatic screen reader announcements in `SingleSelect`\n\n`SingleSelect` uses the [Wonder Blocks Announcer](/?path=/docs/packages-announcer--docs)\nunder the hood for content updates in screen readers, such as the number of items\nand the selected value.\n\nThis integration works around 2 bugs in VoiceOver and Safari on Mac OSX 14 and 15\nwhere the combobox opener value is cut off and cached incorrectly. The value is\nbuggy when announced, differing from its current visual presentation and DOM content.\n\nBugs filed in WebKit include:\n\n1. AX: combobox button value text clipped https://bugs.webkit.org/show_bug.cgi?id=285047\n2. AX: VoiceOver does not perceive changes to combobox value in an opener\nhttps://bugs.webkit.org/show_bug.cgi?id=286828\n\n### Testing the Announcer\n\nTo observe the affect of the Announcer, you have a few options:\n\n1. Turn on a screen reader such as VoiceOver or NVDA while using the `SingleSelect`\n2. Inspect the DOM in the browser and look at the `wbAnnounce` DIV element\n3. Look at the `With visible Announcer` story to see messages appended\nvisually to the DOM\n\n<Canvas of={SingleSelectAccessibilityStories.WithVisibleAnnouncer} />\n\n## Read only state\n\nWe recommend using `SingleSelect` with `LabeledField` so that `LabeledField`'s\n`readOnlyMessage` prop can be used to provide context for users on why the field\nis in a read only state.\n\nNote: The component uses `aria-disabled` instead of `aria-readonly` to indicate\nthat the user can't change the value. This is because `aria-readonly` has low\nbrowser + screen reader support currently with `combobox` roles. Using\n`aria-disabled` and the `readOnlyMessage` provides contextual information to\nusers (`LabeledField`'s `readOnlyMessage` is included in the combobox element's\n`aria-describedby` attribute)\n\n<Canvas of={SingleSelectAccessibilityStories.UsingLabeledFieldForReadOnly} />"}}},"packages-form-overview":{"id":"packages-form-overview","name":"Overview","path":"./__docs__/wonder-blocks-form/accessibility.stories.tsx","stories":[{"id":"packages-form-overview--form-label-example","name":"Form Label Example","snippet":"const FormLabelExample = () => {\n    const [value, setValue] = React.useState(\"\");\n    return (\n        <View style={styles.container}>\n            <BodyText tag=\"label\" htmlFor=\"description-field\">\n                Description\n            </BodyText>\n            <TextArea\n                value={value}\n                onChange={(value) => setValue(value)}\n                id=\"description-field\"\n            />\n        </View>\n    );\n};","description":"An example of a form field label using Wonder Blocks components `LabelMedium` and `TextArea`."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { TextArea } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n   6 | import {sizing} from \"@khanacademy/wonder-blocks-tokens\";\n   7 |\n>  8 | export default {\n     | ^\n   9 |     title: \"Packages / Form / Overview\", // Named the same as overiew docs to hide it from the sidebar\n  10 |     parameters: {\n  11 |         previewTabs: {\n\n./__docs__/wonder-blocks-form/accessibility.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\nimport {TextArea} from \"@khanacademy/wonder-blocks-form\";\nimport {sizing} from \"@khanacademy/wonder-blocks-tokens\";\n\nexport default {\n    title: \"Packages / Form / Overview\", // Named the same as overiew docs to hide it from the sidebar\n    parameters: {\n        previewTabs: {\n            canvas: {\n                hidden: true,\n            },\n        },\n\n        viewMode: \"docs\",\n\n        chromatic: {\n            // Disabling because this is used for documentation purposes\n            disableSnapshot: true,\n        },\n    },\n    tags: [\n        \"!dev\", // Hide individual stories from sidebar so they are only shown in the docs page.\n    ],\n};\n\n/**\n * An example of a form field label using Wonder Blocks components `LabelMedium`\n * and `TextArea`.\n */\nexport const FormLabelExample = () => {\n    const [value, setValue] = React.useState(\"\");\n    return (\n        <View style={styles.container}>\n            <BodyText tag=\"label\" htmlFor=\"description-field\">\n                Description\n            </BodyText>\n            <TextArea\n                value={value}\n                onChange={(value) => setValue(value)}\n                id=\"description-field\"\n            />\n        </View>\n    );\n};\n\nconst styles = StyleSheet.create({\n    container: {\n        gap: sizing.size_080,\n    },\n});\n"}},"packages-form-checkbox-accessibility":{"id":"packages-form-checkbox-accessibility","name":"Checkbox","path":"./__docs__/wonder-blocks-form/checkbox-accessibility.stories.tsx","stories":[{"id":"packages-form-checkbox-accessibility--error-state","name":"Error state","snippet":"const ErrorState = () => <ErrorTemplate label=\"I accept the terms and conditions\" />;"},{"id":"packages-form-checkbox-accessibility--disabled-state","name":"Disabled state","snippet":"const DisabledState = () => <DisabledTemplate />;"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { Checkbox } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"☑️ A nicely styled checkbox for all your checking needs. Can optionally take label and description props. If used by itself, a checkbox provides two options - checked and unchecked. A group of checkboxes can be used to allow a user to select multiple values from a list of options. If you want a whole group of Checkbox[es] that are related, see the Choice and CheckboxGroup components. ### Usage ```jsx import {Checkbox} from \"@khanacademy/wonder-blocks-form\"; const [checked, setChecked] = React.useState(false); <Checkbox checked={checked} onChange={setChecked} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-form/src/index.ts","description":"☑️ A nicely styled checkbox for all your checking needs. Can optionally take\nlabel and description props.\n\nIf used by itself, a checkbox provides two options - checked and unchecked.\nA group of checkboxes can be used to allow a user to select multiple values\nfrom a list of options.\n\nIf you want a whole group of Checkbox[es] that are related, see the Choice\nand CheckboxGroup components.\n\n### Usage\n\n```jsx\nimport {Checkbox} from \"@khanacademy/wonder-blocks-form\";\n\nconst [checked, setChecked] = React.useState(false);\n\n<Checkbox checked={checked} onChange={setChecked} />\n```","displayName":"Checkbox","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"checked":{"defaultValue":null,"description":"Whether this component is checked or indeterminate","name":"checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"Checked"}},"disabled":{"defaultValue":null,"description":"Whether this component is disabled","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"error":{"defaultValue":null,"description":"Whether this component should show an error state","name":"error","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onChange":{"defaultValue":null,"description":"Callback when this component is selected. The newCheckedState is the\nnew checked state of the component.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(newCheckedState: boolean) => unknown"}},"label":{"defaultValue":null,"description":"Optional label for the field.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"description":{"defaultValue":null,"description":"Optional description for the field.","name":"description","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"id":{"defaultValue":null,"description":"Unique identifier attached to the HTML input element. If used, need to\nguarantee that the ID is unique within everything rendered on a page.\nUsed to match `<label>` with `<input>` elements for screenreaders.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"Optional styling for the container. Does not style the component.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the Checkbox.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"groupName":{"defaultValue":null,"description":"Name for the checkbox or radio button group. Only applicable for group\ncontexts, auto-populated by group components via Choice.\n@ignore","name":"groupName","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLInputElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Checkbox"},"docs":{"packages-form-checkbox-accessibility--docs":{"id":"packages-form-checkbox-accessibility--docs","name":"Docs","path":"./__docs__/wonder-blocks-form/checkbox-accessibility.mdx","title":"Packages / Form / Checkbox / Accessibility","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as CheckboxAccessibilityStories from './checkbox-accessibility.stories';\n\n<Meta of={CheckboxAccessibilityStories} />\n\n## Accessibility\n\n### ARIA\n\n`Checkbox` can take in all ARIA props defined in Wonder Blocks Core types.\n\nElements with role `\"checkbox\"` can have an `aria-checked` property that\nexposes the checked state to assistive technology. The dev does not have\nto worry about this because the Wonder Blocks Checkbox component is an\n`input` element with type `\"checkbox\"`, as this has built-in semantics and\ndoes not require ARIA.\n\nThe current implementation of `Checkbox` uses `aria-describedby` with the\nlabel and description that may be passed in as props.\n\nSee the Error section for information about `aria-invalid` and\n`aria-required`.\n\n### Error state\n\nThe Wonder Blocks `Checkbox` component takes an `error` boolean prop. Setting\nthis prop to true will set `aria-invalid` to true, and the color of the\ncheckbox to red.\n\nWhen a form input is invalid, the user should provide a reason for why\nthis is.\n\nGenerally, it is also suggested this is the validation error message is\npassed to the checkbox's `aria-describedby` prop so assistive tech can\nread it. However, this is not possible with the current implementation of\nthe Wonder Blocks Form Checkbox component.\n\nThe error state can be used to signal that a required checkbox has not been\nchecked. In cases where a checkbox is required, the checkbox component should\nset the `aria-required` prop to true for assistive tech.\nThere should also be some sort of visual indication that checking\nthe box is required, such as a \"Required\" label or an asterisk.\n\n<Canvas of={CheckboxAccessibilityStories.ErrorState} />\n\n### Disabled state\n\nThe Wonder Blocks `Checkbox` compoenent takes a `disabled` boolean prop.\nThis sets the underlying `input` element's `disabled` prop to `true`.\nThis makes is so that the checkbox is not interactable. Also, assistive\ntech will indicated that the checkbox is dimmed.\n\nA user will not be able to navigate to the checkbox with a keyboard.\nScreen reader users will be able to navigate to the checkbox with\nscreen reader controls.\n\nIt is suggested that if an element is disabled, an explanation as to why\nshould to provided somewhere.\n\n<Canvas of={CheckboxAccessibilityStories.DisabledState} />\n\n### Keyboard Interaction\n\nIf a checkbox is not disabled, a user can tab to it using standard\nkeyboard navigation. The Space key toggles the checked state of the checkbox.\n\nNote the the Space key triggers the `onChange` function of the\nWonder Blocks Checkbox component. If the user does not specify an `onChange`\nfunciton prop that in turn updates the value of `checked`, neither clicking\nnor the Space key will toggle the Checkbox.\n\n### References\n\n* [Accessible validation of checkbox and radiobutton groups](https://blog.tenon.io/accessible-validation-of-checkbox-and-radiobutton-groups/)\n* [HTML: Validating a checkbox with HTML5](https://www.the-art-of-web.com/html/html5-checkbox-required/#example1)\n* [aria-checked MDN Docs](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked)\n* [ARIA: checkbox role MDN Docs](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/checkbox_role)\n"}}},"packages-form-checkboxgroup":{"id":"packages-form-checkboxgroup","name":"CheckboxGroup","path":"./__docs__/wonder-blocks-form/checkbox-group.stories.tsx","stories":[{"id":"packages-form-checkboxgroup--default","name":"Default","snippet":"const Default = () => {\n    return (\n        <CheckboxGroup\n            groupName=\"toppings\"\n            selectedValues={[\"pepperoni-1\", \"sausage-1\"]}\n            onChange={() => {}}\n            label=\"Pizza toppings\"\n            description=\"Choose as many toppings as you would like.\">\n            <Choice label=\"Pepperoni\" value=\"pepperoni-1\" />\n            <Choice label=\"Sausage\" value=\"sausage-1\" description=\"Imported from Italy\" />\n            <Choice label=\"Extra cheese\" value=\"cheese-1\" />\n            <Choice label=\"Green pepper\" value=\"pepper-1\" />\n            <Choice label=\"Mushroom\" value=\"mushroom-1\" />\n        </CheckboxGroup>\n    );\n};","description":"`CheckboxGroup` is a component that groups multiple `Choice` components together. It is used to allow users to select multiple options from a list. Note that by using a `label` prop, the `CheckboxGroup` component will render a `legend` as the first child of the `fieldset` element. This is important to include as it ensures that Screen Readers can correctly identify and announce the group of checkboxes."},{"id":"packages-form-checkboxgroup--basic","name":"Basic","snippet":"const Basic = () => {\n    const [selectedValues, setSelectedValues] = React.useState<Array<string>>(\n        [],\n    );\n\n    return (\n        <CheckboxGroup\n            groupName=\"toppings\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n        >\n            <Choice label=\"Pepperoni\" value=\"pepperoni-2\" />\n            <Choice\n                label=\"Sausage\"\n                value=\"sausage-2\"\n                description=\"Imported from Italy\"\n            />\n            <Choice label=\"Extra cheese\" value=\"cheese-2\" />\n            <Choice label=\"Green pepper\" value=\"pepper-2\" />\n            <Choice label=\"Mushroom\" value=\"mushroom-2\" />\n        </CheckboxGroup>\n    );\n};"},{"id":"packages-form-checkboxgroup--error","name":"Error","snippet":"const Error = () => {\n    const toppingsError = \"You have selected too many toppings\";\n    const [selectedValues, setSelectedValues] = React.useState([\n        \"pepperoni-3\",\n        \"sausage-3\",\n        \"cheese-3\",\n        \"pepper-3\",\n    ]);\n    const [error, setError] = React.useState<string | undefined>(toppingsError);\n\n    // Returns an error message if more than 3 items are selected,\n    // and it returns undefined otherwise. We use undefined instead of\n    // null here because null would result in a type error, whereas\n    // undefined would be the same as not passing in anything to the\n    // checkbox group's `errorMessage` prop.\n    const checkForError = (input: Array<string>) => {\n        if (input.length > 3) {\n            return toppingsError;\n        }\n    };\n\n    const handleChange = (input: Array<string>) => {\n        const errorMessage = checkForError(input);\n        setSelectedValues(input);\n        setError(errorMessage);\n    };\n\n    return (\n        <CheckboxGroup\n            label=\"Pizza order\"\n            groupName=\"toppings\"\n            description=\"You may choose at most three toppings\"\n            onChange={handleChange}\n            errorMessage={error}\n            selectedValues={selectedValues}\n        >\n            <Choice label=\"Pepperoni\" value=\"pepperoni-3\" />\n            <Choice\n                label=\"Sausage\"\n                value=\"sausage-3\"\n                description=\"Imported from Italy\"\n            />\n            <Choice label=\"Extra cheese\" value=\"cheese-3\" />\n            <Choice label=\"Green pepper\" value=\"pepper-3\" />\n            <Choice label=\"Mushroom\" value=\"mushroom-3\" />\n        </CheckboxGroup>\n    );\n};"},{"id":"packages-form-checkboxgroup--row-styling","name":"Row Styling","snippet":"const RowStyling = () => {\n    const [selectedValues, setSelectedValues] = React.useState<Array<string>>(\n        [],\n    );\n\n    return (\n        <View style={styles.wrapper}>\n            <BodyText weight=\"bold\" style={styles.title}>\n                Science\n            </BodyText>\n            <CheckboxGroup\n                groupName=\"science-classes\"\n                onChange={setSelectedValues}\n                selectedValues={selectedValues}\n                style={styles.group}\n            >\n                <Choice label=\"Biology\" value=\"1\" style={styles.choice} />\n                <Choice label=\"AP®︎ Biology\" value=\"2\" style={styles.choice} />\n                <Choice\n                    label=\"High school biology\"\n                    value=\"3\"\n                    style={styles.choice}\n                />\n                <Choice\n                    label=\"Cosmology and astronomy\"\n                    value=\"4\"\n                    style={styles.choice}\n                />\n                <Choice\n                    label=\"Electrical engineering\"\n                    value=\"5\"\n                    style={styles.choice}\n                />\n                <Choice\n                    label=\"Health and medicine\"\n                    value=\"6\"\n                    style={styles.choice}\n                />\n            </CheckboxGroup>\n        </View>\n    );\n};"},{"id":"packages-form-checkboxgroup--multiple-choice-styling","name":"Multiple Choice Styling","snippet":"const MultipleChoiceStyling = () => {\n    const [selectedValues, setSelectedValues] = React.useState<Array<string>>(\n        [],\n    );\n\n    return (\n        <CheckboxGroup\n            label={\n                <BodyText weight=\"bold\" tag=\"span\">\n                    Select all prime numbers\n                </BodyText>\n            }\n            description={\n                <BodyText size=\"xsmall\" tag=\"span\" style={styles.description}>\n                    Hint: There is at least one prime number\n                </BodyText>\n            }\n            groupName=\"science-classes\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n        >\n            <Choice\n                label=\"1\"\n                value=\"1-mc-styling\"\n                style={[styles.multipleChoice, styles.firstChoice]}\n            />\n            <Choice\n                label=\"2\"\n                value=\"2-mc-styling\"\n                style={styles.multipleChoice}\n            />\n            <Choice\n                label=\"3\"\n                value=\"3-mc-styling\"\n                style={styles.multipleChoice}\n            />\n            <Choice\n                label=\"4\"\n                value=\"4-mc-styling\"\n                style={styles.multipleChoice}\n            />\n            <Choice\n                label=\"5\"\n                value=\"5-mc-styling\"\n                style={[styles.multipleChoice, styles.last]}\n            />\n        </CheckboxGroup>\n    );\n};"},{"id":"packages-form-checkboxgroup--filters-out-falsy-children","name":"Filters Out Falsy Children","snippet":"const FiltersOutFalsyChildren = () => {\n    const [selectedValues, setSelectedValues] = React.useState<Array<string>>([\n        \"pepperoni-4\",\n        \"sausage-4\",\n    ]);\n    return (\n        <CheckboxGroup\n            groupName=\"pizza\"\n            onChange={setSelectedValues}\n            selectedValues={selectedValues}\n            label=\"Pizza toppings\"\n        >\n            <Choice label=\"Pepperoni\" value=\"pepperoni-4\" />\n            <Choice\n                label=\"Sausage\"\n                value=\"sausage-4\"\n                description=\"Imported from Italy\"\n            />\n            <Choice label=\"Extra cheese\" value=\"cheese-4\" />\n            <Choice label=\"Green pepper\" value=\"pepper-4\" />\n            {/* eslint-disable-next-line no-constant-condition */}\n            {false ? <Choice label=\"Mushroom\" value=\"mushroom-4\" /> : null}\n        </CheckboxGroup>\n    );\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { CheckboxGroup, Choice, ComponentInfo } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A checkbox group allows multiple selection. This component auto-populates many props for its children Choice components. The Choice component is exposed for the user to apply custom styles or to indicate which choices are disabled. ### Usage ```jsx import {Choice, CheckboxGroup} from \"@khanacademy/wonder-blocks-form\"; const [selectedValues, setSelectedValues] = React.useState([]); <CheckboxGroup label=\"some-label\" description=\"some-description\" groupName=\"some-group-name\" onChange={setSelectedValues} selectedValues={selectedValues} > // Add as many choices as necessary <Choice label=\"Choice 1\" value=\"some-choice-value\" /> <Choice label=\"Choice 2\" value=\"some-choice-value-2\" description=\"Some choice description.\" /> </CheckboxGroup> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-form/src/index.ts","description":"A checkbox group allows multiple selection. This component auto-populates\nmany props for its children Choice components. The Choice component is\nexposed for the user to apply custom styles or to indicate which choices are\ndisabled.\n\n### Usage\n\n```jsx\nimport {Choice, CheckboxGroup} from \"@khanacademy/wonder-blocks-form\";\n\nconst [selectedValues, setSelectedValues] = React.useState([]);\n\n<CheckboxGroup\n    label=\"some-label\"\n    description=\"some-description\"\n    groupName=\"some-group-name\"\n    onChange={setSelectedValues}\n    selectedValues={selectedValues}\n>\n    // Add as many choices as necessary\n    <Choice\n       label=\"Choice 1\"\n       value=\"some-choice-value\"\n    />\n    <Choice\n       label=\"Choice 2\"\n       value=\"some-choice-value-2\"\n       description=\"Some choice description.\"\n    />\n</CheckboxGroup>\n```","displayName":"CheckboxGroup","methods":[],"props":{"children":{"defaultValue":null,"description":"Children should be Choice components.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(false | ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & { label: ReactNode; description?: ReactNode; value: string; disabled?: boolean | undefined; testId?: string | undefined; style?: StyleType; checked?: boolean | undefined; error?: boolean | undefined; id?: string | undefined; groupName?: string | undefined; onChange?: ((newCheckedState: boolean) => unknown) | undefined; variant?: \"checkbox\" | \"radio\" | undefined; } & RefAttributes<HTMLInputElement>, string | JSXElementConstructor<any>> | null | undefined)[]"}},"groupName":{"defaultValue":null,"description":"Group name for this checkbox or radio group. Should be unique for all\nsuch groups displayed on a page.","name":"groupName","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"label":{"defaultValue":null,"description":"Optional label for the group. This label is optional to allow for\ngreater flexibility in implementing checkbox and radio groups.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"description":{"defaultValue":null,"description":"Optional description for the group.","name":"description","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"errorMessage":{"defaultValue":null,"description":"Optional error message. If supplied, the group will be displayed in an\nerror state, along with this error message. If no error state is desired,\nsimply do not supply this prop, or pass along null.","name":"errorMessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string | null"}},"style":{"defaultValue":null,"description":"Custom styling for this group of checkboxes.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"onChange":{"defaultValue":null,"description":"Callback for when selection of the group has changed. Passes the newly\nselected values.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(selectedValues: string[]) => unknown"}},"selectedValues":{"defaultValue":null,"description":"An array of the values of the selected values in this checkbox group.","name":"selectedValues","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string[]"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLFieldSetElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"CheckboxGroup"}},"packages-form-checkbox":{"id":"packages-form-checkbox","name":"Checkbox","path":"./__docs__/wonder-blocks-form/checkbox.stories.tsx","stories":[{"id":"packages-form-checkbox--default","name":"Default","snippet":"const Default = () => <Checkbox checked={false} onChange={() => {}} aria-label=\"Example\" />;"},{"id":"packages-form-checkbox--controlled","name":"Controlled","snippet":"const Controlled = () => {\n    const [checked, setChecked] = React.useState<boolean | null>(null);\n\n    const handleChange = () => {\n        // If `checked` is true (checked) OR null/undefined (indeterminate),\n        // we want to change it to false (unchecked). We only change it back\n        // to true if it the value is explicitly false.\n        setChecked(checked === false);\n    };\n\n    return (\n        <Checkbox\n            aria-label=\"Example\"\n            checked={checked}\n            onChange={handleChange}\n        />\n    );\n};"},{"id":"packages-form-checkbox--indeterminate","name":"Indeterminate","snippet":"const Indeterminate = () => {\n    return (\n        <View style={[styles.row, styles.gap]}>\n            <Checkbox\n                aria-label=\"Default example\"\n                checked={null}\n                disabled={false}\n                error={false}\n                onChange={() => {}}\n            />\n            <Checkbox\n                aria-label=\"Disabled example\"\n                checked={undefined}\n                disabled={true}\n                error={false}\n                onChange={() => {}}\n            />\n            <Checkbox\n                aria-label=\"Error example\"\n                checked={null}\n                disabled={false}\n                error={true}\n                onChange={() => {}}\n            />\n        </View>\n    );\n};"},{"id":"packages-form-checkbox--indeterminate-with-group","name":"Indeterminate With Group","snippet":"const IndeterminateWithGroup = () => {\n    const [allSelected, setAllSelected] = React.useState<boolean | null>(false);\n    const [selectedValues, setSelectedValues] = React.useState<Array<string>>(\n        [],\n    );\n    const choices = [\n        {label: \"Pepperoni\", value: \"pepperoni\"},\n        {label: \"Sausage\", value: \"sausage\"},\n        {label: \"Extra cheese\", value: \"cheese\"},\n        {label: \"Green pepper\", value: \"pepper\"},\n        {label: \"Mushroom\", value: \"mushroom\"},\n    ];\n\n    const handleSelectAll = () => {\n        if (allSelected || allSelected === null) {\n            setSelectedValues([]);\n            setAllSelected(false);\n        } else {\n            const allValues = choices.map((choice) => choice.value);\n            setSelectedValues(allValues);\n            setAllSelected(true);\n        }\n    };\n\n    const handleCheckboxGroupSelect = (values: Array<string>) => {\n        setSelectedValues(values);\n        if (values.length === choices.length) {\n            setAllSelected(true);\n        } else if (values.length) {\n            setAllSelected(null);\n        } else {\n            setAllSelected(false);\n        }\n    };\n\n    return (\n        <View>\n            <Checkbox\n                checked={allSelected}\n                label={\"Topping(s)\"}\n                onChange={handleSelectAll}\n            />\n            <Strut size={12} />\n            <View style={{marginInlineStart: sizing.size_240}}>\n                <CheckboxGroup\n                    groupName=\"toppings\"\n                    onChange={handleCheckboxGroupSelect}\n                    selectedValues={selectedValues}\n                >\n                    {choices.map((choice) => (\n                        <Choice\n                            key={choice.label}\n                            label={choice.label}\n                            value={choice.value}\n                        />\n                    ))}\n                </CheckboxGroup>\n            </View>\n        </View>\n    );\n};"},{"id":"packages-form-checkbox--variants","name":"Variants","snippet":"const Variants = () => (\n    <View style={[styles.row, styles.gap_240]}>\n        <Checkbox\n            aria-label=\"Default example\"\n            error={false}\n            checked={false}\n            onChange={() => {}}\n        />\n        <Checkbox\n            aria-label=\"Checked example\"\n            error={false}\n            checked={true}\n            onChange={() => {}}\n        />\n        <Checkbox\n            aria-label=\"Error example\"\n            error={true}\n            checked={false}\n            onChange={() => {}}\n        />\n        <Checkbox\n            aria-label=\"Error checked example\"\n            error={true}\n            checked={true}\n            onChange={() => {}}\n        />\n        <Checkbox\n            aria-label=\"Disabled example\"\n            disabled={true}\n            checked={false}\n            onChange={() => {}}\n        />\n        <Checkbox\n            aria-label=\"Disabled checked example\"\n            disabled={true}\n            checked={true}\n            onChange={() => {}}\n        />\n    </View>\n);"},{"id":"packages-form-checkbox--variants-controlled","name":"Variants Controlled","snippet":"const VariantsControlled = () => {\n    const [defaultChecked, defaultSetChecked] = React.useState(false);\n    const [errorChecked, errorSetChecked] = React.useState(false);\n    const [disabledChecked, disabledSetChecked] = React.useState(false);\n\n    return (\n        <View style={[styles.row, styles.gap_240]}>\n            <Checkbox\n                aria-label=\"Checked example\"\n                checked={defaultChecked}\n                onChange={defaultSetChecked}\n                style={styles.marginRight}\n            />\n            <Checkbox\n                aria-label=\"Error example\"\n                error={true}\n                checked={errorChecked}\n                onChange={errorSetChecked}\n                style={styles.marginRight}\n            />\n            <Checkbox\n                aria-label=\"Disabled checked example\"\n                checked={disabledChecked}\n                disabled={true}\n                onChange={disabledSetChecked}\n                style={styles.marginRight}\n            />\n        </View>\n    );\n};"},{"id":"packages-form-checkbox--with-label","name":"With Label","snippet":"const WithLabel = () => {\n    const [checked, setChecked] = React.useState(false);\n\n    return (\n        <Checkbox\n            label=\"Receive assignment reminders for Algebra\"\n            description=\"You will receive a reminder 24 hours before each deadline\"\n            checked={checked}\n            onChange={setChecked}\n        />\n    );\n};"},{"id":"packages-form-checkbox--with-styled-label","name":"With Styled Label","snippet":"const WithStyledLabel = () => {\n    const [checked, setChecked] = React.useState(false);\n\n    const handleChange = () => {\n        setChecked(!checked);\n    };\n\n    return (\n        <Checkbox\n            label={\n                <BodyText\n                    weight=\"bold\"\n                    tag=\"span\"\n                    style={{lineHeight: font.body.lineHeight.small}}\n                >\n                    Receive assignment reminders for Algebra\n                </BodyText>\n            }\n            description=\"You will receive a reminder 24 hours before each deadline\"\n            checked={checked}\n            onChange={() => handleChange()}\n        />\n    );\n};"},{"id":"packages-form-checkbox--additional-click-target","name":"Additional Click Target","snippet":"const AdditionalClickTarget = () => {\n    const [checked, setChecked] = React.useState(false);\n    const headingText = \"Functions\";\n    const descriptionText = `A great cook knows how to take basic\n        ingredients and prepare a delicious meal. In this topic, you will\n        become function-chefs! You will learn how to combine functions\n        with arithmetic operations and how to compose functions.`;\n\n    return (\n        <View style={styles.wrapper}>\n            <View style={styles.topic}>\n                <label htmlFor=\"topic-123\">\n                    <BodyText tag=\"span\">{headingText}</BodyText>\n                </label>\n                <BodyText size=\"small\">{descriptionText}</BodyText>\n            </View>\n            <Checkbox checked={checked} id=\"topic-123\" onChange={setChecked} />\n        </View>\n    );\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { Checkbox, CheckboxGroup, Choice, ComponentInfo, Strut } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"☑️ A nicely styled checkbox for all your checking needs. Can optionally take label and description props. If used by itself, a checkbox provides two options - checked and unchecked. A group of checkboxes can be used to allow a user to select multiple values from a list of options. If you want a whole group of Checkbox[es] that are related, see the Choice and CheckboxGroup components. ### Usage ```jsx import {Checkbox} from \"@khanacademy/wonder-blocks-form\"; const [checked, setChecked] = React.useState(false); <Checkbox checked={checked} onChange={setChecked} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-form/src/index.ts","description":"☑️ A nicely styled checkbox for all your checking needs. Can optionally take\nlabel and description props.\n\nIf used by itself, a checkbox provides two options - checked and unchecked.\nA group of checkboxes can be used to allow a user to select multiple values\nfrom a list of options.\n\nIf you want a whole group of Checkbox[es] that are related, see the Choice\nand CheckboxGroup components.\n\n### Usage\n\n```jsx\nimport {Checkbox} from \"@khanacademy/wonder-blocks-form\";\n\nconst [checked, setChecked] = React.useState(false);\n\n<Checkbox checked={checked} onChange={setChecked} />\n```","displayName":"Checkbox","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"checked":{"defaultValue":null,"description":"Whether this component is checked or indeterminate","name":"checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"Checked"}},"disabled":{"defaultValue":null,"description":"Whether this component is disabled","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"error":{"defaultValue":null,"description":"Whether this component should show an error state","name":"error","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onChange":{"defaultValue":null,"description":"Callback when this component is selected. The newCheckedState is the\nnew checked state of the component.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(newCheckedState: boolean) => unknown"}},"label":{"defaultValue":null,"description":"Optional label for the field.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"description":{"defaultValue":null,"description":"Optional description for the field.","name":"description","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"id":{"defaultValue":null,"description":"Unique identifier attached to the HTML input element. If used, need to\nguarantee that the ID is unique within everything rendered on a page.\nUsed to match `<label>` with `<input>` elements for screenreaders.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"Optional styling for the container. Does not style the component.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the Checkbox.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"groupName":{"defaultValue":null,"description":"Name for the checkbox or radio button group. Only applicable for group\ncontexts, auto-populated by group components via Choice.\n@ignore","name":"groupName","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/checkbox.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLInputElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Checkbox"}},"packages-form-choice":{"id":"packages-form-choice","name":"Choice","path":"./__docs__/wonder-blocks-form/choice.stories.tsx","stories":[{"id":"packages-form-choice--default","name":"Default","snippet":"const Default = () => <ChoiceWrapper label=\"Pineapple (Control)\" description=\"Does in fact belong on pizzas\" />;"}],"import":"import { CheckboxGroup, Choice, ComponentInfo, RadioGroup } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"This is a labeled 🔘 or ☑️ item. Choice is meant to be used as children of CheckboxGroup and RadioGroup because many of its props are auto-populated and not shown in the documentation here. See those components for usage examples. If you wish to use just a single field, use Checkbox or Radio with the optional label and description props. ### Checkbox Usage ```jsx import {Choice, CheckboxGroup} from \"@khanacademy/wonder-blocks-form\"; const [selectedValues, setSelectedValues] = React.useState([]); // Checkbox usage <CheckboxGroup label=\"some-label\" description=\"some-description\" groupName=\"some-group-name\" onChange={setSelectedValues} selectedValues={selectedValues} /> // Add as many choices as necessary <Choice label=\"Choice 1\" value=\"some-choice-value\" description=\"Some choice description.\" /> <Choice label=\"Choice 2\" value=\"some-choice-value-2\" description=\"Some choice description.\" /> </CheckboxGroup> ``` ### Radio Usage ```jsx import {Choice, RadioGroup} from \"@khanacademy/wonder-blocks-form\"; const [selectedValue, setSelectedValue] = React.useState(\"\"); <RadioGroup label=\"some-label\" description=\"some-description\" groupName=\"some-group-name\" onChange={setSelectedValue}> selectedValues={selectedValue} /> // Add as many choices as necessary <Choice label=\"Choice 1\" value=\"some-choice-value\" description=\"Some choice description.\" /> <Choice label=\"Choice 2\" value=\"some-choice-value-2\" description=\"Some choice description.\" /> </RadioGroup> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-form/src/index.ts","description":"This is a labeled 🔘 or ☑️ item. Choice is meant to be used as children of\nCheckboxGroup and RadioGroup because many of its props are auto-populated\nand not shown in the documentation here. See those components for usage\nexamples.\n\nIf you wish to use just a single field, use Checkbox or Radio with the\noptional label and description props.\n\n### Checkbox Usage\n\n```jsx\nimport {Choice, CheckboxGroup} from \"@khanacademy/wonder-blocks-form\";\n\nconst [selectedValues, setSelectedValues] = React.useState([]);\n\n// Checkbox usage\n<CheckboxGroup\n    label=\"some-label\"\n    description=\"some-description\"\n    groupName=\"some-group-name\"\n    onChange={setSelectedValues}\n    selectedValues={selectedValues}\n/>\n    // Add as many choices as necessary\n    <Choice\n       label=\"Choice 1\"\n       value=\"some-choice-value\"\n       description=\"Some choice description.\"\n    />\n    <Choice\n       label=\"Choice 2\"\n       value=\"some-choice-value-2\"\n       description=\"Some choice description.\"\n    />\n</CheckboxGroup>\n```\n\n### Radio Usage\n\n```jsx\nimport {Choice, RadioGroup} from \"@khanacademy/wonder-blocks-form\";\n\nconst [selectedValue, setSelectedValue] = React.useState(\"\");\n\n<RadioGroup\n    label=\"some-label\"\n    description=\"some-description\"\n    groupName=\"some-group-name\"\n    onChange={setSelectedValue}>\n    selectedValues={selectedValue}\n/>\n    // Add as many choices as necessary\n    <Choice\n       label=\"Choice 1\"\n       value=\"some-choice-value\"\n       description=\"Some choice description.\"\n    />\n    <Choice\n       label=\"Choice 2\"\n       value=\"some-choice-value-2\"\n       description=\"Some choice description.\"\n    />\n</RadioGroup>\n```","displayName":"Choice","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"label":{"defaultValue":null,"description":"User-defined. Label for the field.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactNode"}},"description":{"defaultValue":null,"description":"User-defined. Optional description for the field.","name":"description","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"value":{"defaultValue":null,"description":"User-defined. Should be distinct for each item in the group.","name":"value","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"disabled":{"defaultValue":null,"description":"User-defined. Whether this choice option is disabled. Default false.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"testId":{"defaultValue":null,"description":"User-defined. Optional id for testing purposes.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"User-defined. Optional additional styling.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"checked":{"defaultValue":null,"description":"Auto-populated by parent. Whether this choice is checked.\n@ignore","name":"checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"error":{"defaultValue":null,"description":"Auto-populated by parent. Whether this choice is in error mode (everything\nin a choice group would be in error mode at the same time).\n@ignore","name":"error","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"id":{"defaultValue":null,"description":"Auto-populated by parent. Used for accessibility purposes, where the label\nid should match the input id.\n@ignore","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"groupName":{"defaultValue":null,"description":"Auto-populated by parent's groupName prop.\n@ignore","name":"groupName","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onChange":{"defaultValue":null,"description":"Auto-populated by parent. Returns the new checked state of the component.\n@ignore","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((newCheckedState: boolean) => unknown)"}},"variant":{"defaultValue":null,"description":"Auto-populated by parent.\n@ignore","name":"variant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/choice.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"checkbox\" | \"radio\"","value":[{"value":"\"checkbox\""},{"value":"\"radio\""}]}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLInputElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Choice"}},"packages-form-radiogroup":{"id":"packages-form-radiogroup","name":"RadioGroup","path":"./__docs__/wonder-blocks-form/radio-group.stories.tsx","stories":[{"id":"packages-form-radiogroup--default","name":"Default","snippet":"const Default = () => {\n    return (\n        <RadioGroup\n            groupName=\"pokemon\"\n            selectedValue=\"bulbasaur-1\"\n            onChange={() => {}}\n            label=\"Pokemon\"\n            description=\"Your first Pokemon.\">\n            <Choice label=\"Bulbasaur\" value=\"bulbasaur-1\" />\n            <Choice\n                label=\"Charmander\"\n                value=\"charmander-1\"\n                description=\"Oops, we ran out of Charmanders\"\n                disabled />\n            <Choice label=\"Squirtle\" value=\"squirtle-1\" />\n            <Choice label=\"Pikachu\" value=\"pikachu-1\" />\n        </RadioGroup>\n    );\n};","description":"`RadioGroup` is a component that groups multiple `Choice` components together. It is used to allow users to select a single option from a list. Note that by using a `label` prop, the `RadioGroup` component will render a `legend` as the first child of the `fieldset` element. This is important to include as it ensures that Screen Readers can correctly identify and announce the group of radio buttons."},{"id":"packages-form-radiogroup--basic","name":"Basic","snippet":"const Basic = () => {\n    const [selectedValue, setSelectedValue] = React.useState(\"\");\n\n    return (\n        <RadioGroup\n            groupName=\"pokemon\"\n            label=\"Pokemon\"\n            description=\"Your first Pokemon.\"\n            onChange={setSelectedValue}\n            selectedValue={selectedValue}\n        >\n            <Choice label=\"Bulbasaur\" value=\"bulbasaur-2\" />\n            <Choice\n                label=\"Charmander\"\n                value=\"charmander-2\"\n                description=\"Oops, we ran out of Charmanders\"\n                disabled\n            />\n            <Choice label=\"Squirtle\" value=\"squirtle-2\" />\n            <Choice label=\"Pikachu\" value=\"pikachu-2\" />\n        </RadioGroup>\n    );\n};"},{"id":"packages-form-radiogroup--error","name":"Error","snippet":"const Error = () => {\n    const emptyError = \"You must select an option to continue.\";\n    const [selectedValue, setSelectedValue] = React.useState(\"\");\n    const [error, setError] = React.useState<string | undefined>(emptyError);\n\n    // This returns an error message if no option is selected,\n    // and it returns undefined otherwise. We use undefined instead of\n    // null here because null would result in a type error, whereas\n    // undefined would be the same as not passing in anything to the\n    // radio group's `errorMessage` prop.\n    const checkForError = (input: string) => {\n        if (!input) {\n            return emptyError;\n        }\n    };\n\n    const handleChange = (input: string) => {\n        const errorMessage = checkForError(input);\n        setSelectedValue(input);\n        setError(errorMessage);\n    };\n\n    return (\n        <RadioGroup\n            groupName=\"pokemon\"\n            label=\"Pokemon\"\n            description=\"Your first Pokemon.\"\n            onChange={handleChange}\n            selectedValue={selectedValue}\n            errorMessage={error}\n        >\n            <Choice label=\"Bulbasaur\" value=\"bulbasaur-3\" />\n            <Choice label=\"Charmander\" value=\"charmander-3\" />\n            <Choice label=\"Squirtle\" value=\"squirtle-3\" />\n            <Choice label=\"Pikachu\" value=\"pikachu-3\" />\n        </RadioGroup>\n    );\n};"},{"id":"packages-form-radiogroup--multiple-choice-styling","name":"Multiple Choice Styling","snippet":"const MultipleChoiceStyling = () => {\n    const [selectedValue, setSelectedValue] = React.useState(\"\");\n\n    return (\n        <>\n            <BodyText weight=\"bold\" tag=\"span\" style={styles.prompt}>\n                Select your blood type\n            </BodyText>\n            <RadioGroup\n                groupName=\"science-classes\"\n                onChange={setSelectedValue}\n                selectedValue={selectedValue}\n            >\n                <Choice label=\"A\" value=\"1\" style={styles.choice} />\n                <Choice label=\"B\" value=\"2\" style={styles.choice} />\n                <Choice label=\"AB\" value=\"3\" style={styles.choice} />\n                <Choice\n                    label=\"O\"\n                    value=\"4\"\n                    style={[styles.choice, styles.lastChoice]}\n                />\n            </RadioGroup>\n        </>\n    );\n};"},{"id":"packages-form-radiogroup--filters-out-falsy-children","name":"Filters Out Falsy Children","snippet":"const FiltersOutFalsyChildren = () => {\n    const [selectedValue, setSelectedValue] = React.useState(\"bulbasaur-4\");\n\n    return (\n        <RadioGroup\n            groupName=\"pokemon\"\n            onChange={setSelectedValue}\n            selectedValue={selectedValue}\n            label=\"Pokemon\"\n            description=\"Your first Pokemon.\"\n        >\n            <Choice label=\"Bulbasaur\" value=\"bulbasaur-4\" />\n            <Choice\n                label=\"Charmander\"\n                value=\"charmander-4\"\n                description=\"Oops, we ran out of Charmanders\"\n                disabled\n            />\n            <Choice label=\"Squirtle\" value=\"squirtle-4\" />\n            {/* eslint-disable-next-line no-constant-condition */}\n            {false ? <Choice label=\"Pikachu\" value=\"pikachu-4\" /> : null}\n        </RadioGroup>\n    );\n};"},{"id":"packages-form-radiogroup--custom-label","name":"Custom Label","snippet":"const CustomLabel = () => <RadioGroup\n    style={{\n        // Adding an arbitrary width to the radio group to demonstrate how\n        // the custom label component expands to fill the available space.\n        width: 400,\n    }}\n    label={(<View\n        style={{\n            border: `1px dashed ${semanticColor.core.border.neutral.default}`,\n            padding: sizing.size_160,\n            flexDirection: \"row\",\n            justifyContent: \"space-between\",\n        }}\n    >\n        <BodyText weight=\"bold\" tag=\"span\">\n            Pokemon\n        </BodyText>\n        <BodyText tag=\"span\">(optional)</BodyText>\n    </View>)} />;","description":"There are specific situations where you might want to use a custom label component. This example demonstrates how to use a custom label component that can be passed in as a prop to the `RadioGroup` component."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { Choice, ComponentInfo, RadioGroup } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A radio group allows only single selection. Like CheckboxGroup, this component auto-populates many props for its children Choice components. The Choice component is exposed for the user to apply custom styles or to indicate which choices are disabled. The use of the groupName prop is important to maintain expected keyboard navigation behavior for accessibility. ### Usage ```jsx import {Choice, RadioGroup} from \"@khanacademy/wonder-blocks-form\"; const [selectedValue, setSelectedValue] = React.useState(\"\"); <RadioGroup label=\"some-label\" description=\"some-description\" groupName=\"some-group-name\" onChange={setSelectedValue} selectedValue={selectedValue} > // Add as many choices as necessary <Choice label=\"Choice 1\" value=\"some-choice-value\" /> <Choice label=\"Choice 2\" value=\"some-choice-value-2\" description=\"Some choice description.\" /> </RadioGroup> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-form/src/index.ts","description":"A radio group allows only single selection. Like CheckboxGroup, this\ncomponent auto-populates many props for its children Choice components. The\nChoice component is exposed for the user to apply custom styles or to\nindicate which choices are disabled. The use of the groupName prop is\nimportant to maintain expected keyboard navigation behavior for\naccessibility.\n\n### Usage\n\n```jsx\nimport {Choice, RadioGroup} from \"@khanacademy/wonder-blocks-form\";\n\nconst [selectedValue, setSelectedValue] = React.useState(\"\");\n\n<RadioGroup\n    label=\"some-label\"\n    description=\"some-description\"\n    groupName=\"some-group-name\"\n    onChange={setSelectedValue}\n    selectedValue={selectedValue}\n>\n    // Add as many choices as necessary\n    <Choice\n       label=\"Choice 1\"\n       value=\"some-choice-value\"\n    />\n    <Choice\n       label=\"Choice 2\"\n       value=\"some-choice-value-2\"\n       description=\"Some choice description.\"\n    />\n</RadioGroup>\n```","displayName":"RadioGroup","methods":[],"props":{"children":{"defaultValue":null,"description":"Children should be Choice components.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(false | ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & { label: ReactNode; description?: ReactNode; value: string; disabled?: boolean | undefined; testId?: string | undefined; style?: StyleType; checked?: boolean | undefined; error?: boolean | undefined; id?: string | undefined; groupName?: string | undefined; onChange?: ((newCheckedState: boolean) => unknown) | undefined; variant?: \"checkbox\" | \"radio\" | undefined; } & RefAttributes<HTMLInputElement>, string | JSXElementConstructor<any>> | null | undefined)[]"}},"groupName":{"defaultValue":null,"description":"Group name for this checkbox or radio group. Should be unique for all\nsuch groups displayed on a page.","name":"groupName","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"label":{"defaultValue":null,"description":"Optional label for the group. This label is optional to allow for\ngreater flexibility in implementing checkbox and radio groups.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"description":{"defaultValue":null,"description":"Optional description for the group.","name":"description","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"errorMessage":{"defaultValue":null,"description":"Optional error message. If supplied, the group will be displayed in an\nerror state, along with this error message. If no error state is desired,\nsimply do not supply this prop, or pass along null.","name":"errorMessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"Custom styling for this group of checkboxes.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"onChange":{"defaultValue":null,"description":"Callback for when the selected value of the radio group has changed.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(selectedValue: string) => unknown"}},"selectedValue":{"defaultValue":null,"description":"Value of the selected radio item.","name":"selectedValue","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio-group.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLFieldSetElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"RadioGroup"}},"packages-form-radio-internal":{"id":"packages-form-radio-internal","name":"Radio","path":"./__docs__/wonder-blocks-form/radio.stories.tsx","stories":[{"id":"packages-form-radio-internal--default","name":"Default","snippet":"const Default = () => <Radio aria-label=\"Example\" checked={false} onChange={() => {}} />;"},{"id":"packages-form-radio-internal--controlled","name":"Controlled","snippet":"const Controlled = () => {\n    const [checked, setChecked] = React.useState(false);\n    return (\n        <Radio aria-label=\"Example\" checked={checked} onChange={setChecked} />\n    );\n};"},{"id":"packages-form-radio-internal--variants","name":"Variants","snippet":"const Variants = () => (\n    <View style={styles.row}>\n        <Radio aria-label=\"Example\" checked={false} onChange={() => {}} />\n        <Radio\n            aria-label=\"Checked Example\"\n            checked={true}\n            onChange={() => {}}\n        />\n        <Radio\n            aria-label=\"Error Example\"\n            error={true}\n            checked={false}\n            onChange={() => {}}\n        />\n        <Radio\n            aria-label=\"Checked Error Example\"\n            error={true}\n            checked={true}\n            onChange={() => {}}\n        />\n        <Radio\n            aria-label=\"Disabled Example\"\n            disabled={true}\n            checked={false}\n            onChange={() => {}}\n        />\n        <Radio\n            aria-label=\"Disabled Checked Example\"\n            disabled={true}\n            checked={true}\n            onChange={() => {}}\n        />\n    </View>\n);"},{"id":"packages-form-radio-internal--with-label","name":"With Label","snippet":"const WithLabel = () => {\n    const [checked, setChecked] = React.useState(false);\n\n    return (\n        <Radio\n            label=\"Easy\"\n            description=\"Opt for a less difficult exercise set.\"\n            checked={checked}\n            onChange={setChecked}\n        />\n    );\n};"},{"id":"packages-form-radio-internal--additional-click-target","name":"Additional Click Target","snippet":"const AdditionalClickTarget = () => {\n    const [checked, setChecked] = React.useState(false);\n    const headingText = \"Functions\";\n    const descriptionText = `A great cook knows how to take basic\n        ingredients and prepare a delicious meal. In this topic, you will\n        become function-chefs! You will learn how to combine functions\n        with arithmetic operations and how to compose functions.`;\n\n    return (\n        <View style={styles.wrapper}>\n            <View style={styles.topic}>\n                <label htmlFor=\"topic-123\">\n                    <BodyText tag=\"span\">{headingText}</BodyText>\n                </label>\n                <BodyText size=\"small\">{descriptionText}</BodyText>\n            </View>\n            <Radio checked={checked} id=\"topic-123\" onChange={setChecked} />\n        </View>\n    );\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, Radio } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"🔘 A nicely styled radio button for all your non-AMFM radio button needs. Can optionally take label and description props. This component should not really be used by itself because radio buttons are often grouped together. See RadioGroup.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","description":"🔘 A nicely styled radio button for all your non-AMFM radio button needs. Can\noptionally take label and description props.\n\nThis component should not really be used by itself because radio buttons are\noften grouped together. See RadioGroup.","displayName":"radio","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"checked":{"defaultValue":null,"description":"Whether this component is checked","name":"checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Whether this component is disabled","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"error":{"defaultValue":null,"description":"Whether this component should show an error state","name":"error","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onChange":{"defaultValue":null,"description":"Callback when this component is selected. The newCheckedState is the\nnew checked state of the component.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(newCheckedState: boolean) => unknown"}},"label":{"defaultValue":null,"description":"Optional label for the field.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"description":{"defaultValue":null,"description":"Optional description for the field.","name":"description","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"id":{"defaultValue":null,"description":"Unique identifier attached to the HTML input element. If used, need to\nguarantee that the ID is unique within everything rendered on a page.\nUsed to match `<label>` with `<input>` elements for screenreaders.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"Optional styling for the container. Does not style the component.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the Checkbox.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"groupName":{"defaultValue":null,"description":"Name for the checkbox or radio button group. Only applicable for group\ncontexts, auto-populated by group components via Choice.\n@ignore","name":"groupName","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/radio.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLInputElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"default"}},"packages-form-textarea":{"id":"packages-form-textarea","name":"TextArea","path":"./__docs__/wonder-blocks-form/text-area.stories.tsx","stories":[{"id":"packages-form-textarea--default","name":"Default","snippet":"const Default = () => <TextArea value=\"\" onChange={() => {}} />;"},{"id":"packages-form-textarea--with-labeled-field","name":"With Labeled Field","snippet":"const WithLabeledField = function LabeledFieldStory(args) {\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [errorMessage, setErrorMessage] = React.useState<\n        string | null | undefined\n    >();\n    return (\n        <LabeledField\n            label=\"Label\"\n            field={\n                <TextArea\n                    {...args}\n                    value={value}\n                    onChange={setValue}\n                    onValidate={setErrorMessage}\n                    required={true}\n                />\n            }\n            description=\"Description\"\n            errorMessage={errorMessage}\n            contextLabel=\"required\"\n        />\n    );\n};","description":"The field can be used with the LabeledField component to provide a label, description, required indicator, and/or error message for the field. Using the field with the LabeledField component will ensure that the field has the relevant accessibility attributes set."},{"id":"packages-form-textarea--controlled","name":"Controlled","snippet":"const Controlled = (\n    storyArgs: PropsFor<typeof TextArea> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Area\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextArea\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};","description":"When setting a value and onChange props, you can use it as a controlled component."},{"id":"packages-form-textarea--with-value","name":"With Value","snippet":"const WithValue = (\n    storyArgs: PropsFor<typeof TextArea> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Area\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextArea\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};","description":"When the `value` prop is provided, the value is rendered in the text area."},{"id":"packages-form-textarea--auto-resize","name":"Auto Resize","snippet":"const AutoResize = () => {\n    return (\n        <View style={{gap: sizing.size_240, maxInlineSize: \"500px\"}}>\n            <ControlledTextArea\n                autoResize={false}\n                label=\"Auto resize is false\"\n                value={repeatText(reallyLongText, 3)} />\n            <ControlledTextArea\n                autoResize={true}\n                label=\"Auto resize is true\"\n                value={repeatText(longText, 2)} />\n            <ControlledTextArea\n                autoResize={true}\n                label=\"Auto resize is true with default maxRows\"\n                value={repeatText(reallyLongText, 3)} />\n            <ControlledTextArea\n                autoResize={true}\n                label=\"Auto resize is true with maxRows = 30\"\n                value={repeatText(reallyLongText, 3)}\n                maxRows={30} />\n            <ControlledTextArea\n                autoResize={true}\n                label=\"Auto resize is true with rows = 30\"\n                value={repeatText(reallyLongText, 3)}\n                rows={30} />\n        </View>\n    );\n};","description":"The `autoResize` prop can be used to automatically resize the textarea to fit the content. By default, `autoResize` is `false`. There is also a `maxRows` prop that can be used to set the maximum number of rows to show when `autoResize` is enabled. If the content exceeds the max number of rows, the textarea will become scrollable. By default, `maxRows` is 6. When `autoResize` is enabled, the `rows` prop is used as the starting and minimum height. If `rows > maxRows`, `rows` will be used for `maxRows`."},{"id":"packages-form-textarea--placeholder","name":"Placeholder","snippet":"const Placeholder = () => <TextArea placeholder=\"Placeholder text\" />;","description":"Use the `placeholder` prop to provide hints or examples of what to enter. - Placeholder text is not a replacement for labels. Assistive technologies, such as screen readers, do not treat placeholder text as labels. - Placeholder text is not displayed when there is a value. Critical details should not be in the placeholder text as they can be missed if the TextArea is fille already."},{"id":"packages-form-textarea--disabled","name":"Disabled","snippet":"const Disabled = () => <TextArea disabled />;","description":"If the disabled prop is set to `true`, TextArea will have disabled styling and will not be interactable. Note: The `disabled` prop sets the `aria-disabled` attribute to `true` instead of setting the `disabled` attribute. This is so that the component remains focusable while communicating to screen readers that it is disabled. This `disabled` prop will also set the `readonly` attribute to prevent typing in the field."},{"id":"packages-form-textarea--read-only","name":"Read Only","snippet":"const ReadOnly = () => <TextArea value=\"Readonly text\" readOnly />;","description":"A textarea with the prop `readOnly` set to `true` is not interactable. It looks the same as if it were not read only, and it can still receive focus, but the interaction point will not appear and the textarea will not change."},{"id":"packages-form-textarea--error","name":"Error","snippet":"const Error = (\n    storyArgs: PropsFor<typeof TextArea> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Area\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextArea\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};","description":"If the `error` prop is set to true, the TextArea will have error styling and `aria-invalid` set to `true`. This is useful for scenarios where we want to show an error on a specific field after a form is submitted (server validation). Note: The `required` and `validate` props can also put the TextArea in an error state."},{"id":"packages-form-textarea--error-from-validation","name":"Error From Validation","snippet":"const ErrorFromValidation = (\n    storyArgs: PropsFor<typeof TextArea> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Area\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextArea\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};","description":"If the textarea fails validation, `TextArea` will have error styling. This is useful for scenarios where we want to show errors while a user is filling out a form (client validation). Note that we will internally set the correct `aria-invalid` attribute to the `textarea` element: - `aria-invalid=\"true\"` if there is an error. - `aria-invalid=\"false\"` if there is no error."},{"id":"packages-form-textarea--error-from-prop-and-validation","name":"Error From Prop And Validation","snippet":"const ErrorFromPropAndValidation = (args: PropsFor<typeof TextArea>) => {\n    const [value, setValue] = React.useState(args.value || \"test@test,com\");\n    const [validationErrorMessage, setValidationErrorMessage] = React.useState<\n        string | null | undefined\n    >(null);\n    const [backendErrorMessage, setBackendErrorMessage] = React.useState<\n        string | null | undefined\n    >(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n        // Clear the backend error message on change\n        setBackendErrorMessage(null);\n    };\n\n    const errorMessage = validationErrorMessage || backendErrorMessage;\n\n    return (\n        <View style={{gap: sizing.size_120}}>\n            <LabeledField\n                label=\"Error from prop and validation\"\n                field={\n                    <TextArea\n                        {...args}\n                        value={value}\n                        onChange={handleChange}\n                        validate={validateEmail}\n                        onValidate={setValidationErrorMessage}\n                        error={!!errorMessage}\n                    />\n                }\n                errorMessage={errorMessage}\n            />\n            <Button\n                onClick={() => {\n                    if (value === \"test@test.com\") {\n                        setBackendErrorMessage(\n                            \"This email is already being used, please try another email.\",\n                        );\n                    } else {\n                        setBackendErrorMessage(null);\n                    }\n                }}\n            >\n                Submit\n            </Button>\n        </View>\n    );\n};","description":"This example shows how the `error` and `validate` props can both be used to put the field in an error state. This is useful for scenarios where we want to show error while a user is filling out a form (client validation) and after a form is submitted (server validation). In this example: 1. It starts with an invalid email. The error message shown is the message returned by the `validate` function prop 2. Once the email is fixed to `test@test.com`, the validation error message goes away since it is a valid email. 3. When the Submit button is pressed, another error message is shown (this simulates backend validation). 4. When you enter any other email address, the error message is cleared."},{"id":"packages-form-textarea--instant-validation","name":"Instant Validation","snippet":"const InstantValidation = () => {\n    return (\n        <View style={{gap: sizing.size_120}}>\n            <ControlledTextArea\n                validate={validateEmail}\n                label=\"Validation on mount if there is a value\"\n                value=\"invalid\" />\n            <ControlledTextArea\n                validate={validateEmail}\n                label=\"Error shown immediately (instantValidation: true, required:\n                false)\"\n                instantValidation={true} />\n            <ControlledTextArea\n                validate={validateEmail}\n                label=\"Error shown onBlur (instantValidation: false, required:\n                false)\"\n                instantValidation={false} />\n            <ControlledTextArea\n                validate={undefined}\n                value=\"T\"\n                label=\"Error shown immediately after clearing the value\n                (instantValidation: true, required: true)\"\n                instantValidation={true}\n                required=\"Required\" />\n            <ControlledTextArea\n                label=\"Error shown on blur if it is empty (instantValidation:\n                false, required: true)\"\n                validate={undefined}\n                instantValidation={false}\n                required=\"Required\" />\n        </View>\n    );\n};","description":"The `instantValidation` prop controls when validation is triggered. Validation is triggered if the `validate` or `required` props are set. It is preferred to set `instantValidation` to `false` so that the user isn't shown an error until they are done with a field. Note: if `instantValidation` is not explicitly set, it defaults to `true` since this is the current behaviour of existing usage. Validation on blur needs to be opted in. Validation is triggered: - On mount if the `value` prop is not empty - If `instantValidation` is `true`, validation occurs `onChange` (default) - If `instantValidation` is `false`, validation occurs `onBlur` When `required` is set to `true`: - If `instantValidation` is `true`, the required error message is shown after a value is cleared - If `instantValidation` is `false`, the required error message is shown whenever the user tabs away from the required field"},{"id":"packages-form-textarea--required","name":"Required","snippet":"const Required = (\n    storyArgs: PropsFor<typeof TextArea> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Area\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextArea\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};","description":"A required field will have error styling if the field is left blank. To observe this, type something into the field, backspace all the way, and then shift focus out of the field."},{"id":"packages-form-textarea--rows","name":"Rows","snippet":"const Rows = () => <TextArea rows={10} />;","description":"The `rows` prop can be used to set the number of rows to show by default."},{"id":"packages-form-textarea--auto-complete","name":"Auto Complete","snippet":"const AutoComplete = () => <TextArea autoComplete=\"on\" />;","description":"If the `autoComplete` prop is set, the browser can predict values for the textarea. For more details, see the [MDN docs for the textarea attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attributes)."},{"id":"packages-form-textarea--auto-focus","name":"Auto Focus","snippet":"const AutoFocus = () => {\n    const [value, setValue] = React.useState(\"\");\n    const [showDemo, setShowDemo] = React.useState(false);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    const handleShowDemo = () => {\n        setShowDemo(!showDemo);\n    };\n\n    const AutoFocusDemo = () => (\n        <View style={{flexDirection: \"row\"}}>\n            <Button onClick={() => {}}>Some other focusable element</Button>\n            <TextArea\n                value={value}\n                placeholder=\"Placeholder\"\n                autoFocus={true}\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n                style={{flexGrow: 1, marginInlineStart: sizing.size_120}}\n            />\n        </View>\n    );\n\n    return (\n        <View>\n            <BodyText weight=\"bold\" style={{marginBlockEnd: sizing.size_120}}>\n                Press the button to view the textarea with autofocus.\n            </BodyText>\n            <Button\n                onClick={handleShowDemo}\n                style={{width: 300, marginBlockEnd: sizing.size_240}}\n            >\n                Toggle autoFocus demo\n            </Button>\n            {showDemo && <AutoFocusDemo />}\n        </View>\n    );\n};","description":"When the `autoFocus` prop is set, the TextArea will be focused on page load. Try to avoid using this if possible as it is bad for accessibility."},{"id":"packages-form-textarea--spell-check-enabled","name":"Spell Check Enabled","snippet":"const SpellCheckEnabled = () => <TextArea\n    spellCheck\n    value=\"This exampull will be checkd fur spellung when you try to edit it.\" />;","description":"Spell check can be enabled for the TextArea. It will be checked for spelling when you try to edit it (ie. once the textarea is focused). **Note**: Consider disabling `spellCheck` for sensitive information (see [Security and Privacy concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck#security_and_privacy_concerns) for more details)"},{"id":"packages-form-textarea--spell-check-disabled","name":"Spell Check Disabled","snippet":"const SpellCheckDisabled = () => <TextArea\n    spellCheck={false}\n    value=\"This exampull will nut be checkd fur spellung when you try to edit it.\" />;"},{"id":"packages-form-textarea--wrap","name":"Wrap","snippet":"const Wrap = () => <TextArea\n    value=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\" />;","description":"The `wrap` prop configures the wrapping behaviour of the value for form submission."},{"id":"packages-form-textarea--min-max-length","name":"Min Max Length","snippet":"const MinMaxLength = () => <TextArea minLength={2} maxLength={4} value=\"Text\" />;","description":"The `minlength` and `maxlength` textarea attributes can be set using the `minLength` and `maxLength` props. Note: At this time, character length requirements are not displayed as part of the Text Area component. These props are only setting the underlying HTML attributes ([minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength) and [maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength))."},{"id":"packages-form-textarea--resize-type","name":"Resize Type","snippet":"const ResizeType = () => <TextArea />;","description":"The behaviour of the built-in resize control can be configured using the `resizeType` prop. Here are some tips: - The initial size of the TextArea can be configured using the `rows` prop. This size should be large enough for the expected user input. - Avoid having too small of a TextArea and having `resizeType=none`. This makes it difficult for users to scroll through their input."},{"id":"packages-form-textarea--custom-style","name":"Custom Style","snippet":"const CustomStyle = () => <TextArea style={styles.customField} value=\"Text\" />;","description":"Custom styling can be passed to the TextArea component using the `style` prop."},{"id":"packages-form-textarea--root-style","name":"Root Style","snippet":"const RootStyle = () => <TextArea />;","description":"Custom styling can be passed to the root node of the component using the `rootStyle` prop. If possible, try to use this prop carefully and use the `style` prop instead. Note: The `rootStyle` prop adds styling to the root node, which is a `div` that wraps the underlying `textarea` element, whereas the `style` prop adds styling to the `textarea` element directly. There is a `div` that wraps the textarea so that the layout of the component is still controlled by the TextArea component. This will be useful for future work where the TextArea component could include other elements such as a character counter. The following example shows that applying root styles can enable the textarea to fill in the remaining height:"},{"id":"packages-form-textarea--with-ref","name":"With Ref","snippet":"const WithRef = () => {\n    const [value, setValue] = React.useState(\"Text\");\n    const ref = React.useRef<HTMLTextAreaElement>(null);\n\n    const handleClick = () => {\n        ref.current?.focus();\n    };\n\n    return (\n        <View style={{alignItems: \"flex-start\"}}>\n            <TextArea value={value} onChange={setValue} ref={ref} />\n            <Strut size={24} />\n            <Button onClick={handleClick}>Focus using ref</Button>\n        </View>\n    );\n};","description":"A ref can be passed to the component to have access to the textarea element."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, Strut, TextArea } from \"@khanacademy/wonder-blocks-form\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A TextArea is an element used to accept text from the user. Make sure to provide a label for the field. This can be done by either: - (recommended) Using the **LabeledField** component to provide a label, description, and/or error message for the field - Using a `label` html tag with the `htmlFor` prop set to the unique id of the field - Using an `aria-label` attribute on the field - Using an `aria-labelledby` attribute on the field","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-form/src/index.ts","description":"A TextArea is an element used to accept text from the user.\n\nMake sure to provide a label for the field. This can be done by either:\n- (recommended) Using the **LabeledField** component to provide a label,\ndescription, and/or error message for the field\n- Using a `label` html tag with the `htmlFor` prop set to the unique id of\nthe field\n- Using an `aria-label` attribute on the field\n- Using an `aria-labelledby` attribute on the field","displayName":"TextArea","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"value":{"defaultValue":null,"description":"The text area value.","name":"value","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"onChange":{"defaultValue":null,"description":"Called when the value has changed.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(newValue: string) => unknown"}},"id":{"defaultValue":null,"description":"An optional unique identifier for the TextArea.\nIf no id is specified, a unique id will be auto-generated.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"Custom styles for the textarea element.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"rootStyle":{"defaultValue":null,"description":"Custom styles for the root node of the component.\nIf possible, try to use this prop carefully and use the `style` prop\ninstead.","name":"rootStyle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"placeholder":{"defaultValue":null,"description":"Provide hints or examples of what to enter.","name":"placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"disabled":{"defaultValue":null,"description":"Whether the text area should be disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"readOnly":{"defaultValue":null,"description":"Specifies if the text area is read-only.","name":"readOnly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"autoComplete":{"defaultValue":null,"description":"Specifies if the text area allows autocomplete.","name":"autoComplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"on\"","value":[{"value":"\"off\""},{"value":"\"on\""}]}},"name":{"defaultValue":null,"description":"The name for the text area control. This is submitted along with\nthe form data.","name":"name","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"CSS classes for the textarea element. It is recommended that the style prop is used instead where possible","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"autoFocus":{"defaultValue":null,"description":"Whether this textarea should autofocus on page load.","name":"autoFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"rows":{"defaultValue":null,"description":"The number of visible lines of text for the textarea. Defaults to 2.\n\nIf `autoResize` is `true`, `rows` is the starting number of rows and more\ncontent increases the number of rows, up until the `maxRows` prop value\nis reached. If `autoResize` is `false`, the textarea will be scrollable\nwith the number of rows set by the `rows` prop.","name":"rows","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"spellCheck":{"defaultValue":null,"description":"Determines if the textarea should be checked for spelling by the browser/OS.\nBy default, it is enabled. It will be checked for spelling when you try\nto edit it (ie. once the textarea is focused). For more details, see the\n[spellcheck attribute MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#spellcheck).\n**Note**: Consider disabling `spellCheck` for\n sensitive information (see [Security and Privacy concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck#security_and_privacy_concerns) for more details)","name":"spellCheck","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"wrap":{"defaultValue":null,"description":"How the control should wrap the value for form submission. If not provided,\n`soft` is the default behaviour. For more details, see the\n[wrap attribute MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#wrap)","name":"wrap","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"hard\" | \"soft\"","value":[{"value":"\"off\""},{"value":"\"hard\""},{"value":"\"soft\""}]}},"minLength":{"defaultValue":null,"description":"The minimum number of characters allowed in the textarea.","name":"minLength","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"maxLength":{"defaultValue":null,"description":"The maximum number of characters allowed in the textarea.","name":"maxLength","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"onClick":{"defaultValue":null,"description":"Called when the textarea is clicked.\n@param event The event from the click","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"MouseEventHandler<HTMLTextAreaElement>"}},"onKeyDown":{"defaultValue":null,"description":"Called when a key is pressed.\n@param event The keyboard event","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"KeyboardEventHandler<HTMLTextAreaElement>"}},"onKeyUp":{"defaultValue":null,"description":"Called when a key is released.\n@param event The keyboard event","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"KeyboardEventHandler<HTMLTextAreaElement>"}},"onFocus":{"defaultValue":null,"description":"Called when the element has been focused.\n@param event The focus event","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"FocusEventHandler<HTMLTextAreaElement>"}},"onBlur":{"defaultValue":null,"description":"Called when the element has been focused.\n@param event The blur event","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"FocusEventHandler<HTMLTextAreaElement>"}},"onPaste":{"defaultValue":null,"description":"Called when text is pasted into the element.\n@param event The paste event","name":"onPaste","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ClipboardEventHandler<HTMLTextAreaElement>"}},"validate":{"defaultValue":null,"description":"Provide a validation for the textarea value.\nReturn a string error message or null | void for a valid input.\n\nUse this for errors that are shown to the user while they are filling out\na form.","name":"validate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((value: string) => string | void | null)"}},"onValidate":{"defaultValue":null,"description":"Called right after the textarea is validated.","name":"onValidate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((errorMessage?: string | null) => unknown)"}},"instantValidation":{"defaultValue":null,"description":"If true, textarea is validated as the user types (onChange). If false,\nit is validated when the user's focus moves out of the field (onBlur).\nIt is preferred that instantValidation is set to `false`, however, it\ndefaults to `true` for backwards compatibility with existing implementations.","name":"instantValidation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"error":{"defaultValue":null,"description":"Whether the textarea is in an error state.\n\nUse this for errors that are triggered by something external to the\ncomponent (example: an error after form submission).","name":"error","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"required":{"defaultValue":null,"description":"Whether this textarea is required to continue, or the error message to\nrender if this textarea is left blank.\n\nThis can be a boolean or a string.\n\nString:\nPlease pass in a translated string to use as the error message that will\nrender if the user leaves this textarea blank. If this textarea is required,\nand a string is not passed in, a default untranslated string will render\nupon error.\nNote: The string will not be used if a `validate` prop is passed in.\n\nExample message: i18n._(\"A password is required to log in.\")\n\nBoolean:\nTrue/false indicating whether this textarea is required. Please do not pass\nin `true` if possible - pass in the error string instead.\nIf `true` is passed, and a `validate` prop is not passed, that means\nthere is no corresponding message and the default untranlsated message\nwill be used.","name":"required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string | boolean"}},"resizeType":{"defaultValue":null,"description":"@deprecated This prop is deprecated in favour of the `autoResize` prop.\nSpecifies the resizing behaviour for the textarea. Defaults to both\nbehaviour. For more details, see the [CSS resize property values MDN docs](https://developer.mozilla.org/en-US/docs/Web/CSS/resize#values)","name":"resizeType","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"both\" | \"horizontal\" | \"vertical\"","value":[{"value":"\"none\""},{"value":"\"both\""},{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"autoResize":{"defaultValue":null,"description":"Whether the textarea should automatically resize to fit the content.\nIf `true`, the textarea will resize to fit the content. If `false`,\nthe textarea will not change in size and the textarea will be scrollable if\ncontent exceeds the height of the textarea.\n\nDefaults to `false`.\n\nSee related `maxRows` prop for setting the max height for the textarea.","name":"autoResize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"maxRows":{"defaultValue":null,"description":"The maximum number of rows to show when `autoResize` is `true` to prevent\nthe textarea from becoming too tall. The textarea will become scrollable\nif content exceeds the max number of rows.\n\nDefaults to 6. If `rows` > `maxRows`, `rows` will be used for `maxRows`.","name":"maxRows","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-form/src/components/text-area.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLTextAreaElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"TextArea"}},"packages-form-textfield":{"id":"packages-form-textfield","name":"TextField","path":"./__docs__/wonder-blocks-form/text-field.stories.tsx","stories":[{"id":"packages-form-textfield--default","name":"Default","snippet":"const Default = () => <TextField\n    type=\"text\"\n    value=\"\"\n    disabled={false}\n    placeholder=\"\"\n    required={false}\n    testId=\"\"\n    readOnly={false}\n    autoComplete=\"off\"\n    validate={() => undefined}\n    onValidate={() => {}}\n    onChange={() => {}}\n    onKeyDown={() => {}}\n    onFocus={() => {}}\n    onBlur={() => {}}\n    aria-label=\"Default Text Field\" />;","description":"This example shows the default layout of the TextField component. NOTE: We recommend using the LabeledField component to provide a label, description, required indicator, and/or error message for the field. See the WithLabeledField story for an example."},{"id":"packages-form-textfield--with-labeled-field","name":"With Labeled Field","snippet":"const WithLabeledField = function LabeledFieldStory(args) {\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [errorMessage, setErrorMessage] = React.useState<\n        string | null | undefined\n    >();\n    return (\n        <LabeledField\n            label=\"Label\"\n            field={\n                <TextField\n                    {...args}\n                    value={value}\n                    onChange={setValue}\n                    onValidate={setErrorMessage}\n                    required={true}\n                />\n            }\n            description=\"Description\"\n            errorMessage={errorMessage}\n            contextLabel=\"required\"\n        />\n    );\n};","description":"The field can be used with the LabeledField component to provide a label, description, required indicator, and/or error message for the field. Using the field with the LabeledField component will ensure that the field has the relevant accessibility attributes set."},{"id":"packages-form-textfield--text","name":"Text","snippet":"const Text = function Render() {\n    const [value, setValue] = React.useState(\"\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <TextField\n            id=\"tf-1\"\n            type=\"text\"\n            value={value}\n            placeholder=\"Text\"\n            onChange={handleChange}\n            onKeyDown={handleKeyDown}\n        />\n    );\n};","description":"An input field with type `text` takes all kinds of characters."},{"id":"packages-form-textfield--required","name":"Required","snippet":"const Required = (\n    storyArgs: PropsFor<typeof TextField> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Field\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextField\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};","description":"A required field will have error styling if the field is left blank. To observe this, type something into the field, backspace all the way, and then shift focus out of the field."},{"id":"packages-form-textfield--number","name":"Number","snippet":"const Number = function Render() {\n    const [value, setValue] = React.useState(\"1234\");\n    const [value2, setValue2] = React.useState(\"12\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <View>\n            <TextField\n                id=\"tf-3\"\n                type=\"number\"\n                value={value}\n                placeholder=\"Number\"\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n            />\n            <Strut size={12} />\n            <BodyText>\n                The following text field has a min of 0, a max of 15, and a\n                step of 3\n            </BodyText>\n            <TextField\n                id=\"tf-3a\"\n                type=\"number\"\n                value={value2}\n                placeholder=\"Number\"\n                onChange={setValue2}\n                onKeyDown={handleKeyDown}\n                min={0}\n                max={15}\n                step={3}\n            />\n        </View>\n    );\n};","description":"An input field with type `number` will only take numeric characters as input. Number inputs have a few props that other input types don't have - `min`, `max`, and `step`. In this example, the first number input has no restrictions, while the second number input has a minimum value of 0, a maximum value of 15, and a step of 3. Observe that using the arrow keys will automatically snap to the step, and stop at the min and max values."},{"id":"packages-form-textfield--whole-number","name":"Whole Number","snippet":"const WholeNumber = function Render() {\n    const [value, setValue] = React.useState(\"1234\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <View>\n            <TextField\n                id=\"tf-3\"\n                type=\"whole-number\"\n                value={value}\n                placeholder=\"Whole Number\"\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n            />\n        </View>\n    );\n};","description":"An input field with type `whole-number` is identical to a number input, but it will only take positive whole number characters as input."},{"id":"packages-form-textfield--password","name":"Password","snippet":"const Password = function Render() {\n    const [value, setValue] = React.useState(\"Password123\");\n    const [errorMessage, setErrorMessage] = React.useState<any>();\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const validate = (value: string) => {\n        if (value.length < 8) {\n            return \"Password must be at least 8 characters long\";\n        }\n        if (!/\\d/.test(value)) {\n            return \"Password must contain a numeric value\";\n        }\n    };\n\n    const handleValidate = (errorMessage?: string | null) => {\n        setErrorMessage(errorMessage);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <LabeledField\n            label=\"Password\"\n            errorMessage={errorMessage}\n            field={\n                <TextField\n                    id=\"tf-4\"\n                    type=\"password\"\n                    value={value}\n                    placeholder=\"Password\"\n                    validate={validate}\n                    onValidate={handleValidate}\n                    onChange={handleChange}\n                    onKeyDown={handleKeyDown}\n                />\n            }\n        />\n    );\n};","description":"An input field with type `password` will obscure the input value. It also often contains validation. In this example, the password must be over 8 characters long and must contain a numeric value."},{"id":"packages-form-textfield--email","name":"Email","snippet":"const Email = function Render() {\n    const [value, setValue] = React.useState(\"khan@khanacademy.org\");\n    const [errorMessage, setErrorMessage] = React.useState<any>();\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleValidate = (errorMessage?: string | null) => {\n        setErrorMessage(errorMessage);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <LabeledField\n            label=\"Email\"\n            errorMessage={errorMessage}\n            field={\n                <TextField\n                    id=\"tf-5\"\n                    type=\"email\"\n                    value={value}\n                    placeholder=\"Email\"\n                    validate={validateEmail}\n                    onValidate={handleValidate}\n                    onChange={handleChange}\n                    onKeyDown={handleKeyDown}\n                />\n            }\n        />\n    );\n};","description":"An input field with type `email` will automatically validate an input on submit to ensure it's either formatted properly or blank. `TextField` will run validation on change if the `validate` prop is passed in, as in this example."},{"id":"packages-form-textfield--telephone","name":"Telephone","snippet":"const Telephone = function Render() {\n    const [value, setValue] = React.useState(\"123-456-7890\");\n    const [errorMessage, setErrorMessage] = React.useState<any>();\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleValidate = (errorMessage?: string | null) => {\n        setErrorMessage(errorMessage);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <LabeledField\n            label=\"Telephone\"\n            errorMessage={errorMessage}\n            field={\n                <TextField\n                    id=\"tf-6\"\n                    type=\"tel\"\n                    value={value}\n                    placeholder=\"Telephone\"\n                    validate={validatePhoneNumber}\n                    onValidate={handleValidate}\n                    onChange={handleChange}\n                    onKeyDown={handleKeyDown}\n                />\n            }\n        />\n    );\n};","description":"An input field with type `tel` will NOT validate an input on submit by default as telephone numbers can vary considerably. `TextField` will run validation on blur if the `validate` prop is passed in, as in this example."},{"id":"packages-form-textfield--error","name":"Error","snippet":"const Error = (\n    storyArgs: PropsFor<typeof TextField> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Field\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextField\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};","description":"If the `error` prop is set to true, the TextField will have error styling and `aria-invalid` set to `true`. This is useful for scenarios where we want to show an error on a specific field after a form is submitted (server validation). Note: The `required` and `validate` props can also put the TextField in an error state."},{"id":"packages-form-textfield--error-from-validation","name":"Error From Validation","snippet":"const ErrorFromValidation = (\n    storyArgs: PropsFor<typeof TextField> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Field\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextField\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};","description":"If an input value fails validation, `TextField` will have error styling. This is useful for scenarios where we want to show errors while a user is filling out a form (client validation). Note that we will internally set the correct `aria-invalid` attribute to the `input` element: - aria-invalid=\"true\" if there is an error. - aria-invalid=\"false\" if there is no error."},{"id":"packages-form-textfield--error-from-prop-and-validation","name":"Error From Prop And Validation","snippet":"const ErrorFromPropAndValidation = (\n    args: PropsFor<typeof TextField>,\n) => {\n    const [value, setValue] = React.useState(args.value || \"test@test,com\");\n    const [validationErrorMessage, setValidationErrorMessage] = React.useState<\n        string | null | undefined\n    >(null);\n    const [backendErrorMessage, setBackendErrorMessage] = React.useState<\n        string | null | undefined\n    >(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n        // Clear the backend error message on change\n        setBackendErrorMessage(null);\n    };\n\n    const errorMessage = validationErrorMessage || backendErrorMessage;\n\n    return (\n        <View style={{gap: sizing.size_160}}>\n            <LabeledField\n                label=\"Error state from prop and validation\"\n                errorMessage={errorMessage}\n                field={\n                    <TextField\n                        {...args}\n                        value={value}\n                        onChange={handleChange}\n                        validate={validateEmail}\n                        onValidate={setValidationErrorMessage}\n                        error={!!errorMessage}\n                    />\n                }\n            />\n            <Button\n                onClick={() => {\n                    if (value === \"test@test.com\") {\n                        setBackendErrorMessage(\n                            \"This email is already being used, please try another email.\",\n                        );\n                    } else {\n                        setBackendErrorMessage(null);\n                    }\n                }}\n            >\n                Submit\n            </Button>\n        </View>\n    );\n};","description":"This example shows how the `error` and `validate` props can both be used to put the field in an error state. This is useful for scenarios where we want to show errors while a user is filling out a form (client validation) and after a form is submitted (server validation). In this example: 1. It starts with an invalid email. The error message shown is the message returned by the `validate` function prop 2. Once the email is fixed to `test@test.com`, the validation error message goes away since it is a valid email. 3. When the Submit button is pressed, another error message is shown (this simulates backend validation). 4. When you enter any other email address, the error message is cleared."},{"id":"packages-form-textfield--instant-validation","name":"Instant Validation","snippet":"const InstantValidation = () => {\n    return (\n        <View style={{gap: sizing.size_120}}>\n            <ControlledTextField\n                validate={validateEmail}\n                label=\"Validation on mount if there is a value\"\n                value=\"invalid\" />\n            <ControlledTextField\n                validate={validateEmail}\n                label=\"Error shown immediately (instantValidation: true, required:\n                false)\"\n                instantValidation={true} />\n            <ControlledTextField\n                validate={validateEmail}\n                label=\"Error shown onBlur (instantValidation: false, required:\n                false)\"\n                instantValidation={false} />\n            <ControlledTextField\n                label=\"Error shown immediately after clearing the value\n                (instantValidation: true, required: true)\"\n                validate={undefined}\n                value=\"T\"\n                id=\"instant-validation-true-required\"\n                instantValidation={true}\n                required=\"Required\" />\n            <ControlledTextField\n                label=\"Error shown on blur if it is empty (instantValidation:\n                false, required: true)\"\n                validate={undefined}\n                instantValidation={false}\n                required=\"Required\" />\n        </View>\n    );\n};","description":"The `instantValidation` prop controls when validation is triggered. Validation is triggered if the `validate` or `required` props are set. It is preferred to set `instantValidation` to `false` so that the user isn't shown an error until they are done with a field. Note: if `instantValidation` is not explicitly set, it defaults to `true` since this is the current behaviour of existing usage. Validation on blur needs to be opted in. Validation is triggered: - On mount if the `value` prop is not empty - If `instantValidation` is `true`, validation occurs `onChange` (default) - If `instantValidation` is `false`, validation occurs `onBlur` When `required` is set to `true`: - If `instantValidation` is `true`, the required error message is shown after a value is cleared - If `instantValidation` is `false`, the required error message is shown whenever the user tabs away from the required field"},{"id":"packages-form-textfield--disabled","name":"Disabled","snippet":"const Disabled = () => <TextField\n    id=\"tf-8\"\n    value=\"\"\n    placeholder=\"This field is disabled.\"\n    onChange={() => {}}\n    disabled />;","description":"If the disabled prop is set to `true`, TextField will have disabled styling and will not be interactable. Note: The `disabled` prop sets the `aria-disabled` attribute to `true` instead of setting the `disabled` attribute. This is so that the component remains focusable while communicating to screen readers that it is disabled. This `disabled` prop will also set the `readonly` attribute to prevent typing in the field."},{"id":"packages-form-textfield--custom-style","name":"Custom Style","snippet":"const CustomStyle = function Render() {\n    const [value, setValue] = React.useState(\"\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <TextField\n            id=\"tf-10\"\n            style={styles.customField}\n            type=\"text\"\n            value={value}\n            placeholder=\"Text\"\n            onChange={handleChange}\n            onKeyDown={handleKeyDown}\n        />\n    );\n};","description":"TextField can take in custom styles that override the default styles. This example has custom styles for the `backgroundColor`, `color`, `border`, `maxWidth`, and placeholder `color` properties."},{"id":"packages-form-textfield--ref","name":"Ref","snippet":"const Ref = function Render() {\n    const [value, setValue] = React.useState(\"\");\n    const inputRef: React.RefObject<HTMLInputElement> = React.createRef();\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    const handleSubmit = () => {\n        if (inputRef.current) {\n            inputRef.current.focus();\n        }\n    };\n\n    return (\n        <View>\n            <TextField\n                id=\"tf-11\"\n                type=\"text\"\n                value={value}\n                placeholder=\"Text\"\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n                ref={inputRef}\n            />\n            <Strut size={16} />\n            <Button style={styles.button} onClick={handleSubmit}>\n                Focus Input\n            </Button>\n        </View>\n    );\n};","description":"If you need to save a reference to the input field, you can do so by using the `ref` prop. In this example, we want the input field to receive focus when the button is pressed. We can do this by creating a React ref of type `HTMLInputElement` and passing it into `TextField`'s `ref` prop. Now we can use the ref variable in the `handleSubmit` function to shift focus to the field."},{"id":"packages-form-textfield--read-only","name":"Read Only","snippet":"const ReadOnly = function Render() {\n    const [value, setValue] = React.useState(\"Khan\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <TextField\n            id=\"tf-12\"\n            type=\"text\"\n            value={value}\n            placeholder=\"Text\"\n            onChange={handleChange}\n            onKeyDown={handleKeyDown}\n            readOnly={true}\n        />\n    );\n};","description":"An input field with the prop `readOnly` set to true is not interactable. It looks the same as if it were not read only, and it can still receive focus, but the interaction point will not appear and the input will not change."},{"id":"packages-form-textfield--with-autofocus","name":"With Autofocus","snippet":"const WithAutofocus = function Render() {\n    const [value, setValue] = React.useState(\"\");\n    const [showDemo, setShowDemo] = React.useState(false);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    const handleShowDemo = () => {\n        setShowDemo(!showDemo);\n    };\n\n    const AutoFocusDemo = () => (\n        <View style={{flexDirection: \"row\"}}>\n            <Button onClick={() => {}}>Some other focusable element</Button>\n            <TextField\n                id=\"tf-13\"\n                value={value}\n                placeholder=\"Placeholder\"\n                autoFocus={true}\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n                style={{flexGrow: 1, marginInlineStart: sizing.size_120}}\n            />\n        </View>\n    );\n\n    return (\n        <View>\n            <BodyText\n                weight=\"bold\"\n                style={{marginBlockEnd: sizing.size_120}}\n            >\n                Press the button to view the text field with autofocus.\n            </BodyText>\n            <Button\n                onClick={handleShowDemo}\n                style={{width: 300, marginBlockEnd: sizing.size_240}}\n            >\n                Toggle autoFocus demo\n            </Button>\n            {showDemo && <AutoFocusDemo />}\n        </View>\n    );\n};","description":"TextField takes an `autoFocus` prop, which makes it autofocus on page load. Try to avoid using this if possible as it is bad for accessibility. Press the button to view this example. Notice that the text field automatically receives focus. Upon pressing the botton, try typing and notice that the text appears directly in the text field. There is another focusable element present to demonstrate that focus skips that element and goes straight to the text field."},{"id":"packages-form-textfield--auto-complete","name":"Auto Complete","snippet":"const AutoComplete = function Render() {\n    const [value, setValue] = React.useState(\"\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <form>\n            <TextField\n                id=\"tf-14\"\n                type=\"text\"\n                value={value}\n                placeholder=\"Name\"\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n                style={styles.fieldWithButton}\n                autoComplete=\"name\"\n            />\n            <Button type=\"submit\">Submit</Button>\n        </form>\n    );\n};","description":"If the `autoComplete` prop is set, the browser can predict values for the input. When the user starts to type in the field, a list of options will show up based on values that may have been submitted at a previous time. In this example, the text field provides options after you input a value, press the submit button, and refresh the page."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, Strut, TextField } from \"@khanacademy/wonder-blocks-form\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"TextField\" component.\n  28 |  * - Using an `aria-labelledby` attribute on the field\n  29 |  */\n> 30 | export default {\n     | ^\n  31 |     title: \"Packages / Form / TextField\",\n  32 |     component: TextField,\n  33 |     parameters: {\n\n./__docs__/wonder-blocks-form/text-field.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {PropsFor, View} from \"@khanacademy/wonder-blocks-core\";\nimport {Strut} from \"@khanacademy/wonder-blocks-layout\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {TextField} from \"@khanacademy/wonder-blocks-form\";\nimport {LabeledField} from \"@khanacademy/wonder-blocks-labeled-field\";\nimport packageConfig from \"../../packages/wonder-blocks-form/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport TextFieldArgTypes from \"./text-field.argtypes\";\nimport {validateEmail, validatePhoneNumber} from \"./form-utilities\";\n\n/**\n * A TextField is an element used to accept a single line of text from the user.\n *\n * Make sure to provide a label for the field. This can be done by either:\n * - (recommended) Using the **LabeledField** component to provide a label,\n * description, and/or error message for the field\n * - Using a `label` html tag with the `htmlFor` prop set to the unique id of\n * the field\n * - Using an `aria-label` attribute on the field\n * - Using an `aria-labelledby` attribute on the field\n */\nexport default {\n    title: \"Packages / Form / TextField\",\n    component: TextField,\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        chromatic: {\n            // Disabling snapshots because this is covered by the testing snapshots\n            disableSnapshot: true,\n        },\n    },\n    argTypes: TextFieldArgTypes,\n} as Meta<typeof TextField>;\n\ntype StoryComponentType = StoryObj<typeof TextField>;\ntype ControlledStoryComponentType = StoryObj<typeof ControlledTextField>;\n\n/**\n * This example shows the default layout of the TextField component.\n *\n * NOTE: We recommend using the LabeledField component to provide a label,\n * description, required indicator, and/or error message for the field.\n * See the WithLabeledField story for an example.\n */\nexport const Default: StoryComponentType = {\n    args: {\n        type: \"text\",\n        value: \"\",\n        disabled: false,\n        placeholder: \"\",\n        required: false,\n        testId: \"\",\n        readOnly: false,\n        autoComplete: \"off\",\n        validate: () => undefined,\n        onValidate: () => {},\n        onChange: () => {},\n        onKeyDown: () => {},\n        onFocus: () => {},\n        onBlur: () => {},\n        // NOTE: This is added to preserve the default layout of this component\n        // and prevent a11y errors, but we want to avoid adding aria-labels to\n        // this component and use LabeledField instead.\n        \"aria-label\": \"Default Text Field\",\n    },\n};\n\n/**\n * The field can be used with the LabeledField component to provide a label,\n * description, required indicator, and/or error message for the field.\n *\n * Using the field with the LabeledField component will ensure that the field\n * has the relevant accessibility attributes set.\n */\nexport const WithLabeledField: StoryComponentType = {\n    render: function LabeledFieldStory(args) {\n        const [value, setValue] = React.useState(args.value || \"\");\n        const [errorMessage, setErrorMessage] = React.useState<\n            string | null | undefined\n        >();\n        return (\n            <LabeledField\n                label=\"Label\"\n                field={\n                    <TextField\n                        {...args}\n                        value={value}\n                        onChange={setValue}\n                        onValidate={setErrorMessage}\n                        required={true}\n                    />\n                }\n                description=\"Description\"\n                errorMessage={errorMessage}\n                contextLabel=\"required\"\n            />\n        );\n    },\n};\n\n/**\n * An input field with type `text` takes all kinds of characters.\n */\nexport const Text: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"\");\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <TextField\n                id=\"tf-1\"\n                type=\"text\"\n                value={value}\n                placeholder=\"Text\"\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n            />\n        );\n    },\n};\n\nconst ControlledTextField = (\n    storyArgs: PropsFor<typeof TextField> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [error, setError] = React.useState<string | null | undefined>(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    return (\n        <LabeledField\n            label={label || \"Text Field\"}\n            errorMessage={error || (args.error && \"Error from error prop\")}\n            field={\n                <TextField\n                    {...args}\n                    value={value}\n                    onChange={handleChange}\n                    onValidate={setError}\n                />\n            }\n        />\n    );\n};\n\n/**\n * A required field will have error styling if the field is left blank. To\n * observe this, type something into the field, backspace all the way,\n * and then shift focus out of the field.\n */\nexport const Required: StoryComponentType = {\n    args: {\n        required: true,\n    },\n    render: ControlledTextField,\n};\n\n/**\n * An input field with type `number` will only take numeric characters as input.\n * Number inputs have a few props that other input types don't have - `min`,\n * `max`, and `step`. In this example, the first number input has no\n * restrictions, while the second number input has a minimum value of 0, a\n * maximum value of 15, and a step of 3. Observe that using the arrow keys will\n * automatically snap to the step, and stop at the min and max values.\n */\nexport const Number: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"1234\");\n        const [value2, setValue2] = React.useState(\"12\");\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <View>\n                <TextField\n                    id=\"tf-3\"\n                    type=\"number\"\n                    value={value}\n                    placeholder=\"Number\"\n                    onChange={handleChange}\n                    onKeyDown={handleKeyDown}\n                />\n                <Strut size={12} />\n                <BodyText>\n                    The following text field has a min of 0, a max of 15, and a\n                    step of 3\n                </BodyText>\n                <TextField\n                    id=\"tf-3a\"\n                    type=\"number\"\n                    value={value2}\n                    placeholder=\"Number\"\n                    onChange={setValue2}\n                    onKeyDown={handleKeyDown}\n                    min={0}\n                    max={15}\n                    step={3}\n                />\n            </View>\n        );\n    },\n};\n\n/**\n * An input field with type `whole-number` is identical to a number input, but it\n * will only take positive whole number characters as input.\n */\nexport const WholeNumber: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"1234\");\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <View>\n                <TextField\n                    id=\"tf-3\"\n                    type=\"whole-number\"\n                    value={value}\n                    placeholder=\"Whole Number\"\n                    onChange={handleChange}\n                    onKeyDown={handleKeyDown}\n                />\n            </View>\n        );\n    },\n};\n\n/**\n * An input field with type `password` will obscure the input value. It also\n * often contains validation. In this example, the password must be over 8\n * characters long and must contain a numeric value.\n */\nexport const Password: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"Password123\");\n        const [errorMessage, setErrorMessage] = React.useState<any>();\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const validate = (value: string) => {\n            if (value.length < 8) {\n                return \"Password must be at least 8 characters long\";\n            }\n            if (!/\\d/.test(value)) {\n                return \"Password must contain a numeric value\";\n            }\n        };\n\n        const handleValidate = (errorMessage?: string | null) => {\n            setErrorMessage(errorMessage);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <LabeledField\n                label=\"Password\"\n                errorMessage={errorMessage}\n                field={\n                    <TextField\n                        id=\"tf-4\"\n                        type=\"password\"\n                        value={value}\n                        placeholder=\"Password\"\n                        validate={validate}\n                        onValidate={handleValidate}\n                        onChange={handleChange}\n                        onKeyDown={handleKeyDown}\n                    />\n                }\n            />\n        );\n    },\n};\n\n/**\n * An input field with type `email` will automatically validate an input on\n * submit to ensure it's either formatted properly or blank. `TextField` will\n * run validation on change if the `validate` prop is passed in, as in this\n * example.\n */\nexport const Email: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"khan@khanacademy.org\");\n        const [errorMessage, setErrorMessage] = React.useState<any>();\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleValidate = (errorMessage?: string | null) => {\n            setErrorMessage(errorMessage);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <LabeledField\n                label=\"Email\"\n                errorMessage={errorMessage}\n                field={\n                    <TextField\n                        id=\"tf-5\"\n                        type=\"email\"\n                        value={value}\n                        placeholder=\"Email\"\n                        validate={validateEmail}\n                        onValidate={handleValidate}\n                        onChange={handleChange}\n                        onKeyDown={handleKeyDown}\n                    />\n                }\n            />\n        );\n    },\n};\n\n/**\n * An input field with type `tel` will NOT validate an input on submit by\n * default as telephone numbers can vary considerably. `TextField` will run\n * validation on blur if the `validate` prop is passed in, as in this example.\n */\nexport const Telephone: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"123-456-7890\");\n        const [errorMessage, setErrorMessage] = React.useState<any>();\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleValidate = (errorMessage?: string | null) => {\n            setErrorMessage(errorMessage);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <LabeledField\n                label=\"Telephone\"\n                errorMessage={errorMessage}\n                field={\n                    <TextField\n                        id=\"tf-6\"\n                        type=\"tel\"\n                        value={value}\n                        placeholder=\"Telephone\"\n                        validate={validatePhoneNumber}\n                        onValidate={handleValidate}\n                        onChange={handleChange}\n                        onKeyDown={handleKeyDown}\n                    />\n                }\n            />\n        );\n    },\n};\n\n/**\n * If the `error` prop is set to true, the TextField will have error styling and\n * `aria-invalid` set to `true`.\n *\n * This is useful for scenarios where we want to show an error on a\n * specific field after a form is submitted (server validation).\n *\n * Note: The `required` and `validate` props can also put the TextField in an\n * error state.\n */\nexport const Error: ControlledStoryComponentType = {\n    render: ControlledTextField,\n    args: {\n        error: true,\n        validate: undefined,\n        value: \"khan\",\n        label: \"Error state using error prop\",\n    },\n};\n\n/**\n * If an input value fails validation, `TextField` will have error styling.\n *\n * This is useful for scenarios where we want to show errors while a\n * user is filling out a form (client validation).\n *\n * Note that we will internally set the correct `aria-invalid` attribute to the\n * `input` element:\n * - aria-invalid=\"true\" if there is an error.\n * - aria-invalid=\"false\" if there is no error.\n */\nexport const ErrorFromValidation: ControlledStoryComponentType = {\n    render: ControlledTextField,\n    args: {\n        label: \"Error state from validation\",\n        validate: validateEmail,\n        value: \"khan\",\n    },\n};\n\n/**\n * This example shows how the `error` and `validate` props can both be used to\n * put the field in an error state. This is useful for scenarios where we want\n * to show errors while a user is filling out a form (client validation)\n * and after a form is submitted (server validation).\n *\n * In this example:\n * 1. It starts with an invalid email. The error message shown is the message returned\n * by the `validate` function prop\n * 2. Once the email is fixed to `test@test.com`, the validation error message\n * goes away since it is a valid email.\n * 3. When the Submit button is pressed, another error message is shown (this\n * simulates backend validation).\n * 4. When you enter any other email address, the error message is\n * cleared.\n */\nexport const ErrorFromPropAndValidation = (\n    args: PropsFor<typeof TextField>,\n) => {\n    const [value, setValue] = React.useState(args.value || \"test@test,com\");\n    const [validationErrorMessage, setValidationErrorMessage] = React.useState<\n        string | null | undefined\n    >(null);\n    const [backendErrorMessage, setBackendErrorMessage] = React.useState<\n        string | null | undefined\n    >(null);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n        // Clear the backend error message on change\n        setBackendErrorMessage(null);\n    };\n\n    const errorMessage = validationErrorMessage || backendErrorMessage;\n\n    return (\n        <View style={{gap: sizing.size_160}}>\n            <LabeledField\n                label=\"Error state from prop and validation\"\n                errorMessage={errorMessage}\n                field={\n                    <TextField\n                        {...args}\n                        value={value}\n                        onChange={handleChange}\n                        validate={validateEmail}\n                        onValidate={setValidationErrorMessage}\n                        error={!!errorMessage}\n                    />\n                }\n            />\n            <Button\n                onClick={() => {\n                    if (value === \"test@test.com\") {\n                        setBackendErrorMessage(\n                            \"This email is already being used, please try another email.\",\n                        );\n                    } else {\n                        setBackendErrorMessage(null);\n                    }\n                }}\n            >\n                Submit\n            </Button>\n        </View>\n    );\n};\n\n/**\n * The `instantValidation` prop controls when validation is triggered. Validation\n * is triggered if the `validate` or `required` props are set.\n *\n * It is preferred to set `instantValidation` to `false` so that the user isn't\n * shown an error until they are done with a field. Note: if `instantValidation`\n * is not explicitly set, it defaults to `true` since this is the current\n * behaviour of existing usage. Validation on blur needs to be opted in.\n *\n * Validation is triggered:\n * - On mount if the `value` prop is not empty\n * - If `instantValidation` is `true`, validation occurs `onChange` (default)\n * - If `instantValidation` is `false`, validation occurs `onBlur`\n *\n * When `required` is set to `true`:\n * - If `instantValidation` is `true`, the required error message is shown after\n * a value is cleared\n * - If `instantValidation` is `false`, the required error message is shown\n * whenever the user tabs away from the required field\n */\nexport const InstantValidation: StoryComponentType = {\n    args: {\n        validate: validateEmail,\n    },\n    render: (args) => {\n        return (\n            <View style={{gap: sizing.size_120}}>\n                <ControlledTextField\n                    {...args}\n                    label=\"Validation on mount if there is a value\"\n                    value=\"invalid\"\n                />\n                <ControlledTextField\n                    {...args}\n                    label=\"Error shown immediately (instantValidation: true, required:\n                    false)\"\n                    instantValidation={true}\n                />\n                <ControlledTextField\n                    {...args}\n                    label=\"Error shown onBlur (instantValidation: false, required:\n                    false)\"\n                    instantValidation={false}\n                />\n                <ControlledTextField\n                    {...args}\n                    label=\"Error shown immediately after clearing the value\n                    (instantValidation: true, required: true)\"\n                    validate={undefined}\n                    value=\"T\"\n                    id=\"instant-validation-true-required\"\n                    instantValidation={true}\n                    required=\"Required\"\n                />\n                <ControlledTextField\n                    {...args}\n                    label=\"Error shown on blur if it is empty (instantValidation:\n                    false, required: true)\"\n                    validate={undefined}\n                    instantValidation={false}\n                    required=\"Required\"\n                />\n            </View>\n        );\n    },\n};\n\n/**\n * If the disabled prop is set to `true`, TextField will have disabled styling\n * and will not be interactable.\n *\n * Note: The `disabled` prop sets the `aria-disabled` attribute to `true`\n * instead of setting the `disabled` attribute. This is so that the component\n * remains focusable while communicating to screen readers that it is disabled.\n * This `disabled` prop will also set the `readonly` attribute to prevent\n * typing in the field.\n */\nexport const Disabled: StoryComponentType = {\n    args: {\n        id: \"tf-8\",\n        value: \"\",\n        placeholder: \"This field is disabled.\",\n        onChange: () => {},\n        disabled: true,\n    },\n};\n\n/**\n * TextField can take in custom styles that override the default styles. This\n * example has custom styles for the `backgroundColor`, `color`, `border`,\n * `maxWidth`, and placeholder `color` properties.\n */\nexport const CustomStyle: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"\");\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <TextField\n                id=\"tf-10\"\n                style={styles.customField}\n                type=\"text\"\n                value={value}\n                placeholder=\"Text\"\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n            />\n        );\n    },\n};\n\n/**\n * If you need to save a reference to the input field, you can do so by using\n * the `ref` prop. In this example, we want the input field to receive focus\n * when the button is pressed. We can do this by creating a React ref of type\n * `HTMLInputElement` and passing it into `TextField`'s `ref` prop. Now we can\n * use the ref variable in the `handleSubmit` function to shift focus to the\n * field.\n */\nexport const Ref: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"\");\n        const inputRef: React.RefObject<HTMLInputElement> = React.createRef();\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        const handleSubmit = () => {\n            if (inputRef.current) {\n                inputRef.current.focus();\n            }\n        };\n\n        return (\n            <View>\n                <TextField\n                    id=\"tf-11\"\n                    type=\"text\"\n                    value={value}\n                    placeholder=\"Text\"\n                    onChange={handleChange}\n                    onKeyDown={handleKeyDown}\n                    ref={inputRef}\n                />\n                <Strut size={16} />\n                <Button style={styles.button} onClick={handleSubmit}>\n                    Focus Input\n                </Button>\n            </View>\n        );\n    },\n};\n\n/**\n * An input field with the prop `readOnly` set to true is not interactable. It\n * looks the same as if it were not read only, and it can still receive focus,\n * but the interaction point will not appear and the input will not change.\n */\nexport const ReadOnly: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"Khan\");\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <TextField\n                id=\"tf-12\"\n                type=\"text\"\n                value={value}\n                placeholder=\"Text\"\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n                readOnly={true}\n            />\n        );\n    },\n};\n\n/**\n * TextField takes an `autoFocus` prop, which makes it autofocus on page load.\n * Try to avoid using this if possible as it is bad for accessibility.\n *\n * Press the button to view this example. Notice that the text field\n * automatically receives focus. Upon pressing the botton, try typing and notice\n * that the text appears directly in the text field. There is another focusable\n * element present to demonstrate that focus skips that element and goes\n * straight to the text field.\n */\nexport const WithAutofocus: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"\");\n        const [showDemo, setShowDemo] = React.useState(false);\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        const handleShowDemo = () => {\n            setShowDemo(!showDemo);\n        };\n\n        const AutoFocusDemo = () => (\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => {}}>Some other focusable element</Button>\n                <TextField\n                    id=\"tf-13\"\n                    value={value}\n                    placeholder=\"Placeholder\"\n                    autoFocus={true}\n                    onChange={handleChange}\n                    onKeyDown={handleKeyDown}\n                    style={{flexGrow: 1, marginInlineStart: sizing.size_120}}\n                />\n            </View>\n        );\n\n        return (\n            <View>\n                <BodyText\n                    weight=\"bold\"\n                    style={{marginBlockEnd: sizing.size_120}}\n                >\n                    Press the button to view the text field with autofocus.\n                </BodyText>\n                <Button\n                    onClick={handleShowDemo}\n                    style={{width: 300, marginBlockEnd: sizing.size_240}}\n                >\n                    Toggle autoFocus demo\n                </Button>\n                {showDemo && <AutoFocusDemo />}\n            </View>\n        );\n    },\n};\n\n/**\n * If the `autoComplete` prop is set, the browser can predict values for the\n * input. When the user starts to type in the field, a list of options will show\n * up based on values that may have been submitted at a previous time. In this\n * example, the text field provides options after you input a value, press the\n * submit button, and refresh the page.\n */\nexport const AutoComplete: StoryComponentType = {\n    render: function Render() {\n        const [value, setValue] = React.useState(\"\");\n\n        const handleChange = (newValue: string) => {\n            setValue(newValue);\n        };\n\n        const handleKeyDown = (\n            event: React.KeyboardEvent<HTMLInputElement>,\n        ) => {\n            if (event.key === \"Enter\") {\n                event.currentTarget.blur();\n            }\n        };\n\n        return (\n            <form>\n                <TextField\n                    id=\"tf-14\"\n                    type=\"text\"\n                    value={value}\n                    placeholder=\"Name\"\n                    onChange={handleChange}\n                    onKeyDown={handleKeyDown}\n                    style={styles.fieldWithButton}\n                    autoComplete=\"name\"\n                />\n                <Button type=\"submit\">Submit</Button>\n            </form>\n        );\n    },\n};\n\nconst styles = StyleSheet.create({\n    customField: {\n        backgroundColor: semanticColor.status.notice.background,\n        color: semanticColor.status.notice.foreground,\n        border: \"none\",\n        maxInlineSize: 250,\n        \"::placeholder\": {\n            color: semanticColor.core.foreground.neutral.default,\n        },\n    },\n    button: {\n        maxInlineSize: 150,\n    },\n    fieldWithButton: {\n        marginBlockEnd: sizing.size_160,\n    },\n});\n"}},"packages-iconbutton-activityiconbutton":{"id":"packages-iconbutton-activityiconbutton","name":"ActivityIconButton","path":"./__docs__/wonder-blocks-icon-button/activity-icon-button.stories.tsx","stories":[{"id":"packages-iconbutton-activityiconbutton--default","name":"Default","snippet":"const Default = () => <ActivityIconButton\n    aria-label=\"Search\"\n    kind=\"primary\"\n    actionType=\"progressive\"\n    icon={magnifyingGlass}\n    disabled={false}\n    onClick={(e: React.SyntheticEvent) => {\n        action(\"clicked\")(e);\n    }} />;","description":"Minimal activity icon button. The only props specified in this example are `icon` and `onClick`."},{"id":"packages-iconbutton-activityiconbutton--kinds","name":"Kinds","snippet":"const Kinds = () => {\n    return (\n        <View style={{gap: sizing.size_160, flexDirection: \"row\"}}>\n            <ActivityIconButton\n                icon={magnifyingGlass}\n                aria-label=\"search\"\n                onClick={(e) => action(\"clicked\")(e)}\n            />\n            <ActivityIconButton\n                icon={magnifyingGlass}\n                aria-label=\"search\"\n                kind=\"secondary\"\n                onClick={(e) => action(\"clicked\")(e)}\n            />\n            <ActivityIconButton\n                icon={magnifyingGlass}\n                aria-label=\"search\"\n                kind=\"tertiary\"\n                onClick={(e) => action(\"clicked\")(e)}\n            />\n            <ActivityIconButton\n                disabled={true}\n                icon={magnifyingGlass}\n                aria-label=\"search\"\n                onClick={(e) => action(\"clicked\")(e)}\n            />\n        </View>\n    );\n};","description":"In this example, we have `primary`, `secondary`, `tertiary` and `disabled` `ActivityIconButton`s from left to right."},{"id":"packages-iconbutton-activityiconbutton--action-type","name":"ActionType","snippet":"const ActionType = (args) => (\n    <View style={{gap: sizing.size_160}}>\n        {actionTypes.map((actionType, index) => (\n            <View\n                key={index}\n                style={{gap: sizing.size_160, flexDirection: \"row\"}}\n            >\n                {kinds.map((kind, index) => (\n                    <ActivityIconButton\n                        icon={IconMappings.arrowUpBold}\n                        aria-label=\"navigate\"\n                        onClick={() => {}}\n                        actionType={actionType}\n                        kind={kind}\n                        key={`${kind}-${actionType}-${index}`}\n                    />\n                ))}\n                <ActivityIconButton\n                    disabled={true}\n                    icon={IconMappings.arrowUpBold}\n                    aria-label=\"search\"\n                    onClick={(e) => action(\"clicked\")(e)}\n                    actionType={actionType}\n                    key={`disabled-${actionType}-${index}`}\n                />\n            </View>\n        ))}\n    </View>\n);","description":"ActivityIconButton has an `actionType` prop that is either `progressive` (the default, as shown above) or `neutral`:"},{"id":"packages-iconbutton-activityiconbutton--using-href","name":"Using Href","snippet":"const UsingHref = () => {\n    return (\n        <ActivityIconButton\n            icon={IconMappings.info}\n            aria-label=\"More information\"\n            href=\"/\"\n            target=\"_blank\"\n            onClick={(e) => action(\"clicked\")(e)}\n        />\n    );\n};","description":"This example has an `href` prop in addition to the `onClick` prop. `href` takes a URL or path, and clicking the icon button will result in a navigation to the specified page. Note that `onClick` is not required if `href` is defined. The `target=\"_blank\"` prop will cause the href page to open in a new tab."},{"id":"packages-iconbutton-activityiconbutton--with-aria-label","name":"With Aria Label","snippet":"const WithAriaLabel = () => {\n    return (\n        <View style={{gap: sizing.size_160, flexDirection: \"row\"}}>\n            <ActivityIconButton\n                icon={IconMappings.caretLeftBold}\n                onClick={(e) => action(\"clicked\")(e)}\n                aria-label=\"Previous page\"\n            />\n            <ActivityIconButton\n                icon={IconMappings.caretRightBold}\n                onClick={(e) => action(\"clicked\")(e)}\n                aria-label=\"Next page\"\n            />\n        </View>\n    );\n};","description":"There are two ways to provide accessible names to `ActivityIconButton`. One approach is using the `aria-label` prop that can be used to explain the function of the button. Remember to keep the description concise but understandable."},{"id":"packages-iconbutton-activityiconbutton--with-label","name":"With Label","snippet":"const WithLabel = () => {\n    return (\n        <View\n            style={{\n                gap: sizing.size_160,\n                flexDirection: \"row\",\n                alignItems: \"flex-start\",\n            }}\n        >\n            <ActivityIconButton\n                icon={IconMappings.check}\n                onClick={(e) => action(\"clicked\")(e)}\n                label=\"Check\"\n            />\n            <ActivityIconButton\n                icon={IconMappings.magnifyingGlass}\n                onClick={(e) => action(\"clicked\")(e)}\n                label=\"Search\"\n            />\n        </View>\n    );\n};","description":"Another way to provide accessible names to `ActivityIconButton` is by providing a label for the button using the `label` prop. This is recommended when the button is used as a navigation item in the context of a menu, for example."},{"id":"packages-iconbutton-activityiconbutton--with-custom-icon","name":"With Custom Icon","snippet":"const WithCustomIcon = () => {\n    return (\n        <View\n            style={{\n                gap: sizing.size_160,\n                flexDirection: \"row\",\n                alignItems: \"flex-start\",\n            }}\n        >\n            <ActivityIconButton\n                icon={\n                    <Icon size=\"medium\">\n                        <img alt=\"\" src={khanmigoIcon} />\n                    </Icon>\n                }\n                onClick={(e) => action(\"clicked\")(e)}\n                aria-label=\"Khanmigo\"\n                kind=\"secondary\"\n            />\n        </View>\n    );\n};","description":"For non-Phosphor icons, you can use the Wonder Blocks Icon component to wrap the custom icon. Note: The ActivityIconButton component will handle the sizing for the icon."},{"id":"packages-iconbutton-activityiconbutton--with-styles","name":"With Styles","snippet":"const WithStyles = () => {\n    return (\n        <ActivityIconButton\n            icon={IconMappings.info}\n            label=\"More information\"\n            styles={{\n                root: {\n                    width: \"200px\",\n                    maxWidth: \"unset\",\n                    maxHeight: \"unset\",\n                },\n                box: {\n                    width: \"100%\",\n                    backgroundColor:\n                        semanticColor.learning.background.streaks.default,\n                    justifyContent: \"center\",\n                    alignItems: \"center\",\n                },\n                label: {\n                    fontWeight: \"bold\",\n                },\n            }}\n        />\n    );\n};","description":"You can use the `styles` prop to apply custom styles to speicific parts of the ActivityIconButton component. The following parts can be styled: - `root`: Styles the root element (button) - `box`: Styles the \"chonky\" box element - `label`: Styles the text in the button"}],"import":"import { ActivityIconButton, ComponentInfo } from \"@khanacademy/wonder-blocks-icon-button\";\nimport { Icon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`ActivityIconButton` is an icon button that is used for actions in the context of learner activities. It uses a \"chonky\" design, which is a more playful and engaging design that is suitable for learner activities ```tsx import magnifyingGlassIcon from \"@phosphor-icons/core/regular/magnifying-glass.svg\"; import {ActivityIconButton} from \"@khanacademy/wonder-blocks-icon-button\"; <ActivityIconButton icon={magnifyingGlassIcon} aria-label=\"An Icon\" onClick={(e) => console.log(\"Hello, world!\")} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon-button/src/index.ts","description":"`ActivityIconButton` is an icon button that is used for actions in the\ncontext of learner activities. It uses a \"chonky\" design, which is a more\nplayful and engaging design that is suitable for learner activities\n\n```tsx\nimport magnifyingGlassIcon from\n\"@phosphor-icons/core/regular/magnifying-glass.svg\";\nimport {ActivityIconButton} from \"@khanacademy/wonder-blocks-icon-button\";\n\n<ActivityIconButton\n    icon={magnifyingGlassIcon}\n    aria-label=\"An Icon\"\n    onClick={(e) => console.log(\"Hello, world!\")}\n/>\n```","displayName":"ActivityIconButton","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\nThe alternative text for the icon button. Use `aria-label` for when\nthere's no visible label for the button, such as when the button only\ncontains an icon.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/activity-icon-button.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/activity-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"A unique identifier for the IconButton.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the IconButton.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"onMouseDown":{"defaultValue":null,"description":"Function to call when the mouse down event is triggered.","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => void)"}},"onClick":{"defaultValue":null,"description":"Function to call when button is clicked.\n\nThis callback should be used for things like marking BigBingo\nconversions. It should NOT be used to redirect to a different URL or to\nprevent navigation via e.preventDefault(). The event passed to this\nhandler will have its preventDefault() and stopPropagation() methods\nstubbed out.\n\nNote: onClick is optional if href is present, but must be defined if\nhref is not","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: SyntheticEvent<Element, Event>) => unknown)"}},"kind":{"defaultValue":null,"description":"The kind of the icon button, either primary, secondary, or tertiary.\n\nIn default state:\n- Primary icon buttons are color: props.color\n- Secondary buttons are offBlack\n- Tertiary buttons are offBlack64\n\nIn the hover/focus/press states, all variants have a border.","name":"kind","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"IconButtonKind","value":[{"value":"\"primary\""},{"value":"\"secondary\""},{"value":"\"tertiary\""}]}},"disabled":{"defaultValue":null,"description":"Whether the icon button is disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"rel":{"defaultValue":null,"description":"Specifies the type of relationship between the current document and the\nlinked document. Should only be used when `href` is specified. This\ndefaults to \"noopener noreferrer\" when `target=\"_blank\"`, but can be\noverridden by setting this prop to something else.","name":"rel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"A target destination window for a link to open in.","name":"target","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"_blank\"","value":[{"value":"\"_blank\""}]}},"skipClientNav":{"defaultValue":null,"description":"Whether to avoid using client-side navigation.\n\nIf the URL passed to href is local to the client-side, e.g.\n/math/algebra/eval-exprs, then it tries to use react-router-dom's Link\ncomponent which handles the client-side navigation. You can set\n`skipClientNav` to true avoid using client-side nav entirely.\n\nNOTE: All URLs containing a protocol are considered external, e.g.\nhttps://khanacademy.org/math/algebra/eval-exprs will trigger a full\npage reload.","name":"skipClientNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"href":{"defaultValue":null,"description":"URL to navigate to.\n\nNote: Either href or onClick must be defined","name":"href","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"type":{"defaultValue":null,"description":"Used for icon buttons within forms.","name":"type","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"button\" | \"submit\"","value":[{"value":"\"button\""},{"value":"\"submit\""}]}},"icon":{"defaultValue":null,"description":"A Phosphor icon asset (imported as a static SVG file), or for\nnon-Phosphor icons, pass in a WB Icon component that wraps the custom\nicon.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | PhosphorIconAsset"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the ActivityIconButton component.\n- `root`: Styles the root element (button)\n- `box`: Styles the \"chonky\" box element\n- `label`: Styles the text in the button","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; box?: StyleType; label?: StyleType; }"}},"label":{"defaultValue":null,"description":"A label for the button that describes its action.\n\nNOTE: If `label` is set, then `aria-label` will be ignored.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/activity-icon-button.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/activity-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"actionType":{"defaultValue":null,"description":"The action type of the button. This determines the visual style of the\nbutton.\n\n- `progressive` is used for actions that move the user forward in a flow.\n- `neutral` is used for buttons that indicate a neutral action.","name":"actionType","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/activity-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"ActivityIconButtonActionType","value":[{"value":"\"progressive\""},{"value":"\"neutral\""}]}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLButtonElement | HTMLAnchorElement | ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"ActivityIconButton"}},"packages-iconbutton-conversationiconbutton":{"id":"packages-iconbutton-conversationiconbutton","name":"ConversationIconButton","path":"./__docs__/wonder-blocks-icon-button/conversation-icon-button.stories.tsx","stories":[{"id":"packages-iconbutton-conversationiconbutton--default","name":"Default","snippet":"const Default = () => <ConversationIconButton\n    aria-label=\"Search\"\n    icon={microphone}\n    actionType=\"progressive\"\n    disabled={false}\n    kind=\"primary\"\n    onClick={(e: React.SyntheticEvent) => {\n        action(\"clicked\")(e);\n    }} />;","description":"Minimal conversation icon button. The only props specified in this example are `icon` and `onClick`. Note that the `aria-label` prop is required for accessibility, as it provides a text alternative for the icon button. This is important for screen readers and other assistive technologies to understand the purpose of the button."},{"id":"packages-iconbutton-conversationiconbutton--kinds","name":"Kinds","snippet":"const Kinds = () => {\n    return (\n        <View style={{gap: sizing.size_160, flexDirection: \"row\"}}>\n            <ConversationIconButton\n                icon={microphone}\n                aria-label=\"search\"\n                onClick={(e) => action(\"clicked\")(e)}\n            />\n            <ConversationIconButton\n                icon={microphone}\n                aria-label=\"search\"\n                kind=\"secondary\"\n                onClick={(e) => action(\"clicked\")(e)}\n            />\n            <ConversationIconButton\n                icon={microphone}\n                aria-label=\"search\"\n                kind=\"tertiary\"\n                onClick={(e) => action(\"clicked\")(e)}\n            />\n            <ConversationIconButton\n                disabled={true}\n                icon={microphone}\n                aria-label=\"search\"\n                onClick={(e) => action(\"clicked\")(e)}\n            />\n        </View>\n    );\n};","description":"In this example, we have `primary` (default), `secondary`, `tertiary` and disabled `ConversationIconButton`'s from left to right."},{"id":"packages-iconbutton-conversationiconbutton--action-type","name":"ActionType","snippet":"const ActionType = (args) => (\n    <View style={{gap: sizing.size_160}}>\n        {actionTypes.map((actionType, index) => (\n            <View\n                key={index}\n                style={{gap: sizing.size_160, flexDirection: \"row\"}}\n            >\n                {kinds.map((kind, index) => (\n                    <ConversationIconButton\n                        icon={IconMappings.arrowUpBold}\n                        aria-label=\"navigate\"\n                        onClick={() => {}}\n                        actionType={actionType}\n                        kind={kind}\n                        key={`${kind}-${actionType}-${index}`}\n                    />\n                ))}\n                <ConversationIconButton\n                    disabled={true}\n                    icon={IconMappings.arrowUpBold}\n                    aria-label=\"search\"\n                    onClick={(e) => action(\"clicked\")(e)}\n                    actionType={actionType}\n                    key={`disabled-${actionType}-${index}`}\n                />\n            </View>\n        ))}\n    </View>\n);","description":"ConversationIconButton has an `actionType` prop that is either `progressive` (default) or `neutral`:"},{"id":"packages-iconbutton-conversationiconbutton--toggleable","name":"Toggleable","snippet":"const Toggleable = function Render() {\n    const [on, setOn] = React.useState(false);\n    return (\n        <View style={{gap: sizing.size_080, placeItems: \"center\"}}>\n            <ConversationIconButton\n                icon={on ? microphoneFill : microphone}\n                onClick={(e) => {\n                    setOn(!on);\n                    action(\"clicked\")(e);\n                }}\n                aria-label=\"Toggle microphone\"\n                aria-pressed={on}\n            />\n            <BodyText>The microphone is {on ? \"ON\" : \"OFF\"}</BodyText>\n        </View>\n    );\n};","description":"ConversationIconButton can be configured to be toggleable. This is useful for features like toggling a microphone on and off. Note that the `aria-pressed` attribute is used to indicate the toggle state of the button. This is important for accessibility, as it allows screen readers to announce the current state of the button to users."},{"id":"packages-iconbutton-conversationiconbutton--expanded","name":"Expanded","snippet":"const Expanded = function Render() {\n    return (\n        <ActionMenu\n            aria-label=\"Conversation options\"\n            menuText=\"\"\n            opener={({opened}) => (\n                <ConversationIconButton\n                    kind=\"secondary\"\n                    icon={opened ? plusFill : plus}\n                    aria-label=\"Open menu\"\n                />\n            )}\n        >\n            <ActionItem\n                label=\"Add to calendar\"\n                leftAccessory={\n                    <PhosphorIcon\n                        size=\"medium\"\n                        icon={IconMappings.calendar}\n                    />\n                }\n            />\n            <ActionItem\n                label=\"Add to contacts\"\n                leftAccessory={\n                    <PhosphorIcon size=\"medium\" icon={IconMappings.gear} />\n                }\n            />\n        </ActionMenu>\n    );\n};","description":"This example shows how to use the `ConversationIconButton` in an `ActionMenu`. The `ConversationIconButton` is used as the opener for the menu, which allows the button to be used in its \"expanded\" state."},{"id":"packages-iconbutton-conversationiconbutton--with-custom-icon","name":"With Custom Icon","snippet":"const WithCustomIcon = () => <ConversationIconButton\n    aria-label=\"Wonder Blocks\"\n    icon={(<Icon>\n        <img src=\"logo.svg\" alt=\"\" />\n    </Icon>)}\n    kind=\"secondary\" />;","description":"For non-Phosphor icons, you can use the Wonder Blocks Icon component to wrap the custom icon. Note: The ConversationIconButton component will handle the sizing for the icon."}],"import":"import { ActionItem, ActionMenu } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, ConversationIconButton } from \"@khanacademy/wonder-blocks-icon-button\";\nimport { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`ConversationIconButton` is an icon button that is used in the context of conversations, such as sending a message or performing an action related to a conversation. This is useful in chat widgets, like the one used in Khanmigo. ```tsx import microphone from \"@phosphor-icons/core/bold/microphone-bold.svg\"; import {ConversationIconButton} from \"@khanacademy/wonder-blocks-icon-button\"; <ConversationIconButton icon={microphone} aria-label=\"Start a conversation\" onClick={(e) => console.log(\"Hello, world!\")} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon-button/src/index.ts","description":"`ConversationIconButton` is an icon button that is used in the context of\nconversations, such as sending a message or performing an action related to a\nconversation. This is useful in chat widgets, like the one used in Khanmigo.\n\n```tsx\nimport microphone from \"@phosphor-icons/core/bold/microphone-bold.svg\";\nimport {ConversationIconButton} from \"@khanacademy/wonder-blocks-icon-button\";\n\n<ConversationIconButton\n    icon={microphone}\n    aria-label=\"Start a conversation\"\n    onClick={(e) => console.log(\"Hello, world!\")}\n/>\n```","displayName":"ConversationIconButton","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\nThe alternative text for the icon button. Use `aria-label` for when\nthere's no visible label for the button, such as when the button only\ncontains an icon.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/conversation-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"A unique identifier for the IconButton.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"icon":{"defaultValue":null,"description":"A Phosphor icon asset (imported as a static SVG file), or for\nnon-Phosphor icons, pass in a WB Icon component that wraps the custom\nicon.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | PhosphorIconAsset"}},"kind":{"defaultValue":null,"description":"The kind of the icon button, either primary, secondary, or tertiary.\n\nIn default state:\n- Primary icon buttons are color: props.color\n- Secondary buttons are offBlack\n- Tertiary buttons are offBlack64\n\nIn the hover/focus/press states, all variants have a border.","name":"kind","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"IconButtonKind","value":[{"value":"\"primary\""},{"value":"\"secondary\""},{"value":"\"tertiary\""}]}},"disabled":{"defaultValue":null,"description":"Whether the icon button is disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"type":{"defaultValue":null,"description":"Used for icon buttons within forms.","name":"type","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"button\" | \"submit\"","value":[{"value":"\"button\""},{"value":"\"submit\""}]}},"style":{"defaultValue":null,"description":"Optional custom styles.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the IconButton.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"href":{"defaultValue":null,"description":"URL to navigate to.\n\nNote: Either href or onClick must be defined","name":"href","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"A target destination window for a link to open in.","name":"target","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"_blank\"","value":[{"value":"\"_blank\""}]}},"rel":{"defaultValue":null,"description":"Specifies the type of relationship between the current document and the\nlinked document. Should only be used when `href` is specified. This\ndefaults to \"noopener noreferrer\" when `target=\"_blank\"`, but can be\noverridden by setting this prop to something else.","name":"rel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"skipClientNav":{"defaultValue":null,"description":"Whether to avoid using client-side navigation.\n\nIf the URL passed to href is local to the client-side, e.g.\n/math/algebra/eval-exprs, then it tries to use react-router-dom's Link\ncomponent which handles the client-side navigation. You can set\n`skipClientNav` to true avoid using client-side nav entirely.\n\nNOTE: All URLs containing a protocol are considered external, e.g.\nhttps://khanacademy.org/math/algebra/eval-exprs will trigger a full\npage reload.","name":"skipClientNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onClick":{"defaultValue":null,"description":"Function to call when button is clicked.\n\nThis callback should be used for things like marking BigBingo\nconversions. It should NOT be used to redirect to a different URL or to\nprevent navigation via e.preventDefault(). The event passed to this\nhandler will have its preventDefault() and stopPropagation() methods\nstubbed out.\n\nNote: onClick is optional if href is present, but must be defined if\nhref is not","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: SyntheticEvent<Element, Event>) => unknown)"}},"onMouseDown":{"defaultValue":null,"description":"Function to call when the mouse down event is triggered.","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => void)"}},"actionType":{"defaultValue":null,"description":"The action type of the button. This determines the visual style of the\nbutton.\n\n- `progressive` is used for actions that move the user forward in a flow.\n- `neutral` is used for buttons that indicate a neutral action.","name":"actionType","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/conversation-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"ActivityIconButtonActionType","value":[{"value":"\"progressive\""},{"value":"\"neutral\""}]}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<IconButtonRef>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"ConversationIconButton"}},"packages-iconbutton-iconbutton":{"id":"packages-iconbutton-iconbutton","name":"IconButton","path":"./__docs__/wonder-blocks-icon-button/icon-button.stories.tsx","stories":[{"id":"packages-iconbutton-iconbutton--default","name":"Default","snippet":"const Default = () => <IconButton\n    aria-label=\"Search\"\n    icon={magnifyingGlass}\n    actionType=\"progressive\"\n    disabled={false}\n    kind=\"primary\"\n    size=\"medium\"\n    onClick={(e: React.SyntheticEvent) => {\n        console.log(\"Click!\");\n        action(\"clicked\")(e);\n    }} />;","description":"Minimal icon button. The only props specified in this example are `icon` and `onClick`."},{"id":"packages-iconbutton-iconbutton--sizes","name":"Sizes","snippet":"const Sizes = () => <View style={{gap: sizing.size_160}}>\n    <View style={styles.row}>\n        <BodyText style={styles.label}>xsmall</BodyText>\n        <IconButton aria-label=\"Search\" icon={magnifyingGlassBold} size=\"xsmall\" />\n    </View>\n    <View style={styles.row}>\n        <BodyText style={styles.label}>small</BodyText>\n        <IconButton aria-label=\"Search\" icon={magnifyingGlass} size=\"small\" />\n    </View>\n    <View style={styles.row}>\n        <BodyText style={styles.label}>medium</BodyText>\n        <IconButton aria-label=\"Search\" icon={magnifyingGlass} size=\"medium\" />\n    </View>\n    <View style={styles.row}>\n        <BodyText style={styles.label}>large</BodyText>\n        <IconButton aria-label=\"Search\" icon={magnifyingGlass} size=\"large\" />\n    </View>\n</View>;","description":"IconButtons can be used with any icon from the `@phosphor-icons/core` package. The `icon` prop takes an SVG asset from the package. In this example you can see the different sizes of the icon button: - `xsmall` (16px icon with a 24px touch target). - `small` (24px icon with a 32px touch target). - `medium` (24px icon with a 40px touch target). - `large` (24px icon with a 48px touch target)."},{"id":"packages-iconbutton-iconbutton--kinds","name":"Kinds","snippet":"const Kinds = () => {\n    return (\n        <View style={styles.row}>\n            <IconButton\n                icon={magnifyingGlass}\n                aria-label=\"search\"\n                onClick={(e) => console.log(\"Click!\")}\n            />\n            <IconButton\n                icon={magnifyingGlass}\n                aria-label=\"search\"\n                kind=\"secondary\"\n                onClick={(e) => console.log(\"Click!\")}\n            />\n            <IconButton\n                icon={magnifyingGlass}\n                aria-label=\"search\"\n                kind=\"tertiary\"\n                onClick={(e) => console.log(\"Click!\")}\n            />\n            <IconButton\n                disabled={true}\n                icon={magnifyingGlass}\n                aria-label=\"search\"\n                onClick={(e) => console.log(\"Click!\")}\n            />\n        </View>\n    );\n};","description":"In this example, we have `primary`, `secondary`, `tertiary`, and disabled `IconButton`s from left to right."},{"id":"packages-iconbutton-iconbutton--with-action-type","name":"ActionType","snippet":"const WithActionType = () => <View style={{gap: sizing.size_160}}>\n    <View style={styles.row}>\n        <IconButton\n            aria-label=\"Search\"\n            icon={minusCircle}\n            onClick={() => {}}\n            actionType=\"destructive\" />\n        <IconButton\n            aria-label=\"Search\"\n            icon={minusCircle}\n            onClick={() => {}}\n            kind=\"secondary\"\n            actionType=\"destructive\" />\n        <IconButton\n            aria-label=\"Search\"\n            icon={minusCircle}\n            onClick={() => {}}\n            kind=\"tertiary\"\n            actionType=\"destructive\" />\n        <IconButton\n            disabled={true}\n            icon={minusCircle}\n            aria-label=\"search\"\n            onClick={(e) => console.log(\"Click!\")}\n            actionType=\"destructive\" />\n    </View>\n    <View style={styles.row}>\n        <IconButton\n            aria-label=\"Search\"\n            icon={minusCircle}\n            onClick={() => {}}\n            actionType=\"neutral\" />\n        <IconButton\n            aria-label=\"Search\"\n            icon={minusCircle}\n            onClick={() => {}}\n            kind=\"secondary\"\n            actionType=\"neutral\" />\n        <IconButton\n            aria-label=\"Search\"\n            icon={minusCircle}\n            onClick={() => {}}\n            kind=\"tertiary\"\n            actionType=\"neutral\" />\n        <IconButton\n            disabled={true}\n            icon={minusCircle}\n            aria-label=\"search\"\n            onClick={(e) => console.log(\"Click!\")}\n            actionType=\"neutral\" />\n    </View>\n</View>;","description":"IconButton has an `actionType` prop that is either `progressive` (the default, as shown above), `destructive` or `neutral` (as can seen below):"},{"id":"packages-iconbutton-iconbutton--using-href","name":"Using Href","snippet":"const UsingHref = () => {\n    return (\n        <IconButton\n            icon={info}\n            aria-label=\"More information\"\n            href=\"/\"\n            target=\"_blank\"\n            onClick={(e) => console.log(\"Click!\")}\n        />\n    );\n};","description":"This example has an `href` prop in addition to the `onClick` prop. `href` takes a URL or path, and clicking the icon button will result in a navigation to the specified page. Note that `onClick` is not required if `href` is defined. The `target=\"_blank\"` prop will cause the href page to open in a new tab."},{"id":"packages-iconbutton-iconbutton--with-aria-label","name":"With Aria Label","snippet":"const WithAriaLabel = () => {\n    return (\n        <View style={styles.arrowsWrapper}>\n            <IconButton\n                icon={caretLeft}\n                onClick={(e) => console.log(\"Click!\")}\n                aria-label=\"Previous page\"\n            />\n            <IconButton\n                icon={caretRight}\n                onClick={(e) => console.log(\"Click!\")}\n                aria-label=\"Next page\"\n            />\n        </View>\n    );\n};","description":"By default, the icon buttons do not have accessible names. The `aria-label` prop must be used to explain the function of the button. Remember to keep the description concise but understandable."},{"id":"packages-iconbutton-iconbutton--with-router","name":"Navigation with React Router","snippet":"const WithRouter = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View style={styles.row}>\n                <IconButton\n                    href=\"/foo\"\n                    icon={caretRight}\n                    onClick={() => console.log(\"Click!\")}\n                    aria-label=\"Navigate to /foo using React Router\"\n                />\n                <IconButton\n                    href=\"https://www.khanacademy.org\"\n                    target=\"_blank\"\n                    icon={externalLinkIcon}\n                    onClick={() => console.log(\"Click!\")}\n                    aria-label=\"Skip client navigation\"\n                    skipClientNav\n                />\n                <Routes>\n                    <Route\n                        path=\"/foo\"\n                        element={<View id=\"foo\">Hello, world!</View>}\n                    />\n                </Routes>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);","description":"Icon Buttons do client-side navigation by default, if React Router exists:"},{"id":"packages-iconbutton-iconbutton--submitting-forms","name":"Submitting forms","snippet":"const SubmittingForms = () => (\n    <form\n        onSubmit={(e) => {\n            e.preventDefault();\n            console.log(\"form submitted\");\n            action(\"form submitted\")(e);\n        }}\n    >\n        <View style={styles.row}>\n            <BodyText tag=\"label\" style={styles.row}>\n                Search:{\" \"}\n                <TextField\n                    id=\"foo\"\n                    value=\"press the button\"\n                    onChange={() => {}}\n                />\n            </BodyText>\n            <IconButton\n                icon={magnifyingGlass}\n                aria-label=\"Search\"\n                type=\"submit\"\n            />\n        </View>\n    </form>\n);","description":"If the button is inside a form, you can use the `type=\"submit\"` prop, so the form will be submitted on click or by pressing `Enter`."},{"id":"packages-iconbutton-iconbutton--with-custom-icon","name":"With Custom Icon","snippet":"const WithCustomIcon = () => <IconButton\n    kind=\"secondary\"\n    icon={\n        <Icon>\n            <img src=\"logo.svg\" alt=\"\" />\n        </Icon>\n    }\n    aria-label=\"Wonder Blocks\"\n    onClick={(e) => action(\"clicked\")(e)} />;","description":"For non-Phosphor icons, you can use the Wonder Blocks Icon component to wrap the custom icon. Note: The IconButton component will handle the sizing for the icon."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { CompatRouter, Route, Routes } from \"react-router-dom-v5-compat\";\nimport IconButton, { ComponentInfo, TextField } from \"@khanacademy/wonder-blocks-icon-button\";\nimport { Icon } from \"@khanacademy/wonder-blocks-icon\";\nimport { MemoryRouter } from \"react-router-dom\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"IconButton\" component.\n  64 |  * ```\n  65 |  */\n> 66 | export default {\n     | ^\n  67 |     title: \"Packages / IconButton / IconButton\",\n  68 |     component: IconButton,\n  69 |     decorators: [(Story): React.ReactElement => <View>{Story()}</View>],\n\n./__docs__/wonder-blocks-icon-button/icon-button.stories.tsx:\n/* eslint-disable no-console */\nimport * as React from \"react\";\nimport {MemoryRouter} from \"react-router-dom\";\nimport {CompatRouter, Route, Routes} from \"react-router-dom-v5-compat\";\nimport {StyleSheet} from \"aphrodite\";\nimport {action} from \"storybook/actions\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport caretLeft from \"@phosphor-icons/core/regular/caret-left.svg\";\nimport caretRight from \"@phosphor-icons/core/regular/caret-right.svg\";\nimport externalLinkIcon from \"@phosphor-icons/core/regular/arrow-square-out.svg\";\nimport info from \"@phosphor-icons/core/regular/info.svg\";\nimport magnifyingGlass from \"@phosphor-icons/core/regular/magnifying-glass.svg\";\nimport magnifyingGlassBold from \"@phosphor-icons/core/bold/magnifying-glass-bold.svg\";\nimport minusCircle from \"@phosphor-icons/core/regular/minus-circle.svg\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\nimport IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport {sizing} from \"@khanacademy/wonder-blocks-tokens\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport packageConfig from \"../../packages/wonder-blocks-icon-button/package.json\";\nimport IconButtonArgtypes from \"./icon-button.argtypes\";\nimport TextField from \"../../packages/wonder-blocks-form/src/components/text-field\";\nimport {Icon} from \"@khanacademy/wonder-blocks-icon\";\n\n/**\n * An `IconButton` is a button whose contents are an SVG image.\n *\n * To use, supply an `onClick` function, a Phosphor icon asset (see the\n * `Icon>PhosphorIcon` section) and an `aria-label` to describe the button\n * functionality. Optionally specify href (URL), clientSideNav, color (Wonder\n * Blocks Blue or Red), kind (\"primary\", \"secondary\", or \"tertiary\"), disabled,\n * test ID, and custom styling.\n *\n * The size of an `IconButton` is based on how the `size` prop is defined (see\n * `Sizes` below for more details). The focus ring which is displayed on hover\n * and focus is much larger but does not affect its size. This matches the\n * behavior of Button.\n *\n * IconButtons require a certain amount of space between them to ensure the\n * focus rings don't overlap. The minimum amount of spacing is 16px, but you\n * should refer to the mocks provided by design.  Using a Strut in between\n * IconButtons is the preferred way to for adding this spacing.\n *\n * Many layouts require alignment of visual left (or right) side of an\n * `IconButton`. This requires a little bit of pixel nudging since each icon as\n * a different amount of internal padding.\n *\n * See the Toolbar documentation for examples of `IconButton` use that follow\n * the best practices described above.\n *\n * ```js\n * import magnifyingGlassIcon from \"@phosphor-icons/core/regular/magnifying-glass.svg\";\n * import IconButton from \"@khanacademy/wonder-blocks-icon-button\";\n *\n * <IconButton\n *     icon={magnifyingGlassIcon}\n *     aria-label=\"An Icon\"\n *     onClick={(e) => console.log(\"Hello, world!\")}\n *     size=\"medium\"\n * />\n * ```\n */\nexport default {\n    title: \"Packages / IconButton / IconButton\",\n    component: IconButton,\n    decorators: [(Story): React.ReactElement => <View>{Story()}</View>],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        chromatic: {\n            // Disabling all snapshots because we are testing all the variants\n            // in `icon-button-testing-snapshots.stories.tsx`.\n            disableSnapshot: true,\n        },\n        docs: {\n            source: {\n                type: \"code\",\n            },\n        },\n    },\n    argTypes: IconButtonArgtypes,\n    args: {\n        \"aria-label\": \"Search\",\n    },\n} as Meta<typeof IconButton>;\n\ntype StoryComponentType = StoryObj<typeof IconButton>;\n\n/**\n * Minimal icon button. The only props specified in this example are `icon` and\n * `onClick`.\n */\nexport const Default: StoryComponentType = {\n    args: {\n        icon: magnifyingGlass,\n        actionType: \"progressive\",\n        disabled: false,\n        kind: \"primary\",\n        size: \"medium\",\n\n        onClick: (e: React.SyntheticEvent) => {\n            console.log(\"Click!\");\n            action(\"clicked\")(e);\n        },\n    },\n};\n\n/**\n * IconButtons can be used with any icon from the `@phosphor-icons/core`\n * package. The `icon` prop takes an SVG asset from the package.\n *\n * In this example you can see the different sizes of the icon button:\n * - `xsmall` (16px icon with a 24px touch target).\n * - `small` (24px icon with a 32px touch target).\n * - `medium` (24px icon with a 40px touch target).\n * - `large` (24px icon with a 48px touch target).\n */\nexport const Sizes: StoryComponentType = {\n    ...Default,\n    args: {\n        icon: magnifyingGlass,\n    },\n    render: (args) => (\n        <View style={{gap: sizing.size_160}}>\n            <View style={styles.row}>\n                <BodyText style={styles.label}>xsmall</BodyText>\n                <IconButton\n                    {...args}\n                    icon={magnifyingGlassBold}\n                    size=\"xsmall\"\n                />\n            </View>\n            <View style={styles.row}>\n                <BodyText style={styles.label}>small</BodyText>\n                <IconButton {...args} size=\"small\" />\n            </View>\n            <View style={styles.row}>\n                <BodyText style={styles.label}>medium</BodyText>\n                <IconButton {...args} size=\"medium\" />\n            </View>\n            <View style={styles.row}>\n                <BodyText style={styles.label}>large</BodyText>\n                <IconButton {...args} size=\"large\" />\n            </View>\n        </View>\n    ),\n};\n\n/**\n * In this example, we have `primary`, `secondary`, `tertiary`,\n * and disabled `IconButton`s from left to right.\n */\nexport const Kinds: StoryComponentType = {\n    render: () => {\n        return (\n            <View style={styles.row}>\n                <IconButton\n                    icon={magnifyingGlass}\n                    aria-label=\"search\"\n                    onClick={(e) => console.log(\"Click!\")}\n                />\n                <IconButton\n                    icon={magnifyingGlass}\n                    aria-label=\"search\"\n                    kind=\"secondary\"\n                    onClick={(e) => console.log(\"Click!\")}\n                />\n                <IconButton\n                    icon={magnifyingGlass}\n                    aria-label=\"search\"\n                    kind=\"tertiary\"\n                    onClick={(e) => console.log(\"Click!\")}\n                />\n                <IconButton\n                    disabled={true}\n                    icon={magnifyingGlass}\n                    aria-label=\"search\"\n                    onClick={(e) => console.log(\"Click!\")}\n                />\n            </View>\n        );\n    },\n};\n\n/**\n * IconButton has an `actionType` prop that is either `progressive` (the default, as shown\n * above), `destructive` or `neutral` (as can seen below):\n */\nexport const WithActionType: StoryComponentType = {\n    name: \"ActionType\",\n    render: (args) => (\n        <View style={{gap: sizing.size_160}}>\n            <View style={styles.row}>\n                <IconButton\n                    {...args}\n                    icon={minusCircle}\n                    onClick={() => {}}\n                    actionType=\"destructive\"\n                />\n                <IconButton\n                    {...args}\n                    icon={minusCircle}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    actionType=\"destructive\"\n                />\n                <IconButton\n                    {...args}\n                    icon={minusCircle}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    actionType=\"destructive\"\n                />\n                <IconButton\n                    {...args}\n                    disabled={true}\n                    icon={minusCircle}\n                    aria-label=\"search\"\n                    onClick={(e) => console.log(\"Click!\")}\n                    actionType=\"destructive\"\n                />\n            </View>\n            <View style={styles.row}>\n                <IconButton\n                    {...args}\n                    icon={minusCircle}\n                    onClick={() => {}}\n                    actionType=\"neutral\"\n                />\n                <IconButton\n                    {...args}\n                    icon={minusCircle}\n                    onClick={() => {}}\n                    kind=\"secondary\"\n                    actionType=\"neutral\"\n                />\n                <IconButton\n                    {...args}\n                    icon={minusCircle}\n                    onClick={() => {}}\n                    kind=\"tertiary\"\n                    actionType=\"neutral\"\n                />\n                <IconButton\n                    {...args}\n                    disabled={true}\n                    icon={minusCircle}\n                    aria-label=\"search\"\n                    onClick={(e) => console.log(\"Click!\")}\n                    actionType=\"neutral\"\n                />\n            </View>\n        </View>\n    ),\n};\n\n/**\n * This example has an `href` prop in addition to the `onClick` prop. `href` takes a URL or path,\n * and clicking the icon button will result in a navigation to the specified page. Note that\n * `onClick` is not required if `href` is defined. The `target=\"_blank\"` prop will cause the href\n *  page to open in a new tab.\n */\nexport const UsingHref: StoryComponentType = {\n    render: () => {\n        return (\n            <IconButton\n                icon={info}\n                aria-label=\"More information\"\n                href=\"/\"\n                target=\"_blank\"\n                onClick={(e) => console.log(\"Click!\")}\n            />\n        );\n    },\n};\n\n/**\n * By default, the icon buttons do not have accessible names. The `aria-label` prop must be used\n * to explain the function of the button. Remember to keep the description concise but understandable.\n */\nexport const WithAriaLabel: StoryComponentType = {\n    render: () => {\n        return (\n            <View style={styles.arrowsWrapper}>\n                <IconButton\n                    icon={caretLeft}\n                    onClick={(e) => console.log(\"Click!\")}\n                    aria-label=\"Previous page\"\n                />\n                <IconButton\n                    icon={caretRight}\n                    onClick={(e) => console.log(\"Click!\")}\n                    aria-label=\"Next page\"\n                />\n            </View>\n        );\n    },\n};\n\n/**\n * Icon Buttons do client-side navigation by default, if React Router exists:\n */\nexport const WithRouter: StoryComponentType = {\n    name: \"Navigation with React Router\",\n    render: () => (\n        <MemoryRouter>\n            <CompatRouter>\n                <View style={styles.row}>\n                    <IconButton\n                        href=\"/foo\"\n                        icon={caretRight}\n                        onClick={() => console.log(\"Click!\")}\n                        aria-label=\"Navigate to /foo using React Router\"\n                    />\n                    <IconButton\n                        href=\"https://www.khanacademy.org\"\n                        target=\"_blank\"\n                        icon={externalLinkIcon}\n                        onClick={() => console.log(\"Click!\")}\n                        aria-label=\"Skip client navigation\"\n                        skipClientNav\n                    />\n                    <Routes>\n                        <Route\n                            path=\"/foo\"\n                            element={<View id=\"foo\">Hello, world!</View>}\n                        />\n                    </Routes>\n                </View>\n            </CompatRouter>\n        </MemoryRouter>\n    ),\n};\n\n/**\n * If the button is inside a form, you can use the `type=\"submit\"` prop, so the\n * form will be submitted on click or by pressing `Enter`.\n */\nexport const SubmittingForms: StoryComponentType = {\n    name: \"Submitting forms\",\n    render: () => (\n        <form\n            onSubmit={(e) => {\n                e.preventDefault();\n                console.log(\"form submitted\");\n                action(\"form submitted\")(e);\n            }}\n        >\n            <View style={styles.row}>\n                <BodyText tag=\"label\" style={styles.row}>\n                    Search:{\" \"}\n                    <TextField\n                        id=\"foo\"\n                        value=\"press the button\"\n                        onChange={() => {}}\n                    />\n                </BodyText>\n                <IconButton\n                    icon={magnifyingGlass}\n                    aria-label=\"Search\"\n                    type=\"submit\"\n                />\n            </View>\n        </form>\n    ),\n    parameters: {\n        chromatic: {\n            // We are testing the form submission, not UI changes.\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * For non-Phosphor icons, you can use the Wonder Blocks Icon component to wrap\n * the custom icon.\n *\n * Note: The IconButton component will handle the sizing for the icon.\n */\nexport const WithCustomIcon: StoryComponentType = {\n    render: (args) => (\n        <IconButton\n            {...args}\n            icon={\n                <Icon>\n                    <img src=\"logo.svg\" alt=\"\" />\n                </Icon>\n            }\n            aria-label=\"Wonder Blocks\"\n            onClick={(e) => action(\"clicked\")(e)}\n        />\n    ),\n    args: {\n        kind: \"secondary\",\n    },\n};\n\nconst styles = StyleSheet.create({\n    arrowsWrapper: {\n        flexDirection: \"row\",\n        gap: sizing.size_160,\n    },\n    row: {\n        display: \"flex\",\n        flexDirection: \"row\",\n        gap: sizing.size_160,\n        alignItems: \"center\",\n    },\n    label: {\n        width: sizing.size_640,\n    },\n});\n"}},"packages-iconbutton-nodeiconbutton":{"id":"packages-iconbutton-nodeiconbutton","name":"NodeIconButton","path":"./__docs__/wonder-blocks-icon-button/node-icon-button.stories.tsx","stories":[{"id":"packages-iconbutton-nodeiconbutton--default","name":"Default","snippet":"const Default = () => <NodeIconButton\n    aria-label=\"Node path\"\n    actionType=\"notStarted\"\n    icon={IconMappings.pencilSimple}\n    disabled={false}\n    onClick={(e: React.SyntheticEvent) => {\n        action(\"clicked\")(e);\n    }} />;","description":"Minimal node icon button. The only props specified in this example are `icon`, `onClick`, and `aria-label`. Note that `aria-label` is required for accessibility, as it provides a text alternative for the icon button."},{"id":"packages-iconbutton-nodeiconbutton--action-type","name":"ActionType","snippet":"const ActionType = (args) => (\n    <View style={{gap: sizing.size_160}}>\n        {actionTypes.map((actionType, index) => (\n            <View\n                key={index}\n                style={{gap: sizing.size_160, flexDirection: \"row\"}}\n            >\n                <NodeIconButton\n                    icon={IconMappings.arrowUpBold}\n                    aria-label=\"navigate\"\n                    onClick={() => {}}\n                    actionType={actionType}\n                    key={`${actionType}-${index}`}\n                />\n\n                <NodeIconButton\n                    disabled={true}\n                    icon={IconMappings.arrowUpBold}\n                    aria-label=\"search\"\n                    onClick={(e) => action(\"clicked\")(e)}\n                    actionType={actionType}\n                    key={`disabled-${actionType}-${index}`}\n                />\n            </View>\n        ))}\n    </View>\n);","description":"NodeIconButton has an `actionType` prop that is either `notStarted` (the default, as shown above) or `attempted` or `complete`:"},{"id":"packages-iconbutton-nodeiconbutton--size","name":"Size","snippet":"const Size = (args) => (\n    <View style={{gap: sizing.size_160}}>\n        {sizes.map((size, index) => (\n            <NodeIconButton\n                key={index}\n                icon={IconMappings.arrowUpBold}\n                aria-label=\"navigate\"\n                onClick={() => {}}\n                actionType=\"notStarted\"\n                size={size}\n            />\n        ))}\n    </View>\n);","description":"NodeIconButton has a `size` prop that is either `small` (16 icon, 24 target) or `medium` (48 icon, 48 target). - `small` is used for smaller buttons that are used in smaller contexts, such as in a menu. - `large` is used for larger buttons that are used in larger contexts, such as in a header. Defaults to `large`."},{"id":"packages-iconbutton-nodeiconbutton--using-href","name":"Using Href","snippet":"const UsingHref = () => {\n    return (\n        <NodeIconButton\n            icon={IconMappings.clock}\n            aria-label=\"More information\"\n            href=\"/\"\n            target=\"_blank\"\n            onClick={(e) => action(\"clicked\")(e)}\n        />\n    );\n};","description":"This example has an `href` prop in addition to the `onClick` prop. `href` takes a URL or path, and clicking the icon button will result in a navigation to the specified page. Note that `onClick` is not required if `href` is defined. The `target=\"_blank\"` prop will cause the href page to open in a new tab."},{"id":"packages-iconbutton-nodeiconbutton--with-custom-icon","name":"With Custom Icon","snippet":"const WithCustomIcon = () => {\n    return (\n        <View\n            style={{\n                gap: sizing.size_160,\n                flexDirection: \"row\",\n                alignItems: \"flex-start\",\n            }}\n        >\n            <NodeIconButton\n                icon={\n                    <Icon size=\"medium\">\n                        <img alt=\"\" src={khanmigoIcon} />\n                    </Icon>\n                }\n                onClick={(e) => action(\"clicked\")(e)}\n                aria-label=\"Khanmigo\"\n                actionType=\"notStarted\"\n            />\n        </View>\n    );\n};","description":"For non-Phosphor icons, you can use the Wonder Blocks Icon component to wrap the custom icon. Note: The NodeIconButton component will handle the sizing for the icon."},{"id":"packages-iconbutton-nodeiconbutton--with-custom-tokens","name":"With Custom Tokens","snippet":"const WithCustomTokens = () => {\n    return (\n        <NodeIconButton\n            icon={IconMappings.info}\n            aria-label=\"More information\"\n            tokens={{\n                boxForeground:\n                    semanticColor.learning.foreground.streaks.default,\n                boxBackground:\n                    semanticColor.learning.background.streaks.default,\n                boxShadowColor: semanticColor.learning.math.foreground.pink,\n                boxPadding: sizing.size_120,\n                boxShadowYRest: sizing.size_080,\n                boxShadowYHover: sizing.size_100,\n                boxShadowYPress: sizing.size_0,\n                iconSize: sizing.size_960,\n            }}\n        />\n    );\n};","description":"The recommended way to customize the appearance of the `NodeIconButton` component is to use the `tokens` prop. This prop accepts a token object that contains the CSS variables that can be overridden to customize the appearance of the `NodeIconButton` component. The following tokens can be overridden: - `boxForeground`: The foreground color of the \"chonky\" box element. - `boxBackground`: The background color of the \"chonky\" box element. - `boxShadowColor`: The color of the shadow of the \"chonky\" box element. - `boxPadding`: The padding of the \"chonky\" box element. - `boxShadowYRest`: The y-offset of the rest state shadow of the \"chonky\" box element. - `boxShadowYHover`: The y-offset of the hover state shadow of the \"chonky\" box element. - `boxShadowYPress`: The y-offset of the press state shadow of the \"chonky\" box element. - `iconSize`: The size of the icon element."},{"id":"packages-iconbutton-nodeiconbutton--with-custom-styles","name":"With Custom Styles","snippet":"const WithCustomStyles = () => {\n    return (\n        <NodeIconButton\n            icon={IconMappings.info}\n            aria-label=\"More information\"\n            styles={{\n                root: {\n                    width: sizing.size_960,\n                    height: sizing.size_960,\n                },\n                box: {\n                    background:\n                        semanticColor.learning.background.streaks.default,\n                },\n                icon: {\n                    color: semanticColor.learning.foreground.streaks\n                        .default,\n                    margin: sizing.size_120,\n                },\n            }}\n        />\n    );\n};","description":"Alternatively, you can use the `styles` prop to apply custom styles to speicific parts of the `NodeIconButton` component. The following parts can be styled: - `root`: Styles the root element (button) - `box`: Styles the \"chonky\" box element - `icon`: Styles the icon element **Note:** The `styles` prop is not recommended for most use cases. Instead, we recommend using the `tokens` prop to customize the appearance of the `NodeIconButton` component. If you still need to provide more specific styles, you can use the `styles` prop."}],"import":"import { ComponentInfo, NodeIconButton } from \"@khanacademy/wonder-blocks-icon-button\";\nimport { Icon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"Node buttons are visual representations of activities along in a Learning Path. When a represented Node is a button that launches the activity. Nodes use the Chonky shadow style. ```tsx import pencilSimpleIcon from \"@phosphor-icons/core/regular/pencil-simple.svg\"; import {NodeIconButton} from \"@khanacademy/wonder-blocks-icon-button\"; <NodeIconButton icon={pencilSimpleIcon} aria-label=\"Edit\" onClick={(e) => console.log(\"Hello, world!\")} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon-button/src/index.ts","description":"Node buttons are visual representations of activities along in a Learning\nPath. When a represented Node is a button that launches the activity. Nodes\nuse the Chonky shadow style.\n\n```tsx\nimport pencilSimpleIcon from \"@phosphor-icons/core/regular/pencil-simple.svg\";\nimport {NodeIconButton} from \"@khanacademy/wonder-blocks-icon-button\";\n\n<NodeIconButton\n    icon={pencilSimpleIcon}\n    aria-label=\"Edit\"\n    onClick={(e) => console.log(\"Hello, world!\")}\n/>\n```","displayName":"NodeIconButton","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\nThe alternative text for the icon button. Required for accessibility.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/node-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"A unique identifier for the IconButton.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the IconButton.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"onMouseDown":{"defaultValue":null,"description":"Function to call when the mouse down event is triggered.","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => void)"}},"onClick":{"defaultValue":null,"description":"Function to call when button is clicked.\n\nThis callback should be used for things like marking BigBingo\nconversions. It should NOT be used to redirect to a different URL or to\nprevent navigation via e.preventDefault(). The event passed to this\nhandler will have its preventDefault() and stopPropagation() methods\nstubbed out.\n\nNote: onClick is optional if href is present, but must be defined if\nhref is not","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: SyntheticEvent<Element, Event>) => unknown)"}},"disabled":{"defaultValue":null,"description":"Whether the icon button is disabled.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"rel":{"defaultValue":null,"description":"Specifies the type of relationship between the current document and the\nlinked document. Should only be used when `href` is specified. This\ndefaults to \"noopener noreferrer\" when `target=\"_blank\"`, but can be\noverridden by setting this prop to something else.","name":"rel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"A target destination window for a link to open in.","name":"target","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"_blank\"","value":[{"value":"\"_blank\""}]}},"skipClientNav":{"defaultValue":null,"description":"Whether to avoid using client-side navigation.\n\nIf the URL passed to href is local to the client-side, e.g.\n/math/algebra/eval-exprs, then it tries to use react-router-dom's Link\ncomponent which handles the client-side navigation. You can set\n`skipClientNav` to true avoid using client-side nav entirely.\n\nNOTE: All URLs containing a protocol are considered external, e.g.\nhttps://khanacademy.org/math/algebra/eval-exprs will trigger a full\npage reload.","name":"skipClientNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"href":{"defaultValue":null,"description":"URL to navigate to.\n\nNote: Either href or onClick must be defined","name":"href","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"type":{"defaultValue":null,"description":"Used for icon buttons within forms.","name":"type","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"button\" | \"submit\"","value":[{"value":"\"button\""},{"value":"\"submit\""}]}},"icon":{"defaultValue":null,"description":"A Phosphor icon asset (imported as a static SVG file), or for\nnon-Phosphor icons, pass in a WB Icon component that wraps the custom\nicon.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/util/icon-button.types.ts","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | PhosphorIconAsset"}},"actionType":{"defaultValue":null,"description":"The action type of the button. This determines the visual style of\nthe button. Defaults to `notStarted`.\n\n- `complete` is used for buttons that indicate a complete action.","name":"actionType","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/node-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"complete\" | \"notStarted\" | \"attempted\"","value":[{"value":"\"complete\""},{"value":"\"notStarted\""},{"value":"\"attempted\""}]}},"size":{"defaultValue":null,"description":"The size of the icon button.\nOne of `small` (24) or `large` (68).\nDefaults to `large`.","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/node-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"small\" | \"large\"","value":[{"value":"\"small\""},{"value":"\"large\""}]}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in the NodeIconButton component.\n- `root`: Styles the root element (button)\n- `box`: Styles the \"chonky\" box element\n- `icon`: Styles the icon element","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/node-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; box?: StyleType; icon?: StyleType; }"}},"tokens":{"defaultValue":null,"description":"The token object that contains the CSS variables that can be overridden\nto customize the appearance of the NodeIconButton component.","name":"tokens","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon-button/src/components/node-icon-button.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ boxForeground?: string; boxBackground?: string; boxShadowColor?: string | undefined; boxPadding?: string | number | undefined; boxShadowYRest?: string | number | undefined; boxShadowYHover?: string | number | undefined; boxShadowYPress?: string | number | undefined; iconSize?: string | number | undefined; } | undefined"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLButtonElement | HTMLAnchorElement | ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"NodeIconButton"}},"packages-icon-accessibility":{"id":"packages-icon-accessibility","name":"PhosphorIcon","path":"./__docs__/wonder-blocks-icon/accessibility.stories.tsx","stories":[{"id":"packages-icon-accessibility--icon-contrast","name":"Icon Contrast","snippet":"const IconContrast = () => (\n    <View\n        style={{\n            flexDirection: \"row\",\n            marginBlockEnd: sizing.size_080,\n        }}\n    >\n        <BodyText>High contrast icon (GOOD):</BodyText>\n        <PhosphorIcon\n            icon={IconMappings.checkCircle}\n            style={{\n                color: semanticColor.core.foreground.instructive.default,\n                marginInlineStart: sizing.size_080,\n            }}\n        />\n    </View>\n);"},{"id":"packages-icon-accessibility--right-to-left-icons","name":"Right to left icons","snippet":"const RightToLeftIcons = () => (\n    <View\n        dir=\"ltr\"\n        style={{\n            flexDirection: \"row\",\n        }}\n    >\n        <PhosphorIcon icon={IconMappings.caretRight} />\n        <BodyText\n            style={{\n                marginInlineStart: sizing.size_080,\n            }}\n        >\n            {\"Left to right\"}\n        </BodyText>\n    </View>\n);"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A `PhosphorIcon` displays a small informational or decorative image as an HTML element that renders a Phosphor Icon SVG available from the `@phosphor-icons/core` package. For more information about the icons catalog, check the [Phosphor Icons website](https://phosphoricons.com/). ## Usage ```tsx import {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\"; import MagnifyingGlass from \"@phosphor-icons/core/regular/magnifying-glass.svg\"; <PhosphorIcon icon={MagnifyingGlass} color={Color.blue} size=\"medium\" style={{margin: sizing.size_020}} /> ``` These icons use rem-based sizing from wonder-blocks-tokens: - small: 1.6rem (16px) - medium: 2.4rem (24px) - large: 4.8rem (48px) - xlarge: 9.6rem (96px)","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon/src/index.ts","description":"A `PhosphorIcon` displays a small informational or decorative image as an\nHTML element that renders a Phosphor Icon SVG available from the\n`@phosphor-icons/core` package.\n\nFor more information about the icons catalog, check the [Phosphor Icons\nwebsite](https://phosphoricons.com/).\n\n## Usage\n\n```tsx\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport MagnifyingGlass from \"@phosphor-icons/core/regular/magnifying-glass.svg\";\n\n<PhosphorIcon\n    icon={MagnifyingGlass}\n    color={Color.blue}\n    size=\"medium\"\n    style={{margin: sizing.size_020}}\n/>\n```\n\nThese icons use rem-based sizing from wonder-blocks-tokens:\n- small: 1.6rem (16px)\n- medium: 2.4rem (24px)\n- large: 4.8rem (48px)\n- xlarge: 9.6rem (96px)","displayName":"PhosphorIcon","methods":[],"props":{"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"The role of the icon. Will default to `img` if an `aria-label` is\nprovided.\n@see https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA24","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"img\"","value":[{"value":"\"img\""}]}},"color":{"defaultValue":null,"description":"The color of the icon. Will default to `currentColor`, which means that\nit will take on the CSS `color` value from the parent element.","name":"color","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"Additional styles to apply to the icon.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the Icon.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"size":{"defaultValue":null,"description":"Size of the icon. One of `small` (1.6rem), `medium` (2.4rem), `large` (4.8rem), or `xlarge` (9.6rem). Defaults to `small`.","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"IconSize","value":[{"value":"\"small\""},{"value":"\"xlarge\""},{"value":"\"large\""},{"value":"\"medium\""}]}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"0 | -1","value":[{"value":"0"},{"value":"-1"}]}},"icon":{"defaultValue":null,"description":"The icon to display. This is a reference to the icon asset (imported as a\nstatic SVG file).\n\nIt supports the following types:\n- `PhosphorIconAsset`: a reference to a Phosphor SVG asset.\n- `string`: an import referencing an arbitrary SVG file.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string | PhosphorIconAsset"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLSpanElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"PhosphorIcon"},"docs":{"packages-icon-accessibility--docs":{"id":"packages-icon-accessibility--docs","name":"Docs","path":"./__docs__/wonder-blocks-icon/accessibility.mdx","title":"Packages / Icon / Accessibility","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as AccessibilityStories from './accessibility.stories';\n\n<Meta of={AccessibilityStories} />\n\n## Icon Accessibility\n\n### Rules of Thumb\n\n* Use familiar or commonly used icons.\n* Each icon should convey a single meaning.\n* Icons should be easy to see.\n* The color contrast should pass WCAG.\n  * At least 3:1 contrast ratio for icons.\n* Ideally, an icon should be accompanied by text. However, if an icon\n  is not accompanied by text, provide an `aria-label` attribute.\n  * If you are using `aria-label`, make sure to also use `role=\"img\"` so that\n    screen readers know that the element is an image and not just decorative\n    text.\n  * If the icon is decorative, set `aria-hidden` to `true` and do not provide an\n   `aria-label`. This will hide the icon from screen readers.\n  * The `title` attribute is often used to display a description on mouse\n    hover, but please note that use of the `title` attribute is discouraged\n    as titles are not available to keyboard-only or touch-only users.\n    More information can be found in the [References](#references) below.\n* Icons should go on the opposite side as left-to-right languages\n  for right-to-left languages.\n  * The icon may also need to be mirrored.\n\nMore information about all these points can be found in the\n[References](#references) below.\n\n### Demo: Contrast\n\n<Canvas of={AccessibilityStories.IconContrast} />\n\n### Demo: Right-to-left icons\n\n<Canvas of={AccessibilityStories.RightToLeftIcons} />\n\n### References\n\n* [Use Icons that Help the User - W3](https://www.w3.org/WAI/WCAG2/supplemental/patterns/o1p07-icons-used/)\n* [Bidirectionality - Material](https://m2.material.io/design/usability/bidirectionality.html)\n* [Accessible Icons: How to Make Them for Your Website](https://blog.hubspot.com/website/accessible-icons)\n* [HTML5 Accessibility Chops: title attribute use and abuse](https://www.tpgi.com/html5-accessibility-chops-title-attribute-use-and-abuse/)\n* [Non-text Contrast (Level AA) - W3](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html)\n"}}},"packages-icon-custom-icon-components":{"id":"packages-icon-custom-icon-components","name":"GemIcon","path":"./__docs__/wonder-blocks-icon/custom-icon-components.stories.tsx","stories":[{"id":"packages-icon-custom-icon-components--all-custom-icons","name":"All Custom Icons","snippet":"const AllCustomIcons = () => <View\n    style={{\n        gap: sizing.size_240,\n        flexDirection: \"row\",\n    }}>\n    <GemIcon />\n    <StreakIcon />\n    {/* Add other custom icons here */}\n</View>;"},{"id":"packages-icon-custom-icon-components--with-icon-component","name":"With Icon Component","snippet":"const WithIconComponent = () => <View\n    style={{\n        gap: sizing.size_240,\n        flexDirection: \"row\",\n    }}>\n    <Icon size=\"large\">\n        <GemIcon />\n    </Icon>\n    <Icon size=\"large\">\n        <StreakIcon />\n    </Icon>\n</View>;","description":"Use the `Icon` component to display the custom icon components."},{"id":"packages-icon-custom-icon-components--custom-icons-with-custom-style","name":"Custom Icons With Custom Style","snippet":"const CustomIconsWithCustomStyle = () => <GemIcon\n    style={{\n        backgroundColor: semanticColor.core.background.base.subtle,\n        padding: sizing.size_040,\n        borderRadius: border.radius.radius_040,\n        border: `${border.width.thin} solid ${semanticColor.core.border.neutral.subtle}`,\n    }} />;","description":"Custom icons can be styled using the `style` prop."},{"id":"packages-icon-custom-icon-components--gem","name":"GemIcon","snippet":"const Gem = () => <GemIcon aria-label=\"Gem\" />;","description":"Use the `GemIcon` component to represent gems."},{"id":"packages-icon-custom-icon-components--streak","name":"StreakIcon","snippet":"const Streak = () => <StreakIcon aria-label=\"Streak\" />;","description":"Use the `StreakIcon` component to represent a streak."}],"import":"import { ComponentInfo, GemIcon, Icon, StreakIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"Custom icon components that render an inline svg. Use with the `Icon` component to display the icon. Custom icon components use semantic color tokens for the different parts of the icon so they will respond to the current theme.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon/src/index.ts","description":"A custom icon component that renders a gem icon using an inline svg. Use\nwith the `Icon` component to display the icon.\n\nThe icon uses semantic color tokens for the different parts of the icon so\nit will respond to the current theme.","displayName":"GemIcon","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\nThe alternative text for the icon. If `aria-label` or `aria-labelledby`\nis not provided, the icon will be marked with `aria-hidden=true`..\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\nThe id of the element that provides the alternative text for the icon.\nIf `aria-label` is not provided, the icon will be marked with\n`aria-hidden=true`.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The id for the element.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"The test id for the element.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"The style for the element.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<SVGSVGElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"GemIcon"}},"packages-icon-icon-utilities":{"id":"packages-icon-icon-utilities","name":"IconUtilities","path":"./__docs__/wonder-blocks-icon/icon-utilities.stories.tsx","stories":[],"import":"import { ComponentInfo } from \"wonder-blocks\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n   7 | import {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\n   8 |\n>  9 | export default {\n     | ^\n  10 |     tags: [\"!manifest\"],\n  11 |     title: \"Packages / Icon / Icon Utilities\",\n  12 |     parameters: {\n\n./__docs__/wonder-blocks-icon/icon-utilities.mdx:\nimport * as React from \"react\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\nimport {action} from \"storybook/actions\";\nimport ComponentInfo from \"../components/component-info\";\nimport packageConfig from \"../../packages/wonder-blocks-form/package.json\";\nimport {useImageRoleAttributes} from \"@khanacademy/wonder-blocks-icon\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\n\nexport default {\n    tags: [\"!manifest\"],\n    title: \"Packages / Icon / Icon Utilities\",\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        chromatic: {\n            // Snapshots are not needed for utility examples\n            disableSnapshot: true,\n        },\n    },\n} as Meta;\n\ntype StoryComponentType = StoryObj;\n\nexport const UseImageRoleAttributesWithLabel: StoryComponentType = {\n    name: \"useImageRoleAttributes (with label)\",\n    args: {},\n    render: function Example() {\n        const attributes = useImageRoleAttributes({\n            \"aria-label\": \"Example label for icon\",\n        });\n\n        action(\"attributes\")(attributes);\n        return (\n            <svg\n                {...attributes}\n                style={{\n                    width: sizing.size_320,\n                    height: sizing.size_320,\n                }}\n                viewBox=\"0 0 256 256\"\n                fill={semanticColor.core.foreground.neutral.default}\n                xmlns=\"http://www.w3.org/2000/svg\"\n            >\n                <title>Crown</title>\n                <path d=\"M256 77.7348C256 69.003 244.93 65.24 239.609 72.1631L193.306 132.406C189.414 137.467 181.665 137.085 178.293 131.663L135.762 63.3127C132.186 57.5624 123.814 57.5625 120.238 63.3127L77.7083 131.663C74.3356 137.085 66.5871 137.467 62.6964 132.406L16.3919 72.1626C11.0705 65.2396 0 69.0026 0 77.7344V178.837C0 188.936 8.18688 197.122 18.2857 197.122H237.714C247.813 197.122 256 188.936 256 178.837V77.7348Z\" />\n            </svg>\n        );\n    },\n};\n\nexport const UseImageRoleAttributesWithNoLabel: StoryComponentType = {\n    name: \"useImageRoleAttributes (with no label)\",\n    args: {},\n    render: function Example() {\n        const attributes = useImageRoleAttributes({});\n\n        action(\"attributes\")(attributes);\n        return (\n            <svg\n                {...attributes}\n                style={{\n                    width: sizing.size_320,\n                    height: sizing.size_320,\n                }}\n                viewBox=\"0 0 256 256\"\n                fill={semanticColor.core.foreground.neutral.default}\n                xmlns=\"http://www.w3.org/2000/svg\"\n            >\n                <title>Crown</title>\n                <path d=\"M256 77.7348C256 69.003 244.93 65.24 239.609 72.1631L193.306 132.406C189.414 137.467 181.665 137.085 178.293 131.663L135.762 63.3127C132.186 57.5624 123.814 57.5625 120.238 63.3127L77.7083 131.663C74.3356 137.085 66.5871 137.467 62.6964 132.406L16.3919 72.1626C11.0705 65.2396 0 69.0026 0 77.7344V178.837C0 188.936 8.18688 197.122 18.2857 197.122H237.714C247.813 197.122 256 188.936 256 178.837V77.7348Z\" />\n            </svg>\n        );\n    },\n};\n"},"docs":{"packages-icon-icon-utilities--docs":{"id":"packages-icon-icon-utilities--docs","name":"Docs","path":"./__docs__/wonder-blocks-icon/icon-utilities.mdx","title":"Packages / Icon / Icon Utilities","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as IconUtilitiesStories from './icon-utilities.stories';\n\n<Meta of={IconUtilitiesStories} />\n\n# Icon Utilities\n\n## `useImageRoleAttributes(props)` hook\n\n```tsx\nimport {useImageRoleAttributes} from \"@khanacademy/wonder-blocks-icon\";\n```\n\n### Description\n\nThe `useImageRoleAttributes` hook determines what attributes should be applied\nto an element that represents as image, such as an `svg` element or a `span`\nwith a `background-image`.\n\n**This hook should not be used with `img` elements. Use the `alt` attribute on\n`img` tags instead!**\n\nHow it works:\n- If an `aria-label` or `aria-labelledby` is provided, it will be used and the\nattributes will include `role=\"img\"`. This means the icon conveys meaning and\nwill communicate the label to screen reader users.\n- If neither of these are provided, the attributes will include `aria-hidden=true`.\nThis means that the icon is decorative only and should not be communicated to\nscreen reader users.\n\n### Arguments\n\n- `props`: An object that contains:\n```tsx\ntype Props = {\n    \"aria-label\"?: string\n    \"aria-labelledby\"?: string\n}\n```\n\n### Returns\n\nThe hook returns an object of HTML attributes that should be applied to the\nelement that represents an image (example: an `svg` or `span` element).\n\n### Examples\n\n#### With Label\n\nThis example shows how to use the hook to get attributes for the icon. It also\nlogs the attributes provided by the hook. It provides an `aria-label` for the\nhook. When using a screen reader, the label is communicated to the user.\n\nThis is useful for scenarios where an icon conveys meaning.\n\n<Canvas of={IconUtilitiesStories.UseImageRoleAttributesWithLabel} />\n\n#### With No Label\n\nThis example shows the behaviour when no label is passed to the hook. When\nusing a screen reader, the icon is not communicated to the user.\n\nThis is useful for scenarios where an icon is decorative only.\n\n<Canvas of={IconUtilitiesStories.UseImageRoleAttributesWithNoLabel} />\n"}}},"packages-icon-icon":{"id":"packages-icon-icon","name":"Icon","path":"./__docs__/wonder-blocks-icon/icon.stories.tsx","stories":[{"id":"packages-icon-icon--default","name":"Default","snippet":"const Default = () => <Icon><img src=\"logo.svg\" alt=\"Wonder Blocks\" /></Icon>;"},{"id":"packages-icon-icon--sizes","name":"Sizes","snippet":"const Sizes = () => {\n    return (\n        <View style={styles.container}>\n            {([\"small\", \"medium\", \"large\", \"xlarge\"] as const).map(\n                (size) => (\n                    <View style={styles.iconContainer} key={size}>\n                        <BodyText size=\"small\">{size}</BodyText>\n                        <Icon size={size}>\n                            <img src=\"logo.svg\" alt=\"Wonder Blocks\" />\n                        </Icon>\n                    </View>\n                ),\n            )}\n        </View>\n    );\n};","description":"The different sizes supported by the Icon component."},{"id":"packages-icon-icon--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => <Icon\n    size=\"xlarge\"\n    style={{\n        borderRadius: border.radius.radius_full,\n        overflow: \"hidden\",\n    }}><img src=\"logo.svg\" alt=\"Wonder Blocks\" /></Icon>;","description":"Custom styles can be applied to the icon using the `style` prop."},{"id":"packages-icon-icon--compatible-elements","name":"Compatible Elements","snippet":"const CompatibleElements = () => {\n    return (\n        <View style={{gap: sizing.size_160}}>\n            <BodyText size=\"small\">Img element with .svg src</BodyText>\n            <Icon size=\"large\">\n                <img src=\"logo.svg\" alt=\"Wonder Blocks\" />\n            </Icon>\n            <BodyText size=\"small\">Img element with .png src</BodyText>\n            <Icon size=\"large\">\n                <img src=\"avatar.png\" alt=\"Example avatar\" />\n            </Icon>\n            <BodyText size=\"small\">Inline single-colored svg</BodyText>\n            <Icon size=\"large\">{singleColoredIcon}</Icon>\n            <BodyText size=\"small\">Inline multi-colored svg</BodyText>\n            <Icon size=\"large\">{multiColoredIcon}</Icon>\n            <BodyText size=\"small\">Custom Icon Components</BodyText>\n            <View style={{gap: sizing.size_080, flexDirection: \"row\"}}>\n                <Icon size=\"large\">\n                    <GemIcon aria-label=\"Gem\" />\n                </Icon>\n                <Icon size=\"large\">\n                    <StreakIcon aria-label=\"Streak\" />\n                </Icon>\n            </View>\n        </View>\n    );\n};","description":"The Icon component can be used with: - `img` elements - Inline svg elements - Custom icon components from the Wonder Blocks Icon package"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, GemIcon, Icon, StreakIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A component for displaying a custom icon. The Icon component supports custom icons that are `img` elements or inline svg assets with their own fill. Related components: - For Phosphor icons, use the `PhosphorIcon` component. - For custom icons that are single colored svg assets, use the `PhosphorIcon` component, which supports changing the color of the icon. - If the icon is interactive, use `IconButton` instead.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon/src/index.ts","description":"A component for displaying a custom icon. The Icon component supports custom\nicons that are `img` elements or inline svg assets with their own fill.\n\nRelated components:\n- For Phosphor icons, use the `PhosphorIcon` component.\n- For custom icons that are single colored svg assets, use the `PhosphorIcon`\ncomponent, which supports changing the color of the icon.\n- If the icon is interactive, use `IconButton` instead.","displayName":"Icon","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"The id for the icon component.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"The test id for the icon component.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"Custom styles to apply to the icon component.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"size":{"defaultValue":null,"description":"Size of the icon. One of `small` (16), `medium` (24), `large` (48), or\n`xlarge` (96). Defaults to `small`.","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"IconSize","value":[{"value":"\"small\""},{"value":"\"xlarge\""},{"value":"\"large\""},{"value":"\"medium\""}]}},"children":{"defaultValue":null,"description":"The icon to display. This can be an inline svg or an image.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/icon.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>>"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Icon"}},"packages-icon-phosphoricon":{"id":"packages-icon-phosphoricon","name":"PhosphorIcon","path":"./__docs__/wonder-blocks-icon/phosphor-icon.stories.tsx","stories":[{"id":"packages-icon-phosphoricon--default","name":"Default","snippet":"const Default = () => <PhosphorIcon\n    icon={IconMappings.magnifyingGlassBold}\n    size=\"small\"\n    aria-label=\"Search\"\n    role=\"img\" />;","description":"Minimal icon usage. This is a search icon. Icons are size `\"small\"` by default."},{"id":"packages-icon-phosphoricon--sizes","name":"Sizes","snippet":"const Sizes = () => {\n    return (\n        <View style={styles.container}>\n            <View style={styles.row}>\n                <BodyText>small</BodyText>\n                <PhosphorIcon\n                    icon={IconMappings.magnifyingGlassBold}\n                    size=\"small\"\n                />\n            </View>\n            <View style={styles.row}>\n                <BodyText>medium</BodyText>\n                <PhosphorIcon\n                    icon={IconMappings.magnifyingGlass}\n                    size=\"medium\"\n                />\n            </View>\n            <View style={styles.row}>\n                <BodyText>large</BodyText>\n\n                <PhosphorIcon\n                    icon={IconMappings.magnifyingGlass}\n                    size=\"large\"\n                />\n            </View>\n            <View style={styles.row}>\n                <BodyText>xlarge</BodyText>\n\n                <PhosphorIcon\n                    icon={IconMappings.magnifyingGlass}\n                    size=\"xlarge\"\n                />\n            </View>\n        </View>\n    );\n};","description":"The size of an icon is determined by the `PhosphorIcon`'s `size` prop. The available sizes are `\"small\"`, `\"medium\"`, `\"large\"`, and `\"xlarge\"`. __IMPORTANT NOTES:__ It's up to the consumer to make sure that the icon is legible at the specified size. For example, the `magnifyingGlassRegular` icon is not legible at the `\"small\"` size. - `small` size icons are recommended for use with `bold` or `fill` weights. - `medium` size icons are recommended for use with `regular` or `fill` weights. - `large` and `xlarge` size icons work well with all weights."},{"id":"packages-icon-phosphoricon--variants","name":"Variants","snippet":"const Variants = () => {\n    const iconsWithLabels = Object.entries(groupIconsByNames()).map(\n        ([name, iconsGroup], index) => {\n            if (!iconsGroup) {\n                return null;\n            }\n            const SmallIcon = iconsGroup.small;\n            const MediumIcon = iconsGroup.medium;\n            return (\n                <tr key={index}>\n                    <StyledTd style={styles.tableCell}>\n                        <BodyText>{name}</BodyText>\n                    </StyledTd>\n                    <StyledTd style={styles.tableCell}>\n                        {SmallIcon && (\n                            <PhosphorIcon icon={SmallIcon} size=\"small\" />\n                        )}\n                    </StyledTd>\n                    <StyledTd style={styles.tableCell}>\n                        {MediumIcon && (\n                            <PhosphorIcon icon={MediumIcon} size=\"medium\" />\n                        )}\n                    </StyledTd>\n                </tr>\n            );\n        },\n    );\n\n    return (\n        <StyledTable style={[styles.table, styles.tableCell]}>\n            <thead>\n                <tr>\n                    <StyledTh style={styles.tableCell}>Name</StyledTh>\n                    <StyledTh style={styles.tableCell}>small</StyledTh>\n                    <StyledTh style={styles.tableCell}>medium</StyledTh>\n                </tr>\n            </thead>\n            <tbody>{iconsWithLabels}</tbody>\n        </StyledTable>\n    );\n};","description":"The icons are defined in the Phosphor Icons package. We just import them and pass them to the `PhosphorIcon` component. See https://phosphoricons.com/ for the full list of icons. __NOTE:__ If you want to know how to migrate from the old icon naming system to the new one, check out the [table of equivalences](https://khanacademy.atlassian.net/wiki/spaces/WB/pages/2409201709/Audit+-+Custom+icon+paths+Phosphor#1.-WB-official-icons)."},{"id":"packages-icon-phosphoricon--with-color","name":"With Color","snippet":"const WithColor = () => <PhosphorIcon\n    size=\"small\"\n    icon={IconMappings.infoBold}\n    color={semanticColor.core.foreground.critical.default} />;","description":"The color of an icon can be specified through its `color` prop."},{"id":"packages-icon-phosphoricon--inline","name":"Inline","snippet":"const Inline = () => {\n    return (\n        <BodyText tag=\"p\">\n            Here is an icon\n            <PhosphorIcon\n                size=\"small\"\n                icon={IconMappings.infoBold}\n                style={styles.inline}\n                className=\"foo\"\n            />\n            when it is inline.\n        </BodyText>\n    );\n};","description":"Icons have `display: inline-block` by default."},{"id":"packages-icon-phosphoricon--custom-icons","name":"Custom Icons","snippet":"const CustomIcons = () => {\n    const customIcoms = {\n        article: articleIcon,\n        course: courseIcon,\n        crown: crownIcon,\n        masteryCourse: masteryCourseIcon,\n        masteryCourseBold: masteryCourseIconBold,\n    };\n\n    return (\n        <View style={styles.row}>\n            {Object.entries(customIcoms).map(([name, icon], index) => (\n                <View style={styles.container} key={index}>\n                    <Heading size=\"medium\">{name}</Heading>\n                    <PhosphorIcon icon={icon} size=\"small\" />\n                    <PhosphorIcon icon={icon} size=\"medium\" />\n                    <PhosphorIcon icon={icon} size=\"large\" />\n                    <PhosphorIcon icon={icon} size=\"xlarge\" />\n                </View>\n            ))}\n        </View>\n    );\n};","description":"Icons can be customized by passing in a custom icon. The icon should be an SVG file imported as a static asset. You can take a look at the source file of any of the following icons to see how they are generated. ```tsx // This SVG should have the following attributes: // - viewBox=\"0 0 256 256\" // - fill=\"currentColor\" // - A path (or paths) scaled up to fit in the 256x256 viewport. import crownIcon from \"./icons/crown.svg\"; <PhosphorIcon icon={crownIcon} size=\"small\" /> ``` __NOTE:__ If you want to know how to create a custom icon, check out the [Exporting icon assets - Web](https://khanacademy.atlassian.net/wiki/x/SwD6gg#Web) section."},{"id":"packages-icon-phosphoricon--descriptive-icon","name":"Announcing the icon to assistive technology","snippet":"const DescriptiveIcon = () => <PhosphorIcon\n    icon={IconMappings.magnifyingGlassBold}\n    size=\"small\"\n    role=\"img\"\n    aria-label=\"Search\" />;","description":"Icons are not announced by default, as they are usually decorative. However, if you want to announce the icon, you can pass an `aria-label` and `role=\"img\"` props to the `PhosphorIcon` component."},{"id":"packages-icon-phosphoricon--decorative-icon","name":"Decorative Icon","snippet":"const DecorativeIcon = () => <PhosphorIcon icon={IconMappings.magnifyingGlassBold} size=\"small\" aria-hidden />;","description":"A decorative icon with `aria-hidden` set to `true` and no `aria-label` set. This hides the icon from screen readers since it is decorative."}],"import":"import Banner from \"@khanacademy/wonder-blocks-banner\";\nimport { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A `PhosphorIcon` displays a small informational or decorative image as an HTML element that renders a Phosphor Icon SVG available from the `@phosphor-icons/core` package. For more information about the icons catalog, check the [Phosphor Icons website](https://phosphoricons.com/). ## Usage ```tsx import magnifyingGlassIcon from \"@phosphor-icons/core/regular/magnifying-glass.svg\"; import {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\"; <PhosphorIcon icon={magnifyingGlassIcon} color={Color.blue} size=\"medium\" style={{margin: sizing.size_020}} /> ``` These icons use rem-based sizing from wonder-blocks-tokens: - small: 1.6rem (16px) - medium: 2.4rem (24px) - large: 4.8rem (48px) - xlarge: 9.6rem (96px)","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-icon/src/index.ts","description":"A `PhosphorIcon` displays a small informational or decorative image as an\nHTML element that renders a Phosphor Icon SVG available from the\n`@phosphor-icons/core` package.\n\nFor more information about the icons catalog, check the [Phosphor Icons\nwebsite](https://phosphoricons.com/).\n\n## Usage\n\n```tsx\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport MagnifyingGlass from \"@phosphor-icons/core/regular/magnifying-glass.svg\";\n\n<PhosphorIcon\n    icon={MagnifyingGlass}\n    color={Color.blue}\n    size=\"medium\"\n    style={{margin: sizing.size_020}}\n/>\n```\n\nThese icons use rem-based sizing from wonder-blocks-tokens:\n- small: 1.6rem (16px)\n- medium: 2.4rem (24px)\n- large: 4.8rem (48px)\n- xlarge: 9.6rem (96px)","displayName":"PhosphorIcon","methods":[],"props":{"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"The role of the icon. Will default to `img` if an `aria-label` is\nprovided.\n@see https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA24","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"img\"","value":[{"value":"\"img\""}]}},"color":{"defaultValue":null,"description":"The color of the icon. Will default to `currentColor`, which means that\nit will take on the CSS `color` value from the parent element.","name":"color","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"style":{"defaultValue":null,"description":"Additional styles to apply to the icon.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the Icon.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"size":{"defaultValue":null,"description":"Size of the icon. One of `small` (1.6rem), `medium` (2.4rem), `large` (4.8rem), or `xlarge` (9.6rem). Defaults to `small`.","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"IconSize","value":[{"value":"\"small\""},{"value":"\"xlarge\""},{"value":"\"large\""},{"value":"\"medium\""}]}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"0 | -1","value":[{"value":"0"},{"value":"-1"}]}},"icon":{"defaultValue":null,"description":"The icon to display. This is a reference to the icon asset (imported as a\nstatic SVG file).\n\nIt supports the following types:\n- `PhosphorIconAsset`: a reference to a Phosphor SVG asset.\n- `string`: an import referencing an arbitrary SVG file.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-icon/src/components/phosphor-icon.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string | PhosphorIconAsset"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLSpanElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"PhosphorIcon"}},"packages-labeledfield":{"id":"packages-labeledfield","name":"LabeledField","path":"./__docs__/wonder-blocks-labeled-field/labeled-field.stories.tsx","stories":[{"id":"packages-labeledfield--default","name":"Default","snippet":"const Default = () => <LabeledField\n    field={<TextField value=\"\" onChange={() => {}} />}\n    label=\"Name\"\n    description=\"Helpful description text.\"\n    contextLabel=\"Context label\" />;"},{"id":"packages-labeledfield--helper-text","name":"Helper Text","snippet":"const HelperText = () => {\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <Heading>A field with an error message</Heading>\n            <LabeledField\n                field={<TextField value=\"\" onChange={() => {}} />}\n                label=\"Name\"\n                description=\"Helpful description text\"\n                errorMessage=\"Error message\" />\n            <Heading>A field with a read only message</Heading>\n            <LabeledField\n                field={<TextField value=\"\" onChange={() => {}} />}\n                label=\"Name\"\n                description=\"Helpful description text\"\n                readOnlyMessage=\"Read only message\" />\n            <Heading>A field with an additional helper message</Heading>\n            <LabeledField\n                field={<TextField value=\"\" onChange={() => {}} />}\n                label=\"Name\"\n                description=\"Helpful description text\"\n                additionalHelperMessage=\"Additional helper message\" />\n            <Heading>A field with an error, readonly, and additional helper\n                                    message\n                                </Heading>\n            <LabeledField\n                field={<TextField value=\"\" onChange={() => {}} />}\n                label=\"Name\"\n                description=\"Helpful description text\"\n                errorMessage=\"Error message\"\n                readOnlyMessage=\"Read only message\"\n                additionalHelperMessage=\"Additional helper message\" />\n        </View>\n    );\n};","description":"Consider the following when providing helper text: - Use the `description` prop for the main helper text for a field - If providing an error message for the field, use the `errorMessage` prop - If providing a message related to the read only state for the field, use the `readOnlyMessage` prop - For any other helper text, use the `additionalHelperMessage` prop If all of these props are used, they will all be shown. It us up to the consuming application to manage when the helper text is shown. When any of these props are used, the field's `aria-describedby` attribute will include the id of the element for the corresponding prop."},{"id":"packages-labeledfield--context-label","name":"Context Label","snippet":"const ContextLabel = () => {\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <LabeledField\n                field={<TextField value=\"\" onChange={() => {}} />}\n                label=\"Label\"\n                contextLabel=\"Context label\" />\n            <LabeledField\n                field={<TextField value=\"\" onChange={() => {}} />}\n                label=\"Label\"\n                contextLabel=\"required\" />\n            <LabeledField\n                field={<TextField value=\"\" onChange={() => {}} />}\n                label=\"Label\"\n                contextLabel=\"optional\" />\n        </View>\n    );\n};","description":"The `contextLabel` prop can be used to show a translated \"required\" or \"optional\" label for the field. See the [Required](#required) docs for more information on required form validation in fields!"},{"id":"packages-labeledfield--fields","name":"Fields","snippet":"const Fields = () => {\n    return (\n        <View style={{gap: sizing.size_240}}>\n            <Heading>Default</Heading>\n            <AllFields description=\"Helpful description text.\" contextLabel=\"Context label\" />\n            <Heading>Error</Heading>\n            <AllFields\n                description=\"Helpful description text.\"\n                contextLabel=\"Context label\"\n                errorMessage=\"Message about the error\" />\n            <Heading>Disabled</Heading>\n            <AllFields\n                description=\"Helpful description text.\"\n                contextLabel=\"Context label\"\n                disabled />\n            <Heading>Read Only</Heading>\n            <AllFields\n                description=\"Helpful description text.\"\n                contextLabel=\"Context label\"\n                textValue={\"Value\"}\n                readOnlyMessage=\"Message about why it is read only\" />\n        </View>\n    );\n};","description":"The `LabeledField` component can be used with form field components such as: - `TextField` - `TextArea` - `SingleSelect` - `MultiSelect` - `SearchField` The `LabeledField`'s `errorMessage` prop can be used to define the error message to show for the field. It will also put the field component in an error state by auto-populating the field's `error` prop depending on if there is an error message. Because of this, LabeledField works best with field components that accept `error` and `readOnly` props since these props will get auto-populated by LabeledField."},{"id":"packages-labeledfield--required","name":"Required","snippet":"const Required = () => <AllFields\n    description=\"Helpful description text.\"\n    showSubmitButtonInStory\n    contextLabel=\"required\"\n    required=\"Custom required error message\" />;","description":"If it is mandatory for a user to fill out a field, it can be marked as required by: - using the `contextLabel` prop for a \"required\" label on the `LabeledField` component for the field - providing a `required` prop on the `field` component If field's `required` prop is used and the field's `onValidate` prop sets LabeledField's `errorMessage` prop, the error message for the required field will be shown. Note: The validation around required fields is only triggered if a field is interacted with. If the form is submitted with required empty fields, it is up to the parent component to set the `errorMessage` prop on the LabeledField component."},{"id":"packages-labeledfield--validation","name":"Validation","snippet":"const Validation = () => {\n    const {\n        shouldValidateInStory,\n        showSubmitButtonInStory,\n        showBannerOnErrorInStory = false,\n        disabled,\n        textValue,\n        ...args\n    } = storyArgs;\n\n    /** Values */\n    const [textFieldValue, setTextFieldValue] = React.useState(textValue || \"\");\n    const [textAreaValue, setTextAreaValue] = React.useState(textValue || \"\");\n    const [singleSelectValue, setSingleSelectValue] = React.useState(\"\");\n    const [multiSelectValue, setMultiSelectValue] = React.useState<string[]>(\n        [],\n    );\n    const [searchValue, setSearchValue] = React.useState(\"\");\n\n    /** Error messages */\n    const errorMessage =\n        typeof args.errorMessage === \"string\" ? args.errorMessage : \"\";\n    const [textFieldErrorMessage, setTextFieldErrorMessage] = React.useState<\n        string | null | undefined\n    >(errorMessage);\n    const [textAreaErrorMessage, setTextAreaErrorMessage] = React.useState<\n        string | null | undefined\n    >(errorMessage);\n    const [singleSelectErrorMessage, setSingleSelectErrorMessage] =\n        React.useState<string | null | undefined>(errorMessage);\n    const [multiSelectErrorMessage, setMultiSelectErrorMessage] =\n        React.useState<string | null | undefined>(errorMessage);\n    const [searchErrorMessage, setSearchErrorMessage] = React.useState<\n        string | null | undefined\n    >(errorMessage);\n\n    /** Refs */\n    const textFieldRef = React.useRef<HTMLInputElement | null>(null);\n    const textAreaRef = React.useRef<HTMLTextAreaElement | null>(null);\n    const singleSelectRef = React.useRef<HTMLButtonElement | null>(null);\n    const multiSelectRef = React.useRef<HTMLButtonElement | null>(null);\n    const searchRef = React.useRef<HTMLInputElement | null>(null);\n\n    const [isFormSubmitted, setIsFormSubmitted] = React.useState(false);\n\n    const [bannerErrors, setBannerErrors] = React.useState<\n        {label: string; message: string | null | undefined}[]\n    >([]);\n\n    const moveFocusToFirstFieldWithError = React.useCallback(() => {\n        // The errors in the order they are presented, along with the refs\n        const errors = [\n            {message: textFieldErrorMessage, ref: textFieldRef},\n            {message: textAreaErrorMessage, ref: textAreaRef},\n            {message: singleSelectErrorMessage, ref: singleSelectRef},\n            {message: multiSelectErrorMessage, ref: multiSelectRef},\n            {message: searchErrorMessage, ref: searchRef},\n        ];\n\n        for (const error of errors) {\n            if (error.message && error.ref?.current) {\n                error.ref.current.focus();\n                break;\n            }\n        }\n    }, [\n        multiSelectErrorMessage,\n        multiSelectRef,\n        searchErrorMessage,\n        searchRef,\n        singleSelectErrorMessage,\n        singleSelectRef,\n        textAreaErrorMessage,\n        textAreaRef,\n        textFieldErrorMessage,\n        textFieldRef,\n    ]);\n\n    React.useEffect(() => {\n        if (isFormSubmitted) {\n            // If the form has been submitted, move focus. We use useEffect\n            // so that the error message states are updated before we move focus\n            moveFocusToFirstFieldWithError();\n            // Snapshot the errors at submission time so the banner only\n            // updates when the form is submitted, not as fields are corrected\n            setBannerErrors(\n                [\n                    {label: \"Text Field\", message: textFieldErrorMessage},\n                    {label: \"Text Area\", message: textAreaErrorMessage},\n                    {\n                        label: \"Single Select\",\n                        message: singleSelectErrorMessage,\n                    },\n                    {\n                        label: \"Multi Select\",\n                        message: multiSelectErrorMessage,\n                    },\n                    {label: \"Search\", message: searchErrorMessage},\n                ].filter((e) => Boolean(e.message)),\n            );\n            setIsFormSubmitted(false);\n        }\n    }, [\n        isFormSubmitted,\n        moveFocusToFirstFieldWithError,\n        textFieldErrorMessage,\n        textAreaErrorMessage,\n        singleSelectErrorMessage,\n        multiSelectErrorMessage,\n        searchErrorMessage,\n    ]);\n\n    const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n        event.preventDefault();\n        const backendErrorMessage = \"Example server side error message\";\n        if (args.required) {\n            const requiredMsg =\n                typeof args.required === \"string\"\n                    ? args.required\n                    : \"Story default required msg\";\n            if (!textFieldValue) {\n                setTextFieldErrorMessage(requiredMsg);\n            }\n            if (!textAreaValue) {\n                setTextAreaErrorMessage(requiredMsg);\n            }\n            if (!singleSelectValue) {\n                setSingleSelectErrorMessage(requiredMsg);\n            }\n            if (multiSelectValue.length === 0) {\n                setMultiSelectErrorMessage(requiredMsg);\n            }\n            if (!searchValue) {\n                setSearchErrorMessage(requiredMsg);\n            }\n        } else {\n            setTextFieldErrorMessage(`${backendErrorMessage} for text field`);\n            setTextAreaErrorMessage(`${backendErrorMessage} for text area`);\n            setSingleSelectErrorMessage(\n                `${backendErrorMessage} for single select`,\n            );\n            setMultiSelectErrorMessage(\n                `${backendErrorMessage} for multi select`,\n            );\n            setSearchErrorMessage(`${backendErrorMessage} for search`);\n        }\n        setIsFormSubmitted(true);\n    };\n\n    const textDescription = shouldValidateInStory\n        ? \"Trigger error by entering text that is 4 characters or less\"\n        : args.description;\n    const selectDescription = shouldValidateInStory\n        ? \"Trigger error by selecting mango\"\n        : args.description;\n\n    const textValidate = (value: string) => {\n        if (value.length < 5) {\n            return \"Should be 5 or more characters\";\n        }\n    };\n\n    const singleSelectValidate = (value?: string | null) => {\n        if (value === \"mango\") {\n            return \"Don't pick mango!\";\n        }\n    };\n\n    const multiSelectValidate = (values: string[]) => {\n        if (values.includes(\"mango\")) {\n            return \"Don't pick mango!\";\n        }\n    };\n\n    const bannerErrorCount = bannerErrors.length;\n\n    return (\n        <StyledForm\n            onSubmit={handleSubmit}\n            style={{\n                display: \"flex\",\n                flexDirection: \"column\",\n                gap: sizing.size_240,\n            }}>\n            {bannerErrorCount > 1 && showBannerOnErrorInStory && (\n                <Banner\n                    kind=\"critical\"\n                    text={\n                        <>\n                            {`There are ${bannerErrorCount} errors in this form. Please review the fields below.`}\n\n                            <StyledUl style={styles.bannerUl}>\n                                {bannerErrors.map((e) => (\n                                    <StyledLi\n                                        key={e.label}\n                                        style={styles.bannerLi}\n                                    >\n                                        <b>{e.label}:</b> {e.message}\n                                    </StyledLi>\n                                ))}\n                            </StyledUl>\n                        </>\n                    }\n                />\n            )}\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={textFieldErrorMessage}\n                label=\"Text Field\"\n                description={textDescription}\n                field={\n                    <TextField\n                        ref={textFieldRef}\n                        value={textFieldValue}\n                        onChange={setTextFieldValue}\n                        onValidate={setTextFieldErrorMessage}\n                        validate={\n                            shouldValidateInStory ? textValidate : undefined\n                        }\n                        instantValidation={false}\n                        disabled={disabled}\n                        required={args.required}\n                    />\n                } />\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={textAreaErrorMessage}\n                label=\"Text Area\"\n                description={textDescription}\n                field={\n                    <TextArea\n                        ref={textAreaRef}\n                        value={textAreaValue}\n                        onChange={setTextAreaValue}\n                        onValidate={setTextAreaErrorMessage}\n                        validate={\n                            shouldValidateInStory ? textValidate : undefined\n                        }\n                        instantValidation={false}\n                        disabled={disabled}\n                        required={args.required}\n                    />\n                } />\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={singleSelectErrorMessage}\n                label=\"Single Select\"\n                description={selectDescription}\n                field={\n                    <SingleSelect\n                        // ref={singleSelectRef} // TODO(WB-1841) once SingleSelect supports ref\n                        placeholder=\"Choose a fruit\"\n                        selectedValue={singleSelectValue}\n                        onChange={setSingleSelectValue}\n                        onValidate={setSingleSelectErrorMessage}\n                        validate={singleSelectValidate}\n                        disabled={disabled}\n                        required={args.required}\n                    >\n                        <OptionItem label=\"Mango\" value=\"mango\" />\n                        <OptionItem label=\"Strawberry\" value=\"strawberry\" />\n                        <OptionItem label=\"Banana\" value=\"banana\" />\n                    </SingleSelect>\n                } />\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={multiSelectErrorMessage}\n                label=\"Multi Select\"\n                description={selectDescription}\n                field={\n                    <MultiSelect\n                        // ref={multiSelectRef} // TODO(WB-1841) once MultiSelect supports ref\n                        selectedValues={multiSelectValue}\n                        onChange={setMultiSelectValue}\n                        onValidate={setMultiSelectErrorMessage}\n                        validate={\n                            shouldValidateInStory\n                                ? multiSelectValidate\n                                : undefined\n                        }\n                        disabled={disabled}\n                        required={args.required}\n                    >\n                        <OptionItem label=\"Mango\" value=\"mango\" />\n                        <OptionItem label=\"Strawberry\" value=\"strawberry\" />\n                        <OptionItem label=\"Banana\" value=\"banana\" />\n                    </MultiSelect>\n                } />\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={searchErrorMessage}\n                label=\"Search\"\n                description={textDescription}\n                field={\n                    <SearchField\n                        ref={searchRef}\n                        value={searchValue}\n                        onChange={setSearchValue}\n                        validate={\n                            shouldValidateInStory ? textValidate : undefined\n                        }\n                        onValidate={setSearchErrorMessage}\n                        instantValidation={false}\n                        disabled={disabled}\n                    />\n                } />\n            {showSubmitButtonInStory && <Button type=\"submit\">Submit</Button>}\n        </StyledForm>\n    );\n};","description":"The LabeledField's `errorMessage` prop can be configured with the form field's validation props like `validate` and `onValidate`. This example also shows how an error message can be shown after the form is submitted. Note: For `TextField` and `TextArea` components, it is recommended to use `instantValidation=false` so that validation occurs on blur for better usability. In this example, the text-based fields will show an error if the value has less than 5 characters. The select-based fields will show an error if \"Mango\" is selected. The example will also display a banner after submission when there are multiple errors."},{"id":"packages-labeledfield--validation-after-submission","name":"Validation After Submission","snippet":"const ValidationAfterSubmission = () => {\n    const {\n        shouldValidateInStory,\n        showSubmitButtonInStory,\n        showBannerOnErrorInStory = false,\n        disabled,\n        textValue,\n        ...args\n    } = storyArgs;\n\n    /** Values */\n    const [textFieldValue, setTextFieldValue] = React.useState(textValue || \"\");\n    const [textAreaValue, setTextAreaValue] = React.useState(textValue || \"\");\n    const [singleSelectValue, setSingleSelectValue] = React.useState(\"\");\n    const [multiSelectValue, setMultiSelectValue] = React.useState<string[]>(\n        [],\n    );\n    const [searchValue, setSearchValue] = React.useState(\"\");\n\n    /** Error messages */\n    const errorMessage =\n        typeof args.errorMessage === \"string\" ? args.errorMessage : \"\";\n    const [textFieldErrorMessage, setTextFieldErrorMessage] = React.useState<\n        string | null | undefined\n    >(errorMessage);\n    const [textAreaErrorMessage, setTextAreaErrorMessage] = React.useState<\n        string | null | undefined\n    >(errorMessage);\n    const [singleSelectErrorMessage, setSingleSelectErrorMessage] =\n        React.useState<string | null | undefined>(errorMessage);\n    const [multiSelectErrorMessage, setMultiSelectErrorMessage] =\n        React.useState<string | null | undefined>(errorMessage);\n    const [searchErrorMessage, setSearchErrorMessage] = React.useState<\n        string | null | undefined\n    >(errorMessage);\n\n    /** Refs */\n    const textFieldRef = React.useRef<HTMLInputElement | null>(null);\n    const textAreaRef = React.useRef<HTMLTextAreaElement | null>(null);\n    const singleSelectRef = React.useRef<HTMLButtonElement | null>(null);\n    const multiSelectRef = React.useRef<HTMLButtonElement | null>(null);\n    const searchRef = React.useRef<HTMLInputElement | null>(null);\n\n    const [isFormSubmitted, setIsFormSubmitted] = React.useState(false);\n\n    const [bannerErrors, setBannerErrors] = React.useState<\n        {label: string; message: string | null | undefined}[]\n    >([]);\n\n    const moveFocusToFirstFieldWithError = React.useCallback(() => {\n        // The errors in the order they are presented, along with the refs\n        const errors = [\n            {message: textFieldErrorMessage, ref: textFieldRef},\n            {message: textAreaErrorMessage, ref: textAreaRef},\n            {message: singleSelectErrorMessage, ref: singleSelectRef},\n            {message: multiSelectErrorMessage, ref: multiSelectRef},\n            {message: searchErrorMessage, ref: searchRef},\n        ];\n\n        for (const error of errors) {\n            if (error.message && error.ref?.current) {\n                error.ref.current.focus();\n                break;\n            }\n        }\n    }, [\n        multiSelectErrorMessage,\n        multiSelectRef,\n        searchErrorMessage,\n        searchRef,\n        singleSelectErrorMessage,\n        singleSelectRef,\n        textAreaErrorMessage,\n        textAreaRef,\n        textFieldErrorMessage,\n        textFieldRef,\n    ]);\n\n    React.useEffect(() => {\n        if (isFormSubmitted) {\n            // If the form has been submitted, move focus. We use useEffect\n            // so that the error message states are updated before we move focus\n            moveFocusToFirstFieldWithError();\n            // Snapshot the errors at submission time so the banner only\n            // updates when the form is submitted, not as fields are corrected\n            setBannerErrors(\n                [\n                    {label: \"Text Field\", message: textFieldErrorMessage},\n                    {label: \"Text Area\", message: textAreaErrorMessage},\n                    {\n                        label: \"Single Select\",\n                        message: singleSelectErrorMessage,\n                    },\n                    {\n                        label: \"Multi Select\",\n                        message: multiSelectErrorMessage,\n                    },\n                    {label: \"Search\", message: searchErrorMessage},\n                ].filter((e) => Boolean(e.message)),\n            );\n            setIsFormSubmitted(false);\n        }\n    }, [\n        isFormSubmitted,\n        moveFocusToFirstFieldWithError,\n        textFieldErrorMessage,\n        textAreaErrorMessage,\n        singleSelectErrorMessage,\n        multiSelectErrorMessage,\n        searchErrorMessage,\n    ]);\n\n    const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n        event.preventDefault();\n        const backendErrorMessage = \"Example server side error message\";\n        if (args.required) {\n            const requiredMsg =\n                typeof args.required === \"string\"\n                    ? args.required\n                    : \"Story default required msg\";\n            if (!textFieldValue) {\n                setTextFieldErrorMessage(requiredMsg);\n            }\n            if (!textAreaValue) {\n                setTextAreaErrorMessage(requiredMsg);\n            }\n            if (!singleSelectValue) {\n                setSingleSelectErrorMessage(requiredMsg);\n            }\n            if (multiSelectValue.length === 0) {\n                setMultiSelectErrorMessage(requiredMsg);\n            }\n            if (!searchValue) {\n                setSearchErrorMessage(requiredMsg);\n            }\n        } else {\n            setTextFieldErrorMessage(`${backendErrorMessage} for text field`);\n            setTextAreaErrorMessage(`${backendErrorMessage} for text area`);\n            setSingleSelectErrorMessage(\n                `${backendErrorMessage} for single select`,\n            );\n            setMultiSelectErrorMessage(\n                `${backendErrorMessage} for multi select`,\n            );\n            setSearchErrorMessage(`${backendErrorMessage} for search`);\n        }\n        setIsFormSubmitted(true);\n    };\n\n    const textDescription = shouldValidateInStory\n        ? \"Trigger error by entering text that is 4 characters or less\"\n        : args.description;\n    const selectDescription = shouldValidateInStory\n        ? \"Trigger error by selecting mango\"\n        : args.description;\n\n    const textValidate = (value: string) => {\n        if (value.length < 5) {\n            return \"Should be 5 or more characters\";\n        }\n    };\n\n    const singleSelectValidate = (value?: string | null) => {\n        if (value === \"mango\") {\n            return \"Don't pick mango!\";\n        }\n    };\n\n    const multiSelectValidate = (values: string[]) => {\n        if (values.includes(\"mango\")) {\n            return \"Don't pick mango!\";\n        }\n    };\n\n    const bannerErrorCount = bannerErrors.length;\n\n    return (\n        <StyledForm\n            onSubmit={handleSubmit}\n            style={{\n                display: \"flex\",\n                flexDirection: \"column\",\n                gap: sizing.size_240,\n            }}>\n            {bannerErrorCount > 1 && showBannerOnErrorInStory && (\n                <Banner\n                    kind=\"critical\"\n                    text={\n                        <>\n                            {`There are ${bannerErrorCount} errors in this form. Please review the fields below.`}\n\n                            <StyledUl style={styles.bannerUl}>\n                                {bannerErrors.map((e) => (\n                                    <StyledLi\n                                        key={e.label}\n                                        style={styles.bannerLi}\n                                    >\n                                        <b>{e.label}:</b> {e.message}\n                                    </StyledLi>\n                                ))}\n                            </StyledUl>\n                        </>\n                    }\n                />\n            )}\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={textFieldErrorMessage}\n                label=\"Text Field\"\n                description={textDescription}\n                field={\n                    <TextField\n                        ref={textFieldRef}\n                        value={textFieldValue}\n                        onChange={setTextFieldValue}\n                        onValidate={setTextFieldErrorMessage}\n                        validate={\n                            shouldValidateInStory ? textValidate : undefined\n                        }\n                        instantValidation={false}\n                        disabled={disabled}\n                        required={args.required}\n                    />\n                } />\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={textAreaErrorMessage}\n                label=\"Text Area\"\n                description={textDescription}\n                field={\n                    <TextArea\n                        ref={textAreaRef}\n                        value={textAreaValue}\n                        onChange={setTextAreaValue}\n                        onValidate={setTextAreaErrorMessage}\n                        validate={\n                            shouldValidateInStory ? textValidate : undefined\n                        }\n                        instantValidation={false}\n                        disabled={disabled}\n                        required={args.required}\n                    />\n                } />\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={singleSelectErrorMessage}\n                label=\"Single Select\"\n                description={selectDescription}\n                field={\n                    <SingleSelect\n                        // ref={singleSelectRef} // TODO(WB-1841) once SingleSelect supports ref\n                        placeholder=\"Choose a fruit\"\n                        selectedValue={singleSelectValue}\n                        onChange={setSingleSelectValue}\n                        onValidate={setSingleSelectErrorMessage}\n                        validate={singleSelectValidate}\n                        disabled={disabled}\n                        required={args.required}\n                    >\n                        <OptionItem label=\"Mango\" value=\"mango\" />\n                        <OptionItem label=\"Strawberry\" value=\"strawberry\" />\n                        <OptionItem label=\"Banana\" value=\"banana\" />\n                    </SingleSelect>\n                } />\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={multiSelectErrorMessage}\n                label=\"Multi Select\"\n                description={selectDescription}\n                field={\n                    <MultiSelect\n                        // ref={multiSelectRef} // TODO(WB-1841) once MultiSelect supports ref\n                        selectedValues={multiSelectValue}\n                        onChange={setMultiSelectValue}\n                        onValidate={setMultiSelectErrorMessage}\n                        validate={\n                            shouldValidateInStory\n                                ? multiSelectValidate\n                                : undefined\n                        }\n                        disabled={disabled}\n                        required={args.required}\n                    >\n                        <OptionItem label=\"Mango\" value=\"mango\" />\n                        <OptionItem label=\"Strawberry\" value=\"strawberry\" />\n                        <OptionItem label=\"Banana\" value=\"banana\" />\n                    </MultiSelect>\n                } />\n            <LabeledField\n                shouldValidateInStory\n                showSubmitButtonInStory\n                showBannerOnErrorInStory\n                errorMessage={searchErrorMessage}\n                label=\"Search\"\n                description={textDescription}\n                field={\n                    <SearchField\n                        ref={searchRef}\n                        value={searchValue}\n                        onChange={setSearchValue}\n                        validate={\n                            shouldValidateInStory ? textValidate : undefined\n                        }\n                        onValidate={setSearchErrorMessage}\n                        instantValidation={false}\n                        disabled={disabled}\n                    />\n                } />\n            {showSubmitButtonInStory && <Button type=\"submit\">Submit</Button>}\n        </StyledForm>\n    );\n};","description":"This story shows the error state after the form is submitted. It submits the form and verifies that focus is moved to the first field with an error."},{"id":"packages-labeledfield--changing-errors","name":"Changing Errors","snippet":"const ChangingErrors = function ChangingErrors() {\n    const errorMsg1 = \"First error message\";\n    const errorMsg2 = \"Second error message\";\n\n    const [errorMessage, setErrorMessage] = React.useState(errorMsg1);\n\n    return (\n        <View style={{gap: sizing.size_120}}>\n            <LabeledField\n                label=\"Label\"\n                field={<TextField value=\"\" onChange={() => {}} />}\n                errorMessage={errorMessage}\n            />\n            <Button\n                onClick={() =>\n                    setErrorMessage(\n                        errorMessage === errorMsg1 ? errorMsg2 : errorMsg1,\n                    )\n                }\n            >\n                Change error message\n            </Button>\n        </View>\n    );\n};","description":"When this story is used with a screen reader, any updates to an existing error message will be announced."},{"id":"packages-labeledfield--with-non-wb","name":"With Non Wb","snippet":"const WithNonWb = () => <LabeledField\n    label=\"Label\"\n    description=\"Description\"\n    errorMessage=\"Error message\"\n    field={<input type=\"text\" />} />;","description":"Here is an example where LabeledField is used with a non-Wonder Blocks component. Although it can be used with custom components, it is recommended that LabeledField is used with the following Wonder Blocks components: - TextField - TextArea - SearchField - SingleSelect - MultiSelect This is recommended because LabeledField will inject WB specific props: `readOnly`, `error`, and `testId`. The `field` component should handle these props accordingly. This is helpful because for example, if LabeledField has an error message, the field should also be in an error state. If the `field` component doesn't support these props, there will be console warnings."},{"id":"packages-labeledfield--custom","name":"Custom","snippet":"const Custom = () => <LabeledField\n    label={(<span>\n        <b>Label</b> <i>using</i> <u>JSX</u>\n    </span>)}\n    description={(<span>\n        <b>Description</b> <i>using</i> <u>JSX</u>\n    </span>)}\n    field={<TextField value=\"\" onChange={() => {}} />}\n    errorMessage={(<span>\n        <b>Error</b> <i>using</i> <u>JSX</u>\n    </span>)}\n    readOnlyMessage={(<span>\n        <b>Read</b> <i>only</i> <u>message</u>\n    </span>)}\n    additionalHelperMessage={(<span>\n        <b>Additional</b> <i>helper</i> <u>message</u>\n    </span>)}\n    contextLabel={(<span>\n        <b>Context</b> <i>label</i>\n    </span>)} />;","description":"Custom ReactNode elements can be used for the `label`, `description`, and `error` props. Ideally, the styling of LabeledField should not be overridden. If there is a specific use case where the styling needs to be overridden, please reach out to the Wonder Blocks team!"},{"id":"packages-labeledfield--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => <LabeledField\n    field={<TextField value=\"\" onChange={() => {}} />}\n    label=\"Name\"\n    description=\"Helpful description text.\"\n    errorMessage=\"Message about the error\"\n    readOnlyMessage=\"Message about why it is read only\"\n    additionalHelperMessage=\"Additional helper message\"\n    contextLabel=\"Context label\"\n    styles={{\n        root: {\n            outline: `${border.width.thin} dashed ${semanticColor.core.border.neutral.default}`,\n        },\n        label: styles.customStyle,\n        contextLabel: styles.customStyle,\n        description: styles.alternativeCustomStyle,\n        additionalHelperMessage: styles.customStyle,\n        readOnlyMessage: styles.alternativeCustomStyle,\n        error: styles.customStyle,\n    }} />;","description":"Custom styles can be set for the elements in LabeledField using the `styles` prop. It is useful for specific cases where spacing between elements needs to be customized. If there is a specific use case where the styling needs to be overridden, please reach out to the Wonder Blocks team!"}],"import":"import Banner from \"@khanacademy/wonder-blocks-banner\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { MultiSelect, OptionItem, SingleSelect } from \"@khanacademy/wonder-blocks-dropdown\";\nimport SearchField from \"@khanacademy/wonder-blocks-search-field\";\nimport { TextArea, TextField } from \"@khanacademy/wonder-blocks-form\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A LabeledField is an element that provides a label, context label, and helper text to present more information about any type of form field component. Helper text includes a description, error message, read only message, and any additional helper message. It is highly recommended that all form fields should be used with the `LabeledField` component so that our form fields are consistent and accessible. Tips for using LabeledField: - If the `errorMessage` prop is set on `LabeledField`, the `error` prop on the form field component will be auto-populated so it doesn't need to be set explicitly on the field - Setting the `readOnlyMessage` prop will also auto-populate the `readOnly` prop on the form field component - For TextField and TextArea, it is highly recommended that they are configured with `instantValidation=false` so that validation happens on blur. See Validation docs for those components for more details!","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-labeled-field/src/index.ts","description":"A LabeledField is an element that provides a label, context label, and\nhelper text to present more information about any type of form field\ncomponent. Helper text includes a description, error message, read only\nmessage, and any additional helper message.","displayName":"src","methods":[],"props":{"field":{"defaultValue":null,"description":"The form field component.","name":"field","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>>"}},"label":{"defaultValue":null,"description":"The title for the label element.","name":"label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactNode"}},"contextLabel":{"defaultValue":null,"description":"The context for the field. Useful for showing if the field is required\nor optional.","name":"contextLabel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"description":{"defaultValue":null,"description":"The text for the description element.","name":"description","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"errorMessage":{"defaultValue":null,"description":"The message for the error element. If there is a message, it will also\nset the `error` prop on the `field` component.\n\nNote: Since the error icon has an aria-label, screen readers will\nprefix the error message with \"Error:\" (or the value provided to the\nerrorIconAriaLabel in the `labels` prop)\n\nIf both `errorMessage` and `readOnlyMessage` are provided, the `readOnlyMessage`\nis displayed first.","name":"errorMessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"readOnlyMessage":{"defaultValue":null,"description":"The helpful text message to display when the field is read only.\n\nUse the `labels.readOnlyIconAriaLabel` prop to set the `aria-label` for\nthe read only icon.\n\nIf both `errorMessage` and `readOnlyMessage` are provided, the `readOnlyMessage`\nis displayed first.","name":"readOnlyMessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"additionalHelperMessage":{"defaultValue":null,"description":"Additional helper text placed under the field.","name":"additionalHelperMessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements of LabeledField. Useful if there are\nspecific cases where spacing between elements needs to be customized.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; label?: StyleType; contextLabel?: StyleType; description?: StyleType; error?: StyleType; readOnlyMessage?: StyleType; additionalHelperMessage?: StyleType; }"}},"id":{"defaultValue":null,"description":"A unique id to use as the base of the ids for the elements within the component.\nHere is how the id is used for the different elements in the component:\n- The label will have an id formatted as `${id}-label`\n- The context label will have an id formatted as `${id}-context-label`\n- The description will have an id formatted as `${id}-description`\n- The field will have an id formatted as `${id}-field`\n- The error will have an id formatted as `${id}-error`\n- The read only message will have an id formatted as `${id}-read-only-message`\n- The additional helper message will have an id formatted as `${id}-additional-helper-message`\n\nIf the `id` prop is not provided, a base unique id will be auto-generated.\nThis is important so that the different elements can be wired up together\nfor accessibility!\n\nNote: When using the `LabeledField` component, an `id` provided to the\nfield component (ex: a TextField component) will be overridden.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test id for e2e testing. Here is how the test id is used for the\ndifferent elements in the component:\n- The label will have a testId formatted as `${testId}-label`\n- The context label will have a testId formatted as `${testId}-context-label`\n- The description will have a testId formatted as `${testId}-description`\n- The field will have a testId formatted as `${testId}-field`\n- The error will have a testId formatted as `${testId}-error`\n- The read only message will have a testId formatted as `${testId}-read-only-message`\n- The additional helper message will have a testId formatted as `${testId}-additional-helper-message`","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"labels":{"defaultValue":null,"description":"The object containing the custom labels used inside this component.\n\nThis is useful for internationalization.","name":"labels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-labeled-field/src/components/labeled-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"LabeledFieldLabels"}}},"exportName":"src"}},"packages-link":{"id":"packages-link","name":"Link","path":"./__docs__/wonder-blocks-link/link.stories.tsx","stories":[{"id":"packages-link--default","name":"Default","snippet":"const Default = () => <Link href=\"/\">The quick brown fox jumps over the lazy dog.</Link>;","description":"By default the link uses a color that communicates the presence and meaning of interaction."},{"id":"packages-link--opens-in-a-new-tab","name":"Opens In A New Tab","snippet":"const OpensInANewTab = () => (\n    <View>\n        <Link\n            href=\"https://cat-bounce.com/\"\n            target=\"_blank\"\n            labels={{externalIconAriaLabel: \"(opens in a new tab)\"}}\n        >\n            This is an external link\n        </Link>\n    </View>\n);","description":"When a link is external and target=\"_blank\", the external icon is automatically added to the end of the link. This indicates that the link will open in a new tab. A translated `aria-label` for the external icon can be set using the `labels.externalIconAriaLabel` prop. We recommend setting this to a translated string for `(opens in a new tab)`. (Note: In the long term once WB handles i18n internally, this will be handled automatically.)"},{"id":"packages-link--start-and-end-icons","name":"Start And End Icons","snippet":"const StartAndEndIcons = () => (\n    <View>\n        {/* Default (dark) */}\n        <View style={{padding: sizing.size_240}}>\n            <Link\n                href=\"#link\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.plusCircleBold} />\n                }\n                style={styles.standaloneLinkWrapper}\n            >\n                This link has a start icon\n            </Link>\n            <Link\n                href=\"#link\"\n                endIcon={\n                    <PhosphorIcon icon={IconMappings.magnifyingGlassBold} />\n                }\n                style={styles.standaloneLinkWrapper}\n            >\n                This link has an end icon\n            </Link>\n            <Link\n                href=\"https://stuffonmycat.com/\"\n                endIcon={<PhosphorIcon icon={IconMappings.infoBold} />}\n                target=\"_blank\"\n                style={styles.standaloneLinkWrapper}\n            >\n                This external link has an end icon that is overrides the\n                default external icon\n            </Link>\n            <Link\n                href=\"#link\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.caretLeftBold} />\n                }\n                endIcon={\n                    <PhosphorIcon icon={IconMappings.caretRightBold} />\n                }\n                style={styles.standaloneLinkWrapper}\n            >\n                This link has a start icon and an end icon\n            </Link>\n            <Link\n                href=\"#link\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.caretLeftBold} />\n                }\n                endIcon={\n                    <PhosphorIcon icon={IconMappings.caretRightBold} />\n                }\n                style={styles.multiLine}\n            >\n                This is a multi-line link with start and end icons\n            </Link>\n            <BodyText>\n                This is an inline{\" \"}\n                <Link\n                    href=\"#link\"\n                    inline={true}\n                    startIcon={\n                        <PhosphorIcon icon={IconMappings.caretLeftBold} />\n                    }\n                >\n                    link with a start icon\n                </Link>{\" \"}\n                and an inline{\" \"}\n                <Link\n                    href=\"#link\"\n                    inline={true}\n                    target=\"_blank\"\n                    endIcon={\n                        <PhosphorIcon icon={IconMappings.caretRightBold} />\n                    }\n                >\n                    link with an end icon\n                </Link>\n                .\n            </BodyText>\n        </View>\n        {/* Light */}\n        <View\n            style={{\n                backgroundColor:\n                    semanticColor.core.background.neutral.strong,\n                padding: sizing.size_240,\n            }}\n        >\n            <Link\n                href=\"#link\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.plusCircleBold} />\n                }\n                style={[styles.standaloneLinkWrapper, actionStyles.inverse]}\n            >\n                This link has a start icon\n            </Link>\n            <Link\n                href=\"#link\"\n                endIcon={\n                    <PhosphorIcon icon={IconMappings.magnifyingGlassBold} />\n                }\n                style={[styles.standaloneLinkWrapper, actionStyles.inverse]}\n            >\n                This link has an end icon\n            </Link>\n            <Link\n                href=\"https://stuffonmycat.com/\"\n                endIcon={<PhosphorIcon icon={IconMappings.infoBold} />}\n                target=\"_blank\"\n                style={[styles.standaloneLinkWrapper, actionStyles.inverse]}\n            >\n                This external link has an end icon that is overrides the\n                default external icon\n            </Link>\n            <Link\n                href=\"#link\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.caretLeftBold} />\n                }\n                endIcon={\n                    <PhosphorIcon icon={IconMappings.caretRightBold} />\n                }\n                style={[styles.standaloneLinkWrapper, actionStyles.inverse]}\n            >\n                This link has a start icon and an end icon\n            </Link>\n            <Link\n                href=\"#link\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.caretLeftBold} />\n                }\n                endIcon={\n                    <PhosphorIcon icon={IconMappings.caretRightBold} />\n                }\n                style={[styles.multiLine, actionStyles.inverse]}\n            >\n                This is a multi-line link with start and end icons\n            </Link>\n            <BodyText\n                style={{\n                    color: semanticColor.core.foreground.knockout.default,\n                }}\n            >\n                This is an inline{\" \"}\n                <Link\n                    href=\"#link\"\n                    startIcon={\n                        <PhosphorIcon icon={IconMappings.caretLeftBold} />\n                    }\n                    inline={true}\n                    style={actionStyles.inverse}\n                >\n                    link with a start icon\n                </Link>{\" \"}\n                and an inline{\" \"}\n                <Link\n                    href=\"#link\"\n                    endIcon={\n                        <PhosphorIcon icon={IconMappings.caretRightBold} />\n                    }\n                    inline={true}\n                    style={actionStyles.inverse}\n                    target=\"_blank\"\n                >\n                    link with an end icon\n                </Link>\n                .\n            </BodyText>\n        </View>\n    </View>\n);","description":"Link can take an optional `startIcon` and/or `endIcon`. If `target=\"_blank\"` and an `endIcon` prop is passed in, then `endIcon` will override the default `externalIcon`."},{"id":"packages-link--inline","name":"Inline","snippet":"const Inline = () => (\n    <BodyText style={{width: 530}}>\n        This is an inline{\" \"}\n        <Link href=\"#link\" inline={true}>\n            regular link\n        </Link>\n        . In this sentence, there is also an inline{\" \"}\n        <Link\n            href=\"https://www.procatinator.com/\"\n            inline={true}\n            target=\"_blank\"\n        >\n            external link\n        </Link>\n        .\n    </BodyText>\n);","description":"Inline links include an underline to distinguish them from the surrounding text. Make a link inline by setting the `inline` prop to `true`. It is recommended to use inline links within paragraphs and sentences."},{"id":"packages-link--with-typography","name":"With Typography","snippet":"const WithTypography = () => (\n    <Heading size=\"medium\">\n        <Link href=\"#nonexistent-link\" id=\"typography-link\">\n            Link inside a Heading element\n        </Link>\n    </Heading>\n);","description":"Wonder Blocks Typography elements can be used with Links instead of plain text. We recommend that `Typography` is always the parent element of `Link` to avoid styling issues. Here, we have a `HeadingSmall` containing a `Link`"},{"id":"packages-link--with-style","name":"With Style","snippet":"const WithStyle = () => (\n    <Link href=\"#link\" style={styles.customLink}>\n        This link has a style.\n    </Link>\n);","description":"Link can take a `style` prop. Here, the Link has been given a style in which the `color` field has been set to `semanticColor.status.critical.foreground`."},{"id":"packages-link--navigation","name":"Navigation","snippet":"const Navigation = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View>\n                <View style={styles.row}>\n                    <Link\n                        href=\"/foo\"\n                        style={styles.heading}\n                        onClick={() => {\n                            // eslint-disable-next-line no-console\n                            console.log(\"I'm still on the same page!\");\n                        }}\n                    >\n                        <BodyText weight=\"bold\">\n                            Uses Client-side Nav\n                        </BodyText>\n                    </Link>\n                    <Link\n                        href=\"/iframe.html?id=link--default&viewMode=story\"\n                        style={styles.heading}\n                        skipClientNav\n                    >\n                        <BodyText weight=\"bold\">\n                            Avoids Client-side Nav\n                        </BodyText>\n                    </Link>\n                </View>\n                <View style={styles.navigation}>\n                    <Routes>\n                        <Route\n                            path=\"/foo\"\n                            element={\n                                <View id=\"foo\">\n                                    The first link does client-side\n                                    navigation here.\n                                </View>\n                            }\n                        />\n                        <Route\n                            path=\"*\"\n                            element={\n                                <View>See navigation changes here</View>\n                            }\n                        />\n                    </Routes>\n                </View>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);","description":"If you want to navigate to an external URL and/or reload the window, make sure to use `href` and `skipClientNav={true}`, as shown in this example. **For navigation callbacks:** The `onClick`, `beforeNav`, and `safeWithNav` props can be used to run callbacks when navigating to the new URL. Which prop to use depends on the use case. See the [Button documentation](/story/button-navigation-callbacks--before-nav-callbacks&viewMode=docs) for details."},{"id":"packages-link--view-transition","name":"ViewTransition","snippet":"const ViewTransition = () => <Link />;","description":"`Link` can be used with `viewTransition` to animate between pages. The `viewTransition` prop is a boolean that indicates whether the link should use the View Transition API. See the [View Transition API documentation](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) for more information. This example uses the ReactRouter's `useViewTransitionState` hook to determine if the link is currently transitioning, then applies the `viewTransitionName` style to the link and the card. The `viewTransitionName` style is a CSS property that specifies the name of the transition. The transition name is used to match the elements that should be animated between the two pages. You can take a look at the code snippet below to see how this example works (click on the \"Show code\" button)."},{"id":"packages-link--with-title","name":"With Title","snippet":"const WithTitle = () => (\n    <BodyText>\n        <Link href=\"#link\" title=\"I am a title 😎\">\n            This link has a title.\n        </Link>\n    </BodyText>\n);","description":"Link can take a title prop. Give a link a title by setting the `title` prop to a string. Hover over the link to see its title."},{"id":"packages-link--with-state","name":"With State","snippet":"const WithState = () => (\n    <MemoryRouter>\n        <CompatRouter>\n            <View>\n                <Link href=\"/foo\" state={{from: \"wonder-blocks-link\"}}>\n                    Link with state\n                </Link>\n            </View>\n        </CompatRouter>\n    </MemoryRouter>\n);","description":"Link can take a `state` prop that adds persistent client side routing state to the next location. See https://reactrouter.com/api/components/Link#state"},{"id":"packages-link--right-to-left-with-icons","name":"Right To Left With Icons","snippet":"const RightToLeftWithIcons = () => (\n    <View style={{padding: sizing.size_160}}>\n        <View dir=\"rtl\">\n            <Link\n                href=\"/\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.caretRightBold} />\n                }\n            >\n                هذا الرابط مكتوب باللغة العربية\n            </Link>\n            <Strut size={16} />\n            <Link\n                href=\"/\"\n                endIcon={<PhosphorIcon icon={IconMappings.caretLeftBold} />}\n            >\n                هذا الرابط مكتوب باللغة العربية\n            </Link>\n            <Strut size={16} />\n            <Link\n                href=\"/\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.caretRightBold} />\n                }\n                endIcon={<PhosphorIcon icon={IconMappings.caretLeftBold} />}\n            >\n                هذا الرابط مكتوب باللغة العربية\n            </Link>\n        </View>\n    </View>\n);","description":"When in the right-to-left direction, the `startIcon` and `endIcon` are flipped. This example has text in Arabic, a right-to-left language."}],"import":"import { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { CompatRouter, Outlet, Route, RouterProvider, Routes } from \"react-router-dom-v5-compat\";\nimport Link, { ComponentInfo, Strut } from \"@khanacademy/wonder-blocks-link\";\nimport { MemoryRouter } from \"react-router-dom\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"Reusable link component. Consisting of a [`ClickableBehavior`](#clickablebehavior) surrounding a `LinkCore`. `ClickableBehavior` handles interactions and state changes. `LinkCore` is a stateless component which displays the different states the `Link` can take. ### Usage ```jsx <Link href=\"https://khanacademy.org/\" > Label </Link> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-link/src/index.ts","description":"Reusable link component.\n\nConsisting of a [`ClickableBehavior`](#clickablebehavior) surrounding a\n`LinkCore`. `ClickableBehavior` handles interactions and state changes.\n`LinkCore` is a stateless component which displays the different states\nthe `Link` can take.\n\n### Usage\n\n```jsx\n<Link\n    href=\"https://khanacademy.org/\"\n>\n    Label\n</Link>\n```","displayName":"src","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"children":{"defaultValue":null,"description":"Text to appear on the link. It can be a plain text or a Typography element.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string | ReactElement<(Omit<Props, \"ref\"> & RefAttributes<unknown>) | (Omit<Props, \"ref\"> & RefAttributes<unknown>) | (Omit<{ children?: ReactNode; style?: StyleType; testId?: string | undefined; lang?: string | undefined; className?: string | undefined; dir?: \"auto\" | \"ltr\" | \"rtl\" | undefined; htmlFor?: string | undefined; tabIndex?: number | undefined; id?: string | undefined; title?: string | undefined; \"data-modal-launcher-portal\"?: boolean | undefined; \"data-placement\"?: string | undefined; } & Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & MouseEvents & KeyboardEvents & InputEvents & TouchEvents & FocusEvents & { tag?: string | undefined; } & RefAttributes<unknown>, \"ref\"> & RefAttributes<unknown>), string | JSXElementConstructor<any>>"}},"href":{"defaultValue":null,"description":"URL to navigate to.","name":"href","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"id":{"defaultValue":null,"description":"An optional id attribute.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"inline":{"defaultValue":null,"description":"Indicates that this link is used within a body of text.\nThis styles the link with an underline to distinguish it\nfrom surrounding text.","name":"inline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"rel":{"defaultValue":null,"description":"Specifies the type of relationship between the current document and the\nlinked document. Should only be used when `href` is specified. This\ndefaults to \"noopener noreferrer\" when `target=\"_blank\"`, but can be\noverridden by setting this prop to something else.","name":"rel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"Set the tabindex attribute on the rendered element.","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"skipClientNav":{"defaultValue":null,"description":"Whether to avoid using client-side navigation.\n\nIf the URL passed to href is local to the client-side, e.g.\n/math/algebra/eval-exprs, then it tries to use react-router-dom's Link\ncomponent which handles the client-side navigation. You can set\n`skipClientNav` to true avoid using client-side nav entirely.\n\nNOTE: All URLs containing a protocol are considered external, e.g.\nhttps://khanacademy.org/math/algebra/eval-exprs will trigger a full\npage reload.","name":"skipClientNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"style":{"defaultValue":null,"description":"Custom styles.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the Link.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onClick":{"defaultValue":null,"description":"Function to call when button is clicked.\n\nThis callback should be used for things like marking BigBingo\nconversions. It should NOT be used to redirect to a different URL or to\nprevent navigation via e.preventDefault(). The event passed to this\nhandler will have its preventDefault() and stopPropagation() methods\nstubbed out.","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: SyntheticEvent<Element, Event>) => unknown)"}},"safeWithNav":{"defaultValue":null,"description":"Run async code in the background while client-side navigating. If the\nbrowser does a full page load navigation, the callback promise must be\nsettled before the navigation will occur. Errors are ignored so that\nnavigation is guaranteed to succeed.","name":"safeWithNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => Promise<unknown>)"}},"onKeyDown":{"defaultValue":null,"description":"Respond to raw \"keydown\" event.","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyUp":{"defaultValue":null,"description":"Respond to raw \"keyup\" event.","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"title":{"defaultValue":null,"description":"An optional title attribute.","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"startIcon":{"defaultValue":null,"description":"An optional icon displayed before the link label.","name":"startIcon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<Pick<AriaProps, \"aria-hidden\" | \"aria-label\" | \"role\"> & { color?: string; style?: StyleType; className?: string; role?: \"img\" | undefined; size?: IconSize | undefined; testId?: string | undefined; tabIndex?: 0 | -1 | undefined; icon: string | PhosphorIconAsset; } & RefAttributes<HTMLSpanElement>, string | JSXElementConstructor<any>> | undefined"}},"endIcon":{"defaultValue":null,"description":"An optional icon displayed after the link label.\nIf `target=\"_blank\"` and `endIcon` is passed in, `endIcon` will override\nthe default `externalIcon`.","name":"endIcon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<Pick<AriaProps, \"aria-hidden\" | \"aria-label\" | \"role\"> & { color?: string; style?: StyleType; className?: string; role?: \"img\" | undefined; size?: IconSize | undefined; testId?: string | undefined; tabIndex?: 0 | -1 | undefined; icon: string | PhosphorIconAsset; } & RefAttributes<HTMLSpanElement>, string | JSXElementConstructor<any>> | undefined"}},"labels":{"defaultValue":null,"description":"The object containing the custom labels used inside this component.\n\nThis is useful for internationalization. Defaults to English.","name":"labels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ externalIconAriaLabel?: string; }"}},"viewTransition":{"defaultValue":null,"description":"An optional prop that enables a\n[https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API](View\nTransition) for this navigation by wrapping the final state update in\n`document.startViewTransition()`.\n@see https://reactrouter.com/6.30.0/components/link#viewtransition","name":"viewTransition","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"state":{"defaultValue":null,"description":"Adds persistent client side routing state to the next location.\nOnly has effect when the underlying react-router `Link` is used.\nSee https://reactrouter.com/api/components/Link#state","name":"state","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"unknown"}},"target":{"defaultValue":null,"description":"A target destination window for a link to open in.  We only support\n\"_blank\" which opens the URL in a new tab.\n\nTODO(WB-1262): only allow this prop when `href` is also set.t","name":"target","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"_blank\"","value":[{"value":"\"_blank\""}]}},"beforeNav":{"defaultValue":null,"description":"Run async code before navigating to the URL passed to `href`. If the\npromise returned rejects then navigation will not occur.\n\nIf both safeWithNav and beforeNav are provided, beforeNav will be run\nfirst and safeWithNav will only be run if beforeNav does not reject.\n\nWARNING: Using this with `target=\"_blank\"` will trigger built-in popup\nblockers in Firefox and Safari.  This is because we do navigation\nprogrammatically and `beforeNav` causes a delay which means that the\nbrowser can't make a directly link between a user action and the\nnavigation.","name":"beforeNav","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-link/src/components/link.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => Promise<unknown>)"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLAnchorElement | ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"src"}},"packages-modal-drawerlauncher-drawerdialog":{"id":"packages-modal-drawerlauncher-drawerdialog","name":"DrawerDialog","path":"./__docs__/wonder-blocks-modal/drawer-dialog.stories.tsx","stories":[{"id":"packages-modal-drawerlauncher-drawerdialog--default","name":"Default","snippet":"const Default = () => (\n    <DrawerLauncher\n        alignment=\"inlineEnd\"\n        modal={\n            <DrawerDialog\n                title=\"Default Drawer\"\n                content={\n                    <View style={styles.content}>\n                        <BodyText>\n                            This is a basic drawer dialog with simple text\n                            content. The drawer slides in from the inline\n                            end (right in LTR mode).\n                        </BodyText>\n                    </View>\n                }\n            />\n        }\n    >\n        {({openModal}) => (\n            <Button onClick={openModal}>Open Default Drawer</Button>\n        )}\n    </DrawerLauncher>\n);","description":"Basic drawer dialog with simple content. This shows the default structure and styling of a drawer dialog."},{"id":"packages-modal-drawerlauncher-drawerdialog--with-no-padding","name":"With No Padding","snippet":"const WithNoPadding = () => (\n    <DrawerLauncher\n        alignment=\"inlineEnd\"\n        modal={\n            <DrawerDialog\n                title=\"Default Drawer\"\n                styles={{\n                    content: {\n                        padding: 0,\n                        [small]: {\n                            paddingInline: 0,\n                        },\n                    },\n                }}\n                content={\n                    <View>\n                        <BodyText>\n                            This is a basic drawer dialog with no padding.\n                        </BodyText>\n                    </View>\n                }\n            />\n        }\n    >\n        {({openModal}) => (\n            <Button onClick={openModal}>Open Default Drawer</Button>\n        )}\n    </DrawerLauncher>\n);"},{"id":"packages-modal-drawerlauncher-drawerdialog--with-form-content","name":"With Form Content","snippet":"const WithFormContent = () => (\n    <DrawerLauncher\n        alignment=\"inlineStart\"\n        modal={\n            <DrawerDialog\n                title=\"Settings\"\n                content={\n                    <View style={styles.content}>\n                        <View style={styles.form}>\n                            <View style={styles.section}>\n                                <BodyText size=\"medium\">\n                                    Preferences\n                                </BodyText>\n                                <RadioGroup\n                                    groupName=\"theme\"\n                                    onChange={() => {}}\n                                    selectedValue=\"light\"\n                                >\n                                    <Choice\n                                        label=\"Light theme\"\n                                        value=\"light\"\n                                    />\n                                    <Choice\n                                        label=\"Dark theme\"\n                                        value=\"dark\"\n                                    />\n                                    <Choice label=\"Auto\" value=\"auto\" />\n                                </RadioGroup>\n                            </View>\n\n                            <View style={styles.section}>\n                                <ActionMenu\n                                    menuText=\"More actions\"\n                                    testId=\"action-menu\"\n                                >\n                                    <ActionItem label=\"Reset settings\" />\n                                    <ActionItem label=\"Export data\" />\n                                    <ActionItem label=\"Delete account\" />\n                                </ActionMenu>\n                            </View>\n                        </View>\n                    </View>\n                }\n            />\n        }\n    >\n        {({openModal}) => (\n            <Button onClick={openModal}>Open Settings</Button>\n        )}\n    </DrawerLauncher>\n);","description":"Drawer with rich content including form elements and actions. Demonstrates how to create more complex drawer interfaces."},{"id":"packages-modal-drawerlauncher-drawerdialog--with-action-list","name":"With Action List","snippet":"const WithActionList = () => (\n    <DrawerLauncher\n        alignment=\"blockEnd\"\n        modal={\n            <DrawerDialog\n                title=\"Actions\"\n                content={\n                    <View style={styles.content}>\n                        <BodyText style={styles.section}>\n                            Choose an action from the options below:\n                        </BodyText>\n                        <View style={styles.form}>\n                            <Button kind=\"primary\">Primary Action</Button>\n                            <Button kind=\"secondary\">\n                                Secondary Action\n                            </Button>\n                            <Button kind=\"tertiary\">Cancel</Button>\n                        </View>\n                    </View>\n                }\n            />\n        }\n    >\n        {({openModal}) => <Button onClick={openModal}>Show Actions</Button>}\n    </DrawerLauncher>\n);","description":"Drawer with action-focused content layout. Demonstrates a common pattern for presenting multiple action options to the user."},{"id":"packages-modal-drawerlauncher-drawerdialog--with-render-prop","name":"With Render Prop","snippet":"const WithRenderProp = () => (\n    <DrawerLauncher\n        alignment=\"inlineEnd\"\n        modal={\n            <DrawerDialog\n                title=\"Render Prop Example\"\n                content={({title}) => (\n                    <View style={styles.content}>\n                        <BodyText size=\"xsmall\">Eyebrow</BodyText>\n                        {title}\n                        <BodyText style={styles.section}>\n                            This content uses a render prop to customize how\n                            the title is positioned within the drawer\n                            content.\n                        </BodyText>\n                        <BodyText>\n                            The title element is passed as a prop to the\n                            render function, allowing for flexible layout\n                            arrangements.\n                        </BodyText>\n                    </View>\n                )}\n            />\n        }\n    >\n        {({openModal}) => (\n            <Button onClick={openModal}>Open Render Prop Drawer</Button>\n        )}\n    </DrawerLauncher>\n);","description":"Drawer using render prop pattern for content. This allows placing the title element in a custom location within the content."},{"id":"packages-modal-drawerlauncher-drawerdialog--no-close-button","name":"No Close Button","snippet":"const NoCloseButton = () => (\n    <DrawerLauncher\n        alignment=\"inlineEnd\"\n        modal={\n            <DrawerDialog\n                title=\"Confirm Action\"\n                closeButtonVisible={false}\n                content={\n                    <View style={styles.content}>\n                        <BodyText style={styles.section}>\n                            Are you sure you want to delete this item? This\n                            action cannot be undone.\n                        </BodyText>\n                        <View style={styles.form}>\n                            <Button kind=\"primary\">Delete</Button>\n                            <Button kind=\"secondary\">Cancel</Button>\n                        </View>\n                    </View>\n                }\n            />\n        }\n    >\n        {({openModal}) => (\n            <Button onClick={openModal}>Open Confirmation</Button>\n        )}\n    </DrawerLauncher>\n);","description":"Drawer without visible close button. Useful when the content provides its own close mechanism."},{"id":"packages-modal-drawerlauncher-drawerdialog--with-scrollable-content","name":"With Scrollable Content","snippet":"const WithScrollableContent = () => (\n    <DrawerLauncher\n        alignment=\"inlineStart\"\n        modal={\n            <DrawerDialog\n                title=\"Terms of Service\"\n                content={\n                    <View style={styles.content}>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                    </View>\n                }\n            />\n        }\n    >\n        {({openModal}) => (\n            <Button onClick={openModal}>Open Long Content</Button>\n        )}\n    </DrawerLauncher>\n);","description":"Drawer with long scrollable content. Demonstrates how the drawer handles content overflow."}],"import":"import { ActionItem, ActionMenu } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { Choice, RadioGroup } from \"@khanacademy/wonder-blocks-form\";\nimport { DrawerDialog, DrawerLauncher } from \"@khanacademy/wonder-blocks-modal\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`DrawerDialog` is the modal content component designed specifically for use with `DrawerLauncher`. It provides a consistent drawer interface with proper animations, positioning, and accessibility features. **IMPORTANT**: This component should only be used with `DrawerLauncher`. Using it with other modal launchers may result in incorrect animations, positioning, and styling. The component automatically receives alignment, animation, and timing props from `DrawerLauncher` via React Context, eliminating the need for manual prop passing in nested components. ### Custom styling You can optionally pass in the `styles` prop to override various parts of a DrawerDialog. - `styles.root` -  The outermost container of the dialog itself: alignment styles, box shadow, minWidth, maxWidth, width, height, maxHeight, etc. - `styles.dialog` - The actual dialog element with minWidth/minHeight, mostly to override View default styles - `styles.panel` - The inner dialog panel, targeting the internal `FlexiblePanel` component - `styles.content` - The internal `ModalContent` component, which sets padding - `styles.closeButton` - The close button, including absolute positioning","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-modal/src/index.ts","description":"A dialog to be used with DrawerLauncher that builds on top of FlexibleDialog.\nIt can receive a custom background (image or color), a title for the main\nheading, and that title can optionally render in the content area through\na render prop.\n\nOne of the following is required for labeling the dialog:\n- title content (React element or string)\n- aria-label (string)\n- aria-labelledby (string ID reference)\n\n### Usage\n\n```jsx\nimport {DrawerDialog} from \"@khanacademy/wonder-blocks-modal\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\n<DrawerDialog\n    title={<Heading size=\"xxlarge\" id=\"main-heading\">Select mission</Heading>}\n    content={\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur adipiscing\n            elit, sed do eiusmod tempor incididunt ut labore et\n            dolore magna aliqua. Ut enim ad minim veniam,\n            quis nostrud exercitation ullamco laboris nisi ut\n            aliquip ex ea commodo consequat. Duis aute irure\n            dolor in reprehenderit in voluptate velit esse\n            cillum dolore eu fugiat nulla pariatur. Excepteur\n            sint occaecat cupidatat non proident, sunt in culpa\n            qui officia deserunt mollit anim id est.`}\n        </BodyText>\n    }\n/>\n```\n\n### Custom styling\n\nYou can optionally pass in the `styles` prop to override various parts of a DrawerDialog.\n\n- `styles.root` -  The outermost container of the dialog itself: alignment styles, box shadow, minWidth, maxWidth, width, height, maxHeight, etc.\n- `styles.dialog` - The actual dialog element with minWidth/minHeight, mostly to override View default styles\n- `styles.panel` - The inner dialog panel, targeting the internal `FlexiblePanel` component\n- `styles.content` - The internal `ModalContent` component, which sets padding\n- `styles.closeButton` - The close button, including absolute positioning","displayName":"DrawerDialog","methods":[],"props":{"title":{"defaultValue":null,"description":"","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string | ReactElement<any, string | JSXElementConstructor<any>>"}},"aria-label":{"defaultValue":null,"description":"","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"titleId":{"defaultValue":null,"description":"An optional id parameter for the main heading. If one is not provided,\nan ID will be generated.","name":"titleId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"content":{"defaultValue":null,"description":"The content of the modal. Supports a render prop for placing the title in a slot.","name":"content","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | ((slots: RenderProps) => ReactElement<any, string | JSXElementConstructor<any>>)"}},"onClose":{"defaultValue":null,"description":"Called when the close button is clicked.\n\nIf you're using `DrawerLauncher`, you probably shouldn't use this prop!\nInstead, to listen for when the modal closes, add an `onClose` handler\nto the `DrawerLauncher`.","name":"onClose","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => unknown)"}},"closeButtonVisible":{"defaultValue":null,"description":"When true, the close button is shown; otherwise, the close button is not shown.","name":"closeButtonVisible","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"role":{"defaultValue":null,"description":"When set, overrides the default role value. Default role is \"dialog\"\nRoles other than dialog and alertdialog aren't appropriate for this\ncomponent","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"dialog\" | \"alertdialog\"","value":[{"value":"\"dialog\""},{"value":"\"alertdialog\""}]}},"styles":{"defaultValue":null,"description":"Optional custom styles.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"DrawerDialogStyles"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-describedby":{"defaultValue":null,"description":"The ID of the content describing this dialog, if applicable.","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/drawer-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"DrawerDialog"}},"packages-modal-drawerlauncher-drawerlauncher":{"id":"packages-modal-drawerlauncher-drawerlauncher","name":"DrawerLauncher","path":"./__docs__/wonder-blocks-modal/drawer-launcher.stories.tsx","stories":[{"id":"packages-modal-drawerlauncher-drawerlauncher--default","name":"Default","snippet":"const Default = () => <DrawerLauncher alignment=\"inlineEnd\" modal={DefaultModal}>\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</DrawerLauncher>;"},{"id":"packages-modal-drawerlauncher-drawerlauncher--inline-start-aligned","name":"Inline Start Aligned","snippet":"const InlineStartAligned = () => <DrawerLauncher modal={DefaultModal} alignment=\"inlineStart\">\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</DrawerLauncher>;","description":"An inlineStart-aligned drawer. Uses the `alignment` prop to slide in from the left in LTR writing mode and right in RTL writing mode."},{"id":"packages-modal-drawerlauncher-drawerlauncher--inline-end-aligned","name":"Inline End Aligned","snippet":"const InlineEndAligned = () => <DrawerLauncher modal={DefaultModal} alignment=\"inlineEnd\">\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</DrawerLauncher>;","description":"An inlineEnd-aligned drawer. Uses the `alignment` prop to slide in from the right in LTR writing mode and left in RTL writing mode."},{"id":"packages-modal-drawerlauncher-drawerlauncher--block-end-aligned","name":"Block End Aligned","snippet":"const BlockEndAligned = () => <DrawerLauncher modal={DefaultModal} alignment=\"blockEnd\">\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</DrawerLauncher>;","description":"An blockEnd-aligned drawer. Uses the `alignment` prop to slide in from the bottom in all writing modes, and a `timingDuration` of 400 milliseconds to allow more time for animating-in vertically."},{"id":"packages-modal-drawerlauncher-drawerlauncher--with-no-animation","name":"With No Animation","snippet":"const WithNoAnimation = () => <DrawerLauncher modal={DefaultModal} animated={false} alignment=\"inlineStart\">\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</DrawerLauncher>;","description":"A drawer with `animated` set to false for reducing motion"},{"id":"packages-modal-drawerlauncher-drawerlauncher--with-short-content","name":"With Short Content","snippet":"const WithShortContent = () => <DrawerLauncher\n    modal={\n        <DrawerDialog\n            title=\"Single-line title\"\n            content={\n                <View>\n                    <BodyText>Short contents</BodyText>\n                </View>\n            }\n        />\n    }\n    alignment=\"inlineEnd\">\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</DrawerLauncher>;","description":"An drawer with short content for style testing. Note: this component likely isn't the best choice for short content in the wild."},{"id":"packages-modal-drawerlauncher-drawerlauncher--with-really-long-content","name":"With Really Long Content","snippet":"const WithReallyLongContent = () => {\n    type CloseModalProps = {\n        closeModal: () => void;\n    };\n    const longModal = ({closeModal}: CloseModalProps) => (\n        <DrawerDialog\n            title=\"Really long content area\"\n            content={\n                <View>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                </View>\n            }\n        />\n    );\n\n    return (\n        <DrawerLauncher alignment=\"inlineEnd\" modal={longModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>\n                    Click me to open the modal\n                </Button>\n            )}\n        </DrawerLauncher>\n    );\n};","description":"A launcher with a really long DrawerDialog, for testing overflow styles."},{"id":"packages-modal-drawerlauncher-drawerlauncher--with-nested-dialogs","name":"With Nested Dialogs","snippet":"const WithNestedDialogs = () => {\n    const renderNestedModal = ({closeModal}: {closeModal: () => void}) => {\n        return (\n            <NestedDrawerDialogComponent titleText=\"Nested DrawerDialog\" />\n        );\n    };\n\n    return (\n        <DrawerLauncher alignment=\"inlineEnd\" modal={renderNestedModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>\n                    Click me to open the modal\n                </Button>\n            )}\n        </DrawerLauncher>\n    );\n};","description":"A launcher with nested dialogs, for testing a real-world implementation. This demonstrates that DrawerLauncher styles are properly applied to DrawerDialog even when there are nested components in between. The modal should receive the proper alignment animation and full-height styles."},{"id":"packages-modal-drawerlauncher-drawerlauncher--with-custom-dimensions","name":"With Custom Dimensions","snippet":"const WithCustomDimensions = () => <DrawerLauncher\n    modal={\n        <DrawerDialog\n            styles={{\n                root: {\n                    minWidth: \"unset\",\n                    width: \"unset\",\n                },\n            }}\n            title=\"Single-line title\"\n            content={\n                <View>\n                    <BodyText>Short contents</BodyText>\n                </View>\n            }\n        />\n    }\n    alignment=\"inlineEnd\">\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</DrawerLauncher>;","description":"An drawer with customized dialog dimensions."},{"id":"packages-modal-drawerlauncher-drawerlauncher--with-backdrop-dismiss-disabled","name":"With Backdrop Dismiss Disabled","snippet":"const WithBackdropDismissDisabled = () => <DrawerLauncher modal={DefaultModal} backdropDismissEnabled={false} alignment=\"inlineEnd\">\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</DrawerLauncher>;","description":"This is an example in which the modal _cannot_ be dismissed by clicking in in the backdrop. This is done by setting the `backdropDismissEnabled` prop on the `<DrawerLauncher>` element to false."},{"id":"packages-modal-drawerlauncher-drawerlauncher--triggering-programmatically","name":"Triggering Programmatically","snippet":"const TriggeringProgrammatically = () => {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const [opened, setOpened] = React.useState(false);\n\n    const handleOpen = () => {\n        setOpened(true);\n    };\n\n    const handleClose = () => {\n        setOpened(false);\n    };\n\n    return (\n        <View>\n            <ActionMenu menuText=\"actions\">\n                <ActionItem label=\"Open modal\" onClick={handleOpen} />\n            </ActionMenu>\n            <DrawerLauncher\n                onClose={handleClose}\n                opened={opened}\n                alignment=\"inlineEnd\"\n                // Note that this modal launcher has no children.\n                modal={({closeModal}) => (\n                    <DrawerDialog\n                        title=\"Triggered from action menu\"\n                        content={\n                            <View>\n                                <BodyText>Hello, world</BodyText>\n                            </View>\n                        }\n                    />\n                )} />\n        </View>\n    );\n};","description":"Sometimes you'll want to trigger a modal programmatically. This can be done by rendering `<DrawerLauncher>` without any children and instead setting its `opened` prop to true. In this situation, `DrawerLauncher` is a controlled component which means you'll also have to update `opened` to false in response to the `onClose` callback being triggered. It is necessary to use this method in this example, as `ActionMenu` cannot have a `DrawerLauncher` element as a child, (it can only have `Item` elements as children), so launching a modal from a dropdown must be done programatically."},{"id":"packages-modal-drawerlauncher-drawerlauncher--with-closed-focus-id","name":"With Closed Focus Id","snippet":"const WithClosedFocusId = () => {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const [opened, setOpened] = React.useState(false);\n\n    const handleOpen = () => {\n        setOpened(true);\n    };\n\n    const handleClose = () => {\n        setOpened(false);\n    };\n\n    return (\n        <View style={{gap: 20}}>\n            <Button>Top of page (should not receive focus)</Button>\n            <Button id=\"button-to-focus-on\">Focus here after close</Button>\n            <ActionMenu menuText=\"actions\">\n                <ActionItem label=\"Open modal\" onClick={() => handleOpen()} />\n            </ActionMenu>\n            <DrawerLauncher\n                alignment=\"inlineEnd\"\n                onClose={() => handleClose()}\n                opened={opened}\n                closedFocusId=\"button-to-focus-on\"\n                modal={DefaultModal} />\n        </View>\n    );\n};","description":"You can use the `closedFocusId` prop on the `DrawerLauncher` to specify where to set the focus after the modal has been closed. Imagine the following situation: clicking on a dropdown menu option to open a modal causes the dropdown to close, and so all of the dropdown options are removed from the DOM. This can be a problem because by default, the focus shifts to the previously focused element after a modal is closed; in this case, the element that opened the modal cannot receive focus since it no longer exists in the DOM, so when you close the modal, it doesn't know where to focus on the page. When the previously focused element no longer exists, the focus shifts to the page body, which causes a jump to the top of the page. This can make it diffcult to find the original dropdown. A solution to this is to use the `closedFocusId` prop to specify where to set the focus after the modal has been closed. In this example, `closedFocusId` is set to the ID of the button labeled \"Focus here after close.\" If the focus shifts to the button labeled \"Top of page (should not receieve focus),\" then the focus is on the page body, and the `closedFocusId` did not work."},{"id":"packages-modal-drawerlauncher-drawerlauncher--with-initial-focus-id","name":"With Initial Focus Id","snippet":"const WithInitialFocusId = () => {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const [value, setValue] = React.useState(\"Previously stored value\");\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const [value2, setValue2] = React.useState(\"\");\n\n    // @ts-expect-error [FEI-5019] - TS7031 - Binding element 'closeModal' implicitly has an 'any' type.\n    const modalInitialFocus = ({closeModal}) => (\n        <DrawerDialog\n            title=\"Single-line title\"\n            content={\n                <View>\n                    <View style={{gap: sizing.size_240}}>\n                        <LabeledField\n                            label=\"Label\"\n                            field={\n                                <TextField\n                                    value={value}\n                                    onChange={setValue}\n                                />\n                            }\n                        />\n                        <LabeledField\n                            label=\"Label 2\"\n                            id=\"field-to-be-focused\"\n                            field={\n                                <TextField\n                                    value={value2}\n                                    onChange={setValue2}\n                                />\n                            }\n                        />\n                    </View>\n                    <View style={styles.row}>\n                        <Button kind=\"tertiary\" onClick={closeModal}>\n                            Cancel\n                        </Button>\n                        <Button onClick={closeModal}>Submit</Button>\n                    </View>\n                </View>\n            }\n        />\n    );\n\n    return (\n        <DrawerLauncher\n            alignment=\"inlineEnd\"\n            modal={modalInitialFocus}\n            initialFocusId=\"field-to-be-focused-field\">\n            {({openModal}) => (\n                <Button onClick={openModal}>\n                    Open modal with initial focus\n                </Button>\n            )}\n        </DrawerLauncher>\n    );\n};","description":"Sometimes, you may want a specific element inside the modal to receive focus first. This can be done using the `initialFocusId` prop on the `<DrawerLauncher>` element. Just pass in the ID of the element that should receive focus, and it will automatically receieve focus once the modal opens. In this example, the top text input would have received the focus by default, but the bottom text field receives focus instead since its ID is passed into the `initialFocusId` prop."},{"id":"packages-modal-drawerlauncher-drawerlauncher--focus-trap","name":"Navigation with focus trap","snippet":"const FocusTrap = () => {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    const [selectedValue, setSelectedValue] = React.useState<any>(null);\n\n    // @ts-expect-error [FEI-5019] - TS7031 - Binding element 'closeModal' implicitly has an 'any' type.\n    const modalInitialFocus = ({closeModal}) => (\n        <DrawerDialog\n            title=\"Testing the focus trap on multiple modals\"\n            closeButtonVisible={false}\n            content={\n                <View>\n                    <View style={{gap: sizing.size_240}}>\n                        <BodyText id=\"focus-trap-story-body-text\">\n                            This modal demonstrates how the focus trap works\n                            with form elements (or focusable elements). Also\n                            demonstrates how the focus trap is moved to the\n                            next modal when it is opened (focus/tap on the\n                            `Open another modal` button).\n                        </BodyText>\n                        <RadioGroup\n                            label=\"A RadioGroup component inside a modal\"\n                            description=\"Some description\"\n                            groupName=\"some-group-name\"\n                            onChange={setSelectedValue}\n                            selectedValue={selectedValue ?? \"\"}\n                        >\n                            <Choice\n                                label=\"Choice 1\"\n                                value=\"some-choice-value\"\n                            />\n                            <Choice\n                                label=\"Choice 2\"\n                                value=\"some-choice-value-2\"\n                            />\n                        </RadioGroup>\n                    </View>\n                    <View style={styles.row}>\n                        <DrawerLauncher\n                            modal={SubModal}\n                            alignment={args.alignment}\n                        >\n                            {({openModal}) => (\n                                <Button\n                                    kind=\"secondary\"\n                                    onClick={openModal}\n                                >\n                                    Open another modal\n                                </Button>\n                            )}\n                        </DrawerLauncher>\n\n                        <Button\n                            onClick={closeModal}\n                            disabled={!selectedValue}\n                        >\n                            Next\n                        </Button>\n                    </View>\n                </View>\n            }\n            aria-describedby=\"focus-trap-story-body-text\"\n        />\n    );\n\n    return (\n        <DrawerLauncher modal={modalInitialFocus} alignment=\"inlineEnd\">\n            {({openModal}) => (\n                <Button onClick={openModal}>\n                    Open modal with RadioGroup\n                </Button>\n            )}\n        </DrawerLauncher>\n    );\n};","description":"All modals have a focus trap, which means that the focus is locked inside the modal. This is done to prevent the user from tabbing out of the modal and losing their place. The focus trap is also used to ensure that the focus is restored to the correct element when the modal is closed. In this example, the focus is trapped inside the modal, and the focus is restored to the button that opened the modal when the modal is closed. Also, this example includes a sub-modal that is opened from the first modal so we can test how the focus trap works when multiple modals are open."}],"import":"import { ActionItem, ActionMenu } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { Choice, RadioGroup } from \"@khanacademy/wonder-blocks-form\";\nimport { ComponentInfo, DrawerDialog, DrawerLauncher, TextField } from \"@khanacademy/wonder-blocks-modal\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"DrawerLauncher\" component.\n  32 | );\n  33 |\n> 34 | export default {\n     | ^\n  35 |     title: \"Packages / Modal / DrawerLauncher / DrawerLauncher\",\n  36 |     component: DrawerLauncher,\n  37 |     decorators: [\n\n./__docs__/wonder-blocks-modal/drawer-launcher.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {ActionMenu, ActionItem} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {RadioGroup, Choice} from \"@khanacademy/wonder-blocks-form\";\nimport {LabeledField} from \"@khanacademy/wonder-blocks-labeled-field\";\nimport {sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {DrawerDialog, DrawerLauncher} from \"@khanacademy/wonder-blocks-modal\";\nimport packageConfig from \"../../packages/wonder-blocks-modal/package.json\";\n\nimport type {ModalElement} from \"../../packages/wonder-blocks-modal/src/util/types\";\nimport DrawerLauncherArgTypes from \"./drawer-launcher.argtypes\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport TextField from \"../../packages/wonder-blocks-form/src/components/text-field\";\nimport {reallyLongText} from \"../components/text-for-testing\";\n\nconst DefaultModal = (): ModalElement => (\n    <DrawerDialog\n        title=\"Single-line title\"\n        content={\n            <View>\n                <BodyText>{reallyLongText}</BodyText>\n            </View>\n        }\n    />\n);\n\nexport default {\n    title: \"Packages / Modal / DrawerLauncher / DrawerLauncher\",\n    component: DrawerLauncher,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>\n                <Story />\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            description: {\n                component: `A drawer modal launcher intended for the \\`DrawerDialog\\` component.\n\nIt can align a dialog on the \\`inlineStart\\` (left),  \\`inlineEnd\\` (right), or \\`blockEnd\\` (bottom).\n\n- Slide animations can be turned off with the \\`animated\\` prop.\n- Timing of animations can be fine-tuned with the \\`timingDuration\\` prop, used on enter and exit animations. It is also used to coordinate timing of focus management on open and close.\n\n**IMPORTANT**: This component should only be used with \\`DrawerDialog\\`. Using it with other\ndialog components may result in incorrect animations, positioning, and styling.\n\nFor conditionally rendering modals, ensure there is only one \\`DrawerLauncher\\` in\nyour component tree. A launcher needs to stay mounted on the current page to\nproperly handle the user's keyboard focus on close of modals.\nRead [more details on Confluence](https://khanacademy.atlassian.net/wiki/spaces/FRONTEND/blog/2025/11/24/4454383789/Wonder+Blocks+Modal+Tips+Tricks).\n\nSee available styling customizations in \\`DrawerDialog\\` docs.\n\n### Usage\n\n\\`\\`\\`jsx\nimport {DrawerLauncher} from \"@khanacademy/wonder-blocks-modal\";\nimport {DrawerDialog} from \"@khanacademy/wonder-blocks-modal\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\n<DrawerLauncher\n     onClose={handleClose}\n     opened={opened}\n     animated={animated}\n     alignment=\"inlineStart\"\n     modal={({closeModal}) => (\n         <DrawerDialog\n             title=\"Assign Mastery Mission\"\n             content={\n                 <View>\n                     <BodyText>\n                         Hello, world\n                     </BodyText>\n                 </View>\n             }\n         />\n     )}\n/>\n\\`\\`\\``,\n            },\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {\n            // All the examples for DrawerLauncher are behavior based, not visual.\n            disableSnapshot: true,\n        },\n    },\n    argTypes: DrawerLauncherArgTypes,\n} as Meta<typeof DrawerLauncher>;\n\ntype StoryComponentType = StoryObj<typeof DrawerLauncher>;\n\nexport const Default: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => (\n        <DrawerLauncher {...args} modal={DefaultModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </DrawerLauncher>\n    ),\n};\n\n/**\n *\n * An inlineStart-aligned drawer. Uses the `alignment` prop to slide in from the\n * left in LTR writing mode and right in RTL writing mode.\n */\nexport const InlineStartAligned: StoryComponentType = {\n    args: {\n        alignment: \"inlineStart\",\n    },\n    render: (args) => (\n        <DrawerLauncher modal={DefaultModal} alignment={args.alignment}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </DrawerLauncher>\n    ),\n};\n\n/**\n *\n * An inlineEnd-aligned drawer. Uses the `alignment` prop to slide in from the\n * right in LTR writing mode and left in RTL writing mode.\n */\nexport const InlineEndAligned: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => (\n        <DrawerLauncher modal={DefaultModal} alignment={args.alignment}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </DrawerLauncher>\n    ),\n};\n\n/**\n *\n * An blockEnd-aligned drawer. Uses the `alignment` prop to slide in from the\n * bottom in all writing modes, and a `timingDuration` of 400 milliseconds to\n * allow more time for animating-in vertically.\n */\nexport const BlockEndAligned: StoryComponentType = {\n    args: {\n        alignment: \"blockEnd\",\n        timingDuration: 400,\n    },\n    render: (args) => (\n        <DrawerLauncher modal={DefaultModal} alignment={args.alignment}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </DrawerLauncher>\n    ),\n};\n\n/**\n *\n * A drawer with `animated` set to false for reducing motion\n */\nexport const WithNoAnimation: StoryComponentType = {\n    args: {\n        alignment: \"inlineStart\",\n    },\n    render: (args) => (\n        <DrawerLauncher\n            modal={DefaultModal}\n            animated={false}\n            alignment={args.alignment}\n        >\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </DrawerLauncher>\n    ),\n};\n\n/**\n *\n * An drawer with short content for style testing.\n *\n * Note: this component likely isn't the best choice for short content in the wild.\n */\nexport const WithShortContent: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => (\n        <DrawerLauncher\n            modal={\n                <DrawerDialog\n                    title=\"Single-line title\"\n                    content={\n                        <View>\n                            <BodyText>Short contents</BodyText>\n                        </View>\n                    }\n                />\n            }\n            alignment={args.alignment}\n        >\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </DrawerLauncher>\n    ),\n};\n\n/**\n *\n * A launcher with a really long DrawerDialog, for testing overflow styles.\n */\nexport const WithReallyLongContent: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => {\n        type CloseModalProps = {\n            closeModal: () => void;\n        };\n        const longModal = ({closeModal}: CloseModalProps) => (\n            <DrawerDialog\n                title=\"Really long content area\"\n                content={\n                    <View>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                    </View>\n                }\n            />\n        );\n        return (\n            <DrawerLauncher alignment={args.alignment} modal={longModal}>\n                {({openModal}) => (\n                    <Button onClick={openModal}>\n                        Click me to open the modal\n                    </Button>\n                )}\n            </DrawerLauncher>\n        );\n    },\n};\n\nconst NestedDrawerDialogComponent = ({titleText}: {titleText: string}) => {\n    return (\n        <DrawerDialog\n            title={titleText}\n            content={({title: titleElement}) => (\n                <View style={styles.nestedModalContent}>\n                    {titleElement}\n                    <BodyText size=\"small\">\n                        Testing out nested modal content\n                    </BodyText>\n                </View>\n            )}\n        />\n    );\n};\n\n/**\n *\n * A launcher with nested dialogs, for testing a real-world implementation.\n * This demonstrates that DrawerLauncher styles are properly applied to DrawerDialog\n * even when there are nested components in between. The modal should receive the\n * proper alignment animation and full-height styles.\n */\nexport const WithNestedDialogs: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => {\n        const renderNestedModal = ({closeModal}: {closeModal: () => void}) => {\n            return (\n                <NestedDrawerDialogComponent titleText=\"Nested DrawerDialog\" />\n            );\n        };\n\n        return (\n            <DrawerLauncher\n                alignment={args.alignment}\n                modal={renderNestedModal}\n            >\n                {({openModal}) => (\n                    <Button onClick={openModal}>\n                        Click me to open the modal\n                    </Button>\n                )}\n            </DrawerLauncher>\n        );\n    },\n};\n\n/**\n *\n * An drawer with customized dialog dimensions.\n */\nexport const WithCustomDimensions: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => (\n        <DrawerLauncher\n            modal={\n                <DrawerDialog\n                    styles={{\n                        root: {\n                            minWidth: \"unset\",\n                            width: \"unset\",\n                        },\n                    }}\n                    title=\"Single-line title\"\n                    content={\n                        <View>\n                            <BodyText>Short contents</BodyText>\n                        </View>\n                    }\n                />\n            }\n            alignment={args.alignment}\n        >\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </DrawerLauncher>\n    ),\n};\n\n/**\n *\n *  This is an example in which the modal _cannot_\n    be dismissed by clicking in in the backdrop. This is done by\n    setting the `backdropDismissEnabled` prop on the\n    `<DrawerLauncher>` element to false.\n */\nexport const WithBackdropDismissDisabled: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => (\n        <DrawerLauncher\n            modal={DefaultModal}\n            backdropDismissEnabled={false}\n            alignment={args.alignment}\n        >\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </DrawerLauncher>\n    ),\n};\n\n/**\n *\n *  Sometimes you'll want to trigger a modal\n    programmatically. This can be done by rendering `<DrawerLauncher>`\n    without any children and instead setting its `opened` prop to\n    true. In this situation, `DrawerLauncher` is a controlled\n    component which means you'll also have to update `opened` to\n    false in response to the `onClose` callback being triggered.\n    It is necessary to use this method in this example, as\n    `ActionMenu` cannot have a `DrawerLauncher` element as a child,\n    (it can only have `Item` elements as children), so launching a\n    modal from a dropdown must be done programatically.\n */\nexport const TriggeringProgrammatically: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => {\n        // eslint-disable-next-line react-hooks/rules-of-hooks\n        const [opened, setOpened] = React.useState(false);\n\n        const handleOpen = () => {\n            setOpened(true);\n        };\n\n        const handleClose = () => {\n            setOpened(false);\n        };\n\n        return (\n            <View>\n                <ActionMenu menuText=\"actions\">\n                    <ActionItem label=\"Open modal\" onClick={handleOpen} />\n                </ActionMenu>\n\n                <DrawerLauncher\n                    onClose={handleClose}\n                    opened={opened}\n                    alignment={args.alignment}\n                    modal={({closeModal}) => (\n                        <DrawerDialog\n                            title=\"Triggered from action menu\"\n                            content={\n                                <View>\n                                    <BodyText>Hello, world</BodyText>\n                                </View>\n                            }\n                        />\n                    )}\n                    // Note that this modal launcher has no children.\n                />\n            </View>\n        );\n    },\n};\n\n/**\n *\n *  You can use the `closedFocusId` prop on the\n    `DrawerLauncher` to specify where to set the focus after the\n    modal has been closed. Imagine the following situation:\n    clicking on a dropdown menu option to open a modal\n    causes the dropdown to close, and so all of the dropdown options\n    are removed from the DOM. This can be a problem because by\n    default, the focus shifts to the previously focused element after\n    a modal is closed; in this case, the element that opened the modal\n    cannot receive focus since it no longer exists in the DOM,\n    so when you close the modal, it doesn't know where to focus on the\n    page. When the previously focused element no longer exists,\n    the focus shifts to the page body, which causes a jump to\n    the top of the page. This can make it diffcult to find the original\n    dropdown. A solution to this is to use the `closedFocusId` prop\n    to specify where to set the focus after the modal has been closed.\n    In this example, `closedFocusId` is set to the ID of the button\n    labeled \"Focus here after close.\" If the focus shifts to the button\n    labeled \"Top of page (should not receieve focus),\" then the focus\n    is on the page body, and the `closedFocusId` did not work.\n */\nexport const WithClosedFocusId: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => {\n        // eslint-disable-next-line react-hooks/rules-of-hooks\n        const [opened, setOpened] = React.useState(false);\n\n        const handleOpen = () => {\n            setOpened(true);\n        };\n\n        const handleClose = () => {\n            setOpened(false);\n        };\n\n        return (\n            <View style={{gap: 20}}>\n                <Button>Top of page (should not receive focus)</Button>\n                <Button id=\"button-to-focus-on\">Focus here after close</Button>\n                <ActionMenu menuText=\"actions\">\n                    <ActionItem\n                        label=\"Open modal\"\n                        onClick={() => handleOpen()}\n                    />\n                </ActionMenu>\n                <DrawerLauncher\n                    alignment={args.alignment}\n                    onClose={() => handleClose()}\n                    opened={opened}\n                    closedFocusId=\"button-to-focus-on\"\n                    modal={DefaultModal}\n                />\n            </View>\n        );\n    },\n};\n\n/**\n *  Sometimes, you may want a specific element inside\n    the modal to receive focus first. This can be done using the\n    `initialFocusId` prop on the `<DrawerLauncher>` element.\n    Just pass in the ID of the element that should receive focus,\n    and it will automatically receieve focus once the modal opens.\n    In this example, the top text input would have received the focus\n    by default, but the bottom text field receives focus instead\n    since its ID is passed into the `initialFocusId` prop.\n */\nexport const WithInitialFocusId: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => {\n        // eslint-disable-next-line react-hooks/rules-of-hooks\n        const [value, setValue] = React.useState(\"Previously stored value\");\n        // eslint-disable-next-line react-hooks/rules-of-hooks\n        const [value2, setValue2] = React.useState(\"\");\n\n        // @ts-expect-error [FEI-5019] - TS7031 - Binding element 'closeModal' implicitly has an 'any' type.\n        const modalInitialFocus = ({closeModal}) => (\n            <DrawerDialog\n                title=\"Single-line title\"\n                content={\n                    <View>\n                        <View style={{gap: sizing.size_240}}>\n                            <LabeledField\n                                label=\"Label\"\n                                field={\n                                    <TextField\n                                        value={value}\n                                        onChange={setValue}\n                                    />\n                                }\n                            />\n                            <LabeledField\n                                label=\"Label 2\"\n                                id=\"field-to-be-focused\"\n                                field={\n                                    <TextField\n                                        value={value2}\n                                        onChange={setValue2}\n                                    />\n                                }\n                            />\n                        </View>\n                        <View style={styles.row}>\n                            <Button kind=\"tertiary\" onClick={closeModal}>\n                                Cancel\n                            </Button>\n                            <Button onClick={closeModal}>Submit</Button>\n                        </View>\n                    </View>\n                }\n            />\n        );\n\n        return (\n            <DrawerLauncher\n                alignment={args.alignment}\n                modal={modalInitialFocus}\n                initialFocusId=\"field-to-be-focused-field\"\n            >\n                {({openModal}) => (\n                    <Button onClick={openModal}>\n                        Open modal with initial focus\n                    </Button>\n                )}\n            </DrawerLauncher>\n        );\n    },\n};\n\n/**\n * Focus trap navigation\n */\nconst SubModal = () => (\n    <DrawerDialog\n        title=\"Submodal\"\n        content={\n            <View style={{gap: sizing.size_160}}>\n                <BodyText>\n                    This modal demonstrates how the focus trap works when a\n                    modal is opened from another modal.\n                </BodyText>\n                <BodyText>\n                    Try navigating this modal with the keyboard and then close\n                    it. The focus should be restored to the button that opened\n                    the modal.\n                </BodyText>\n                <LabeledField\n                    label=\"Label\"\n                    field={<TextField value=\"\" onChange={() => {}} />}\n                />\n                <Button>A focusable element</Button>\n            </View>\n        }\n    />\n);\n\n/**\n *  All modals have a focus trap, which means that the\n    focus is locked inside the modal. This is done to prevent the user\n    from tabbing out of the modal and losing their place. The focus\n    trap is also used to ensure that the focus is restored to the\n    correct element when the modal is closed. In this example, the\n    focus is trapped inside the modal, and the focus is restored to the\n    button that opened the modal when the modal is closed.\n\n    Also, this example includes a sub-modal that is opened from the\n    first modal so we can test how the focus trap works when multiple\n    modals are open.\n */\nexport const FocusTrap: StoryComponentType = {\n    args: {\n        alignment: \"inlineEnd\",\n    },\n    render: (args) => {\n        // eslint-disable-next-line react-hooks/rules-of-hooks\n        const [selectedValue, setSelectedValue] = React.useState<any>(null);\n\n        // @ts-expect-error [FEI-5019] - TS7031 - Binding element 'closeModal' implicitly has an 'any' type.\n        const modalInitialFocus = ({closeModal}) => (\n            <DrawerDialog\n                title=\"Testing the focus trap on multiple modals\"\n                closeButtonVisible={false}\n                content={\n                    <View>\n                        <View style={{gap: sizing.size_240}}>\n                            <BodyText id=\"focus-trap-story-body-text\">\n                                This modal demonstrates how the focus trap works\n                                with form elements (or focusable elements). Also\n                                demonstrates how the focus trap is moved to the\n                                next modal when it is opened (focus/tap on the\n                                `Open another modal` button).\n                            </BodyText>\n                            <RadioGroup\n                                label=\"A RadioGroup component inside a modal\"\n                                description=\"Some description\"\n                                groupName=\"some-group-name\"\n                                onChange={setSelectedValue}\n                                selectedValue={selectedValue ?? \"\"}\n                            >\n                                <Choice\n                                    label=\"Choice 1\"\n                                    value=\"some-choice-value\"\n                                />\n                                <Choice\n                                    label=\"Choice 2\"\n                                    value=\"some-choice-value-2\"\n                                />\n                            </RadioGroup>\n                        </View>\n                        <View style={styles.row}>\n                            <DrawerLauncher\n                                modal={SubModal}\n                                alignment={args.alignment}\n                            >\n                                {({openModal}) => (\n                                    <Button\n                                        kind=\"secondary\"\n                                        onClick={openModal}\n                                    >\n                                        Open another modal\n                                    </Button>\n                                )}\n                            </DrawerLauncher>\n\n                            <Button\n                                onClick={closeModal}\n                                disabled={!selectedValue}\n                            >\n                                Next\n                            </Button>\n                        </View>\n                    </View>\n                }\n                aria-describedby=\"focus-trap-story-body-text\"\n            />\n        );\n\n        return (\n            <DrawerLauncher\n                modal={modalInitialFocus}\n                alignment={args.alignment}\n            >\n                {({openModal}) => (\n                    <Button onClick={openModal}>\n                        Open modal with RadioGroup\n                    </Button>\n                )}\n            </DrawerLauncher>\n        );\n    },\n};\n\nFocusTrap.storyName = \"Navigation with focus trap\";\n\nconst styles = StyleSheet.create({\n    example: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n    row: {\n        flexDirection: \"row\",\n        gap: sizing.size_160,\n        paddingBlockStart: sizing.size_160,\n    },\n});\n"}},"packages-modal-flexibledialog":{"id":"packages-modal-flexibledialog","name":"FlexibleDialog","path":"./__docs__/wonder-blocks-modal/flexible-dialog.stories.tsx","stories":[{"id":"packages-modal-flexibledialog--default","name":"Default","snippet":"const Default = () => <View style={styles.previewSizer}>\n    <View style={styles.modalPositioner}>\n        <FlexibleDialog\n            title={<Heading id=\"main-heading\">Some title</Heading>}\n            content={(<>\n                <BodyText>{reallyLongText}</BodyText>\n            </>)} />\n    </View>\n</View>;"},{"id":"packages-modal-flexibledialog--with-background-image","name":"With Background Image","snippet":"const WithBackgroundImage = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <FlexibleDialog\n                title={\n                    <Heading\n                        size=\"xlarge\"\n                        weight=\"bold\"\n                        id=\"gem-challenge-completed-modal-heading\"\n                        tag=\"h2\"\n                    >\n                        Congrats Rainier McCheddarton!\n                    </Heading>\n                }\n                styles={{\n                    panel: modalBgStyle,\n                }}\n                content={({title}) => (\n                    <>\n                        <View\n                            style={styles.celebrationPattern}\n                            tag=\"span\"\n                            aria-hidden={true}\n                        />\n                        <View style={styles.centered}>\n                            <img\n                                src={celebrationChest}\n                                style={{maxInlineSize: \"240px\"}}\n                                alt=\"\"\n                            />\n                            {title}\n                            <Heading\n                                size=\"large\"\n                                weight=\"bold\"\n                                style={{\n                                    marginBlock: sizing.size_240,\n                                    textAlign: \"center\",\n                                }}\n                            >\n                                Your class, Advanced Calculus, reached 1500\n                                of 1500 gems\n                            </Heading>\n                            <ActivityButton\n                                kind=\"primary\"\n                                styles={{\n                                    root: {\n                                        marginBlockStart: 20,\n                                        alignSelf: \"center\",\n                                    },\n                                }}\n                                onClick={() => {}}\n                            >\n                                Continue\n                            </ActivityButton>\n                        </View>\n                    </>\n                )}\n            />\n        </View>\n    </View>\n);"},{"id":"packages-modal-flexibledialog--with-no-padding","name":"With No Padding","snippet":"const WithNoPadding = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <FlexibleDialog\n                styles={{\n                    content: {\n                        padding: 0,\n                        maxWidth: \"90%\",\n                        [small]: {\n                            paddingInline: 0,\n                        },\n                    },\n                }}\n                title=\"Dogz are the best\"\n                content={\n                    <View>\n                        <BodyText>{longText}</BodyText>\n                        <BodyText>{longText}</BodyText>\n                        <BodyText>{longText}</BodyText>\n                    </View>\n                }\n            />\n        </View>\n    </View>\n);"},{"id":"packages-modal-flexibledialog--with-title-render-prop","name":"With Title Render Prop","snippet":"const WithTitleRenderProp = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <FlexibleDialog\n                title={<Heading tag=\"h2\">Hey, Bagley!</Heading>}\n                content={({title}) => (\n                    <View>\n                        <img src={celebrationChest} alt=\"\" />\n                        {title}\n                        <Heading\n                            size=\"large\"\n                            weight=\"bold\"\n                            tag=\"h3\"\n                            style={{\n                                marginBlock: sizing.size_240,\n                                textAlign: \"center\",\n                            }}\n                        >\n                            Your class, Advanced Calculus, reached 1500 of\n                            1500 gems\n                        </Heading>\n                    </View>\n                )}\n            />\n        </View>\n    </View>\n);","description":"A FlexibleDialog can have a movable title via the `content` and its `title` render prop, so it doesn't have to be the first element. It will also label the dialog as its accessible name."},{"id":"packages-modal-flexibledialog--with-aria-label","name":"With Aria Label","snippet":"const WithAriaLabel = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <FlexibleDialog\n                aria-label=\"Catz are the best\"\n                content={\n                    <View>\n                        <BodyText>This is some text</BodyText>\n                    </View>\n                }\n            />\n        </View>\n    </View>\n);","description":"A FlexibleDialog can have an aria-label as its accessible name."},{"id":"packages-modal-flexibledialog--with-aria-labelledby","name":"With Aria Labelledby","snippet":"const WithAriaLabelledby = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <FlexibleDialog\n                aria-labelledby=\"main-heading\"\n                title={\n                    <Heading id=\"main-heading\">Dogz are the best</Heading>\n                }\n                content={\n                    <View>\n                        <BodyText>This is some text</BodyText>\n                    </View>\n                }\n            />\n        </View>\n    </View>\n);","description":"A FlexibleDialog can derive its accessible name from aria-labelledby."},{"id":"packages-modal-flexibledialog--with-style","name":"With Style","snippet":"const WithStyle = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <FlexibleDialog\n                title={<Heading>Hello, world!</Heading>}\n                content={\n                    <>\n                        <BodyText>{reallyLongText}</BodyText>\n                    </>\n                }\n                styles={{\n                    root: {\n                        color: semanticColor.status.notice.foreground,\n                        maxWidth: 1000,\n                    },\n                    panel: {\n                        backgroundColor:\n                            semanticColor.status.notice.background,\n                    },\n                }}\n            />\n        </View>\n    </View>\n);","description":"A FlexibleDialog can have custom styles via the `style` prop. Here, the modal has a `maxWidth: 1000` and `color: Color.blue` in its custom styles."},{"id":"packages-modal-flexibledialog--with-long-contents","name":"With Long Contents","snippet":"const WithLongContents = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <FlexibleDialog\n                title={<Heading>Hello, world!</Heading>}\n                content={\n                    <>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText style={{display: \"flex\"}}>\n                            <Button\n                                style={{\n                                    marginInlineStart: \"auto\",\n                                    marginBlockStart: sizing.size_100,\n                                }}\n                            >\n                                A button\n                            </Button>\n                        </BodyText>\n                    </>\n                }\n            />\n        </View>\n    </View>\n);","description":"A FlexibleDialog will adjust with long contents, instead of fixing its height."},{"id":"packages-modal-flexibledialog--with-launcher","name":"With Launcher","snippet":"const WithLauncher = () => {\n    type MyModalProps = {\n        closeModal: () => void;\n    };\n\n    const MyModal = ({closeModal}: MyModalProps): React.ReactElement => (\n        <FlexibleDialog\n            title={<Heading>Single-line title</Heading>}\n            content={\n                <>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <View style={styles.launcherButton}>\n                        <Button onClick={closeModal}>Close</Button>\n                    </View>\n                </>\n            }\n        />\n    );\n\n    return (\n        <ModalLauncher modal={MyModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </ModalLauncher>\n    );\n};","description":"A modal can be launched using a launcher. Here, the launcher is a `<Button>` element whose `onClick` function opens the modal. The modal passed into the `modal` prop of the `<ModalLauncher>` element is a `<FlexibleDialog>`. To turn an element into a launcher, wrap the element in a `<ModalLauncher>` element."},{"id":"packages-modal-flexibledialog--with-full-screen-styling","name":"With Full Screen Styling","snippet":"const WithFullScreenStyling = () => {\n    type MyModalProps = {\n        closeModal: () => void;\n    };\n\n    const FullScreenModal = ({\n        closeModal,\n    }: MyModalProps): React.ReactElement => (\n        <FlexibleDialog\n            title={\n                <Heading\n                    size=\"xxlarge\"\n                    style={{\n                        marginBlockEnd: sizing.size_320,\n                    }}\n                >\n                    Full-Screen Dialog\n                </Heading>\n            }\n            styles={{\n                root: {\n                    // Make the dialog take up the full viewport\n                    width: \"100vw\",\n                    maxWidth: \"none\",\n                    maxHeight: \"none\",\n                    height: \"100%\",\n                    minBlockSize: \"100vh\",\n                    margin: 0,\n                },\n            }}\n            content={({title}) => (\n                <View style={styles.fullScreenContent}>\n                    {title}\n                    <BodyText\n                        style={{\n                            color: semanticColor.core.foreground.neutral\n                                .default,\n                            marginBlockEnd: sizing.size_480,\n                        }}\n                    >\n                        This FlexibleDialog demonstrates full-screen\n                        positioning. The dialog takes up the entire viewport\n                        with clean styling using Wonder Blocks tokens.\n                    </BodyText>\n                    <View style={styles.fullScreenActions}>\n                        <Button\n                            kind=\"primary\"\n                            size=\"large\"\n                            onClick={closeModal}\n                        >\n                            Continue\n                        </Button>\n                    </View>\n                </View>\n            )}\n        />\n    );\n\n    return (\n        <ModalLauncher modal={FullScreenModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Open Full-Screen Dialog</Button>\n            )}\n        </ModalLauncher>\n    );\n};","description":"A FlexibleDialog can be positioned full-screen by overriding the root styles. This creates a clean, full-viewport experience."},{"id":"packages-modal-flexibledialog--with-custom-close-button-positioning","name":"With Custom Close Button Positioning","snippet":"const WithCustomCloseButtonPositioning = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <FlexibleDialog\n                title={\n                    <Heading size=\"large\">\n                        Custom Close Button Positioning\n                    </Heading>\n                }\n                styles={{\n                    closeButton: {\n                        // Position close button at bottom left instead of top right\n                        position: \"absolute\",\n                        insetBlockEnd: sizing.size_240,\n                        insetInlineStart: sizing.size_240,\n                        insetBlockStart: \"auto\",\n                        insetInlineEnd: \"auto\",\n                    },\n                }}\n                content={\n                    <View>\n                        <BodyText>\n                            This FlexibleDialog demonstrates custom close\n                            button positioning. Instead of the traditional\n                            top-right corner, the close button has been\n                            moved to the bottom-left corner.\n                        </BodyText>\n\n                        <View style={styles.row}>\n                            <Button kind=\"primary\">Save Changes</Button>\n                            <Button kind=\"secondary\">Cancel</Button>\n                        </View>\n                    </View>\n                }\n            />\n        </View>\n    </View>\n);","description":"A FlexibleDialog can have custom close button positioning through the styles prop. This example shows positioning the close button in a novel location."}],"import":"import Button, { ActivityButton } from \"@khanacademy/wonder-blocks-button\";\nimport { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, FlexibleDialog, ModalLauncher } from \"@khanacademy/wonder-blocks-modal\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A flexible modal variant with fewer layout constraints. It can receive a custom background (image or color), a title for the main heading, and that title can optionally render in the content area through a render prop. It can be used directly with `ModalLauncher`. In a `DrawerLauncher`, use `DrawerDialog` instead, which is a wrapper around `FlexibleDialog`. One of the following is required for labeling the dialog: - title content (React element or string) - aria-label (string) - aria-labelledby (string ID reference) ### Usage ```jsx import {FlexibleDialog} from \"@khanacademy/wonder-blocks-modal\"; import {BodyText} from \"@khanacademy/wonder-blocks-typography\"; <FlexibleDialog title={<Heading size=\"xxlarge\" id=\"main-heading\">Select mission</Heading>} content={ <BodyText> {`Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est.`} </BodyText> } /> ``` ### Custom styling You can optionally pass in the `styles` prop to override various parts of a DrawerDialog. - `styles.root` -  The outermost container of the dialog: box shadow, minWidth, maxWidth, width, height, maxHeight, etc. - `styles.dialog` - The actual dialog element with minWidth/minHeight, mostly to override View default styles - `styles.panel` - The inner dialog flex panel, targeting the internal `FlexiblePanel` component - `styles.content` - The internal `ModalContent` component, which sets padding - `styles.closeButton` - The close button, including absolute positioning","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-modal/src/index.ts","description":"A flexible modal variant with fewer layout constraints. It can receive\na custom background (image or color), a title for the main heading, and that\ntitle can optionally render in the content area through a render prop.\n\nIt can be used directly with `ModalLauncher`. In a `DrawerLauncher`, use\n`DrawerDialog` instead, which is a wrapper around `FlexibleDialog`.\n\nOne of the following is required for labeling the dialog:\n- title content (React element or string)\n- aria-label (string)\n- aria-labelledby (string ID reference)\n\n### Usage\n\n```jsx\nimport {FlexibleDialog} from \"@khanacademy/wonder-blocks-modal\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\n<FlexibleDialog\n    title={<Heading size=\"xxlarge\" id=\"main-heading\">Select mission</Heading>}\n    content={\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur adipiscing\n            elit, sed do eiusmod tempor incididunt ut labore et\n            dolore magna aliqua. Ut enim ad minim veniam,\n            quis nostrud exercitation ullamco laboris nisi ut\n            aliquip ex ea commodo consequat. Duis aute irure\n            dolor in reprehenderit in voluptate velit esse\n            cillum dolore eu fugiat nulla pariatur. Excepteur\n            sint occaecat cupidatat non proident, sunt in culpa\n            qui officia deserunt mollit anim id est.`}\n        </BodyText>\n    }\n/>\n```\n\n### Custom styling\n\nYou can optionally pass in the `styles` prop to override various parts of a DrawerDialog.\n\n- `styles.root` -  The outermost container of the dialog: box shadow, minWidth, maxWidth, width, height, maxHeight, etc.\n- `styles.dialog` - The actual dialog element with minWidth/minHeight, mostly to override View default styles\n- `styles.panel` - The inner dialog flex panel, targeting the internal `FlexiblePanel` component\n- `styles.content` - The internal `ModalContent` component, which sets padding\n- `styles.closeButton` - The close button, including absolute positioning","displayName":"FlexibleDialog","methods":[],"props":{"title":{"defaultValue":null,"description":"","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string | ReactElement<any, string | JSXElementConstructor<any>>"}},"aria-label":{"defaultValue":null,"description":"","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"titleId":{"defaultValue":null,"description":"An optional id parameter for the main heading. If one is not provided,\nan ID will be generated.","name":"titleId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"content":{"defaultValue":null,"description":"The content of the modal. Supports a render prop for placing the title in a slot.","name":"content","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | ((slots: RenderProps) => ReactElement<any, string | JSXElementConstructor<any>>)"}},"onClose":{"defaultValue":null,"description":"Called when the close button is clicked.\n\nIf you're using `ModalLauncher`, you probably shouldn't use this prop!\nInstead, to listen for when the modal closes, add an `onClose` handler\nto the `ModalLauncher`.  Doing so will result in a console.warn().","name":"onClose","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => unknown)"}},"closeButtonVisible":{"defaultValue":null,"description":"When true, the close button is shown; otherwise, the close button is not shown.","name":"closeButtonVisible","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"role":{"defaultValue":null,"description":"When set, overrides the default role value. Default role is \"dialog\"\nRoles other than dialog and alertdialog aren't appropriate for this\ncomponent","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"dialog\" | \"alertdialog\"","value":[{"value":"\"dialog\""},{"value":"\"alertdialog\""}]}},"styles":{"defaultValue":null,"description":"Optional custom styles.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"FlexibleDialogStyles"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-describedby":{"defaultValue":null,"description":"The ID of the content describing this dialog, if applicable.","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/flexible-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"FlexibleDialog"}},"packages-modal-building-blocks-modaldialog":{"id":"packages-modal-building-blocks-modaldialog","name":"ModalDialog","path":"./__docs__/wonder-blocks-modal/modal-dialog.stories.tsx","stories":[{"id":"packages-modal-building-blocks-modaldialog--default","name":"Default","snippet":"const Default = () => <View style={styles.previewSizer}>\n    <View style={styles.modalPositioner}>\n        <ModalDialog\n            style={{\n                maxWidth: 500,\n                maxHeight: 500,\n            }}\n            aria-labelledby=\"modal-title-0\"\n            aria-describedby=\"modal-desc-0\">\n            <ModalPanel\n                content={\n                    <View style={{gap: sizing.size_240}}>\n                        <Heading size=\"xxlarge\" id=\"modal-title-0\">\n                            Modal Title\n                        </Heading>\n                        <BodyText id=\"modal-desc-0\">\n                            Here is some text in the modal.\n                        </BodyText>\n                    </View>\n                } />\n        </ModalDialog>\n    </View>\n</View>;","description":"This is a basic `<ModalDialog>` that wraps a `<ModalPanel>` element. The `<ModalDialog>` is just a a wrapper for the visual components of the overall modal. It sets the modal's role to `\"dialog\"`. If it did not have another element as a child here (a `<ModalPanel>` in this case), nothing would be visible. If the `<ModalDialog>` were not given a `maxHeight` or `maxWidth` style, it would take up the entire viewport. #### Accessibility In this example, the `aria-labelledby` provides the alert dialog an accessible name by referring to the element that provides the dialog title. The `aria-describedby` attribute gives the alert dialog an accessible description by referring to the dialog content that describes the primary message or purpose of the dialog."},{"id":"packages-modal-building-blocks-modaldialog--with-above-and-below","name":"With Above And Below","snippet":"const WithAboveAndBelow = () => {\n    const aboveStyle = {\n        background: \"url(./modal-above.png)\",\n        width: 874,\n        height: 551,\n        position: \"absolute\",\n        top: 40,\n        left: -140,\n    } as const;\n\n    const belowStyle = {\n        background: \"url(./modal-below.png)\",\n        width: 868,\n        height: 521,\n        position: \"absolute\",\n        top: -100,\n        left: -300,\n    } as const;\n\n    return (\n        <View style={styles.previewSizer}>\n            <View style={styles.modalPositioner}>\n                <ModalDialog\n                    aria-labelledby=\"modal-title-2\"\n                    style={styles.squareDialog}\n                    above={<View style={aboveStyle} />}\n                    below={<View style={belowStyle} />}\n                >\n                    <ModalPanel\n                        content={\n                            <View style={{gap: sizing.size_240}}>\n                                <Heading size=\"xxlarge\" id=\"modal-title-2\">\n                                    Modal Title\n                                </Heading>\n                                <BodyText>\n                                    Here is some text in the modal.\n                                </BodyText>\n                            </View>\n                        }\n                    />\n                </ModalDialog>\n            </View>\n        </View>\n    );\n};","description":"The `above` and `below` props work the same for `<ModalDialog>` as they do for `<OnePaneDialog>`. The element passed into the `above` prop is rendered in front of the modal. The element passed into the `below` prop is rendered behind the modal. In this example, a `<View>` element with a background image of a person and an orange blob is passed into the `below` prop. A `<View>` element with a background image of an arc and a blue semicircle is passed into the `above` prop. This results in the person's head and the orange blob peeking out from behind the modal, and the arc and semicircle going over the front of the modal."},{"id":"packages-modal-building-blocks-modaldialog--with-launcher","name":"With Launcher","snippet":"const WithLauncher = () => {\n    type MyModalProps = {\n        closeModal: () => void;\n    };\n\n    const MyModal = ({closeModal}: MyModalProps): React.ReactElement => (\n        <ModalDialog\n            aria-labelledby=\"modal-title-3\"\n            style={styles.squareDialog}\n        >\n            <ModalPanel\n                content={\n                    <View style={{gap: sizing.size_240}}>\n                        <Heading size=\"xxlarge\" id=\"modal-title-3\">\n                            Modal Title\n                        </Heading>\n                        <BodyText>Here is some text in the modal.</BodyText>\n                    </View>\n                }\n            />\n        </ModalDialog>\n    );\n\n    return (\n        <ModalLauncher modal={MyModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>\n                    Click me to open the modal\n                </Button>\n            )}\n        </ModalLauncher>\n    );\n};","description":"A modal can be launched using a launcher. Here, the launcher is a `<Button>` element whose `onClick` function opens the modal. The modal passed into the `modal` prop of the `<ModalLauncher>` element is a `<ModalDialog>` element. To turn an element into a launcher, wrap the element in a `<ModalLauncher>` element."},{"id":"packages-modal-building-blocks-modaldialog--with-long-contents","name":"With Long Contents","snippet":"const WithLongContents = () => <View style={styles.previewSizer}>\n    <View style={styles.modalPositioner}>\n        <ModalDialog\n            style={{\n                maxWidth: 500,\n                maxHeight: 500,\n            }}\n            aria-labelledby=\"modal-title-4\">\n            <ModalPanel\n                content={\n                    <View style={{gap: sizing.size_240}} tabIndex={0}>\n                        <Heading size=\"xxlarge\" id=\"modal-title-4\">\n                            Terms of Service\n                        </Heading>\n                        {reallyLongText}\n                    </View>\n                } />\n        </ModalDialog>\n    </View>\n</View>;","description":"When the content in a modal is longer than the available space, the modal becomes scrollable by default. The `scrollOverflow` prop on `<ModalPanel>` controls this behavior (defaults to `true`). This example demonstrates how a modal with long contents will automatically enable scrolling, keeping the header and footer fixed while the main content scrolls."}],"import":"import { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, ModalDialog, ModalLauncher, ModalPanel } from \"@khanacademy/wonder-blocks-modal\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`ModalDialog` is a component that contains these elements: - The visual dialog element itself (`<div role=\"dialog\"/>`) - The custom contents below and/or above the Dialog itself (e.g. decorative graphics). **Accessibility notes:** - By default (e.g. using `OnePaneDialog`), `aria-labelledby` is populated automatically using the dialog title `id`. - If there is a custom Dialog implementation (e.g. `TwoPaneDialog`), the dialog element doesn’t have to have the `aria-labelledby` attribute however this is recommended. It should match the `id` of the dialog title.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-modal/src/index.ts","description":"`ModalDialog` is a component that contains these elements:\n- The visual dialog element itself (`<div role=\"dialog\"/>`)\n- The custom contents below and/or above the Dialog itself (e.g. decorative graphics).\n\n**Accessibility notes:**\n- By default (e.g. using `OnePaneDialog`), `aria-labelledby` is populated automatically using the dialog title `id`.\n- If there is a custom Dialog implementation (e.g. `TwoPaneDialog`), the dialog element doesn’t have to have\nthe `aria-labelledby` attribute however this is recommended. It should match the `id` of the dialog title.","displayName":"ModalDialog","methods":[],"props":{"children":{"defaultValue":null,"description":"The dialog content","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactNode"}},"above":{"defaultValue":null,"description":"When set, provides a component that can render content above the top of the modal;\nwhen not set, no additional content is shown above the modal.\nThis prop is passed down to the ModalDialog.","name":"above","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"below":{"defaultValue":null,"description":"When set, provides a component that will render content below the bottom of the modal;\nwhen not set, no additional content is shown below the modal.\nThis prop is passed down to the ModalDialog.","name":"below","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"role":{"defaultValue":null,"description":"When set, overrides the default role value. Default role is \"dialog\"\nRoles other than dialog and alertdialog aren't appropriate for this\ncomponent","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"dialog\" | \"alertdialog\"","value":[{"value":"\"dialog\""},{"value":"\"alertdialog\""}]}},"style":{"defaultValue":null,"description":"Custom styles","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"The accessible name of dialog.\nSee WCAG 2.1: 4.1.2 Name, Role, Value","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"The ID of the title labelling this dialog. Required.\nSee WCAG 2.1: 4.1.2 Name, Role, Value","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"aria-describedby":{"defaultValue":null,"description":"The ID of the content describing this dialog, if applicable.","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/modal-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"ModalDialog"}},"packages-modal-building-blocks-modalfooter":{"id":"packages-modal-building-blocks-modalfooter","name":"ModalFooter","path":"./__docs__/wonder-blocks-modal/modal-footer.stories.tsx","stories":[{"id":"packages-modal-building-blocks-modalfooter--default","name":"Default","snippet":"const Default = (args) => (\n    <ModalDialog aria-labelledby={\"modal-id-0\"} style={styles.dialog}>\n        <ModalPanel\n            content={\n                <View style={{gap: sizing.size_240}}>\n                    <Heading size=\"xxlarge\" id=\"modal-id-0\">\n                        Modal Heading\n                    </Heading>\n                    {longBody}\n                </View>\n            }\n            footer={<ModalFooter {...args} />}\n        />\n    </ModalDialog>\n);","description":"This is a basic footer. It contains an empty `<View>`, so it is completely blank."},{"id":"packages-modal-building-blocks-modalfooter--with-button","name":"With Button","snippet":"const WithButton = () => (\n    <ModalDialog aria-labelledby={\"modal-id-2\"} style={styles.dialog}>\n        <ModalPanel\n            content={\n                <View style={{gap: sizing.size_240}}>\n                    <Heading size=\"xxlarge\" id=\"modal-id-2\">\n                        Modal Heading\n                    </Heading>\n                    {longBody}\n                </View>\n            }\n            footer={\n                <ModalFooter>\n                    <Button onClick={() => {}}>Submit</Button>\n                </ModalFooter>\n            }\n        />\n    </ModalDialog>\n);","description":"This is a `<ModalFooter>` with a `<Button>` as a child. No additional styling is needed, as the footer already has the style `{justifyContent: \"flex-end\"}`."},{"id":"packages-modal-building-blocks-modalfooter--with-three-actions","name":"With Three Actions","snippet":"const WithThreeActions = () => {\n    const mobile = \"@media (max-width: 1023px)\";\n    const desktop = \"@media (min-width: 1024px)\";\n\n    const buttonStyle = {\n        [desktop]: {\n            marginInlineEnd: sizing.size_160,\n        },\n        [mobile]: {\n            marginBlockEnd: sizing.size_160,\n        },\n    } as const;\n\n    const containerStyle = {\n        [desktop]: {\n            flexDirection: \"row\",\n            justifyContent: \"flex-end\",\n        },\n        [mobile]: {\n            flexDirection: \"column-reverse\",\n            width: \"100%\",\n        },\n    } as const;\n\n    return (\n        <ModalDialog aria-labelledby={\"modal-id-3\"} style={styles.dialog}>\n            <ModalPanel\n                content={\n                    <View style={{gap: sizing.size_240}}>\n                        <Heading size=\"xxlarge\" id=\"modal-id-3\">\n                            Modal Heading\n                        </Heading>\n                        {longBody}\n                    </View>\n                }\n                footer={\n                    <ModalFooter>\n                        <View style={containerStyle}>\n                            <Button style={buttonStyle} kind=\"tertiary\">\n                                Tertiary action\n                            </Button>\n                            <Button style={buttonStyle} kind=\"tertiary\">\n                                Secondary action\n                            </Button>\n                            <Button style={buttonStyle}>\n                                Primary action\n                            </Button>\n                        </View>\n                    </ModalFooter>\n                }\n            />\n        </ModalDialog>\n    );\n};","description":"This is an example of a footer with multiple actions. It's fully responsive, so the buttons are in a column layout when the window is small."},{"id":"packages-modal-building-blocks-modalfooter--with-multiple-actions","name":"With Multiple Actions","snippet":"const WithMultipleActions = () => {\n    const footerStyle = {\n        alignItems: \"center\",\n        flexDirection: \"row\",\n        justifyContent: \"space-between\",\n        width: \"100%\",\n    } as const;\n\n    const rowStyle = {\n        flexDirection: \"row\",\n        justifyContent: \"flex-end\",\n        gap: sizing.size_160,\n    } as const;\n\n    return (\n        <ModalDialog aria-labelledby={\"modal-id-4\"} style={styles.dialog}>\n            <ModalPanel\n                content={\n                    <View style={{gap: sizing.size_240}}>\n                        <Heading size=\"xxlarge\" id=\"modal-id-4\">\n                            Modal Heading\n                        </Heading>\n                        <BodyText>Here is some text in the modal.</BodyText>\n                    </View>\n                }\n                footer={\n                    <ModalFooter>\n                        <View style={footerStyle}>\n                            <BodyText weight=\"bold\">Step 1 of 4</BodyText>\n                            <View style={rowStyle}>\n                                <Button kind=\"tertiary\">Previous</Button>\n                                <Button kind=\"primary\">Next</Button>\n                            </View>\n                        </View>\n                    </ModalFooter>\n                }\n            />\n        </ModalDialog>\n    );\n};","description":"This is an example of a footer that indicates multiple steps in a flow."}],"import":"import { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, ModalDialog, ModalFooter, ModalPanel } from \"@khanacademy/wonder-blocks-modal\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"ModalFooter\" component.\n  80 |  * ```\n  81 |  */\n> 82 | export default {\n     | ^\n  83 |     title: \"Packages / Modal / Building Blocks / ModalFooter\",\n  84 |     component: ModalFooter,\n  85 |     decorators: [\n\n./__docs__/wonder-blocks-modal/modal-footer.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText, Heading} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {\n    ModalDialog,\n    ModalPanel,\n    ModalFooter,\n} from \"@khanacademy/wonder-blocks-modal\";\nimport packageConfig from \"../../packages/wonder-blocks-modal/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport {modalPositionerStyle} from \"./modal-story-utils\";\n\nconst longBody = (\n    <>\n        <BodyText>\n            {`Let's make this body content long in order\nto test scroll overflow.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n    </>\n);\n\n/**\n * Modal footer included after the content.\n *\n * ### Implementation notes\n *\n * If you are creating a custom Dialog, make sure to follow these guidelines:\n * - Make sure to include it as part of [ModalPanel](/#modalpanel) by using the `footer` prop.\n * - The footer is completely flexible. Meaning the developer needs to add its own custom layout to match design specs.\n *\n * ### Usage\n *\n * ```tsx\n * <ModalFooter>\n *     <Button onClick={() => {}}>Submit</Button>\n * </ModalFooter>\n * ```\n */\nexport default {\n    title: \"Packages / Modal / Building Blocks / ModalFooter\",\n    component: ModalFooter,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.previewSizer}>\n                <View style={styles.modalPositioner}>\n                    <Story />\n                </View>\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {\n            // We already have screenshots of other stories in\n            // one-pane-dialog.stories.tsx\n            disableSnapshot: true,\n        },\n        a11y: {\n            // TODO(WB-1834): Fix the a11y violations and remove this.\n            config: {\n                rules: [\n                    // Disabling a11y violation: \"Scrollable region must have\n                    // keyboard access (scrollable-region-focusable)\".\n                    // ModalContent's scrollOverflow element is not focusable.\n                    {\n                        id: \"scrollable-region-focusable\",\n                        enabled: false,\n                    },\n                ],\n            },\n        },\n    },\n    argTypes: {\n        children: {\n            control: {type: undefined},\n        },\n    },\n} as Meta<typeof ModalFooter>;\n\ntype StoryComponentType = StoryObj<typeof ModalFooter>;\n\n/**\n * This is a basic footer. It contains an empty `<View>`, so it is completely\n * blank.\n */\nexport const Default: StoryComponentType = {\n    args: {\n        children: <View />,\n    },\n    render: (args) => (\n        <ModalDialog aria-labelledby={\"modal-id-0\"} style={styles.dialog}>\n            <ModalPanel\n                content={\n                    <View style={{gap: sizing.size_240}}>\n                        <Heading size=\"xxlarge\" id=\"modal-id-0\">\n                            Modal Heading\n                        </Heading>\n                        {longBody}\n                    </View>\n                }\n                footer={<ModalFooter {...args} />}\n            />\n        </ModalDialog>\n    ),\n};\n\n/**\n * This is a `<ModalFooter>` with a `<Button>` as a child. No additional styling\n * is needed, as the footer already has the style `{justifyContent: \"flex-end\"}`.\n */\nexport const WithButton: StoryComponentType = {\n    render: () => (\n        <ModalDialog aria-labelledby={\"modal-id-2\"} style={styles.dialog}>\n            <ModalPanel\n                content={\n                    <View style={{gap: sizing.size_240}}>\n                        <Heading size=\"xxlarge\" id=\"modal-id-2\">\n                            Modal Heading\n                        </Heading>\n                        {longBody}\n                    </View>\n                }\n                footer={\n                    <ModalFooter>\n                        <Button onClick={() => {}}>Submit</Button>\n                    </ModalFooter>\n                }\n            />\n        </ModalDialog>\n    ),\n};\n\n/**\n * This is an example of a footer with multiple actions. It's fully responsive,\n * so the buttons are in a column layout when the window is small.\n */\nexport const WithThreeActions: StoryComponentType = {\n    render: () => {\n        const mobile = \"@media (max-width: 1023px)\";\n        const desktop = \"@media (min-width: 1024px)\";\n\n        const buttonStyle = {\n            [desktop]: {\n                marginInlineEnd: sizing.size_160,\n            },\n            [mobile]: {\n                marginBlockEnd: sizing.size_160,\n            },\n        } as const;\n\n        const containerStyle = {\n            [desktop]: {\n                flexDirection: \"row\",\n                justifyContent: \"flex-end\",\n            },\n            [mobile]: {\n                flexDirection: \"column-reverse\",\n                width: \"100%\",\n            },\n        } as const;\n\n        return (\n            <ModalDialog aria-labelledby={\"modal-id-3\"} style={styles.dialog}>\n                <ModalPanel\n                    content={\n                        <View style={{gap: sizing.size_240}}>\n                            <Heading size=\"xxlarge\" id=\"modal-id-3\">\n                                Modal Heading\n                            </Heading>\n                            {longBody}\n                        </View>\n                    }\n                    footer={\n                        <ModalFooter>\n                            <View style={containerStyle}>\n                                <Button style={buttonStyle} kind=\"tertiary\">\n                                    Tertiary action\n                                </Button>\n                                <Button style={buttonStyle} kind=\"tertiary\">\n                                    Secondary action\n                                </Button>\n                                <Button style={buttonStyle}>\n                                    Primary action\n                                </Button>\n                            </View>\n                        </ModalFooter>\n                    }\n                />\n            </ModalDialog>\n        );\n    },\n};\n\n/**\n * This is an example of a footer that indicates multiple steps in a flow.\n */\nexport const WithMultipleActions: StoryComponentType = {\n    render: () => {\n        const footerStyle = {\n            alignItems: \"center\",\n            flexDirection: \"row\",\n            justifyContent: \"space-between\",\n            width: \"100%\",\n        } as const;\n\n        const rowStyle = {\n            flexDirection: \"row\",\n            justifyContent: \"flex-end\",\n            gap: sizing.size_160,\n        } as const;\n\n        return (\n            <ModalDialog aria-labelledby={\"modal-id-4\"} style={styles.dialog}>\n                <ModalPanel\n                    content={\n                        <View style={{gap: sizing.size_240}}>\n                            <Heading size=\"xxlarge\" id=\"modal-id-4\">\n                                Modal Heading\n                            </Heading>\n                            <BodyText>Here is some text in the modal.</BodyText>\n                        </View>\n                    }\n                    footer={\n                        <ModalFooter>\n                            <View style={footerStyle}>\n                                <BodyText weight=\"bold\">Step 1 of 4</BodyText>\n                                <View style={rowStyle}>\n                                    <Button kind=\"tertiary\">Previous</Button>\n                                    <Button kind=\"primary\">Next</Button>\n                                </View>\n                            </View>\n                        </ModalFooter>\n                    }\n                />\n            </ModalDialog>\n        );\n    },\n};\n\nconst styles = StyleSheet.create({\n    dialog: {\n        maxInlineSize: 600,\n        maxBlockSize: 500,\n    },\n    modalPositioner: modalPositionerStyle,\n    previewSizer: {\n        height: 600,\n    },\n    example: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n});\n"}},"packages-modal-building-blocks-modalheader":{"id":"packages-modal-building-blocks-modalheader","name":"ModalHeader","path":"./__docs__/wonder-blocks-modal/modal-header.stories.tsx","stories":[{"id":"packages-modal-building-blocks-modalheader--default","name":"Default","snippet":"const Default = () => <ModalDialog aria-labelledby=\"modal-title-id-default-example\" style={styles.dialog}>\n    <ModalPanel header={<ModalHeader {...args} />} content={longBody} />\n</ModalDialog>;","description":"This is a basic `<ModalHeader>`. It just has a `content` prop that contains a title and a body."},{"id":"packages-modal-building-blocks-modalheader--with-subtitle","name":"With Subtitle","snippet":"const WithSubtitle = () => (\n    <ModalDialog aria-labelledby=\"modal-title-3\" style={styles.dialog}>\n        <ModalPanel\n            header={\n                <ModalHeader\n                    title=\"Modal Title\"\n                    titleId=\"modal-title-3\"\n                    subtitle=\"This is what a subtitle looks like.\"\n                />\n            }\n            content={longBody}\n        />\n    </ModalDialog>\n);","description":"This is `<ModalHeader>` with a subtitle, which can be done by passing a string into the `subtitle` prop."},{"id":"packages-modal-building-blocks-modalheader--with-breadcrumbs","name":"With Breadcrumbs","snippet":"const WithBreadcrumbs = () => (\n    <ModalDialog aria-labelledby=\"modal-title-5\" style={styles.dialog}>\n        <ModalPanel\n            header={\n                <ModalHeader\n                    title=\"Modal Title\"\n                    titleId=\"modal-title-5\"\n                    breadcrumbs={\n                        <Breadcrumbs>\n                            <BreadcrumbsItem>\n                                <Link href=\"#course\">Course</Link>\n                            </BreadcrumbsItem>\n                            <BreadcrumbsItem>\n                                <Link href=\"#unit\">Unit</Link>\n                            </BreadcrumbsItem>\n                            <BreadcrumbsItem>Lesson</BreadcrumbsItem>\n                        </Breadcrumbs>\n                    }\n                />\n            }\n            content={longBody}\n        />\n    </ModalDialog>\n);","description":"This is `<ModalHeader>` with breadcrumbs, which can be done by passing a Wonder Blocks `<Breadcrumbs>` element into the `breadcrumbs` prop."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { Breadcrumbs, BreadcrumbsItem } from \"@khanacademy/wonder-blocks-breadcrumbs\";\nimport { ComponentInfo, ModalDialog, ModalHeader, ModalPanel } from \"@khanacademy/wonder-blocks-modal\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"ModalHeader\" component.\n  107 |  * ```\n  108 |  */\n> 109 | export default {\n      | ^\n  110 |     title: \"Packages / Modal / Building Blocks / ModalHeader\",\n  111 |     component: ModalHeader,\n  112 |     decorators: [\n\n./__docs__/wonder-blocks-modal/modal-header.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {\n    Breadcrumbs,\n    BreadcrumbsItem,\n} from \"@khanacademy/wonder-blocks-breadcrumbs\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {\n    ModalDialog,\n    ModalPanel,\n    ModalHeader,\n} from \"@khanacademy/wonder-blocks-modal\";\nimport packageConfig from \"../../packages/wonder-blocks-modal/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport ModalHeaderArgtypes from \"./modal-header.argtypes\";\nimport {modalPositionerStyle} from \"./modal-story-utils\";\n\nconst longBody = (\n    <>\n        <BodyText>\n            {`Let's make this body content long in order\nto test scroll overflow.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n    </>\n);\n\n/**\n * This is a helper component that is never rendered by itself. It is always\n * pinned to the top of the dialog, is responsive using the same behavior as its\n * parent dialog, and has the following properties:\n * - title\n * - breadcrumb OR subtitle, but not both.\n *\n * ### Accessibility notes\n *\n * - By default (e.g. using [OnePaneDialog](/#onepanedialog)), `titleId` is\n *   populated automatically by the parent container.\n * - If there is a custom Dialog implementation (e.g. `TwoPaneDialog`), the\n *   ModalHeader doesn’t have to have the `titleId` prop however this is\n *   recommended. It should match the `aria-labelledby` prop of the\n *   [ModalDialog](/#modaldialog) component. Identifiers can be generated with\n *   the `useId` React hook.\n *\n * ### Implementation notes\n *\n * If you are creating a custom Dialog, make sure to follow these guidelines:\n * - Make sure to include it as part of [ModalPanel](/#modalpanel) by using the\n *   `header` prop.\n * - Add a title (required).\n * - Optionally add a subtitle or breadcrumbs.\n * - We encourage you to add `titleId` (see Accessibility notes).\n * - If you need to create e2e tests, make sure to pass a `testId` prop and\n *   add a sufix to scope the testId to this component: e.g.\n *   `some-random-id-ModalHeader`. This scope will also be passed to the title\n *   and subtitle elements: e.g. `some-random-id-ModalHeader-title`.\n *\n * ### Usage\n *\n * ```tsx\n * <ModalHeader\n *      title=\"This is a modal title.\"\n *      subtitle=\"subtitle\"\n *      titleId=\"uniqueTitleId\"\n *  />\n * ```\n */\nexport default {\n    title: \"Packages / Modal / Building Blocks / ModalHeader\",\n    component: ModalHeader,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.previewSizer}>\n                <View style={styles.modalPositioner}>\n                    <Story />\n                </View>\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {\n            // We already have screenshots of other stories in\n            // one-pane-dialog.stories.tsx\n            disableSnapshot: true,\n        },\n        a11y: {\n            // TODO(WB-1834): Fix the a11y violations and remove this.\n            config: {\n                rules: [\n                    // Disabling a11y violation: \"Scrollable region must have\n                    // keyboard access (scrollable-region-focusable)\".\n                    // ModalContent's scrollOverflow element is not focusable.\n                    {\n                        id: \"scrollable-region-focusable\",\n                        enabled: false,\n                    },\n                ],\n            },\n        },\n    },\n    argTypes: ModalHeaderArgtypes,\n} as Meta<typeof ModalHeader>;\n\ntype StoryComponentType = StoryObj<typeof ModalHeader>;\n\n/**\n * This is a basic `<ModalHeader>`. It just has a `content` prop that contains a\n * title and a body.\n */\nexport const Default: StoryComponentType = {\n    render: (args) => (\n        <ModalDialog aria-labelledby={args.titleId} style={styles.dialog}>\n            <ModalPanel header={<ModalHeader {...args} />} content={longBody} />\n        </ModalDialog>\n    ),\n    args: {\n        title: \"This is a modal title.\",\n        titleId: \"modal-title-id-default-example\",\n    },\n};\n\n/**\n * This is `<ModalHeader>` with a subtitle, which can be done by passing a\n * string into the `subtitle` prop.\n */\nexport const WithSubtitle: StoryComponentType = {\n    render: () => (\n        <ModalDialog aria-labelledby=\"modal-title-3\" style={styles.dialog}>\n            <ModalPanel\n                header={\n                    <ModalHeader\n                        title=\"Modal Title\"\n                        titleId=\"modal-title-3\"\n                        subtitle=\"This is what a subtitle looks like.\"\n                    />\n                }\n                content={longBody}\n            />\n        </ModalDialog>\n    ),\n};\n\n/**\n * This is `<ModalHeader>` with breadcrumbs, which can be done by passing a\n * Wonder Blocks `<Breadcrumbs>` element into the `breadcrumbs` prop.\n */\nexport const WithBreadcrumbs: StoryComponentType = {\n    render: () => (\n        <ModalDialog aria-labelledby=\"modal-title-5\" style={styles.dialog}>\n            <ModalPanel\n                header={\n                    <ModalHeader\n                        title=\"Modal Title\"\n                        titleId=\"modal-title-5\"\n                        breadcrumbs={\n                            <Breadcrumbs>\n                                <BreadcrumbsItem>\n                                    <Link href=\"#course\">Course</Link>\n                                </BreadcrumbsItem>\n                                <BreadcrumbsItem>\n                                    <Link href=\"#unit\">Unit</Link>\n                                </BreadcrumbsItem>\n                                <BreadcrumbsItem>Lesson</BreadcrumbsItem>\n                            </Breadcrumbs>\n                        }\n                    />\n                }\n                content={longBody}\n            />\n        </ModalDialog>\n    ),\n};\n\nconst styles = StyleSheet.create({\n    dialog: {\n        maxInlineSize: 600,\n        maxBlockSize: 500,\n    },\n    modalPositioner: modalPositionerStyle,\n    previewSizer: {\n        height: 600,\n    },\n    example: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n});\n"}},"packages-modal-modallauncher":{"id":"packages-modal-modallauncher","name":"ModalLauncher","path":"./__docs__/wonder-blocks-modal/modal-launcher.stories.tsx","stories":[{"id":"packages-modal-modallauncher--default","name":"Default","snippet":"const Default = () => <ModalLauncher modal={DefaultModal}>\n    {({openModal}) => (\n        <Button onClick={openModal}>Click me to open the modal</Button>\n    )}\n</ModalLauncher>;"},{"id":"packages-modal-modallauncher--simple","name":"Simple","snippet":"const Simple = () => (\n    <ModalLauncher modal={DefaultModal}>\n        {({openModal}) => (\n            <Button onClick={openModal}>Click me to open the modal</Button>\n        )}\n    </ModalLauncher>\n);"},{"id":"packages-modal-modallauncher--with-long-contents-and-footer","name":"With Long Contents And Footer","snippet":"const WithLongContentsAndFooter = () => {\n    const LongModal = () => (\n        <OnePaneDialog\n            title=\"Hello, world! Here is an example of a long title that wraps to the next line.\"\n            content={\n                <View>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                </View>\n            }\n            footer={\n                <View style={styles.footer}>\n                    <View style={styles.row}>\n                        <Button kind=\"tertiary\">Previous</Button>\n                        <Button kind=\"primary\">Next</Button>\n                    </View>\n                </View>\n            }\n        />\n    );\n    return (\n        <ModalLauncher modal={LongModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </ModalLauncher>\n    );\n};"},{"id":"packages-modal-modallauncher--with-custom-close-button","name":"With Custom Close Button","snippet":"const WithCustomCloseButton = () => {\n    type MyModalProps = {\n        closeModal: () => void;\n    };\n\n    const ModalWithCloseButton = ({\n        closeModal,\n    }: MyModalProps): React.ReactElement => (\n        <OnePaneDialog\n            title=\"Single-line title\"\n            content={\n                <View>\n                    <BodyText>\n                        {`Lorem ipsum dolor sit amet, consectetur\n                        adipiscing elit, sed do eiusmod tempor incididunt\n                        ut labore et dolore magna aliqua. Ut enim ad minim\n                        veniam, quis nostrud exercitation ullamco laboris\n                        nisi ut aliquip ex ea commodo consequat. Duis aute\n                        irure dolor in reprehenderit in voluptate velit\n                        esse cillum dolore eu fugiat nulla pariatur.\n                        Excepteur sint occaecat cupidatat non proident,\n                        sunt in culpa qui officia deserunt mollit anim id\n                        est.`}\n                    </BodyText>\n                </View>\n            }\n            // No \"X\" close button in the top right corner\n            closeButtonVisible={false}\n            footer={<Button onClick={closeModal}>Close</Button>}\n        />\n    );\n\n    return (\n        <ModalLauncher modal={ModalWithCloseButton}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </ModalLauncher>\n    );\n};"},{"id":"packages-modal-modallauncher--with-backdrop-dismiss-disabled","name":"With Backdrop Dismiss Disabled","snippet":"const WithBackdropDismissDisabled = () => (\n    <ModalLauncher modal={DefaultModal} backdropDismissEnabled={false}>\n        {({openModal}) => (\n            <Button onClick={openModal}>Click me to open the modal</Button>\n        )}\n    </ModalLauncher>\n);"},{"id":"packages-modal-modallauncher--triggering-programmatically","name":"Triggering Programmatically","snippet":"const TriggeringProgrammatically = () => {\n    const [opened, setOpened] = React.useState(false);\n\n    const handleOpen = () => {\n        setOpened(true);\n    };\n\n    const handleClose = () => {\n        setOpened(false);\n    };\n\n    return (\n        <View>\n            <ActionMenu menuText=\"actions\">\n                <ActionItem label=\"Open modal\" onClick={handleOpen} />\n            </ActionMenu>\n\n            <ModalLauncher\n                onClose={handleClose}\n                opened={opened}\n                modal={({closeModal}) => (\n                    <OnePaneDialog\n                        title=\"Triggered from action menu\"\n                        content={\n                            <View>\n                                <Heading size=\"xxlarge\">Hello, world</Heading>\n                            </View>\n                        }\n                        footer={\n                            <Button onClick={closeModal}>Close Modal</Button>\n                        }\n                    />\n                )}\n                // Note that this modal launcher has no children.\n            />\n        </View>\n    );\n};"},{"id":"packages-modal-modallauncher--with-opened-true","name":"With Opened True","snippet":"const WithOpenedTrue = () => {\n    const [openedModal, setOpenedModal] = React.useState<\n        \"EDIT\" | \"DELETE\" | null\n    >(null);\n    const [, setSelectedItem] = React.useState<string | null>(null);\n\n    // Simulated data item\n    const item = {\n        id: \"1\",\n        title: \"Example Assignment\",\n        dueDate: new Date().toISOString(),\n    };\n\n    const handleClose = () => {\n        setOpenedModal(null);\n        setSelectedItem(null);\n    };\n\n    const editDialog = ({closeModal}: {closeModal: () => void}) => (\n        <OnePaneDialog\n            title=\"Edit Item\"\n            content={\n                <View style={styles.modalContent}>\n                    <BodyText>\n                        This is a reproduction of the focus management issue.\n                        When this modal is closed, focus should return to the\n                        action menu button that opened it.\n                    </BodyText>\n                </View>\n            }\n            footer={\n                <View>\n                    <Button onClick={closeModal}>Close</Button>\n                </View>\n            }\n        />\n    );\n\n    const deleteDialog = ({closeModal}: {closeModal: () => void}) => (\n        <ModalDialog aria-labelledby=\"heading-id\">\n            <ModalPanel\n                content={\n                    <View style={styles.modalContent}>\n                        <Heading id=\"heading-id\">Delete Item</Heading>\n                        <BodyText>\n                            Are you sure you want to delete this item? When this\n                            modal is closed, focus should return to the action\n                            menu button.\n                        </BodyText>\n                    </View>\n                }\n                footer={\n                    <View style={styles.footer}>\n                        <Button onClick={closeModal}>Cancel</Button>\n                        <Button\n                            onClick={() => {\n                                closeModal();\n                            }}\n                        >\n                            Delete\n                        </Button>\n                    </View>\n                }\n            />\n        </ModalDialog>\n    );\n\n    return (\n        <View>\n            <View style={styles.actionMenuRow}>\n                <BodyText>Example Item</BodyText>\n                <ActionMenu\n                    menuText=\"\"\n                    opener={() => (\n                        <IconButton\n                            aria-label=\"Actions\"\n                            aria-haspopup=\"true\"\n                            kind=\"secondary\"\n                            icon={dotsThreeIcon}\n                            testId=\"item-actions-button\"\n                            size=\"small\"\n                        />\n                    )}\n                >\n                    <ActionItem\n                        onClick={() => {\n                            setSelectedItem(item.id);\n                            setOpenedModal(\"EDIT\");\n                        }}\n                        label=\"Edit\"\n                        leftAccessory={\n                            <PhosphorIcon icon={pencilIcon} size=\"small\" />\n                        }\n                    />\n                    <ActionItem\n                        onClick={() => {\n                            setSelectedItem(item.id);\n                            setOpenedModal(\"DELETE\");\n                        }}\n                        label=\"Delete\"\n                        leftAccessory={\n                            <PhosphorIcon icon={trashIcon} size=\"small\" />\n                        }\n                    />\n                </ActionMenu>\n            </View>\n\n            {/* Edit Modal */}\n            <ModalLauncher\n                opened={openedModal === \"EDIT\"}\n                onClose={handleClose}\n                modal={editDialog}\n            />\n\n            {/* Delete Modal */}\n            <ModalLauncher\n                opened={openedModal === \"DELETE\"}\n                onClose={handleClose}\n                modal={deleteDialog}\n            />\n        </View>\n    );\n};"},{"id":"packages-modal-modallauncher--with-closed-focus-id","name":"With Closed Focus Id","snippet":"const WithClosedFocusId = () => {\n    const [opened, setOpened] = React.useState(false);\n\n    const handleOpen = () => {\n        setOpened(true);\n    };\n\n    const handleClose = () => {\n        setOpened(false);\n    };\n\n    return (\n        <View style={{gap: 20}}>\n            <Button>Top of page (should not receive focus)</Button>\n            <Button id=\"button-to-focus-on\">Focus here after close</Button>\n            <ActionMenu menuText=\"actions\">\n                <ActionItem label=\"Open modal\" onClick={() => handleOpen()} />\n            </ActionMenu>\n            <ModalLauncher\n                onClose={() => handleClose()}\n                opened={opened}\n                closedFocusId=\"button-to-focus-on\"\n                modal={DefaultModal}\n            />\n        </View>\n    );\n};"},{"id":"packages-modal-modallauncher--with-initial-focus-id","name":"With Initial Focus Id","snippet":"const WithInitialFocusId = () => {\n    const [value, setValue] = React.useState(\"Previously stored value\");\n    const [value2, setValue2] = React.useState(\"\");\n\n    // @ts-expect-error [FEI-5019] - TS7031 - Binding element 'closeModal' implicitly has an 'any' type.\n    const modalInitialFocus = ({closeModal}) => (\n        <OnePaneDialog\n            title=\"Single-line title\"\n            content={\n                <View style={{gap: sizing.size_240}}>\n                    <LabeledTextField\n                        label=\"Label\"\n                        value={value}\n                        onChange={setValue}\n                    />\n                    <LabeledTextField\n                        label=\"Label 2\"\n                        value={value2}\n                        onChange={setValue2}\n                        id=\"text-field-to-be-focused\"\n                    />\n                </View>\n            }\n            footer={\n                <View style={styles.row}>\n                    <Button kind=\"tertiary\" onClick={closeModal}>\n                        Cancel\n                    </Button>\n                    <Button onClick={closeModal}>Submit</Button>\n                </View>\n            }\n        />\n    );\n\n    return (\n        <ModalLauncher\n            modal={modalInitialFocus}\n            initialFocusId=\"text-field-to-be-focused-field\"\n        >\n            {({openModal}) => (\n                <Button onClick={openModal}>\n                    Open modal with initial focus\n                </Button>\n            )}\n        </ModalLauncher>\n    );\n};"},{"id":"packages-modal-modallauncher--focus-management-pattern","name":"Focus Management Pattern","snippet":"const FocusManagementPattern = () => {\n    type Student = {\n        id: string;\n        name: string;\n        progress: number;\n    };\n\n    const mockStudents: Array<Student> = [\n        {id: \"1\", name: \"Alice Smith\", progress: 85},\n        {id: \"2\", name: \"Bob Johnson\", progress: 70},\n        {id: \"3\", name: \"Charlie Brown\", progress: 95},\n    ];\n\n    type CompletionModalProps = {\n        isOpen: boolean;\n        handleClose: () => void;\n        returnFocusToId: string | null;\n    };\n\n    // Separate modal component to match the pattern in MasteryCompletionModal\n    const CompletionModal = ({\n        isOpen,\n        handleClose,\n        returnFocusToId,\n    }: CompletionModalProps) => {\n        return (\n            <ModalLauncher\n                opened={isOpen}\n                onClose={handleClose}\n                closedFocusId={returnFocusToId || undefined}\n                modal={() => (\n                    <OnePaneDialog\n                        title=\"Unit: Sample Unit\"\n                        content={\n                            <View style={styles.modalContent}>\n                                <BodyText>\n                                    This is a reproduction of the focus\n                                    management pattern. When this modal is\n                                    closed, focus should return to the\n                                    button that opened it.\n                                </BodyText>\n                            </View>\n                        }\n                        style={styles.modal}\n                    />\n                )}\n            />\n        );\n    };\n\n    const CompletionModalContainer = () => {\n        const [selectedItem, setSelectedItem] = React.useState<\n            string | null\n        >(null);\n        const [modalTriggerId, setModalTriggerId] = React.useState<\n            string | null\n        >(null);\n\n        const handleOpenModal = (triggerId: string) => {\n            setModalTriggerId(triggerId);\n            setSelectedItem(\"sample-item\");\n        };\n\n        const handleCloseModal = () => {\n            setSelectedItem(null);\n            setModalTriggerId(null);\n        };\n\n        return (\n            <View style={styles.container}>\n                <View style={styles.buttonRow}>\n                    {mockStudents.map((student) => {\n                        const triggerId = `completion-modal-trigger-${student.id}`;\n                        return (\n                            <Button\n                                key={student.id}\n                                id={triggerId}\n                                onClick={() => handleOpenModal(triggerId)}\n                            >\n                                {`${student.name} (${student.progress}%)`}\n                            </Button>\n                        );\n                    })}\n                </View>\n                {selectedItem && (\n                    <CompletionModal\n                        isOpen={true}\n                        handleClose={handleCloseModal}\n                        returnFocusToId={modalTriggerId}\n                    />\n                )}\n            </View>\n        );\n    };\n\n    return <CompletionModalContainer />;\n};"},{"id":"packages-modal-modallauncher--focus-trap","name":"Navigation with focus trap","snippet":"const FocusTrap = () => {\n    const [selectedValue, setSelectedValue] = React.useState<any>(null);\n\n    // @ts-expect-error [FEI-5019] - TS7031 - Binding element 'closeModal' implicitly has an 'any' type.\n    const modalInitialFocus = ({closeModal}) => (\n        <OnePaneDialog\n            title=\"Testing the focus trap on multiple modals\"\n            closeButtonVisible={false}\n            content={\n                <View style={{gap: sizing.size_240}}>\n                    <BodyText id=\"focus-trap-story-body-text\">\n                        This modal demonstrates how the focus trap works with\n                        form elements (or focusable elements). Also demonstrates\n                        how the focus trap is moved to the next modal when it is\n                        opened (focus/tap on the `Open another modal` button).\n                    </BodyText>\n                    <RadioGroup\n                        label=\"A RadioGroup component inside a modal\"\n                        description=\"Some description\"\n                        groupName=\"some-group-name\"\n                        onChange={setSelectedValue}\n                        selectedValue={selectedValue ?? \"\"}\n                    >\n                        <Choice label=\"Choice 1\" value=\"some-choice-value\" />\n                        <Choice label=\"Choice 2\" value=\"some-choice-value-2\" />\n                    </RadioGroup>\n                </View>\n            }\n            footer={\n                <View style={styles.row}>\n                    <ModalLauncher modal={SubModal}>\n                        {({openModal}) => (\n                            <Button kind=\"secondary\" onClick={openModal}>\n                                Open another modal\n                            </Button>\n                        )}\n                    </ModalLauncher>\n\n                    <Button onClick={closeModal} disabled={!selectedValue}>\n                        Next\n                    </Button>\n                </View>\n            }\n            aria-describedby=\"focus-trap-story-body-text\"\n        />\n    );\n\n    return (\n        <ModalLauncher modal={modalInitialFocus}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Open modal with RadioGroup</Button>\n            )}\n        </ModalLauncher>\n    );\n};"},{"id":"packages-modal-modallauncher--conditional-dialogs-with-focus-management","name":"Conditional Dialogs With Focus Management","snippet":"const ConditionalDialogsWithFocusManagement = () => {\n    const [openedModal, setOpenedModal] = React.useState<\n        \"REGULAR\" | \"WRAPPED\" | null\n    >(null);\n\n    const handleClose = () => {\n        setOpenedModal(null);\n    };\n\n    const conditionalDialog = ({closeModal}: {closeModal: () => void}) => {\n        if (openedModal === \"REGULAR\") {\n            return (\n                <OnePaneDialog\n                    title=\"Regular Modal\"\n                    content={<View>This is a regular modal</View>}\n                    footer={\n                        <Button onClick={() => closeModal()}>\n                            Close Modal\n                        </Button>\n                    }\n                />\n            );\n        }\n\n        if (openedModal === \"WRAPPED\") {\n            return (\n                <OnePaneDialog\n                    title=\"Alternative Modal\"\n                    content={\n                        <View>\n                            This is an alternative modal with different content\n                        </View>\n                    }\n                    footer={<Button onClick={closeModal}>Close Modal</Button>}\n                />\n            );\n        }\n\n        // Fallback (should not be reached)\n        return null;\n    };\n\n    return (\n        <View style={styles.storyContainer}>\n            <BodyText>\n                This story demonstrates conditional dialogs within a single\n                ModalLauncher. Click either button to open different modal\n                content. When the modal closes, focus returns to the triggering\n                button using the `closedFocusId` prop.\n            </BodyText>\n\n            <View style={styles.buttonRow}>\n                <Button\n                    onClick={() => setOpenedModal(\"REGULAR\")}\n                    testId=\"regular-modal-trigger\"\n                >\n                    Open Regular Modal\n                </Button>\n\n                <Button\n                    onClick={() => setOpenedModal(\"WRAPPED\")}\n                    id=\"alternative-modal-trigger\"\n                >\n                    Open Alternative Modal\n                </Button>\n            </View>\n\n            {/* Single ModalLauncher with conditional dialogs */}\n            <ModalLauncher\n                opened={openedModal !== null}\n                onClose={handleClose}\n                closedFocusId={\n                    openedModal === \"WRAPPED\"\n                        ? \"alternative-modal-trigger\"\n                        : undefined\n                }\n                modal={conditionalDialog}\n            />\n        </View>\n    );\n};","description":"This story demonstrates using a single controlled ModalLauncher with conditional dialog content. Different buttons trigger different modal content, and focus management is handled correctly when the modal closes. This pattern is useful when you need to show different dialogs based on user interaction, but want to manage them through a single ModalLauncher instance."},{"id":"packages-modal-modallauncher--creating-a-custom-modal","name":"Creating a custom modal with ModalLauncher","snippet":"const CreatingACustomModal = () => {\n    const StyledImg = addStyle(\"img\");\n    const popoverModal = ({closeModal}: {closeModal: () => void}) => (\n        <ModalDialog\n            aria-labelledby=\"ready-dialog-title\"\n            style={{\n                width: \"auto\",\n                height: \"auto\",\n            }}\n        >\n            <ModalPanel\n                style={{maxInlineSize: 423}}\n                closeButtonVisible={true}\n                content={\n                    <View style={{gap: sizing.size_240}}>\n                        <StyledImg\n                            src=\"./km-ready.svg\"\n                            alt=\"An illustration a bubble with Khanmigo inside.\"\n                            width={423}\n                            height={230}\n                            style={{\n                                // This is to ensure that the image is\n                                // aligned to the top left corner of the\n                                // dialog.\n                                marginInlineStart: `calc(${sizing.size_320} * -1)`,\n                                marginBlockStart: `calc(${sizing.size_320} * -1)`,\n                            }}\n                        />\n                        <Heading size=\"medium\" id=\"ready-dialog-title\">\n                            Hi, I’m Khanmigo!\n                        </Heading>\n                        <BodyText>\n                            I’m your new AI-powered assistant, tutor, and\n                            all around cheerleader to help you power up your\n                            learning journey. Let’s take a look around\n                            together!\n                        </BodyText>\n                        {/* Footer */}\n                        <View\n                            style={{\n                                flexDirection: \"row\",\n                                justifyContent: \"space-between\",\n                                width: \"100%\",\n                                alignItems: \"center\",\n                            }}\n                        >\n                            <BodyText weight=\"bold\">Step 1 of 4</BodyText>\n                            <Button kind=\"primary\" onClick={closeModal}>\n                                Next\n                            </Button>\n                        </View>\n                    </View>\n                }\n            />\n        </ModalDialog>\n    );\n\n    return (\n        <ModalLauncher modal={popoverModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Open custom modal</Button>\n            )}\n        </ModalLauncher>\n    );\n};","description":"This example demonstrates how to use `ModalLauncher` to launch a modal that looks like our own `PopoverContent` component. This is useful when you want to create a modal with a custom layout that includes illustrations. You can find more details about how to build custom modals in our `Modal>Building Blocks` section. #### Implementation details - Make sure to wrap `ModalPanel` with `ModalDialog` to ensure that the modal is displayed correctly and includes all the proper a11y atrributes. - Due to some constrains with `ModalDialog`, you'll likely need to override its width and height to ensure that the `PopoverContent` is displayed with the correct dimensions (see `ModalDialog.style` in the code snippet below). #### Accessibility notes - Try to include the `aria-labelledby` attribute on the modal dialog, which is used to announce the title of the dialog to screen readers when it is opened. - Make sure to include `alt` text for any images used in the `PopoverContent` component."}],"import":"import { ActionItem, ActionMenu } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { Choice, LabeledTextField, RadioGroup } from \"@khanacademy/wonder-blocks-form\";\nimport { ComponentInfo, ModalDialog, ModalLauncher, ModalPanel, OnePaneDialog } from \"@khanacademy/wonder-blocks-modal\";\nimport IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"ModalLauncher\" component.\n  55 | );\n  56 |\n> 57 | export default {\n     | ^\n  58 |     title: \"Packages / Modal / ModalLauncher\",\n  59 |     component: ModalLauncher,\n  60 |     decorators: [\n\n./__docs__/wonder-blocks-modal/modal-launcher.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport pencilIcon from \"@phosphor-icons/core/bold/pencil-bold.svg\";\nimport trashIcon from \"@phosphor-icons/core/bold/trash-bold.svg\";\nimport dotsThreeIcon from \"@phosphor-icons/core/regular/dots-three.svg\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {addStyle, View} from \"@khanacademy/wonder-blocks-core\";\nimport {ActionMenu, ActionItem} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {\n    LabeledTextField,\n    RadioGroup,\n    Choice,\n} from \"@khanacademy/wonder-blocks-form\";\nimport {border, semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText, Heading} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {\n    ModalDialog,\n    ModalLauncher,\n    ModalPanel,\n    OnePaneDialog,\n} from \"@khanacademy/wonder-blocks-modal\";\nimport packageConfig from \"../../packages/wonder-blocks-modal/package.json\";\n\nimport type {ModalElement} from \"../../packages/wonder-blocks-modal/src/util/types\";\nimport ModalLauncherArgTypes from \"./modal-launcher.argtypes\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\nimport {reallyLongText} from \"../components/text-for-testing\";\n\nconst DefaultModal = (): ModalElement => (\n    <OnePaneDialog\n        title=\"Single-line title\"\n        content={\n            <View>\n                <BodyText>\n                    {`Lorem ipsum dolor sit amet, consectetur\n                    adipiscing elit, sed do eiusmod tempor incididunt\n                    ut labore et dolore magna aliqua. Ut enim ad minim\n                    veniam, quis nostrud exercitation ullamco laboris\n                    nisi ut aliquip ex ea commodo consequat. Duis aute\n                    irure dolor in reprehenderit in voluptate velit\n                    esse cillum dolore eu fugiat nulla pariatur.\n                    Excepteur sint occaecat cupidatat non proident,\n                    sunt in culpa qui officia deserunt mollit anim id\n                    est.`}\n                </BodyText>\n            </View>\n        }\n    />\n);\n\nexport default {\n    title: \"Packages / Modal / ModalLauncher\",\n    component: ModalLauncher,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>\n                <Story />\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            description: {\n                component: `A component that enables you to launch a modal, covering the screen.\n\nIntended for use with \\`OnePaneDialog\\`, \\`FlexibleDialog\\`, or modal Building Blocks.\n\nFor conditionally rendering modals, ensure there is only one \\`ModalLauncher\\` in\nyour component tree. A launcher needs to stay mounted on the current page to\nproperly handle the user's keyboard focus on close of modals.\nRead [more details on Confluence](https://khanacademy.atlassian.net/wiki/spaces/FRONTEND/blog/2025/11/24/4454383789/Wonder+Blocks+Modal+Tips+Tricks).\n\n### Usage\n\n\\`\\`\\`jsx\nimport {ModalLauncher} from \"@khanacademy/wonder-blocks-modal\";\nimport {FlexibleDialog} from \"@khanacademy/wonder-blocks-modal\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\n<ModalLauncher\n     onClose={handleClose}\n     opened={opened}\n     animated={animated}\n     modal={({closeModal}) => (\n         <FlexibleDialog  />\n     )}\n/>\n\\`\\`\\``,\n            },\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {\n            // All the examples for ModalLauncher are behavior based, not visual.\n            disableSnapshot: true,\n        },\n    },\n    argTypes: ModalLauncherArgTypes,\n} as Meta<typeof ModalLauncher>;\n\ntype StoryComponentType = StoryObj<typeof ModalLauncher>;\n\nexport const Default: StoryComponentType = {\n    render: (args) => (\n        <ModalLauncher {...args} modal={DefaultModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </ModalLauncher>\n    ),\n};\n\nexport const Simple: StoryComponentType = () => (\n    <ModalLauncher modal={DefaultModal}>\n        {({openModal}) => (\n            <Button onClick={openModal}>Click me to open the modal</Button>\n        )}\n    </ModalLauncher>\n);\n\nSimple.parameters = {\n    docs: {\n        description: {\n            story: \"This is a basic modal launcher. Its child, the button, has access to the `openModal` function via the function-as-child pattern. It passes this into its `onClick` function, which causes the modal to launch when the button is clicked.\",\n        },\n    },\n};\n\nexport const WithLongContentsAndFooter: StoryComponentType = () => {\n    const LongModal = () => (\n        <OnePaneDialog\n            title=\"Hello, world! Here is an example of a long title that wraps to the next line.\"\n            content={\n                <View>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                    <BodyText>{reallyLongText}</BodyText>\n                </View>\n            }\n            footer={\n                <View style={styles.footer}>\n                    <View style={styles.row}>\n                        <Button kind=\"tertiary\">Previous</Button>\n                        <Button kind=\"primary\">Next</Button>\n                    </View>\n                </View>\n            }\n        />\n    );\n    return (\n        <ModalLauncher modal={LongModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </ModalLauncher>\n    );\n};\n\nWithLongContentsAndFooter.parameters = {\n    docs: {\n        description: {\n            story: \"This example demonstrates how to handle long content in modals, especially at high zoom levels. The modal supports two modes: standard (fixed height with overflow hidden) and fullscreen (scrollable content). The fullscreen mode is particularly useful for accessibility, allowing users to read all content even at 400% zoom.\",\n        },\n    },\n};\n\nexport const WithCustomCloseButton: StoryComponentType = () => {\n    type MyModalProps = {\n        closeModal: () => void;\n    };\n\n    const ModalWithCloseButton = ({\n        closeModal,\n    }: MyModalProps): React.ReactElement => (\n        <OnePaneDialog\n            title=\"Single-line title\"\n            content={\n                <View>\n                    <BodyText>\n                        {`Lorem ipsum dolor sit amet, consectetur\n                        adipiscing elit, sed do eiusmod tempor incididunt\n                        ut labore et dolore magna aliqua. Ut enim ad minim\n                        veniam, quis nostrud exercitation ullamco laboris\n                        nisi ut aliquip ex ea commodo consequat. Duis aute\n                        irure dolor in reprehenderit in voluptate velit\n                        esse cillum dolore eu fugiat nulla pariatur.\n                        Excepteur sint occaecat cupidatat non proident,\n                        sunt in culpa qui officia deserunt mollit anim id\n                        est.`}\n                    </BodyText>\n                </View>\n            }\n            // No \"X\" close button in the top right corner\n            closeButtonVisible={false}\n            footer={<Button onClick={closeModal}>Close</Button>}\n        />\n    );\n\n    return (\n        <ModalLauncher modal={ModalWithCloseButton}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </ModalLauncher>\n    );\n};\n\nWithCustomCloseButton.parameters = {\n    docs: {\n        description: {\n            story: 'This is an example of a modal that uses a close button other than the default \"X\" button in the top right corner. Here, the default \"X\" close button is not rendered because the `closeButtonVisible` prop on the `<OnePaneDialog>` is set to false. Instead, a custom close button has been added to the modal footer. The `modal` prop on `<ModalLauncher>` can either be a plain modal, or it can be a function that takes a `closeModal` function as a parameter and returns a modal. The latter is what we do in this case. Then the `closeModal` function is passed into the `onClick` prop on the button in the footer.',\n        },\n    },\n};\n\nexport const WithBackdropDismissDisabled: StoryComponentType = () => (\n    <ModalLauncher modal={DefaultModal} backdropDismissEnabled={false}>\n        {({openModal}) => (\n            <Button onClick={openModal}>Click me to open the modal</Button>\n        )}\n    </ModalLauncher>\n);\n\nWithBackdropDismissDisabled.parameters = {\n    docs: {\n        description: {\n            story: \"This is an example in which the modal _cannot_ be dismissed by clicking in in the backdrop. This is done by setting the `backdropDismissEnabled` prop on the `<ModalLauncher>` element to false.\",\n        },\n    },\n};\n\nexport const TriggeringProgrammatically: StoryComponentType = () => {\n    const [opened, setOpened] = React.useState(false);\n\n    const handleOpen = () => {\n        setOpened(true);\n    };\n\n    const handleClose = () => {\n        setOpened(false);\n    };\n\n    return (\n        <View>\n            <ActionMenu menuText=\"actions\">\n                <ActionItem label=\"Open modal\" onClick={handleOpen} />\n            </ActionMenu>\n\n            <ModalLauncher\n                onClose={handleClose}\n                opened={opened}\n                modal={({closeModal}) => (\n                    <OnePaneDialog\n                        title=\"Triggered from action menu\"\n                        content={\n                            <View>\n                                <Heading size=\"xxlarge\">Hello, world</Heading>\n                            </View>\n                        }\n                        footer={\n                            <Button onClick={closeModal}>Close Modal</Button>\n                        }\n                    />\n                )}\n                // Note that this modal launcher has no children.\n            />\n        </View>\n    );\n};\n\nTriggeringProgrammatically.parameters = {\n    docs: {\n        description: {\n            story: \"Sometimes you'll want to trigger a modal programmatically. This can be done by rendering `<ModalLauncher>` without any children and instead setting its `opened` prop to true. In this situation, `ModalLauncher` is a controlled component which means you'll also have to update `opened` to false in response to the `onClose` callback being triggered. It is necessary to use this method in this example, as `ActionMenu` cannot have a `ModalLauncher` element as a child, (it can only have `Item` elements as children), so launching a modal from a dropdown must be done programatically.\",\n        },\n    },\n};\n\n/*\nThis story demonstrates a controlled modal with complex focus management.\n*/\nexport const WithOpenedTrue = () => {\n    const [openedModal, setOpenedModal] = React.useState<\n        \"EDIT\" | \"DELETE\" | null\n    >(null);\n    const [, setSelectedItem] = React.useState<string | null>(null);\n\n    // Simulated data item\n    const item = {\n        id: \"1\",\n        title: \"Example Assignment\",\n        dueDate: new Date().toISOString(),\n    };\n\n    const handleClose = () => {\n        setOpenedModal(null);\n        setSelectedItem(null);\n    };\n\n    const editDialog = ({closeModal}: {closeModal: () => void}) => (\n        <OnePaneDialog\n            title=\"Edit Item\"\n            content={\n                <View style={styles.modalContent}>\n                    <BodyText>\n                        This is a reproduction of the focus management issue.\n                        When this modal is closed, focus should return to the\n                        action menu button that opened it.\n                    </BodyText>\n                </View>\n            }\n            footer={\n                <View>\n                    <Button onClick={closeModal}>Close</Button>\n                </View>\n            }\n        />\n    );\n\n    const deleteDialog = ({closeModal}: {closeModal: () => void}) => (\n        <ModalDialog aria-labelledby=\"heading-id\">\n            <ModalPanel\n                content={\n                    <View style={styles.modalContent}>\n                        <Heading id=\"heading-id\">Delete Item</Heading>\n                        <BodyText>\n                            Are you sure you want to delete this item? When this\n                            modal is closed, focus should return to the action\n                            menu button.\n                        </BodyText>\n                    </View>\n                }\n                footer={\n                    <View style={styles.footer}>\n                        <Button onClick={closeModal}>Cancel</Button>\n                        <Button\n                            onClick={() => {\n                                closeModal();\n                            }}\n                        >\n                            Delete\n                        </Button>\n                    </View>\n                }\n            />\n        </ModalDialog>\n    );\n\n    return (\n        <View>\n            <View style={styles.actionMenuRow}>\n                <BodyText>Example Item</BodyText>\n                <ActionMenu\n                    menuText=\"\"\n                    opener={() => (\n                        <IconButton\n                            aria-label=\"Actions\"\n                            aria-haspopup=\"true\"\n                            kind=\"secondary\"\n                            icon={dotsThreeIcon}\n                            testId=\"item-actions-button\"\n                            size=\"small\"\n                        />\n                    )}\n                >\n                    <ActionItem\n                        onClick={() => {\n                            setSelectedItem(item.id);\n                            setOpenedModal(\"EDIT\");\n                        }}\n                        label=\"Edit\"\n                        leftAccessory={\n                            <PhosphorIcon icon={pencilIcon} size=\"small\" />\n                        }\n                    />\n                    <ActionItem\n                        onClick={() => {\n                            setSelectedItem(item.id);\n                            setOpenedModal(\"DELETE\");\n                        }}\n                        label=\"Delete\"\n                        leftAccessory={\n                            <PhosphorIcon icon={trashIcon} size=\"small\" />\n                        }\n                    />\n                </ActionMenu>\n            </View>\n\n            {/* Edit Modal */}\n            <ModalLauncher\n                opened={openedModal === \"EDIT\"}\n                onClose={handleClose}\n                modal={editDialog}\n            />\n\n            {/* Delete Modal */}\n            <ModalLauncher\n                opened={openedModal === \"DELETE\"}\n                onClose={handleClose}\n                modal={deleteDialog}\n            />\n        </View>\n    );\n};\n\nexport const WithClosedFocusId: StoryComponentType = () => {\n    const [opened, setOpened] = React.useState(false);\n\n    const handleOpen = () => {\n        setOpened(true);\n    };\n\n    const handleClose = () => {\n        setOpened(false);\n    };\n\n    return (\n        <View style={{gap: 20}}>\n            <Button>Top of page (should not receive focus)</Button>\n            <Button id=\"button-to-focus-on\">Focus here after close</Button>\n            <ActionMenu menuText=\"actions\">\n                <ActionItem label=\"Open modal\" onClick={() => handleOpen()} />\n            </ActionMenu>\n            <ModalLauncher\n                onClose={() => handleClose()}\n                opened={opened}\n                closedFocusId=\"button-to-focus-on\"\n                modal={DefaultModal}\n            />\n        </View>\n    );\n};\n\nWithClosedFocusId.parameters = {\n    docs: {\n        description: {\n            story: 'You can use the `closedFocusId` prop on the `ModalLauncher` to specify where to set the focus after the modal has been closed. Imagine the following situation: clicking on a dropdown menu option to open a modal causes the dropdown to close, and so all of the dropdown options are removed from the DOM. This can be a problem because by default, the focus shifts to the previously focused element after a modal is closed; in this case, the element that opened the modal cannot receive focus since it no longer exists in the DOM, so when you close the modal, it doesn\\'t know where to focus on the page. When the previously focused element no longer exists, the focus shifts to the page body, which causes a jump to the top of the page. This can make it diffcult to find the original dropdown. A solution to this is to use the `closedFocusId` prop to specify where to set the focus after the modal has been closed. In this example, `closedFocusId` is set to the ID of the button labeled \"Focus here after close.\" If the focus shifts to the button labeled \"Top of page (should not receieve focus),\" then the focus is on the page body, and the `closedFocusId` did not work.',\n        },\n    },\n};\n\nexport const WithInitialFocusId: StoryComponentType = () => {\n    const [value, setValue] = React.useState(\"Previously stored value\");\n    const [value2, setValue2] = React.useState(\"\");\n\n    // @ts-expect-error [FEI-5019] - TS7031 - Binding element 'closeModal' implicitly has an 'any' type.\n    const modalInitialFocus = ({closeModal}) => (\n        <OnePaneDialog\n            title=\"Single-line title\"\n            content={\n                <View style={{gap: sizing.size_240}}>\n                    <LabeledTextField\n                        label=\"Label\"\n                        value={value}\n                        onChange={setValue}\n                    />\n                    <LabeledTextField\n                        label=\"Label 2\"\n                        value={value2}\n                        onChange={setValue2}\n                        id=\"text-field-to-be-focused\"\n                    />\n                </View>\n            }\n            footer={\n                <View style={styles.row}>\n                    <Button kind=\"tertiary\" onClick={closeModal}>\n                        Cancel\n                    </Button>\n                    <Button onClick={closeModal}>Submit</Button>\n                </View>\n            }\n        />\n    );\n\n    return (\n        <ModalLauncher\n            modal={modalInitialFocus}\n            initialFocusId=\"text-field-to-be-focused-field\"\n        >\n            {({openModal}) => (\n                <Button onClick={openModal}>\n                    Open modal with initial focus\n                </Button>\n            )}\n        </ModalLauncher>\n    );\n};\n\nWithInitialFocusId.parameters = {\n    docs: {\n        description: {\n            story: \"Sometimes, you may want a specific element inside the modal to receive focus first. This can be done using the `initialFocusId` prop on the `<ModalLauncher>` element. Just pass in the ID of the element that should receive focus, and it will automatically receieve focus once the modal opens. In this example, the top text input would have received the focus by default, but the bottom text field receives focus instead since its ID is passed into the `initialFocusId` prop.\",\n        },\n    },\n};\n\n/**\n * Focus trap navigation\n */\nconst SubModal = () => (\n    <OnePaneDialog\n        title=\"Submodal\"\n        content={\n            <View style={{gap: sizing.size_160}}>\n                <BodyText>\n                    This modal demonstrates how the focus trap works when a\n                    modal is opened from another modal.\n                </BodyText>\n                <BodyText>\n                    Try navigating this modal with the keyboard and then close\n                    it. The focus should be restored to the button that opened\n                    the modal.\n                </BodyText>\n                <LabeledTextField label=\"Label\" value=\"\" onChange={() => {}} />\n                <Button>A focusable element</Button>\n            </View>\n        }\n    />\n);\n\n/*\nA complex reproduction with a modal launched from within a table to test focus\nmanagement issues on close.\n*/\nexport const FocusManagementPattern: StoryComponentType = {\n    render: () => {\n        type Student = {\n            id: string;\n            name: string;\n            progress: number;\n        };\n\n        const mockStudents: Array<Student> = [\n            {id: \"1\", name: \"Alice Smith\", progress: 85},\n            {id: \"2\", name: \"Bob Johnson\", progress: 70},\n            {id: \"3\", name: \"Charlie Brown\", progress: 95},\n        ];\n\n        type CompletionModalProps = {\n            isOpen: boolean;\n            handleClose: () => void;\n            returnFocusToId: string | null;\n        };\n\n        // Separate modal component to match the pattern in MasteryCompletionModal\n        const CompletionModal = ({\n            isOpen,\n            handleClose,\n            returnFocusToId,\n        }: CompletionModalProps) => {\n            return (\n                <ModalLauncher\n                    opened={isOpen}\n                    onClose={handleClose}\n                    closedFocusId={returnFocusToId || undefined}\n                    modal={() => (\n                        <OnePaneDialog\n                            title=\"Unit: Sample Unit\"\n                            content={\n                                <View style={styles.modalContent}>\n                                    <BodyText>\n                                        This is a reproduction of the focus\n                                        management pattern. When this modal is\n                                        closed, focus should return to the\n                                        button that opened it.\n                                    </BodyText>\n                                </View>\n                            }\n                            style={styles.modal}\n                        />\n                    )}\n                />\n            );\n        };\n\n        const CompletionModalContainer = () => {\n            const [selectedItem, setSelectedItem] = React.useState<\n                string | null\n            >(null);\n            const [modalTriggerId, setModalTriggerId] = React.useState<\n                string | null\n            >(null);\n\n            const handleOpenModal = (triggerId: string) => {\n                setModalTriggerId(triggerId);\n                setSelectedItem(\"sample-item\");\n            };\n\n            const handleCloseModal = () => {\n                setSelectedItem(null);\n                setModalTriggerId(null);\n            };\n\n            return (\n                <View style={styles.container}>\n                    <View style={styles.buttonRow}>\n                        {mockStudents.map((student) => {\n                            const triggerId = `completion-modal-trigger-${student.id}`;\n                            return (\n                                <Button\n                                    key={student.id}\n                                    id={triggerId}\n                                    onClick={() => handleOpenModal(triggerId)}\n                                >\n                                    {`${student.name} (${student.progress}%)`}\n                                </Button>\n                            );\n                        })}\n                    </View>\n                    {selectedItem && (\n                        <CompletionModal\n                            isOpen={true}\n                            handleClose={handleCloseModal}\n                            returnFocusToId={modalTriggerId}\n                        />\n                    )}\n                </View>\n            );\n        };\n\n        return <CompletionModalContainer />;\n    },\n};\n\nexport const FocusTrap: StoryComponentType = () => {\n    const [selectedValue, setSelectedValue] = React.useState<any>(null);\n\n    // @ts-expect-error [FEI-5019] - TS7031 - Binding element 'closeModal' implicitly has an 'any' type.\n    const modalInitialFocus = ({closeModal}) => (\n        <OnePaneDialog\n            title=\"Testing the focus trap on multiple modals\"\n            closeButtonVisible={false}\n            content={\n                <View style={{gap: sizing.size_240}}>\n                    <BodyText id=\"focus-trap-story-body-text\">\n                        This modal demonstrates how the focus trap works with\n                        form elements (or focusable elements). Also demonstrates\n                        how the focus trap is moved to the next modal when it is\n                        opened (focus/tap on the `Open another modal` button).\n                    </BodyText>\n                    <RadioGroup\n                        label=\"A RadioGroup component inside a modal\"\n                        description=\"Some description\"\n                        groupName=\"some-group-name\"\n                        onChange={setSelectedValue}\n                        selectedValue={selectedValue ?? \"\"}\n                    >\n                        <Choice label=\"Choice 1\" value=\"some-choice-value\" />\n                        <Choice label=\"Choice 2\" value=\"some-choice-value-2\" />\n                    </RadioGroup>\n                </View>\n            }\n            footer={\n                <View style={styles.row}>\n                    <ModalLauncher modal={SubModal}>\n                        {({openModal}) => (\n                            <Button kind=\"secondary\" onClick={openModal}>\n                                Open another modal\n                            </Button>\n                        )}\n                    </ModalLauncher>\n\n                    <Button onClick={closeModal} disabled={!selectedValue}>\n                        Next\n                    </Button>\n                </View>\n            }\n            aria-describedby=\"focus-trap-story-body-text\"\n        />\n    );\n\n    return (\n        <ModalLauncher modal={modalInitialFocus}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Open modal with RadioGroup</Button>\n            )}\n        </ModalLauncher>\n    );\n};\n\nFocusTrap.storyName = \"Navigation with focus trap\";\n\nFocusTrap.parameters = {\n    docs: {\n        description: {\n            story: \"All modals have a focus trap, which means that the focus is locked inside the modal. This is done to prevent the user from tabbing out of the modal and losing their place. The focus trap is also used to ensure that the focus is restored to the correct element when the modal is closed. In this example, the focus is trapped inside the modal, and the focus is restored to the button that opened the modal when the modal is closed.\\n\\nAlso, this example includes a sub-modal that is opened from the first modal so we can test how the focus trap works when multiple modals are open.\",\n        },\n    },\n};\n\nconst styles = StyleSheet.create({\n    example: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n    row: {\n        flexDirection: \"row\",\n        gap: sizing.size_160,\n    },\n    storyContainer: {\n        display: \"flex\",\n        flexDirection: \"column\",\n        gap: sizing.size_240,\n        maxInlineSize: 600,\n    },\n    description: {\n        display: \"flex\",\n        flexDirection: \"column\",\n        gap: sizing.size_160,\n        padding: sizing.size_160,\n        backgroundColor: semanticColor.core.background.neutral.subtle,\n        borderRadius: 4,\n    },\n    buttonRow: {\n        display: \"flex\",\n        flexDirection: \"row\",\n        gap: sizing.size_160,\n        alignItems: \"center\",\n    },\n    actionMenuRow: {\n        flexDirection: \"row\",\n        alignItems: \"center\",\n        gap: sizing.size_160,\n        justifyContent: \"space-between\",\n        padding: sizing.size_160,\n        borderColor: semanticColor.core.border.neutral.subtle,\n        borderStyle: \"solid\",\n        borderWidth: border.width.thin,\n        borderRadius: border.radius.radius_040,\n    },\n    container: {\n        display: \"flex\",\n        flexDirection: \"column\",\n        gap: sizing.size_160,\n        padding: sizing.size_160,\n        borderRadius: border.radius.radius_040,\n    },\n    modalContent: {\n        padding: sizing.size_160,\n    },\n    modal: {\n        minInlineSize: \"80vw\",\n    },\n});\n\n/**\n * This story demonstrates using a single controlled ModalLauncher with\n * conditional dialog content. Different buttons trigger different modal\n * content, and focus management is handled correctly when the modal closes.\n *\n * This pattern is useful when you need to show different dialogs based on\n * user interaction, but want to manage them through a single ModalLauncher\n * instance.\n */\nexport const ConditionalDialogsWithFocusManagement: StoryComponentType = () => {\n    const [openedModal, setOpenedModal] = React.useState<\n        \"REGULAR\" | \"WRAPPED\" | null\n    >(null);\n\n    const handleClose = () => {\n        setOpenedModal(null);\n    };\n\n    const conditionalDialog = ({closeModal}: {closeModal: () => void}) => {\n        if (openedModal === \"REGULAR\") {\n            return (\n                <OnePaneDialog\n                    title=\"Regular Modal\"\n                    content={<View>This is a regular modal</View>}\n                    footer={\n                        <Button onClick={() => closeModal()}>\n                            Close Modal\n                        </Button>\n                    }\n                />\n            );\n        }\n\n        if (openedModal === \"WRAPPED\") {\n            return (\n                <OnePaneDialog\n                    title=\"Alternative Modal\"\n                    content={\n                        <View>\n                            This is an alternative modal with different content\n                        </View>\n                    }\n                    footer={<Button onClick={closeModal}>Close Modal</Button>}\n                />\n            );\n        }\n\n        // Fallback (should not be reached)\n        return null;\n    };\n\n    return (\n        <View style={styles.storyContainer}>\n            <BodyText>\n                This story demonstrates conditional dialogs within a single\n                ModalLauncher. Click either button to open different modal\n                content. When the modal closes, focus returns to the triggering\n                button using the `closedFocusId` prop.\n            </BodyText>\n\n            <View style={styles.buttonRow}>\n                <Button\n                    onClick={() => setOpenedModal(\"REGULAR\")}\n                    testId=\"regular-modal-trigger\"\n                >\n                    Open Regular Modal\n                </Button>\n\n                <Button\n                    onClick={() => setOpenedModal(\"WRAPPED\")}\n                    id=\"alternative-modal-trigger\"\n                >\n                    Open Alternative Modal\n                </Button>\n            </View>\n\n            {/* Single ModalLauncher with conditional dialogs */}\n            <ModalLauncher\n                opened={openedModal !== null}\n                onClose={handleClose}\n                closedFocusId={\n                    openedModal === \"WRAPPED\"\n                        ? \"alternative-modal-trigger\"\n                        : undefined\n                }\n                modal={conditionalDialog}\n            />\n        </View>\n    );\n};\n\nConditionalDialogsWithFocusManagement.parameters = {};\n\n/**\n * This example demonstrates how to use `ModalLauncher` to launch a modal that\n * looks like our own `PopoverContent` component. This is useful when you want\n * to create a modal with a custom layout that includes illustrations.\n *\n * You can find more details about how to build custom modals in our\n * `Modal>Building Blocks` section.\n *\n * #### Implementation details\n * - Make sure to wrap `ModalPanel` with `ModalDialog` to ensure that the modal\n *   is displayed correctly and includes all the proper a11y atrributes.\n * - Due to some constrains with `ModalDialog`, you'll likely need to override\n *   its width and height to ensure that the `PopoverContent` is displayed with\n *   the correct dimensions (see `ModalDialog.style` in the code snippet below).\n *\n * #### Accessibility notes\n * - Try to include the `aria-labelledby` attribute on the modal dialog, which\n *   is used to announce the title of the dialog to screen readers when it is\n *   opened.\n * - Make sure to include `alt` text for any images used in the `PopoverContent`\n *   component.\n */\nexport const CreatingACustomModal: StoryComponentType = {\n    name: \"Creating a custom modal with ModalLauncher\",\n    render: () => {\n        const StyledImg = addStyle(\"img\");\n        const popoverModal = ({closeModal}: {closeModal: () => void}) => (\n            <ModalDialog\n                aria-labelledby=\"ready-dialog-title\"\n                style={{\n                    width: \"auto\",\n                    height: \"auto\",\n                }}\n            >\n                <ModalPanel\n                    style={{maxInlineSize: 423}}\n                    closeButtonVisible={true}\n                    content={\n                        <View style={{gap: sizing.size_240}}>\n                            <StyledImg\n                                src=\"./km-ready.svg\"\n                                alt=\"An illustration a bubble with Khanmigo inside.\"\n                                width={423}\n                                height={230}\n                                style={{\n                                    // This is to ensure that the image is\n                                    // aligned to the top left corner of the\n                                    // dialog.\n                                    marginInlineStart: `calc(${sizing.size_320} * -1)`,\n                                    marginBlockStart: `calc(${sizing.size_320} * -1)`,\n                                }}\n                            />\n                            <Heading size=\"medium\" id=\"ready-dialog-title\">\n                                Hi, I’m Khanmigo!\n                            </Heading>\n                            <BodyText>\n                                I’m your new AI-powered assistant, tutor, and\n                                all around cheerleader to help you power up your\n                                learning journey. Let’s take a look around\n                                together!\n                            </BodyText>\n                            {/* Footer */}\n                            <View\n                                style={{\n                                    flexDirection: \"row\",\n                                    justifyContent: \"space-between\",\n                                    width: \"100%\",\n                                    alignItems: \"center\",\n                                }}\n                            >\n                                <BodyText weight=\"bold\">Step 1 of 4</BodyText>\n                                <Button kind=\"primary\" onClick={closeModal}>\n                                    Next\n                                </Button>\n                            </View>\n                        </View>\n                    }\n                />\n            </ModalDialog>\n        );\n\n        return (\n            <ModalLauncher modal={popoverModal}>\n                {({openModal}) => (\n                    <Button onClick={openModal}>Open custom modal</Button>\n                )}\n            </ModalLauncher>\n        );\n    },\n};\n"}},"packages-modal-building-blocks-modalpanel":{"id":"packages-modal-building-blocks-modalpanel","name":"ModalPanel","path":"./__docs__/wonder-blocks-modal/modal-panel.stories.tsx","stories":[{"id":"packages-modal-building-blocks-modalpanel--default","name":"Default","snippet":"const Default = () => <ModalDialog aria-labelledby=\"modal-title-0\" style={styles.dialog}>\n    <ModalPanel\n        content={\n            <View\n                style={[styles.content, styles.scrollContainer]}\n                tabIndex={0}\n            >\n                <Heading size=\"xxlarge\" id=\"modal-title-0\">\n                    Modal Title\n                </Heading>\n                {longBody}\n            </View>\n        } />\n</ModalDialog>;","description":"This is a basic `<ModalPanel>`. It just has a `content` prop that contains a title and a body."},{"id":"packages-modal-building-blocks-modalpanel--with-header","name":"With Header","snippet":"const WithHeader = () => (\n    <ModalDialog aria-labelledby=\"modal-title-2\" style={styles.dialog}>\n        <ModalPanel\n            header={\n                <ModalHeader titleId=\"modal-title-2\" title=\"Modal Title\" />\n            }\n            content={\n                <View tabIndex={0} style={styles.scrollContainer}>\n                    {longBody}\n                </View>\n            }\n        />\n    </ModalDialog>\n);","description":"This is a `<ModalPanel>` with a `header` prop. Note that the header that renders here as part of the `header` prop is sticky, so it remains even if you scroll down in the modal."},{"id":"packages-modal-building-blocks-modalpanel--with-footer","name":"With Footer","snippet":"const WithFooter = () => (\n    <ModalDialog aria-labelledby=\"modal-title-3\" style={styles.dialog}>\n        <ModalPanel\n            content={\n                <View\n                    style={[styles.content, styles.scrollContainer]}\n                    tabIndex={0}\n                >\n                    <Heading size=\"xxlarge\" id=\"modal-title-3\">\n                        Modal Title\n                    </Heading>\n                    {longBody}\n                </View>\n            }\n            footer={\n                <ModalFooter>\n                    <Button onClick={() => {}}>Continue</Button>\n                </ModalFooter>\n            }\n        />\n    </ModalDialog>\n);","description":"A modal panel can have a footer with the `footer` prop. In this example, the footer just contains a button. Note that the footer is sticky."},{"id":"packages-modal-building-blocks-modalpanel--two-panels","name":"Two Panels","snippet":"const TwoPanels = () => {\n    const mobile = \"@media (max-width: 1023px)\";\n    const desktop = \"@media (min-width: 1024px)\";\n\n    const twoPaneDialogStyle = {\n        [desktop]: {\n            width: \"86.72%\",\n            maxWidth: 888,\n            height: \"60.42%\",\n            minHeight: 308,\n        },\n        [mobile]: {\n            width: \"100%\",\n            height: \"100%\",\n            overflow: \"hidden\",\n        },\n    } as const;\n\n    const panelGroupStyle = {\n        flex: 1,\n\n        [desktop]: {\n            flexDirection: \"row\",\n        },\n        [mobile]: {\n            flexDirection: \"column\",\n        },\n    } as const;\n\n    return (\n        <ModalDialog\n            style={twoPaneDialogStyle}\n            aria-labelledby=\"sidebar-title-id\"\n        >\n            <View style={panelGroupStyle}>\n                <ModalPanel\n                    content={\n                        <View style={styles.content}>\n                            <Heading size=\"xxlarge\" id=\"sidebar-title-id\">\n                                Sidebar\n                            </Heading>\n                            <BodyText>\n                                Lorem ipsum dolor sit amet, consectetur\n                                adipiscing elit, sed do eiusmod tempor\n                                incididunt ut labore et dolore magna aliqua.\n                                Ut enim ad minim veniam, quis nostrud\n                                exercitation ullamco laboris.\n                            </BodyText>\n                        </View>\n                    }\n                    closeButtonVisible={false}\n                />\n                <ModalPanel\n                    content={\n                        <View style={styles.content}>\n                            <Heading size=\"xxlarge\">Contents</Heading>\n                            <BodyText>\n                                Lorem ipsum dolor sit amet, consectetur\n                                adipiscing elit, sed do eiusmod tempor\n                                incididunt ut labore et dolore magna aliqua.\n                            </BodyText>\n                            <Button>Primary action</Button>\n                        </View>\n                    }\n                    closeButtonVisible={false}\n                />\n            </View>\n        </ModalDialog>\n    );\n};","description":"Here is an example of how you can have a modal with two panels. Observe that it is responsive, so it uses a row layout with a larger window size and a column layout on a smaller window size. The \"X\" close button has been disabled for both panels since the top right spot would change depending on which layout is being used."},{"id":"packages-modal-building-blocks-modalpanel--with-style","name":"With Style","snippet":"const WithStyle = () => {\n    const modalStyles = {\n        color: semanticColor.status.notice.foreground,\n        background: semanticColor.status.notice.background,\n        border: `${border.width.medium} solid ${semanticColor.status.notice.foreground}`,\n        borderRadius: 20,\n    } as const;\n\n    const button = (\n        <BodyText style={{display: \"flex\"}}>\n            <Button\n                style={{\n                    marginInlineStart: \"auto\",\n                    marginBlockStart: sizing.size_100,\n                }}\n            >\n                A button\n            </Button>\n        </BodyText>\n    );\n    return (\n        <ModalDialog aria-labelledby=\"modal-title-1\" style={styles.dialog}>\n            <ModalPanel\n                header={\n                    <ModalHeader\n                        titleId=\"modal-title-1\"\n                        title=\"Modal Title\"\n                    />\n                }\n                content={\n                    <>\n                        {longBody}\n                        {button}\n                    </>\n                }\n                style={modalStyles}\n            />\n        </ModalDialog>\n    );\n};","description":"A `<ModalPanel>` can have custom styles. In this example, the styles for the modal panel include blue text color, a 2px solid dark blue border, and a border radius of 20px."}],"import":"import { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, ModalDialog, ModalFooter, ModalHeader, ModalPanel } from \"@khanacademy/wonder-blocks-modal\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"ModalPanel\" component.\n  90 |  * ```\n  91 |  */\n> 92 | export default {\n     | ^\n  93 |     title: \"Packages / Modal / Building Blocks / ModalPanel\",\n  94 |     component: ModalPanel,\n  95 |     decorators: [\n\n./__docs__/wonder-blocks-modal/modal-panel.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {border, semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText, Heading} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {\n    ModalDialog,\n    ModalPanel,\n    ModalHeader,\n    ModalFooter,\n} from \"@khanacademy/wonder-blocks-modal\";\nimport packageConfig from \"../../packages/wonder-blocks-modal/package.json\";\nimport ComponentInfo from \"../components/component-info\";\nimport modalPanelArgtypes from \"./modal-panel.argtypes\";\nimport {allModes} from \"../../.storybook/modes\";\nimport {focusStyles} from \"@khanacademy/wonder-blocks-styles\";\nimport {modalPositionerStyle} from \"./modal-story-utils\";\n\nconst longBody = (\n    <View style={{gap: sizing.size_160}}>\n        <BodyText>\n            {`Let's make this body content long in order\nto test scroll overflow.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n        <BodyText>\n            {`Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor incididunt\nut labore et dolore magna aliqua. Ut enim ad minim\nveniam, quis nostrud exercitation ullamco laboris\nnisi ut aliquip ex ea commodo consequat. Duis aute\nirure dolor in reprehenderit in voluptate velit\nesse cillum dolore eu fugiat nulla pariatur.\nExcepteur sint occaecat cupidatat non proident,\nsunt in culpa qui officia deserunt mollit anim id\nest.`}\n        </BodyText>\n    </View>\n);\n\n/**\n * ModalPanel is the content container.\n *\n * ### Implementation notes\n *\n * If you are creating a custom Dialog, make sure to follow these guidelines:\n * - Make sure to add this component inside the\n *   [ModalDialog](./?path=/docs/packages-modal-building-blocks-modaldialog--docs).\n * - If needed, you can also add a\n *   [ModalHeader](./?path=/docs/packages-modal-building-blocks-modalheader--docs) using\n *   the `header` prop. Same goes for\n *   [ModalFooter](./?path=/docs/packages-modal-building-blocks-modalfooter--docs).\n * - If you need to create e2e tests, make sure to pass a `testId` prop. This\n *   will be passed down to this component using a sufix: e.g.\n *   `some-random-id-ModalPanel`. This scope will be propagated to the\n *   CloseButton element as well: e.g. `some-random-id-CloseButton`.\n *\n * ### Usage\n * ```tsx\n * <ModalDialog>\n *      <ModalPanel content={\"custom content goes here\"} />\n * </ModalDialog>\n * ```\n */\nexport default {\n    title: \"Packages / Modal / Building Blocks / ModalPanel\",\n    component: ModalPanel,\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.previewSizer}>\n                <View style={styles.modalPositioner}>\n                    <Story />\n                </View>\n            </View>\n        ),\n    ],\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {\n            modes: {\n                small: allModes.small,\n                large: allModes.large,\n                thunderblocks: allModes.themeThunderBlocks,\n            },\n        },\n    },\n    argTypes: modalPanelArgtypes,\n} as Meta<typeof ModalPanel>;\n\ntype StoryComponentType = StoryObj<typeof ModalPanel>;\n\n/**\n * This is a basic `<ModalPanel>`. It just has a `content` prop that contains a\n * title and a body.\n */\nexport const Default: StoryComponentType = {\n    render: (args) => (\n        <ModalDialog aria-labelledby=\"modal-title-0\" style={styles.dialog}>\n            <ModalPanel\n                {...args}\n                content={\n                    <View\n                        style={[styles.content, styles.scrollContainer]}\n                        tabIndex={0}\n                    >\n                        <Heading size=\"xxlarge\" id=\"modal-title-0\">\n                            Modal Title\n                        </Heading>\n                        {longBody}\n                    </View>\n                }\n            />\n        </ModalDialog>\n    ),\n    parameters: {\n        chromatic: {\n            // We already have screenshots in one-pane-dialog.stories.tsx\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * This is a `<ModalPanel>` with a `header` prop. Note that the header that\n * renders here as part of the `header` prop is sticky, so it remains even if\n * you scroll down in the modal.\n */\nexport const WithHeader: StoryComponentType = {\n    render: () => (\n        <ModalDialog aria-labelledby=\"modal-title-2\" style={styles.dialog}>\n            <ModalPanel\n                header={\n                    <ModalHeader titleId=\"modal-title-2\" title=\"Modal Title\" />\n                }\n                content={\n                    <View tabIndex={0} style={styles.scrollContainer}>\n                        {longBody}\n                    </View>\n                }\n            />\n        </ModalDialog>\n    ),\n    parameters: {\n        chromatic: {\n            // We already have screenshots in one-pane-dialog.stories.tsx\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * A modal panel can have a footer with the `footer` prop. In this example, the\n * footer just contains a button. Note that the footer is sticky.\n */\nexport const WithFooter: StoryComponentType = {\n    render: () => (\n        <ModalDialog aria-labelledby=\"modal-title-3\" style={styles.dialog}>\n            <ModalPanel\n                content={\n                    <View\n                        style={[styles.content, styles.scrollContainer]}\n                        tabIndex={0}\n                    >\n                        <Heading size=\"xxlarge\" id=\"modal-title-3\">\n                            Modal Title\n                        </Heading>\n                        {longBody}\n                    </View>\n                }\n                footer={\n                    <ModalFooter>\n                        <Button onClick={() => {}}>Continue</Button>\n                    </ModalFooter>\n                }\n            />\n        </ModalDialog>\n    ),\n    parameters: {\n        chromatic: {\n            // We already have screenshots in one-pane-dialog.stories.tsx\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * Here is an example of how you can have a modal with two panels. Observe that\n * it is responsive, so it uses a row layout with a larger window size and a\n * column layout on a smaller window size. The \"X\" close button has been\n * disabled for both panels since the top right spot would change depending on\n * which layout is being used.\n */\nexport const TwoPanels: StoryComponentType = {\n    render: () => {\n        const mobile = \"@media (max-width: 1023px)\";\n        const desktop = \"@media (min-width: 1024px)\";\n\n        const twoPaneDialogStyle = {\n            [desktop]: {\n                width: \"86.72%\",\n                maxWidth: 888,\n                height: \"60.42%\",\n                minHeight: 308,\n            },\n            [mobile]: {\n                width: \"100%\",\n                height: \"100%\",\n                overflow: \"hidden\",\n            },\n        } as const;\n\n        const panelGroupStyle = {\n            flex: 1,\n\n            [desktop]: {\n                flexDirection: \"row\",\n            },\n            [mobile]: {\n                flexDirection: \"column\",\n            },\n        } as const;\n\n        return (\n            <ModalDialog\n                style={twoPaneDialogStyle}\n                aria-labelledby=\"sidebar-title-id\"\n            >\n                <View style={panelGroupStyle}>\n                    <ModalPanel\n                        content={\n                            <View style={styles.content}>\n                                <Heading size=\"xxlarge\" id=\"sidebar-title-id\">\n                                    Sidebar\n                                </Heading>\n                                <BodyText>\n                                    Lorem ipsum dolor sit amet, consectetur\n                                    adipiscing elit, sed do eiusmod tempor\n                                    incididunt ut labore et dolore magna aliqua.\n                                    Ut enim ad minim veniam, quis nostrud\n                                    exercitation ullamco laboris.\n                                </BodyText>\n                            </View>\n                        }\n                        closeButtonVisible={false}\n                    />\n                    <ModalPanel\n                        content={\n                            <View style={styles.content}>\n                                <Heading size=\"xxlarge\">Contents</Heading>\n                                <BodyText>\n                                    Lorem ipsum dolor sit amet, consectetur\n                                    adipiscing elit, sed do eiusmod tempor\n                                    incididunt ut labore et dolore magna aliqua.\n                                </BodyText>\n                                <Button>Primary action</Button>\n                            </View>\n                        }\n                        closeButtonVisible={false}\n                    />\n                </View>\n            </ModalDialog>\n        );\n    },\n};\n\n/**\n * A `<ModalPanel>` can have custom styles. In this example, the styles for the\n * modal panel include blue text color, a 2px solid dark blue border, and a\n * border radius of 20px.\n */\nexport const WithStyle: StoryComponentType = {\n    render: () => {\n        const modalStyles = {\n            color: semanticColor.status.notice.foreground,\n            background: semanticColor.status.notice.background,\n            border: `${border.width.medium} solid ${semanticColor.status.notice.foreground}`,\n            borderRadius: 20,\n        } as const;\n\n        const button = (\n            <BodyText style={{display: \"flex\"}}>\n                <Button\n                    style={{\n                        marginInlineStart: \"auto\",\n                        marginBlockStart: sizing.size_100,\n                    }}\n                >\n                    A button\n                </Button>\n            </BodyText>\n        );\n        return (\n            <ModalDialog aria-labelledby=\"modal-title-1\" style={styles.dialog}>\n                <ModalPanel\n                    header={\n                        <ModalHeader\n                            titleId=\"modal-title-1\"\n                            title=\"Modal Title\"\n                        />\n                    }\n                    content={\n                        <>\n                            {longBody}\n                            {button}\n                        </>\n                    }\n                    style={modalStyles}\n                />\n            </ModalDialog>\n        );\n    },\n};\n\nconst styles = StyleSheet.create({\n    dialog: {\n        maxInlineSize: 600,\n        maxBlockSize: 500,\n    },\n    modalPositioner: modalPositionerStyle,\n    previewSizer: {\n        height: 600,\n    },\n    example: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n    content: {\n        gap: sizing.size_240,\n    },\n    scrollContainer: {\n        \":focus-visible\": focusStyles.focus[\":focus-visible\"],\n    },\n});\n"}},"packages-modal-onepanedialog":{"id":"packages-modal-onepanedialog","name":"OnePaneDialog","path":"./__docs__/wonder-blocks-modal/one-pane-dialog.stories.tsx","stories":[{"id":"packages-modal-onepanedialog--default","name":"Default","snippet":"const Default = () => <View style={styles.previewSizer}>\n    <View style={styles.modalPositioner}>\n        <OnePaneDialog\n            content={(<BodyText>\n                {`Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n                sed do eiusmod tempor incididunt ut labore et dolore magna\n                aliqua. Ut enim ad minim veniam, quis nostrud exercitation\n                ullamco laboris nisi ut aliquip ex ea commodo consequat.\n                Duis aute irure dolor in reprehenderit in voluptate velit\n                esse cillum dolore eu fugiat nulla pariatur. Excepteur sint\n                occaecat cupidatat non proident, sunt in culpa qui officia\n                deserunt mollit anim id est.`}\n            </BodyText>)}\n            title=\"Some title\" />\n    </View>\n</View>;"},{"id":"packages-modal-onepanedialog--simple","name":"Simple","snippet":"const Simple = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <OnePaneDialog\n                title=\"Hello, world! Here is an example of a long title that wraps to the next line.\"\n                content={\n                    <BodyText>\n                        {`Lorem ipsum dolor sit amet, consectetur adipiscing\n                        elit, sed do eiusmod tempor incididunt ut labore et\n                        dolore magna aliqua. Ut enim ad minim veniam,\n                        quis nostrud exercitation ullamco laboris nisi ut\n                        aliquip ex ea commodo consequat. Duis aute irure\n                        dolor in reprehenderit in voluptate velit esse\n                        cillum dolore eu fugiat nulla pariatur. Excepteur\n                        sint occaecat cupidatat non proident, sunt in culpa\n                        qui officia deserunt mollit anim id est.`}\n                    </BodyText>\n                }\n            />\n        </View>\n    </View>\n);","description":"This is the most basic OnePaneDialog, with just the title and content."},{"id":"packages-modal-onepanedialog--with-long-contents-and-footer","name":"With Long Contents And Footer","snippet":"const WithLongContentsAndFooter = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <OnePaneDialog\n                title=\"Hello, world! Here is an example of a long title that wraps to the next line.\"\n                content={\n                    <View tabIndex={0}>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                        <BodyText>{reallyLongText}</BodyText>\n                    </View>\n                }\n                footer={\n                    <View style={styles.footer}>\n                        <View style={styles.row}>\n                            <Button kind=\"tertiary\">Previous</Button>\n                            <Button kind=\"primary\">Next</Button>\n                        </View>\n                    </View>\n                }\n            />\n        </View>\n    </View>\n);","description":"This is the most basic OnePaneDialog, with just the title and content."},{"id":"packages-modal-onepanedialog--with-footer","name":"With Footer","snippet":"const WithFooter = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <OnePaneDialog\n                title=\"Hello, world!\"\n                content={\n                    <BodyText>\n                        {`Lorem ipsum dolor sit amet, consectetur adipiscing\n                        elit, sed do eiusmod tempor incididunt ut labore et\n                        dolore magna aliqua. Ut enim ad minim veniam,\n                        quis nostrud exercitation ullamco laboris nisi ut\n                        aliquip ex ea commodo consequat. Duis aute irure\n                        dolor in reprehenderit in voluptate velit esse\n                        cillum dolore eu fugiat nulla pariatur. Excepteur\n                        sint occaecat cupidatat non proident, sunt in culpa\n                        qui officia deserunt mollit anim id est.`}\n                    </BodyText>\n                }\n                footer={\n                    <View style={styles.footer}>\n                        <BodyText weight=\"bold\">Step 1 of 4</BodyText>\n                        <View style={styles.row}>\n                            <Button kind=\"tertiary\">Previous</Button>\n                            <Button kind=\"primary\">Next</Button>\n                        </View>\n                    </View>\n                }\n            />\n        </View>\n    </View>\n);","description":"This OnePaneDialog includes a custom footer."},{"id":"packages-modal-onepanedialog--with-subtitle","name":"With Subtitle","snippet":"const WithSubtitle = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <OnePaneDialog\n                title=\"Hello, world!\"\n                content={\n                    <BodyText>\n                        {`Lorem ipsum dolor sit amet, consectetur adipiscing\n                        elit, sed do eiusmod tempor incididunt ut labore et\n                        dolore magna aliqua. Ut enim ad minim veniam,\n                        quis nostrud exercitation ullamco laboris nisi ut\n                        aliquip ex ea commodo consequat. Duis aute irure\n                        dolor in reprehenderit in voluptate velit esse\n                        cillum dolore eu fugiat nulla pariatur. Excepteur\n                        sint occaecat cupidatat non proident, sunt in culpa\n                        qui officia deserunt mollit anim id est.`}\n                    </BodyText>\n                }\n                subtitle={\n                    \"Subtitle that provides additional context to the title\"\n                }\n            />\n        </View>\n    </View>\n);","description":"This OnePaneDialog includes a custom subtitle."},{"id":"packages-modal-onepanedialog--with-breadcrumbs","name":"With Breadcrumbs","snippet":"const WithBreadcrumbs = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <OnePaneDialog\n                title=\"Hello, world!\"\n                content={\n                    <BodyText>\n                        {`Lorem ipsum dolor sit amet, consectetur adipiscing\n                        elit, sed do eiusmod tempor incididunt ut labore et\n                        dolore magna aliqua. Ut enim ad minim veniam,\n                        quis nostrud exercitation ullamco laboris nisi ut\n                        aliquip ex ea commodo consequat. Duis aute irure\n                        dolor in reprehenderit in voluptate velit esse\n                        cillum dolore eu fugiat nulla pariatur. Excepteur\n                        sint occaecat cupidatat non proident, sunt in culpa\n                        qui officia deserunt mollit anim id est.`}\n                    </BodyText>\n                }\n                breadcrumbs={\n                    <Breadcrumbs>\n                        <BreadcrumbsItem>\n                            <Link href=\"#course\">Course</Link>\n                        </BreadcrumbsItem>\n                        <BreadcrumbsItem>\n                            <Link href=\"#unit\">Unit</Link>\n                        </BreadcrumbsItem>\n                        <BreadcrumbsItem>Lesson</BreadcrumbsItem>\n                    </Breadcrumbs>\n                }\n            />\n        </View>\n    </View>\n);","description":"This OnePaneDialog includes a custom Breadcrumbs element."},{"id":"packages-modal-onepanedialog--with-above-and-below","name":"With Above And Below","snippet":"const WithAboveAndBelow = () => {\n    const aboveStyle = {\n        background: \"url(./modal-above.png)\",\n        width: 874,\n        height: 551,\n        position: \"absolute\",\n        top: 40,\n        left: -140,\n    } as const;\n\n    const belowStyle = {\n        background: \"url(./modal-below.png)\",\n        width: 868,\n        height: 521,\n        position: \"absolute\",\n        top: -100,\n        left: -300,\n    } as const;\n\n    return (\n        <View style={styles.previewSizer}>\n            <View style={styles.modalPositioner}>\n                <OnePaneDialog\n                    title=\"Single-line title\"\n                    content={\n                        <View style={{gap: sizing.size_160}} tabIndex={0}>\n                            <BodyText>\n                                {`Lorem ipsum dolor sit amet, consectetur\n                        adipiscing elit, sed do eiusmod tempor incididunt\n                        ut labore et dolore magna aliqua. Ut enim ad minim\n                        veniam, quis nostrud exercitation ullamco laboris\n                        nisi ut aliquip ex ea commodo consequat. Duis aute\n                        irure dolor in reprehenderit in voluptate velit\n                        esse cillum dolore eu fugiat nulla pariatur.\n                        Excepteur sint occaecat cupidatat non proident,\n                        sunt in culpa qui officia deserunt mollit anim id\n                        est.`}\n                            </BodyText>\n                            <BodyText>\n                                {`Lorem ipsum dolor sit amet, consectetur\n                        adipiscing elit, sed do eiusmod tempor incididunt\n                        ut labore et dolore magna aliqua. Ut enim ad minim\n                        veniam, quis nostrud exercitation ullamco laboris\n                        nisi ut aliquip ex ea commodo consequat. Duis aute\n                        irure dolor in reprehenderit in voluptate velit\n                        esse cillum dolore eu fugiat nulla pariatur.\n                        Excepteur sint occaecat cupidatat non proident,\n                        sunt in culpa qui officia deserunt mollit anim id\n                        est.`}\n                            </BodyText>\n                            <BodyText>\n                                {`Lorem ipsum dolor sit amet, consectetur\n                        adipiscing elit, sed do eiusmod tempor incididunt\n                        ut labore et dolore magna aliqua. Ut enim ad minim\n                        veniam, quis nostrud exercitation ullamco laboris\n                        nisi ut aliquip ex ea commodo consequat. Duis aute\n                        irure dolor in reprehenderit in voluptate velit\n                        esse cillum dolore eu fugiat nulla pariatur.\n                        Excepteur sint occaecat cupidatat non proident,\n                        sunt in culpa qui officia deserunt mollit anim id\n                        est.`}\n                            </BodyText>\n                        </View>\n                    }\n                    above={<View style={aboveStyle} />}\n                    below={<View style={belowStyle} />}\n                />\n            </View>\n        </View>\n    );\n};","description":"The element passed into the `above` prop is rendered in front of the modal. The element passed into the `below` prop is rendered behind the modal. In this example, a `<View>` element with a background image of a person and an orange blob is passed into the `below` prop. A `<View>` element with a background image of an arc and a blue semicircle is passed into the `above` prop. This results in the person's head and the orange blob peeking out from behind the modal, and the arc and semicircle going over the front of the modal."},{"id":"packages-modal-onepanedialog--with-style","name":"With Style","snippet":"const WithStyle = () => (\n    <View style={styles.previewSizer}>\n        <View style={styles.modalPositioner}>\n            <OnePaneDialog\n                title=\"Hello, world!\"\n                content={\n                    <BodyText>\n                        {`Lorem ipsum dolor sit amet, consectetur adipiscing\n                        elit, sed do eiusmod tempor incididunt ut labore et\n                        dolore magna aliqua. Ut enim ad minim veniam,\n                        quis nostrud exercitation ullamco laboris nisi ut\n                        aliquip ex ea commodo consequat. Duis aute irure\n                        dolor in reprehenderit in voluptate velit esse\n                        cillum dolore eu fugiat nulla pariatur. Excepteur\n                        sint occaecat cupidatat non proident, sunt in culpa\n                        qui officia deserunt mollit anim id est.`}\n                    </BodyText>\n                }\n                style={{\n                    color: semanticColor.status.notice.foreground,\n                    maxInlineSize: 1000,\n                }}\n            />\n        </View>\n    </View>\n);","description":"A OnePaneDialog can have custom styles via the `style` prop. Here, the modal has a `maxWidth: 1000` and `color: Color.blue` in its custom styles."},{"id":"packages-modal-onepanedialog--with-style-and-footer","name":"With Style And Footer","snippet":"const WithStyleAndFooter = () => {\n    return (\n        <View style={styles.previewSizer}>\n            <View style={styles.modalPositioner}>\n                <OnePaneDialog\n                    style={{\n                        blockSize: \"fit-content\",\n                        inlineSize: \"fit-content\",\n                        maxInlineSize: \"100%\",\n                    }}\n                    title=\"Title of the modal\"\n                    content={\"Content\"}\n                    footer={<Button kind=\"primary\">Confirm</Button>}\n                />\n            </View>\n        </View>\n    );\n};","description":"This example shows how to override the default styling of the modal, like a confirmation modal."},{"id":"packages-modal-onepanedialog--multi-step-modal","name":"Multi Step Modal","snippet":"const MultiStepModal = () => {\n    const styles = StyleSheet.create({\n        example: {\n            padding: sizing.size_320,\n            alignItems: \"center\",\n        },\n        row: {\n            flexDirection: \"row\",\n            justifyContent: \"flex-end\",\n        },\n        footer: {\n            alignItems: \"center\",\n            flexDirection: \"row\",\n            justifyContent: \"space-between\",\n            width: \"100%\",\n        },\n    });\n\n    type ExerciseModalProps = {\n        current: number;\n        handleNextButton: () => unknown;\n        handlePrevButton: () => unknown;\n        question: string;\n        total: number;\n    };\n\n    const ExerciseModal = function (\n        props: ExerciseModalProps,\n    ): React.ReactElement {\n        const {current, handleNextButton, handlePrevButton, question, total} =\n            props;\n\n        return (\n            <OnePaneDialog\n                title=\"Exercises\"\n                content={\n                    <View>\n                        <BodyText>\n                            This is the current question: {question}\n                        </BodyText>\n                    </View>\n                }\n                footer={\n                    <View style={styles.footer}>\n                        <BodyText weight=\"bold\">\n                            Step {current + 1} of {total}\n                        </BodyText>\n                        <View style={styles.row}>\n                            <Button kind=\"tertiary\" onClick={handlePrevButton}>\n                                Previous\n                            </Button>\n                            <Button kind=\"primary\" onClick={handleNextButton}>\n                                Next\n                            </Button>\n                        </View>\n                    </View>\n                }\n            />\n        );\n    };\n\n    type ExerciseContainerProps = {\n        questions: Array<string>;\n    };\n\n    const ExerciseContainer = function (\n        props: ExerciseContainerProps,\n    ): React.ReactElement {\n        const [currentQuestion, setCurrentQuestion] = React.useState(0);\n\n        const handleNextButton = () => {\n            setCurrentQuestion(\n                Math.min(currentQuestion + 1, props.questions.length - 1),\n            );\n        };\n\n        const handlePrevButton = () => {\n            setCurrentQuestion(Math.max(0, currentQuestion - 1));\n        };\n\n        return (\n            <ModalLauncher\n                modal={\n                    <ExerciseModal\n                        question={props.questions[currentQuestion]}\n                        current={currentQuestion}\n                        total={props.questions.length}\n                        handlePrevButton={handlePrevButton}\n                        handleNextButton={handleNextButton}\n                    />\n                }\n            >\n                {({openModal}) => (\n                    <Button onClick={openModal}>Open multi-step modal</Button>\n                )}\n            </ModalLauncher>\n        );\n    };\n\n    return (\n        <View style={styles.example}>\n            <ExerciseContainer\n                questions={[\n                    \"First question\",\n                    \"Second question\",\n                    \"Last question\",\n                ]}\n            />\n        </View>\n    );\n};","description":"This example illustrates how we can update the Modal's contents by wrapping it into a new component/container. `Modal` is built in a way that provides great flexibility and makes it work with different variations and/or layouts."},{"id":"packages-modal-onepanedialog--with-launcher","name":"With Launcher","snippet":"const WithLauncher = () => {\n    type MyModalProps = {\n        closeModal: () => void;\n    };\n\n    const MyModal = ({closeModal}: MyModalProps): React.ReactElement => (\n        <OnePaneDialog\n            title=\"Single-line title\"\n            content={\n                <BodyText>\n                    {`Lorem ipsum dolor sit amet, consectetur\n                    adipiscing elit, sed do eiusmod tempor incididunt\n                    ut labore et dolore magna aliqua. Ut enim ad minim\n                    veniam, quis nostrud exercitation ullamco laboris\n                    nisi ut aliquip ex ea commodo consequat. Duis aute\n                    irure dolor in reprehenderit in voluptate velit\n                    esse cillum dolore eu fugiat nulla pariatur.\n                    Excepteur sint occaecat cupidatat non proident,\n                    sunt in culpa qui officia deserunt mollit anim id\n                    est.`}\n                </BodyText>\n            }\n            footer={<Button onClick={closeModal}>Close</Button>}\n        />\n    );\n\n    return (\n        <ModalLauncher modal={MyModal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click me to open the modal</Button>\n            )}\n        </ModalLauncher>\n    );\n};","description":"A modal can be launched using a launcher. Here, the launcher is a `<Button>` element whose `onClick` function opens the modal. The modal passed into the `modal` prop of the `<ModalLauncher>` element is a `<OnePaneDialog>`. To turn an element into a launcher, wrap the element in a `<ModalLauncher>` element."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { Breadcrumbs, BreadcrumbsItem } from \"@khanacademy/wonder-blocks-breadcrumbs\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, ModalLauncher, OnePaneDialog } from \"@khanacademy/wonder-blocks-modal\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-modal/src/index.ts","description":"","displayName":"OnePaneDialog","methods":[],"props":{"content":{"defaultValue":null,"description":"The content of the modal, appearing between the titlebar and footer.","name":"content","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactNode"}},"title":{"defaultValue":null,"description":"The title of the modal, appearing in the titlebar.","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"footer":{"defaultValue":null,"description":"The content of the modal's footer. A great place for buttons!\n\nContent is right-aligned by default. To control alignment yourself,\nprovide a container element with 100% width.","name":"footer","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"onClose":{"defaultValue":null,"description":"Called when the close button is clicked.\n\nIf you're using `ModalLauncher`, you probably shouldn't use this prop!\nInstead, to listen for when the modal closes, add an `onClose` handler\nto the `ModalLauncher`.  Doing so will result in a console.warn().","name":"onClose","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => unknown)"}},"closeButtonVisible":{"defaultValue":null,"description":"When true, the close button is shown; otherwise, the close button is not shown.","name":"closeButtonVisible","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"above":{"defaultValue":null,"description":"When set, provides a component that can render content above the top of the modal;\nwhen not set, no additional content is shown above the modal.\nThis prop is passed down to the ModalDialog.","name":"above","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"below":{"defaultValue":null,"description":"When set, provides a component that will render content below the bottom of the modal;\nwhen not set, no additional content is shown below the modal.\nThis prop is passed down to the ModalDialog.\n\nNOTE: Devs can customize this content by rendering the component assigned to this prop with custom styles,\nsuch as by wrapping it in a View.","name":"below","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"role":{"defaultValue":null,"description":"When set, overrides the default role value. Default role is \"dialog\"\nRoles other than dialog and alertdialog aren't appropriate for this\ncomponent","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"dialog\" | \"alertdialog\"","value":[{"value":"\"dialog\""},{"value":"\"alertdialog\""}]}},"style":{"defaultValue":null,"description":"Optional custom styles.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing. This ID will be passed down to the Dialog.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"titleId":{"defaultValue":null,"description":"An optional id parameter for the title. If one is\nnot provided, a unique id will be generated.","name":"titleId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-describedby":{"defaultValue":null,"description":"The ID of the content describing this dialog, if applicable.","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"subtitle":{"defaultValue":null,"description":"The subtitle of the modal, appearing in the titlebar, below the title.","name":"subtitle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"breadcrumbs":{"defaultValue":null,"description":"Adds a breadcrumb-trail, appearing in the ModalHeader, above the title.","name":"breadcrumbs","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-modal/src/components/one-pane-dialog.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & { children: ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & { children: string | ReactElement<SharedProps & RefAttributes<HTMLAnchorElement | ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>>, string | JSXElementConstructor<any>>; showSeparator?: boolean | undefined; testId?: string | undefined; } & RefAttributes<HTMLLIElement>, string | JSXElementConstructor<any>> | ReactElement<Readonly<AriaAttributes> & Readonly<{ role?: AriaRole | undefined; }> & { children: string | ReactElement<SharedProps & RefAttributes<HTMLAnchorElement | ForwardRefExoticComponent<LinkProps & RefAttributes<HTMLAnchorElement>>>, string | JSXElementConstructor<any>>; showSeparator?: boolean | undefined; testId?: string | undefined; } & RefAttributes<HTMLLIElement>, string | JSXElementConstructor<any>>[]; \"aria-label\"?: string | undefined; testId?: string | undefined; } & RefAttributes<HTMLElement>, string | JSXElementConstructor<any>>"}}},"exportName":"OnePaneDialog"}},"packages-popover-popovercontentcore":{"id":"packages-popover-popovercontentcore","name":"PopoverContentCore","path":"./__docs__/wonder-blocks-popover/popover-content-core.stories.tsx","stories":[{"id":"packages-popover-popovercontentcore--with-icon","name":"With Icon","snippet":"const WithIcon = () => <PopoverContentCore closeButtonVisible style={styles.popoverWithIcon}><>\n        <PhosphorIcon size=\"large\" icon={IconMappings.article} />\n        <View>\n            <BodyText weight=\"bold\" id=\"custom-popover-title\">This is an article\n                                    </BodyText>\n            <BodyText id=\"custom-popover-content\">With the content\n                                    </BodyText>\n        </View>\n    </></PopoverContentCore>;"},{"id":"packages-popover-popovercontentcore--with-detail-cell","name":"With Detail Cell","snippet":"const WithDetailCell = () => <PopoverContentCore style={styles.popoverWithCell}><DetailCell\n        title=\"Title for article item\"\n        subtitle1=\"Subtitle for article item\"\n        subtitle2=\"Subtitle for article item\"\n        leftAccessory={\n            <PhosphorIcon\n                icon={IconMappings.playCircle}\n                size=\"medium\"\n            />\n        }\n        rightAccessory={<PhosphorIcon icon={IconMappings.caretRight} />}\n        onClick={() => {}}\n        aria-label=\"Press to navigate to the article\" /></PopoverContentCore>;","description":"Popovers can also benefit from other Wonder Blocks components. In this example, we are using the `DetailCell` component embedded as part of the popover contents."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, PopoverContentCore } from \"@khanacademy/wonder-blocks-popover\";\nimport { DetailCell } from \"@khanacademy/wonder-blocks-cell\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"Popovers provide additional information that is related to a particular element and/or content. They can include text, links, icons and illustrations. The main difference with `Tooltip` is that they must be dismissed by clicking an element. This component uses the `PopoverPopper` component to position the `PopoverContentCore` component according to the children it is wrapping. ### Usage ```jsx import {Popover, PopoverContent} from \"@khanacademy/wonder-blocks-popover\"; <Popover onClose={() => {}} content={ <PopoverContent title=\"Title\" content=\"Some content\" closeButtonVisible /> }> {({ open }) => <Button onClick={open}>Open popover</Button>} </Popover> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-popover/src/index.ts","description":"Popovers provide additional information that is related to a particular\nelement and/or content. They can include text, links, icons and\nillustrations. The main difference with `Tooltip` is that they must be\ndismissed by clicking an element.\n\nThis component uses the `PopoverPopper` component to position the\n`PopoverContentCore` component according to the children it is wrapping.\n\n### Usage\n\n```jsx\nimport {Popover, PopoverContent} from \"@khanacademy/wonder-blocks-popover\";\n\n<Popover\n onClose={() => {}}\n content={\n     <PopoverContent title=\"Title\" content=\"Some content\" closeButtonVisible />\n }>\n     {({ open }) => <Button onClick={open}>Open popover</Button>}\n </Popover>\n```","displayName":"src","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"autoUpdate":{"defaultValue":null,"description":"Whether the popover should update its position when the anchor\nelement changes size or position. Defaults to false.","name":"autoUpdate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"children":{"defaultValue":null,"description":"The element that triggers the popover. This element will be used to\nposition the popover. It can be either a Node or a function using the\nchildren-as-function pattern to pass an open function for use anywhere\nwithin children. The latter provides a lot of flexibility in terms of\nwhat actions may trigger the `Popover` to launch the popover dialog.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | ((arg1: { open: () => void; }) => ReactElement<any, string | JSXElementConstructor<any>>)"}},"content":{"defaultValue":null,"description":"The content of the popover. You can either use\n[PopoverContent](#PopoverContent) with one of the pre-defined variants,\nor include your own custom content using\n[PopoverContentCore](#PopoverContentCore directly.\n\nIf the popover needs to close itself, the close function provided to this\ncallback can be called to close the popover.","name":"content","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"PopoverContents | ((arg1: { close: () => void; }) => PopoverContents)"}},"placement":{"defaultValue":{"value":"top"},"description":"Where the popover should try to appear in relation to the trigger element.","name":"placement","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"Placement","value":[{"value":"\"left\""},{"value":"\"right\""},{"value":"\"top\""},{"value":"\"bottom\""}]}},"dismissEnabled":{"defaultValue":null,"description":"When enabled, user can hide the popover content by pressing the `esc` key\nor clicking/tapping outside of it.","name":"dismissEnabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"id":{"defaultValue":null,"description":"The unique identifier to give to the popover. Provide this in cases\nwhere you want to override the default accessibility solution. This\nidentifier will be applied to the popover title and content.\n\nThis is also used as a prefix to the IDs of the popover's elements.\n\nFor example, if you pass `\"my-popover\"` as the ID, the popover title\nwill have the ID `\"my-popover-title\"` and the popover content will\nhave the ID `\"my-popover-content\"`.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"closedFocusId":{"defaultValue":null,"description":"The selector for the element that will be focused after the popover\ndialog closes. When not set, the element that triggered the popover\nwill be used.","name":"closedFocusId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"initialFocusId":{"defaultValue":null,"description":"The selector for the element that will be focused when the popover\ncontent shows. When not set, the first focusable element within the\npopover content will be used.","name":"initialFocusId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"initialFocusDelay":{"defaultValue":null,"description":"The delay in milliseconds before the initial focus is set.\nThis allows any active event listeners to finish before focusing.\n\nDefaults to 0.","name":"initialFocusDelay","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"opened":{"defaultValue":null,"description":"Renders the popover when true, renders nothing when false.\n\nUsing this prop makes the component behave as a controlled component. The\nparent is responsible for managing the opening/closing of the popover\nwhen using this prop.","name":"opened","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onClose":{"defaultValue":null,"description":"Called when the popover closes","name":"onClose","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => unknown)"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"showTail":{"defaultValue":{"value":"true"},"description":"Whether to show the popover tail or not. Defaults to true.","name":"showTail","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"portal":{"defaultValue":{"value":"true"},"description":"Optional property to enable the portal functionality of popover.\nThis is very handy in cases where the Popover can't be easily\ninjected into the DOM structure and requires portaling to\nthe trigger location.\n\nSet to \"true\" by default.\n\nCAUTION: Turning off portal could cause some clipping issues\nespecially around legacy code with usage of z-indexing,\nUse caution when turning this functionality off and ensure\nyour content does not get clipped or hidden.","name":"portal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"rootBoundary":{"defaultValue":{"value":"viewport"},"description":"Optional property to set what the root boundary is for the popper behavior.\nThis is set to \"viewport\" by default, causing the popper to be positioned based\non the user's viewport. If set to \"document\", it will position itself based\non where there is available room within the document body.","name":"rootBoundary","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"RootBoundary","value":[{"value":"\"document\""},{"value":"\"viewport\""}]}},"viewportPadding":{"defaultValue":null,"description":"If `rootBoundary` is `viewport`, this padding value is used to provide\nspacing between the popper and the viewport. If not provided, default\nspacing of 12px is applied.","name":"viewportPadding","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-popover/src/components/popover.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}}},"exportName":"src"}},"packages-popover-popovercontent":{"id":"packages-popover-popovercontent","name":"PopoverContent as unknown as React.ComponentType<any>","path":"./__docs__/wonder-blocks-popover/popover-content.stories.tsx","stories":[{"id":"packages-popover-popovercontent--default","name":"Default (text)","snippet":"const Default = () => <PopoverContent\n    title=\"A simple popover\"\n    content=\"The default version only includes text.\"\n    closeButtonVisible />;","description":"Default popover variant that displays text-only."},{"id":"packages-popover-popovercontent--with-icon","name":"With Icon","snippet":"const WithIcon = () => <PopoverContent\n    title=\"Popover with Icon\"\n    content=\"Popovers can include images on the left.\"\n    icon={<img src=\"./logo.svg\" width=\"100%\" alt=\"Wonder Blocks logo\" />} />;","description":"Decorate the popover with an illustrated icon. You need to pass an `icon` prop with the following constraints: - string: The URL of the icon asset - `<img>` or `<svg>`: Make sure to define a width When passing in a url for the `icon` prop, use the `iconAlt` prop to provide alternative text for the icon if it communicates meaning."},{"id":"packages-popover-popovercontent--with-title-heading-tag","name":"With Title Heading Tag","snippet":"const WithTitleHeadingTag = () => <PopoverContent\n    title=\"Custom heading tag\"\n    content=\"This popover title is rendered as a custom heading tag.\"\n    titleHeadingTag=\"h2\" />;","description":"Use the `titleHeadingTag` prop to override the heading level of the popover title. The default is `h4`. This does not affect the visual appearance of the title."},{"id":"packages-popover-popovercontent--with-illustration","name":"With Illustration","snippet":"const WithIllustration = () => <PopoverContent\n    title=\"Popover with Illustration\"\n    content=\"As you can see, this popover includes a full-bleed illustration.\"\n    image={(<img\n        src=\"./illustration.svg\"\n        alt=\"An illustration of a person skating on a pencil\"\n        width={288}\n        height={200}\n    />)}\n    closeButtonVisible />;","description":"Call attention to the popover using a full-bleed illustration."}],"import":"import { ComponentInfo } from \"wonder-blocks\";\nimport { PopoverContent } from \"@khanacademy/wonder-blocks-popover\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"PopoverContent as unknown as React.ComponentType<any>\" component.\n  11 | import PopoverContentArgtypes from \"./popover-content.argtypes\";\n  12 |\n> 13 | export default {\n     | ^\n  14 |     title: \"Packages / Popover / PopoverContent\",\n  15 |     component: PopoverContent as unknown as React.ComponentType<any>,\n  16 |     argTypes: PopoverContentArgtypes,\n\n./__docs__/wonder-blocks-popover/popover-content.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\n\nimport {PopoverContent} from \"@khanacademy/wonder-blocks-popover\";\nimport packageConfig from \"../../packages/wonder-blocks-popover/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport PopoverContentArgtypes from \"./popover-content.argtypes\";\n\nexport default {\n    title: \"Packages / Popover / PopoverContent\",\n    component: PopoverContent as unknown as React.ComponentType<any>,\n    argTypes: PopoverContentArgtypes,\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            description: {\n                component: null,\n            },\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {\n            // Visual coverage is provided by the Popover StateSheet snapshot,\n            // which renders PopoverContent inside the Popover.\n            disableSnapshot: true,\n        },\n    },\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>{Story()}</View>\n        ),\n    ],\n} as Meta<typeof PopoverContent>;\n\nconst styles = StyleSheet.create({\n    example: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n    row: {\n        flexDirection: \"row\",\n    },\n});\n\ntype StoryComponentType = StoryObj<typeof PopoverContent>;\n\n/**\n * Default popover variant that displays text-only.\n */\nexport const Default: StoryComponentType = {\n    args: {\n        title: \"A simple popover\",\n        content: \"The default version only includes text.\",\n        closeButtonVisible: true,\n    },\n    render: (args) => <PopoverContent {...args} />,\n};\n\nDefault.storyName = \"Default (text)\";\n\n/**\n * Decorate the popover with an illustrated icon. You need to pass an `icon`\n * prop with the following constraints:\n * - string: The URL of the icon asset\n * - `<img>` or `<svg>`: Make sure to define a width\n *\n * When passing in a url for the `icon` prop, use the `iconAlt` prop to provide\n * alternative text for the icon if it communicates meaning.\n */\nexport const WithIcon: StoryComponentType = {\n    args: {\n        title: \"Popover with Icon\",\n        content: \"Popovers can include images on the left.\",\n        icon: <img src=\"./logo.svg\" width=\"100%\" alt=\"Wonder Blocks logo\" />,\n    },\n    render: (args) => <PopoverContent {...args} />,\n};\n\n/**\n * Use the `titleHeadingTag` prop to override the heading level of the popover\n * title. The default is `h4`. This does not affect the visual appearance of the title.\n */\nexport const WithTitleHeadingTag: StoryComponentType = {\n    args: {\n        title: \"Custom heading tag\",\n        content: \"This popover title is rendered as a custom heading tag.\",\n        titleHeadingTag: \"h2\",\n    },\n    render: (args) => <PopoverContent {...args} />,\n};\n\n/**\n * Call attention to the popover using a full-bleed illustration.\n */\nexport const WithIllustration: StoryComponentType = {\n    args: {\n        title: \"Popover with Illustration\",\n        content:\n            \"As you can see, this popover includes a full-bleed illustration.\",\n        image: (\n            <img\n                src=\"./illustration.svg\"\n                alt=\"An illustration of a person skating on a pencil\"\n                width={288}\n                height={200}\n            />\n        ),\n        closeButtonVisible: true,\n    },\n    render: (args) => <PopoverContent {...args} />,\n};\n"}},"packages-popover-popover":{"id":"packages-popover-popover","name":"Popover as unknown as React.ComponentType<any>","path":"./__docs__/wonder-blocks-popover/popover.stories.tsx","stories":[{"id":"packages-popover-popover--default","name":"Default","snippet":"const Default = () => <Popover as unknown as React.ComponentType<any> />;"},{"id":"packages-popover-popover--no-tail","name":"No Tail","snippet":"const NoTail = () => <Popover as unknown as React.ComponentType<any> />;","description":"No tail"},{"id":"packages-popover-popover--trigger-element","name":"Trigger Element","snippet":"const TriggerElement = () => (\n    <Popover\n        dismissEnabled={true}\n        content={\n            <PopoverContent\n                closeButtonVisible\n                title=\"Title\"\n                content=\"The popover content.\"\n                image={\n                    <img\n                        src=\"illustration.svg\"\n                        alt=\"An illustration of a person skating on a pencil\"\n                        width={288}\n                        height={200}\n                    />\n                }\n            />\n        }\n    >\n        {({open}) => <Button onClick={open}>Trigger element</Button>}\n    </Popover>\n);","description":"This example shows a popover adorning the same element that triggers it. This is accomplished by passing a function as children and using the `open` property passed it as the `onClick` handler on a button in this example. **NOTES:** - You will always need to add a trigger element inside the Popover to control when and/or from where to open the popover dialog. - For this example, if you use the `image` prop, make sure to avoid using `icon` at the same time. Doing so will throw an error."},{"id":"packages-popover-popover--dismiss-enabled","name":"Dismiss Enabled","snippet":"const DismissEnabled = () => <Popover as unknown as React.ComponentType<any> />;","description":"Povoper can be closed via light dismiss. This means that the popover will be closed under the following conditions: - Keyboard: The user presses `Esc`. - Click outside: The user clicks outside of the popover. - Focus out: The user tabs before the trigger element or after the last focusable element inside the popover. The `dismissEnabled` prop can be used to enable or disable light dismiss (default is `false`)."},{"id":"packages-popover-popover--controlled","name":"Controlled","snippet":"const Controlled = function Render() {\n    const [opened, setOpened] = React.useState(true);\n    return (\n        <View style={[styles.row, {gap: sizing.size_320}]}>\n            <Popover\n                opened={opened}\n                onClose={() => {\n                    setOpened(false);\n                }}\n                content={({close}) => (\n                    <PopoverContent\n                        title=\"Controlled popover\"\n                        content=\"This popover is controlled programatically. This means that is only displayed using the `opened` prop.\"\n                        actions={\n                            <Button\n                                onClick={() => {\n                                    close();\n                                }}\n                            >\n                                Click to close the popover\n                            </Button>\n                        }\n                    />\n                )}\n            >\n                <Button\n                    onClick={() =>\n                        // eslint-disable-next-line no-console\n                        console.log(\"This is a controlled popover.\")\n                    }\n                >\n                    Anchor element (it does not open the popover)\n                </Button>\n            </Popover>\n\n            <Button onClick={() => setOpened(true)}>\n                Outside button (click here to re-open the popover)\n            </Button>\n        </View>\n    );\n};","description":"Sometimes you'll want to trigger a popover programmatically. This can be done by setting the `opened` prop to `true`. In this situation the `Popover` is a controlled component. The parent is responsible for managing the opening/closing of the popover when using this prop. This means that you'll also have to update `opened` to `false` in response to the `onClose` callback being triggered. Here you can see as well how the focus is managed when a popover is opened. To see more details, please check the **Accesibility section**."},{"id":"packages-popover-popover--with-actions","name":"With Actions","snippet":"const WithActions = function Render() {\n    const [step, setStep] = React.useState(1);\n    const totalSteps = 5;\n\n    return (\n        <Popover\n            content={({close}) => (\n                <PopoverContent\n                    title=\"Popover with actions\"\n                    content=\"This example shows a popover which contains a set of actions that can be used to control the popover itself.\"\n                    actions={\n                        <View\n                            style={[\n                                styles.row,\n                                styles.actions,\n                                {gap: sizing.size_160},\n                            ]}\n                        >\n                            <BodyText weight=\"bold\">\n                                Step {step} of {totalSteps}\n                            </BodyText>\n                            <Button\n                                kind=\"tertiary\"\n                                onClick={() => {\n                                    if (step < totalSteps) {\n                                        setStep(step + 1);\n                                    } else {\n                                        close();\n                                    }\n                                }}\n                            >\n                                {step < totalSteps\n                                    ? \"Skip this step\"\n                                    : \"Finish\"}\n                            </Button>\n                        </View>\n                    }\n                />\n            )}\n            placement=\"top\"\n        >\n            <Button>Open popover with actions</Button>\n        </Popover>\n    );\n};","description":"Sometimes you need to add actions to be able to control the popover state. For this reason, you can make use of the `actions` prop:"},{"id":"packages-popover-popover--with-initial-focus-id","name":"With initialFocusId","snippet":"const WithInitialFocusId = () => <Popover as unknown as React.ComponentType<any> />;","description":"Sometimes, you may want a specific element inside the Popover to receive focus first. This can be done using the `initialFocusId` prop on the `Popover` component. Just pass in the ID of the element that should receive focus, and it will automatically receieve focus once the popover is displayed. In this example, the first button would have received the focus by default, but the second button receives focus instead since its ID is passed into the `initialFocusId` prop."},{"id":"packages-popover-popover--with-closed-focus-id","name":"With closedFocusId","snippet":"const WithClosedFocusId = () => (\n    <View style={{gap: 20}}>\n        <Button id=\"button-to-focus-on\">Focus here after close</Button>\n        <Popover\n            dismissEnabled={true}\n            closedFocusId=\"button-to-focus-on\"\n            content={\n                <PopoverContent\n                    closeButtonVisible={true}\n                    title=\"Returning focus to a specific element\"\n                    content='After dismissing the popover, the focus will be set on the button labeled \"Focus here after close.\"'\n                />\n            }\n        >\n            <Button>Open popover</Button>\n        </Popover>\n    </View>\n);","description":"You can use the `closedFocusId` prop on the `Popover` component to specify where to set the focus after the popover dialog has been closed. This is useful for cases when you need to return the focus to a specific element. In this example, `closedFocusId` is set to the ID of the button labeled \"Focus here after close.\", and it means that the focus will be set on that button after the popover dialog has been closed/dismissed."},{"id":"packages-popover-popover--custom-popover-content","name":"Custom Popover Content","snippet":"const CustomPopoverContent = () => <Popover as unknown as React.ComponentType<any> />;","description":"Popovers can have custom layouts. This is done by using the `PopoverContentCore` component. _NOTE:_ If you choose to use this component, you'll have to set the `aria-labelledby` and `aria-describedby` attributes manually. Make sure to pass the `id` prop to the `Popover` component and use it as the value for these attributes. Also, make sure to assign the `${id}-title` prop to the `title` element and `${id}-content` prop to the `content` element."},{"id":"packages-popover-popover--keyboard-navigation","name":"Keyboard Navigation","snippet":"const KeyboardNavigation = function Render() {\n    const [numButtonsAfter, setNumButtonsAfter] = React.useState(0);\n    const [numButtonsInside, setNumButtonsInside] = React.useState(1);\n\n    return (\n        <View>\n            <View style={[styles.row, {gap: sizing.size_160}]}>\n                <Button\n                    kind=\"secondary\"\n                    onClick={() => {\n                        setNumButtonsAfter(numButtonsAfter + 1);\n                    }}\n                >\n                    Add button after trigger element\n                </Button>\n                <Button\n                    kind=\"secondary\"\n                    actionType=\"destructive\"\n                    onClick={() => {\n                        if (numButtonsAfter > 0) {\n                            setNumButtonsAfter(numButtonsAfter - 1);\n                        }\n                    }}\n                >\n                    Remove button after trigger element\n                </Button>\n                <Button\n                    kind=\"secondary\"\n                    onClick={() => {\n                        setNumButtonsInside(numButtonsInside + 1);\n                    }}\n                >\n                    Add button inside popover\n                </Button>\n                <Button\n                    kind=\"secondary\"\n                    actionType=\"destructive\"\n                    onClick={() => {\n                        if (numButtonsAfter > 0) {\n                            setNumButtonsInside(numButtonsInside - 1);\n                        }\n                    }}\n                >\n                    Remove button inside popover\n                </Button>\n            </View>\n            <View style={styles.playground}>\n                <Button>First button</Button>\n                <Popover\n                    content={({close}) => (\n                        <PopoverContent\n                            closeButtonVisible\n                            title=\"Keyboard navigation\"\n                            content=\"This example shows how the focus is managed when a popover is opened.\"\n                            actions={\n                                <View style={[styles.row, styles.actions]}>\n                                    {Array.from(\n                                        {length: numButtonsInside},\n                                        (_, index) => (\n                                            <Button\n                                                onClick={() => {}}\n                                                key={index}\n                                                kind=\"tertiary\"\n                                            >\n                                                {`Button ${index + 1}`}\n                                            </Button>\n                                        ),\n                                    )}\n                                </View>\n                            }\n                        />\n                    )}\n                    placement=\"top\"\n                >\n                    <Button>Open popover (trigger element)</Button>\n                </Popover>\n                {Array.from({length: numButtonsAfter}, (_, index) => (\n                    <Button onClick={() => {}} key={index}>\n                        {`Button ${index + 1}`}\n                    </Button>\n                ))}\n            </View>\n        </View>\n    );\n};","description":"This example shows how the focus is managed when a popover is opened. If the popover is closed, the focus flows naturally. However, if the popover is opened, the focus is managed internally by the `Popover` component. The focus is managed in the following way: - When the popover is opened, the focus is set on the first focusable element inside the popover. - When the popover is closed, the focus is returned to the element that triggered the popover. - If the popover is opened and the focus reaches the last focusable element inside the popover, the next tab will set focus on the next focusable element that exists after the PopoverAnchor (or trigger element). - If the focus is set to the first focusable element inside the popover, the next shift + tab will set focus on the PopoverAnchor element. - If you have custom keyboard navigation (like with left and right arrow keys) popover won't override them **NOTE:** You can add/remove buttons after the trigger element by using the buttons at the top of the example."},{"id":"packages-popover-popover--custom-keyboard-navigation","name":"Custom Keyboard Navigation","snippet":"const CustomKeyboardNavigation = function Render() {\n    const [numButtonsAfter, setNumButtonsAfter] = React.useState(0);\n    const [numButtonsInside, setNumButtonsInside] = React.useState(1);\n\n    const [focus, setFocus] = React.useState(0);\n\n    /**\n     * Custom function to create arrow key navigation to highlight how\n     * popover won't override internal custom navigation but still ensure\n     * users will focus in and out of the popover correctly.\n     * @param e - onKeyDown event data.\n     */\n    const onArrowKeyFocus = (e: any) => {\n        if (e.keyCode === 39) {\n            // Right arrow\n            setFocus(focus === numButtonsInside - 1 ? 0 : focus + 1);\n        } else if (e.keyCode === 37) {\n            // Left arrow\n            setFocus(focus === 0 ? numButtonsInside - 1 : focus - 1);\n        }\n    };\n\n    return (\n        <View style={[{paddingBlock: \"120px\", paddingInline: \"0\"}]}>\n            <View style={[styles.row, {gap: sizing.size_160}]}>\n                <Button\n                    kind=\"secondary\"\n                    onClick={() => {\n                        setNumButtonsAfter(numButtonsAfter + 1);\n                    }}\n                >\n                    Add button after trigger element\n                </Button>\n                <Button\n                    kind=\"secondary\"\n                    actionType=\"destructive\"\n                    onClick={() => {\n                        if (numButtonsAfter > 0) {\n                            setNumButtonsAfter(numButtonsAfter - 1);\n                        }\n                    }}\n                >\n                    Remove button after trigger element\n                </Button>\n                <Button\n                    kind=\"secondary\"\n                    onClick={() => {\n                        setNumButtonsInside(numButtonsInside + 1);\n                    }}\n                >\n                    Add button inside popover\n                </Button>\n                <Button\n                    kind=\"secondary\"\n                    actionType=\"destructive\"\n                    onClick={() => {\n                        if (numButtonsAfter > 0) {\n                            setNumButtonsInside(numButtonsInside - 1);\n                        }\n                    }}\n                >\n                    Remove button inside popover\n                </Button>\n            </View>\n            <View style={styles.playground}>\n                <Button>First button</Button>\n                <Popover\n                    portal={false}\n                    content={({close}) => (\n                        <PopoverContent\n                            closeButtonVisible\n                            title=\"Keyboard navigation\"\n                            content=\"This example shows how the focus is managed when a popover is opened.\"\n                            actions={\n                                <View\n                                    style={[styles.row, styles.actions]}\n                                    onKeyDown={onArrowKeyFocus}\n                                >\n                                    {Array.from(\n                                        {length: numButtonsInside},\n                                        (_, index) => (\n                                            <ArrowButton\n                                                onClick={() => {}}\n                                                index={index}\n                                                focus={index === focus}\n                                            />\n                                        ),\n                                    )}\n                                </View>\n                            }\n                        />\n                    )}\n                    placement=\"top\"\n                >\n                    <Button>Open popover (trigger element)</Button>\n                </Popover>\n                {Array.from({length: numButtonsAfter}, (_, index) => (\n                    <Button onClick={() => {}} key={index}>\n                        {`Button ${index + 1}`}\n                    </Button>\n                ))}\n            </View>\n        </View>\n    );\n};","description":"Similar example to KeyboardNavigation except this one highlights how popover does not override custom keyboard interactions for content inside the popover. NOTE: To see the arrow key navigation, add additional buttons to the popover container."},{"id":"packages-popover-popover--popover-alignment","name":"Popover Alignment","snippet":"const PopoverAlignment = () => (\n    <View style={styles.container}>\n        <BasePopoverExample placement=\"right\" />\n        <BasePopoverExample placement=\"bottom\" />\n        <BasePopoverExample placement=\"top\" />\n        <BasePopoverExample placement=\"left\" />\n    </View>\n);"},{"id":"packages-popover-popover--with-document-root-boundary","name":"With Document Root Boundary","snippet":"const WithDocumentRootBoundary = () => {\n    return (\n        <View style={{paddingBlockEnd: \"500px\"}}>\n            <Popover\n                rootBoundary=\"document\"\n                content={() => (\n                    <PopoverContent\n                        title=\"Popover with rootBoundary='document'\"\n                        content=\"This example shows a popover with the rootBoundary='document'. This means that instead of aligning the popover to the viewport, it will instead place the popover where there is room in the DOM. This is a useful tool for popovers with large content that might not fit in small screen sizes or at 400% zoom.\"\n                    />\n                )}\n                placement=\"top\"\n            >\n                <Button>Open popover with document rootBoundary</Button>\n            </Popover>\n        </View>\n    );\n};","description":"Sometimes you need to change the underlining behavior to position the Popover by the whole webpage (document) instead of by the viewport. This is a useful tool for popovers with large content that might not fit in small screen sizes or at 400% zoom. For this reason, you can make use of the \\`rootBoundary\\` prop:"},{"id":"packages-popover-popover--with-custom-aria-label","name":"With Custom Aria Label","snippet":"const WithCustomAriaLabel = () => <Popover as unknown as React.ComponentType<any> />;","description":"With custom aria-label - overrides the default aria-labelledby"},{"id":"packages-popover-popover--with-custom-aria-described-by","name":"With Custom Aria Described By","snippet":"const WithCustomAriaDescribedBy = function Render() {\n    const [opened, setOpened] = React.useState(false);\n\n    return (\n        <View style={styles.example}>\n            <Popover\n                aria-describedby=\"custom-popover-description\"\n                placement=\"bottom\"\n                opened={opened}\n                onClose={() => setOpened(false)}\n                content={\n                    <>\n                        <Heading\n                            size=\"large\"\n                            id=\"custom-popover-description\"\n                            style={styles.srOnly}\n                        >\n                            Hidden text that would describe the popover\n                            content\n                        </Heading>\n                        <PopoverContent\n                            title=\"Title\"\n                            content=\"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip commodo.\"\n                            closeButtonVisible\n                        />\n                    </>\n                }\n            >\n                <Button\n                    onClick={() => {\n                        setOpened(true);\n                    }}\n                >\n                    {`Open popover`}\n                </Button>\n            </Popover>\n        </View>\n    );\n};","description":"With custom aria-describedby - overrides the default aria-describedby"},{"id":"packages-popover-popover--with-title-heading-tag","name":"With Title Heading Tag","snippet":"const WithTitleHeadingTag = function Render() {\n    const [opened, setOpened] = React.useState(false);\n    return (\n        <Popover\n            opened={opened}\n            onClose={() => setOpened(false)}\n            content={\n                <PopoverContent\n                    titleHeadingTag=\"h2\"\n                    title=\"Title rendered as h2\"\n                    content=\"This popover title is rendered as an h2 element instead of the default h4. This does not affect the visual appearance of the title.\"\n                    closeButtonVisible\n                />\n            }\n        >\n            <Button onClick={() => setOpened(true)}>\n                Open popover with h2 title\n            </Button>\n        </Popover>\n    );\n};","description":"The `titleHeadingTag` prop allows customizing the heading level used for the popover title. It defaults to `\"h4\"`. This does not affect the visual appearance of the title."},{"id":"packages-popover-popover--in-corners","name":"In Corners","snippet":"const InCorners = function Render(args) {\n    const PopoverInCorner = () => {\n        const [opened, setOpened] = React.useState(true);\n        return (\n            <Popover\n                {...args}\n                content={\n                    <PopoverContent\n                        closeButtonVisible\n                        content=\"The default version only includes text.\"\n                        title=\"A simple popover\"\n                    />\n                }\n                dismissEnabled\n                onClose={() => setOpened(false)}\n                opened={opened}\n            >\n                <Button onClick={() => setOpened(true)}>\n                    Open default popover\n                </Button>\n            </Popover>\n        );\n    };\n    return (\n        <View\n            style={{\n                height: \"80vh\",\n                width: \"100vw\",\n                justifyContent: \"space-between\",\n            }}\n        >\n            <View\n                style={{\n                    flexDirection: \"row\",\n                    justifyContent: \"space-between\",\n                }}\n            >\n                <PopoverInCorner />\n                <PopoverInCorner />\n            </View>\n            <View\n                style={{\n                    flexDirection: \"row\",\n                    justifyContent: \"space-between\",\n                }}\n            >\n                <PopoverInCorner />\n                <PopoverInCorner />\n            </View>\n        </View>\n    );\n};","description":"If the Popover is placed near the edge of the viewport, default spacing of 12px is applied to provide spacing between the Popover and the viewport. This spacing value can be overridden using the `viewportPadding` prop. Note: The `viewportPadding` prop is only applied when `rootBoundary` is `viewport`."},{"id":"packages-popover-popover--auto-update","name":"Auto Update","snippet":"const AutoUpdate = () => {\n    const [position, setPosition] = React.useState<{\n        x: number;\n        y: number;\n    } | null>(null);\n\n    return (\n        <View style={{position: \"relative\"}}>\n            <Button\n                onClick={() => {\n                    setPosition({\n                        x: Math.floor(Math.random() * 200),\n                        y: Math.floor(Math.random() * 200),\n                    });\n                }}>Click to update trigger position (randomly)\n                                </Button>\n            <Popover\n                content={\n                    <PopoverContent\n                        content=\"This is a popover that auto-updates its position when the trigger element changes.\"\n                        title=\"Popover with autoUpdate=true\"\n                    />\n                }\n                opened={true}\n                autoUpdate={true}>\n                <Button\n                    kind=\"tertiary\"\n                    style={\n                        position && {\n                            position: \"absolute\",\n                            insetBlockStart: position.y,\n                            insetInlineStart: position.x,\n                        }\n                    }>Trigger element\n                                        </Button>\n            </Popover>\n        </View>\n    );\n};","description":"Popover by default (and for performance reasons) only updates its position under the following conditions: 1. When the window is resized. 2. When the scroll position changes. However, there are cases where you might want the tooltip to update its position when the trigger element changes. This can be done by setting the `autoUpdate` prop to `true`."}],"import":"import { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo } from \"wonder-blocks\";\nimport { Popover, PopoverContent } from \"@khanacademy/wonder-blocks-popover\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Popover as unknown as React.ComponentType<any>\" component.\n  40 |  * ```\n  41 |  */\n> 42 | export default {\n     | ^\n  43 |     title: \"Packages / Popover / Popover\",\n  44 |     component: Popover as unknown as React.ComponentType<any>,\n  45 |     argTypes: PopoverArgtypes,\n\n./__docs__/wonder-blocks-popover/popover.stories.tsx:\n/* eslint-disable max-lines */\n\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText, Heading} from \"@khanacademy/wonder-blocks-typography\";\nimport type {Placement} from \"@khanacademy/wonder-blocks-tooltip\";\n\nimport {Popover, PopoverContent} from \"@khanacademy/wonder-blocks-popover\";\nimport packageConfig from \"../../packages/wonder-blocks-popover/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport PopoverArgtypes, {ContentMappings} from \"./popover.argtypes\";\n\n/**\n * Popovers provide additional information that is related to a particular\n * element and/or content. They can include text, links, icons and\n * illustrations. The main difference with `Tooltip` is that they must be\n * dismissed by clicking an element.\n *\n * This component uses the `PopoverPopper` component to position the\n * `PopoverContentCore` component according to the children it is wrapping.\n *\n * ### Usage\n *\n * ```jsx\n * import {Popover, PopoverContent} from \"@khanacademy/wonder-blocks-popover\";\n *\n * <Popover\n *  onClose={() => {}}\n *  content={\n *      <PopoverContent title=\"Title\" content=\"Some content\" closeButtonVisible />\n *  }>\n *      <Button>Open popover</Button>\n *  </Popover>\n * ```\n */\nexport default {\n    title: \"Packages / Popover / Popover\",\n    component: Popover as unknown as React.ComponentType<any>,\n    argTypes: PopoverArgtypes,\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        chromatic: {\n            // Disabling most snapshots in favour of statesheet. Explicitly\n            // enabling snapshots for specific stories.\n            disableSnapshot: true,\n        },\n    },\n    decorators: [\n        (Story): React.ReactElement<React.ComponentProps<typeof View>> => (\n            <View style={styles.example}>{Story()}</View>\n        ),\n    ],\n} as Meta<typeof Popover>;\n\nconst styles = StyleSheet.create({\n    container: {\n        display: \"grid\",\n        gridTemplateColumns: \"repeat(2, 1fr)\",\n        height: `calc(100vh - 16px)`,\n        width: \"100vw\",\n    },\n    example: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n    row: {\n        flexDirection: \"row\",\n    },\n    actions: {\n        alignItems: \"center\",\n        flex: 1,\n        justifyContent: \"space-between\",\n    },\n    playground: {\n        border: `1px dashed ${semanticColor.core.border.neutral.subtle}`,\n        marginBlockStart: sizing.size_240,\n        padding: sizing.size_240,\n        flexDirection: \"row\",\n        gap: sizing.size_160,\n    },\n    srOnly: {\n        border: 0,\n        clip: \"rect(0,0,0,0)\",\n        height: 1,\n        margin: -1,\n        overflow: \"hidden\",\n        padding: 0,\n        position: \"absolute\",\n        width: 1,\n    },\n});\n\ntype StoryComponentType = StoryObj<typeof Popover>;\n\n// NOTE: Adding arg types to be able to use the union types defined by the\n// component.\ntype PopoverArgs = Partial<typeof Popover>;\n\nexport const Default: StoryComponentType = {\n    args: {\n        children: <Button>Open default popover</Button>,\n        content: ContentMappings.withTextOnly,\n        placement: \"top\",\n        dismissEnabled: true,\n        id: \"\",\n        initialFocusId: \"\",\n        testId: \"\",\n        onClose: () => {},\n    } as PopoverArgs,\n};\n\n/**\n * No tail\n */\nexport const NoTail: StoryComponentType = {\n    args: {\n        children: <Button>Open popover without tail</Button>,\n        content: (\n            <PopoverContent\n                closeButtonVisible\n                title=\"Title\"\n                content=\"The popover content. This popover does not have a tail.\"\n            />\n        ),\n\n        placement: \"top\",\n        dismissEnabled: true,\n        id: \"\",\n        initialFocusId: \"\",\n        testId: \"\",\n        onClose: () => {},\n        showTail: false,\n    } as PopoverArgs,\n};\n\n/**\n * This example shows a popover adorning the same element that triggers it. This\n * is accomplished by passing a function as children and using the `open`\n * property passed it as the `onClick` handler on a button in this example.\n *\n * **NOTES:**\n * - You will always need to add a trigger element inside the Popover to control\n *   when and/or from where to open the popover dialog.\n * - For this example, if you use the `image` prop, make sure to avoid using\n *   `icon` at the same time. Doing so will throw an error.\n */\nexport const TriggerElement: StoryComponentType = {\n    render: () => (\n        <Popover\n            dismissEnabled={true}\n            content={\n                <PopoverContent\n                    closeButtonVisible\n                    title=\"Title\"\n                    content=\"The popover content.\"\n                    image={\n                        <img\n                            src=\"illustration.svg\"\n                            alt=\"An illustration of a person skating on a pencil\"\n                            width={288}\n                            height={200}\n                        />\n                    }\n                />\n            }\n        >\n            {({open}) => <Button onClick={open}>Trigger element</Button>}\n        </Popover>\n    ),\n};\n\n/**\n * Povoper can be closed via light dismiss. This means that the popover will be\n * closed under the following conditions:\n * - Keyboard: The user presses `Esc`.\n * - Click outside: The user clicks outside of the popover.\n * - Focus out: The user tabs before the trigger element or after the last\n *   focusable element inside the popover.\n *\n * The `dismissEnabled` prop can be used to enable or disable light dismiss\n * (default is `false`).\n */\nexport const DismissEnabled: StoryComponentType = {\n    args: {\n        dismissEnabled: true,\n        children: <Button>Open popover with light dismiss</Button>,\n        content: (\n            <PopoverContent\n                closeButtonVisible\n                title=\"Title\"\n                content=\"The popover content. This popover has light dismiss enabled.\"\n                actions={\n                    <View style={[styles.row, {gap: sizing.size_160}]}>\n                        <Button kind=\"tertiary\" onClick={() => {}}>\n                            Action 1\n                        </Button>\n                        <Button kind=\"tertiary\" onClick={() => {}}>\n                            Action 2\n                        </Button>\n                    </View>\n                }\n            />\n        ),\n    } as PopoverArgs,\n};\n\n/**\n * Sometimes you'll want to trigger a popover programmatically. This can be done\n * by setting the `opened` prop to `true`. In this situation the `Popover` is a\n * controlled component. The parent is responsible for managing the\n * opening/closing of the popover when using this prop. This means that you'll\n * also have to update `opened` to `false` in response to the `onClose` callback\n * being triggered.\n *\n * Here you can see as well how the focus is managed when a popover is opened.\n * To see more details, please check the **Accesibility section**.\n */\nexport const Controlled: StoryComponentType = {\n    render: function Render() {\n        const [opened, setOpened] = React.useState(true);\n        return (\n            <View style={[styles.row, {gap: sizing.size_320}]}>\n                <Popover\n                    opened={opened}\n                    onClose={() => {\n                        setOpened(false);\n                    }}\n                    content={({close}) => (\n                        <PopoverContent\n                            title=\"Controlled popover\"\n                            content=\"This popover is controlled programatically. This means that is only displayed using the `opened` prop.\"\n                            actions={\n                                <Button\n                                    onClick={() => {\n                                        close();\n                                    }}\n                                >\n                                    Click to close the popover\n                                </Button>\n                            }\n                        />\n                    )}\n                >\n                    <Button\n                        onClick={() =>\n                            // eslint-disable-next-line no-console\n                            console.log(\"This is a controlled popover.\")\n                        }\n                    >\n                        Anchor element (it does not open the popover)\n                    </Button>\n                </Popover>\n\n                <Button onClick={() => setOpened(true)}>\n                    Outside button (click here to re-open the popover)\n                </Button>\n            </View>\n        );\n    },\n};\n\n/**\n * Sometimes you need to add actions to be able to control the popover state.\n * For this reason, you can make use of the `actions` prop:\n */\nexport const WithActions: StoryComponentType = {\n    render: function Render() {\n        const [step, setStep] = React.useState(1);\n        const totalSteps = 5;\n\n        return (\n            <Popover\n                content={({close}) => (\n                    <PopoverContent\n                        title=\"Popover with actions\"\n                        content=\"This example shows a popover which contains a set of actions that can be used to control the popover itself.\"\n                        actions={\n                            <View\n                                style={[\n                                    styles.row,\n                                    styles.actions,\n                                    {gap: sizing.size_160},\n                                ]}\n                            >\n                                <BodyText weight=\"bold\">\n                                    Step {step} of {totalSteps}\n                                </BodyText>\n                                <Button\n                                    kind=\"tertiary\"\n                                    onClick={() => {\n                                        if (step < totalSteps) {\n                                            setStep(step + 1);\n                                        } else {\n                                            close();\n                                        }\n                                    }}\n                                >\n                                    {step < totalSteps\n                                        ? \"Skip this step\"\n                                        : \"Finish\"}\n                                </Button>\n                            </View>\n                        }\n                    />\n                )}\n                placement=\"top\"\n            >\n                <Button>Open popover with actions</Button>\n            </Popover>\n        );\n    },\n};\n\n/**\n * Sometimes, you may want a specific element inside the Popover to receive\n * focus first. This can be done using the `initialFocusId` prop on the\n * `Popover` component. Just pass in the ID of the element that should receive\n * focus, and it will automatically receieve focus once the popover is\n * displayed.\n *\n * In this example, the first button would have received the focus by default,\n * but the second button receives focus instead since its ID is passed into the\n * `initialFocusId` prop.\n */\nexport const WithInitialFocusId: StoryComponentType = {\n    name: \"With initialFocusId\",\n    args: {\n        children: (\n            <Button>\n                Open with initial focus on the &quot;It is focused!&quot; button\n            </Button>\n        ),\n        content: (\n            <PopoverContent\n                title=\"\n            Setting initialFocusId\"\n                content=\"The focus will be set on the second button\"\n                actions={\n                    <View style={[styles.row, {gap: sizing.size_160}]}>\n                        <Button kind=\"tertiary\" id=\"popover-button-1\">\n                            No focus\n                        </Button>\n                        <Button kind=\"tertiary\" id=\"popover-button-2\">\n                            It is focused!\n                        </Button>\n                    </View>\n                }\n            />\n        ),\n        placement: \"top\",\n        dismissEnabled: true,\n        initialFocusId: \"popover-button-2\",\n    } as PopoverArgs,\n};\n\n/**\n * You can use the `closedFocusId` prop on the `Popover` component to specify\n * where to set the focus after the popover dialog has been closed. This is\n * useful for cases when you need to return the focus to a specific element.\n *\n * In this example, `closedFocusId` is set to the ID of the button labeled\n * \"Focus here after close.\", and it means that the focus will be set on that\n * button after the popover dialog has been closed/dismissed.\n */\nexport const WithClosedFocusId: StoryComponentType = {\n    name: \"With closedFocusId\",\n    render: () => (\n        <View style={{gap: 20}}>\n            <Button id=\"button-to-focus-on\">Focus here after close</Button>\n            <Popover\n                dismissEnabled={true}\n                closedFocusId=\"button-to-focus-on\"\n                content={\n                    <PopoverContent\n                        closeButtonVisible={true}\n                        title=\"Returning focus to a specific element\"\n                        content='After dismissing the popover, the focus will be set on the button labeled \"Focus here after close.\"'\n                    />\n                }\n            >\n                <Button>Open popover</Button>\n            </Popover>\n        </View>\n    ),\n};\n\n/**\n * Popovers can have custom layouts. This is done by using the\n * `PopoverContentCore` component.\n *\n * _NOTE:_ If you choose to use this component, you'll have to set the\n * `aria-labelledby` and `aria-describedby` attributes manually. Make sure to\n * pass the `id` prop to the `Popover` component and use it as the value for\n * these attributes. Also, make sure to assign the `${id}-title` prop to the\n * `title` element and `${id}-content` prop to the `content` element.\n */\nexport const CustomPopoverContent: StoryComponentType = {\n    args: {\n        children: <Button>Open custom popover</Button>,\n        content: ContentMappings.coreWithIcon,\n        id: \"custom-popover\",\n    } as PopoverArgs,\n};\n\n/**\n * This example shows how the focus is managed when a popover is opened. If the\n * popover is closed, the focus flows naturally. However, if the popover is\n * opened, the focus is managed internally by the `Popover` component.\n *\n * The focus is managed in the following way:\n * - When the popover is opened, the focus is set on the first focusable element\n *  inside the popover.\n * - When the popover is closed, the focus is returned to the element that\n * triggered the popover.\n * - If the popover is opened and the focus reaches the last focusable element\n * inside the popover, the next tab will set focus on the next focusable\n * element that exists after the PopoverAnchor (or trigger element).\n * - If the focus is set to the first focusable element inside the popover, the\n * next shift + tab will set focus on the PopoverAnchor element.\n * - If you have custom keyboard navigation (like with left and right arrow keys)\n * popover won't override them\n *\n * **NOTE:** You can add/remove buttons after the trigger element by using the\n * buttons at the top of the example.\n */\nexport const KeyboardNavigation: StoryComponentType = {\n    render: function Render() {\n        const [numButtonsAfter, setNumButtonsAfter] = React.useState(0);\n        const [numButtonsInside, setNumButtonsInside] = React.useState(1);\n\n        return (\n            <View>\n                <View style={[styles.row, {gap: sizing.size_160}]}>\n                    <Button\n                        kind=\"secondary\"\n                        onClick={() => {\n                            setNumButtonsAfter(numButtonsAfter + 1);\n                        }}\n                    >\n                        Add button after trigger element\n                    </Button>\n                    <Button\n                        kind=\"secondary\"\n                        actionType=\"destructive\"\n                        onClick={() => {\n                            if (numButtonsAfter > 0) {\n                                setNumButtonsAfter(numButtonsAfter - 1);\n                            }\n                        }}\n                    >\n                        Remove button after trigger element\n                    </Button>\n                    <Button\n                        kind=\"secondary\"\n                        onClick={() => {\n                            setNumButtonsInside(numButtonsInside + 1);\n                        }}\n                    >\n                        Add button inside popover\n                    </Button>\n                    <Button\n                        kind=\"secondary\"\n                        actionType=\"destructive\"\n                        onClick={() => {\n                            if (numButtonsAfter > 0) {\n                                setNumButtonsInside(numButtonsInside - 1);\n                            }\n                        }}\n                    >\n                        Remove button inside popover\n                    </Button>\n                </View>\n                <View style={styles.playground}>\n                    <Button>First button</Button>\n                    <Popover\n                        content={({close}) => (\n                            <PopoverContent\n                                closeButtonVisible\n                                title=\"Keyboard navigation\"\n                                content=\"This example shows how the focus is managed when a popover is opened.\"\n                                actions={\n                                    <View style={[styles.row, styles.actions]}>\n                                        {Array.from(\n                                            {length: numButtonsInside},\n                                            (_, index) => (\n                                                <Button\n                                                    onClick={() => {}}\n                                                    key={index}\n                                                    kind=\"tertiary\"\n                                                >\n                                                    {`Button ${index + 1}`}\n                                                </Button>\n                                            ),\n                                        )}\n                                    </View>\n                                }\n                            />\n                        )}\n                        placement=\"top\"\n                    >\n                        <Button>Open popover (trigger element)</Button>\n                    </Popover>\n                    {Array.from({length: numButtonsAfter}, (_, index) => (\n                        <Button onClick={() => {}} key={index}>\n                            {`Button ${index + 1}`}\n                        </Button>\n                    ))}\n                </View>\n            </View>\n        );\n    },\n};\n\n/**\n * Similar example to KeyboardNavigation except this one highlights\n * how popover does not override custom keyboard interactions for\n * content inside the popover.\n *\n * NOTE: To see the arrow key navigation, add additional buttons to\n * the popover container.\n */\nexport const CustomKeyboardNavigation: StoryComponentType = {\n    render: function Render() {\n        const [numButtonsAfter, setNumButtonsAfter] = React.useState(0);\n        const [numButtonsInside, setNumButtonsInside] = React.useState(1);\n\n        const [focus, setFocus] = React.useState(0);\n\n        /**\n         * Custom function to create arrow key navigation to highlight how\n         * popover won't override internal custom navigation but still ensure\n         * users will focus in and out of the popover correctly.\n         * @param e - onKeyDown event data.\n         */\n        const onArrowKeyFocus = (e: any) => {\n            if (e.keyCode === 39) {\n                // Right arrow\n                setFocus(focus === numButtonsInside - 1 ? 0 : focus + 1);\n            } else if (e.keyCode === 37) {\n                // Left arrow\n                setFocus(focus === 0 ? numButtonsInside - 1 : focus - 1);\n            }\n        };\n\n        return (\n            <View style={[{paddingBlock: \"120px\", paddingInline: \"0\"}]}>\n                <View style={[styles.row, {gap: sizing.size_160}]}>\n                    <Button\n                        kind=\"secondary\"\n                        onClick={() => {\n                            setNumButtonsAfter(numButtonsAfter + 1);\n                        }}\n                    >\n                        Add button after trigger element\n                    </Button>\n                    <Button\n                        kind=\"secondary\"\n                        actionType=\"destructive\"\n                        onClick={() => {\n                            if (numButtonsAfter > 0) {\n                                setNumButtonsAfter(numButtonsAfter - 1);\n                            }\n                        }}\n                    >\n                        Remove button after trigger element\n                    </Button>\n                    <Button\n                        kind=\"secondary\"\n                        onClick={() => {\n                            setNumButtonsInside(numButtonsInside + 1);\n                        }}\n                    >\n                        Add button inside popover\n                    </Button>\n                    <Button\n                        kind=\"secondary\"\n                        actionType=\"destructive\"\n                        onClick={() => {\n                            if (numButtonsAfter > 0) {\n                                setNumButtonsInside(numButtonsInside - 1);\n                            }\n                        }}\n                    >\n                        Remove button inside popover\n                    </Button>\n                </View>\n                <View style={styles.playground}>\n                    <Button>First button</Button>\n                    <Popover\n                        portal={false}\n                        content={({close}) => (\n                            <PopoverContent\n                                closeButtonVisible\n                                title=\"Keyboard navigation\"\n                                content=\"This example shows how the focus is managed when a popover is opened.\"\n                                actions={\n                                    <View\n                                        style={[styles.row, styles.actions]}\n                                        onKeyDown={onArrowKeyFocus}\n                                    >\n                                        {Array.from(\n                                            {length: numButtonsInside},\n                                            (_, index) => (\n                                                <ArrowButton\n                                                    onClick={() => {}}\n                                                    index={index}\n                                                    focus={index === focus}\n                                                />\n                                            ),\n                                        )}\n                                    </View>\n                                }\n                            />\n                        )}\n                        placement=\"top\"\n                    >\n                        <Button>Open popover (trigger element)</Button>\n                    </Popover>\n                    {Array.from({length: numButtonsAfter}, (_, index) => (\n                        <Button onClick={() => {}} key={index}>\n                            {`Button ${index + 1}`}\n                        </Button>\n                    ))}\n                </View>\n            </View>\n        );\n    },\n};\n\ntype ArrowButtonProps = {\n    onClick: () => void;\n    focus?: boolean;\n    index: number;\n};\n\nfunction ArrowButton(props: ArrowButtonProps): React.ReactElement {\n    const {onClick, focus, index} = props;\n    const tabRef = React.useRef(null);\n\n    React.useEffect(() => {\n        if (focus) {\n            /**\n             * When tabs are within a WonderBlocks Popover component, the\n             * manner in which the component is rendered and moved causes\n             * focus to snap to the bottom of the page on first focus.\n             *\n             * This timeout moves around that by delaying the focus enough\n             * to wait for the WonderBlock Popover to move to the correct\n             * location and scroll the user to the correct location.\n             * */\n            if (tabRef?.current) {\n                // Move element into view when it is focused\n                // @ts-expect-error - TS2339 - Property 'focus' does not exist on type 'ReactInstance'.\n                tabRef?.current.focus();\n            }\n        }\n    }, [focus, tabRef]);\n\n    return (\n        <Button\n            onClick={onClick}\n            ref={tabRef}\n            key={index}\n            kind=\"tertiary\"\n            tabIndex={focus ? 0 : -1}\n        >\n            {`Arrow Button ${index + 1}`}\n        </Button>\n    );\n}\n\n/**\n * Alignment example\n */\nconst BasePopoverExample = ({placement}: {placement: Placement}) => {\n    const [opened, setOpened] = React.useState(true);\n    return (\n        <View style={styles.example}>\n            <Popover\n                placement={placement}\n                opened={opened}\n                onClose={() => setOpened(false)}\n                content={\n                    <PopoverContent\n                        title=\"Title\"\n                        content=\"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip commodo.\"\n                        closeButtonVisible\n                    />\n                }\n            >\n                <Button\n                    onClick={() => {\n                        setOpened(true);\n                    }}\n                >\n                    {`Open popover: ${placement}`}\n                </Button>\n            </Popover>\n        </View>\n    );\n};\n\nexport const PopoverAlignment: StoryComponentType = {\n    render: () => (\n        <View style={styles.container}>\n            <BasePopoverExample placement=\"right\" />\n            <BasePopoverExample placement=\"bottom\" />\n            <BasePopoverExample placement=\"top\" />\n            <BasePopoverExample placement=\"left\" />\n        </View>\n    ),\n    parameters: {\n        chromatic: {\n            // Include snapshot for alignment examples\n            disableSnapshot: false,\n        },\n    },\n};\n\n/**\n * Sometimes you need to change the underlining behavior to position the Popover\n * by the whole webpage (document) instead of by the viewport. This is a useful\n * tool for popovers with large content that might not fit in small screen sizes\n * or at 400% zoom. For this reason, you can make use of the \\`rootBoundary\\`\n * prop:\n */\nexport const WithDocumentRootBoundary: StoryComponentType = {\n    render: () => {\n        return (\n            <View style={{paddingBlockEnd: \"500px\"}}>\n                <Popover\n                    rootBoundary=\"document\"\n                    content={() => (\n                        <PopoverContent\n                            title=\"Popover with rootBoundary='document'\"\n                            content=\"This example shows a popover with the rootBoundary='document'. This means that instead of aligning the popover to the viewport, it will instead place the popover where there is room in the DOM. This is a useful tool for popovers with large content that might not fit in small screen sizes or at 400% zoom.\"\n                        />\n                    )}\n                    placement=\"top\"\n                >\n                    <Button>Open popover with document rootBoundary</Button>\n                </Popover>\n            </View>\n        );\n    },\n};\n\n/**\n * With custom aria-label - overrides the default aria-labelledby\n */\nexport const WithCustomAriaLabel: StoryComponentType = {\n    args: {\n        children: <Button>Open popover</Button>,\n        content: ContentMappings.withTextOnly,\n        placement: \"top\",\n        dismissEnabled: true,\n        id: \"\",\n        initialFocusId: \"\",\n        testId: \"\",\n        onClose: () => {},\n        \"aria-label\": \"Popover with custom aria label\",\n    } as PopoverArgs,\n};\n\n/**\n * With custom aria-describedby - overrides the default aria-describedby\n */\nexport const WithCustomAriaDescribedBy: StoryComponentType = {\n    render: function Render() {\n        const [opened, setOpened] = React.useState(false);\n\n        return (\n            <View style={styles.example}>\n                <Popover\n                    aria-describedby=\"custom-popover-description\"\n                    placement=\"bottom\"\n                    opened={opened}\n                    onClose={() => setOpened(false)}\n                    content={\n                        <>\n                            <Heading\n                                size=\"large\"\n                                id=\"custom-popover-description\"\n                                style={styles.srOnly}\n                            >\n                                Hidden text that would describe the popover\n                                content\n                            </Heading>\n                            <PopoverContent\n                                title=\"Title\"\n                                content=\"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip commodo.\"\n                                closeButtonVisible\n                            />\n                        </>\n                    }\n                >\n                    <Button\n                        onClick={() => {\n                            setOpened(true);\n                        }}\n                    >\n                        {`Open popover`}\n                    </Button>\n                </Popover>\n            </View>\n        );\n    },\n};\n\n/**\n * The `titleHeadingTag` prop allows customizing the heading level used for the\n * popover title. It defaults to `\"h4\"`. This does not affect the visual appearance of the title.\n */\nexport const WithTitleHeadingTag: StoryComponentType = {\n    render: function Render() {\n        const [opened, setOpened] = React.useState(false);\n        return (\n            <Popover\n                opened={opened}\n                onClose={() => setOpened(false)}\n                content={\n                    <PopoverContent\n                        titleHeadingTag=\"h2\"\n                        title=\"Title rendered as h2\"\n                        content=\"This popover title is rendered as an h2 element instead of the default h4. This does not affect the visual appearance of the title.\"\n                        closeButtonVisible\n                    />\n                }\n            >\n                <Button onClick={() => setOpened(true)}>\n                    Open popover with h2 title\n                </Button>\n            </Popover>\n        );\n    },\n};\n\n/**\n * If the Popover is placed near the edge of the viewport, default spacing of\n * 12px is applied to provide spacing between the Popover and the viewport. This\n * spacing value can be overridden using the `viewportPadding` prop.\n *\n * Note: The `viewportPadding` prop is only applied when `rootBoundary` is\n * `viewport`.\n */\nexport const InCorners: StoryComponentType = {\n    render: function Render(args) {\n        const PopoverInCorner = () => {\n            const [opened, setOpened] = React.useState(true);\n            return (\n                <Popover\n                    {...args}\n                    content={\n                        <PopoverContent\n                            closeButtonVisible\n                            content=\"The default version only includes text.\"\n                            title=\"A simple popover\"\n                        />\n                    }\n                    dismissEnabled\n                    onClose={() => setOpened(false)}\n                    opened={opened}\n                >\n                    <Button onClick={() => setOpened(true)}>\n                        Open default popover\n                    </Button>\n                </Popover>\n            );\n        };\n        return (\n            <View\n                style={{\n                    height: \"80vh\",\n                    width: \"100vw\",\n                    justifyContent: \"space-between\",\n                }}\n            >\n                <View\n                    style={{\n                        flexDirection: \"row\",\n                        justifyContent: \"space-between\",\n                    }}\n                >\n                    <PopoverInCorner />\n                    <PopoverInCorner />\n                </View>\n                <View\n                    style={{\n                        flexDirection: \"row\",\n                        justifyContent: \"space-between\",\n                    }}\n                >\n                    <PopoverInCorner />\n                    <PopoverInCorner />\n                </View>\n            </View>\n        );\n    },\n    parameters: {\n        layout: \"fullscreen\",\n        chromatic: {\n            // Include snapshot for corner alignment examples\n            disableSnapshot: false,\n        },\n    },\n};\n\n/**\n * Popover by default (and for performance reasons) only updates its position\n * under the following conditions:\n *\n * 1. When the window is resized.\n * 2. When the scroll position changes.\n *\n * However, there are cases where you might want the tooltip to update its\n * position when the trigger element changes. This can be done by setting the\n * `autoUpdate` prop to `true`.\n */\nexport const AutoUpdate: StoryComponentType = {\n    render: function Render(args) {\n        const [position, setPosition] = React.useState<{\n            x: number;\n            y: number;\n        } | null>(null);\n        return (\n            <View style={{position: \"relative\"}}>\n                <Button\n                    onClick={() => {\n                        setPosition({\n                            x: Math.floor(Math.random() * 200),\n                            y: Math.floor(Math.random() * 200),\n                        });\n                    }}\n                >\n                    Click to update trigger position (randomly)\n                </Button>\n                <Popover\n                    {...args}\n                    content={\n                        <PopoverContent\n                            content=\"This is a popover that auto-updates its position when the trigger element changes.\"\n                            title=\"Popover with autoUpdate=true\"\n                        />\n                    }\n                    opened={true}\n                    autoUpdate={true}\n                >\n                    <Button\n                        kind=\"tertiary\"\n                        style={\n                            position && {\n                                position: \"absolute\",\n                                insetBlockStart: position.y,\n                                insetInlineStart: position.x,\n                            }\n                        }\n                    >\n                        Trigger element\n                    </Button>\n                </Popover>\n            </View>\n        );\n    },\n};\n"}},"packages-progressspinner-circularspinner":{"id":"packages-progressspinner-circularspinner","name":"CircularSpinner","path":"./__docs__/wonder-blocks-progress-spinner/circular-spinner.stories.tsx","stories":[{"id":"packages-progressspinner-circularspinner--default","name":"Default","snippet":"const Default = () => <CircularSpinner />;"},{"id":"packages-progressspinner-circularspinner--sizes","name":"Sizes","snippet":"const Sizes = () => (\n    <table>\n        <tbody>\n            <tr>\n                <th>\n                    <BodyText tag=\"span\" weight=\"bold\">\n                        xsmall\n                    </BodyText>\n                </th>\n                <th>\n                    <BodyText tag=\"span\" weight=\"bold\">\n                        small\n                    </BodyText>\n                </th>\n                <th>\n                    <BodyText tag=\"span\" weight=\"bold\">\n                        medium\n                    </BodyText>\n                </th>\n                <th>\n                    <BodyText tag=\"span\" weight=\"bold\">\n                        large\n                    </BodyText>\n                </th>\n            </tr>\n            <tr>\n                <td>\n                    <CircularSpinner size={\"xsmall\"} style={styles.distanced} />\n                </td>\n                <td>\n                    <CircularSpinner size={\"small\"} style={styles.distanced} />\n                </td>\n                <td>\n                    <CircularSpinner size={\"medium\"} style={styles.distanced} />\n                </td>\n                <td>\n                    <CircularSpinner size={\"large\"} style={styles.distanced} />\n                </td>\n            </tr>\n            <tr className={css(styles.darkBackground)}>\n                <td>\n                    <CircularSpinner\n                        light={true}\n                        size={\"xsmall\"}\n                        style={styles.distanced}\n                    />\n                </td>\n                <td>\n                    <CircularSpinner\n                        light={true}\n                        size={\"small\"}\n                        style={styles.distanced}\n                    />\n                </td>\n                <td>\n                    <CircularSpinner\n                        light={true}\n                        size={\"medium\"}\n                        style={styles.distanced}\n                    />\n                </td>\n                <td>\n                    <CircularSpinner\n                        light={true}\n                        size={\"large\"}\n                        style={styles.distanced}\n                    />\n                </td>\n            </tr>\n        </tbody>\n    </table>\n);"},{"id":"packages-progressspinner-circularspinner--light","name":"Light","snippet":"const Light = () => <CircularSpinner light={true} />;"},{"id":"packages-progressspinner-circularspinner--inline","name":"Inline","snippet":"const Inline = () => (\n    <BodyText>\n        Inline inside{\" \"}\n        <CircularSpinner size=\"xsmall\" style={{display: \"inline\"}} /> some text.\n    </BodyText>\n);"},{"id":"packages-progressspinner-circularspinner--with-style","name":"With Style","snippet":"const WithStyle = () => {\n    const spinnerStyle = {\n        border: `solid 5px ${semanticColor.core.border.instructive.default}`,\n        borderRadius: \"50%\",\n        backgroundColor: semanticColor.core.background.base.subtle,\n    } as const;\n\n    return <CircularSpinner style={spinnerStyle} />;\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { CircularSpinner, ComponentInfo } from \"@khanacademy/wonder-blocks-progress-spinner\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A circular progress spinner. Used for indicating loading progress. Should be used by default in most places where a loading indicator is needed. ### Usage ```js import {CircularSpinner} from \"@khanacademy/wonder-blocks-progress-spinner\"; <CircularSpinner /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-progress-spinner/src/index.ts","description":"A circular progress spinner. Used for indicating loading progress. Should\nbe used by default in most places where a loading indicator is needed.\n\n### Usage\n\n```js\nimport {CircularSpinner} from \"@khanacademy/wonder-blocks-progress-spinner\";\n\n<CircularSpinner />\n```","displayName":"src","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"size":{"defaultValue":{"value":"large"},"description":"The size of the spinner. (large = 96px, medium = 48px, small = 24px,\nxsmall = 16px)","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-progress-spinner/src/components/circular-spinner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"small\" | \"large\" | \"medium\" | \"xsmall\"","value":[{"value":"\"small\""},{"value":"\"large\""},{"value":"\"medium\""},{"value":"\"xsmall\""}]}},"light":{"defaultValue":{"value":"false"},"description":"Should a light version of the spinner be shown?\n(To be used on a dark background.)","name":"light","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-progress-spinner/src/components/circular-spinner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"style":{"defaultValue":null,"description":"Any (optional) styling to apply to the spinner container.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-progress-spinner/src/components/circular-spinner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-progress-spinner/src/components/circular-spinner.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}}},"exportName":"src"}},"packages-searchfield":{"id":"packages-searchfield","name":"SearchField","path":"./__docs__/wonder-blocks-search-field/search-field.stories.tsx","stories":[{"id":"packages-searchfield--default","name":"Default","snippet":"const Default = (\n    storyArgs: PropsFor<typeof SearchField> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args?.value || \"\");\n    const [errorMessage, setErrorMessage] = React.useState<\n        string | null | undefined\n    >(\"\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <View>\n            <LabeledField\n                label={label || \"Search Field\"}\n                field={\n                    <SearchField\n                        {...args}\n                        value={value}\n                        onChange={handleChange}\n                        onKeyDown={(e) => {\n                            action(\"onKeyDown\")(e);\n                            handleKeyDown(e);\n                        }}\n                        onValidate={setErrorMessage}\n                    />\n                }\n                errorMessage={\n                    errorMessage || (args.error && \"Error from error prop\")\n                }\n            />\n        </View>\n    );\n};","description":"The default SearchField component, which is composed by a `TextField` with a search icon on its left side and an X icon on its right side."},{"id":"packages-searchfield--with-labeled-field","name":"With Labeled Field","snippet":"const WithLabeledField = function LabeledFieldStory(args) {\n    const [value, setValue] = React.useState(args.value || \"\");\n    const [errorMessage, setErrorMessage] = React.useState<\n        string | null | undefined\n    >();\n    return (\n        <LabeledField\n            label=\"Label\"\n            field={\n                <SearchField\n                    {...args}\n                    value={value}\n                    onChange={setValue}\n                    onValidate={setErrorMessage}\n                />\n            }\n            description=\"Description\"\n            errorMessage={errorMessage}\n        />\n    );\n};","description":"The field can be used with the LabeledField component to provide a label, description, required indicator, and/or error message for the field. Using the field with the LabeledField component will ensure that the field has the relevant accessibility attributes set."},{"id":"packages-searchfield--disabled","name":"Disabled","snippet":"const Disabled = function Render() {\n    const [value, setValue] = React.useState(\"\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <SearchField\n            value={value}\n            placeholder=\"Placeholder\"\n            onChange={handleChange}\n            onKeyDown={handleKeyDown}\n            disabled={true}\n        />\n    );\n};","description":"SearchField takes a `disabled` prop, which makes it unusable. Try to avoid using this if possible as it is bad for accessibility."},{"id":"packages-searchfield--with-autofocus","name":"With Autofocus","snippet":"const WithAutofocus = function Render() {\n    const [value, setValue] = React.useState(\"\");\n    const [showDemo, setShowDemo] = React.useState(false);\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (\n        event: React.KeyboardEvent<HTMLInputElement>,\n    ) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    const handleShowDemo = () => {\n        setShowDemo(!showDemo);\n    };\n\n    const AutoFocusDemo = () => (\n        <View style={{flexDirection: \"row\"}}>\n            <Button onClick={() => {}}>Some other focusable element</Button>\n            <SearchField\n                value={value}\n                placeholder=\"Placeholder\"\n                autoFocus={true}\n                onChange={handleChange}\n                onKeyDown={handleKeyDown}\n                style={{flexGrow: 1, marginInlineStart: sizing.size_120}}\n            />\n        </View>\n    );\n\n    return (\n        <View>\n            <BodyText\n                weight=\"bold\"\n                style={{marginBlockEnd: sizing.size_120}}\n            >\n                Press the button to view the search field with autofocus.\n            </BodyText>\n            <Button\n                onClick={handleShowDemo}\n                style={{width: 300, marginBlockEnd: sizing.size_240}}\n            >\n                Toggle autoFocus demo\n            </Button>\n            {showDemo && <AutoFocusDemo />}\n        </View>\n    );\n};","description":"SearchField takes an `autoFocus` prop, which makes it autofocus on page load. Try to avoid using this if possible as it is bad for accessibility. Press the button to view this example. Notice that the search field automatically receives focus. Upon pressing the botton, try typing and notice that the text appears directly in the search field. There is another focusable element present to demonstrate that focus skips that element and goes straight to the search field."},{"id":"packages-searchfield--error","name":"Error","snippet":"const Error = (\n    storyArgs: PropsFor<typeof SearchField> & {label?: string},\n) => {\n    const {label, ...args} = storyArgs;\n    const [value, setValue] = React.useState(args?.value || \"\");\n    const [errorMessage, setErrorMessage] = React.useState<\n        string | null | undefined\n    >(\"\");\n\n    const handleChange = (newValue: string) => {\n        setValue(newValue);\n    };\n\n    const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n        if (event.key === \"Enter\") {\n            event.currentTarget.blur();\n        }\n    };\n\n    return (\n        <View>\n            <LabeledField\n                label={label || \"Search Field\"}\n                field={\n                    <SearchField\n                        {...args}\n                        value={value}\n                        onChange={handleChange}\n                        onKeyDown={(e) => {\n                            action(\"onKeyDown\")(e);\n                            handleKeyDown(e);\n                        }}\n                        onValidate={setErrorMessage}\n                    />\n                }\n                errorMessage={\n                    errorMessage || (args.error && \"Error from error prop\")\n                }\n            />\n        </View>\n    );\n};","description":"The SearchField can be put in an error state using the `error` prop."},{"id":"packages-searchfield--validation","name":"Validation","snippet":"const Validation = () => {\n    return (\n        <View style={{gap: sizing.size_120}}>\n            <Template label=\"Validation on mount if there is a value\" value=\"T\" />\n            <Template\n                label=\"Error shown immediately (instantValidation: true)\"\n                instantValidation={true} />\n            <Template\n                label=\"Error shown onBlur (instantValidation: false)\"\n                instantValidation={false} />\n        </View>\n    );\n};","description":"The SearchField supports `validate`, `onValidate`, and `instantValidation` props. See docs for the TextField component for more details around validation since SearchField uses TextField internally."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport SearchField, { ComponentInfo } from \"@khanacademy/wonder-blocks-search-field\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"`SearchField` helps users input text to search for relevant content. It is commonly used in search bars and search forms. Make sure to provide a label for the field. This can be done by either: - (recommended) Using the **LabeledField** component to provide a label, description, and/or error message for the field - Using a `label` html tag with the `htmlFor` prop set to the unique id of the field - Using an `aria-label` attribute on the field - Using an `aria-labelledby` attribute on the field ### Usage ```tsx import {SearchField} from \"@khanacademy/wonder-blocks-search-field\"; const [value, setValue] = React.useState(\"\"); const handleChange = (newValue: string) => { setValue(newValue); }; <SearchField id=\"some-id\" value={value} onChange={handleChange} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-search-field/src/index.ts","description":"Search Field. A TextField with a search icon on its left side\nand an X icon on its right side.\n\nMake sure to provide a label for the field. This can be done by either:\n- (recommended) Using the **LabeledField** component to provide a label,\ndescription, and/or error message for the field\n- Using a `label` html tag with the `htmlFor` prop set to the unique id of\nthe field\n- Using an `aria-label` attribute on the field\n- Using an `aria-labelledby` attribute on the field\n\n### Usage\n```jsx\nimport {SearchField} from \"@khanacademy/wonder-blocks-search-field\";\n\nconst [value, setValue] = React.useState(\"\");\n\nconst handleChange = (newValue: string) => {\n    setValue(newValue);\n};\n\n<SearchField\n    id=\"some-id\"\n    value={value}\n    onChange={handleChange}\n/>\n```","displayName":"src","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"clearAriaLabel":{"defaultValue":null,"description":"ARIA label for the clear button. Defaults to \"Clear search\".","name":"clearAriaLabel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"id":{"defaultValue":null,"description":"The unique identifier for the input. If one is not provided,\na unique id will be generated.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"value":{"defaultValue":null,"description":"The text input value.","name":"value","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"name":{"defaultValue":null,"description":"The name for the input control. This is submitted along with\nthe form data.","name":"name","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"placeholder":{"defaultValue":null,"description":"Provide hints or examples of what to enter. This shows up as\na grayed out text in the field before a value is entered.","name":"placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"autoFocus":{"defaultValue":null,"description":"Whether this field should autofocus on page load.","name":"autoFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Makes a read-only input field that cannot be focused.\nDefaults to false.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"style":{"defaultValue":null,"description":"Custom styles for the main wrapper.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"error":{"defaultValue":null,"description":"Whether the search field is in an error state.","name":"error","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"validate":{"defaultValue":null,"description":"Provide a validation for the input value.\nReturn a string error message or null | void for a valid input.\n\nUse this for errors that are shown to the user while they are filling out\na form.","name":"validate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((value: string) => string | void | null)"}},"onValidate":{"defaultValue":null,"description":"Called right after the SearchField is validated.","name":"onValidate","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((errorMessage?: string | null) => unknown)"}},"instantValidation":{"defaultValue":null,"description":"If true, SearchField is validated as the user types (onChange). If false,\nit is validated when the user's focus moves out of the field (onBlur).\nIt is preferred that instantValidation is set to `false`, however, it\ndefaults to `true` for consistency with form components like TextField\nand TextArea.","name":"instantValidation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"onChange":{"defaultValue":null,"description":"Called when the value has changed.","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(newValue: string) => unknown"}},"onClick":{"defaultValue":null,"description":"Handler that is triggered when this component is clicked. For example,\nuse this to adjust focus in parent component.","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"(() => unknown)"}},"onKeyDown":{"defaultValue":null,"description":"Called when a key is pressed.","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((event: KeyboardEvent<HTMLInputElement>) => unknown)"}},"onKeyUp":{"defaultValue":null,"description":"Called when a key is released.","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((event: KeyboardEvent<HTMLInputElement>) => unknown)"}},"onFocus":{"defaultValue":null,"description":"Called when the element has been focused.","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((event: FocusEvent<HTMLInputElement, Element>) => unknown)"}},"onBlur":{"defaultValue":null,"description":"Called when the element has been blurred.","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-search-field/src/components/search-field.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((event: FocusEvent<HTMLInputElement, Element>) => unknown)"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLInputElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"src"}},"packages-styles-focus-styles":{"id":"packages-styles-focus-styles","name":"FocusStyles","path":"./__docs__/wonder-blocks-styles/focus-styles.stories.tsx","stories":[{"id":"packages-styles-focus-styles--focus","name":"focus","snippet":"const Focus = () => {\n    return (\n        <View\n            style={{\n                padding: sizing.size_160,\n                flexDirection: \"row\",\n                placeItems: \"center\",\n            }}\n        >\n            <View\n                style={{\n                    background: semanticColor.status.success.background,\n                    padding: sizing.size_160,\n                    gap: sizing.size_160,\n                }}\n            >\n                <IconButton\n                    kind=\"tertiary\"\n                    icon={info}\n                    aria-label=\"Tertiary info button\"\n                    style={focusStyles.focus}\n                />\n            </View>\n            <View\n                style={{\n                    background:\n                        semanticColor.core.background.neutral.strong,\n                    padding: sizing.size_160,\n                    gap: sizing.size_160,\n                }}\n            >\n                <IconButton\n                    kind=\"tertiary\"\n                    icon={info}\n                    aria-label=\"Tertiary info button\"\n                    style={[\n                        focusStyles.focus,\n                        {\n                            color: semanticColor.core.foreground.knockout\n                                .default,\n                        },\n                    ]}\n                />\n            </View>\n        </View>\n    );\n};","description":"A global focus style that can be applied to interactive elements. This style injects a combination of `outline` and `box-shadow` to indicate the element is focused. This is used for accessibility purposes as it allows the element to present a focus state on Windows High Contrast mode. In the example below, the focus style is applied to an `IconButton` component and to a `button` element."},{"id":"packages-styles-focus-styles--scenarios","name":"Scenarios","snippet":"const Scenarios = () => {\n    const scenarios = [\n        {\n            name: \"Using IconButton\",\n            props: {\n                children: (\n                    <IconButton\n                        kind=\"tertiary\"\n                        icon={info}\n                        aria-label=\"Tertiary info button\"\n                        style={focusStyles.focus}\n                    />\n                ),\n            },\n        },\n        {\n            name: \"On a neutral strong background\",\n            props: {\n                children: (\n                    <IconButton\n                        kind=\"tertiary\"\n                        icon={info}\n                        aria-label=\"Tertiary info button\"\n                        style={[\n                            focusStyles.focus,\n                            {\n                                color: semanticColor.core.foreground\n                                    .knockout.default,\n                            },\n                        ]}\n                    />\n                ),\n                inverse: true,\n            },\n        },\n        {\n            name: \"Using Clickable\",\n            props: {\n                children: (\n                    <Clickable onClick={() => {}} style={focusStyles.focus}>\n                        {() => \"hello\"}\n                    </Clickable>\n                ),\n            },\n        },\n        {\n            name: \"Using an HTML element\",\n            props: {\n                children: (\n                    // eslint-disable-next-line @khanacademy/wonder-blocks/no-raw-button\n                    (<StyledButton style={focusStyles.focus}>Custom button\n                                                </StyledButton>)\n                ),\n            },\n        },\n        {\n            name: \"Spreading focus styles in an existing style\",\n            props: {\n                children: (\n                    // eslint-disable-next-line @khanacademy/wonder-blocks/no-raw-button\n                    (<StyledButton\n                        style={{\n                            background:\n                                semanticColor.core.background.critical\n                                    .default,\n                            color: semanticColor.core.foreground.knockout\n                                .default,\n                            // focus styles will be merged with the\n                            // defined styles\n                            ...focusStyles.focus,\n                        }}\n                    >Custom button merging styles\n                                                </StyledButton>)\n                ),\n            },\n        },\n        {\n            name: \"Overriding :focus-visible pseudo-class\",\n            props: {\n                children: (\n                    // eslint-disable-next-line @khanacademy/wonder-blocks/no-raw-button\n                    (<StyledButton\n                        style={{\n                            backgroundColor:\n                                semanticColor.action.secondary.progressive\n                                    .default.background,\n                            color: semanticColor.action.secondary\n                                .progressive.default.foreground,\n                            \":focus-visible\": {\n                                backgroundColor:\n                                    semanticColor.action.secondary\n                                        .progressive.default.background,\n                                // focus styles will be merged with the\n                                // component ones\n                                ...focusStyles.focus[\":focus-visible\"],\n                            },\n                        }}\n                    >Custom button overriding :focus-visible\n                                                </StyledButton>)\n                ),\n            },\n        },\n    ];\n\n    return (\n        <ScenariosLayout scenarios={scenarios}>\n            {({inverse, ...props}) => (\n                <View\n                    {...props}\n                    style={{\n                        background: inverse\n                            ? semanticColor.core.background.neutral.strong\n                            : semanticColor.status.success.background,\n                        padding: sizing.size_160,\n                        gap: sizing.size_160,\n                    }}\n                />\n            )}\n        </ScenariosLayout>\n    );\n};"}],"import":"import Clickable from \"@khanacademy/wonder-blocks-clickable\";\nimport { ComponentInfo, ScenariosLayout } from \"wonder-blocks\";\nimport IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n  34 |  * ```\n  35 |  */\n> 36 | export default {\n     | ^\n  37 |     title: \"Packages / Styles / Focus Styles\",\n  38 |     parameters: {\n  39 |         componentSubtitle: (\n\n./__docs__/wonder-blocks-styles/focus-styles.stories.tsx:\nimport * as React from \"react\";\nimport {Meta, StoryObj} from \"@storybook/react-vite\";\nimport info from \"@phosphor-icons/core/regular/info.svg\";\nimport ComponentInfo from \"../components/component-info\";\nimport packageConfig from \"../../packages/wonder-blocks-styles/package.json\";\nimport IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport {focusStyles} from \"@khanacademy/wonder-blocks-styles\";\nimport {addStyle, View} from \"@khanacademy/wonder-blocks-core\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport Clickable from \"@khanacademy/wonder-blocks-clickable\";\nimport {ScenariosLayout} from \"../components/scenarios-layout\";\nimport {allThemeModes} from \"../../.storybook/modes\";\n\n/**\n * Styles that implement accessible focus indicators for interactive elements.\n *\n * `focusStyles` is used internally by Wonder Blocks components (`Button`,\n * `IconButton`, `Clickable`, etc.) to ensure consistent `:focus-visible` rings\n * that meet WCAG contrast requirements across light and dark backgrounds.\n *\n * ### When to use\n *\n * - **WB component authors**: apply `focusStyles.focus` when implementing a\n *   new WB primitive that renders a focusable element.\n * - **Consumers**: it should be rare to need this directly — WB interactive\n *   components already include these styles. If you need to override focus\n *   appearance on a WB component, pass the style via the `style` prop.\n *\n * ```tsx\n * import {focusStyles} from \"@khanacademy/wonder-blocks-styles\";\n *\n * // Merging with other styles in a WB component implementation\n * <StyledElement style={{...myStyles, ...focusStyles.focus}} />\n * ```\n */\nexport default {\n    title: \"Packages / Styles / Focus Styles\",\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        chromatic: {\n            // Disabling because this is already covered by the Scenarios story.\n            disableSnapshot: true,\n        },\n    },\n} as Meta<any>;\n\ntype Story = StoryObj<any>;\n\n// eslint-disable-next-line @khanacademy/wonder-blocks/no-raw-button -- StyledButton is used to demonstrate focusStyles applied to a raw element; a WB Button would obscure this since it already includes focus styles internally.\nconst StyledButton = addStyle(\"button\");\n\n/**\n * A global focus style that can be applied to interactive elements.\n *\n * This style injects a combination of `outline` and `box-shadow` to indicate\n * the element is focused. This is used for accessibility purposes as it allows\n * the element to present a focus state on Windows High Contrast mode.\n *\n * In the example below, the focus style is applied to an `IconButton` component\n * and to a `button` element.\n */\nexport const Focus: Story = {\n    name: \"focus\",\n    render: () => {\n        return (\n            <View\n                style={{\n                    padding: sizing.size_160,\n                    flexDirection: \"row\",\n                    placeItems: \"center\",\n                }}\n            >\n                <View\n                    style={{\n                        background: semanticColor.status.success.background,\n                        padding: sizing.size_160,\n                        gap: sizing.size_160,\n                    }}\n                >\n                    <IconButton\n                        kind=\"tertiary\"\n                        icon={info}\n                        aria-label=\"Tertiary info button\"\n                        style={focusStyles.focus}\n                    />\n                </View>\n                <View\n                    style={{\n                        background:\n                            semanticColor.core.background.neutral.strong,\n                        padding: sizing.size_160,\n                        gap: sizing.size_160,\n                    }}\n                >\n                    <IconButton\n                        kind=\"tertiary\"\n                        icon={info}\n                        aria-label=\"Tertiary info button\"\n                        style={[\n                            focusStyles.focus,\n                            {\n                                color: semanticColor.core.foreground.knockout\n                                    .default,\n                            },\n                        ]}\n                    />\n                </View>\n            </View>\n        );\n    },\n    parameters: {\n        pseudo: {focusVisible: true},\n    },\n};\n\nexport const Scenarios: Story = {\n    render: () => {\n        const scenarios = [\n            {\n                name: \"Using IconButton\",\n                props: {\n                    children: (\n                        <IconButton\n                            kind=\"tertiary\"\n                            icon={info}\n                            aria-label=\"Tertiary info button\"\n                            style={focusStyles.focus}\n                        />\n                    ),\n                },\n            },\n            {\n                name: \"On a neutral strong background\",\n                props: {\n                    children: (\n                        <IconButton\n                            kind=\"tertiary\"\n                            icon={info}\n                            aria-label=\"Tertiary info button\"\n                            style={[\n                                focusStyles.focus,\n                                {\n                                    color: semanticColor.core.foreground\n                                        .knockout.default,\n                                },\n                            ]}\n                        />\n                    ),\n                    inverse: true,\n                },\n            },\n            {\n                name: \"Using Clickable\",\n                props: {\n                    children: (\n                        <Clickable onClick={() => {}} style={focusStyles.focus}>\n                            {() => \"hello\"}\n                        </Clickable>\n                    ),\n                },\n            },\n            {\n                name: \"Using an HTML element\",\n                props: {\n                    children: (\n                        // eslint-disable-next-line @khanacademy/wonder-blocks/no-raw-button\n                        <StyledButton style={focusStyles.focus}>\n                            Custom button\n                        </StyledButton>\n                    ),\n                },\n            },\n            {\n                name: \"Spreading focus styles in an existing style\",\n                props: {\n                    children: (\n                        // eslint-disable-next-line @khanacademy/wonder-blocks/no-raw-button\n                        <StyledButton\n                            style={{\n                                background:\n                                    semanticColor.core.background.critical\n                                        .default,\n                                color: semanticColor.core.foreground.knockout\n                                    .default,\n                                // focus styles will be merged with the\n                                // defined styles\n                                ...focusStyles.focus,\n                            }}\n                        >\n                            Custom button merging styles\n                        </StyledButton>\n                    ),\n                },\n            },\n            {\n                name: \"Overriding :focus-visible pseudo-class\",\n                props: {\n                    children: (\n                        // eslint-disable-next-line @khanacademy/wonder-blocks/no-raw-button\n                        <StyledButton\n                            style={{\n                                backgroundColor:\n                                    semanticColor.action.secondary.progressive\n                                        .default.background,\n                                color: semanticColor.action.secondary\n                                    .progressive.default.foreground,\n                                \":focus-visible\": {\n                                    backgroundColor:\n                                        semanticColor.action.secondary\n                                            .progressive.default.background,\n                                    // focus styles will be merged with the\n                                    // component ones\n                                    ...focusStyles.focus[\":focus-visible\"],\n                                },\n                            }}\n                        >\n                            Custom button overriding :focus-visible\n                        </StyledButton>\n                    ),\n                },\n            },\n        ];\n\n        return (\n            <ScenariosLayout scenarios={scenarios}>\n                {({inverse, ...props}) => (\n                    <View\n                        {...props}\n                        style={{\n                            background: inverse\n                                ? semanticColor.core.background.neutral.strong\n                                : semanticColor.status.success.background,\n                            padding: sizing.size_160,\n                            gap: sizing.size_160,\n                        }}\n                    />\n                )}\n            </ScenariosLayout>\n        );\n    },\n    args: {},\n    parameters: {\n        pseudo: {focusVisible: true},\n        docs: {\n            canvas: {\n                sourceState: \"shown\",\n            },\n            source: {\n                type: \"code\",\n                excludeDecorators: true,\n            },\n        },\n        chromatic: {\n            // Enable scenarios snapshots\n            disableSnapshot: false,\n            modes: allThemeModes,\n        },\n    },\n};\n"}},"packages-switch":{"id":"packages-switch","name":"Switch","path":"./__docs__/wonder-blocks-switch/switch.stories.tsx","stories":[{"id":"packages-switch--default","name":"Default","snippet":"function Default() {\n    const [checked, setChecked] = React.useState(args.checked);\n\n    // Update the checked state when the args change.\n    React.useEffect(() => {\n        setChecked(args.checked);\n    }, [args.checked]);\n\n    return <Switch aria-label=\"Example\" checked={checked} onChange={setChecked} />;\n}","description":"The switch has a default state that can be controlled by the `checked` prop."},{"id":"packages-switch--controlled","name":"Controlled","snippet":"const Controlled = function Render() {\n    const [checkedOne, setCheckedOne] = React.useState(false);\n    const [checkedTwo, setCheckedTwo] = React.useState(false);\n\n    return (\n        <View style={styles.column}>\n            <Switch\n                aria-label=\"Example\"\n                checked={checkedOne}\n                onChange={setCheckedOne}\n            />\n            <Switch\n                testId=\"test-switch\"\n                aria-label=\"test switch\"\n                checked={checkedTwo}\n                onChange={setCheckedTwo}\n                icon={<PhosphorIcon icon={magnifyingGlassIcon} />}\n            />\n        </View>\n    );\n};","description":"The switch is a controlled component, so state should be used to keep track of whether it is checked or not. The `onChange` prop is optional in case the toggle will be wrapped in a larger clickable component."},{"id":"packages-switch--disabled","name":"Disabled","snippet":"const Disabled = () => (\n    <View style={styles.column}>\n        <Switch\n            aria-label=\"Disabled example\"\n            checked={false}\n            disabled={true}\n        />\n        <Switch\n            aria-label=\"Checked Disabled example\"\n            checked={true}\n            disabled={true}\n        />\n        <Switch\n            aria-label=\"Disabled example\"\n            checked={false}\n            disabled={true}\n            icon={<PhosphorIcon icon={magnifyingGlassIcon} />}\n        />\n        <Switch\n            aria-label=\"Checked example\"\n            checked={true}\n            disabled={true}\n            icon={<PhosphorIcon icon={magnifyingGlassIcon} />}\n        />\n    </View>\n);","description":"The switch can be disabled. Note that we use `aria-disabled` to allow the switch to receive focus even when disabled. This helps Screen Readers to announce the state of the switch."},{"id":"packages-switch--with-icon","name":"With Icon","snippet":"const WithIcon = () => {\n    return (\n        <View style={styles.column}>\n            <Switch\n                aria-label=\"Example\"\n                checked={false}\n                icon={<PhosphorIcon icon={magnifyingGlassIcon} />}\n            />\n\n            <Switch\n                aria-label=\"Checked example\"\n                checked={true}\n                icon={<PhosphorIcon icon={magnifyingGlassIcon} />}\n            />\n        </View>\n    );\n};","description":"The switch can take a `PhosphorIcon` element which will be rendered inside the slider."}],"import":"import Switch, { ComponentInfo } from \"@khanacademy/wonder-blocks-switch\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A Switch is an input that allows users to toggle between two states, typically `on` and `off`. It is a controlled component, meaning that the state of the switch is controlled by the `checked` prop. See the Best Practices tab for more information on how to use this component with labels, descriptions, tooltips, and more. ### Usage ```jsx import Switch from \"@khanacademy/wonder-blocks-switch\"; <Switch checked={false} onChange={() => {}} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-switch/src/index.ts","description":"","displayName":"src","methods":[],"props":{"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"checked":{"defaultValue":null,"description":"Whether this component is checked.","name":"checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Whether the switch is disabled. Defaults to `false`.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"icon":{"defaultValue":null,"description":"Optional icon to display on the slider.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<Pick<AriaProps, \"aria-hidden\" | \"aria-label\" | \"role\"> & { color?: string; style?: StyleType; className?: string; role?: \"img\" | undefined; size?: IconSize | undefined; testId?: string | undefined; tabIndex?: 0 | -1 | undefined; icon: string | PhosphorIconAsset; } & RefAttributes<HTMLSpanElement>, string | JSXElementConstructor<any>> | undefined"}},"id":{"defaultValue":null,"description":"The unique identifier for the switch.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onChange":{"defaultValue":null,"description":"Function to call when the switch is clicked.\n@param newCheckedValue\n@returns","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((newCheckedState: boolean) => unknown)"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the component.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLInputElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"src"}},"packages-switch-best-practices":{"id":"packages-switch-best-practices","name":"Switch","path":"./__docs__/wonder-blocks-switch/switch-best-practices.stories.tsx","stories":[{"id":"packages-switch-best-practices--with-label","name":"With Label","snippet":"const WithLabel = (() => {\n    const [checked, setChecked] = React.useState(false);\n\n    return (\n        <View\n            style={{\n                display: \"flex\",\n                flexDirection: \"row\",\n                alignItems: \"center\",\n            }}\n        >\n            <Switch\n                id=\"switch-with-label\"\n                checked={checked}\n                onChange={setChecked}\n                aria-labelledby=\"label-for-switch-with-label\"\n            />\n            <BodyText\n                id=\"label-for-switch-with-label\"\n                htmlFor=\"switch-with-label\"\n                style={{marginInlineStart: sizing.size_080}}\n                tag=\"label\"\n            >\n                Superpowers\n            </BodyText>\n        </View>\n    );\n});"},{"id":"packages-switch-best-practices--with-label-and-description","name":"With Label And Description","snippet":"const WithLabelAndDescription = (() => {\n    const [checked, setChecked] = React.useState(false);\n\n    return (\n        <View\n            style={{\n                display: \"flex\",\n                flexDirection: \"row\",\n            }}\n        >\n            <Switch\n                id=\"switch-with-desc\"\n                checked={checked}\n                onChange={setChecked}\n                aria-labelledby=\"label-for-switch-with-desc\"\n                aria-describedby=\"desc-for-switch-with-desc\"\n            />\n            <View style={{marginInlineStart: sizing.size_080}}>\n                <BodyText\n                    id=\"label-for-switch-with-desc\"\n                    htmlFor=\"switch-with-desc\"\n                    tag=\"label\"\n                >\n                    Getting a Healthy Amount of Sleep\n                </BodyText>\n                <BodyText\n                    size=\"small\"\n                    id=\"desc-for-switch-with-desc\"\n                    style={{\n                        color: semanticColor.core.foreground.neutral.subtle,\n                    }}\n                >\n                    Sleep is important for your health. The benefits of a good\n                    night sleep include improved memory, longer life, and\n                    increased creativity.\n                </BodyText>\n            </View>\n        </View>\n    );\n});"},{"id":"packages-switch-best-practices--with-label-and-on-off","name":"With Label And On Off","snippet":"const WithLabelAndOnOff = (() => {\n    const [checked, setChecked] = React.useState(false);\n\n    return (\n        <View\n            style={{\n                display: \"flex\",\n                flexDirection: \"row\",\n                alignItems: \"center\",\n            }}\n        >\n            <BodyText\n                id=\"label-for-switch-with-on-off\"\n                htmlFor=\"switch-with-on-off\"\n                style={{marginInlineEnd: sizing.size_080}}\n                tag=\"label\"\n            >\n                Gravity\n            </BodyText>\n            <Switch\n                id=\"switch-with-on-off\"\n                checked={checked}\n                onChange={setChecked}\n                aria-labelledby=\"label-for-switch-with-on-off\"\n            />\n            <BodyText\n                size=\"small\"\n                style={{\n                    marginInlineStart: sizing.size_080,\n                    color: semanticColor.core.foreground.neutral.subtle,\n                }}\n                aria-hidden={true}\n            >\n                {checked ? \"ON\" : \"OFF\"}\n            </BodyText>\n        </View>\n    );\n});"},{"id":"packages-switch-best-practices--with-tooltip","name":"With Tooltip","snippet":"const WithTooltip = (() => {\n    const [checked, setChecked] = React.useState(false);\n    const tooltipContent = `Hints turned ${checked ? \"ON\" : \"OFF\"}`;\n\n    return (\n        <View>\n            <Tooltip content={tooltipContent} placement=\"right\">\n                <Switch\n                    aria-label=\"Tooltip example\"\n                    checked={checked}\n                    onChange={setChecked}\n                    icon={<PhosphorIcon icon={IconMappings.lightbulbBold} />}\n                />\n            </Tooltip>\n        </View>\n    );\n});"},{"id":"packages-switch-best-practices--inside-cell","name":"Inside Cell","snippet":"const InsideCell = (() => {\n    const [checked, setChecked] = React.useState(false);\n\n    return (\n        <CompactCell\n            title={\n                <BodyText\n                    id=\"label-for-switch-inside-cell\"\n                    htmlFor=\"switch-inside-cell\"\n                    tag=\"label\"\n                >\n                    Click me!\n                </BodyText>\n            }\n            rightAccessory={\n                <Switch\n                    id=\"switch-inside-cell\"\n                    aria-labelledby=\"label-for-switch-inside-cell\"\n                    checked={checked}\n                    onChange={setChecked}\n                />\n            }\n        />\n    );\n});"},{"id":"packages-switch-best-practices--inside-detail-cell","name":"Inside Detail Cell","snippet":"const InsideDetailCell = (() => {\n    const [checked, setChecked] = React.useState(false);\n\n    return (\n        <DetailCell\n            title={\n                <BodyText\n                    id=\"label-for-switch-inside-detail-cell\"\n                    htmlFor=\"switch-inside-detail-cell\"\n                    tag=\"label\"\n                >\n                    Click me! I will change the state of the switch.\n                </BodyText>\n            }\n            subtitle2={\n                <BodyText\n                    size=\"small\"\n                    id=\"desc-for-switch-inside-detail-cell\"\n                    style={{\n                        color: semanticColor.core.foreground.neutral.subtle,\n                    }}\n                >\n                    I am a long description that does not change the state of\n                    the switch. Click me all you want and nothing will change.\n                </BodyText>\n            }\n            leftAccessory={<PhosphorIcon icon={IconMappings.infoBold} />}\n            rightAccessory={\n                <Switch\n                    id=\"switch-inside-detail-cell\"\n                    aria-labelledby=\"label-for-switch-inside-detail-cell\"\n                    aria-describedby=\"desc-for-switch-inside-detail-cell\"\n                    checked={checked}\n                    onChange={setChecked}\n                />\n            }\n        />\n    );\n});"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { CompactCell, DetailCell } from \"@khanacademy/wonder-blocks-cell\";\nimport Switch, { ComponentInfo } from \"@khanacademy/wonder-blocks-switch\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport Tooltip from \"@khanacademy/wonder-blocks-tooltip\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-switch/src/index.ts","description":"","displayName":"src","methods":[],"props":{"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"checked":{"defaultValue":null,"description":"Whether this component is checked.","name":"checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"Whether the switch is disabled. Defaults to `false`.\n\nInternally, the `aria-disabled` attribute will be set so that the\nelement remains focusable and will be included in the tab order.","name":"disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"icon":{"defaultValue":null,"description":"Optional icon to display on the slider.","name":"icon","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactElement<Pick<AriaProps, \"aria-hidden\" | \"aria-label\" | \"role\"> & { color?: string; style?: StyleType; className?: string; role?: \"img\" | undefined; size?: IconSize | undefined; testId?: string | undefined; tabIndex?: 0 | -1 | undefined; icon: string | PhosphorIconAsset; } & RefAttributes<HTMLSpanElement>, string | JSXElementConstructor<any>> | undefined"}},"id":{"defaultValue":null,"description":"The unique identifier for the switch.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onChange":{"defaultValue":null,"description":"Function to call when the switch is clicked.\n@param newCheckedValue\n@returns","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((newCheckedState: boolean) => unknown)"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Adds CSS classes to the component.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-switch/src/components/switch.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLInputElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"src"},"docs":{"packages-switch-best-practices--docs":{"id":"packages-switch-best-practices--docs","name":"Docs","path":"./__docs__/wonder-blocks-switch/switch-best-practices.mdx","title":"Packages / Switch / Best Practices","content":"import {Canvas, Meta} from \"@storybook/addon-docs/blocks\";\n\nimport * as SwitchBestPracticesStories from \"./switch-best-practices.stories\";\n\n<Meta of={SwitchBestPracticesStories} />\n\n# Switch\n\n## Best Practices\n\n### With Labelling\n\nThe switch can be paired with a visible label which should be an html `label`\nelement. The label should include the `htmlFor` attribute, and the switch should\ninclude the `aria-labelledby` attribute.\n\n**Note:** If you are already using a label to describe the switch, we encourage\nyou not to use the `aria-label` attribute because it could override the\n`label`'s text.\n\n#### Label\n\nThe label text should **not** change as the state of the switch changes.\n\n<Canvas of={SwitchBestPracticesStories.WithLabel} />\n\n#### Label, Description\n\nIf a description is also provided, the switch should include the `aria-describedby` attribute.\n\n<Canvas of={SwitchBestPracticesStories.WithLabelAndDescription} />\n\n#### Label, ON/OFF Labels\n\nIf on/off labels are desired, they should include the `aria-hidden` attribute to prevent\nredundant descriptions of the state for screen readers.\n\n<Canvas of={SwitchBestPracticesStories.WithLabelAndOnOff} />\n\n### Inside Cells\n\nThe switch can be placed inside a cell as a left/right accessory.\n\nIn the following examples, the title is a `label` element with the `htmlFor` attribute set to the\nswitch, so that clicking the title also changes the state of the switch. The `onClick` attribute\nis omitted from the cell, and the `onChange` exists on the switch as normal.\n\n#### Compact Cell\n\n<Canvas of={SwitchBestPracticesStories.InsideCell} />\n\n#### Detailed Cell\n\nIn the detailed cell, the title should change the state of the switch, and the description should\nnot.\n\n<Canvas of={SwitchBestPracticesStories.InsideDetailCell} />\n\n### With a Tooltip\n\nThe switch can be wrapped with a tooltip that describes the purpose and state of the switch.\n\n<Canvas of={SwitchBestPracticesStories.WithTooltip} />\n\n### References\n\nFor more details, see the [Accessibility section](https://www.w3.org/WAI/ARIA/apg/patterns/switch/#wai-ariaroles,states,andproperties) in w3.org.\n"}}},"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs-navigationtabitem":{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs-navigationtabitem","name":"NavigationTabItem","path":"./__docs__/wonder-blocks-tabs/navigation-tab-item.stories.tsx","stories":[{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs-navigationtabitem--default","name":"Default","snippet":"const Default = () => <NavigationTabItem><Link href=\"#link\">Navigation tab item</Link></NavigationTabItem>;"},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs-navigationtabitem--custom-style","name":"Custom Style","snippet":"const CustomStyle = () => <NavigationTabItem\n    style={{\n        border: `${border.width.medium} dashed ${semanticColor.core.border.neutral.subtle}`,\n    }}><Link href=\"#link\">Navigation tab item</Link></NavigationTabItem>;","description":"Custom styles can be set for the NavigationTabItem. For custom link styling, prefer applying the styles to the `Link` component. Note: The `NavigationTabItem` will also set styles to the `Link` child component. If there is a specific use case where the styling needs to be overridden, please reach out to the Wonder Blocks team!"}],"import":"import { ComponentInfo, NavigationTabItem } from \"@khanacademy/wonder-blocks-tabs\";\nimport Link from \"@khanacademy/wonder-blocks-link\";","jsDocTags":{},"description":"A component for a tab item in NavigationTabs. It is used with a Link component. ## Usage ```jsx import {NavigationTab, NavigationTabItem} from \"@khanacademy/wonder-blocks-tabs\"; import Link from \"@khanacademy/wonder-blocks-link\"; <NavigationTabs> <NavigationTabItem> <Link href=\"/link-1\">Link 1</Link> </NavigationTabItem> <NavigationTabItem> <Link href=\"/link-2\">Link 2</Link> </NavigationTabItem> </NavigationTabs> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-tabs/src/index.ts","description":"A component for a tab item in NavigationTabs. It is used with a Link\ncomponent.\n\n## Usage\n\n```jsx\nimport {NavigationTab, NavigationTabItem} from \"@khanacademy/wonder-blocks-tabs\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\n\n<NavigationTabs>\n <NavigationTabItem>\n   <Link href=\"/link-1\">Link 1</Link>\n </NavigationTabItem>\n <NavigationTabItem>\n   <Link href=\"/link-2\">Link 2</Link>\n </NavigationTabItem>\n</NavigationTabs>\n```","displayName":"NavigationTabItem","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"children":{"defaultValue":null,"description":"The `Link` to render for the navigation tab item.\n\nWhen a `Link` component is passed in for the `children` prop,\n`NavigationTabItem` will inject props for the `Link`. For specific use\ncases where the `Link` component is wrapped by another component (like a\n`Tooltip` or `Popover`), a render function can be used instead. The\nrender function provides the Link props that should be applied to the\nLink component.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tab-item.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | ((linkProps: NavigationTabItemLinkProps) => ReactElement<any, string | JSXElementConstructor<any>>)"}},"id":{"defaultValue":null,"description":"An id for the root element.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tab-item.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tab-item.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"current":{"defaultValue":null,"description":"If the `NavigationTabItem` is the current page. If `true`, current\nstyling and aria-current=page will be applied to the Link.\n\nNote: NavigationTabs provides the styling for the current tab item.","name":"current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tab-item.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"style":{"defaultValue":null,"description":"Custom styles for overriding default styles. For custom link styling,\nprefer applying the styles to the `Link` component. Note: The\n`NavigationTabItem` will also set styles to the `Link` child component.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tab-item.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLLIElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"NavigationTabItem"}},"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabsdropdown":{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabsdropdown","name":"NavigationTabsDropdown","path":"./__docs__/wonder-blocks-tabs/navigation-tabs-dropdown.stories.tsx","stories":[{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabsdropdown--default","name":"Default","snippet":"const Default = (\n    props: PropsFor<typeof NavigationTabsDropdown>,\n) => {\n    const {selectedTabId: initialSelectedTabId, ...restProps} = props;\n    const [selectedTabId, setSelectedTabId] =\n        React.useState(initialSelectedTabId);\n\n    return (\n        <NavigationTabsDropdown\n            {...restProps}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n        />\n    );\n};"},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabsdropdown--tab-icons","name":"Tab Icons","snippet":"const TabIcons = (\n    props: PropsFor<typeof NavigationTabsDropdown>,\n) => {\n    const {selectedTabId: initialSelectedTabId, ...restProps} = props;\n    const [selectedTabId, setSelectedTabId] =\n        React.useState(initialSelectedTabId);\n\n    return (\n        <NavigationTabsDropdown\n            {...restProps}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n        />\n    );\n};","description":"The navigation tab items can be provided with an icon."},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabsdropdown--show-divider","name":"Show Divider","snippet":"const ShowDivider = (\n    props: PropsFor<typeof NavigationTabsDropdown>,\n) => {\n    const {selectedTabId: initialSelectedTabId, ...restProps} = props;\n    const [selectedTabId, setSelectedTabId] =\n        React.useState(initialSelectedTabId);\n\n    return (\n        <NavigationTabsDropdown\n            {...restProps}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n        />\n    );\n};","description":"Use the `showDivider` prop to show a divider under the tabs. `showDivider` is `false` by default."}],"import":"import { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { NavigationTabsDropdown } from \"@khanacademy/wonder-blocks-tabs\";","jsDocTags":{},"description":"The NavigationTabsDropdown component is used to represent navigation tabs in an ActionMenu when there is not enough horizontal space to render the tabs as a horizontal layout. Unlike TabsDropdown, this component uses links for navigation instead of managing tab panels.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","description":"The NavigationTabsDropdown component is used to represent navigation tabs\nin an ActionMenu when there is not enough horizontal space to render the\ntabs as a horizontal layout. Unlike TabsDropdown, this component uses links\nfor navigation instead of managing tab panels.","displayName":"NavigationTabsDropdown","methods":[],"props":{"tabs":{"defaultValue":null,"description":"The navigation tabs to render in the dropdown.","name":"tabs","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"NavigationTabDropdownItem[]"}},"selectedTabId":{"defaultValue":null,"description":"The id of the tab that is selected (current page).\n\nIf the selectedTabId is not valid, the `labels.defaultOpenerLabel` will\nbe used to label the dropdown opener.","name":"selectedTabId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"onTabSelected":{"defaultValue":null,"description":"Called when a navigation tab is selected.","name":"onTabSelected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((id: string) => unknown)"}},"id":{"defaultValue":null,"description":"A unique id for the component. If not provided, a unique base id will be\ngenerated automatically.\n\nHere is how the id is used for the different elements in the component:\n- The root will have an id of `${id}`\n- The opener will have an id of `${id}-opener`","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.\n\nHere is how the testId is used for the different elements in the component:\n- The root will have a testId of `${testId}`\n- The opener will have a testId of `${testId}-opener`","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Accessible label for the navigation element.\n\nIt is important to provide a unique aria-label if there are multiple\nnavigation elements on the page.\n\nIf there is a visual label for the navigation tabs already, use\n`aria-labelledby` instead.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"If there is a visual label for the navigation tabs already, set\n`aria-labelledby` to the `id` of the element that labels the navigation\ntabs.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"labels":{"defaultValue":null,"description":"Labels for the dropdown.","name":"labels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ defaultOpenerLabel?: string; }"}},"opened":{"defaultValue":null,"description":"Can be used to override the opened state for the dropdown.","name":"opened","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"tag":{"defaultValue":null,"description":"The HTML tag to use for the root element. Defaults to \"nav\".","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in NavigationTabsDropdown.\n- `root`: Styles the root element.\n- `actionMenu`: Styles the ActionMenu.\n- `opener`: Styles the opener button.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; actionMenu?: StyleType; opener?: StyleType; }"}},"showDivider":{"defaultValue":null,"description":"Whether to show a divider under the tabs. Defaults to `false`.","name":"showDivider","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"NavigationTabsDropdown"}},"packages-tabs-responsivenavigationtabs":{"id":"packages-tabs-responsivenavigationtabs","name":"ResponsiveNavigationTabs","path":"./__docs__/wonder-blocks-tabs/responsive-navigation-tabs.stories.tsx","stories":[{"id":"packages-tabs-responsivenavigationtabs--default","name":"Default","snippet":"const Default = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <ResponsiveNavigationTabs\n            tabs={[\n                {\n                    label: \"Navigation Tab 1\",\n                    id: \"tab-1\",\n                    href: \"#tab-1\",\n                },\n                {\n                    label: \"Navigation Tab 2\",\n                    id: \"tab-2\",\n                    href: \"#tab-2\",\n                },\n                {\n                    label: \"Navigation Tab 3\",\n                    id: \"tab-3\",\n                    href: \"#tab-3\",\n                },\n                {\n                    label: \"Navigation Tab 4\",\n                    id: \"tab-4\",\n                    href: \"#tab-4\",\n                },\n                {\n                    label: \"Navigation Tab 5\",\n                    id: \"tab-5\",\n                    href: \"#tab-5\",\n                },\n                {\n                    label: \"Navigation Tab 6\",\n                    id: \"tab-6\",\n                    href: \"#tab-6\",\n                },\n            ]}\n            showDivider\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId} />\n    );\n};"},{"id":"packages-tabs-responsivenavigationtabs--interactive","name":"Interactive","snippet":"const Interactive = () => {\n    const [tabsCount, setTabsCount] = React.useState(INITIAL_TABS_COUNT);\n    const [showLongLabels, setShowLongLabels] = React.useState(false);\n    const [showIcons, setShowIcons] = React.useState(false);\n\n    const tabs = new Array(tabsCount).fill(0).map((_, index) => ({\n        label: showLongLabels\n            ? `Navigation tab ${index + 1} with a long label`\n            : `Navigation tab ${index + 1}`,\n        id: `tab-${index + 1}`,\n        href: `#tab-${index + 1}`,\n        icon: showIcons ? (\n            <PhosphorIcon icon={IconMappings.cookieBold} />\n        ) : undefined,\n    }));\n\n    const [containerWidth, setContainerWidth] = React.useState<\n        string | undefined\n    >(undefined);\n\n    const [zoomLevel, setZoomLevel] = React.useState<number | undefined>(\n        undefined,\n    );\n\n    return (\n        <View\n            style={{\n                gap: sizing.size_360,\n            }}>\n            <View style={{width: containerWidth, zoom: zoomLevel ?? \"100%\"}}>\n                <ControlledResponsiveNavigationTabs selectedTabId=\"tab-1\" onTabSelected={() => {}} tabs={tabs} />\n            </View>\n            <View\n                style={{\n                    flexDirection: \"row\",\n                    gap: sizing.size_160,\n                    flexWrap: \"wrap\",\n                }}>\n                <Button onClick={() => setShowLongLabels(!showLongLabels)}>Update tab labels\n                                        </Button>\n                <Button onClick={() => setTabsCount(tabsCount + 1)}>Add a tab\n                                        </Button>\n                <Button\n                    onClick={() => {\n                        if (tabsCount > 1) {\n                            setTabsCount(tabsCount - 1);\n                        }\n                    }}>Remove a tab\n                                        </Button>\n                <Button\n                    onClick={() => {\n                        setContainerWidth(\n                            containerWidth === undefined\n                                ? \"200px\"\n                                : undefined,\n                        );\n                    }}>Change container width\n                                        </Button>\n                <Button\n                    onClick={() => {\n                        setZoomLevel(\n                            zoomLevel === undefined ? 4 : undefined,\n                        );\n                    }}>Simulate zoom\n                                        </Button>\n                <Button onClick={() => setShowIcons(!showIcons)}>Toggle icons\n                                        </Button>\n            </View>\n        </View>\n    );\n};","description":"ResponsiveNavigationTabs will switch between the NavigationTabs and NavigationTabsDropdown layouts based on if there is enough horizontal space to display the tabs. Some things that can affect this are: - the length of tab labels, especially with translated text - the number of tabs - the width of the container or screen - the zoom level"},{"id":"packages-tabs-responsivenavigationtabs--custom-styles","name":"Custom Styles","error":{"name":"SyntaxError","message":"Expected render to be an arrow function or function expression\n  210 |  */\n  211 | export const CustomStyles: Story = {\n> 212 |     render: Interactive.render,\n      |             ^^^^^^^^^^^^^^^^^^\n  213 |     args: {\n  214 |         styles: {\n  215 |             root: {"}},{"id":"packages-tabs-responsivenavigationtabs--tab-item-aria-label","name":"Tab Item Aria Label","snippet":"const TabItemAriaLabel = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <ResponsiveNavigationTabs\n            tabs={[\n                {\n                    label: \"Navigation tab 1\",\n                    id: \"tab-1\",\n                    href: \"#tab-1\",\n                    \"aria-label\": \"Tab 1 aria-label\",\n                },\n                {\n                    label: \"Navigation tab 2\",\n                    id: \"tab-2\",\n                    href: \"#tab-2\",\n                    \"aria-label\": \"Tab 2 aria-label\",\n                },\n                {\n                    label: \"Navigation tab 3\",\n                    id: \"tab-3\",\n                    href: \"#tab-3\",\n                    \"aria-label\": \"Tab 3 aria-label\",\n                },\n            ]}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId} />\n    );\n};","description":"The tab items can be provided with an aria-label."},{"id":"packages-tabs-responsivenavigationtabs--tab-icons","name":"Tab Icons","snippet":"const TabIcons = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <ResponsiveNavigationTabs\n            tabs={[\n                {\n                    label: \"Tab 1 with Phosphor icon\",\n                    id: \"tab-1\",\n                    href: \"#tab-1\",\n                    icon: (\n                        <PhosphorIcon\n                            icon={IconMappings.cookieBold}\n                            aria-label=\"Cookie\"\n                        />\n                    ),\n                },\n                {\n                    label: \"Tab 2 with custom icon\",\n                    id: \"tab-2\",\n                    href: \"#tab-2\",\n                    icon: (\n                        <Icon>\n                            <img src=\"logo.svg\" alt=\"Wonder Blocks\" />\n                        </Icon>\n                    ),\n                },\n                {\n                    label: \"Tab 3 with presentational icon\",\n                    id: \"tab-3\",\n                    href: \"#tab-3\",\n                    icon: (\n                        <PhosphorIcon\n                            icon={IconMappings.iceCream}\n                            aria-hidden={true}\n                        />\n                    ),\n                },\n                {\n                    label: \"Tab 4 with no icon\",\n                    id: \"tab-4\",\n                    href: \"#tab-4\",\n                },\n            ]}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId} />\n    );\n};","description":"ResponsiveNavigationTabs can include icons to provide visual context. Icons are displayed in both tabs and dropdown layouts."},{"id":"packages-tabs-responsivenavigationtabs--show-divider","name":"Show Divider","snippet":"const ShowDivider = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <ResponsiveNavigationTabs\n            tabs={[\n                {\n                    label: \"Navigation tab 1\",\n                    id: \"tab-1\",\n                    href: \"#tab-1\",\n                },\n                {\n                    label: \"Navigation tab 2\",\n                    id: \"tab-2\",\n                    href: \"#tab-2\",\n                },\n                {\n                    label: \"Navigation tab 3\",\n                    id: \"tab-3\",\n                    href: \"#tab-3\",\n                },\n            ]}\n            showDivider\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId} />\n    );\n};","description":"Use the `showDivider` prop to show a divider under the tabs. `showDivider` is `false` by default."},{"id":"packages-tabs-responsivenavigationtabs--customizing-tabs-and-dropdown-props","name":"Customizing Tabs And Dropdown Props","snippet":"const CustomizingTabsAndDropdownProps = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <ResponsiveNavigationTabs\n            tabs={[\n                {label: \"Navigation Tab 1\", id: \"tab-1\", href: \"#tab-1\"},\n                {label: \"Navigation Tab 2\", id: \"tab-2\", href: \"#tab-2\"},\n                {label: \"Navigation Tab 3\", id: \"tab-3\", href: \"#tab-3\"},\n            ]}\n            tabsProps={{\n                animated: true,\n            }}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId} />\n    );\n};","description":"Use the `tabsProps` and `dropdownProps` props to customize the tabs and dropdown. For example, you can enable animation for the tabs layout. See the `NavigationTabs` and `NavigationTabsDropdown` docs for more details."}],"import":"import Button from \"@khanacademy/wonder-blocks-button\";\nimport { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { ResponsiveNavigationTabs } from \"@khanacademy/wonder-blocks-tabs\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"Renders NavigationTabs when there is enough horizontal space to display the tabs. When there is not enough space, it renders NavigationTabsDropdown. If the tabs are not links, use ResponsiveTabs instead, which implements different semantics and keyboard interactions. Prefer using ResponsiveNavigationTabs instead of NavigationTabs. For cases where the tabs should always be in a horizontal layout, use the NavigationTabs component directly. Note: This component switches layouts depending on factors like the container width, the number of tabs, the length of tab labels, zoom level, etc. Once the horizontal NavigationTabs need to start scrolling horizontally, the component will switch to the dropdown.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-tabs/src/index.ts","description":"Renders NavigationTabs when there is enough horizontal space to display the\ntabs. When there is not enough space, it renders NavigationTabsDropdown. If\nthe tabs are not links, use ResponsiveTabs instead, which implements different\nsemantics and keyboard interactions.\n\nPrefer using ResponsiveNavigationTabs instead of NavigationTabs. For cases\nwhere the tabs should always be in a horizontal layout, use the NavigationTabs\ncomponent directly.\n\nNote: This component switches layouts depending on factors like the container\nwidth, the number of tabs, the length of tab labels, zoom level, etc. Once the\nhorizontal NavigationTabs need to start scrolling horizontally, the component\nwill switch to the dropdown.","displayName":"ResponsiveNavigationTabs","methods":[],"props":{"id":{"defaultValue":null,"description":"A unique id for the component.\n\nHere is how the id is used for the different elements in the component:\n- The root will have an id of `${id}`\n\nTo set the id of the navigation tabs or dropdown, set the `id` prop in\nthe props: `tabsProps` or `dropdownProps`.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.\n\nHere is how the test id is used for the different elements in the component:\n- The root will have a testId of `${testId}`\n\nTo set the test id of the navigation tabs or dropdown, set the `testId`\nprop in the props: `tabsProps` or `dropdownProps`.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabs":{"defaultValue":null,"description":"The navigation tabs to render.","name":"tabs","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ResponsiveNavigationTabItem[]"}},"selectedTabId":{"defaultValue":null,"description":"The id of the tab that is selected (current page).","name":"selectedTabId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"onTabSelected":{"defaultValue":null,"description":"Called when a navigation tab is selected.","name":"onTabSelected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((id: string) => void)"}},"onLayoutChange":{"defaultValue":null,"description":"Called when the layout changes between NavigationTabs and\nNavigationTabsDropdown.","name":"onLayoutChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((layout: \"dropdown\" | \"tabs\") => void)"}},"tabsProps":{"defaultValue":null,"description":"Additional props to pass to the NavigationTabs component when it is used.\n\nNote: This prop doesn't include the props that are available on the\nResponsiveNavigationTabs component already.","name":"tabsProps","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"Omit<NavigationTabsProps, \"aria-label\" | \"aria-labelledby\" | \"children\" | \"tag\">"}},"dropdownProps":{"defaultValue":null,"description":"Additional props to pass to the NavigationTabsDropdown component when it\nis used.\n\nNote: This prop doesn't include the props that are available on the\nResponsiveNavigationTabs component already.","name":"dropdownProps","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"Omit<NavigationTabsDropdownProps, \"aria-label\" | \"aria-labelledby\" | \"tag\" | \"tabs\" | \"selectedTabId\" | \"onTabSelected\">"}},"styles":{"defaultValue":null,"description":"Custom styles for the ResponsiveNavigationTabs component.\n- `root`: Styles the root container element.\n\nTo customize the styles of the navigation tabs or dropdown, set the\n`styles` prop on the `tabsProps` or `dropdownProps` props. See the\n`NavigationTabs` and `NavigationTabsDropdown` docs for more details.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; }"}},"aria-label":{"defaultValue":null,"description":"Accessible label for the navigation element.\n\nIt is important to provide a unique aria-label if there are multiple\nnavigation elements on the page.\n\nIf there is a visual label for the navigation tabs already, use\n`aria-labelledby` instead.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"If there is a visual label for the navigation tabs already, set\n`aria-labelledby` to the `id` of the element that labels the navigation\ntabs.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tag":{"defaultValue":null,"description":"The HTML tag to use. Defaults to `nav` in both layouts.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"showDivider":{"defaultValue":null,"description":"Whether to show a divider under the tabs. Defaults to `false`.","name":"showDivider","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}}},"exportName":"ResponsiveNavigationTabs"}},"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs":{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs","name":"NavigationTabs","path":"./__docs__/wonder-blocks-tabs/navigation-tabs.stories.tsx","stories":[{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--default","name":"Default","snippet":"const Default = () => <NavigationTabs>{navigationTabItems}</NavigationTabs>;"},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--with-icons","name":"With Icons","snippet":"const WithIcons = () => <NavigationTabs>{[\n        <NavigationTabItem key=\"with-icons-1\">\n            <Link href=\"https://khanacademy.org\" target=\"_blank\">\n                External Link\n            </Link>\n        </NavigationTabItem>,\n        <NavigationTabItem key=\"with-icons-2\">\n            <Link\n                href=\"#link2\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.cookie} size=\"small\" />\n                }\n            >\n                Start Icon\n            </Link>\n        </NavigationTabItem>,\n        <NavigationTabItem key=\"with-icons-3\">\n            <Link\n                href=\"#link3\"\n                endIcon={\n                    <PhosphorIcon\n                        icon={IconMappings.iceCream}\n                        size=\"small\"\n                    />\n                }\n            >\n                End Icon\n            </Link>\n        </NavigationTabItem>,\n        <NavigationTabItem current={true} key=\"with-icons-4\">\n            <Link\n                href=\"#link4\"\n                startIcon={\n                    <PhosphorIcon icon={IconMappings.cookie} size=\"small\" />\n                }\n                endIcon={\n                    <PhosphorIcon\n                        icon={IconMappings.iceCream}\n                        size=\"small\"\n                    />\n                }\n            >\n                Start and End Icons\n            </Link>\n        </NavigationTabItem>,\n    ]}</NavigationTabs>;","description":"Use the `Link` props for setting things like icons."},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => <NavigationTabs\n    styles={{\n        root: {\n            padding: sizing.size_160,\n        },\n        list: {\n            gap: sizing.size_400,\n        },\n    }}>{navigationTabItems}</NavigationTabs>;","description":"Custom styles can be set for the elements in NavigationTabs using the `styles` prop. If there is a specific use case where the styling needs to be overridden, please reach out to the Wonder Blocks team!"},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--header-with-navigation-tabs-example","name":"Header With Navigation Tabs Example","snippet":"const HeaderWithNavigationTabsExample = () => {\n    // Putting styles in the component so it shows in the code snippet\n    const headerVerticalSpacing = sizing.size_120;\n    const styles = StyleSheet.create({\n        pageStyle: {\n            backgroundColor: semanticColor.core.background.base.subtle,\n            height: \"100vh\",\n            width: \"100vw\",\n        },\n        headerStyle: {\n            backgroundColor: semanticColor.core.background.base.default,\n            display: \"flex\",\n            alignItems: \"center\",\n            flexWrap: \"wrap\",\n            borderBlockEnd: `1px solid ${semanticColor.core.border.neutral.subtle}`,\n            gap: sizing.size_240,\n            padding: `${headerVerticalSpacing} ${sizing.size_240}`,\n        },\n        navigationTabsRoot: {\n            // set margin to negative value of header vertical spacing so\n            // that selected indicator lines up with header border\n            margin: `calc(${headerVerticalSpacing} * -1) 0`,\n        },\n    });\n    const [currentTab, setCurrentTab] = React.useState(0);\n    const tabs = Array(4)\n        .fill(0)\n        .map((_, index) => (\n            <NavigationTabItem current={currentTab === index} key={index}>\n                <Link href=\"#link-1\" onClick={() => setCurrentTab(index)}>\n                    {`Tab ${index + 1}`}\n                </Link>\n            </NavigationTabItem>\n        ));\n\n    return (\n        <StyledDiv style={styles.pageStyle}>\n            <StyledHeader style={styles.headerStyle}>\n                <img src=\"logo-with-text.svg\" width=\"80px\" alt=\"Wonder Blocks logo\" />\n                <SingleSelect\n                    aria-label=\"Example select\"\n                    placeholder=\"Placeholder\"\n                    selectedValue={\"item-1\"}\n                    onChange={() => {}}\n                    style={{width: \"200px\"}}>\n                    <OptionItem value=\"item-1\" label=\"Item 1\" />\n                    <OptionItem value=\"item-2\" label=\"Item 2\" />\n                </SingleSelect>\n                <NavigationTabs\n                    animated\n                    aria-label=\"Secondary navigation\"\n                    styles={{root: styles.navigationTabsRoot}}>\n                    {tabs}\n                </NavigationTabs>\n            </StyledHeader>\n        </StyledDiv>\n    );\n};","description":"Here is an example of the `NavigationTabs` component used within a header. Note: To line up the header bottom border with the NavigationTabs underline styling, a negative vertical margin is set on the `NavigationTabs`."},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--animated","name":"Animated","snippet":"const Animated = () => {\n    const [currentTab, setCurrentTab] = React.useState(0);\n    const tabs = Array(4)\n        .fill(0)\n        .map((_, index) => (\n            <NavigationTabItem current={currentTab === index} key={index}>\n                <Link href=\"#link-1\" onClick={() => setCurrentTab(index)}>\n                    {index % 2 === 0\n                        ? `Navigation tab item ${index + 1}`\n                        : `Item ${index + 1}`}\n                </Link>\n            </NavigationTabItem>\n        ));\n    return <NavigationTabs animated>{tabs}</NavigationTabs>;\n};","description":"The `animated` prop can be set to `true` to animate the current underline indicator. By default, `animated` is set to `false`."},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--animations-disabled","name":"Animations Disabled","snippet":"const AnimationsDisabled = () => <NavigationTabs animated={false} />;","description":"When the `animated` prop is `false`, there is no animation when the current tab changes.  By default, `animated` is set to `false`."},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--no-current-tab","name":"No Current Tab","snippet":"const NoCurrentTab = () => {\n    const [currentTab, setCurrentTab] = React.useState(-1);\n    const tabs = Array(4)\n        .fill(0)\n        .map((_, index) => (\n            <NavigationTabItem current={currentTab === index} key={index}>\n                <Link href=\"#link-1\" onClick={() => setCurrentTab(index)}>\n                    {index % 2 === 0\n                        ? `Navigation tab item ${index + 1}`\n                        : `Item ${index + 1}`}\n                </Link>\n            </NavigationTabItem>\n        ));\n    return <NavigationTabs animated>{tabs}</NavigationTabs>;\n};","description":"This story shows the behaviour when none of the tabs are the current page initially."},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--children-render-function","name":"Children Render Function","snippet":"const ChildrenRenderFunction = () => <NavigationTabs />;","description":"When a `Link` component is passed in for the `children` prop, `NavigationTabItem` will inject props for the `Link`. For specific use cases where the `Link` component is wrapped by another component (like a `Tooltip` or `Popover`), a render function can be used instead. The render function provides the Link props that should be applied to the Link component. The Link props contains styles and attributes for accessibility like `aria-current`. This story demonstrates how a render function could be used to wrap a `Link` in a `NavigationTabItem` with a `Tooltip` and a `Popover`. Please test for accessibility for your use case, especially around focus management, keyboard interactions, and screenreader support! #### Current screenreader behaviour ##### Tooltips ###### ** Expected behaviour: ** The tooltip content is announced when a Link in the NavigationTabs is focused - Chrome + NVDA: Works as expected - the tooltip content is announced - Firefox + NVDA: Only announces the tooltip contents if the tooltip is already opened - Safari + VoiceOver: Does not consistently read the tooltip contents when the link is focused ##### Popovers ###### ** Expected behaviour: ** Focusing on a link with a popover will announce that it is expanded or collapsed. - Chrome + NVDA, Firefox + NVDA: Works as expected - it is announced that the tab is expanded or collapsed when it is focused. - Safari + VoiceOver: Does not communicate expanded or collapsed state. ###### ** Expected behaviour: ** A popover that is already opened is in the tab order - Chrome + NVDA, Firefox + NVDA, Safari + VoiceOver: The popover contents can be tabbed to. - The popover focus management is handled by the `Popover` component, see the `Popover Accessibility` docs for more details. ###### ** Expected behaviour: ** Selecting a tab with a popover (using `Space` or `Enter`) will open the popover and navigate the user - Chrome + NVDA, Firefox + NVDA, Safari + VoiceOver: Works as expected - the popover is opened and the browser navigates. The popover contents are announced and can be interacted with. - The popover focus management is handled by the `Popover` component, see the `Popover Accessibility` docs for more details."},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--tag","name":"Tag","snippet":"const Tag = () => <NavigationTabs tag=\"div\">{navigationTabItems}</NavigationTabs>;","description":"By default, the `NavigationTabs` component renders as a `nav` element. If the underlying element needs to be changed, the `tag` prop can be used to specify the HTML tag to render."},{"id":"packages-tabs-responsivenavigationtabs-subcomponents-navigationtabs--show-divider","name":"Show Divider","snippet":"const ShowDivider = () => <NavigationTabs showDivider>{navigationTabItems}</NavigationTabs>;","description":"Use the `showDivider` prop to show a divider under the tabs. `showDivider` is `false` by default."}],"import":"import { ComponentInfo, NavigationTabItem, NavigationTabs } from \"@khanacademy/wonder-blocks-tabs\";\nimport { Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport { OptionItem, SingleSelect } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { Popover, PopoverContent } from \"@khanacademy/wonder-blocks-popover\";\nimport Tooltip from \"@khanacademy/wonder-blocks-tooltip\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"The `NavigationTabs` component is a tabbed interface for link navigation. The tabs are links and keyboard users can change tabs using tab. The `NavigationTabs` component is used with `NavigationTabItem` and `Link` components. If the tabs should not be links, see the `Tabs` component, which implements different semantics and keyboard interactions. ## Usage ```jsx import {NavigationTab, NavigationTabItem} from \"@khanacademy/wonder-blocks-tabs\"; import Link from \"@khanacademy/wonder-blocks-link\"; <NavigationTabs> <NavigationTabItem> <Link href=\"/link-1\">Link 1</Link> </NavigationTabItem> <NavigationTabItem> <Link href=\"/link-2\">Link 2</Link> </NavigationTabItem> </NavigationTabs> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-tabs/src/index.ts","description":"The `NavigationTabs` component is a tabbed interface for link navigation.\nThe tabs are links and keyboard users can change tabs using tab.\nThe `NavigationTabs` component is used with `NavigationTabItem` and `Link`\ncomponents. If the tabs should not be links, see the `Tabs` component,\nwhich implements different semantics and keyboard interactions.\n\n## Usage\n\n```jsx\nimport {NavigationTab, NavigationTabItem} from \"@khanacademy/wonder-blocks-tabs\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\n\n<NavigationTabs>\n <NavigationTabItem>\n   <Link href=\"/link-1\">Link 1</Link>\n </NavigationTabItem>\n <NavigationTabItem>\n   <Link href=\"/link-2\">Link 2</Link>\n </NavigationTabItem>\n</NavigationTabs>\n```","displayName":"NavigationTabs","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\nAccessible label for the navigation element.\n\nIt is important to provide a unique aria-label if there are multiple\nnavigation elements on the page.\n\nIf there is a visual label for the navigation tabs already, use\n`aria-labelledby` instead.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\nIf there is a visual label for the navigation tabs already, set\n`aria-labelledby` to the `id` of the element that labels the navigation\ntabs.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"children":{"defaultValue":null,"description":"The NavigationTabItem components to render.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[]"}},"id":{"defaultValue":null,"description":"An id for the navigation element.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"styles":{"defaultValue":null,"description":"Custom styles for the elements in NavigationTabs.\n- `root`: Styles the root `nav` element.\n- `list`: Styles the underlying `ul` element that wraps the\n`NavigationTabItem` components","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; list?: StyleType; }"}},"animated":{"defaultValue":null,"description":"Whether to include animation in the `NavigationTabs`. This should be false\nif the user has `prefers-reduced-motion` opted in. Defaults to `false`.","name":"animated","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"tag":{"defaultValue":null,"description":"The HTML tag to render. Defaults to `nav`.","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"keyof IntrinsicElements","value":[{"value":"\"symbol\""},{"value":"\"object\""},{"value":"\"search\""},{"value":"\"big\""},{"value":"\"link\""},{"value":"\"small\""},{"value":"\"sub\""},{"value":"\"sup\""},{"value":"\"style\""},{"value":"\"time\""},{"value":"\"menu\""},{"value":"\"dialog\""},{"value":"\"text\""},{"value":"\"article\""},{"value":"\"button\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"img\""},{"value":"\"main\""},{"value":"\"menuitem\""},{"value":"\"option\""},{"value":"\"switch\""},{"value":"\"table\""},{"value":"\"header\""},{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""},{"value":"\"span\""},{"value":"\"title\""},{"value":"\"p\""},{"value":"\"map\""},{"value":"\"filter\""},{"value":"\"a\""},{"value":"\"abbr\""},{"value":"\"address\""},{"value":"\"area\""},{"value":"\"aside\""},{"value":"\"audio\""},{"value":"\"b\""},{"value":"\"base\""},{"value":"\"bdi\""},{"value":"\"bdo\""},{"value":"\"blockquote\""},{"value":"\"body\""},{"value":"\"br\""},{"value":"\"canvas\""},{"value":"\"caption\""},{"value":"\"center\""},{"value":"\"cite\""},{"value":"\"code\""},{"value":"\"col\""},{"value":"\"colgroup\""},{"value":"\"data\""},{"value":"\"datalist\""},{"value":"\"dd\""},{"value":"\"del\""},{"value":"\"details\""},{"value":"\"dfn\""},{"value":"\"div\""},{"value":"\"dl\""},{"value":"\"dt\""},{"value":"\"em\""},{"value":"\"embed\""},{"value":"\"fieldset\""},{"value":"\"figcaption\""},{"value":"\"footer\""},{"value":"\"head\""},{"value":"\"hgroup\""},{"value":"\"hr\""},{"value":"\"html\""},{"value":"\"i\""},{"value":"\"iframe\""},{"value":"\"input\""},{"value":"\"ins\""},{"value":"\"kbd\""},{"value":"\"keygen\""},{"value":"\"label\""},{"value":"\"legend\""},{"value":"\"li\""},{"value":"\"mark\""},{"value":"\"meta\""},{"value":"\"meter\""},{"value":"\"nav\""},{"value":"\"noindex\""},{"value":"\"noscript\""},{"value":"\"ol\""},{"value":"\"optgroup\""},{"value":"\"output\""},{"value":"\"param\""},{"value":"\"picture\""},{"value":"\"pre\""},{"value":"\"progress\""},{"value":"\"q\""},{"value":"\"rp\""},{"value":"\"rt\""},{"value":"\"ruby\""},{"value":"\"s\""},{"value":"\"samp\""},{"value":"\"slot\""},{"value":"\"script\""},{"value":"\"section\""},{"value":"\"select\""},{"value":"\"source\""},{"value":"\"strong\""},{"value":"\"summary\""},{"value":"\"template\""},{"value":"\"tbody\""},{"value":"\"td\""},{"value":"\"textarea\""},{"value":"\"tfoot\""},{"value":"\"th\""},{"value":"\"thead\""},{"value":"\"tr\""},{"value":"\"track\""},{"value":"\"u\""},{"value":"\"ul\""},{"value":"\"var\""},{"value":"\"video\""},{"value":"\"wbr\""},{"value":"\"webview\""},{"value":"\"svg\""},{"value":"\"animate\""},{"value":"\"animateMotion\""},{"value":"\"animateTransform\""},{"value":"\"circle\""},{"value":"\"clipPath\""},{"value":"\"defs\""},{"value":"\"desc\""},{"value":"\"ellipse\""},{"value":"\"feBlend\""},{"value":"\"feColorMatrix\""},{"value":"\"feComponentTransfer\""},{"value":"\"feComposite\""},{"value":"\"feConvolveMatrix\""},{"value":"\"feDiffuseLighting\""},{"value":"\"feDisplacementMap\""},{"value":"\"feDistantLight\""},{"value":"\"feDropShadow\""},{"value":"\"feFlood\""},{"value":"\"feFuncA\""},{"value":"\"feFuncB\""},{"value":"\"feFuncG\""},{"value":"\"feFuncR\""},{"value":"\"feGaussianBlur\""},{"value":"\"feImage\""},{"value":"\"feMerge\""},{"value":"\"feMergeNode\""},{"value":"\"feMorphology\""},{"value":"\"feOffset\""},{"value":"\"fePointLight\""},{"value":"\"feSpecularLighting\""},{"value":"\"feSpotLight\""},{"value":"\"feTile\""},{"value":"\"feTurbulence\""},{"value":"\"foreignObject\""},{"value":"\"g\""},{"value":"\"image\""},{"value":"\"line\""},{"value":"\"linearGradient\""},{"value":"\"marker\""},{"value":"\"mask\""},{"value":"\"metadata\""},{"value":"\"mpath\""},{"value":"\"path\""},{"value":"\"pattern\""},{"value":"\"polygon\""},{"value":"\"polyline\""},{"value":"\"radialGradient\""},{"value":"\"rect\""},{"value":"\"set\""},{"value":"\"stop\""},{"value":"\"textPath\""},{"value":"\"tspan\""},{"value":"\"use\""},{"value":"\"view\""}]}},"showDivider":{"defaultValue":null,"description":"Whether to show a divider under the tabs. Defaults to `false`.","name":"showDivider","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/navigation-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"NavigationTabs"}},"packages-tabs-responsivetabs":{"id":"packages-tabs-responsivetabs","name":"ResponsiveTabs","path":"./__docs__/wonder-blocks-tabs/responsive-tabs.stories.tsx","stories":[{"id":"packages-tabs-responsivetabs--default","name":"Default","snippet":"const Default = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <View>\n            <ResponsiveTabs\n                tabs={[\n                    {label: \"Tab 1\", id: \"tab-1\", panel: <div>Tab contents 1</div>},\n                    {label: \"Tab 2\", id: \"tab-2\", panel: <div>Tab contents 2</div>},\n                    {label: \"Tab 3\", id: \"tab-3\", panel: <div>Tab contents 3</div>},\n                    {label: \"Tab 4\", id: \"tab-4\", panel: <div>Tab contents 4</div>},\n                    {label: \"Tab 5\", id: \"tab-5\", panel: <div>Tab contents 5</div>},\n                    {label: \"Tab 6\", id: \"tab-6\", panel: <div>Tab contents 6</div>},\n                ]}\n                selectedTabId={selectedTabId}\n                onTabSelected={setSelectedTabId} />\n        </View>\n    );\n};"},{"id":"packages-tabs-responsivetabs--interactive","name":"Interactive","snippet":"const Interactive = () => {\n    const [tabsCount, setTabsCount] = React.useState(INITIAL_TABS_COUNT);\n    const [showLongLabels, setShowLongLabels] = React.useState(false);\n    const [showIcons, setShowIcons] = React.useState(false);\n    const tabs = new Array(tabsCount).fill(0).map((_, index) => ({\n        label: showLongLabels\n            ? `Tab ${index + 1} with a long label`\n            : `Tab ${index + 1}`,\n        id: `tab-${index + 1}`,\n        panel: <div>Tab contents {index + 1}</div>,\n        icon: showIcons ? (\n            <PhosphorIcon icon={IconMappings.cookieBold} />\n        ) : undefined,\n    }));\n\n    const [containerWidth, setContainerWidth] = React.useState<\n        string | undefined\n    >(undefined);\n\n    const [zoomLevel, setZoomLevel] = React.useState<number | undefined>(\n        undefined,\n    );\n\n    return (\n        <View\n            style={{\n                gap: sizing.size_360,\n            }}>\n            <View style={{width: containerWidth, zoom: zoomLevel ?? \"100%\"}}>\n                <ControlledResponsiveTabs selectedTabId=\"tab-1\" onTabSelected={() => {}} tabs={tabs} />\n            </View>\n            <View\n                style={{\n                    flexDirection: \"row\",\n                    gap: sizing.size_160,\n                    flexWrap: \"wrap\",\n                }}>\n                <Button onClick={() => setShowLongLabels(!showLongLabels)}>Update tab labels\n                                        </Button>\n                <Button onClick={() => setTabsCount(tabsCount + 1)}>Add a tab\n                                        </Button>\n                <Button\n                    onClick={() => {\n                        if (tabsCount > 1) {\n                            setTabsCount(tabsCount - 1);\n                        }\n                    }}>Remove a tab\n                                        </Button>\n                <Button\n                    onClick={() => {\n                        setContainerWidth(\n                            containerWidth === undefined\n                                ? \"200px\"\n                                : undefined,\n                        );\n                    }}>Change container width\n                                        </Button>\n                <Button\n                    onClick={() => {\n                        setZoomLevel(\n                            zoomLevel === undefined ? 4 : undefined,\n                        );\n                    }}>Simulate zoom\n                                        </Button>\n                <Button\n                    onClick={() => {\n                        setShowIcons(!showIcons);\n                    }}>Toggle icons\n                                        </Button>\n            </View>\n        </View>\n    );\n};","description":"ResponsiveTabs will switch between the tabs and dropdown layouts based on if there is enough horizontal space to display the tabs. Some things that can affect this are: - the length of tab labels, especially with translated text - the number of tabs - the width of the container or screen - the zoom level"},{"id":"packages-tabs-responsivetabs--custom-styles","name":"Custom Styles","error":{"name":"SyntaxError","message":"Expected render to be an arrow function or function expression\n  186 |  */\n  187 | export const CustomStyles: Story = {\n> 188 |     render: Interactive.render,\n      |             ^^^^^^^^^^^^^^^^^^\n  189 |     args: {\n  190 |         styles: {\n  191 |             root: {"}},{"id":"packages-tabs-responsivetabs--tab-item-aria-label","name":"Tab Item Aria Label","snippet":"const TabItemAriaLabel = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <View>\n            <ResponsiveTabs\n                tabs={[\n                    {\n                        label: \"Tab 1\",\n                        id: \"tab-1\",\n                        panel: <div>Tab contents 1</div>,\n                        \"aria-label\": \"Tab 1 aria-label\",\n                    },\n                    {\n                        label: \"Tab 2\",\n                        id: \"tab-2\",\n                        panel: <div>Tab contents 2</div>,\n                        \"aria-label\": \"Tab 2 aria-label\",\n                    },\n                    {\n                        label: \"Tab 3\",\n                        id: \"tab-3\",\n                        panel: <div>Tab contents 3</div>,\n                        \"aria-label\": \"Tab 3 aria-label\",\n                    },\n                ]}\n                selectedTabId={selectedTabId}\n                onTabSelected={setSelectedTabId} />\n        </View>\n    );\n};","description":"The tab items can be provided with an aria-label."},{"id":"packages-tabs-responsivetabs--tab-icons","name":"Tab Icons","snippet":"const TabIcons = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <View>\n            <ResponsiveTabs\n                tabs={[\n                    {\n                        label: \"Tab 1 with Phosphor icon\",\n                        id: \"tab-1\",\n                        panel: <div>Tab contents 1</div>,\n                        icon: (\n                            <PhosphorIcon\n                                icon={IconMappings.cookieBold}\n                                aria-label=\"Cookie\"\n                            />\n                        ),\n                    },\n                    {\n                        label: \"Tab 2 with custom icon\",\n                        id: \"tab-2\",\n                        panel: <div>Tab contents 2</div>,\n                        icon: (\n                            <Icon>\n                                <img src=\"logo.svg\" alt=\"Wonder Blocks\" />\n                            </Icon>\n                        ),\n                    },\n                    {\n                        label: \"Tab 3 with presentational icon\",\n                        id: \"tab-3\",\n                        panel: <div>Tab contents 3</div>,\n                        icon: (\n                            <PhosphorIcon\n                                icon={IconMappings.iceCream}\n                                aria-hidden={true}\n                            />\n                        ),\n                    },\n                    {\n                        label: \"Tab 4 with no icon\",\n                        id: \"tab-4\",\n                        panel: <div>Tab contents 4</div>,\n                    },\n                ]}\n                selectedTabId={selectedTabId}\n                onTabSelected={setSelectedTabId} />\n        </View>\n    );\n};","description":"Tab items can be provided with an icon. They can be a `PhosphorIcon` or `Icon` component."},{"id":"packages-tabs-responsivetabs--customizing-tabs-and-dropdown-props","name":"Customizing Tabs And Dropdown Props","snippet":"const CustomizingTabsAndDropdownProps = () => {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        args.selectedTabId,\n    );\n\n    return (\n        <View>\n            <ResponsiveTabs\n                tabs={[\n                    {label: \"Tab 1\", id: \"tab-1\", panel: <div>Tab contents 1</div>},\n                    {label: \"Tab 2\", id: \"tab-2\", panel: <div>Tab contents 2</div>},\n                    {label: \"Tab 3\", id: \"tab-3\", panel: <div>Tab contents 3</div>},\n                ]}\n                tabsProps={{\n                    animated: true,\n                    activationMode: \"automatic\",\n                }}\n                selectedTabId={selectedTabId}\n                onTabSelected={setSelectedTabId} />\n        </View>\n    );\n};","description":"Use the `tabsProps` and `dropdownProps` props to customize the tabs and dropdown. For example, you can enable animation or change the activation mode for the tabs layout. See the `Tabs` and `TabsDropdown` docs for more details."}],"import":"import Button from \"@khanacademy/wonder-blocks-button\";\nimport { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { ResponsiveTabs } from \"@khanacademy/wonder-blocks-tabs\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"Renders the Tabs component when there is enough space to display the tabs as a horizontal layout. When there is not enough space, it renders the tabs as a dropdown. If the tabs are links, use ResponsiveNavigationTabs instead. Prefer using ResponsiveTabs instead of Tabs. For cases where the tabs should always be in a horizontal layout, use the Tabs component directly. Note: This component switches layouts depending on factors like the container width, the number of tabs, the length of tab labels, zoom level, etc. Once the horizontal Tabs need to start scrolling horizontally, the component will switch to the dropdown.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-tabs/src/index.ts","description":"Renders the Tabs component when there is enough space to display the tabs as\na horizontal layout. When there is not enough space, it renders the\ntabs as a dropdown. If the tabs are links, use ResponsiveNavigationTabs instead.\n\nPrefer using ResponsiveTabs instead of Tabs. For cases where the tabs should\nalways be in a horizontal layout, use the Tabs component directly.\n\nNote: This component switches layouts depending on factors like the container\nwidth, the number of tabs, the length of tab labels, zoom level, etc. Once the\nhorizontal Tabs need to start scrolling horizontally, the component will\nswitch to the dropdown.","displayName":"ResponsiveTabs","methods":[],"props":{"aria-label":{"defaultValue":null,"description":"If there is no visible label for the tabs, set aria-label to a\nlabel describing the tabs.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"If the tabs have a visible label, set aria-labelledby to a value\nthat refers to the labelling element.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"id":{"defaultValue":null,"description":"A unique id for the component.\n\nHere is how the id is used for the different elements in the component:\n- The root will have an id of `${id}`\n\nTo set the id of the tabs or dropdown, set the `id` prop in the props:\n`tabsProps` or `dropdownProps`.","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.\n\nHere is how the test id is used for the different elements in the component:\n- The root will have a testId of `${testId}`\n\nTo set the test id of the tabs or dropdown, set the `testId` prop in the props:\n`tabsProps` or `dropdownProps`.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabs":{"defaultValue":null,"description":"The tabs to render.","name":"tabs","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ResponsiveTabItem[]"}},"selectedTabId":{"defaultValue":null,"description":"The id of the tab that is selected.","name":"selectedTabId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"onTabSelected":{"defaultValue":null,"description":"Called when a tab is selected.","name":"onTabSelected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(id: string) => void"}},"onLayoutChange":{"defaultValue":null,"description":"Called when the layout changes.","name":"onLayoutChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"((layout: \"dropdown\" | \"tabs\") => void)"}},"tabsProps":{"defaultValue":null,"description":"Additional props to pass to the Tabs component when it is used.\n\nNote: This prop doesn't include the props that are available on the\nResponsiveTabs component already.","name":"tabsProps","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"Omit<TabsProps, \"aria-label\" | \"aria-labelledby\" | \"tabs\" | \"selectedTabId\" | \"onTabSelected\">"}},"dropdownProps":{"defaultValue":null,"description":"Additional props to pass to the TabsDropdown component when it is used.\n\nNote: This prop doesn't include the props that are available on the\nResponsiveTabs component already.","name":"dropdownProps","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"Omit<TabsDropdownProps, \"aria-label\" | \"aria-labelledby\" | \"tabs\" | \"selectedTabId\" | \"onTabSelected\">"}},"styles":{"defaultValue":null,"description":"Custom styles for the ResponsiveTabs component.\n- `root`: Styles the root `div` element.\n\nTo customize the styles of the tabs or dropdown, set the `styles` prop on\nthe `tabsProps` or `dropdownProps` props. See the `Tabs` and `TabsDropdown`\ndocs for more details.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/responsive-tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; }"}}},"exportName":"ResponsiveTabs"}},"packages-tabs-responsivetabs-subcomponents-tabsdropdown":{"id":"packages-tabs-responsivetabs-subcomponents-tabsdropdown","name":"TabsDropdown","path":"./__docs__/wonder-blocks-tabs/tabs-dropdown.stories.tsx","stories":[{"id":"packages-tabs-responsivetabs-subcomponents-tabsdropdown--default","name":"Default","snippet":"function Default(props: PropsFor<typeof TabsDropdown>) {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        props.selectedTabId,\n    );\n\n    const [opened, setOpened] = React.useState<boolean | undefined>(undefined);\n    React.useEffect(() => {\n        // Update opened after initial render so that the dropdown popper is\n        // placed correctly\n        if (props.opened !== undefined) {\n            setOpened(props.opened);\n        }\n    }, [props.opened]);\n\n    return (\n        <TabsDropdown\n            {...props}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n            opened={opened}\n        />\n    );\n}"},{"id":"packages-tabs-responsivetabs-subcomponents-tabsdropdown--opened","name":"Opened","snippet":"function Opened(props: PropsFor<typeof TabsDropdown>) {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        props.selectedTabId,\n    );\n\n    const [opened, setOpened] = React.useState<boolean | undefined>(undefined);\n    React.useEffect(() => {\n        // Update opened after initial render so that the dropdown popper is\n        // placed correctly\n        if (props.opened !== undefined) {\n            setOpened(props.opened);\n        }\n    }, [props.opened]);\n\n    return (\n        <TabsDropdown\n            {...props}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n            opened={opened}\n        />\n    );\n}","description":"The TabsDropdown component supports explicitly setting the opened state of the dropdown."},{"id":"packages-tabs-responsivetabs-subcomponents-tabsdropdown--invalid-selected-tab-id","name":"Invalid Selected Tab Id","snippet":"function InvalidSelectedTabId(props: PropsFor<typeof TabsDropdown>) {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        props.selectedTabId,\n    );\n\n    const [opened, setOpened] = React.useState<boolean | undefined>(undefined);\n    React.useEffect(() => {\n        // Update opened after initial render so that the dropdown popper is\n        // placed correctly\n        if (props.opened !== undefined) {\n            setOpened(props.opened);\n        }\n    }, [props.opened]);\n\n    return (\n        <TabsDropdown\n            {...props}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n            opened={opened}\n        />\n    );\n}","description":"Normally, the label of the selected tab is displayed in the opener. However, if the selected tab id is invalid, the `labels.defaultOpenerLabel` will be used to label the opener. If the `labels.defaultOpenerLabel` is not set, a default untranslated string is used."},{"id":"packages-tabs-responsivetabs-subcomponents-tabsdropdown--tab-aria-label","name":"Tab Aria Label","snippet":"function TabAriaLabel(props: PropsFor<typeof TabsDropdown>) {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        props.selectedTabId,\n    );\n\n    const [opened, setOpened] = React.useState<boolean | undefined>(undefined);\n    React.useEffect(() => {\n        // Update opened after initial render so that the dropdown popper is\n        // placed correctly\n        if (props.opened !== undefined) {\n            setOpened(props.opened);\n        }\n    }, [props.opened]);\n\n    return (\n        <TabsDropdown\n            {...props}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n            opened={opened}\n        />\n    );\n}","description":"The tab items can be provided with an aria-label."},{"id":"packages-tabs-responsivetabs-subcomponents-tabsdropdown--tab-icons","name":"Tab Icons","snippet":"function TabIcons(props: PropsFor<typeof TabsDropdown>) {\n    const [selectedTabId, setSelectedTabId] = React.useState(\n        props.selectedTabId,\n    );\n\n    const [opened, setOpened] = React.useState<boolean | undefined>(undefined);\n    React.useEffect(() => {\n        // Update opened after initial render so that the dropdown popper is\n        // placed correctly\n        if (props.opened !== undefined) {\n            setOpened(props.opened);\n        }\n    }, [props.opened]);\n\n    return (\n        <TabsDropdown\n            {...props}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n            opened={opened}\n        />\n    );\n}","description":"The tab items can be provided with an icon."}],"import":"import { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { TabsDropdown } from \"@khanacademy/wonder-blocks-tabs\";","jsDocTags":{},"description":"The TabsDropdown component is used to represent tabs in an ActionMenu when there is not enough horizontal space to render the tabs as a horizontal layout. Note: This component is meant to be used internally to address responsiveness in the ResponsiveTabs component. Please reach out to the WB team if there is a need to use this component directly.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","description":"The TabsDropdown component is used to represent tabs in an ActionMenu when\nthere is not enough horizontal space to render the tabs as a horizontal layout.\n\nNote: This component is meant to be used internally to address responsiveness\nin the ResponsiveTabs component. Please reach out to the WB team if there is\na need to use this component directly.","displayName":"TabsDropdown","methods":[],"props":{"aria-label":{"defaultValue":null,"description":"If there is no visible label for the tabs, set aria-label to a\nlabel describing the tabs.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"If the tabs have a visible label, set aria-labelledby to a value\nthat refers to the labelling element.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"id":{"defaultValue":null,"description":"A unique id for the component. If not provided, a unique base id will be\ngenerated automatically.\n\nHere is how the id is used for the different elements in the component:\n- The root will have an id of `${id}`\n- The opener will have an id of `${id}-opener`\n- The panel will have an id of `${id}-panel`","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing.\n\nHere is how the testId is used for the different elements in the component:\n- The root will have a testId of `${testId}`\n- The opener will have a testId of `${testId}-opener`\n- The panel will have a testId of `${testId}-panel`","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabs":{"defaultValue":null,"description":"The tabs to render in the dropdown.","name":"tabs","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"TabDropdownItem[]"}},"selectedTabId":{"defaultValue":null,"description":"The id of the tab that is selected.\n\nIf the selectedTabId is not valid, the `labels.defaultOpenerLabel` will\nbe used to label the dropdown opener.","name":"selectedTabId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"onTabSelected":{"defaultValue":null,"description":"Called when a tab is selected.","name":"onTabSelected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(id: string) => unknown"}},"labels":{"defaultValue":null,"description":"Labels for the dropdown.","name":"labels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ defaultOpenerLabel?: string; }"}},"opened":{"defaultValue":null,"description":"Can be used to override the opened state for the dropdown","name":"opened","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"styles":{"defaultValue":null,"description":"Styling for the tabs dropdown.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs-dropdown.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; actionMenu?: StyleType; opener?: StyleType; tabPanel?: StyleType; }"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"TabsDropdown"}},"packages-tabs-responsivetabs-subcomponents-tabs":{"id":"packages-tabs-responsivetabs-subcomponents-tabs","name":"Tabs","path":"./__docs__/wonder-blocks-tabs/tabs.stories.tsx","stories":[{"id":"packages-tabs-responsivetabs-subcomponents-tabs--default","name":"Default","snippet":"const Default = () => <Tabs tabs={tabs} selectedTabId={tabs[0].id} aria-label=\"Tabs Example\" />;"},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--manual-activation","name":"Manual Activation","snippet":"const ManualActivation = () => <Tabs\n    tabs={tabs}\n    selectedTabId={tabs[0].id}\n    aria-label=\"Tabs Example\"\n    activationMode=\"manual\" />;","description":"When `activationMode` is set to `manual`, the tab will only be activated via keyboard when a tab receives focus and is selected by pressing `Space` or `Enter`."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--automatic-activation","name":"Automatic Activation","snippet":"const AutomaticActivation = () => <Tabs\n    tabs={tabs}\n    selectedTabId={tabs[0].id}\n    aria-label=\"Tabs Example\"\n    activationMode=\"automatic\" />;","description":"When `activationMode` is set to `automatic`, the tab will be activated via keyboard when a tab receives focus."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--with-icons","name":"With Icons","snippet":"const WithIcons = () => <Tabs\n    tabs={[\n        {\n            label: \"Tab 1\",\n            id: \"tab-1\",\n            panel: <Placeholder>Tab contents 1</Placeholder>,\n            icon: <PhosphorIcon icon={IconMappings.cookie} />,\n        },\n        {\n            label: \"Tab 2\",\n            id: \"tab-2\",\n            panel: <Placeholder>Tab contents 2</Placeholder>,\n            icon: <PhosphorIcon icon={IconMappings.iceCream} />,\n        },\n        {\n            label: \"Tab 3\",\n            id: \"tab-3\",\n            panel: <Placeholder>Tab contents 3</Placeholder>,\n            icon: (\n                <Icon>\n                    <img src=\"logo.svg\" alt=\"Wonder Blocks\" />\n                </Icon>\n            ),\n        },\n    ]}\n    selectedTabId=\"tab-1\"\n    aria-label=\"Tabs Example\" />;","description":"Tab items support an `icon` prop to display in the tab. This should use a `PhosphorIcon` or `Icon` component. Prefer using the `icon` prop over providing a custom element in the `label` prop."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--with-focusable-content","name":"With Focusable Content","snippet":"const WithFocusableContent = function WithFocusableContent() {\n    const [selectedTabId, setSelectedTabId] =\n        React.useState(\"tab-wb-button\");\n\n    const tabs = [\n        {\n            label: \"Content with WB Button\",\n            id: \"tab-wb-button\",\n            panel: (\n                <div>\n                    Tab contents with button{\" \"}\n                    <Button>Focusable Button</Button>\n                </div>\n            ),\n        },\n        {\n            label: \"Content with WB Link\",\n            id: \"tab-wb-link\",\n            panel: (\n                <div>\n                    Tab contents with link{\" \"}\n                    <Link href=\"#link\">Focusable Link</Link>\n                </div>\n            ),\n        },\n        {\n            label: \"Content with WB TextField\",\n            id: \"tab-wb-textfield\",\n            panel: (\n                <div>\n                    Tab contents with WB TextField{\" \"}\n                    <TextField\n                        value=\"\"\n                        onChange={() => {}}\n                        aria-label=\"Focusable TextField\"\n                    />\n                </div>\n            ),\n        },\n        {\n            label: \"Content with button\",\n            id: \"tab-button\",\n            panel: (\n                <div>\n                    Tab contents with button{\" \"}\n                    {/* eslint-disable-next-line @khanacademy/wonder-blocks/no-raw-button -- raw <button> is intentional here to verify focus management works with native HTML elements, not just WB components */}\n                    <button>Focusable Button</button>\n                </div>\n            ),\n        },\n        {\n            label: \"Content with link\",\n            id: \"tab-link\",\n            panel: (\n                <div>\n                    Tab contents with link{\" \"}\n                    <a href=\"#link\">Focusable Link</a>\n                </div>\n            ),\n        },\n        {\n            label: \"Content with input\",\n            id: \"tab-input\",\n            panel: (\n                <div>\n                    Tab contents with input{\" \"}\n                    <input type=\"text\" aria-label=\"Focusable input\" />\n                </div>\n            ),\n        },\n        {\n            label: \"Content with no focusable elements\",\n            id: \"tab-no-focusable-elements\",\n            panel: <div>No focusable elements. Tab panel is focusable</div>,\n        },\n        {\n            label: \"Content with no focusable elements at first\",\n            id: \"tab-no-focusable-elements-at-first\",\n            panel: (\n                <View>\n                    <ComponentWithInitialLoadWrapper />\n                </View>\n            ),\n        },\n    ];\n    return (\n        <Tabs\n            aria-label=\"Tabs Example\"\n            tabs={tabs}\n            selectedTabId={selectedTabId}\n            onTabSelected={setSelectedTabId}\n        />\n    );\n};","description":"When a tab panel has focusable elements, pressing `Tab` from the tablist will move focus to the first focusable element in the tab panel. If there are no focusable elements in the active tab panel, the tab panel will be focusable instead. Note: When any descendant elements of the tab panel change, the focusability of the tab panel will be updated to reflect if it has focusable elements. This applies to when the tab panel changes from having no focusable elements in a loading state to having focusable elements once loading is complete."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--animated","name":"Animated","snippet":"const Animated = () => <Tabs tabs={tabs} selectedTabId={tabs[0].id} aria-label=\"Tabs Example\" animated />;","description":"The `animated` prop can be set to `true` to animate the current underline indicator. By default, `animated` is set to `false`."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--animations-disabled","name":"Animations Disabled","snippet":"const AnimationsDisabled = () => <Tabs\n    tabs={tabs}\n    selectedTabId={tabs[0].id}\n    aria-label=\"Tabs Example\"\n    animated={false} />;","description":"When the `animated` prop is `false`, there is no animation when the current tab changes.  By default, `animated` is set to `false`."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--panel-caching","name":"Panel Caching","snippet":"const PanelCaching = () => <Tabs\n    tabs={[\n        {\n            label: \"Tab 1\",\n            id: \"tab-1\",\n            panel: <PanelExample label=\"Tab 1\" />,\n        },\n        {\n            label: \"Tab 2\",\n            id: \"tab-2\",\n            panel: <PanelExample label=\"Tab 2\" />,\n        },\n        {\n            label: \"Tab 3\",\n            id: \"tab-3\",\n            panel: <PanelExample label=\"Tab 3\" />,\n        },\n    ]}\n    selectedTabId={tabs[0].id}\n    aria-label=\"Tabs Example\" />;","description":"When `mountAllPanels` is `false` or not set, the tab panels are cached and only mounted once a tab is selected to prevent unnecessary mounting/unmounting of tab panel contents. In this example, the panels contain components that print out a message in the Storybook actions panel whenever it is mounted. Notice that a panel is only mounted when it is selected the first time. Visiting a tab that has already been selected will not cause the tab panel to be mounted again."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--mount-all-panels","name":"Mount All Panels","snippet":"const MountAllPanels = () => <Tabs\n    tabs={[\n        {\n            label: \"Tab 1\",\n            id: \"tab-1\",\n            panel: <PanelExample label=\"Tab 1\" />,\n        },\n        {\n            label: \"Tab 2\",\n            id: \"tab-2\",\n            panel: <PanelExample label=\"Tab 2\" />,\n        },\n        {\n            label: \"Tab 3\",\n            id: \"tab-3\",\n            panel: <PanelExample label=\"Tab 3\" />,\n        },\n    ]}\n    selectedTabId={tabs[0].id}\n    aria-label=\"Tabs Example\"\n    mountAllPanels />;","description":"If you need to ensure that all tab panels are always in the DOM, you can set the `mountAllPanels` prop to `true`. By default, `mountAllPanels` is set to `false`. This is helpful for tabbed content that needs to be available in the DOM for SEO purposes. In this example, the panels contain components that print out a message in the Storybook actions panel whenever it is mounted. Notice that all panels are mounted when the component mounts. And panels are not remounted when switching tabs. When inspecting the DOM, you will also see that all the panel contents are there."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--custom-styles","name":"Custom Styles","snippet":"const CustomStyles = () => <Tabs\n    tabs={[\n        {\n            label: \"Tab 1\",\n            id: \"tab-1\",\n            panel: <div>Tab contents 1</div>,\n        },\n        {\n            label: \"Tab 2\",\n            id: \"tab-2\",\n            panel: <div>Tab contents 2</div>,\n        },\n        {\n            label: (\n                <View\n                    style={{\n                        backgroundColor:\n                            semanticColor.core.background.base.strong,\n                        color: semanticColor.core.foreground.knockout\n                            .default,\n                        fontStyle: \"italic\",\n                    }}\n                >\n                    Tab with custom style\n                </View>\n            ),\n            id: \"tab-3\",\n            panel: (\n                <View\n                    style={{\n                        backgroundColor:\n                            semanticColor.core.background.neutral.subtle,\n                        fontStyle: \"italic\",\n                    }}\n                >\n                    Tab contents with custom style\n                </View>\n            ),\n        },\n    ]}\n    selectedTabId={tabs[0].id}\n    aria-label=\"Tabs Example\"\n    styles={{\n        root: {\n            border: `2px solid ${semanticColor.learning.border.gems.default}`,\n        },\n        tablist: {\n            backgroundColor:\n                semanticColor.core.background.instructive.subtle,\n        },\n        tabPanel: {\n            backgroundColor: semanticColor.core.background.success.subtle,\n        },\n        tab: {\n            backgroundColor: semanticColor.core.background.base.default,\n        },\n    }} />;","description":"The following example shows how the `styles` prop can be used to apply custom styles to different elements in the `Tabs` component."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--tab-label-render-function","name":"Tab Label Render Function","snippet":"const TabLabelRenderFunction = function TestComponent() {\n    const tabs = [\n        {\n            label(tabProps: TabRenderProps) {\n                return (\n                    <Tooltip\n                        content=\"Contents for the tooltip\"\n                        key={tabProps.id}\n                    >\n                        <Tab {...tabProps}>Tab with a tooltip on it</Tab>\n                    </Tooltip>\n                );\n            },\n            id: \"tab-1\",\n            panel: <Placeholder>Tab contents 1</Placeholder>,\n            icon: (\n                <PhosphorIcon\n                    icon={IconMappings.cookie}\n                    aria-label=\"Cookie\"\n                />\n            ),\n        },\n        {\n            label(tabProps: TabRenderProps) {\n                return (\n                    <Popover\n                        initialFocusId=\"action-button\"\n                        content={\n                            <PopoverContent\n                                title=\"Title\"\n                                content=\"The popover content.\"\n                                closeButtonVisible\n                            />\n                        }\n                        key={tabProps.id}\n                        initialFocusDelay={100}\n                    >\n                        <Tab {...tabProps}>Tab with a Popover on it</Tab>\n                    </Popover>\n                );\n            },\n            id: \"tab-2\",\n            panel: <Placeholder>Tab contents 2</Placeholder>,\n        },\n        {\n            label(tabProps: TabRenderProps) {\n                return (\n                    <Tooltip\n                        content=\"Contents for the tooltip\"\n                        opened={true}\n                        key={tabProps.id}\n                        placement=\"top\"\n                    >\n                        <Tab {...tabProps}>Tab with an opened tooltip</Tab>\n                    </Tooltip>\n                );\n            },\n            id: \"tab-3\",\n            panel: <Placeholder>Tab contents 3</Placeholder>,\n        },\n        {\n            label(tabProps: TabRenderProps) {\n                return (\n                    <Popover\n                        initialFocusId=\"action-button\"\n                        content={\n                            <PopoverContent\n                                title=\"Title\"\n                                content=\"The popover content.\"\n                                closeButtonVisible\n                            />\n                        }\n                        opened={true}\n                        key={tabProps.id}\n                        placement=\"top\"\n                        initialFocusDelay={100}\n                    >\n                        <Tab {...tabProps}>Tab with an opened Popover</Tab>\n                    </Popover>\n                );\n            },\n            id: \"tab-4\",\n            panel: <Placeholder>Tab contents 4</Placeholder>,\n        },\n    ];\n    return (\n        <ControlledTabs\n            aria-label=\"Test\"\n            tabs={tabs}\n            selectedTabId={\"tab-1\"}\n            styles={{\n                root: {\n                    paddingBlock: sizing.size_960,\n                    marginBlock: sizing.size_960,\n                },\n            }}\n        />\n    );\n};","description":"For specific use cases where the underlying tab element is wrapped by another component (like a `Tooltip` or `Popover`), a render function can be used with the `Tab` component instead. The render function provides the tab props that should be applied to the `Tab` component. You will also need to set a `key` on the root element of the render function since the tabs are rendered in a loop. This story demonstrates how a render function could be used to wrap a `Tab` component in a `Tooltip` and a `Popover`. Please test the accessibility for your use case, especially around focus management, keyboard interactions, and screenreader support! #### Current screenreader behaviour ##### Tooltips ###### ** Expected behaviour: ** The tooltip content is announced when the tab is focused. - Chrome + NVDA, Firefox + NVDA: Works as expected - the tooltip content is announced when the tab is focused (both when a tooltip is already opened and when it is not yet opened) - Safari + VoiceOver: Only announces the tooltip content if the tooltip on the tab was already opened. It does not announce the tooltip content when focusing on a tab that opens a tooltip. ##### Popovers ###### ** Expected behaviour: ** Focusing on a tab with a popover will announce that it is expanded or collapsed. - Chrome + NVDA,Firefox + NVDA, Safari + VoiceOver: Works as expected - it is announced that the tab is expanded or collapsed when it is focused. ###### ** Expected behaviour: ** A popover that is already opened is in the tab order - Chrome + NVDA, Firefox + NVDA, Safari + VoiceOver: The popover contents can be tabbed to. - The popover focus management is handled by the `Popover` component, see the `Popover Accessibility` docs for more details. ###### ** Expected behaviour: ** Selecting a tab with a popover (using `Space` or `Enter`) will open the popover and update the selected tab. - Chrome + NVDA, Firefox + NVDA, Safari + VoiceOver: Works as expected - the popover is opened and the selected tab is updated. The popover contents are announced and can be interacted with. - The popoverfocus management is handled by the `Popover` component, see the `Popover Accessibility` docs for more details."},{"id":"packages-tabs-responsivetabs-subcomponents-tabs--right-to-left","name":"Right To Left","snippet":"const RightToLeft = () => <Tabs\n    tabs={generateTabs(3, \"Tab\", false)}\n    selectedTabId=\"tab-1\"\n    aria-label=\"Tabs Example\" />;","description":"If an ancestor element of the `Tabs` component has `dir=\"rtl\"`, the keyboard arrow navigation will be reversed: - `{ArrowRight}` will move focus to the previous tab - `{ArrowLeft}` will move focus to the next tab `{Home}` continues to move focus to the first tab. `{End}` continues to move focus to the last tab."}],"import":"import Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo, ControlledTabs, Placeholder, Tab, Tabs } from \"@khanacademy/wonder-blocks-tabs\";\nimport { Icon, PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport { Popover, PopoverContent } from \"@khanacademy/wonder-blocks-popover\";\nimport { TextField } from \"@khanacademy/wonder-blocks-form\";\nimport Tooltip from \"@khanacademy/wonder-blocks-tooltip\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"A component that uses a tabbed interface to control a specific view. The tabs have `role=”tab”` and keyboard users can change tabs using arrow keys. For a tabbed interface where the tabs are links, see the NavigationTabs component. For responsive cases where the tabs should switch to a dropdown when there is not enough horizontal space, use the `ResponsiveTabs` component.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-tabs/src/index.ts","description":"A component that uses a tabbed interface to control a specific view. The\ntabs have `role=”tab”` and keyboard users can change tabs using arrow keys.\nFor a tabbed interface where the tabs are links, see the NavigationTabs\ncomponent.\n\nFor responsive cases where the tabs should switch to a dropdown when there is\nnot enough horizontal space, use the `ResponsiveTabs` component.","displayName":"Tabs","methods":[],"props":{"id":{"defaultValue":null,"description":"A unique id to use as the base of the ids for the elements within the\ncomponent. If the `id` prop is not provided, a base unique id will be\nauto-generated.\n\nHere is how the id is used for the different elements in the component:\n- The root will have an id of `${id}`\n- The tablist will have an id formatted as ${id}-tablist\n\nIf you need to apply an id to a specific tab or tab panel, the `id` for\nthe tab item in the `tabs` prop will be used:\n- The tab will have an id formatted as `${id}-tab`\n- The associated tab panel will have an id formatted as `${id}-panel`","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Optional test ID for e2e testing. Here is how the test id is used for the\ndifferent elements in the component:\n- The root will have a testId formatted as `${testId}`\n- The tablist will have a testId formatted as `${testId}-tablist`\n\nIf you need to apply a testId to a specific tab or tab panel, add the\ntest id to the tab item in the `tabs` prop:\n- The tab will have a testId formatted as `${testId}-tab`\n- The associated tab panel will have a testId formatted as `${testId}-panel`","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabs":{"defaultValue":null,"description":"The tabs to render. The Tabs component will wire up the tab and panel\nattributes for accessibility.","name":"tabs","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"TabItem[]"}},"selectedTabId":{"defaultValue":null,"description":"The id of the tab that is selected.","name":"selectedTabId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"string"}},"onTabSelected":{"defaultValue":null,"description":"Called when a tab is selected.","name":"onTabSelected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"(id: string) => unknown"}},"activationMode":{"defaultValue":null,"description":"The mode of activation for the tabs for keyboard navigation. Defaults to\n`manual`.\n\n- If `manual`, the tab will only be activated when a tab receives focus\nand is selected by pressing `Space` or `Enter`.\n- If `automatic`, the tab will be activated once a tab receives focus.","name":"activationMode","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"manual\" | \"automatic\"","value":[{"value":"\"manual\""},{"value":"\"automatic\""}]}},"animated":{"defaultValue":null,"description":"Whether to include animation in the `Tabs` component. This should be\nfalse if the user has `prefers-reduced-motion` opted in. Defaults to\n`false`.","name":"animated","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"styles":{"defaultValue":null,"description":"Custom styles for the `Tabs` component.\n- `root`: Styles the root `div` element.\n- `tablist`: Styles the `tablist` element.\n- `tab`: Styles all `tab` elements.\n- `tabPanel`: Styles all the `tabpanel` elements.\n\nIf styles need to be applied to specific tab or tab panel elements,\nconsider setting the styles on the `label` and `panel` content for the\n`tabs` prop.","name":"styles","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"{ root?: StyleType; tablist?: StyleType; tab?: StyleType; tabPanel?: StyleType; }"}},"mountAllPanels":{"defaultValue":null,"description":"Whether to mount all tab panels when the component mounts.\n\n- When enabled, all tab panels are in the DOM. This is useful if the\ntab contents should be crawlable for SEO purposes.\n- When disabled, tab panels are only in the DOM if they've been visited.\nThis is useful for performance so that unvisited panels are not mounted.\n\nDefaults to `false`.","name":"mountAllPanels","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"scrollableElementRef":{"defaultValue":null,"description":"Optional ref to the scrollable wrapper element.\nThis is useful for components that need to detect horizontal overflow.","name":"scrollableElementRef","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/tabs.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"RefObject<HTMLDivElement>"}},"aria-label":{"defaultValue":null,"description":"If there is no visible label for the tabs, set aria-label to a\nlabel describing the tabs.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"If the tabs have a visible label, set aria-labelledby to a value\nthat refers to the labelling element.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-tabs/src/components/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<HTMLDivElement>"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}}},"exportName":"Tabs"}},"packages-theming-themeswitcher":{"id":"packages-theming-themeswitcher","name":"ThemeSwitcher","path":"./__docs__/wonder-blocks-theming/theme-switcher.stories.tsx","stories":[{"id":"packages-theming-themeswitcher--default","name":"Default","snippet":"const Default = (() => {\n    const [theme, setTheme] = React.useState<SupportedThemes>(\"default\");\n\n    const changeTheme = () => {\n        const newTheme =\n            theme === \"thunderblocks\" ? \"default\" : \"thunderblocks\";\n        setTheme(newTheme);\n    };\n\n    return (\n        <>\n            <View style={{gap: sizing.size_160, flexDirection: \"row\"}}>\n                <Button kind=\"secondary\" onClick={changeTheme}>\n                    Switch theme\n                </Button>\n                <Button>Outside button (doesn&apos;t affect new theme)</Button>\n            </View>\n            <ThemeSwitcher theme={theme}>\n                <p>Theming demo using: {theme}</p>\n                <Button>Themed button</Button>\n            </ThemeSwitcher>\n        </>\n    );\n});"},{"id":"packages-theming-themeswitcher--nested","name":"Nested","snippet":"const Nested = (() => {\n    return (\n        <ThemeSwitcher theme=\"default\">\n            <View style={styles.container}>\n                <p>Default</p>\n                <Button>Themed button</Button>\n                <ThemeSwitcher theme=\"thunderblocks\">\n                    <View style={styles.container}>\n                        <p>Thunder Blocks</p>\n                        <Button>Themed button</Button>\n                        <ThemeSwitcher theme=\"default\">\n                            <View style={styles.container}>\n                                <p>Default</p>\n                                <Button>Themed button</Button>\n                            </View>\n                        </ThemeSwitcher>\n                    </View>\n                </ThemeSwitcher>\n            </View>\n        </ThemeSwitcher>\n    );\n});"}],"import":"import Button from \"@khanacademy/wonder-blocks-button\";\nimport { ThemeSwitcher } from \"@khanacademy/wonder-blocks-theming\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"ThemeSwitcher is a component that allows users to switch between themes.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-theming/src/index.ts","description":"ThemeSwitcher is a component that allows users to switch between themes.","displayName":"ThemeSwitcher","methods":[],"props":{"theme":{"defaultValue":null,"description":"The theme to use.","name":"theme","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-theming/src/components/theme-switcher.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"enum","raw":"SupportedThemes","value":[{"value":"\"default\""},{"value":"\"dark\""},{"value":"\"thunderblocks\""},{"value":"\"syl-dark\""}]}},"children":{"defaultValue":null,"description":"The children where the theme will be applied.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-theming/src/components/theme-switcher.tsx","name":"TypeLiteral"}],"required":true,"type":{"name":"ReactNode"}}},"exportName":"ThemeSwitcher"},"docs":{"packages-theming-themeswitcher--docs":{"id":"packages-theming-themeswitcher--docs","name":"Docs","path":"./__docs__/wonder-blocks-theming/theme-switcher.mdx","title":"Packages / Theming / ThemeSwitcher","content":"import {Meta, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as ThemeSwitcherStories from \"./theme-switcher.stories\";\n\n<Meta of={ThemeSwitcherStories} />\n\n# `ThemeSwitcher`\n\n`ThemeSwitcher` is a component that wraps a children with a reference to the\nselected theme. This uses a combination of custom data attributes\n(`data-wb-theme`) and CSS variables to apply the theme to the children. The\ndefault CSS variables are defined in the `:root` selector, and the\ntheme-specific CSS variables are defined in the `data-wb-theme` selector. For\nmore info about the CSS variables, see the\n`@khanacademy/wonder-blocks-tokens/styles.css` file.\n\n## Usage\n\n```tsx\nimport {ThemeSwitcher} from \"@khanacademy/wonder-blocks-theming\";\n\n<ThemeSwitcher theme=\"default\">\n    <Button>Themed button</Button>\n</ThemeSwitcher>;\n```\n\nThis example demonstrates how to use the `ThemeSwitcher` component to switch\nbetween themes.\n\n<Canvas of={ThemeSwitcherStories.Default} />\n\nThis example demonstrates that components using the 'default' theme can be\nnested within components using the 'thunderblocks' theme.\n\n<Canvas of={ThemeSwitcherStories.Nested} />\n"}}},"packages-timing-useactionscheduler":{"id":"packages-timing-useactionscheduler","name":"useActionScheduler","path":"./__docs__/wonder-blocks-timing/use-action-scheduler.stories.tsx","stories":[{"id":"packages-timing-useactionscheduler--default","name":"Default","snippet":"const Default = () => {\n    const [log, setLog] = React.useState<Array<string>>([]);\n    const schedule = useActionScheduler();\n    const intervalRef = React.useRef<IInterval | null>(null);\n\n    const appendLog = (msg: string) => {\n        setLog((prev) => [...prev, `${new Date().toISOString()}: ${msg}`]);\n    };\n\n    return (\n        <View>\n            <BodyText>\n                Schedule timeouts, intervals, and animation frames from a single\n                hook. All pending actions are cleared automatically on unmount.\n            </BodyText>\n            <View style={{flexDirection: \"row\", gap: 8}}>\n                <Button\n                    onClick={() =>\n                        schedule.timeout(() => appendLog(\"Timeout fired\"), 1000)\n                    }\n                >\n                    Schedule timeout (1s)\n                </Button>\n                <Button\n                    onClick={() => {\n                        intervalRef.current?.clear();\n                        intervalRef.current = schedule.interval(\n                            () => appendLog(\"Interval fired\"),\n                            1000,\n                        );\n                    }}\n                >\n                    Schedule interval (1s)\n                </Button>\n                <Button\n                    onClick={() =>\n                        schedule.animationFrame(() =>\n                            appendLog(\"Animation frame fired\"),\n                        )\n                    }\n                >\n                    Schedule animation frame\n                </Button>\n                <Button onClick={() => schedule.clearAll()}>Clear all</Button>\n            </View>\n            <View>\n                {log.map((entry, i) => (\n                    <BodyText key={i}>{entry}</BodyText>\n                ))}\n            </View>\n        </View>\n    );\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n  10 | import {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n  11 |\n> 12 | export default {\n     | ^\n  13 |     title: \"Packages / Timing / useActionScheduler\",\n  14 |\n  15 |     parameters: {\n\n./__docs__/wonder-blocks-timing/use-action-scheduler.stories.tsx:\nimport * as React from \"react\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\n\nimport {\n    useActionScheduler,\n    type IInterval,\n} from \"@khanacademy/wonder-blocks-timing\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nexport default {\n    title: \"Packages / Timing / useActionScheduler\",\n\n    parameters: {\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const Default = () => {\n    const [log, setLog] = React.useState<Array<string>>([]);\n    const schedule = useActionScheduler();\n    const intervalRef = React.useRef<IInterval | null>(null);\n\n    const appendLog = (msg: string) => {\n        setLog((prev) => [...prev, `${new Date().toISOString()}: ${msg}`]);\n    };\n\n    return (\n        <View>\n            <BodyText>\n                Schedule timeouts, intervals, and animation frames from a single\n                hook. All pending actions are cleared automatically on unmount.\n            </BodyText>\n            <View style={{flexDirection: \"row\", gap: 8}}>\n                <Button\n                    onClick={() =>\n                        schedule.timeout(() => appendLog(\"Timeout fired\"), 1000)\n                    }\n                >\n                    Schedule timeout (1s)\n                </Button>\n                <Button\n                    onClick={() => {\n                        intervalRef.current?.clear();\n                        intervalRef.current = schedule.interval(\n                            () => appendLog(\"Interval fired\"),\n                            1000,\n                        );\n                    }}\n                >\n                    Schedule interval (1s)\n                </Button>\n                <Button\n                    onClick={() =>\n                        schedule.animationFrame(() =>\n                            appendLog(\"Animation frame fired\"),\n                        )\n                    }\n                >\n                    Schedule animation frame\n                </Button>\n                <Button onClick={() => schedule.clearAll()}>Clear all</Button>\n            </View>\n            <View>\n                {log.map((entry, i) => (\n                    <BodyText key={i}>{entry}</BodyText>\n                ))}\n            </View>\n        </View>\n    );\n};\n"},"docs":{"packages-timing-useactionscheduler--docs":{"id":"packages-timing-useactionscheduler--docs","name":"Docs","path":"./__docs__/wonder-blocks-timing/use-action-scheduler.mdx","title":"Packages / Timing / useActionScheduler","content":"import * as UseActionSchedulerStories from './use-action-scheduler.stories';\n\nimport {Meta, Canvas} from \"@storybook/addon-docs/blocks\";\n\n<Meta of={UseActionSchedulerStories} />\n\n# `useActionScheduler`\n\n`useActionScheduler` is a hook-based alternative to the `withActionScheduler`\nhigher-order component. It returns an `IScheduleActions`\ninstance that automatically clears all pending actions when the component\nunmounts.\n\n```ts\nfunction useActionScheduler(): IScheduleActions;\n\ninterface IScheduleActions {\n    timeout(action: () => unknown, period: number, options?: Options): ITimeout;\n    interval(action: () => unknown, period: number, options?: Options): IInterval;\n    animationFrame(action: (time: DOMHighResTimeStamp) => void, options?: Options): IAnimationFrame;\n    clearAll(): void;\n}\n```\n\nUse this hook when you want to schedule multiple types of actions (timeouts,\nintervals, animation frames) from a single component without needing to wrap\nit in the `withActionScheduler` HOC.\n\nNotes:\n\n- All actions scheduled via `useActionScheduler` are cleared automatically on unmount.\n- `clearAll()` clears all pending actions without unmounting the component.\n- The returned API is stable across renders (same object reference).\n- For simpler cases where only one type of timer is needed, prefer `useTimeout`,\n  `useInterval`, or `useAnimationFrame` directly.\n\n<Canvas sourceState=\"shown\" of={UseActionSchedulerStories.Default} />\n"}}},"packages-timing-useanimationframe":{"id":"packages-timing-useanimationframe","name":"useAnimationFrame","path":"./__docs__/wonder-blocks-timing/use-animation-frame.stories.tsx","stories":[{"id":"packages-timing-useanimationframe--on-demand-and-resolve-on-clear","name":"On Demand And Resolve On Clear","snippet":"const OnDemandAndResolveOnClear = () => {\n    const [frameCount, setFrameCount] = React.useState(0);\n    const [frameSet, setFrameSet] = React.useState(false);\n    const runningRef = React.useRef(false);\n\n    // Clear the running flag before the animation frame cleanup fires so that\n    // ClearPolicy.Resolve's final callback doesn't re-schedule on unmount.\n    React.useEffect(\n        () => () => {\n            runningRef.current = false;\n        },\n        [],\n    );\n\n    const animationFrame = useAnimationFrame(\n        () => {\n            setFrameCount((n) => n + 1);\n            // Only continue the loop if we're still running. When\n            // ClearPolicy.Resolve fires the final callback on stop,\n            // runningRef.current is already false, preventing re-scheduling.\n            if (runningRef.current) {\n                animationFrame.set();\n            }\n        },\n        {\n            clearPolicy: ClearPolicy.Resolve,\n            schedulePolicy: SchedulePolicy.OnDemand,\n        },\n    );\n\n    useInterval(() => {\n        // Poll isSet since it is not driven by React state.\n        setFrameSet(animationFrame.isSet);\n    }, 100);\n\n    const handleStart = () => {\n        runningRef.current = true;\n        animationFrame.set();\n    };\n\n    const handleStop = () => {\n        runningRef.current = false;\n        // ClearPolicy.Resolve fires one final callback before stopping\n        animationFrame.clear();\n    };\n\n    return (\n        <View>\n            <BodyText>\n                Loop does not start on mount (OnDemand). Stopping with\n                ClearPolicy.Resolve fires one final callback.\n            </BodyText>\n            <View>isSet = {String(frameSet)}</View>\n            <View>frameCount = {frameCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={handleStart}>Start</Button>\n                <Button onClick={handleStop}>Stop (resolve)</Button>\n            </View>\n        </View>\n    );\n};","description":"The primary use case: a continuous animation loop using OnDemand + ClearPolicy.Resolve. The loop starts on demand and stopping with Resolve fires one final callback before halting — useful for settling animation state cleanly."},{"id":"packages-timing-useanimationframe--immediately","name":"Immediately","snippet":"const Immediately = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const animationFrame = useAnimationFrame(() => {\n        setCallCount((c) => c + 1);\n    });\n    return (\n        <View>\n            <BodyText>\n                Frame fires immediately on mount unless set again or cleared\n            </BodyText>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => animationFrame.set()}>Set frame</Button>\n                <Button onClick={() => animationFrame.clear()}>\n                    Clear frame\n                </Button>\n            </View>\n        </View>\n    );\n};","description":"The default schedule policy: the frame fires automatically on mount without needing to call set(). Useful for deferring a one-time DOM read/write to just before the first paint."},{"id":"packages-timing-useanimationframe--one-shot","name":"One Shot","snippet":"const OneShot = () => {\n    const [lastFired, setLastFired] = React.useState<string>(\"—\");\n    const animationFrame = useAnimationFrame(\n        () => {\n            setLastFired(new Date().toISOString());\n        },\n        {schedulePolicy: SchedulePolicy.OnDemand},\n    );\n    return (\n        <View>\n            <BodyText>\n                Fires once per click — useful for deferring a DOM read/write to\n                just before the next paint.\n            </BodyText>\n            <View>Last fired: {lastFired}</View>\n            <Button onClick={() => animationFrame.set()}>\n                Request animation frame\n            </Button>\n        </View>\n    );\n};","description":"Use SchedulePolicy.OnDemand to defer a single unit of work to just before the next paint. Unlike the animation loop, this fires once and stops."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n  12 | import {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n  13 |\n> 14 | export default {\n     | ^\n  15 |     title: \"Packages / Timing / useAnimationFrame\",\n  16 |\n  17 |     parameters: {\n\n./__docs__/wonder-blocks-timing/use-animation-frame.stories.tsx:\nimport * as React from \"react\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\n\nimport {\n    useAnimationFrame,\n    useInterval,\n    ClearPolicy,\n    SchedulePolicy,\n} from \"@khanacademy/wonder-blocks-timing\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nexport default {\n    title: \"Packages / Timing / useAnimationFrame\",\n\n    parameters: {\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * The primary use case: a continuous animation loop using OnDemand +\n * ClearPolicy.Resolve. The loop starts on demand and stopping with Resolve\n * fires one final callback before halting — useful for settling animation\n * state cleanly.\n */\nexport const OnDemandAndResolveOnClear = () => {\n    const [frameCount, setFrameCount] = React.useState(0);\n    const [frameSet, setFrameSet] = React.useState(false);\n    const runningRef = React.useRef(false);\n\n    // Clear the running flag before the animation frame cleanup fires so that\n    // ClearPolicy.Resolve's final callback doesn't re-schedule on unmount.\n    React.useEffect(\n        () => () => {\n            runningRef.current = false;\n        },\n        [],\n    );\n\n    const animationFrame = useAnimationFrame(\n        () => {\n            setFrameCount((n) => n + 1);\n            // Only continue the loop if we're still running. When\n            // ClearPolicy.Resolve fires the final callback on stop,\n            // runningRef.current is already false, preventing re-scheduling.\n            if (runningRef.current) {\n                animationFrame.set();\n            }\n        },\n        {\n            clearPolicy: ClearPolicy.Resolve,\n            schedulePolicy: SchedulePolicy.OnDemand,\n        },\n    );\n\n    useInterval(() => {\n        // Poll isSet since it is not driven by React state.\n        setFrameSet(animationFrame.isSet);\n    }, 100);\n\n    const handleStart = () => {\n        runningRef.current = true;\n        animationFrame.set();\n    };\n\n    const handleStop = () => {\n        runningRef.current = false;\n        // ClearPolicy.Resolve fires one final callback before stopping\n        animationFrame.clear();\n    };\n\n    return (\n        <View>\n            <BodyText>\n                Loop does not start on mount (OnDemand). Stopping with\n                ClearPolicy.Resolve fires one final callback.\n            </BodyText>\n            <View>isSet = {String(frameSet)}</View>\n            <View>frameCount = {frameCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={handleStart}>Start</Button>\n                <Button onClick={handleStop}>Stop (resolve)</Button>\n            </View>\n        </View>\n    );\n};\n\n/**\n * The default schedule policy: the frame fires automatically on mount without\n * needing to call set(). Useful for deferring a one-time DOM read/write to\n * just before the first paint.\n */\nexport const Immediately = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const animationFrame = useAnimationFrame(() => {\n        setCallCount((c) => c + 1);\n    });\n    return (\n        <View>\n            <BodyText>\n                Frame fires immediately on mount unless set again or cleared\n            </BodyText>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => animationFrame.set()}>Set frame</Button>\n                <Button onClick={() => animationFrame.clear()}>\n                    Clear frame\n                </Button>\n            </View>\n        </View>\n    );\n};\n\n/**\n * Use SchedulePolicy.OnDemand to defer a single unit of work to just before\n * the next paint. Unlike the animation loop, this fires once and stops.\n */\nexport const OneShot = () => {\n    const [lastFired, setLastFired] = React.useState<string>(\"—\");\n    const animationFrame = useAnimationFrame(\n        () => {\n            setLastFired(new Date().toISOString());\n        },\n        {schedulePolicy: SchedulePolicy.OnDemand},\n    );\n    return (\n        <View>\n            <BodyText>\n                Fires once per click — useful for deferring a DOM read/write to\n                just before the next paint.\n            </BodyText>\n            <View>Last fired: {lastFired}</View>\n            <Button onClick={() => animationFrame.set()}>\n                Request animation frame\n            </Button>\n        </View>\n    );\n};\n"},"docs":{"packages-timing-useanimationframe--docs":{"id":"packages-timing-useanimationframe--docs","name":"Docs","path":"./__docs__/wonder-blocks-timing/use-animation-frame.mdx","title":"Packages / Timing / useAnimationFrame","content":"import * as UseAnimationFrameStories from './use-animation-frame.stories';\n\nimport {Meta, Canvas} from \"@storybook/addon-docs/blocks\";\n\n<Meta of={UseAnimationFrameStories} />\n\n# `useAnimationFrame`\n\n`useAnimationFrame` is a hook that provides a convenient API for requesting and\ncancelling animation frames. It is defined as follows:\n\n```ts\nfunction useAnimationFrame(\n    action: (time: DOMHighResTimeStamp) => unknown,\n    options?: {\n        schedulePolicy?: SchedulePolicy,\n        clearPolicy?: ClearPolicy,\n        actionPolicy?: ActionPolicy,\n    },\n): IAnimationFrame;\n\ninterface IAnimationFrame {\n    get isSet(): boolean;\n    set(): void;\n    clear(policy?: ClearPolicy): void;\n}\n```\n\nBy default the animation frame request will be made immediately on creation.\nThe `options` parameter can be used to control when the request is scheduled\nand whether or not `action` should be called when the request is cleared.\n\nNotes:\n\n- Because `clear` takes a param, it's important that you don't pass it directly to an event handler,\n  e.g. `<Button onClick={clear} />` will not work as expected.\n- Unlike `useInterval`, each frame fires **once**. Calling `set()` again schedules another single frame.\n- When the component using this hook is unmounted, the pending request will automatically be cleared.\n- Calling `set()` when a request is already pending cancels the existing request and makes a new one.\n\n<Canvas sourceState=\"shown\" of={UseAnimationFrameStories.Immediately} />\n\n<Canvas sourceState=\"shown\" of={UseAnimationFrameStories.OnDemandAndResolveOnClear} />\n\n<Canvas sourceState=\"shown\" of={UseAnimationFrameStories.OneShot} />\n"}}},"packages-timing-useinterval":{"id":"packages-timing-useinterval","name":"useInterval","path":"./__docs__/wonder-blocks-timing/use-interval.stories.tsx","stories":[{"id":"packages-timing-useinterval--immediately","name":"Immediately","snippet":"const Immediately = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const [intervalSet, setIntervalSet] = React.useState(false);\n    const callback = React.useCallback(() => {\n        setCallCount((callCount) => callCount + 1);\n    }, []);\n    const interval = useInterval(callback, 1000);\n    useInterval(() => {\n        // Need to update on an interval as the returned `isSet` value is not\n        // driven by React state.\n        setIntervalSet(interval.isSet);\n    }, 100);\n    return (\n        <View>\n            <BodyText>\n                Interval should fire every second until cleared. Setting the\n                interval again resets the interval.\n            </BodyText>\n            <View>isSet = {String(intervalSet)}</View>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => interval.set()}>Set interval</Button>\n                <Button onClick={() => interval.clear()}>Clear interval</Button>\n            </View>\n        </View>\n    );\n};"},{"id":"packages-timing-useinterval--on-demand-and-resolve-on-clear","name":"On Demand And Resolve On Clear","snippet":"const OnDemandAndResolveOnClear = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const [intervalSet, setIntervalSet] = React.useState(false);\n    const callback = React.useCallback(() => {\n        setCallCount((callCount) => callCount + 1);\n    }, []);\n    const interval = useInterval(callback, 1000, {\n        clearPolicy: ClearPolicy.Resolve,\n        schedulePolicy: SchedulePolicy.OnDemand,\n    });\n    useInterval(() => {\n        // Need to update on an interval as the returned `isSet` value is not\n        // driven by React state.\n        setIntervalSet(interval.isSet);\n    }, 100);\n    return (\n        <View>\n            <BodyText>\n                Interval will not start until set is explicitly invoked.\n                Interval should fire every second until cleared. Clearing the\n                interval will invoke the interval action one more time. Setting\n                the interval again resets the interval.\n            </BodyText>\n            <View>isSet = {String(intervalSet)}</View>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => interval.set()}>Set interval</Button>\n                <Button onClick={() => interval.clear()}>Clear interval</Button>\n            </View>\n        </View>\n    );\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n  11 | import {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n  12 |\n> 13 | export default {\n     | ^\n  14 |     title: \"Packages / Timing / useInterval\",\n  15 |\n  16 |     parameters: {\n\n./__docs__/wonder-blocks-timing/use-interval.stories.tsx:\nimport * as React from \"react\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\n\nimport {\n    useInterval,\n    ClearPolicy,\n    SchedulePolicy,\n} from \"@khanacademy/wonder-blocks-timing\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nexport default {\n    title: \"Packages / Timing / useInterval\",\n\n    parameters: {\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const Immediately = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const [intervalSet, setIntervalSet] = React.useState(false);\n    const callback = React.useCallback(() => {\n        setCallCount((callCount) => callCount + 1);\n    }, []);\n    const interval = useInterval(callback, 1000);\n    useInterval(() => {\n        // Need to update on an interval as the returned `isSet` value is not\n        // driven by React state.\n        setIntervalSet(interval.isSet);\n    }, 100);\n    return (\n        <View>\n            <BodyText>\n                Interval should fire every second until cleared. Setting the\n                interval again resets the interval.\n            </BodyText>\n            <View>isSet = {String(intervalSet)}</View>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => interval.set()}>Set interval</Button>\n                <Button onClick={() => interval.clear()}>Clear interval</Button>\n            </View>\n        </View>\n    );\n};\n\nexport const OnDemandAndResolveOnClear = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const [intervalSet, setIntervalSet] = React.useState(false);\n    const callback = React.useCallback(() => {\n        setCallCount((callCount) => callCount + 1);\n    }, []);\n    const interval = useInterval(callback, 1000, {\n        clearPolicy: ClearPolicy.Resolve,\n        schedulePolicy: SchedulePolicy.OnDemand,\n    });\n    useInterval(() => {\n        // Need to update on an interval as the returned `isSet` value is not\n        // driven by React state.\n        setIntervalSet(interval.isSet);\n    }, 100);\n    return (\n        <View>\n            <BodyText>\n                Interval will not start until set is explicitly invoked.\n                Interval should fire every second until cleared. Clearing the\n                interval will invoke the interval action one more time. Setting\n                the interval again resets the interval.\n            </BodyText>\n            <View>isSet = {String(intervalSet)}</View>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => interval.set()}>Set interval</Button>\n                <Button onClick={() => interval.clear()}>Clear interval</Button>\n            </View>\n        </View>\n    );\n};\n"},"docs":{"packages-timing-useinterval--docs":{"id":"packages-timing-useinterval--docs","name":"Docs","path":"./__docs__/wonder-blocks-timing/use-interval.mdx","title":"Packages / Timing / useInterval","content":"import * as UseIntervalStories from './use-interval.stories';\n\nimport {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\n\n<Meta of={UseIntervalStories} />\n\n# `useInterval`\n\n`useInterval` is a hook that provides a convenient API for setting and clearing\nan interval. It is defined as follows:\n\n```ts\nfunction useInterval(\n    action: () => mixed,\n    timeoutMs: number,\n    options?: {|\n        schedulePolicy?: SchedulePolicy,\n        clearPolicy?: ClearPolicy,\n        actionPolicy?: ActionPolicy,\n    |},\n): IInterval;\n\ninterface IInterval {\n    get isSet(): boolean;\n    set(): void;\n    clear(policy?: ClearPolicy): void;\n}\n```\n\nBy default the interval will be set immediately upon creation. The `options` parameter can\nbe used to control when the interval is scheduled and whether or not `action` should be\ncalled when the interval is cleared.\n\nNotes:\n\n* Because `clear` takes a param, it's important that you don't pass it directly to an event handler,\n  e.g. `<Button onClick={clear} />` will not work as expected.\n* Calling `set` after the interval has been cleared will restart the interval.\n* Updating the second paramter, `timeoutMs`, will also restart the interval.\n* When the component using this hook is unmounted, the interval will automatically be cleared.\n* Calling `set` after the interval is already set will restart the interval.\n\n<Canvas sourceState=\"shown\" of={UseIntervalStories.Immediately} />\n\n<Canvas sourceState=\"shown\" of={UseIntervalStories.OnDemandAndResolveOnClear} />\n"}}},"packages-timing-usetimeout":{"id":"packages-timing-usetimeout","name":"useTimeout","path":"./__docs__/wonder-blocks-timing/use-timeout.stories.tsx","stories":[{"id":"packages-timing-usetimeout--immediately","name":"Immediately","snippet":"const Immediately = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const [timeoutSet, setTimeoutSet] = React.useState(false);\n    const callback = React.useCallback(() => {\n        // eslint-disable-next-line no-console\n        console.log(\"action called\");\n        setCallCount((callCount) => callCount + 1);\n    }, []);\n    const timeout = useTimeout(callback, 5000);\n    useInterval(() => {\n        // Need to update on an interval as the returned `isSet` value is not\n        // driven by React state.\n        setTimeoutSet(timeout.isSet);\n    }, 100);\n    return (\n        <View>\n            <BodyText>\n                Timeout should fire in 5 seconds unless set again or cleared\n            </BodyText>\n            <View>isSet = {String(timeoutSet)}</View>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => timeout.set()}>Set timeout</Button>\n                <Button\n                    onClick={() => {\n                        timeout.clear();\n                    }}\n                >\n                    Clear timeout\n                </Button>\n            </View>\n        </View>\n    );\n};"},{"id":"packages-timing-usetimeout--on-demand-and-resolve-on-clear","name":"On Demand And Resolve On Clear","snippet":"const OnDemandAndResolveOnClear = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const [timeoutSet, setTimeoutSet] = React.useState(false);\n    const callback = React.useCallback(() => {\n        // eslint-disable-next-line no-console\n        console.log(\"action called\");\n        setCallCount((callCount) => callCount + 1);\n    }, []);\n    const timeout = useTimeout(callback, 5000, {\n        clearPolicy: ClearPolicy.Resolve,\n        schedulePolicy: SchedulePolicy.OnDemand,\n    });\n    useInterval(() => {\n        // Need to update on an interval as the returned `isSet` value is not\n        // driven by React state.\n        setTimeoutSet(timeout.isSet);\n    }, 100);\n    return (\n        <View>\n            <BodyText>\n                Timeout should fire in 5 seconds or when cleared unless set\n                again\n            </BodyText>\n            <View>isSet = {String(timeoutSet)}</View>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => timeout.set()}>Set timeout</Button>\n                <Button onClick={() => timeout.clear()}>Clear timeout</Button>\n            </View>\n        </View>\n    );\n};"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n  11 | import {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n  12 |\n> 13 | export default {\n     | ^\n  14 |     title: \"Packages / Timing / useTimeout\",\n  15 |\n  16 |     parameters: {\n\n./__docs__/wonder-blocks-timing/use-timeout.stories.tsx:\nimport * as React from \"react\";\n\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\n\nimport {\n    ClearPolicy,\n    SchedulePolicy,\n} from \"../../packages/wonder-blocks-timing/src/util/policies\";\nimport {useTimeout, useInterval} from \"@khanacademy/wonder-blocks-timing\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nexport default {\n    title: \"Packages / Timing / useTimeout\",\n\n    parameters: {\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n};\n\nexport const Immediately = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const [timeoutSet, setTimeoutSet] = React.useState(false);\n    const callback = React.useCallback(() => {\n        // eslint-disable-next-line no-console\n        console.log(\"action called\");\n        setCallCount((callCount) => callCount + 1);\n    }, []);\n    const timeout = useTimeout(callback, 5000);\n    useInterval(() => {\n        // Need to update on an interval as the returned `isSet` value is not\n        // driven by React state.\n        setTimeoutSet(timeout.isSet);\n    }, 100);\n    return (\n        <View>\n            <BodyText>\n                Timeout should fire in 5 seconds unless set again or cleared\n            </BodyText>\n            <View>isSet = {String(timeoutSet)}</View>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => timeout.set()}>Set timeout</Button>\n                <Button\n                    onClick={() => {\n                        timeout.clear();\n                    }}\n                >\n                    Clear timeout\n                </Button>\n            </View>\n        </View>\n    );\n};\n\nexport const OnDemandAndResolveOnClear = () => {\n    const [callCount, setCallCount] = React.useState(0);\n    const [timeoutSet, setTimeoutSet] = React.useState(false);\n    const callback = React.useCallback(() => {\n        // eslint-disable-next-line no-console\n        console.log(\"action called\");\n        setCallCount((callCount) => callCount + 1);\n    }, []);\n    const timeout = useTimeout(callback, 5000, {\n        clearPolicy: ClearPolicy.Resolve,\n        schedulePolicy: SchedulePolicy.OnDemand,\n    });\n    useInterval(() => {\n        // Need to update on an interval as the returned `isSet` value is not\n        // driven by React state.\n        setTimeoutSet(timeout.isSet);\n    }, 100);\n    return (\n        <View>\n            <BodyText>\n                Timeout should fire in 5 seconds or when cleared unless set\n                again\n            </BodyText>\n            <View>isSet = {String(timeoutSet)}</View>\n            <View>callCount = {callCount}</View>\n            <View style={{flexDirection: \"row\"}}>\n                <Button onClick={() => timeout.set()}>Set timeout</Button>\n                <Button onClick={() => timeout.clear()}>Clear timeout</Button>\n            </View>\n        </View>\n    );\n};\n"},"docs":{"packages-timing-usetimeout--docs":{"id":"packages-timing-usetimeout--docs","name":"Docs","path":"./__docs__/wonder-blocks-timing/use-timeout.mdx","title":"Packages / Timing / useTimeout","content":"import * as UseTimeoutStories from \"./use-timeout.stories\";\n\nimport {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\n\n<Meta of={UseTimeoutStories} />\n\n# `useTimeout`\n\n`useTimeout` is a hook that provides a convenient API for setting and clearing\na timeout. It is defined as follows:\n\n```ts\nfunction useTimeout(\n    action: () => mixed,\n    timeoutMs: number,\n    options?: {|\n        schedulePolicy?: SchedulePolicy,\n        clearPolicy?: ClearPolicy,\n        actionPolicy?: ActionPolicy,\n    |},\n): ITimeout;\n\ninterface ITimeout {\n    get isSet(): boolean;\n    set(): void;\n    clear(policy?: ClearPolicy): void;\n}\n```\n\nBy default the timeout will be set immediately up creation. The `options` parameter can\nbe used to control when when the timeout is schedule and whether or not `action` should be\ncalled when the timeout is cleared.\n\nNotes:\n\n-   Because `clear` takes a param, it's important that you don't pass it directly to an event handler,\n    e.g. `<Button onClick={clear} />` will not work as expected.\n-   Calling `set` after the timeout has expired will restart the timeout.\n-   Updating the second paramter, `timeoutMs`, will also restart the timeout.\n-   When the component using this hooks is unmounted, the timeout will automatically be cleared.\n-   Calling `set` after the timeout is set but before it expires means that the timeout will be\n    reset and will call `action`, `timeoutMs` after the most recent call to `set` was made.\n\n<Canvas sourceState=\"shown\" of={UseTimeoutStories.Immediately} />\n\n<Canvas sourceState=\"shown\" of={UseTimeoutStories.OnDemandAndResolveOnClear} />\n"}}},"packages-timing-withactionscheduler":{"id":"packages-timing-withactionscheduler","name":"withActionScheduler","path":"./__docs__/wonder-blocks-timing/with-action-scheduler.stories.tsx","stories":[{"id":"packages-timing-withactionscheduler--incorrect-usage","name":"Incorrect Usage","snippet":"const IncorrectUsage = () => {\n    const id = React.useId();\n    return (\n        <View>\n            <Unmounter>\n                <MyNaughtyComponent targetId={id} />\n            </Unmounter>\n            <View id={id} />\n        </View>\n    );\n};"},{"id":"packages-timing-withactionscheduler--correct-usage","name":"Correct Usage","snippet":"const CorrectUsage = () => {\n    const id = React.useId();\n    return (\n        <View>\n            <Unmounter>\n                <MyGoodComponentWithScheduler targetId={id} />\n            </Unmounter>\n            <View id={id} />\n        </View>\n    );\n};"}],"import":"import { MyGoodComponentWithScheduler, MyNaughtyComponent, Unmounter } from \"wonder-blocks\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n   9 | } from \"./with-action-scheduler-examples\";\n  10 |\n> 11 | export default {\n     | ^\n  12 |     title: \"Packages / Timing / withActionScheduler\",\n  13 |\n  14 |     parameters: {\n\n./__docs__/wonder-blocks-timing/with-action-scheduler.stories.tsx:\nimport * as React from \"react\";\nimport {Meta} from \"@storybook/react-vite\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\n\nimport {\n    Unmounter,\n    MyGoodComponentWithScheduler,\n    MyNaughtyComponent,\n} from \"./with-action-scheduler-examples\";\n\nexport default {\n    title: \"Packages / Timing / withActionScheduler\",\n\n    parameters: {\n        previewTabs: {\n            canvas: {\n                hidden: true,\n            },\n        },\n\n        viewMode: \"docs\",\n\n        chromatic: {\n            disableSnapshot: true,\n        },\n    },\n\n    decorators: [(Story) => <View>{Story()}</View>],\n} as Meta;\n\nexport const IncorrectUsage = () => {\n    const id = React.useId();\n    return (\n        <View>\n            <Unmounter>\n                <MyNaughtyComponent targetId={id} />\n            </Unmounter>\n            <View id={id} />\n        </View>\n    );\n};\n\nexport const CorrectUsage = () => {\n    const id = React.useId();\n    return (\n        <View>\n            <Unmounter>\n                <MyGoodComponentWithScheduler targetId={id} />\n            </Unmounter>\n            <View id={id} />\n        </View>\n    );\n};\n"},"docs":{"packages-timing-withactionscheduler--docs":{"id":"packages-timing-withactionscheduler--docs","name":"Docs","path":"./__docs__/wonder-blocks-timing/with-action-scheduler.mdx","title":"Packages / Timing / withActionScheduler","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport {Id, View} from \"@khanacademy/wonder-blocks-core\";\nimport * as WithActionSchedulerStories from \"./with-action-scheduler.stories\";\n\nimport packageConfig from \"../../packages/wonder-blocks-timing/package.json\";\n\nimport {\n    Unmounter,\n    MyGoodComponentWithScheduler,\n    MyNaughtyComponent,\n} from \"./with-action-scheduler-examples\";\nimport ComponentInfo from \"../components/component-info\";\n\n<Meta of={WithActionSchedulerStories} />\n\n# withActionSceduler\n\n<ComponentInfo name={packageConfig.name} version={packageConfig.version} />\n\nThis is a higher order component (HOC) that attaches the given component to an\n[`IScheduleActions`](#ischeduleactions) instance. Any actions scheduled will automatically be\ncleared on unmount. This allows for \"set it and forget it\" behavior that won't\nleave timers dangling when the component's lifecycle ends.\n\nFor more details on using this component and the [`IScheduleActions`](#ischeduleactions) interface,\nsee the [API overview](#timing-api-overview).\n\n## TypeScript Types\n\nIf you are using TypeScript typing, you can use the `WithActionSchedulerProps` type\nto build the props for the component that you will pass to the `withActionScheduler`\nfunction by spreading the type into your component's `Props` type.\n\nThe added `schedule` prop is of type [`IScheduleActions`](#ischeduleactions). This is what the\n`withActionScheduler` function injects to your component.\n\nThe returned value from `withActionScheduler` is a React component with props of\ntype `TProps`.\n\nAccess to the <a href=\"./?path=/docs/packages-timing-types-ischeduleactions--docs\">timing API</a> is provided via the `withActionScheduler` higher order\ncomponent.\n\n## Usage\n\n### Incorrect Usage\n\nThe following component, `MyNaughtyComponent`, will keep spamming our pretend\nlog even after it was unmounted.\n\n<Canvas of={WithActionSchedulerStories.IncorrectUsage} />\n\n### Correct Usage\n\nBut if we use `withActionScheduler` and the `interval` method, everything is\nfine. Unmount the component, and the logging stops.\n\n<Canvas of={WithActionSchedulerStories.CorrectUsage} />\n"}}},"packages-tokens-utilities-tokenvalue":{"id":"packages-tokens-utilities-tokenvalue","name":"tokenValue","path":"./__docs__/wonder-blocks-tokens/token-value.stories.tsx","stories":[{"id":"packages-tokens-utilities-tokenvalue--token-value-default","name":"Token Value Default","snippet":"const TokenValueDefault = function Render() {\n    const [defaultValue, setDefaultValue] = React.useState(\"\");\n    const [tbValue, setTbValue] = React.useState(\"\");\n    const defaultRef = React.useRef(null);\n    const tbRef = React.useRef(null);\n\n    React.useEffect(() => {\n        if (defaultRef.current) {\n            setDefaultValue(\n                tokenValue(\n                    semanticColor.core.foreground.instructive.default,\n                    defaultRef.current,\n                ),\n            );\n        }\n        if (tbRef.current) {\n            setTbValue(\n                tokenValue(\n                    semanticColor.core.foreground.instructive.default,\n                    tbRef.current,\n                ),\n            );\n        }\n    }, []);\n\n    return (\n        <View style={{flexDirection: \"row\", gap: sizing.size_240}}>\n            <ThemeSwitcher theme=\"default\">\n                <View ref={defaultRef} style={{gap: sizing.size_080}}>\n                    <Heading>default theme</Heading>\n                    <ColorItem\n                        testId=\"default-raw-value\"\n                        label=\"Raw value\"\n                        value={defaultValue}\n                        color={defaultValue}\n                    />\n                </View>\n            </ThemeSwitcher>\n            <ThemeSwitcher theme=\"thunderblocks\">\n                <View ref={tbRef} style={{gap: sizing.size_080}}>\n                    <Heading>thunderblocks theme</Heading>\n                    <ColorItem\n                        testId=\"tb-raw-value\"\n                        label=\"Raw value\"\n                        value={tbValue}\n                        color={tbValue}\n                    />\n                </View>\n            </ThemeSwitcher>\n        </View>\n    );\n};"},{"id":"packages-tokens-utilities-tokenvalue--token-value-element-override","name":"Token Value Element Override","snippet":"const TokenValueElementOverride = function Render() {\n    const themeRef = React.useRef<HTMLElement | null>(null);\n    const [tokenValueResult, setTokenValueResult] = React.useState(\"\");\n\n    React.useEffect(() => {\n        if (themeRef.current) {\n            setTokenValueResult(\n                tokenValue(\n                    semanticColor.core.foreground.instructive.default,\n                    themeRef.current,\n                ),\n            );\n        }\n    }, []);\n\n    return (\n        <View>\n            <ThemeSwitcher theme=\"thunderblocks\">\n                <View ref={themeRef} style={{gap: sizing.size_080}}>\n                    <Heading>\n                        semanticColor.core.foreground.instructive.default\n                        token\n                    </Heading>\n\n                    <ColorItem\n                        label=\"Default raw value\"\n                        value={defaultRawValue}\n                        color={defaultRawValue}\n                        testId=\"default-raw-value\"\n                    />\n                    <ColorItem\n                        label=\"Scoped raw value\"\n                        value={tokenValueResult}\n                        color={tokenValueResult}\n                        testId=\"scoped-raw-value\"\n                    />\n                </View>\n            </ThemeSwitcher>\n        </View>\n    );\n};"},{"id":"packages-tokens-utilities-tokenvalue--non-semantic-token-value","name":"Non Semantic Token Value","snippet":"const NonSemanticTokenValue = () => {\n    return (\n        <View>\n            <Heading>sizing.size_080 token</Heading>\n            <BodyText>\n                Raw value: <code>{tokenValue(sizing.size_080) || \"…\"}</code>\n            </BodyText>\n        </View>\n    );\n};"}],"import":"import { Badge } from \"@khanacademy/wonder-blocks-badge\";\nimport { BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { ThemeSwitcher } from \"@khanacademy/wonder-blocks-theming\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n  15 | import {Badge} from \"@khanacademy/wonder-blocks-badge\";\n  16 |\n> 17 | export default {\n     | ^\n  18 |     title: \"Packages / Tokens / Utilities / tokenValue\",\n  19 |     tags: [\"!dev\"],\n  20 |     args: {},\n\n./__docs__/wonder-blocks-tokens/token-value.stories.tsx:\nimport * as React from \"react\";\nimport {Meta, StoryObj} from \"@storybook/react-vite\";\nimport {StyleSheet} from \"aphrodite\";\nimport {expect, within} from \"storybook/test\";\nimport {\n    border,\n    boxShadow,\n    semanticColor,\n    sizing,\n    tokenValue,\n} from \"@khanacademy/wonder-blocks-tokens\";\nimport {View} from \"@khanacademy/wonder-blocks-core\";\nimport {ThemeSwitcher} from \"@khanacademy/wonder-blocks-theming\";\nimport {BodyText, Heading} from \"@khanacademy/wonder-blocks-typography\";\nimport {Badge} from \"@khanacademy/wonder-blocks-badge\";\n\nexport default {\n    title: \"Packages / Tokens / Utilities / tokenValue\",\n    tags: [\"!dev\"],\n    args: {},\n    parameters: {\n        chromatic: {\n            // Disables chromatic testing for these stories. We use interaction\n            // tests for this instead.\n            disableSnapshot: true,\n        },\n    },\n} satisfies Meta;\n\ntype Story = StoryObj<{token: string}>;\n\nconst styles = StyleSheet.create({\n    colorItem: {\n        flexDirection: \"row\",\n        alignItems: \"center\",\n        gap: sizing.size_080,\n    },\n});\n\nconst ColorItem = ({\n    color,\n    label,\n    value,\n    testId,\n}: {\n    color: string;\n    label: string;\n    value: string;\n    testId?: string;\n}) => {\n    return (\n        <View style={styles.colorItem}>\n            {label}:\n            <Badge\n                testId={testId}\n                icon={\n                    <View\n                        style={{\n                            display: \"inline-flex\",\n                            width: sizing.size_160,\n                            height: sizing.size_160,\n                            borderRadius: border.radius.radius_full,\n                            backgroundColor: color,\n                            boxShadow: boxShadow.low,\n                        }}\n                    />\n                }\n                label={value}\n            />\n        </View>\n    );\n};\n\nexport const TokenValueDefault: Story = {\n    args: {\n        token: semanticColor.core.foreground.instructive.default,\n    },\n    render: function Render() {\n        const [defaultValue, setDefaultValue] = React.useState(\"\");\n        const [tbValue, setTbValue] = React.useState(\"\");\n        const defaultRef = React.useRef(null);\n        const tbRef = React.useRef(null);\n\n        React.useEffect(() => {\n            if (defaultRef.current) {\n                setDefaultValue(\n                    tokenValue(\n                        semanticColor.core.foreground.instructive.default,\n                        defaultRef.current,\n                    ),\n                );\n            }\n            if (tbRef.current) {\n                setTbValue(\n                    tokenValue(\n                        semanticColor.core.foreground.instructive.default,\n                        tbRef.current,\n                    ),\n                );\n            }\n        }, []);\n\n        return (\n            <View style={{flexDirection: \"row\", gap: sizing.size_240}}>\n                <ThemeSwitcher theme=\"default\">\n                    <View ref={defaultRef} style={{gap: sizing.size_080}}>\n                        <Heading>default theme</Heading>\n                        <ColorItem\n                            testId=\"default-raw-value\"\n                            label=\"Raw value\"\n                            value={defaultValue}\n                            color={defaultValue}\n                        />\n                    </View>\n                </ThemeSwitcher>\n                <ThemeSwitcher theme=\"thunderblocks\">\n                    <View ref={tbRef} style={{gap: sizing.size_080}}>\n                        <Heading>thunderblocks theme</Heading>\n                        <ColorItem\n                            testId=\"tb-raw-value\"\n                            label=\"Raw value\"\n                            value={tbValue}\n                            color={tbValue}\n                        />\n                    </View>\n                </ThemeSwitcher>\n            </View>\n        );\n    },\n    play: async ({canvasElement}) => {\n        const canvas = within(canvasElement);\n        await expect(canvas.getByTestId(\"default-raw-value\")).toHaveTextContent(\n            \"#1865f2\",\n        );\n        await expect(canvas.getByTestId(\"tb-raw-value\")).toHaveTextContent(\n            \"#5753FA\",\n        );\n    },\n};\n\n// NOTE: Raw value is extracted at the time of rendering, so if the theme\n// changes after that, the raw value won't update.\nconst defaultRawValue = tokenValue(\n    semanticColor.core.foreground.instructive.default,\n);\n\nexport const TokenValueElementOverride: Story = {\n    args: {\n        token: semanticColor.core.foreground.instructive.default,\n    },\n    render: function Render() {\n        const themeRef = React.useRef<HTMLElement | null>(null);\n        const [tokenValueResult, setTokenValueResult] = React.useState(\"\");\n\n        React.useEffect(() => {\n            if (themeRef.current) {\n                setTokenValueResult(\n                    tokenValue(\n                        semanticColor.core.foreground.instructive.default,\n                        themeRef.current,\n                    ),\n                );\n            }\n        }, []);\n\n        return (\n            <View>\n                <ThemeSwitcher theme=\"thunderblocks\">\n                    <View ref={themeRef} style={{gap: sizing.size_080}}>\n                        <Heading>\n                            semanticColor.core.foreground.instructive.default\n                            token\n                        </Heading>\n\n                        <ColorItem\n                            label=\"Default raw value\"\n                            value={defaultRawValue}\n                            color={defaultRawValue}\n                            testId=\"default-raw-value\"\n                        />\n                        <ColorItem\n                            label=\"Scoped raw value\"\n                            value={tokenValueResult}\n                            color={tokenValueResult}\n                            testId=\"scoped-raw-value\"\n                        />\n                    </View>\n                </ThemeSwitcher>\n            </View>\n        );\n    },\n    play: async ({canvasElement}) => {\n        const canvas = within(canvasElement);\n        await expect(canvas.getByTestId(\"default-raw-value\")).toHaveTextContent(\n            \"#1865f2\",\n        );\n        await expect(canvas.getByTestId(\"scoped-raw-value\")).toHaveTextContent(\n            \"#5753FA\",\n        );\n    },\n};\n\nexport const NonSemanticTokenValue = () => {\n    return (\n        <View>\n            <Heading>sizing.size_080 token</Heading>\n            <BodyText>\n                Raw value: <code>{tokenValue(sizing.size_080) || \"…\"}</code>\n            </BodyText>\n        </View>\n    );\n};\n"}},"packages-toolbar":{"id":"packages-toolbar","name":"Toolbar","path":"./__docs__/wonder-blocks-toolbar/toolbar.stories.tsx","stories":[{"id":"packages-toolbar--default","name":"Default","snippet":"const Default = () => <Toolbar\n    title=\"Counting with small numbers\"\n    leftContent={leftContentMappings.dismissButton}\n    rightContent={rightContentMappings.nextVideoButton} />;","description":"Default example (interactive). A toolbar with left and right content."},{"id":"packages-toolbar--small","name":"Small","snippet":"const Small = () => <Toolbar\n    size=\"small\"\n    leftContent={leftContentMappings.multipleContent}\n    rightContent={rightContentMappings.tertiaryButton} />;","description":"Small toolbar with multiple left side buttons."},{"id":"packages-toolbar--medium","name":"Medium","snippet":"const Medium = () => <Toolbar\n    leftContent={leftContentMappings.hintButton}\n    rightContent={rightContentMappings.primaryButton} />;","description":"Toolbar with left icon button and right primary button."},{"id":"packages-toolbar--with-title","name":"With Title","snippet":"const WithTitle = () => <Toolbar\n    leftContent={leftContentMappings.dismissButton}\n    title=\"Counting with small numbers\" />;","description":"Toolbar with title."},{"id":"packages-toolbar--with-multiple-elements","name":"With Multiple Elements","snippet":"const WithMultipleElements = () => <Toolbar rightContent={rightContentMappings.multipleContent} />;","description":"Toolbar with multiple elements on the right."},{"id":"packages-toolbar--header-overflow-text","name":"Header Overflow Text","snippet":"const HeaderOverflowText = () => <Toolbar\n    leftContent={leftContentMappings.dismissButton}\n    subtitle=\"1 of 14 questions answered\"\n    title=\"Patterns of migration and communal bird-feeding given the serious situation of things that will make this string long and obnoxious\"\n    rightContent={rightContentMappings.link} />;","description":"Header overflow text."},{"id":"packages-toolbar--responsive","name":"Responsive","snippet":"const Responsive = () => <Toolbar\n    leftContent={leftContentMappings.hintButton}\n    rightContent={rightContentMappings.responsive} />;","description":"Flexible toolbars."},{"id":"packages-toolbar--dark","name":"Dark","snippet":"const Dark = () => <Toolbar\n    color=\"dark\"\n    title=\"Title\"\n    leftContent={leftContentMappings.lightButton}\n    rightContent={rightContentMappings.lightButton} />;","description":"Inverted dark-color scheme"},{"id":"packages-toolbar--custom-toolbar","name":"Custom Toolbar","snippet":"const CustomToolbar = () => <Toolbar\n    leftContent={leftContentMappings.exitWithTitle}\n    rightContent={rightContentMappings.primaryButton}\n    title={(<View\n        style={{\n            width: 300,\n            maxInlineSize: \"100%\",\n            height: sizing.size_080,\n            background: semanticColor.mastery.primary,\n        }}\n    />)} />;","description":"Sometimes we need to have a custom toolbar to include a custom component or a more complex layout in the center of the toolbar. This can be achieved by passing a React node to the `title` prop. **NOTE:** This approach should be used with caution, as it may break the layout of the toolbar."}],"import":"import Toolbar, { ComponentInfo } from \"@khanacademy/wonder-blocks-toolbar\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"The `Toolbar` component is a generic toolbar wrapper that exposes customization options. An optional `title` and `subtitle` property can be used along with left and right content passed as props. ### Usage ```jsx import Toolbar from \"@khanacademy/wonder-blocks-toolbar\"; <Toolbar size=\"small\" leftContent={<IconButton icon={icons.dismiss} kind=\"tertiary\" />} rightContent={<Button>Next Video</Button>} /> ```","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-toolbar/src/index.ts","description":"The `Toolbar` component is a generic toolbar wrapper that exposes\ncustomization options. An optional `title` and `subtitle` property can be\nused along with left and right content passed as props.\n\n### Usage\n\n```jsx\nimport Toolbar from \"@khanacademy/wonder-blocks-toolbar\";\n\n<Toolbar\n  size=\"small\"\n  leftContent={<IconButton icon={icons.dismiss} kind=\"tertiary\" />}\n  rightContent={<Button>Next Video</Button>}\n/>\n```","displayName":"src","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"color":{"defaultValue":{"value":"light"},"description":"Whether we should use the default light color scheme or switch to a\ndarker blue scheme.","name":"color","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-toolbar/src/components/toolbar.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"light\" | \"dark\"","value":[{"value":"\"light\""},{"value":"\"dark\""}]}},"leftContent":{"defaultValue":null,"description":"An optional node to render on the left side of the toolbar. This will\noften be empty, but may include a close button for modals.","name":"leftContent","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-toolbar/src/components/toolbar.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"rightContent":{"defaultValue":null,"description":"An optional node to render on the right side of the toolbar. This will\ntypically include buttons, links, or span elements with text.","name":"rightContent","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-toolbar/src/components/toolbar.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"size":{"defaultValue":{"value":"medium"},"description":"How much vertical space to use for the toolbar. If this prop is not\nprovided, the default is \"medium\".","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-toolbar/src/components/toolbar.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"small\" | \"medium\"","value":[{"value":"\"small\""},{"value":"\"medium\""}]}},"subtitle":{"defaultValue":null,"description":"An optional subtitle rendered in a lighter colour and smaller font size\nbelow the title. Only visible on larger media sizes.","name":"subtitle","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-toolbar/src/components/toolbar.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"title":{"defaultValue":null,"description":"The main title rendered in larger bold text. It also supports rendering\nReact nodes (use with caution).","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-toolbar/src/components/toolbar.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-toolbar/src/components/toolbar.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}}},"exportName":"src"}},"packages-tooltip-tooltipcontent":{"id":"packages-tooltip-tooltipcontent","name":"TooltipContent","path":"./__docs__/wonder-blocks-tooltip/tooltip-content.stories.tsx","stories":[{"id":"packages-tooltip-tooltipcontent--default","name":"Default","snippet":"const Default = () => <TooltipContent title=\"A Tooltip with a title\">some text</TooltipContent>;","description":"Default example (interactive)."},{"id":"packages-tooltip-tooltipcontent--only-text-content","name":"Only Text Content","snippet":"const OnlyTextContent = () => <TooltipContent>Only the content</TooltipContent>;","description":"Only text content"},{"id":"packages-tooltip-tooltipcontent--titled-content","name":"Titled Content","snippet":"const TitledContent = () => <TooltipContent title=\"This tooltip has a title\">Some content in my tooltip</TooltipContent>;","description":"Titled content"},{"id":"packages-tooltip-tooltipcontent--custom-content","name":"Custom Content","snippet":"const CustomContent = () => <TooltipContent title={<BodyText>Body text title!</BodyText>}>(<>\n        <BodyText>Body text content!</BodyText>\n        <BodyText>And BodyText!</BodyText>\n    </>)</TooltipContent>;","description":"Custom title and custom content"},{"id":"packages-tooltip-tooltipcontent--rich-text-content","name":"Rich Text Content","snippet":"const RichTextContent = () => <TooltipContent>(<BodyText>Use <strong>bold</strong>, <em>italic</em>, or <u>underlined</u>{\" \"}text by passing a React element instead of a plain string.\n                    </BodyText>)</TooltipContent>;","description":"To render rich text in tooltip content, pass a React element as `children` instead of a plain string. When a string is passed, it is wrapped in `BodyText` and rendered as plain text — HTML tags in a string will appear literally (e.g. `<i>text</i>`). Wrapping content in a typography component and using inline HTML elements gives full control over formatting."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo, TooltipContent } from \"@khanacademy/wonder-blocks-tooltip\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"TooltipContent\" component.\n  10 | type StoryComponentType = StoryObj<typeof TooltipContent>;\n  11 |\n> 12 | export default {\n     | ^\n  13 |     title: \"Packages / Tooltip / TooltipContent\",\n  14 |     component: TooltipContent,\n  15 |     parameters: {\n\n./__docs__/wonder-blocks-tooltip/tooltip-content.stories.tsx:\nimport * as React from \"react\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\n\nimport {TooltipContent} from \"@khanacademy/wonder-blocks-tooltip\";\nimport packageConfig from \"../../packages/wonder-blocks-tooltip/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\n\ntype StoryComponentType = StoryObj<typeof TooltipContent>;\n\nexport default {\n    title: \"Packages / Tooltip / TooltipContent\",\n    component: TooltipContent,\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        chromatic: {\n            // Visual coverage is provided by the Tooltip StateSheet snapshot,\n            // which renders TooltipContent inside the Tooltip bubble.\n            disableSnapshot: true,\n        },\n    },\n} as Meta<typeof TooltipContent>;\n\n/**\n * Default example (interactive).\n */\nexport const Default: StoryComponentType = {\n    args: {\n        title: \"A Tooltip with a title\",\n        children: \"some text\",\n    },\n};\n\n/**\n * Only text content\n */\nexport const OnlyTextContent: StoryComponentType = {\n    args: {\n        children: \"Only the content\",\n    },\n};\n\nOnlyTextContent.parameters = {\n    docs: {\n        description: {\n            story: \"This shows the default which is text rendered using `BodyText`.\",\n        },\n    },\n};\n\n/**\n * Titled content\n */\nexport const TitledContent: StoryComponentType = {\n    args: {\n        title: \"This tooltip has a title\",\n        children: \"Some content in my tooltip\",\n    },\n};\n\nTitledContent.parameters = {\n    docs: {\n        description: {\n            story: \"This shows the default with a title; the title is rendered using `Heading`.\",\n        },\n    },\n};\n\n/**\n * Custom title and custom content\n */\nexport const CustomContent: StoryComponentType = {\n    args: {\n        title: <BodyText>Body text title!</BodyText>,\n        children: (\n            <>\n                <BodyText>Body text content!</BodyText>\n                <BodyText>And BodyText!</BodyText>\n            </>\n        ),\n    },\n};\n\nCustomContent.parameters = {\n    docs: {\n        description: {\n            story: \"This shows how we can customize both the title and the content.\",\n        },\n    },\n};\n\n/**\n * To render rich text in tooltip content, pass a React element as `children`\n * instead of a plain string. When a string is passed, it is wrapped in\n * `BodyText` and rendered as plain text — HTML tags in a string will appear\n * literally (e.g. `<i>text</i>`). Wrapping content in a typography component\n * and using inline HTML elements gives full control over formatting.\n */\nexport const RichTextContent: StoryComponentType = {\n    args: {\n        children: (\n            <BodyText>\n                Use <strong>bold</strong>, <em>italic</em>, or <u>underlined</u>{\" \"}\n                text by passing a React element instead of a plain string.\n            </BodyText>\n        ),\n    },\n};\n"}},"packages-tooltip-tooltip":{"id":"packages-tooltip-tooltip","name":"Tooltip as unknown as React.ComponentType<any>","path":"./__docs__/wonder-blocks-tooltip/tooltip.stories.tsx","stories":[{"id":"packages-tooltip-tooltip--default","name":"Default","snippet":"const Default = () => <Tooltip as unknown as React.ComponentType<any> forceAnchorFocusivity placement=\"top\" />;","description":"Default example (interactive)."},{"id":"packages-tooltip-tooltip--complex-anchor-and-title","name":"Complex Anchor And Title","snippet":"const ComplexAnchorAndTitle = () => <Tooltip as unknown as React.ComponentType<any> forceAnchorFocusivity placement=\"top\" />;","description":"In this example, we're no longer forcing the anchor root to be focusable, since the text input can take focus. However, that needs a custom accessibility implementation too (for that, we should use `useId`, but we'll cheat here and give our own identifier)."},{"id":"packages-tooltip-tooltip--with-link-anchor","name":"With Link Anchor","snippet":"const WithLinkAnchor = function Render() {\n    return (\n        <Tooltip\n            content=\"This link navigates to the Khan Academy homepage.\"\n            placement=\"top\"\n            forceAnchorFocusivity={false}\n        >\n            <Link href=\"https://www.khanacademy.org\">Khan Academy</Link>\n        </Tooltip>\n    );\n};","description":"Tooltips can be used with links as anchors. When a `Link` is the anchor element, set `forceAnchorFocusivity={false}` since the link is already keyboard focusable. The tooltip will appear on hover or focus and the `aria-describedby` attribute is automatically applied to the `Link` element."},{"id":"packages-tooltip-tooltip--with-rich-text-content","name":"With Rich Text Content","snippet":"const WithRichTextContent = function Render() {\n    return (\n        <Tooltip\n            content={\n                <BodyText style={{padding: sizing.size_120}}>\n                    Use <strong>bold</strong>, <em>italic</em>, or{\" \"}\n                    <u>underlined</u> text by passing a React element\n                    instead of a plain string.\n                </BodyText>\n            }\n            opened={true}\n            forceAnchorFocusivity={false}\n        >\n            <Link href=\"https://www.khanacademy.org\">Khan Academy</Link>\n        </Tooltip>\n    );\n};","description":"To render rich text in tooltip content, pass a React element as the `content` prop instead of a plain string. When a string is passed it is rendered as plain text — HTML tags in a string will appear literally (e.g. `<i>text</i>`). Use inline HTML elements inside a typography component to control formatting."},{"id":"packages-tooltip-tooltip--anchor-in-scrollable-parent","name":"Anchor In Scrollable Parent","snippet":"const AnchorInScrollableParent = function Render() {\n    return (\n        <View style={styles.scrollbox}>\n            <View style={styles.hostbox}>\n                <BodyText>\n                    This is a big long piece of text with a\n                    <Tooltip\n                        content=\"This tooltip will disappear when scrolled out of bounds\"\n                        placement=\"bottom\"\n                    >\n                        [tooltip]\n                    </Tooltip>{\" \"}\n                    in the middle.\n                </BodyText>\n            </View>\n        </View>\n    );\n};","description":"In this example, we have the anchor in a scrollable parent. Notice how, when the anchor is focused but scrolled out of bounds, the tooltip disappears."},{"id":"packages-tooltip-tooltip--tooltip-in-modal","name":"Tooltip In Modal","snippet":"const TooltipInModal = function Render() {\n    const scrollyContent = (\n        <View style={styles.scrollbox}>\n            <View style={styles.hostbox}>\n                <Tooltip content=\"I'm on the left!\" placement=\"left\">\n                    tooltip\n                </Tooltip>\n            </View>\n        </View>\n    );\n\n    const modal = (\n        <OnePaneDialog\n            title=\"My modal\"\n            footer=\"Still my modal\"\n            content={<View style={styles.modalbox}>{scrollyContent}</View>}\n        />\n    );\n\n    return (\n        <ModalLauncher modal={modal}>\n            {({openModal}) => (\n                <Button onClick={openModal}>Click here!</Button>\n            )}\n        </ModalLauncher>\n    );\n};","description":"This checks that the tooltip works how we want inside a modal. Click the button to take a look."},{"id":"packages-tooltip-tooltip--side-by-side","name":"Side-by-side","snippet":"const SideBySide = () => (\n    <View style={styles.row}>\n        <Tooltip content=\"Tooltip A\" placement=\"bottom\">\n            <View style={styles.block}>A</View>\n        </Tooltip>\n        <Tooltip content=\"Tooltip B\" placement=\"bottom\">\n            <View style={styles.block}>B</View>\n        </Tooltip>\n        <Tooltip content=\"Tooltip C\" placement=\"bottom\">\n            <View style={styles.block}>C</View>\n        </Tooltip>\n        <Tooltip content=\"Tooltip D\" placement=\"bottom\">\n            <View style={styles.block}>D</View>\n        </Tooltip>\n    </View>\n);","description":"Here, we can see that the first tooltip shown has an initial delay before it appears, as does the last tooltip shown, yet when moving between tooltipped items, the transition from one to another is instantaneous."},{"id":"packages-tooltip-tooltip--tooltip-on-buttons","name":"Tooltip On Buttons","snippet":"const TooltipOnButtons = function Render() {\n    return (\n        <View style={[styles.centered, styles.row]}>\n            <Tooltip content={\"This is a tooltip on a button.\"}>\n                <Button disabled={false}>Example 1</Button>\n            </Tooltip>\n            <Tooltip\n                content=\"This is a tooltip on a disabled button.\"\n                placement=\"bottom\"\n            >\n                <Button disabled={true}>Example 2</Button>\n            </Tooltip>\n            <Tooltip content=\"Short and stout\">\n                <IconButton\n                    icon={magnifyingGlass}\n                    aria-label=\"search\"\n                    kind=\"tertiary\"\n                    onClick={() => {}}\n                />\n            </Tooltip>\n        </View>\n    );\n};","description":"This example shows tooltips on different types of buttons."},{"id":"packages-tooltip-tooltip--controlled","name":"Controlled","snippet":"const Controlled = function Render() {\n    const [opened, setOpened] = React.useState(true);\n    const buttonText = `Click to ${opened ? \"close\" : \"open\"} tooltip`;\n\n    return (\n        <View style={[styles.centered, styles.row]}>\n            <Tooltip\n                content=\"You opened the tooltip with a button\"\n                opened={opened}\n            >\n                tooltip\n            </Tooltip>\n            <Button onClick={() => setOpened(!opened)}>{buttonText}</Button>\n        </View>\n    );\n};","description":"Sometimes you'll want to trigger a tooltip programmatically. This can be done by setting the `opened` prop to `true`. In this situation the `Tooltip` is a controlled component. The parent is responsible for managing the opening/closing of the tooltip when using this prop. This means that you'll also have to update `opened` to `false` in response to the `onClose` callback being triggered."},{"id":"packages-tooltip-tooltip--with-style","name":"With Style","snippet":"const WithStyle = function Render() {\n    return (\n        <View style={[styles.centered, styles.row]}>\n            <Tooltip\n                contentStyle={{\n                    color: semanticColor.core.foreground.knockout.default,\n                    padding: sizing.size_320,\n                }}\n                content={`This is a styled tooltip.`}\n                backgroundColor=\"darkBlue\"\n                opened={true}\n                testId=\"test-tooltip\"\n            >\n                My tooltip is styled!\n            </Tooltip>\n        </View>\n    );\n};","description":"Tooltips can be styled with the `backgroundColor` and `contentStyle` props. The example below shows a tooltip with a dark blue background, white text, and 32px of padding."},{"id":"packages-tooltip-tooltip--strong","name":"Strong","snippet":"const Strong = () => <Tooltip as unknown as React.ComponentType<any> forceAnchorFocusivity placement=\"top\" />;","description":"Tooltips support two visual variants via the `variant` prop: - `subtle` (default): the standard tooltip styling. - `strong`: a higher-emphasis, inverse/knockout variant whose colors adapt to the active theme."},{"id":"packages-tooltip-tooltip--auto-update","name":"Auto Update","snippet":"const AutoUpdate = function Render() {\n    const [position, setPosition] = React.useState<{\n        x: number;\n        y: number;\n    } | null>(null);\n    return (\n        <View style={[styles.centered, styles.row, {position: \"relative\"}]}>\n            <Button\n                onClick={() => {\n                    setPosition({\n                        x: Math.floor(Math.random() * 200),\n                        y: Math.floor(Math.random() * 200),\n                    });\n                }}\n            >\n                Click to update trigger position (randomly)\n            </Button>\n\n            <Button\n                onClick={() => {\n                    setPosition({\n                        x: 0,\n                        y: 0,\n                    });\n                }}\n            >\n                Click to update trigger position (fixed)\n            </Button>\n            <Tooltip\n                content=\"This is a tooltip that auto-updates its position when the trigger element changes.\"\n                opened={true}\n                autoUpdate={true}\n            >\n                <View\n                    style={[\n                        position && {\n                            position: \"absolute\",\n                            insetBlockStart: position.y,\n                            insetInlineStart: position.x,\n                        },\n                    ]}\n                >\n                    Trigger element\n                </View>\n            </Tooltip>\n        </View>\n    );\n};","description":"Tooltip by default (and for performance reasons) only updates its position under the following conditions: 1. When the window is resized. 2. When the scroll position changes. However, there are cases where you might want the tooltip to update its position when the trigger element changes. This can be done by setting the `autoUpdate` prop to `true`."},{"id":"packages-tooltip-tooltip--in-top-corner","name":"In Top Corner","snippet":"const InTopCorner = () => (\n    <View\n        style={{\n            position: \"absolute\",\n            insetBlockStart: 0,\n            insetInlineStart: 0,\n        }}\n    >\n        <Tooltip content=\"This is an example descriptor that's long with more content to see if it will display properly in different browsers\">\n            <PhosphorIcon\n                icon={info}\n                size=\"small\"\n                aria-label=\"Info\"\n                style={{\n                    \":hover\": {\n                        backgroundColor:\n                            semanticColor.status.critical.foreground,\n                    },\n                }}\n            />\n        </Tooltip>\n    </View>\n);","description":"This story shows the behaviour of the tooltip when it is in the top corner"},{"id":"packages-tooltip-tooltip--in-corners","name":"In Corners","snippet":"const InCorners = (args: PropsFor<typeof Tooltip>) => {\n    const renderTooltip = () => {\n        return (\n            <Tooltip\n                {...args}\n                content=\"This is an example descriptor that's long with more content to see if it will display properly in different browsers\"\n                opened={true}\n            >\n                <Button>Open tooltip</Button>\n            </Tooltip>\n        );\n    };\n    return (\n        <View\n            style={{\n                height: \"100vh\",\n                width: \"100vw\",\n                justifyContent: \"space-between\",\n            }}\n        >\n            <View\n                style={{\n                    flexDirection: \"row\",\n                    justifyContent: \"space-between\",\n                }}\n            >\n                {renderTooltip()}\n                {renderTooltip()}\n            </View>\n            <View\n                style={{\n                    flexDirection: \"row\",\n                    justifyContent: \"space-between\",\n                }}\n            >\n                {renderTooltip()}\n                {renderTooltip()}\n            </View>\n        </View>\n    );\n};","description":"If the Tooltip is placed near the edge of the viewport, default spacing of 12px is applied to provide spacing between the Tooltip and the viewport. This spacing value can be overridden using the `viewportPadding` prop."}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport { ComponentInfo } from \"wonder-blocks\";\nimport IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport { LabeledField } from \"@khanacademy/wonder-blocks-labeled-field\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport { ModalLauncher, OnePaneDialog } from \"@khanacademy/wonder-blocks-modal\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { TextField } from \"@khanacademy/wonder-blocks-form\";\nimport Tooltip from \"@khanacademy/wonder-blocks-tooltip\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component import found","message":"No component file found for the \"Tooltip as unknown as React.ComponentType<any>\" component.\n  65 | type StoryComponentType = StoryObj<typeof Tooltip>;\n  66 |\n> 67 | export default {\n     | ^\n  68 |     title: \"Packages / Tooltip / Tooltip\",\n  69 |     component: Tooltip as unknown as React.ComponentType<any>,\n  70 |     argTypes: TooltipArgTypes,\n\n./__docs__/wonder-blocks-tooltip/tooltip.stories.tsx:\nimport * as React from \"react\";\nimport {StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {expect, within, userEvent} from \"storybook/test\";\n\nimport magnifyingGlass from \"@phosphor-icons/core/regular/magnifying-glass.svg\";\nimport info from \"@phosphor-icons/core/regular/info.svg\";\n\nimport Button from \"@khanacademy/wonder-blocks-button\";\nimport Link from \"@khanacademy/wonder-blocks-link\";\nimport {PropsFor, View} from \"@khanacademy/wonder-blocks-core\";\nimport {TextField} from \"@khanacademy/wonder-blocks-form\";\nimport IconButton from \"@khanacademy/wonder-blocks-icon-button\";\nimport {OnePaneDialog, ModalLauncher} from \"@khanacademy/wonder-blocks-modal\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {BodyText} from \"@khanacademy/wonder-blocks-typography\";\nimport {PhosphorIcon} from \"@khanacademy/wonder-blocks-icon\";\n\nimport Tooltip from \"@khanacademy/wonder-blocks-tooltip\";\nimport packageConfig from \"../../packages/wonder-blocks-tooltip/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport TooltipArgTypes from \"./tooltip.argtypes\";\nimport {LabeledField} from \"@khanacademy/wonder-blocks-labeled-field\";\n\nconst styles = StyleSheet.create({\n    storyCanvas: {\n        // NOTE: This is needed for Chromatic to include the tooltip bubble.\n        minBlockSize: 280,\n        padding: sizing.size_640,\n        justifyContent: \"center\",\n        textAlign: \"center\",\n    },\n    row: {\n        flexDirection: \"row\",\n    },\n    centered: {\n        alignItems: \"center\",\n        justifyContent: \"center\",\n        gap: sizing.size_160,\n        padding: sizing.size_480,\n    },\n    scrollbox: {\n        height: 100,\n        overflow: \"auto\",\n        border: `1px solid ${semanticColor.core.border.neutral.strong}`,\n        margin: sizing.size_120,\n    },\n    hostbox: {\n        minBlockSize: \"200vh\",\n    },\n    modalbox: {\n        height: \"200vh\",\n    },\n    block: {\n        border: `solid 1px ${semanticColor.mastery.primary}`,\n        width: sizing.size_320,\n        height: sizing.size_320,\n        alignItems: \"center\",\n        justifyContent: \"center\",\n    },\n});\n\ntype StoryComponentType = StoryObj<typeof Tooltip>;\n\nexport default {\n    title: \"Packages / Tooltip / Tooltip\",\n    component: Tooltip as unknown as React.ComponentType<any>,\n    argTypes: TooltipArgTypes,\n    args: {\n        forceAnchorFocusivity: true,\n        placement: \"top\",\n    },\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        chromatic: {\n            // Added to ensure that the tooltip is rendered using PopperJS.\n            delay: 500,\n            // Visual coverage is provided by the Tooltip StateSheet snapshot.\n            disableSnapshot: true,\n        },\n    },\n    decorators: [\n        (Story, {parameters}): React.ReactElement =>\n            parameters.layout === \"fullscreen\" ? (\n                Story()\n            ) : (\n                <View style={styles.storyCanvas}>{Story()}</View>\n            ),\n    ],\n} as Meta<typeof Tooltip>;\n\n// NOTE: Casting the args to make the types work with union types.\ntype TooltipArgs = Partial<typeof Tooltip>;\n\n/**\n * Default example (interactive).\n */\nexport const Default: StoryComponentType = {\n    args: {\n        content: \"This is a text tooltip on the top\",\n        children: \"some text\",\n    } as TooltipArgs,\n};\n\nDefault.play = async ({canvasElement}) => {\n    // Arrange\n    // NOTE: Using `body` here to work with React Portals.\n    const canvas = within(canvasElement.ownerDocument.body);\n\n    // Act\n    // Triggers the hover state\n    const text = await canvas.findByText(\"some text\");\n    await userEvent.hover(text);\n\n    // Assert\n    await expect(\n        await canvas.findByText(\"This is a text tooltip on the top\"),\n    ).toBeInTheDocument();\n};\n\n/**\n * In this example, we're no longer forcing the anchor root to be focusable,\n * since the text input can take focus. However, that needs a custom\n * accessibility implementation too (for that, we should use `useId`, but we'll\n * cheat here and give our own identifier).\n */\nexport const ComplexAnchorAndTitle: StoryComponentType = {\n    args: {\n        forceAnchorFocusivity: false,\n        placement: \"bottom\",\n        id: \"my-a11y-tooltip\",\n        title: \"This tooltip has a title\",\n        content: \"I'm at the bottom!\",\n        children: (\n            <LabeledField\n                label=\"Some text\"\n                field={\n                    <TextField\n                        aria-describedby=\"my-a11y-tooltip\"\n                        id=\"\"\n                        onChange={() => {}}\n                        value=\"\"\n                    />\n                }\n            />\n        ),\n    } as TooltipArgs,\n    play: async ({canvasElement}) => {\n        // Arrange\n        // NOTE: Using `body` here to work with React Portals.\n        const canvas = within(canvasElement.ownerDocument.body);\n\n        // Act\n        // Triggers the hover state\n        const text = await canvas.findByText(\"Some text\");\n        await userEvent.hover(text);\n\n        // Assert\n        await expect(\n            await canvas.findByText(\"This tooltip has a title\"),\n        ).toBeInTheDocument();\n    },\n    parameters: {\n        chromatic: {\n            // Snapshot to confirm complex anchor and title\n            disableSnapshot: false,\n        },\n    },\n};\n\n/**\n * Tooltips can be used with links as anchors.\n * When a `Link` is the anchor element, set `forceAnchorFocusivity={false}`\n * since the link is already keyboard focusable. The tooltip will appear on\n * hover or focus and the `aria-describedby` attribute is automatically applied\n * to the `Link` element.\n */\nexport const WithLinkAnchor: StoryComponentType = {\n    render: function Render() {\n        return (\n            <Tooltip\n                content=\"This link navigates to the Khan Academy homepage.\"\n                placement=\"top\"\n                forceAnchorFocusivity={false}\n            >\n                <Link href=\"https://www.khanacademy.org\">Khan Academy</Link>\n            </Tooltip>\n        );\n    },\n    play: async ({canvasElement}) => {\n        // Arrange\n        // NOTE: Using `body` here to work with React Portals.\n        const canvas = within(canvasElement.ownerDocument.body);\n\n        // Act\n        const link = await canvas.findByRole(\"link\", {name: \"Khan Academy\"});\n        await userEvent.hover(link);\n\n        // Assert\n        await expect(\n            await canvas.findByText(\n                \"This link navigates to the Khan Academy homepage.\",\n            ),\n        ).toBeInTheDocument();\n    },\n    parameters: {\n        chromatic: {\n            // Snapshot to confirm tooltip with link anchor\n            disableSnapshot: false,\n        },\n    },\n};\n\n/**\n * To render rich text in tooltip content, pass a React element as the `content`\n * prop instead of a plain string. When a string is passed it is rendered as\n * plain text — HTML tags in a string will appear literally (e.g.\n * `<i>text</i>`). Use inline HTML elements inside a typography component to\n * control formatting.\n */\nexport const WithRichTextContent: StoryComponentType = {\n    render: function Render() {\n        return (\n            <Tooltip\n                content={\n                    <BodyText style={{padding: sizing.size_120}}>\n                        Use <strong>bold</strong>, <em>italic</em>, or{\" \"}\n                        <u>underlined</u> text by passing a React element\n                        instead of a plain string.\n                    </BodyText>\n                }\n                opened={true}\n                forceAnchorFocusivity={false}\n            >\n                <Link href=\"https://www.khanacademy.org\">Khan Academy</Link>\n            </Tooltip>\n        );\n    },\n};\n\n/**\n * In this example, we have the anchor in a scrollable parent. Notice how, when\n * the anchor is focused but scrolled out of bounds, the tooltip disappears.\n */\nexport const AnchorInScrollableParent: StoryComponentType = {\n    render: function Render() {\n        return (\n            <View style={styles.scrollbox}>\n                <View style={styles.hostbox}>\n                    <BodyText>\n                        This is a big long piece of text with a\n                        <Tooltip\n                            content=\"This tooltip will disappear when scrolled out of bounds\"\n                            placement=\"bottom\"\n                        >\n                            [tooltip]\n                        </Tooltip>{\" \"}\n                        in the middle.\n                    </BodyText>\n                </View>\n            </View>\n        );\n    },\n};\n\n/**\n * This checks that the tooltip works how we want inside a modal. Click the\n * button to take a look.\n */\nexport const TooltipInModal: StoryComponentType = {\n    render: function Render() {\n        const scrollyContent = (\n            <View style={styles.scrollbox}>\n                <View style={styles.hostbox}>\n                    <Tooltip content=\"I'm on the left!\" placement=\"left\">\n                        tooltip\n                    </Tooltip>\n                </View>\n            </View>\n        );\n\n        const modal = (\n            <OnePaneDialog\n                title=\"My modal\"\n                footer=\"Still my modal\"\n                content={<View style={styles.modalbox}>{scrollyContent}</View>}\n            />\n        );\n\n        return (\n            <ModalLauncher modal={modal}>\n                {({openModal}) => (\n                    <Button onClick={openModal}>Click here!</Button>\n                )}\n            </ModalLauncher>\n        );\n    },\n};\n\n/**\n * Here, we can see that the first tooltip shown has an initial delay before it\n * appears, as does the last tooltip shown, yet when moving between tooltipped\n * items, the transition from one to another is instantaneous.\n */\nexport const SideBySide: StoryComponentType = {\n    render: () => (\n        <View style={styles.row}>\n            <Tooltip content=\"Tooltip A\" placement=\"bottom\">\n                <View style={styles.block}>A</View>\n            </Tooltip>\n            <Tooltip content=\"Tooltip B\" placement=\"bottom\">\n                <View style={styles.block}>B</View>\n            </Tooltip>\n            <Tooltip content=\"Tooltip C\" placement=\"bottom\">\n                <View style={styles.block}>C</View>\n            </Tooltip>\n            <Tooltip content=\"Tooltip D\" placement=\"bottom\">\n                <View style={styles.block}>D</View>\n            </Tooltip>\n        </View>\n    ),\n    name: \"Side-by-side\",\n};\n\n/**\n * This example shows tooltips on different types of buttons.\n */\nexport const TooltipOnButtons: StoryComponentType = {\n    render: function Render() {\n        return (\n            <View style={[styles.centered, styles.row]}>\n                <Tooltip content={\"This is a tooltip on a button.\"}>\n                    <Button disabled={false}>Example 1</Button>\n                </Tooltip>\n                <Tooltip\n                    content=\"This is a tooltip on a disabled button.\"\n                    placement=\"bottom\"\n                >\n                    <Button disabled={true}>Example 2</Button>\n                </Tooltip>\n                <Tooltip content=\"Short and stout\">\n                    <IconButton\n                        icon={magnifyingGlass}\n                        aria-label=\"search\"\n                        kind=\"tertiary\"\n                        onClick={() => {}}\n                    />\n                </Tooltip>\n            </View>\n        );\n    },\n};\n\n/**\n * Sometimes you'll want to trigger a tooltip programmatically. This can be done\n * by setting the `opened` prop to `true`. In this situation the `Tooltip` is a\n * controlled component. The parent is responsible for managing the\n * opening/closing of the tooltip when using this prop. This means that you'll\n * also have to update `opened` to `false` in response to the `onClose` callback\n * being triggered.\n */\nexport const Controlled: StoryComponentType = {\n    render: function Render() {\n        const [opened, setOpened] = React.useState(true);\n        const buttonText = `Click to ${opened ? \"close\" : \"open\"} tooltip`;\n\n        return (\n            <View style={[styles.centered, styles.row]}>\n                <Tooltip\n                    content=\"You opened the tooltip with a button\"\n                    opened={opened}\n                >\n                    tooltip\n                </Tooltip>\n                <Button onClick={() => setOpened(!opened)}>{buttonText}</Button>\n            </View>\n        );\n    },\n};\n\n/**\n * Tooltips can be styled with the `backgroundColor` and `contentStyle` props.\n * The example below shows a tooltip with a dark blue background, white text,\n * and 32px of padding.\n */\nexport const WithStyle: StoryComponentType = {\n    render: function Render() {\n        return (\n            <View style={[styles.centered, styles.row]}>\n                <Tooltip\n                    contentStyle={{\n                        color: semanticColor.core.foreground.knockout.default,\n                        padding: sizing.size_320,\n                    }}\n                    content={`This is a styled tooltip.`}\n                    backgroundColor=\"darkBlue\"\n                    opened={true}\n                    testId=\"test-tooltip\"\n                >\n                    My tooltip is styled!\n                </Tooltip>\n            </View>\n        );\n    },\n};\n\n/**\n * Tooltips support two visual variants via the `variant` prop:\n *\n * - `subtle` (default): the standard tooltip styling.\n * - `strong`: a higher-emphasis, inverse/knockout variant whose colors adapt\n *   to the active theme.\n */\nexport const Strong: StoryComponentType = {\n    args: {\n        content: \"This is a strong tooltip.\",\n        title: \"Strong variant\",\n        variant: \"strong\",\n        children: \"some text\",\n        opened: true,\n        forceAnchorFocusivity: false,\n    } as TooltipArgs,\n};\n\n/**\n * Tooltip by default (and for performance reasons) only updates its position\n * under the following conditions:\n *\n * 1. When the window is resized.\n * 2. When the scroll position changes.\n *\n * However, there are cases where you might want the tooltip to update its\n * position when the trigger element changes. This can be done by setting the\n * `autoUpdate` prop to `true`.\n */\nexport const AutoUpdate: StoryComponentType = {\n    render: function Render() {\n        const [position, setPosition] = React.useState<{\n            x: number;\n            y: number;\n        } | null>(null);\n        return (\n            <View style={[styles.centered, styles.row, {position: \"relative\"}]}>\n                <Button\n                    onClick={() => {\n                        setPosition({\n                            x: Math.floor(Math.random() * 200),\n                            y: Math.floor(Math.random() * 200),\n                        });\n                    }}\n                >\n                    Click to update trigger position (randomly)\n                </Button>\n\n                <Button\n                    onClick={() => {\n                        setPosition({\n                            x: 0,\n                            y: 0,\n                        });\n                    }}\n                >\n                    Click to update trigger position (fixed)\n                </Button>\n                <Tooltip\n                    content=\"This is a tooltip that auto-updates its position when the trigger element changes.\"\n                    opened={true}\n                    autoUpdate={true}\n                >\n                    <View\n                        style={[\n                            position && {\n                                position: \"absolute\",\n                                insetBlockStart: position.y,\n                                insetInlineStart: position.x,\n                            },\n                        ]}\n                    >\n                        Trigger element\n                    </View>\n                </Tooltip>\n            </View>\n        );\n    },\n    play: async ({canvasElement}) => {\n        // Arrange\n        const canvas = within(canvasElement.ownerDocument.body);\n\n        // Get HTML elements\n        const tooltip = await canvas.findByRole(\"tooltip\");\n        const initialLeft = tooltip.getBoundingClientRect().left;\n        const initialTop = tooltip.getBoundingClientRect().top;\n\n        // Act\n        await userEvent.click(\n            canvas.getByRole(\"button\", {\n                name: /fixed/,\n            }),\n        );\n\n        // Wait for the tooltip to update its position\n        const newTooltip = await canvas.findByRole(\"tooltip\");\n        const newLeft = newTooltip.getBoundingClientRect().left;\n        const newTop = newTooltip.getBoundingClientRect().top;\n\n        // Assert\n        // The tooltip should have updated its position\n        await expect(initialLeft).not.toEqual(newLeft);\n        await expect(initialTop).not.toEqual(newTop);\n    },\n};\n\n/**\n * This story shows the behaviour of the tooltip when it is in the top corner\n */\nexport const InTopCorner = {\n    parameters: {\n        layout: \"fullscreen\",\n        chromatic: {\n            // Disabling snapshot since this is for testing purposes\n            disableSnapshot: true,\n        },\n    },\n    render: () => (\n        <View\n            style={{\n                position: \"absolute\",\n                insetBlockStart: 0,\n                insetInlineStart: 0,\n            }}\n        >\n            <Tooltip content=\"This is an example descriptor that's long with more content to see if it will display properly in different browsers\">\n                <PhosphorIcon\n                    icon={info}\n                    size=\"small\"\n                    aria-label=\"Info\"\n                    style={{\n                        \":hover\": {\n                            backgroundColor:\n                                semanticColor.status.critical.foreground,\n                        },\n                    }}\n                />\n            </Tooltip>\n        </View>\n    ),\n};\n\n/**\n * If the Tooltip is placed near the edge of the viewport, default spacing of\n * 12px is applied to provide spacing between the Tooltip and the viewport. This\n * spacing value can be overridden using the `viewportPadding` prop.\n */\nexport const InCorners = {\n    parameters: {\n        layout: \"fullscreen\",\n        chromatic: {\n            // Enable snapshot for corner alignment examples\n            disableSnapshot: false,\n        },\n    },\n    render: (args: PropsFor<typeof Tooltip>) => {\n        const renderTooltip = () => {\n            return (\n                <Tooltip\n                    {...args}\n                    content=\"This is an example descriptor that's long with more content to see if it will display properly in different browsers\"\n                    opened={true}\n                >\n                    <Button>Open tooltip</Button>\n                </Tooltip>\n            );\n        };\n        return (\n            <View\n                style={{\n                    height: \"100vh\",\n                    width: \"100vw\",\n                    justifyContent: \"space-between\",\n                }}\n            >\n                <View\n                    style={{\n                        flexDirection: \"row\",\n                        justifyContent: \"space-between\",\n                    }}\n                >\n                    {renderTooltip()}\n                    {renderTooltip()}\n                </View>\n                <View\n                    style={{\n                        flexDirection: \"row\",\n                        justifyContent: \"space-between\",\n                    }}\n                >\n                    {renderTooltip()}\n                    {renderTooltip()}\n                </View>\n            </View>\n        );\n    },\n};\n"}},"packages-typography":{"id":"packages-typography","name":"Typography","path":"./__docs__/wonder-blocks-typography/typography.stories.tsx","stories":[{"id":"packages-typography--control-props","name":"Control Props","snippet":"const ControlProps = () => <Heading size=\"xxlarge\" id=\"example-title\">This is a Heading typography element</Heading>;"},{"id":"packages-typography--new-typography-elements","name":"New Typography Elements","snippet":"const NewTypographyElements = () => (\n    <View>\n        <Heading size=\"xxlarge\">Heading</Heading>\n        <BodyText>BodyText</BodyText>\n    </View>\n);","description":"These are all the available Thunderblocks typography elements with their names written out in their respective styles. Wrapping them in `ThemeSwitcher` with `theme =\"thunderblocks\"` will include the Plus Jakarta Sans typeface, otherwise they will default to Lato."},{"id":"packages-typography--with-style","name":"With Style","snippet":"const WithStyle = () => {\n    const styles = StyleSheet.create({\n        blueText: {\n            color: semanticColor.core.foreground.instructive.default,\n        },\n        highlighted: {\n            background: semanticColor.core.background.neutral.subtle,\n        },\n    });\n\n    return (\n        <Heading\n            className={`${css(styles.highlighted)} custom-style`}\n            size=\"xxlarge\"\n            style={styles.blueText}\n        >\n            Blue Title\n        </Heading>\n    );\n};","description":"You can change the color of text using the following patterns: 1. Via the `style` prop. This is our recommended approach. 2. Via the `className` prop. This is not recommended, but it is supported. - You can use the `css` function from `aphrodite` to create a class name that you can pass to the `className` prop. - You can pass a string to the `className` prop. This is not recommended and should only be used as a last resort if the other options don't cover your use case."},{"id":"packages-typography--noto-for-non-latin","name":"Noto For Non Latin","snippet":"const NotoForNonLatin = () => {\n    const languages = {\n        Arabic: {text: \"مرحبا\", dir: \"rtl\"},\n        Armenian: {text: \"Բարեւ\"},\n        Greek: {text: \"γεια σας\"},\n        Hebrew: {text: \"שלום\", dir: \"rtl\"},\n    } as const;\n\n    const [selectedValue, updateValue] = React.useState(\"Arabic\");\n    // @ts-expect-error [FEI-5019] - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly Arabic: { readonly text: \"مرحبا\"; readonly dir: \"rtl\"; }; readonly Armenian: { readonly text: \"Բարեւ\"; }; readonly Greek: { readonly text: \"γεια σας\"; }; readonly Hebrew: { readonly text: \"שלום\"; readonly dir: \"rtl\"; }; }'.\n    const {text, dir} = languages[selectedValue];\n\n    return (\n        <View>\n            <SingleSelect\n                aria-label=\"Language selector\"\n                id=\"unique-language-selector\"\n                placeholder=\"Select language\"\n                onChange={(selectedValue) => updateValue(selectedValue)}\n                selectedValue={selectedValue}\n            >\n                {Object.keys(languages).map((item, key) => (\n                    <OptionItem label={item} value={item} key={key} />\n                ))}\n            </SingleSelect>\n            <View>\n                <Heading size=\"xxlarge\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <Heading size=\"xlarge\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <Heading size=\"large\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <Heading size=\"medium\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <Heading size=\"small\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <BodyText dir={dir}>{text}</BodyText>\n\n                <Heading size=\"large\" weight=\"medium\" dir={dir}>\n                    {text}\n                </Heading>\n            </View>\n        </View>\n    );\n};"},{"id":"packages-typography--paragraph","name":"Paragraph","snippet":"const Paragraph = () => {\n    const longParagraph = `This is an example of a long paragraph.\n    Khan Academy offers practice exercises, instructional videos,\n    and a personalized learning dashboard that empower learners\n    to study at their own pace in and outside of the classroom.\n    We tackle math, science, computing, history, art history, economics,\n    and more, including K-14 and test preparation (SAT, Praxis, LSAT)\n    content. We focus on skill mastery to help learners establish\n    strong foundations, so there's no limit to what they can learn next!`;\n\n    return <BodyText>{longParagraph}</BodyText>;\n};","description":"The `BodyText` typography component is usually used for paragraphs and other body text."},{"id":"packages-typography--monospace","name":"Monospace","snippet":"const Monospace = () => (\n    <BodyMonospace>This is an example of a monospaced text.</BodyMonospace>\n);","description":"The `BodyMonospace` typography component is usually used for code snippets and other monospaced text."},{"id":"packages-typography--line-height","name":"Line Height","snippet":"const LineHeight = () => {\n    const style = {\n        outline: `1px solid ${semanticColor.core.border.neutral.strong}`,\n        marginBottom: sizing.size_120,\n    } as const;\n\n    return (\n        <View>\n            <Heading size=\"xxlarge\" style={style}>\n                Heading.xxlarge\n            </Heading>\n            <Heading size=\"xlarge\" style={style}>\n                Heading.xlarge\n            </Heading>\n            <Heading size=\"large\" style={style}>\n                Heading.large\n            </Heading>\n            <Heading size=\"medium\" style={style}>\n                Heading.medium\n            </Heading>\n            <Heading size=\"small\" style={style}>\n                Heading.small\n            </Heading>\n            <BodyText size=\"medium\" weight=\"bold\" style={style}>\n                BodyText.medium.bold\n            </BodyText>\n            <BodyText style={style}>BodyText.medium (default)</BodyText>\n            <BodyText size=\"small\" style={style}>\n                BodyText.small\n            </BodyText>\n            <BodyText size=\"xsmall\" style={style}>\n                BodyText.xsmall\n            </BodyText>\n            <Heading size=\"large\" weight=\"medium\" style={style}>\n                Tagline\n            </Heading>\n        </View>\n    );\n};","description":"This is a visualization of the line height for each typography element."},{"id":"packages-typography--typography-styles","name":"Typography Styles","snippet":"const TypographyStyles = () => {\n    return (\n        <View style={{gap: sizing.size_200}}>\n            {Object.entries(typographyStyles).map(([key, styles]) => (\n                <StyledDiv key={key} style={{...styles}}>\n                    {key}\n                </StyledDiv>\n            ))}\n        </View>\n    );\n};","description":"The following shows the typography styles available. ``` import { styles as typographyStyles } from \"@khanacademy/wonder-blocks-typography\"; ```"}],"import":"import { BodyMonospace, BodyText, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { ComponentInfo } from \"wonder-blocks\";\nimport { OptionItem, SingleSelect } from \"@khanacademy/wonder-blocks-dropdown\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"error":{"name":"No component found","message":"We could not detect the component from your story file. Specify meta.component.\n  38 | */\n  39 |\n> 40 | export default {\n     | ^\n  41 |     title: \"Packages / Typography\",\n  42 |     parameters: {\n  43 |         componentSubtitle: (\n\n./__docs__/wonder-blocks-typography/typography.stories.tsx:\nimport * as React from \"react\";\nimport {css, StyleSheet} from \"aphrodite\";\nimport type {Meta, StoryObj} from \"@storybook/react-vite\";\n\nimport {addStyle, View} from \"@khanacademy/wonder-blocks-core\";\nimport {OptionItem, SingleSelect} from \"@khanacademy/wonder-blocks-dropdown\";\nimport {semanticColor, sizing} from \"@khanacademy/wonder-blocks-tokens\";\nimport {\n    Heading,\n    BodyText,\n    styles as typographyStyles,\n    BodyMonospace,\n} from \"@khanacademy/wonder-blocks-typography\";\nimport packageConfig from \"../../packages/wonder-blocks-typography/package.json\";\n\nimport ComponentInfo from \"../components/component-info\";\nimport TypographyArgTypes from \"./typography.argtypes\";\nimport {allThemeModes} from \"../../.storybook/modes\";\n\n// NOTE: Only for testing purposes.\n// eslint-disable-next-line import/no-unassigned-import\nimport \"./styles.css\";\n\n/**\nTypography. `wonder-blocks-typography`\nprovides a set of standardized components for displaying text in a consistent\nway. This includes components for headings, paragraphs, and text\nlabels.\n\n### Usage\n\n```jsx\nimport {BodyText, Heading} from \"@khanacademy/wonder-blocks-typography\";\n\n<Heading size=\"xxlarge\">Title: Hello, world!</Heading>\n<BodyText>This is just a regular paragraph</BodyText>\n```\n*/\n\nexport default {\n    title: \"Packages / Typography\",\n    parameters: {\n        componentSubtitle: (\n            <ComponentInfo\n                name={packageConfig.name}\n                version={packageConfig.version}\n            />\n        ),\n        docs: {\n            source: {\n                // See https://github.com/storybookjs/storybook/issues/12596\n                excludeDecorators: true,\n            },\n        },\n    },\n    argTypes: TypographyArgTypes,\n} as Meta<typeof ComponentInfo>;\n\nconst StyledDiv = addStyle(\"div\");\n\nexport const ControlProps: StoryObj<typeof Heading> = {\n    render: (args) => <Heading {...args} />,\n    args: {\n        children: \"This is a Heading typography element\",\n        size: \"xxlarge\",\n        id: \"example-title\",\n    },\n};\n\n/**\n These are all the available Thunderblocks typography elements with their names\n written out in their respective styles. Wrapping them in `ThemeSwitcher` with\n `theme =\"thunderblocks\"` will include the Plus Jakarta Sans typeface, otherwise\n they will default to Lato.\n */\nexport const NewTypographyElements: StoryObj<any> = {\n    render: () => (\n        <View>\n            <Heading size=\"xxlarge\">Heading</Heading>\n            <BodyText>BodyText</BodyText>\n        </View>\n    ),\n    parameters: {\n        chromatic: {\n            // Disabling because the new typography components are covered\n            // in the Heading / BodyText stories\n            disableSnapshot: true,\n        },\n    },\n};\n\n/**\n * You can change the color of text using the following patterns:\n *\n * 1. Via the `style` prop. This is our recommended approach.\n * 2. Via the `className` prop. This is not recommended, but it is supported.\n *  - You can use the `css` function from `aphrodite` to create a class name\n *    that you can pass to the `className` prop.\n *  - You can pass a string to the `className` prop. This is not recommended\n *    and should only be used as a last resort if the other options don't cover\n *   your use case.\n */\nexport const WithStyle: StoryObj<typeof Heading> = {\n    render: () => {\n        const styles = StyleSheet.create({\n            blueText: {\n                color: semanticColor.core.foreground.instructive.default,\n            },\n            highlighted: {\n                background: semanticColor.core.background.neutral.subtle,\n            },\n        });\n\n        return (\n            <Heading\n                className={`${css(styles.highlighted)} custom-style`}\n                size=\"xxlarge\"\n                style={styles.blueText}\n            >\n                Blue Title\n            </Heading>\n        );\n    },\n};\n\nexport const NotoForNonLatin: StoryObj<any> = () => {\n    const languages = {\n        Arabic: {text: \"مرحبا\", dir: \"rtl\"},\n        Armenian: {text: \"Բարեւ\"},\n        Greek: {text: \"γεια σας\"},\n        Hebrew: {text: \"שלום\", dir: \"rtl\"},\n    } as const;\n\n    const [selectedValue, updateValue] = React.useState(\"Arabic\");\n    // @ts-expect-error [FEI-5019] - TS7053 - Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ readonly Arabic: { readonly text: \"مرحبا\"; readonly dir: \"rtl\"; }; readonly Armenian: { readonly text: \"Բարեւ\"; }; readonly Greek: { readonly text: \"γεια σας\"; }; readonly Hebrew: { readonly text: \"שלום\"; readonly dir: \"rtl\"; }; }'.\n    const {text, dir} = languages[selectedValue];\n\n    return (\n        <View>\n            <SingleSelect\n                aria-label=\"Language selector\"\n                id=\"unique-language-selector\"\n                placeholder=\"Select language\"\n                onChange={(selectedValue) => updateValue(selectedValue)}\n                selectedValue={selectedValue}\n            >\n                {Object.keys(languages).map((item, key) => (\n                    <OptionItem label={item} value={item} key={key} />\n                ))}\n            </SingleSelect>\n            <View>\n                <Heading size=\"xxlarge\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <Heading size=\"xlarge\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <Heading size=\"large\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <Heading size=\"medium\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <Heading size=\"small\" dir={dir}>\n                    {text}\n                </Heading>\n\n                <BodyText dir={dir}>{text}</BodyText>\n\n                <Heading size=\"large\" weight=\"medium\" dir={dir}>\n                    {text}\n                </Heading>\n            </View>\n        </View>\n    );\n};\n\nNotoForNonLatin.parameters = {\n    docs: {\n        description: {story: \"The Noto font is used for non-Latin languages.\"},\n    },\n};\n\n/**\n * The `BodyText` typography component is usually used for paragraphs and other\n * body text.\n */\nexport const Paragraph: StoryObj<typeof BodyText> = {\n    render: () => {\n        const longParagraph = `This is an example of a long paragraph.\n        Khan Academy offers practice exercises, instructional videos,\n        and a personalized learning dashboard that empower learners\n        to study at their own pace in and outside of the classroom.\n        We tackle math, science, computing, history, art history, economics,\n        and more, including K-14 and test preparation (SAT, Praxis, LSAT)\n        content. We focus on skill mastery to help learners establish\n        strong foundations, so there's no limit to what they can learn next!`;\n\n        return <BodyText>{longParagraph}</BodyText>;\n    },\n};\n\n/**\n * The `BodyMonospace` typography component is usually used for code snippets\n * and other monospaced text.\n */\nexport const Monospace: StoryObj<typeof BodyMonospace> = {\n    render: () => (\n        <BodyMonospace>This is an example of a monospaced text.</BodyMonospace>\n    ),\n};\n\n/**\n * This is a visualization of the line height for each typography element.\n */\nexport const LineHeight: StoryObj<any> = {\n    render: () => {\n        const style = {\n            outline: `1px solid ${semanticColor.core.border.neutral.strong}`,\n            marginBottom: sizing.size_120,\n        } as const;\n\n        return (\n            <View>\n                <Heading size=\"xxlarge\" style={style}>\n                    Heading.xxlarge\n                </Heading>\n                <Heading size=\"xlarge\" style={style}>\n                    Heading.xlarge\n                </Heading>\n                <Heading size=\"large\" style={style}>\n                    Heading.large\n                </Heading>\n                <Heading size=\"medium\" style={style}>\n                    Heading.medium\n                </Heading>\n                <Heading size=\"small\" style={style}>\n                    Heading.small\n                </Heading>\n                <BodyText size=\"medium\" weight=\"bold\" style={style}>\n                    BodyText.medium.bold\n                </BodyText>\n                <BodyText style={style}>BodyText.medium (default)</BodyText>\n                <BodyText size=\"small\" style={style}>\n                    BodyText.small\n                </BodyText>\n                <BodyText size=\"xsmall\" style={style}>\n                    BodyText.xsmall\n                </BodyText>\n                <Heading size=\"large\" weight=\"medium\" style={style}>\n                    Tagline\n                </Heading>\n            </View>\n        );\n    },\n};\n\n/**\n * The following shows the typography styles available.\n *\n * ```\n *     import { styles as typographyStyles } from \"@khanacademy/wonder-blocks-typography\";\n * ```\n */\nexport const TypographyStyles: StoryObj = {\n    render: () => {\n        return (\n            <View style={{gap: sizing.size_200}}>\n                {Object.entries(typographyStyles).map(([key, styles]) => (\n                    <StyledDiv key={key} style={{...styles}}>\n                        {key}\n                    </StyledDiv>\n                ))}\n            </View>\n        );\n    },\n    parameters: {\n        chromatic: {\n            modes: allThemeModes,\n        },\n    },\n};\n"}},"packages-typography-accessibility":{"id":"packages-typography-accessibility","name":"BodyText","path":"./__docs__/wonder-blocks-typography/accessibility.stories.tsx","stories":[{"id":"packages-typography-accessibility--font-size","name":"Font size","snippet":"const FontSize = () => (\n    <View>\n        <View style={styles.explanation}>\n            <PhosphorIcon\n                icon={IconMappings.xCircle}\n                style={styles.incorrect}\n            />\n            <BodyText>\n                The following text is too small for body text (10px):\n            </BodyText>\n        </View>\n        <View>\n            <p\n                style={{\n                    fontSize: \"10px\",\n                }}\n            >\n                The quick brown fox jumps over the lazy dog.\n            </p>\n        </View>\n        <View style={styles.explanation}>\n            <PhosphorIcon\n                icon={IconMappings.checkCircle}\n                style={styles.correct}\n            />\n            <BodyText>\n                The following text is adequate for body text (16px):\n            </BodyText>\n        </View>\n        <BodyText>The quick brown fox jumps over the lazy dog</BodyText>\n    </View>\n);"},{"id":"packages-typography-accessibility--color-contrast","name":"Color Contrast","snippet":"const ColorContrast = () => (\n    <View>\n        <View style={styles.explanation}>\n            <PhosphorIcon\n                icon={IconMappings.xCircle}\n                style={styles.incorrect}\n            />\n            <BodyText>\n                The color contrast for the following text is too low:\n            </BodyText>\n        </View>\n        <BodyText\n            style={{\n                // NOTE: Using disabled on purpose to demonstrate the\n                // contrast ratio issue.\n                color: semanticColor.core.foreground.disabled.default,\n            }}\n        >\n            The quick brown fox jumps over the lazy dog\n        </BodyText>\n        <View style={styles.explanation}>\n            <PhosphorIcon\n                icon={IconMappings.checkCircle}\n                style={styles.correct}\n            />\n            <BodyText>\n                The color contrast for the following text is adequate:\n            </BodyText>\n        </View>\n        <BodyText\n            style={{\n                color: semanticColor.core.foreground.neutral.strong,\n            }}\n        >\n            The quick brown fox jumps over the lazy dog\n        </BodyText>\n    </View>\n);"},{"id":"packages-typography-accessibility--line-spacing","name":"Line spacing","snippet":"const LineSpacing = () => (\n    <View>\n        <View style={styles.explanation}>\n            <PhosphorIcon\n                icon={IconMappings.xCircle}\n                style={styles.incorrect}\n            />\n            <BodyText>The following line spacing is too small:</BodyText>\n        </View>\n        <View>\n            <p\n                style={{\n                    lineHeight: 1,\n                }}\n            >\n                Khan Academy offers practice exercises, instructional\n                videos, and a personalized learning dashboard that empower\n                learners to study at their own pace in and outside of the\n                classroom. We tackle math, science, computing, history, art\n                history, economics, and more, including K-14 and test\n                preparation (SAT, Praxis, LSAT) content. We focus on skill\n                mastery to help learners establish strong foundations, so\n                there is no limit to what they can learn next!\n            </p>\n        </View>\n        <View style={styles.explanation}>\n            <PhosphorIcon\n                icon={IconMappings.checkCircle}\n                style={styles.correct}\n            />\n            <BodyText>The following line spacing is adequate:</BodyText>\n        </View>\n        <BodyText>\n            Khan Academy offers practice exercises, instructional videos,\n            and a personalized learning dashboard that empower learners to\n            study at their own pace in and outside of the classroom. We\n            tackle math, science, computing, history, art history,\n            economics, and more, including K-14 and test preparation (SAT,\n            Praxis, LSAT) content. We focus on skill mastery to help\n            learners establish strong foundations, so there is no limit to\n            what they can learn next!\n        </BodyText>\n    </View>\n);"}],"import":"import { BodyText } from \"@khanacademy/wonder-blocks-typography\";\nimport { PhosphorIcon } from \"@khanacademy/wonder-blocks-icon\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-typography/src/index.ts","description":"","displayName":"BodyText","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Text to appear on the button.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"style":{"defaultValue":null,"description":"Optional custom styles.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}},"tag":{"defaultValue":{"value":"p"},"description":"","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/components/text.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"lang":{"defaultValue":null,"description":"Optional attribute to indicate to the Screen Reader which language the\nitem text is in.","name":"lang","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Optional CSS classes for the entire dropdown component.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"dir":{"defaultValue":null,"description":"The text direction for the element.","name":"dir","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"auto\" | \"ltr\" | \"rtl\"","value":[{"value":"\"auto\""},{"value":"\"ltr\""},{"value":"\"rtl\""}]}},"htmlFor":{"defaultValue":null,"description":"","name":"htmlFor","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"title":{"defaultValue":null,"description":"","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"data-modal-launcher-portal":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-modal-launcher-portal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"data-placement":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-placement","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onMouseDown":{"defaultValue":null,"description":"","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseUp":{"defaultValue":null,"description":"","name":"onMouseUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseMove":{"defaultValue":null,"description":"","name":"onMouseMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onClick":{"defaultValue":null,"description":"","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDoubleClick":{"defaultValue":null,"description":"","name":"onDoubleClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseEnter":{"defaultValue":null,"description":"","name":"onMouseEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseLeave":{"defaultValue":null,"description":"","name":"onMouseLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOut":{"defaultValue":null,"description":"","name":"onMouseOut","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOver":{"defaultValue":null,"description":"","name":"onMouseOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrag":{"defaultValue":null,"description":"","name":"onDrag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnd":{"defaultValue":null,"description":"","name":"onDragEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnter":{"defaultValue":null,"description":"","name":"onDragEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragExit":{"defaultValue":null,"description":"","name":"onDragExit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragLeave":{"defaultValue":null,"description":"","name":"onDragLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragOver":{"defaultValue":null,"description":"","name":"onDragOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragStart":{"defaultValue":null,"description":"","name":"onDragStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrop":{"defaultValue":null,"description":"","name":"onDrop","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onKeyDown":{"defaultValue":null,"description":"","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyPress":{"defaultValue":null,"description":"","name":"onKeyPress","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyUp":{"defaultValue":null,"description":"","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onChange":{"defaultValue":null,"description":"","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInput":{"defaultValue":null,"description":"","name":"onInput","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInvalid":{"defaultValue":null,"description":"","name":"onInvalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onSubmit":{"defaultValue":null,"description":"","name":"onSubmit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onTouchCancel":{"defaultValue":null,"description":"","name":"onTouchCancel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchEnd":{"defaultValue":null,"description":"","name":"onTouchEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchMove":{"defaultValue":null,"description":"","name":"onTouchMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchStart":{"defaultValue":null,"description":"","name":"onTouchStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onFocus":{"defaultValue":null,"description":"","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"onBlur":{"defaultValue":null,"description":"","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"size":{"defaultValue":{"value":"medium"},"description":"","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-typography/src/components/body-text.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"small\" | \"medium\" | \"xsmall\"","value":[{"value":"\"small\""},{"value":"\"medium\""},{"value":"\"xsmall\""}]}},"weight":{"defaultValue":{"value":"medium"},"description":"","name":"weight","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-typography/src/components/body-text.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"bold\" | \"medium\" | \"semi\"","value":[{"value":"\"bold\""},{"value":"\"medium\""},{"value":"\"semi\""}]}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<unknown>"}}},"exportName":"BodyText"},"docs":{"packages-typography-accessibility--docs":{"id":"packages-typography-accessibility--docs","name":"Docs","path":"./__docs__/wonder-blocks-typography/accessibility.mdx","title":"Packages / Typography / Accessibility","content":"import {Meta, Story, Canvas} from \"@storybook/addon-docs/blocks\";\nimport * as AccessibilityStories from './accessibility.stories';\n\n<Meta of={AccessibilityStories} />\n\n## Typography Accessibility\n\n### Rules of Thumb\n\n* The font size should be large enough for the text to be readable. The\n  font size for the Wonder Blocks Typography `Body` element is currently\n  set to be 16px. Headings are even larger.\n  * Each Wonder Blocks Typography component has its own predetermined\n    font size - this cannot be updated by the user via the `styles` prop.\n* The color contrast should pass WCAG.\n  * \"WCAG 2.0 level AA requires a contrast ratio of at least 4.5:1 for\n    normal text and 3:1 for large text.\" [(Contrast Checker, WebAIM)](https://webaim.org/resources/contrastchecker/).\n* It is best to use a familiar font that is easy to read. By default,\n  most Wonder Blocks Typography elements use Lato (a sans-serif font) for\n  Latin-based languages, and Noto for Non-Latin languages such as Arabic,\n  Armenian, Greek, and Hebrew. The `BodySerif` and `BodySerifBlock`\n  components use the Noto Serif font.\n  * Note that sans-serif fonts are generally recommended for use on web,\n    but serif fonts may be preferable for some users, such as users with\n    dyslexia.\n* There should be adequate line spacing in order to make text easier to read.\n  Each Wonder Blocks Typography component has its own predetermined\n  line height - this cannot be updated by the user via the `styles` prop.\n\nMore information about all these points and more can be found in the\n[References](#references) below.\n\n### Demo: Font size\n\n<Canvas of={AccessibilityStories.FontSize} />\n\n### Demo: Color contrast\n\n<Canvas of={AccessibilityStories.ColorContrast} />\n\n### Demo: Line spacing\n\n<Canvas of={AccessibilityStories.LineSpacing} />\n\n### References\n\n* [Typefaces and Fonts - WebAIM](https://webaim.org/techniques/fonts/)\n* [Contrast Checker - WebAIM](https://webaim.org/resources/contrastchecker)\n"}}},"packages-typography-bodymonospace":{"id":"packages-typography-bodymonospace","name":"BodyMonospace","path":"./__docs__/wonder-blocks-typography/body-monospace.stories.tsx","stories":[{"id":"packages-typography-bodymonospace--default","name":"Default","snippet":"const Default = () => <BodyMonospace>BodyMonospace</BodyMonospace>;"}],"import":"import { BodyMonospace, ComponentInfo } from \"@khanacademy/wonder-blocks-typography\";","jsDocTags":{},"reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-typography/src/index.ts","description":"","displayName":"BodyMonospace","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Text to appear on the button.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"style":{"defaultValue":null,"description":"Optional custom styles.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}},"tag":{"defaultValue":{"value":"span"},"description":"","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/components/text.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"lang":{"defaultValue":null,"description":"Optional attribute to indicate to the Screen Reader which language the\nitem text is in.","name":"lang","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Optional CSS classes for the entire dropdown component.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"dir":{"defaultValue":null,"description":"The text direction for the element.","name":"dir","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"auto\" | \"ltr\" | \"rtl\"","value":[{"value":"\"auto\""},{"value":"\"ltr\""},{"value":"\"rtl\""}]}},"htmlFor":{"defaultValue":null,"description":"","name":"htmlFor","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"title":{"defaultValue":null,"description":"","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"data-modal-launcher-portal":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-modal-launcher-portal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"data-placement":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-placement","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onMouseDown":{"defaultValue":null,"description":"","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseUp":{"defaultValue":null,"description":"","name":"onMouseUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseMove":{"defaultValue":null,"description":"","name":"onMouseMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onClick":{"defaultValue":null,"description":"","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDoubleClick":{"defaultValue":null,"description":"","name":"onDoubleClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseEnter":{"defaultValue":null,"description":"","name":"onMouseEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseLeave":{"defaultValue":null,"description":"","name":"onMouseLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOut":{"defaultValue":null,"description":"","name":"onMouseOut","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOver":{"defaultValue":null,"description":"","name":"onMouseOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrag":{"defaultValue":null,"description":"","name":"onDrag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnd":{"defaultValue":null,"description":"","name":"onDragEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnter":{"defaultValue":null,"description":"","name":"onDragEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragExit":{"defaultValue":null,"description":"","name":"onDragExit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragLeave":{"defaultValue":null,"description":"","name":"onDragLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragOver":{"defaultValue":null,"description":"","name":"onDragOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragStart":{"defaultValue":null,"description":"","name":"onDragStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrop":{"defaultValue":null,"description":"","name":"onDrop","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onKeyDown":{"defaultValue":null,"description":"","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyPress":{"defaultValue":null,"description":"","name":"onKeyPress","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyUp":{"defaultValue":null,"description":"","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onChange":{"defaultValue":null,"description":"","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInput":{"defaultValue":null,"description":"","name":"onInput","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInvalid":{"defaultValue":null,"description":"","name":"onInvalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onSubmit":{"defaultValue":null,"description":"","name":"onSubmit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onTouchCancel":{"defaultValue":null,"description":"","name":"onTouchCancel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchEnd":{"defaultValue":null,"description":"","name":"onTouchEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchMove":{"defaultValue":null,"description":"","name":"onTouchMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchStart":{"defaultValue":null,"description":"","name":"onTouchStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onFocus":{"defaultValue":null,"description":"","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"onBlur":{"defaultValue":null,"description":"","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<unknown>"}}},"exportName":"BodyMonospace"}},"packages-typography-bodytext-new":{"id":"packages-typography-bodytext-new","name":"BodyText","path":"./__docs__/wonder-blocks-typography/body-text.stories.tsx","stories":[{"id":"packages-typography-bodytext-new--default","name":"Default","snippet":"const Default = () => <BodyText size=\"medium\" weight=\"medium\">BodyText</BodyText>;","description":"A dynamic example of the `BodyText` component where you can select a size and weight via props. Defaults to `size=\"medium\"` and `weight=\"medium\"`."},{"id":"packages-typography-bodytext-new--sizes-and-weights","name":"Sizes and weights","snippet":"const SizesAndWeights = () => (\n    <View style={styles.grid}>\n        <View style={styles.row}>\n            <BodyText size=\"xsmall\" weight=\"medium\">\n                xSmall size, medium weight\n            </BodyText>\n            <BodyText size=\"xsmall\" weight=\"bold\">\n                xSmall size, bold weight\n            </BodyText>\n            <div />\n        </View>\n        <View style={styles.row}>\n            <BodyText size=\"small\" weight=\"semi\">\n                Small size, semibold weight\n            </BodyText>\n            <div />\n            <div />\n        </View>\n        <View style={styles.row}>\n            <BodyText size=\"medium\" weight=\"medium\">\n                Medium size, medium weight\n            </BodyText>\n            <BodyText size=\"medium\" weight=\"semi\">\n                Medium size, semibold weight\n            </BodyText>\n            <BodyText size=\"medium\" weight=\"bold\">\n                Medium size, bold weight\n            </BodyText>\n        </View>\n    </View>\n);","description":"An example of the `BodyText` component's `size` and `weight` prop combinations, mimicking the ones found in Figma Foundation specs."},{"id":"packages-typography-bodytext-new--custom-styling","name":"Custom Styling","snippet":"const CustomStyling = () => (\n    <View>\n        <BodyText>\n            Text to show the default styling based on props. If we add more\n            text here, it will run on multiple lines.\n        </BodyText>\n        <BodyText style={styles.customStyle}>\n            A lot of text that runs on multiple lines, with custom styling.\n            We really like ice cream. What flavor is your favorite? That’s\n            not ice cream, it’s sorbet!\n        </BodyText>\n    </View>\n);","description":"An example of overriding `BodyText` component's styling."}],"import":"import { BodyText, ComponentInfo } from \"@khanacademy/wonder-blocks-typography\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"New component for Thunderblocks body text. When wrapped in `<ThemeSwitcher theme=\"classroom\">`, `BodyText` will use the Plus Jakarta Sans font family. ## Props ### `size` The `size` prop will select a font size token based on our [REM font sizing scale](/?path=/docs/packages-tokens-typography--docs&globals=theme:thunderblocks#size). A corresponding line-height token will be automatically selected from our [line-height scale](/?path=/docs/packages-tokens-typography--docs&globals=theme:thunderblocks#lineHeight). Each size resolves to the following font-size and automatic line-height using `font.body` tokens: - xsmall: `sizing.size_120` / `sizing.size_160` - small: `sizing.size_140` / `sizing.size_180` - medium (default): `sizing.size_160` / `sizing.size_200` With no `size` prop set, `BodyText` will default to `medium` font size and line height. ### `weight` The `weight` prop will match a font weight token for Jakarta based on the available [font weights](/?path=/docs/packages-tokens-typography--docs&globals=theme:thunderblocks#weight). - medium (default): `500` - semi: `600` - bold: `700` With no `weight` prop set, `BodyText` will default to `medium` weight. ### `tag` The `tag` prop will set a tagName, such as `tag=\"span\"`. `BodyText` renders with a `p` tag with `margin: 0` and block-level styling by default. For nested components or non-paragraph content, set the `tag` prop (e.g. `tag=\"span\"`, `tag=\"div\"`, `tag=\"label\"`). The default `p` tag was selected based on historical usage and necessary semantics. > Note: Heading text should utilize the `Heading` component. If the size or weight you're looking for doesn't exist in `BodyText`, consider making it a `Heading`!","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-typography/src/index.ts","description":"","displayName":"BodyText","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Text to appear on the button.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"style":{"defaultValue":null,"description":"Optional custom styles.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}},"tag":{"defaultValue":{"value":"p"},"description":"","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/components/text.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"lang":{"defaultValue":null,"description":"Optional attribute to indicate to the Screen Reader which language the\nitem text is in.","name":"lang","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Optional CSS classes for the entire dropdown component.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"dir":{"defaultValue":null,"description":"The text direction for the element.","name":"dir","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"auto\" | \"ltr\" | \"rtl\"","value":[{"value":"\"auto\""},{"value":"\"ltr\""},{"value":"\"rtl\""}]}},"htmlFor":{"defaultValue":null,"description":"","name":"htmlFor","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"title":{"defaultValue":null,"description":"","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"data-modal-launcher-portal":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-modal-launcher-portal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"data-placement":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-placement","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onMouseDown":{"defaultValue":null,"description":"","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseUp":{"defaultValue":null,"description":"","name":"onMouseUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseMove":{"defaultValue":null,"description":"","name":"onMouseMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onClick":{"defaultValue":null,"description":"","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDoubleClick":{"defaultValue":null,"description":"","name":"onDoubleClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseEnter":{"defaultValue":null,"description":"","name":"onMouseEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseLeave":{"defaultValue":null,"description":"","name":"onMouseLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOut":{"defaultValue":null,"description":"","name":"onMouseOut","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOver":{"defaultValue":null,"description":"","name":"onMouseOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrag":{"defaultValue":null,"description":"","name":"onDrag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnd":{"defaultValue":null,"description":"","name":"onDragEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnter":{"defaultValue":null,"description":"","name":"onDragEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragExit":{"defaultValue":null,"description":"","name":"onDragExit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragLeave":{"defaultValue":null,"description":"","name":"onDragLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragOver":{"defaultValue":null,"description":"","name":"onDragOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragStart":{"defaultValue":null,"description":"","name":"onDragStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrop":{"defaultValue":null,"description":"","name":"onDrop","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onKeyDown":{"defaultValue":null,"description":"","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyPress":{"defaultValue":null,"description":"","name":"onKeyPress","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyUp":{"defaultValue":null,"description":"","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onChange":{"defaultValue":null,"description":"","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInput":{"defaultValue":null,"description":"","name":"onInput","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInvalid":{"defaultValue":null,"description":"","name":"onInvalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onSubmit":{"defaultValue":null,"description":"","name":"onSubmit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onTouchCancel":{"defaultValue":null,"description":"","name":"onTouchCancel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchEnd":{"defaultValue":null,"description":"","name":"onTouchEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchMove":{"defaultValue":null,"description":"","name":"onTouchMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchStart":{"defaultValue":null,"description":"","name":"onTouchStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onFocus":{"defaultValue":null,"description":"","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"onBlur":{"defaultValue":null,"description":"","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"size":{"defaultValue":{"value":"medium"},"description":"","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-typography/src/components/body-text.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"small\" | \"medium\" | \"xsmall\"","value":[{"value":"\"small\""},{"value":"\"medium\""},{"value":"\"xsmall\""}]}},"weight":{"defaultValue":{"value":"medium"},"description":"","name":"weight","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-typography/src/components/body-text.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"bold\" | \"medium\" | \"semi\"","value":[{"value":"\"bold\""},{"value":"\"medium\""},{"value":"\"semi\""}]}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<unknown>"}}},"exportName":"BodyText"}},"packages-typography-heading-new":{"id":"packages-typography-heading-new","name":"Heading","path":"./__docs__/wonder-blocks-typography/heading.stories.tsx","stories":[{"id":"packages-typography-heading-new--default","name":"Default","snippet":"const Default = () => <Heading size=\"large\" weight=\"bold\">Heading</Heading>;","description":"A dynamic example of the `Heading` component where you can select a size and weight via props. Defaults to `size=\"large\"` and `weight=\"bold\"`."},{"id":"packages-typography-heading-new--sizes-and-weights","name":"Sizes and weights","snippet":"const SizesAndWeights = () => (\n    <View style={styles.grid}>\n        <View style={styles.row}>\n            <Heading size=\"small\" weight=\"bold\">\n                Small size, bold weight\n            </Heading>\n            <Heading size=\"small\" weight=\"semi\">\n                Small size, semibold weight\n            </Heading>\n            <Heading size=\"small\" weight=\"medium\">\n                Small size, medium weight\n            </Heading>\n        </View>\n        <View style={styles.row}>\n            <Heading size=\"medium\" weight=\"bold\">\n                Medium size, bold weight\n            </Heading>\n            <Heading size=\"medium\" weight=\"semi\">\n                Medium size, semibold weight\n            </Heading>\n            <Heading size=\"medium\" weight=\"medium\">\n                Medium size, medium weight\n            </Heading>\n        </View>\n        <View style={styles.row}>\n            <Heading size=\"large\" weight=\"bold\">\n                Large size, bold weight\n            </Heading>\n            <Heading size=\"large\" weight=\"semi\">\n                Large size, semibold weight\n            </Heading>\n            <Heading size=\"large\" weight=\"medium\">\n                Large size, medium weight\n            </Heading>\n        </View>\n        <View style={styles.row}>\n            <Heading size=\"xlarge\" weight=\"bold\">\n                xLarge size, bold weight\n            </Heading>\n            <Heading size=\"xlarge\" weight=\"semi\">\n                xLarge size, semibold weight\n            </Heading>\n            <Heading size=\"xlarge\" weight=\"medium\">\n                xLarge size, medium weight\n            </Heading>\n        </View>\n        <View style={styles.row}>\n            <Heading size=\"xxlarge\" weight=\"bold\">\n                xxLarge size, bold weight\n            </Heading>\n            <Heading size=\"xxlarge\" weight=\"semi\">\n                xxLarge size, semibold weight\n            </Heading>\n            <div />\n        </View>\n    </View>\n);","description":"An example of the `Heading` component's `size` and `weight` prop combinations, mimicking the ones found in Figma Foundation specs."},{"id":"packages-typography-heading-new--custom-styling","name":"Custom Styling","snippet":"const CustomStyling = () => (\n    <View>\n        <Heading>\n            Text to show the default styling based on props. If we add more\n            text here, it will run on multiple lines.\n        </Heading>\n        <Heading style={styles.customStyle}>\n            A lot of text that runs on multiple lines, with custom styling.\n            We really like ice cream. What flavor is your favorite? That’s\n            not ice cream, it’s sorbet!\n        </Heading>\n    </View>\n);","description":"An example of overriding `Heading` component's styling."}],"import":"import { ComponentInfo, Heading } from \"@khanacademy/wonder-blocks-typography\";\nimport { View } from \"@khanacademy/wonder-blocks-core\";","jsDocTags":{},"description":"New component for Thunderblocks headings. When wrapped in `<ThemeSwitcher theme=\"classroom\">`, `Heading` will use the Plus Jakarta Sans font family. ## Props ### `size` The `size` prop will select a font size token based on our [REM font sizing scale](/?path=/docs/packages-tokens-typography--docs&globals=theme:thunderblocks#size). A corresponding line-height token will be automatically selected from our [line-height scale](/?path=/docs/packages-tokens-typography--docs&globals=theme:thunderblocks#lineHeight). Each size resolves to the following font-size and automatic line-height using `font.heading` tokens: - small: `sizing.size_160` / `sizing.size_200` (`HeadingXSmall`) - medium: `sizing.size_180` / `sizing.size_240` (`HeadingSmall`) - large (default): `sizing.size_200` / `sizing.size_280` (`HeadingMedium`, `Tagline`) - xlarge: `sizing.size_240` / `sizing.size_320` (`HeadingLarge`) - xxlarge: `sizing.size_320` / `sizing.size_400` (`Title`) With no `size` prop set, `Heading` will default to `large` font-size and line-height. With no `size` or `tag` props set, `Heading` will default to `h2`. ### `weight` The `weight` prop will match a font weight token for Jakarta based on the available [font weights](/?path=/docs/packages-tokens-typography--docs&globals=theme:thunderblocks#weight). - medium: `500` - semi: `600` - bold (default): `700` With no `weight` prop set, `Heading` will default to `bold` weight. ### `tag` You can override the heading level for a given content hierarchy with the `tag` prop, such as `<Heading size=\"xlarge\" tag=\"h3\">`. For each `size`, `Heading` will automatically set a heading `tagName` with a default level: - xxlarge: `\"h1\"` - xlarge: `\"h2\"` - large: `\"h3\"` - medium: `\"h4\"` - small: `\"h4\"` If `tag` is specified, that `h1`-`h6` value will be used in favor of the automatic algorithm. Note: only `h1` through `h6` tags are allowed for accessibility purposes. For other use cases, talk to us in the `#wonder-blocks` channel in Slack or raise an issue. Other content should utilize `BodyText`, primarily in `p` tags.","reactDocgenTypescript":{"tags":{},"filePath":"/home/github/work/wonder-blocks/wonder-blocks/packages/wonder-blocks-typography/src/index.ts","description":"","displayName":"Heading","methods":[],"props":{"aria-activedescendant":{"defaultValue":null,"description":"Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.","name":"aria-activedescendant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-atomic":{"defaultValue":null,"description":"Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.","name":"aria-atomic","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-autocomplete":{"defaultValue":null,"description":"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be\npresented if they are made.","name":"aria-autocomplete","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"inline\" | \"list\" | \"both\"","value":[{"value":"\"none\""},{"value":"\"inline\""},{"value":"\"list\""},{"value":"\"both\""}]}},"aria-busy":{"defaultValue":null,"description":"Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user.","name":"aria-busy","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-checked":{"defaultValue":null,"description":"Indicates the current \"checked\" state of checkboxes, radio buttons, and other widgets.\n@see aria-pressed\n@see aria-selected.","name":"aria-checked","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-colcount":{"defaultValue":null,"description":"Defines the total number of columns in a table, grid, or treegrid.\n@see aria-colindex.","name":"aria-colcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colindex":{"defaultValue":null,"description":"Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.\n@see aria-colcount\n@see aria-colspan.","name":"aria-colindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-colspan":{"defaultValue":null,"description":"Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-colindex\n@see aria-rowspan.","name":"aria-colspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-controls":{"defaultValue":null,"description":"Identifies the element (or elements) whose contents or presence are controlled by the current element.\n@see aria-owns.","name":"aria-controls","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-current":{"defaultValue":null,"description":"Indicates the element that represents the current item within a container or set of related elements.","name":"aria-current","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\""}},"aria-describedby":{"defaultValue":null,"description":"Identifies the element (or elements) that describes the object.\n@see aria-labelledby","name":"aria-describedby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-details":{"defaultValue":null,"description":"Identifies the element that provides a detailed, extended description for the object.\n@see aria-describedby.","name":"aria-details","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-disabled":{"defaultValue":null,"description":"Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.\n@see aria-hidden\n@see aria-readonly.","name":"aria-disabled","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-dropeffect":{"defaultValue":null,"description":"Indicates what functions can be performed when a dragged object is released on the drop target.\n@deprecated in ARIA 1.1","name":"aria-dropeffect","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"link\" | \"none\" | \"copy\" | \"execute\" | \"move\" | \"popup\"","value":[{"value":"\"link\""},{"value":"\"none\""},{"value":"\"copy\""},{"value":"\"execute\""},{"value":"\"move\""},{"value":"\"popup\""}]}},"aria-errormessage":{"defaultValue":null,"description":"Identifies the element that provides an error message for the object.\n@see aria-invalid\n@see aria-describedby.","name":"aria-errormessage","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-expanded":{"defaultValue":null,"description":"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.","name":"aria-expanded","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-flowto":{"defaultValue":null,"description":"Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,\nallows assistive technology to override the general default of reading in document source order.","name":"aria-flowto","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-grabbed":{"defaultValue":null,"description":"Indicates an element's \"grabbed\" state in a drag-and-drop operation.\n@deprecated in ARIA 1.1","name":"aria-grabbed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-haspopup":{"defaultValue":null,"description":"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.","name":"aria-haspopup","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\""}},"aria-hidden":{"defaultValue":null,"description":"Indicates whether the element is exposed to an accessibility API.\n@see aria-disabled.","name":"aria-hidden","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-invalid":{"defaultValue":null,"description":"Indicates the entered value does not conform to the format expected by the application.\n@see aria-errormessage.","name":"aria-invalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"grammar\" | \"spelling\""}},"aria-keyshortcuts":{"defaultValue":null,"description":"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.","name":"aria-keyshortcuts","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-label":{"defaultValue":null,"description":"Defines a string value that labels the current element.\n@see aria-labelledby.","name":"aria-label","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-labelledby":{"defaultValue":null,"description":"Identifies the element (or elements) that labels the current element.\n@see aria-describedby.","name":"aria-labelledby","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-level":{"defaultValue":null,"description":"Defines the hierarchical level of an element within a structure.","name":"aria-level","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-live":{"defaultValue":null,"description":"Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.","name":"aria-live","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"off\" | \"assertive\" | \"polite\"","value":[{"value":"\"off\""},{"value":"\"assertive\""},{"value":"\"polite\""}]}},"aria-modal":{"defaultValue":null,"description":"Indicates whether an element is modal when displayed.","name":"aria-modal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiline":{"defaultValue":null,"description":"Indicates whether a text box accepts multiple lines of input or only a single line.","name":"aria-multiline","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-multiselectable":{"defaultValue":null,"description":"Indicates that the user may select more than one item from the current selectable descendants.","name":"aria-multiselectable","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-orientation":{"defaultValue":null,"description":"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.","name":"aria-orientation","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"horizontal\" | \"vertical\"","value":[{"value":"\"horizontal\""},{"value":"\"vertical\""}]}},"aria-owns":{"defaultValue":null,"description":"Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship\nbetween DOM elements where the DOM hierarchy cannot be used to represent the relationship.\n@see aria-controls.","name":"aria-owns","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-placeholder":{"defaultValue":null,"description":"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.\nA hint could be a sample value or a brief description of the expected format.","name":"aria-placeholder","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-posinset":{"defaultValue":null,"description":"Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-setsize.","name":"aria-posinset","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-pressed":{"defaultValue":null,"description":"Indicates the current \"pressed\" state of toggle buttons.\n@see aria-checked\n@see aria-selected.","name":"aria-pressed","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\" | \"mixed\""}},"aria-readonly":{"defaultValue":null,"description":"Indicates that the element is not editable, but is otherwise operable.\n@see aria-disabled.","name":"aria-readonly","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-relevant":{"defaultValue":null,"description":"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.\n@see aria-atomic.","name":"aria-relevant","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"additions\" | \"additions removals\" | \"additions text\" | \"all\" | \"removals\" | \"removals additions\" | \"removals text\" | \"text\" | \"text additions\" | \"text removals\"","value":[{"value":"\"additions\""},{"value":"\"additions removals\""},{"value":"\"additions text\""},{"value":"\"all\""},{"value":"\"removals\""},{"value":"\"removals additions\""},{"value":"\"removals text\""},{"value":"\"text\""},{"value":"\"text additions\""},{"value":"\"text removals\""}]}},"aria-required":{"defaultValue":null,"description":"Indicates that user input is required on the element before a form may be submitted.","name":"aria-required","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-roledescription":{"defaultValue":null,"description":"Defines a human-readable, author-localized description for the role of an element.","name":"aria-roledescription","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"aria-rowcount":{"defaultValue":null,"description":"Defines the total number of rows in a table, grid, or treegrid.\n@see aria-rowindex.","name":"aria-rowcount","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowindex":{"defaultValue":null,"description":"Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.\n@see aria-rowcount\n@see aria-rowspan.","name":"aria-rowindex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-rowspan":{"defaultValue":null,"description":"Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.\n@see aria-rowindex\n@see aria-colspan.","name":"aria-rowspan","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-selected":{"defaultValue":null,"description":"Indicates the current \"selected\" state of various widgets.\n@see aria-checked\n@see aria-pressed.","name":"aria-selected","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean | \"false\" | \"true\""}},"aria-setsize":{"defaultValue":null,"description":"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.\n@see aria-posinset.","name":"aria-setsize","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-sort":{"defaultValue":null,"description":"Indicates if items in a table or grid are sorted in ascending or descending order.","name":"aria-sort","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"none\" | \"ascending\" | \"descending\" | \"other\"","value":[{"value":"\"none\""},{"value":"\"ascending\""},{"value":"\"descending\""},{"value":"\"other\""}]}},"aria-valuemax":{"defaultValue":null,"description":"Defines the maximum allowed value for a range widget.","name":"aria-valuemax","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuemin":{"defaultValue":null,"description":"Defines the minimum allowed value for a range widget.","name":"aria-valuemin","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuenow":{"defaultValue":null,"description":"Defines the current value for a range widget.\n@see aria-valuetext.","name":"aria-valuenow","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"aria-valuetext":{"defaultValue":null,"description":"Defines the human readable text alternative of aria-valuenow for a range widget.","name":"aria-valuetext","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/aria-types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"","name":"role","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"AriaRole","value":[{"value":"\"search\""},{"value":"\"link\""},{"value":"\"none\""},{"value":"\"list\""},{"value":"\"menu\""},{"value":"\"listbox\""},{"value":"\"tree\""},{"value":"\"grid\""},{"value":"\"dialog\""},{"value":"\"alert\""},{"value":"\"alertdialog\""},{"value":"\"application\""},{"value":"\"article\""},{"value":"\"banner\""},{"value":"\"button\""},{"value":"\"cell\""},{"value":"\"checkbox\""},{"value":"\"columnheader\""},{"value":"\"combobox\""},{"value":"\"complementary\""},{"value":"\"contentinfo\""},{"value":"\"definition\""},{"value":"\"directory\""},{"value":"\"document\""},{"value":"\"feed\""},{"value":"\"figure\""},{"value":"\"form\""},{"value":"\"gridcell\""},{"value":"\"group\""},{"value":"\"heading\""},{"value":"\"img\""},{"value":"\"listitem\""},{"value":"\"log\""},{"value":"\"main\""},{"value":"\"marquee\""},{"value":"\"math\""},{"value":"\"menubar\""},{"value":"\"menuitem\""},{"value":"\"menuitemcheckbox\""},{"value":"\"menuitemradio\""},{"value":"\"navigation\""},{"value":"\"note\""},{"value":"\"option\""},{"value":"\"presentation\""},{"value":"\"progressbar\""},{"value":"\"radio\""},{"value":"\"radiogroup\""},{"value":"\"region\""},{"value":"\"row\""},{"value":"\"rowgroup\""},{"value":"\"rowheader\""},{"value":"\"scrollbar\""},{"value":"\"searchbox\""},{"value":"\"separator\""},{"value":"\"slider\""},{"value":"\"spinbutton\""},{"value":"\"status\""},{"value":"\"switch\""},{"value":"\"tab\""},{"value":"\"table\""},{"value":"\"tablist\""},{"value":"\"tabpanel\""},{"value":"\"term\""},{"value":"\"textbox\""},{"value":"\"timer\""},{"value":"\"toolbar\""},{"value":"\"tooltip\""},{"value":"\"treegrid\""},{"value":"\"treeitem\""}]}},"id":{"defaultValue":null,"description":"","name":"id","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Text to appear on the button.","name":"children","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"style":{"defaultValue":null,"description":"Optional custom styles.","name":"style","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"StyleType"}},"key":{"defaultValue":null,"description":"","name":"key","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"},{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"Attributes"}],"required":false,"type":{"name":"Key | null"}},"tag":{"defaultValue":null,"description":"","name":"tag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/components/text.tsx","name":"TypeLiteral"},{"fileName":"wonder-blocks/packages/wonder-blocks-typography/src/components/heading.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"","value":[{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"h6\""}]}},"testId":{"defaultValue":null,"description":"Test ID used for e2e testing.","name":"testId","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"lang":{"defaultValue":null,"description":"Optional attribute to indicate to the Screen Reader which language the\nitem text is in.","name":"lang","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"className":{"defaultValue":null,"description":"Optional CSS classes for the entire dropdown component.","name":"className","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"dir":{"defaultValue":null,"description":"The text direction for the element.","name":"dir","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"auto\" | \"ltr\" | \"rtl\"","value":[{"value":"\"auto\""},{"value":"\"ltr\""},{"value":"\"rtl\""}]}},"htmlFor":{"defaultValue":null,"description":"","name":"htmlFor","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"tabIndex":{"defaultValue":null,"description":"","name":"tabIndex","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"number"}},"title":{"defaultValue":null,"description":"","name":"title","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"data-modal-launcher-portal":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-modal-launcher-portal","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"boolean"}},"data-placement":{"defaultValue":null,"description":"Should be ignored\n@ignore","name":"data-placement","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string"}},"onMouseDown":{"defaultValue":null,"description":"","name":"onMouseDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseUp":{"defaultValue":null,"description":"","name":"onMouseUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseMove":{"defaultValue":null,"description":"","name":"onMouseMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onClick":{"defaultValue":null,"description":"","name":"onClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDoubleClick":{"defaultValue":null,"description":"","name":"onDoubleClick","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseEnter":{"defaultValue":null,"description":"","name":"onMouseEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseLeave":{"defaultValue":null,"description":"","name":"onMouseLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOut":{"defaultValue":null,"description":"","name":"onMouseOut","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onMouseOver":{"defaultValue":null,"description":"","name":"onMouseOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrag":{"defaultValue":null,"description":"","name":"onDrag","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnd":{"defaultValue":null,"description":"","name":"onDragEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragEnter":{"defaultValue":null,"description":"","name":"onDragEnter","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragExit":{"defaultValue":null,"description":"","name":"onDragExit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragLeave":{"defaultValue":null,"description":"","name":"onDragLeave","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragOver":{"defaultValue":null,"description":"","name":"onDragOver","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDragStart":{"defaultValue":null,"description":"","name":"onDragStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onDrop":{"defaultValue":null,"description":"","name":"onDrop","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: MouseEvent<Element, MouseEvent>) => unknown)"}},"onKeyDown":{"defaultValue":null,"description":"","name":"onKeyDown","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyPress":{"defaultValue":null,"description":"","name":"onKeyPress","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onKeyUp":{"defaultValue":null,"description":"","name":"onKeyUp","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: KeyboardEvent<Element>) => unknown)"}},"onChange":{"defaultValue":null,"description":"","name":"onChange","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInput":{"defaultValue":null,"description":"","name":"onInput","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onInvalid":{"defaultValue":null,"description":"","name":"onInvalid","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onSubmit":{"defaultValue":null,"description":"","name":"onSubmit","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: ChangeEvent<HTMLInputElement>) => unknown)"}},"onTouchCancel":{"defaultValue":null,"description":"","name":"onTouchCancel","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchEnd":{"defaultValue":null,"description":"","name":"onTouchEnd","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchMove":{"defaultValue":null,"description":"","name":"onTouchMove","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onTouchStart":{"defaultValue":null,"description":"","name":"onTouchStart","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: TouchEvent<Element>) => unknown)"}},"onFocus":{"defaultValue":null,"description":"","name":"onFocus","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"onBlur":{"defaultValue":null,"description":"","name":"onBlur","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-core/src/util/types.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"((e: FocusEvent<Element, Element>) => unknown)"}},"size":{"defaultValue":null,"description":"","name":"size","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-typography/src/components/heading.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"small\" | \"xxlarge\" | \"xlarge\" | \"large\" | \"medium\"","value":[{"value":"\"small\""},{"value":"\"xxlarge\""},{"value":"\"xlarge\""},{"value":"\"large\""},{"value":"\"medium\""}]}},"weight":{"defaultValue":null,"description":"","name":"weight","declarations":[{"fileName":"wonder-blocks/packages/wonder-blocks-typography/src/components/heading.tsx","name":"TypeLiteral"}],"required":false,"type":{"name":"enum","raw":"\"bold\" | \"medium\" | \"semi\"","value":[{"value":"\"bold\""},{"value":"\"medium\""},{"value":"\"semi\""}]}},"ref":{"defaultValue":null,"description":"Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}","name":"ref","parent":{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"},"declarations":[{"fileName":"wonder-blocks/node_modules/.pnpm/@types+react@18.3.18/node_modules/@types/react/index.d.ts","name":"RefAttributes"}],"required":false,"type":{"name":"LegacyRef<unknown>"}}},"exportName":"Heading"}}},"meta":{"docgen":"react-docgen-typescript","durationMs":6292}}