@purpur/library 9.1.0 → 9.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +36 -0
- package/CHANGELOG.md +19 -1
- package/dist/LICENSE.txt +1 -1
- package/dist/{calendar-C-F-pVCe.js → calendar-CoP1dGpQ.js} +2 -2
- package/dist/{calendar-C-F-pVCe.js.map → calendar-CoP1dGpQ.js.map} +1 -1
- package/dist/{calendar-DWpnuylk.mjs → calendar-D_sZrR92.mjs} +151 -140
- package/dist/{calendar-DWpnuylk.mjs.map → calendar-D_sZrR92.mjs.map} +1 -1
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.es.js +1 -1
- package/dist/components/calendar/src/calendar.d.ts.map +1 -1
- package/dist/components/quantity-selector/src/quantity-selector-button.d.ts +2 -1
- package/dist/components/quantity-selector/src/quantity-selector-button.d.ts.map +1 -1
- package/dist/components/quantity-selector/src/quantity-selector.d.ts.map +1 -1
- package/dist/components/table/src/cell-types/button-group-cell.d.ts +6 -2
- package/dist/components/table/src/cell-types/button-group-cell.d.ts.map +1 -1
- package/dist/components/tooltip/src/tooltip.d.ts.map +1 -1
- package/dist/{date-picker-B8L1Hm8r.js → date-picker-BWW4xzyc.js} +2 -2
- package/dist/{date-picker-B8L1Hm8r.js.map → date-picker-BWW4xzyc.js.map} +1 -1
- package/dist/{date-picker-Bp_XpoOF.mjs → date-picker-D7EisjDG.mjs} +2 -2
- package/dist/{date-picker-Bp_XpoOF.mjs.map → date-picker-D7EisjDG.mjs.map} +1 -1
- package/dist/date-picker.cjs.js +1 -1
- package/dist/date-picker.es.js +1 -1
- package/dist/library.cjs.js +1 -1
- package/dist/library.es.js +7 -7
- package/dist/purpur.css +1 -1
- package/dist/quantity-selector-BV7QwVlT.js +2 -0
- package/dist/quantity-selector-BV7QwVlT.js.map +1 -0
- package/dist/{quantity-selector-CsR6KTG3.mjs → quantity-selector-CGhJ2DjO.mjs} +59 -57
- package/dist/quantity-selector-CGhJ2DjO.mjs.map +1 -0
- package/dist/quantity-selector.cjs.js +1 -1
- package/dist/quantity-selector.es.js +1 -1
- package/dist/search-field-Bst9d-wX.js +2 -0
- package/dist/{search-field-DAktzYb0.js.map → search-field-Bst9d-wX.js.map} +1 -1
- package/dist/{search-field-Caj2dKLn.mjs → search-field-DTuEiK-M.mjs} +54 -54
- package/dist/{search-field-Caj2dKLn.mjs.map → search-field-DTuEiK-M.mjs.map} +1 -1
- package/dist/search-field.cjs.js +1 -1
- package/dist/search-field.es.js +1 -1
- package/dist/stepper-ClLQuoXr.js +2 -0
- package/dist/stepper-ClLQuoXr.js.map +1 -0
- package/dist/{stepper-B351hexi.mjs → stepper-k0bX9m4t.mjs} +4 -4
- package/dist/stepper-k0bX9m4t.mjs.map +1 -0
- package/dist/stepper.cjs.js +1 -1
- package/dist/stepper.es.js +1 -1
- package/dist/{table-DXYHrKI7.mjs → table-D_XW4smf.mjs} +2 -2
- package/dist/{table-DXYHrKI7.mjs.map → table-D_XW4smf.mjs.map} +1 -1
- package/dist/{table-x3SDCR-z.js → table-Ddv6BKo9.js} +2 -2
- package/dist/{table-x3SDCR-z.js.map → table-Ddv6BKo9.js.map} +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.es.js +1 -1
- package/dist/{tooltip-B_qTqtcF.js → tooltip-BatXMflw.js} +2 -2
- package/dist/{tooltip-B_qTqtcF.js.map → tooltip-BatXMflw.js.map} +1 -1
- package/dist/{tooltip-BHsVKFJ3.mjs → tooltip-CZzwHkea.mjs} +132 -132
- package/dist/{tooltip-BHsVKFJ3.mjs.map → tooltip-CZzwHkea.mjs.map} +1 -1
- package/dist/tooltip.cjs.js +1 -1
- package/dist/tooltip.es.js +1 -1
- package/package.json +27 -27
- package/dist/quantity-selector-CsR6KTG3.mjs.map +0 -1
- package/dist/quantity-selector-DWDg4aFO.js +0 -2
- package/dist/quantity-selector-DWDg4aFO.js.map +0 -1
- package/dist/search-field-DAktzYb0.js +0 -2
- package/dist/stepper-B351hexi.mjs.map +0 -1
- package/dist/stepper-Cb4_9D2h.js +0 -2
- package/dist/stepper-Cb4_9D2h.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-field-Caj2dKLn.mjs","sources":["../../../components/search-field/src/search-field-button.tsx","../../../components/search-field/src/search-field-base.tsx","../../../components/search-field/src/search-field-autocomplete.tsx","../../../components/search-field/src/search-field.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"@purpur/button\";\nimport { IconSearch } from \"@purpur/icon/search\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./search-field-button.module.scss\";\n\ntype Props = {\n [\"data-testid\"]?: string;\n disabled?: boolean;\n iconOnly?: boolean;\n label: string;\n};\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-search-field-button\";\n\nexport const SearchFieldButton = ({\n [\"data-testid\"]: dataTestid,\n disabled,\n iconOnly,\n label,\n}: Props) => {\n const props = {\n className: cx(rootClassName, {\n [`${rootClassName}--icon-only`]: iconOnly,\n }),\n disabled,\n [\"data-testid\"]: dataTestid,\n };\n\n if (iconOnly) {\n return (\n <Button {...props} aria-label={label} iconOnly size=\"sm\" type=\"submit\" variant=\"primary\">\n <IconSearch size=\"xs\" />\n </Button>\n );\n }\n\n return (\n <Button {...props} size=\"sm\" type=\"submit\" variant=\"primary\">\n {label}\n </Button>\n );\n};\n","import React, {\n type ChangeEvent,\n type CSSProperties,\n type FormEvent,\n forwardRef,\n type RefObject,\n} from \"react\";\nimport { IconSearch } from \"@purpur/icon/search\";\nimport { TextField, type TextFieldProps } from \"@purpur/text-field\";\nimport { type AutocompleteOption } from \"@purpur/use-autocomplete\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./search-field.module.scss\";\nimport { SearchFieldButton } from \"./search-field-button\";\n\nexport const searchFieldVariants = [\"button-attached\", \"no-button\"] as const;\n\ntype Variant = (typeof searchFieldVariants)[number];\n\ntype DefaultProps = {\n [\"data-testid\"]?: string;\n /**\n * An accessible label for the clear button.\n * */\n clearButtonAriaLabel: string;\n /**\n * Disables both the input field and submit button if `true`.\n * */\n disabled?: boolean;\n /**\n * Will display only a search icon in the search button if `true`.\n * */\n iconOnlySearchButton?: boolean;\n /**\n * Event handler called when the value of the search field changes.\n * */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the clear button is clicked.\n * */\n onClear: () => void;\n /**\n * Event handler called when the search form is submitted.\n * */\n onSearch?: (e: FormEvent<HTMLFormElement>) => void;\n /**\n * The label text (or `aria-label` if `iconOnlySearchButton` is `true`) of the search button.\n * */\n searchButtonLabel?: string;\n variant: Variant;\n formRef?: RefObject<HTMLFormElement>;\n};\n\ntype TextSearchButton = {\n iconOnlySearchButton?: false;\n searchButtonLabel: string;\n variant: \"button-attached\";\n};\n\ntype IconOnlySearchButton = {\n iconOnlySearchButton: true;\n searchButtonLabel: string;\n variant: \"button-attached\";\n};\n\ntype NoButton = {\n searchButtonLabel?: never;\n variant: \"no-button\";\n};\n\nexport type SearchFieldBaseProps = DefaultProps &\n (TextSearchButton | IconOnlySearchButton | NoButton) &\n Omit<TextFieldProps, \"startAdornment\" | \"endAdornment\" | \"afterField\" | \"onChange\" | \"variant\">;\n\ntype SearchFieldBaseInternalProps = SearchFieldBaseProps & {\n wrapperStyle?: CSSProperties;\n};\n\ntype SearchFieldAutocompleteSharedProps = {\n /**\n * Called when the user selects a suggestion.\n */\n onSelectSuggestion?: (option: AutocompleteOption) => void;\n /**\n * Open the suggestions listbox when the input receives focus.\n */\n openSuggestionsOnFocus?: boolean;\n /**\n * Maximum height of the suggestions listbox. A number is interpreted as px.\n */\n suggestionsMaxHeight?: string | number;\n};\n\ntype SearchFieldWithoutAutocomplete = SearchFieldAutocompleteSharedProps & {\n suggestions?: never;\n suggestionsLabel?: never;\n};\n\ntype SearchFieldWithAutocomplete = SearchFieldAutocompleteSharedProps & {\n /**\n * The list of suggestions to display in a listbox below the field.\n * No filtering is applied — pass the already-correct (pre-filtered) list.\n * If autocomplete should stay enabled while there are temporarily no matches,\n * pass an empty array instead of `undefined` or `null`. Changing this prop\n * from an absent value to an array switches between the regular and\n * autocomplete variants, which causes a re-render, drops input focus, and\n * hides the listbox.\n */\n suggestions: AutocompleteOption[];\n /**\n * Accessible label for the suggestions listbox.\n */\n suggestionsLabel: string;\n};\n\nexport type SearchFieldAutocompleteEnhancements =\n | SearchFieldWithoutAutocomplete\n | SearchFieldWithAutocomplete;\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-search-field\";\n\nexport const SearchFieldBase = forwardRef<HTMLInputElement, SearchFieldBaseInternalProps>(\n (\n {\n [\"data-testid\"]: dataTestId,\n className,\n clearButtonAriaLabel,\n disabled,\n iconOnlySearchButton,\n onClear,\n onSearch,\n searchButtonLabel,\n variant,\n formRef,\n wrapperStyle,\n ...props\n },\n ref\n ) => {\n const getTestId = (name: string) => (dataTestId ? `${dataTestId}-${name}` : undefined);\n const hasValue =\n typeof props.value === \"number\" ? props.value !== undefined : props.value?.length;\n const hasClearButton = hasValue && !disabled && !props.readOnly && !props.loading;\n\n const classes = cx(className, rootClassName, {\n [`${rootClassName}--no-gap`]: variant === \"button-attached\",\n [`${rootClassName}--has-clear-button`]: hasClearButton,\n });\n\n return (\n <form\n ref={formRef}\n className={cx(`${rootClassName}__wrapper`)}\n data-testid={dataTestId}\n style={wrapperStyle}\n onSubmit={(e: FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n onSearch?.(e);\n }}\n >\n <TextField\n ref={ref}\n className={classes}\n clearButtonAriaLabel={clearButtonAriaLabel}\n disabled={disabled}\n onClear={onClear}\n startAdornment={\n !iconOnlySearchButton ? (\n <IconSearch size=\"xs\" className={cx(`${rootClassName}__search-icon`)} key=\"1\" />\n ) : null\n }\n afterField={\n variant !== \"no-button\" ? (\n <SearchFieldButton\n disabled={disabled}\n iconOnly={iconOnlySearchButton}\n label={searchButtonLabel}\n data-testid={getTestId(\"button\")}\n />\n ) : null\n }\n data-testid={getTestId(\"text-field\")}\n type=\"search\"\n {...props}\n />\n </form>\n );\n }\n);\n\nSearchFieldBase.displayName = \"SearchFieldBase\";\n","import React, { forwardRef, useId } from \"react\";\nimport { Listbox } from \"@purpur/listbox\";\nimport { type AutocompleteOption, useAutocomplete } from \"@purpur/use-autocomplete\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./search-field.module.scss\";\nimport {\n type SearchFieldAutocompleteEnhancements,\n SearchFieldBase,\n type SearchFieldBaseProps,\n} from \"./search-field-base\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-search-field\";\n\nexport type SearchFieldAutocompleteProps = SearchFieldBaseProps &\n Extract<SearchFieldAutocompleteEnhancements, { suggestions: AutocompleteOption[] }>;\n\nexport const SearchFieldAutocomplete = forwardRef<HTMLInputElement, SearchFieldAutocompleteProps>(\n (\n {\n suggestions,\n suggestionsLabel,\n onSelectSuggestion,\n openSuggestionsOnFocus,\n suggestionsMaxHeight,\n ...searchFieldProps\n },\n ref\n ) => {\n const randomId = useId();\n const inputId = (searchFieldProps.id as string | undefined) ?? randomId;\n\n const autocomplete = useAutocomplete({\n id: inputId,\n options: suggestions,\n listboxLabel: suggestionsLabel,\n disabled: searchFieldProps.disabled,\n readOnly: searchFieldProps.readOnly,\n openOnFocus: openSuggestionsOnFocus,\n listboxMaxHeight: suggestionsMaxHeight,\n onSelect: onSelectSuggestion,\n [\"data-testid\"]: searchFieldProps[\"data-testid\"],\n });\n\n const setInputRef = (node: HTMLInputElement | null) => {\n (autocomplete.inputRef as React.MutableRefObject<HTMLInputElement | null>).current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n };\n\n const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = (event) => {\n searchFieldProps.onChange?.(event);\n if (!autocomplete.isOpen) {\n autocomplete.openListbox();\n }\n };\n\n return (\n <div\n ref={autocomplete.rootRef as React.RefObject<HTMLDivElement>}\n className={cx(`${rootClassName}__autocomplete-root`)}\n >\n <SearchFieldBase\n ref={setInputRef}\n {...searchFieldProps}\n onChange={handleInputChange}\n id={inputId}\n wrapperStyle={autocomplete.anchorStyle}\n {...autocomplete.inputProps}\n />\n {autocomplete.isOpen && (\n <Listbox {...autocomplete.listboxProps} className={cx(`${rootClassName}__listbox`)}>\n {suggestions.map((option, index) => {\n const { key, ...listboxItemProps } = autocomplete.getListboxItemProps(option, index);\n\n return (\n <Listbox.Item key={key} {...listboxItemProps}>\n {option.label}\n </Listbox.Item>\n );\n })}\n </Listbox>\n )}\n </div>\n );\n }\n);\n\nSearchFieldAutocomplete.displayName = \"SearchFieldAutocomplete\";\n","import React, { forwardRef } from \"react\";\n\nimport { SearchFieldAutocomplete } from \"./search-field-autocomplete\";\nimport {\n type SearchFieldAutocompleteEnhancements,\n SearchFieldBase,\n type SearchFieldBaseProps,\n searchFieldVariants,\n} from \"./search-field-base\";\n\nexport { searchFieldVariants };\n\nexport type SearchFieldProps = SearchFieldBaseProps & SearchFieldAutocompleteEnhancements;\n\nexport const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>((props, ref) => {\n if (props.suggestions) {\n return <SearchFieldAutocomplete ref={ref} {...props} />;\n }\n\n return <SearchFieldBase ref={ref} {...props} />;\n});\n\nSearchField.displayName = \"SearchField\";\n\nexport {\n SearchFieldAutocomplete,\n type SearchFieldAutocompleteProps,\n} from \"./search-field-autocomplete\";\n"],"names":["cx","c","styles","rootClassName","SearchFieldButton","dataTestid","disabled","iconOnly","label","props","Button","IconSearch","jsx","searchFieldVariants","SearchFieldBase","forwardRef","dataTestId","className","clearButtonAriaLabel","iconOnlySearchButton","onClear","onSearch","searchButtonLabel","variant","formRef","wrapperStyle","ref","getTestId","name","hasClearButton","classes","e","TextField","SearchFieldAutocomplete","suggestions","suggestionsLabel","onSelectSuggestion","openSuggestionsOnFocus","suggestionsMaxHeight","searchFieldProps","randomId","useId","inputId","autocomplete","useAutocomplete","setInputRef","node","handleInputChange","event","j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,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEApB,EAAwB,cAAc;AC3E/B,MAAMsB,IAAcxC,EAA+C,CAACN,GAAOiB,MAC5EjB,EAAM,cACD,gBAAAG,EAACqB,GAAA,EAAwB,KAAAP,GAAW,GAAGjB,EAAA,CAAO,IAGhD,gBAAAG,EAACE,GAAA,EAAgB,KAAAY,GAAW,GAAGjB,EAAA,CAAO,CAC9C;AAED8C,EAAY,cAAc;"}
|
|
1
|
+
{"version":3,"file":"search-field-DTuEiK-M.mjs","sources":["../../../components/search-field/src/search-field-button.tsx","../../../components/search-field/src/search-field-base.tsx","../../../components/search-field/src/search-field-autocomplete.tsx","../../../components/search-field/src/search-field.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button } from \"@purpur/button\";\nimport { IconSearch } from \"@purpur/icon/search\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./search-field-button.module.scss\";\n\ntype Props = {\n [\"data-testid\"]?: string;\n disabled?: boolean;\n iconOnly?: boolean;\n label: string;\n};\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-search-field-button\";\n\nexport const SearchFieldButton = ({\n [\"data-testid\"]: dataTestid,\n disabled,\n iconOnly,\n label,\n}: Props) => {\n const props = {\n className: cx(rootClassName, {\n [`${rootClassName}--icon-only`]: iconOnly,\n }),\n disabled,\n [\"data-testid\"]: dataTestid,\n };\n\n if (iconOnly) {\n return (\n <Button {...props} aria-label={label} iconOnly size=\"sm\" type=\"submit\" variant=\"primary\">\n <IconSearch size=\"xs\" />\n </Button>\n );\n }\n\n return (\n <Button {...props} size=\"sm\" type=\"submit\" variant=\"primary\">\n {label}\n </Button>\n );\n};\n","import React, {\n type ChangeEvent,\n type CSSProperties,\n type FormEvent,\n forwardRef,\n type RefObject,\n} from \"react\";\nimport { IconSearch } from \"@purpur/icon/search\";\nimport { TextField, type TextFieldProps } from \"@purpur/text-field\";\nimport { type AutocompleteOption } from \"@purpur/use-autocomplete\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./search-field.module.scss\";\nimport { SearchFieldButton } from \"./search-field-button\";\n\nexport const searchFieldVariants = [\"button-attached\", \"no-button\"] as const;\n\ntype Variant = (typeof searchFieldVariants)[number];\n\ntype DefaultProps = {\n [\"data-testid\"]?: string;\n /**\n * An accessible label for the clear button.\n * */\n clearButtonAriaLabel: string;\n /**\n * Disables both the input field and submit button if `true`.\n * */\n disabled?: boolean;\n /**\n * Will display only a search icon in the search button if `true`.\n * */\n iconOnlySearchButton?: boolean;\n /**\n * Event handler called when the value of the search field changes.\n * */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the clear button is clicked.\n * */\n onClear: () => void;\n /**\n * Event handler called when the search form is submitted.\n * */\n onSearch?: (e: FormEvent<HTMLFormElement>) => void;\n /**\n * The label text (or `aria-label` if `iconOnlySearchButton` is `true`) of the search button.\n * */\n searchButtonLabel?: string;\n variant: Variant;\n formRef?: RefObject<HTMLFormElement>;\n};\n\ntype TextSearchButton = {\n iconOnlySearchButton?: false;\n searchButtonLabel: string;\n variant: \"button-attached\";\n};\n\ntype IconOnlySearchButton = {\n iconOnlySearchButton: true;\n searchButtonLabel: string;\n variant: \"button-attached\";\n};\n\ntype NoButton = {\n searchButtonLabel?: never;\n variant: \"no-button\";\n};\n\nexport type SearchFieldBaseProps = DefaultProps &\n (TextSearchButton | IconOnlySearchButton | NoButton) &\n Omit<TextFieldProps, \"startAdornment\" | \"endAdornment\" | \"afterField\" | \"onChange\" | \"variant\">;\n\ntype SearchFieldBaseInternalProps = SearchFieldBaseProps & {\n wrapperStyle?: CSSProperties;\n};\n\ntype SearchFieldAutocompleteSharedProps = {\n /**\n * Called when the user selects a suggestion.\n */\n onSelectSuggestion?: (option: AutocompleteOption) => void;\n /**\n * Open the suggestions listbox when the input receives focus.\n */\n openSuggestionsOnFocus?: boolean;\n /**\n * Maximum height of the suggestions listbox. A number is interpreted as px.\n */\n suggestionsMaxHeight?: string | number;\n};\n\ntype SearchFieldWithoutAutocomplete = SearchFieldAutocompleteSharedProps & {\n suggestions?: never;\n suggestionsLabel?: never;\n};\n\ntype SearchFieldWithAutocomplete = SearchFieldAutocompleteSharedProps & {\n /**\n * The list of suggestions to display in a listbox below the field.\n * No filtering is applied — pass the already-correct (pre-filtered) list.\n * If autocomplete should stay enabled while there are temporarily no matches,\n * pass an empty array instead of `undefined` or `null`. Changing this prop\n * from an absent value to an array switches between the regular and\n * autocomplete variants, which causes a re-render, drops input focus, and\n * hides the listbox.\n */\n suggestions: AutocompleteOption[];\n /**\n * Accessible label for the suggestions listbox.\n */\n suggestionsLabel: string;\n};\n\nexport type SearchFieldAutocompleteEnhancements =\n | SearchFieldWithoutAutocomplete\n | SearchFieldWithAutocomplete;\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-search-field\";\n\nexport const SearchFieldBase = forwardRef<HTMLInputElement, SearchFieldBaseInternalProps>(\n (\n {\n [\"data-testid\"]: dataTestId,\n className,\n clearButtonAriaLabel,\n disabled,\n iconOnlySearchButton,\n onClear,\n onSearch,\n searchButtonLabel,\n variant,\n formRef,\n wrapperStyle,\n ...props\n },\n ref\n ) => {\n const getTestId = (name: string) => (dataTestId ? `${dataTestId}-${name}` : undefined);\n const hasValue =\n typeof props.value === \"number\" ? props.value !== undefined : props.value?.length;\n const hasClearButton = hasValue && !disabled && !props.readOnly && !props.loading;\n\n const classes = cx(className, rootClassName, {\n [`${rootClassName}--no-gap`]: variant === \"button-attached\",\n [`${rootClassName}--has-clear-button`]: hasClearButton,\n });\n\n return (\n <form\n ref={formRef}\n className={cx(`${rootClassName}__wrapper`)}\n data-testid={dataTestId}\n style={wrapperStyle}\n onSubmit={(e: FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n onSearch?.(e);\n }}\n >\n <TextField\n ref={ref}\n className={classes}\n clearButtonAriaLabel={clearButtonAriaLabel}\n disabled={disabled}\n onClear={onClear}\n startAdornment={\n !iconOnlySearchButton ? (\n <IconSearch size=\"xs\" className={cx(`${rootClassName}__search-icon`)} key=\"1\" />\n ) : null\n }\n afterField={\n variant !== \"no-button\" ? (\n <SearchFieldButton\n disabled={disabled}\n iconOnly={iconOnlySearchButton}\n label={searchButtonLabel}\n data-testid={getTestId(\"button\")}\n />\n ) : null\n }\n data-testid={getTestId(\"text-field\")}\n type=\"search\"\n {...props}\n />\n </form>\n );\n }\n);\n\nSearchFieldBase.displayName = \"SearchFieldBase\";\n","import React, { forwardRef, useId } from \"react\";\nimport { Listbox } from \"@purpur/listbox\";\nimport { type AutocompleteOption, useAutocomplete } from \"@purpur/use-autocomplete\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./search-field.module.scss\";\nimport {\n type SearchFieldAutocompleteEnhancements,\n SearchFieldBase,\n type SearchFieldBaseProps,\n} from \"./search-field-base\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-search-field\";\n\nexport type SearchFieldAutocompleteProps = SearchFieldBaseProps &\n Extract<SearchFieldAutocompleteEnhancements, { suggestions: AutocompleteOption[] }>;\n\nexport const SearchFieldAutocomplete = forwardRef<HTMLInputElement, SearchFieldAutocompleteProps>(\n (\n {\n suggestions,\n suggestionsLabel,\n onSelectSuggestion,\n openSuggestionsOnFocus,\n suggestionsMaxHeight,\n ...searchFieldProps\n },\n ref\n ) => {\n const randomId = useId();\n const inputId = (searchFieldProps.id as string | undefined) ?? randomId;\n\n const autocomplete = useAutocomplete({\n id: inputId,\n options: suggestions,\n listboxLabel: suggestionsLabel,\n disabled: searchFieldProps.disabled,\n readOnly: searchFieldProps.readOnly,\n openOnFocus: openSuggestionsOnFocus,\n listboxMaxHeight: suggestionsMaxHeight,\n onSelect: onSelectSuggestion,\n [\"data-testid\"]: searchFieldProps[\"data-testid\"],\n });\n\n const setInputRef = (node: HTMLInputElement | null) => {\n (autocomplete.inputRef as React.MutableRefObject<HTMLInputElement | null>).current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLInputElement | null>).current = node;\n };\n\n const handleInputChange: React.ChangeEventHandler<HTMLInputElement> = (event) => {\n searchFieldProps.onChange?.(event);\n if (!autocomplete.isOpen) {\n autocomplete.openListbox();\n }\n };\n\n return (\n <div\n ref={autocomplete.rootRef as React.RefObject<HTMLDivElement>}\n className={cx(`${rootClassName}__autocomplete-root`)}\n >\n <SearchFieldBase\n ref={setInputRef}\n {...searchFieldProps}\n onChange={handleInputChange}\n id={inputId}\n wrapperStyle={autocomplete.anchorStyle}\n {...autocomplete.inputProps}\n />\n {autocomplete.isOpen && (\n <Listbox {...autocomplete.listboxProps} className={cx(`${rootClassName}__listbox`)}>\n {suggestions.map((option, index) => {\n const { key, ...listboxItemProps } = autocomplete.getListboxItemProps(option, index);\n\n return (\n <Listbox.Item key={key} {...listboxItemProps}>\n {option.label}\n </Listbox.Item>\n );\n })}\n </Listbox>\n )}\n </div>\n );\n }\n);\n\nSearchFieldAutocomplete.displayName = \"SearchFieldAutocomplete\";\n","import React, { forwardRef } from \"react\";\n\nimport { SearchFieldAutocomplete } from \"./search-field-autocomplete\";\nimport {\n type SearchFieldAutocompleteEnhancements,\n SearchFieldBase,\n type SearchFieldBaseProps,\n searchFieldVariants,\n} from \"./search-field-base\";\n\nexport { searchFieldVariants };\n\nexport type SearchFieldProps = SearchFieldBaseProps & SearchFieldAutocompleteEnhancements;\n\nexport const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>((props, ref) => {\n if (props.suggestions) {\n return <SearchFieldAutocomplete ref={ref} {...props} />;\n }\n\n return <SearchFieldBase ref={ref} {...props} />;\n});\n\nSearchField.displayName = \"SearchField\";\n\nexport {\n SearchFieldAutocomplete,\n type SearchFieldAutocompleteProps,\n} from \"./search-field-autocomplete\";\n"],"names":["cx","c","styles","rootClassName","SearchFieldButton","dataTestid","disabled","iconOnly","label","props","Button","IconSearch","jsx","searchFieldVariants","SearchFieldBase","forwardRef","dataTestId","className","clearButtonAriaLabel","iconOnlySearchButton","onClear","onSearch","searchButtonLabel","variant","formRef","wrapperStyle","ref","getTestId","name","hasClearButton","classes","e","TextField","SearchFieldAutocomplete","suggestions","suggestionsLabel","onSelectSuggestion","openSuggestionsOnFocus","suggestionsMaxHeight","searchFieldProps","randomId","useId","inputId","autocomplete","useAutocomplete","setInputRef","node","handleInputChange","event","jsxs","Listbox","option","index","key","listboxItemProps","SearchField"],"mappings":";;;;;;;;;;;;;;;;;;;;;GAcMA,IAAKC,EAAE,KAAKC,CAAM,GAClBC,IAAgB,8BAETC,IAAoB,CAAC;AAAA,EAChC,CAAC,gBAAgBC;AAAA,EACjB,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AACF,MAAa;AACX,QAAMC,IAAQ;AAAA,IACZ,WAAWT,EAAGG,GAAe;AAAA,MAC3B,CAAC,GAAGA,CAAa,aAAa,GAAGI;AAAA,IAAA,CAClC;AAAA,IACD,UAAAD;AAAA,IACC,eAAgBD;AAAA,EAAA;AAGnB,SAAIE,sBAECG,GAAA,EAAQ,GAAGD,GAAO,cAAYD,GAAO,UAAQ,IAAC,MAAK,MAAK,MAAK,UAAS,SAAQ,WAC7E,4BAACG,GAAA,EAAW,MAAK,MAAK,GACxB,IAKF,gBAAAC,EAACF,GAAA,EAAQ,GAAGD,GAAO,MAAK,MAAK,MAAK,UAAS,SAAQ,WAChD,UAAAD,EAAA,CACH;AAEJ,GC7BaK,IAAsB,CAAC,mBAAmB,WAAW,GAwG5Db,IAAKC,EAAE,KAAKC,CAAM,GAClBC,IAAgB,uBAETW,IAAkBC;AAAA,EAC7B,CACE;AAAA,IACE,CAAC,gBAAgBC;AAAA,IACjB,WAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,UAAAZ;AAAA,IACA,sBAAAa;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,GAAGhB;AAAA,EAAA,GAELiB,MACG;AACH,UAAMC,IAAY,CAACC,MAAkBZ,IAAa,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,oBAAoBQ,GAAQC,CAAK;AAEnF,mBACE,gBAAAxC,EAACsC,EAAQ,MAAR,EAAwB,GAAGI,GACzB,UAAAH,EAAO,SADSE,CAEnB;AAAA,UAEJ,CAAC,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEApB,EAAwB,cAAc;AC3E/B,MAAMsB,IAAcxC,EAA+C,CAACN,GAAOiB,MAC5EjB,EAAM,cACD,gBAAAG,EAACqB,GAAA,EAAwB,KAAAP,GAAW,GAAGjB,EAAA,CAAO,IAGhD,gBAAAG,EAACE,GAAA,EAAgB,KAAAY,GAAW,GAAGjB,EAAA,CAAO,CAC9C;AAED8C,EAAY,cAAc;"}
|
package/dist/search-field.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./search-field-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./search-field-Bst9d-wX.js");exports.SearchField=e.SearchField;exports.SearchFieldAutocomplete=e.SearchFieldAutocomplete;exports.searchFieldVariants=e.searchFieldVariants;
|
|
2
2
|
//# sourceMappingURL=search-field.cjs.js.map
|
package/dist/search-field.es.js
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),l=require("react"),$=require("./button-Dqxdc3nC.js"),M=require("./chevron-left.es-B0vPg5XM.js"),W=require("./chevron-right.es-Bv376M3o.js"),I=require("./index-BVmlsxuF.js"),x=require("./index-CoR7YA3H.js"),T=require("./bind-DeUYJ6m9.js"),J=require("./tooltip-BatXMflw.js"),K=require("./checkmark.es-lYntWFA3.js"),Q={PRIMARY:"primary"},L={SMALL_SCREEN:"small-screen",LARGE_SCREEN:"large-screen",ALWAYS:"always"},X={"purpur-stepper__nav-container":"_purpur-stepper__nav-container_1rouo_1","purpur-stepper__nav":"_purpur-stepper__nav_1rouo_1","purpur-stepper":"_purpur-stepper_1rouo_1","purpur-stepper__scroll-button":"_purpur-stepper__scroll-button_1rouo_7","purpur-stepper__scroll-button--left":"_purpur-stepper__scroll-button--left_1rouo_18","purpur-stepper__scroll-button--right":"_purpur-stepper__scroll-button--right_1rouo_21","purpur-stepper__scroll-button-icon":"_purpur-stepper__scroll-button-icon_1rouo_24","purpur-stepper__hidden":"_purpur-stepper__hidden_1rouo_27"},Z={"purpur-stepper-container":"_purpur-stepper-container_162zw_1","purpur-stepper-container__inner--align-with-grid":"_purpur-stepper-container__inner--align-with-grid_162zw_5","purpur-stepper-container--primary":"_purpur-stepper-container--primary_162zw_18","purpur-stepper-container--secondary":"_purpur-stepper-container--secondary_162zw_21"},O=T.c.bind(Z),v="purpur-stepper-container",ee=({["data-testid"]:t="purpur-stepper-container",children:r,className:s,alignWithGrid:n,variant:i,...p})=>{const h=O(s,v,{[`${v}--${i}`]:i,[`${v}--align-with-grid`]:n});return e.jsx("div",{className:h,"data-testid":t,...p,children:e.jsx("div",{className:O(`${v}__inner`,{[`${v}__inner--align-with-grid`]:n}),children:r})})},te=l.forwardRef(({children:t,...r},s)=>{const{finished:n,...i}=r;return e.jsx("div",{...i,ref:s,children:t})}),re=t=>!!t&&l.isValidElement(t)&&!!t.props.label,se={"purpur-stepper-button":"_purpur-stepper-button_wjiph_1","purpur-stepper-button__trigger-outline":"_purpur-stepper-button__trigger-outline_wjiph_21","purpur-stepper-button--first":"_purpur-stepper-button--first_wjiph_33","purpur-stepper-button--current":"_purpur-stepper-button--current_wjiph_33","purpur-stepper-button--middle":"_purpur-stepper-button--middle_wjiph_38","purpur-stepper-button--last":"_purpur-stepper-button--last_wjiph_48","purpur-stepper-button--visibility-small-screen":"_purpur-stepper-button--visibility-small-screen_wjiph_58","purpur-stepper-button--visibility-large-screen":"_purpur-stepper-button--visibility-large-screen_wjiph_66","purpur-stepper-button__icon":"_purpur-stepper-button__icon_wjiph_90","purpur-stepper-button__step-number":"_purpur-stepper-button__step-number_wjiph_97","purpur-stepper-button__step-number--current":"_purpur-stepper-button__step-number--current_wjiph_108","purpur-stepper-button__step-number--disabled":"_purpur-stepper-button__step-number--disabled_wjiph_112","purpur-stepper-button__step-label":"_purpur-stepper-button__step-label_wjiph_117","arrow-forward":"_arrow-forward_wjiph_121","purpur-stepper-button--primary":"_purpur-stepper-button--primary_wjiph_133","purpur-stepper-button--disabled":"_purpur-stepper-button--disabled_wjiph_136","purpur-stepper-button--secondary":"_purpur-stepper-button--secondary_wjiph_142","arrow-tail":"_arrow-tail_wjiph_152","sr-only--lg-down":"_sr-only--lg-down_wjiph_171"},y=T.c.bind(se),d="purpur-stepper-button",ne=({["data-testid"]:t,current:r,disabled:s,stepNumber:n})=>e.jsx("div",{"data-testid":t,className:y([`${d}__step-number`,{[`${d}__step-number--current`]:r},{[`${d}__step-number--disabled`]:s}]),children:n}),A=l.forwardRef(({className:t,["data-testid"]:r,variant:s,step:n,indexOfLastItem:i,index:p,currentStepIndex:h,whenToBeVisible:m,handleStepChange:u,handleStepFocus:a,completedStepLabel:o,..._},b)=>{const R=p===0?"first":p===i?"last":"middle",g=p===h;return e.jsx(I.Item,{asChild:!0,children:e.jsx($.Button,{..._,ref:b,className:y(t,d,`${d}--${R}`,`${d}--${s}`,`${d}--visibility-${m}`,{[`${d}--current`]:g},{[`${d}--disabled`]:n.disabled},{"arrow-tail":R!=="first"},{"arrow-forward":R!=="last"}),id:`stepper-trigger-button-${p}`,variant:$.BUTTON_VARIANT.TERTIARY_PURPLE,"data-testid":`${r}-step-trigger-item-${p}`,disabled:n.disabled,"aria-current":g&&"step","aria-label":n.finished&&!g?[n.label,o].filter(Boolean).join(", "):void 0,onClick:E=>u(E,p),onFocus:a,children:e.jsxs("span",{className:y(`${d}__trigger-outline`),children:[n.finished&&!g?e.jsx(K.a,{className:y(`${d}__icon`),"data-testid":`${r}-step-finished-icon`,size:"sm"}):e.jsx(ne,{"data-testid":`${r}-step-number`,current:g,disabled:n.disabled,stepNumber:p+1}),e.jsx("span",{className:y(`${d}__step-label`,{"sr-only--lg-down":!g}),children:n.label})]})})})}),pe={"purpur-stepper-nav-items__list":"_purpur-stepper-nav-items__list_lgkh0_1","purpur-stepper-nav-items__list-item":"_purpur-stepper-nav-items__list-item_lgkh0_7","purpur-stepper-nav-items__list-item--current":"_purpur-stepper-nav-items__list-item--current_lgkh0_25","purpur-stepper-nav-items__tooltip-content":"_purpur-stepper-nav-items__tooltip-content_lgkh0_31","purpur-stepper-nav-items__tooltip-trigger-item-container":"_purpur-stepper-nav-items__tooltip-trigger-item-container_lgkh0_34"},C=T.c.bind(pe),N="purpur-stepper-nav-items",oe=l.forwardRef(({["data-testid"]:t,variant:r,handleStepChange:s,handleStepFocus:n,steps:i,firstStepRef:p,lastStepRef:h,currentStepIndex:m,completedStepLabel:u},a)=>{const o=i.map((_,b)=>{const R=e.jsx("span",{className:C(`${N}__tooltip-trigger-item-container`),children:e.jsx(A,{"data-testid":`${t}-disabled-sm`,variant:r,step:_,indexOfLastItem:i.length-1,index:b,currentStepIndex:m,whenToBeVisible:L.SMALL_SCREEN,completedStepLabel:u,handleStepChange:s,handleStepFocus:n})});return e.jsx("li",{className:C(`${N}__list-item`,{[`${N}__list-item--current`]:b===m}),ref:b===0?p:b===i.length-1?h:null,children:_.disabled?e.jsxs(e.Fragment,{children:[e.jsx(J.Tooltip,{contentClassName:C(`${N}__tooltip-content`),triggerElement:R,children:_.label}),e.jsx(A,{"data-testid":`${t}-disabled-lg`,variant:r,step:_,indexOfLastItem:i.length-1,index:b,currentStepIndex:m,whenToBeVisible:L.LARGE_SCREEN,completedStepLabel:u,handleStepChange:s,handleStepFocus:n})]}):e.jsx(A,{"data-testid":t,variant:r,step:_,indexOfLastItem:i.length-1,index:b,currentStepIndex:m,whenToBeVisible:L.ALWAYS,completedStepLabel:u,handleStepChange:s,handleStepFocus:n})},_.label)});return e.jsx(I.Root,{loop:!1,dir:"ltr",children:e.jsx("ol",{ref:a,className:C(`${N}__list`),children:o})})}),ie=t=>{const r=l.useRef(!0),s=l.useRef(null);return l.useEffect(()=>{!r.current&&s.current!==null&&s.current.focus(),r.current=!1},[t]),{contentRef:s}},S={LEFT:"left",RIGHT:"right"},le=()=>{const t=l.useRef(null),r=l.useRef(null),s=l.useRef(null),[n,i]=l.useState(!1),[p,h]=l.useState(!1),m=u=>{if(!t.current)return;const a=t.current,o=a.clientWidth,_=a.scrollLeft;u===S.LEFT&&a.scroll({behavior:"smooth",left:_-o/2}),u===S.RIGHT&&a.scroll({behavior:"smooth",left:_+o/2})};return l.useEffect(()=>{if(r.current&&s.current&&t.current){const u=new IntersectionObserver(a=>{for(const o of a){if(o.target===r.current){o.isIntersecting?i(!1):i(!0);continue}o.target===s.current&&(o.isIntersecting?h(!1):h(!0))}},{root:t.current,threshold:.95});return u.observe(r.current),u.observe(s.current),()=>u.disconnect()}},[r,s,t]),{scrollContainer:t,firstStepRef:r,lastStepRef:s,displayLeftScrollButton:n,displayRightScrollButton:p,handleHorizontalScroll:m}},j=T.c.bind(X),c="purpur-stepper",B=({["aria-label"]:t,["data-testid"]:r,children:s,className:n,completedStepLabel:i,currentStepIndex:p=0,onStepChange:h,alignWithGrid:m=!1,leftScrollButtonAriaLabel:u,rightScrollButtonAriaLabel:a,variant:o=Q.PRIMARY,..._})=>{const b=l.Children.toArray(s).filter(re),R=l.Children.map(b,f=>{const{disabled:w,finished:D,label:G}=f.props;return{disabled:w??!1,finished:D??!1,label:G}}),{contentRef:g}=ie(p),{scrollContainer:E,firstStepRef:q,lastStepRef:z,displayLeftScrollButton:P,displayRightScrollButton:Y,handleHorizontalScroll:V}=le(),U=j([n,c,{[`${c}--${o}`]:o}]),k=f=>{f.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},F=(f,w)=>{f.preventDefault(),k(f),h(w)},H=f=>{k(f)};return e.jsxs("div",{className:U,..._,children:[e.jsx(ee,{variant:o,alignWithGrid:m,children:e.jsxs("div",{className:j(`${c}__nav-container`),children:[e.jsxs(x.Root,{children:[e.jsx(x.Viewport,{ref:E,children:e.jsx("div",{"aria-label":t,"data-testid":r,className:j([`${c}__nav`,{[`${c}__nav--${o}`]:o}]),children:e.jsx(I.Root,{loop:!1,dir:"ltr",children:e.jsx(oe,{"data-testid":r,variant:o,firstStepRef:q,lastStepRef:z,steps:R,currentStepIndex:p,handleStepChange:F,handleStepFocus:H,completedStepLabel:i})})})}),e.jsx(x.Scrollbar,{orientation:"horizontal",children:e.jsx(x.Thumb,{})})]}),P&&e.jsx($.Button,{"aria-label":u,className:j([`${c}__scroll-button`,`${c}__scroll-button--left`]),variant:$.BUTTON_VARIANT.TERTIARY_PURPLE,tabIndex:-1,iconOnly:!0,onClick:()=>{V(S.LEFT)},children:e.jsx(M.l,{className:j(`${c}__scroll-button-icon`),size:"md"})}),Y&&e.jsx($.Button,{"aria-label":a,className:j([`${c}__scroll-button`,`${c}__scroll-button--right`]),variant:$.BUTTON_VARIANT.TERTIARY_PURPLE,tabIndex:-1,iconOnly:!0,onClick:()=>{V(S.RIGHT)},children:e.jsx(W.n,{className:j(`${c}__scroll-button-icon`),size:"md"})})]})}),e.jsx("div",{tabIndex:-1,"aria-labelledby":`stepper-trigger-button-${p}`,ref:g,style:{outline:"none"},children:e.jsx("div",{"aria-live":"polite",children:l.Children.map(b,(f,w)=>e.jsx("div",{className:j({[`${c}__hidden`]:w!==p}),hidden:w!==p,children:f}))})})]})};B.Content=te;B.displayName="Stepper";exports.Stepper=B;
|
|
2
|
+
//# sourceMappingURL=stepper-ClLQuoXr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper-ClLQuoXr.js","sources":["../../../components/stepper/src/constants.ts","../../../components/stepper/src/stepper-container.tsx","../../../components/stepper/src/stepper-content.tsx","../../../components/stepper/src/stepper-button.tsx","../../../components/stepper/src/stepper-nav-items.tsx","../../../components/stepper/src/use-content-focus.hook.ts","../../../components/stepper/src/use-scroll-buttons.hook.ts","../../../components/stepper/src/stepper.tsx"],"sourcesContent":["export const STEPPER_VARIANT = {\n PRIMARY: \"primary\",\n SECONDARY: \"secondary\",\n} as const;\n\nexport const VISIBILITY_STATES = {\n SMALL_SCREEN: \"small-screen\",\n LARGE_SCREEN: \"large-screen\",\n ALWAYS: \"always\",\n} as const;\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./stepper-container.module.scss\";\nimport { type StepperVariant } from \"./types\";\n\nconst cx = c.bind(styles);\n\nexport type StepperContainerProps = Omit<BaseProps, \"children\"> & {\n children: ReactNode;\n alignWithGrid: boolean;\n variant: StepperVariant;\n};\n\nconst rootClassName = \"purpur-stepper-container\";\n\nexport const StepperContainer = ({\n [\"data-testid\"]: dataTestId = \"purpur-stepper-container\",\n children,\n className,\n alignWithGrid,\n variant,\n ...props\n}: StepperContainerProps) => {\n const classes: string = cx(className, rootClassName, {\n [`${rootClassName}--${variant}`]: variant,\n [`${rootClassName}--align-with-grid`]: alignWithGrid,\n });\n\n return (\n <div className={classes} data-testid={dataTestId} {...props}>\n <div\n className={cx(`${rootClassName}__inner`, {\n [`${rootClassName}__inner--align-with-grid`]: alignWithGrid,\n })}\n >\n {children}\n </div>\n </div>\n );\n};\n","import React, { forwardRef, isValidElement, type ReactElement, type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\n\nimport { type Optional, type Step } from \"./types\";\n\nexport type StepperContentProps = Omit<BaseProps, \"children\"> & {\n children: ReactNode;\n} & Optional<Step, \"disabled\" | \"finished\">;\n\nexport const StepperContent = forwardRef<HTMLDivElement, StepperContentProps>(\n ({ children, ...props }, ref) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { finished, ...rest } = props;\n return (\n <div {...rest} ref={ref}>\n {children}\n </div>\n );\n }\n);\n\nexport const isStepperContent = (child?: ReactNode): child is ReactElement<StepperContentProps> =>\n !!child && isValidElement<StepperContentProps>(child) && !!child.props.label;\n","import React, { forwardRef } from \"react\";\nimport { Button, BUTTON_VARIANT } from \"@purpur/button\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { IconCheckmark } from \"@purpur/icon/checkmark\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./stepper-button.module.scss\";\nimport {\n type HandleStepChangeFunction,\n type HandleStepFocusFunction,\n type Step,\n type StepperVariant,\n type VisibilityStates,\n} from \"./types\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-stepper-button\";\n\nexport type StepNumberProps = {\n current: boolean;\n disabled: boolean;\n stepNumber: number;\n [\"data-testid\"]?: string;\n};\n\nconst StepNumber = ({\n [\"data-testid\"]: dataTestId,\n current,\n disabled,\n stepNumber,\n}: StepNumberProps) => {\n return (\n <div\n data-testid={dataTestId}\n className={cx([\n `${rootClassName}__step-number`,\n {\n [`${rootClassName}__step-number--current`]: current,\n },\n {\n [`${rootClassName}__step-number--disabled`]: disabled,\n },\n ])}\n >\n {stepNumber}\n </div>\n );\n};\n\nexport type StepperButtonProps = Omit<BaseProps<\"button\">, \"children\"> & {\n variant: StepperVariant;\n step: Step;\n currentStepIndex: number;\n index: number;\n indexOfLastItem: number;\n whenToBeVisible: VisibilityStates;\n handleStepChange: HandleStepChangeFunction;\n handleStepFocus: HandleStepFocusFunction;\n completedStepLabel: string;\n};\n\nexport const StepperButton = forwardRef<HTMLButtonElement, StepperButtonProps>(\n (\n {\n className,\n [\"data-testid\"]: dataTestId,\n variant,\n step,\n indexOfLastItem,\n index,\n currentStepIndex,\n whenToBeVisible,\n handleStepChange,\n handleStepFocus,\n completedStepLabel,\n ...props\n },\n ref\n ) => {\n const placement = index === 0 ? \"first\" : index === indexOfLastItem ? \"last\" : \"middle\";\n const isCurrentStep = index === currentStepIndex;\n return (\n <RovingFocusGroup.Item asChild>\n <Button\n {...props}\n ref={ref}\n className={cx(\n className,\n rootClassName,\n `${rootClassName}--${placement}`,\n `${rootClassName}--${variant}`,\n `${rootClassName}--visibility-${whenToBeVisible}`,\n {\n [`${rootClassName}--current`]: isCurrentStep,\n },\n {\n [`${rootClassName}--disabled`]: step.disabled,\n },\n {\n [\"arrow-tail\"]: placement !== \"first\",\n },\n {\n [\"arrow-forward\"]: placement !== \"last\",\n }\n )}\n id={`stepper-trigger-button-${index}`}\n variant={BUTTON_VARIANT.TERTIARY_PURPLE}\n data-testid={`${dataTestId}-step-trigger-item-${index}`}\n disabled={step.disabled}\n aria-current={isCurrentStep && \"step\"}\n aria-label={\n step.finished && !isCurrentStep\n ? [step.label, completedStepLabel].filter(Boolean).join(\", \")\n : undefined\n }\n onClick={(e) => handleStepChange(e, index)}\n onFocus={handleStepFocus}\n >\n <span className={cx(`${rootClassName}__trigger-outline`)}>\n {step.finished && !isCurrentStep ? (\n <IconCheckmark\n className={cx(`${rootClassName}__icon`)}\n data-testid={`${dataTestId}-step-finished-icon`}\n size=\"sm\"\n />\n ) : (\n <StepNumber\n data-testid={`${dataTestId}-step-number`}\n current={isCurrentStep}\n disabled={step.disabled}\n stepNumber={index + 1}\n />\n )}\n <span\n className={cx(`${rootClassName}__step-label`, {\n [`sr-only--lg-down`]: !isCurrentStep,\n })}\n >\n {step.label}\n </span>\n </span>\n </Button>\n </RovingFocusGroup.Item>\n );\n }\n);\n","import React, { forwardRef, type RefObject } from \"react\";\nimport { Tooltip } from \"@purpur/tooltip\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport c from \"classnames/bind\";\n\nimport { VISIBILITY_STATES } from \"./constants\";\nimport { StepperButton } from \"./stepper-button\";\nimport styles from \"./stepper-nav-items.module.scss\";\nimport {\n type HandleStepChangeFunction,\n type HandleStepFocusFunction,\n type Step,\n type StepperVariant,\n} from \"./types\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-stepper-nav-items\";\n\nexport type StepperNavItemsProps = {\n variant: StepperVariant;\n [\"data-testid\"]?: string;\n firstStepRef: RefObject<HTMLLIElement | null>;\n lastStepRef: RefObject<HTMLLIElement | null>;\n steps: Step[];\n currentStepIndex: number;\n handleStepChange: HandleStepChangeFunction;\n handleStepFocus: HandleStepFocusFunction;\n completedStepLabel: string;\n};\n\nexport const StepperNavItems = forwardRef<HTMLOListElement, StepperNavItemsProps>(\n (\n {\n [\"data-testid\"]: dataTestId,\n variant,\n handleStepChange,\n handleStepFocus,\n steps,\n firstStepRef,\n lastStepRef,\n currentStepIndex,\n completedStepLabel,\n },\n ref\n ) => {\n const stepListItems = steps.map((step: Step, index: number) => {\n const tooltipTriggerItem = (\n <span className={cx(`${rootClassName}__tooltip-trigger-item-container`)}>\n <StepperButton\n data-testid={`${dataTestId}-disabled-sm`}\n variant={variant}\n step={step}\n indexOfLastItem={steps.length - 1}\n index={index}\n currentStepIndex={currentStepIndex}\n whenToBeVisible={VISIBILITY_STATES.SMALL_SCREEN}\n completedStepLabel={completedStepLabel}\n handleStepChange={handleStepChange}\n handleStepFocus={handleStepFocus}\n />\n </span>\n );\n\n return (\n <li\n className={cx(`${rootClassName}__list-item`, {\n [`${rootClassName}__list-item--current`]: index === currentStepIndex,\n })}\n ref={index === 0 ? firstStepRef : index === steps.length - 1 ? lastStepRef : null}\n key={step.label}\n >\n {step.disabled ? (\n <>\n <Tooltip\n contentClassName={cx(`${rootClassName}__tooltip-content`)}\n triggerElement={tooltipTriggerItem}\n >\n {step.label}\n </Tooltip>\n <StepperButton\n data-testid={`${dataTestId}-disabled-lg`}\n variant={variant}\n step={step}\n indexOfLastItem={steps.length - 1}\n index={index}\n currentStepIndex={currentStepIndex}\n whenToBeVisible={VISIBILITY_STATES.LARGE_SCREEN}\n completedStepLabel={completedStepLabel}\n handleStepChange={handleStepChange}\n handleStepFocus={handleStepFocus}\n />\n </>\n ) : (\n <StepperButton\n data-testid={dataTestId}\n variant={variant}\n step={step}\n indexOfLastItem={steps.length - 1}\n index={index}\n currentStepIndex={currentStepIndex}\n whenToBeVisible={VISIBILITY_STATES.ALWAYS}\n completedStepLabel={completedStepLabel}\n handleStepChange={handleStepChange}\n handleStepFocus={handleStepFocus}\n />\n )}\n </li>\n );\n });\n return (\n <RovingFocusGroup.Root loop={false} dir=\"ltr\">\n <ol ref={ref} className={cx(`${rootClassName}__list`)}>\n {stepListItems}\n </ol>\n </RovingFocusGroup.Root>\n );\n }\n);\n","import { type RefObject, useEffect, useRef } from \"react\";\n\ninterface UseContentFocusHook<T extends HTMLElement> {\n contentRef: RefObject<T | null>;\n}\n\nexport const useContentFocus = <T extends HTMLElement>(\n currentStepIndex: number\n): UseContentFocusHook<T> => {\n const firstLoad = useRef<boolean>(true);\n const contentRef = useRef<T | null>(null);\n\n useEffect(() => {\n if (!firstLoad.current && contentRef.current !== null) {\n contentRef.current.focus();\n }\n firstLoad.current = false;\n }, [currentStepIndex]);\n\n return {\n contentRef,\n };\n};\n","import { type RefObject, useEffect, useRef, useState } from \"react\";\n\nexport const SCROLL_DIRECTION = {\n LEFT: \"left\",\n RIGHT: \"right\",\n} as const;\n\nexport type ScrollDirection = (typeof SCROLL_DIRECTION)[keyof typeof SCROLL_DIRECTION];\n\nexport type UseScrollHook<ContainerElement, WatchedElement> = {\n scrollContainer: RefObject<ContainerElement | null>;\n firstStepRef: RefObject<WatchedElement | null>;\n lastStepRef: RefObject<WatchedElement | null>;\n displayLeftScrollButton: boolean;\n displayRightScrollButton: boolean;\n handleHorizontalScroll: (dir: ScrollDirection) => void;\n};\n\nexport const useScrollButtons = <\n ContainerElement extends HTMLElement,\n WatchedElement extends HTMLElement\n>(): UseScrollHook<ContainerElement, WatchedElement> => {\n const scrollContainer = useRef<ContainerElement | null>(null);\n const firstStepRef = useRef<WatchedElement | null>(null);\n const lastStepRef = useRef<WatchedElement | null>(null);\n const [displayLeftScrollButton, setDisplayLeftScrollButton] = useState(false);\n const [displayRightScrollButton, setDisplayRightScrollButton] = useState(false);\n\n const handleHorizontalScroll = (dir: ScrollDirection): void => {\n if (!scrollContainer.current) {\n return;\n }\n const scrollableContainer = scrollContainer.current;\n const scrollableContainerWidth = scrollableContainer.clientWidth;\n const currentScrollLeft = scrollableContainer.scrollLeft;\n if (dir === SCROLL_DIRECTION.LEFT) {\n scrollableContainer.scroll({\n behavior: \"smooth\",\n left: currentScrollLeft - scrollableContainerWidth / 2,\n });\n }\n if (dir === SCROLL_DIRECTION.RIGHT) {\n scrollableContainer.scroll({\n behavior: \"smooth\",\n left: currentScrollLeft + scrollableContainerWidth / 2,\n });\n }\n };\n\n useEffect(() => {\n if (firstStepRef.current && lastStepRef.current && scrollContainer.current) {\n const observer: IntersectionObserver = new IntersectionObserver(\n (entries: IntersectionObserverEntry[]) => {\n for (const entry of entries) {\n if (entry.target === firstStepRef.current) {\n if (entry.isIntersecting) {\n setDisplayLeftScrollButton(false);\n } else {\n setDisplayLeftScrollButton(true);\n }\n continue;\n }\n if (entry.target === lastStepRef.current) {\n if (entry.isIntersecting) {\n setDisplayRightScrollButton(false);\n } else {\n setDisplayRightScrollButton(true);\n }\n }\n }\n },\n {\n root: scrollContainer.current,\n threshold: 0.95,\n }\n );\n\n observer.observe(firstStepRef.current);\n observer.observe(lastStepRef.current);\n\n return () => observer.disconnect();\n }\n return undefined;\n }, [firstStepRef, lastStepRef, scrollContainer]);\n\n return {\n scrollContainer,\n firstStepRef,\n lastStepRef,\n displayLeftScrollButton,\n displayRightScrollButton,\n handleHorizontalScroll,\n };\n};\n","import React, { Children, type ReactElement } from \"react\";\nimport { Button, BUTTON_VARIANT } from \"@purpur/button\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { IconChevronLeft } from \"@purpur/icon/chevron-left\";\nimport { IconChevronRight } from \"@purpur/icon/chevron-right\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport * as ScrollArea from \"@radix-ui/react-scroll-area\";\nimport c from \"classnames/bind\";\n\nimport { STEPPER_VARIANT } from \"./constants\";\nimport styles from \"./stepper.module.scss\";\nimport { StepperContainer } from \"./stepper-container\";\nimport { isStepperContent, StepperContent } from \"./stepper-content\";\nimport { StepperNavItems } from \"./stepper-nav-items\";\nimport { type Step, type StepChangeFunction, type StepperVariant } from \"./types\";\nimport { useContentFocus } from \"./use-content-focus.hook\";\nimport { SCROLL_DIRECTION, useScrollButtons } from \"./use-scroll-buttons.hook\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-stepper\";\n\nexport type StepperProps = Omit<BaseProps, \"children\"> & {\n children: Array<ReactElement<typeof StepperContent>> | ReactElement<typeof StepperContent>;\n completedStepLabel: string;\n currentStepIndex: number;\n onStepChange: StepChangeFunction;\n alignWithGrid?: boolean;\n leftScrollButtonAriaLabel: string;\n rightScrollButtonAriaLabel: string;\n variant: StepperVariant;\n};\n\nexport type StepperComponent<P> = React.FunctionComponent<P> & {\n Content: typeof StepperContent;\n};\n\nexport const Stepper: StepperComponent<StepperProps> = ({\n [\"aria-label\"]: ariaLabel,\n [\"data-testid\"]: dataTestId,\n children,\n className,\n completedStepLabel,\n currentStepIndex = 0,\n onStepChange,\n alignWithGrid = false,\n leftScrollButtonAriaLabel,\n rightScrollButtonAriaLabel,\n variant = STEPPER_VARIANT.PRIMARY,\n ...props\n}: StepperProps) => {\n const stepperContentChildren = Children.toArray(children).filter(isStepperContent);\n const steps: Step[] = Children.map(stepperContentChildren, (child) => {\n const { disabled, finished, label } = child.props;\n return {\n disabled: disabled ?? false,\n finished: finished ?? false,\n label,\n };\n });\n const { contentRef } = useContentFocus<HTMLDivElement>(currentStepIndex);\n const {\n scrollContainer,\n firstStepRef,\n lastStepRef,\n displayLeftScrollButton,\n displayRightScrollButton,\n handleHorizontalScroll,\n } = useScrollButtons<HTMLDivElement, HTMLLIElement>();\n\n const classes: string = cx([\n className,\n rootClassName,\n {\n [`${rootClassName}--${variant}`]: variant,\n },\n ]);\n const scrollTriggerIntoView = (e: React.FocusEvent | React.MouseEvent): void => {\n (e.target as HTMLButtonElement).scrollIntoView({\n behavior: \"smooth\",\n block: \"nearest\",\n inline: \"center\",\n });\n };\n\n const handleStepChange = (e: React.MouseEvent, idx: number): void => {\n e.preventDefault();\n scrollTriggerIntoView(e);\n onStepChange(idx);\n };\n\n const handleStepFocus = (e: React.FocusEvent): void => {\n scrollTriggerIntoView(e);\n };\n\n return (\n <div className={classes} {...props}>\n <StepperContainer variant={variant} alignWithGrid={alignWithGrid}>\n <div className={cx(`${rootClassName}__nav-container`)}>\n <ScrollArea.Root>\n <ScrollArea.Viewport ref={scrollContainer}>\n <div\n aria-label={ariaLabel}\n data-testid={dataTestId}\n className={cx([\n `${rootClassName}__nav`,\n {\n [`${rootClassName}__nav--${variant}`]: variant,\n },\n ])}\n >\n <RovingFocusGroup.Root loop={false} dir=\"ltr\">\n <StepperNavItems\n data-testid={dataTestId}\n variant={variant}\n firstStepRef={firstStepRef}\n lastStepRef={lastStepRef}\n steps={steps}\n currentStepIndex={currentStepIndex}\n handleStepChange={handleStepChange}\n handleStepFocus={handleStepFocus}\n completedStepLabel={completedStepLabel}\n />\n </RovingFocusGroup.Root>\n </div>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation=\"horizontal\">\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n {displayLeftScrollButton && (\n <Button\n aria-label={leftScrollButtonAriaLabel}\n className={cx([\n `${rootClassName}__scroll-button`,\n `${rootClassName}__scroll-button--left`,\n ])}\n variant={BUTTON_VARIANT.TERTIARY_PURPLE}\n tabIndex={-1}\n iconOnly\n onClick={() => {\n handleHorizontalScroll(SCROLL_DIRECTION.LEFT);\n }}\n >\n <IconChevronLeft className={cx(`${rootClassName}__scroll-button-icon`)} size=\"md\" />\n </Button>\n )}\n {displayRightScrollButton && (\n <Button\n aria-label={rightScrollButtonAriaLabel}\n className={cx([\n `${rootClassName}__scroll-button`,\n `${rootClassName}__scroll-button--right`,\n ])}\n variant={BUTTON_VARIANT.TERTIARY_PURPLE}\n tabIndex={-1}\n iconOnly\n onClick={() => {\n handleHorizontalScroll(SCROLL_DIRECTION.RIGHT);\n }}\n >\n <IconChevronRight className={cx(`${rootClassName}__scroll-button-icon`)} size=\"md\" />\n </Button>\n )}\n </div>\n </StepperContainer>\n <div\n tabIndex={-1}\n aria-labelledby={`stepper-trigger-button-${currentStepIndex}`}\n ref={contentRef}\n style={{ outline: \"none\" }}\n >\n <div aria-live=\"polite\">\n {Children.map(stepperContentChildren, (child, index: number) => (\n <div\n className={cx({\n [`${rootClassName}__hidden`]: index !== currentStepIndex,\n })}\n hidden={index !== currentStepIndex}\n >\n {child}\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n};\n\nStepper.Content = StepperContent;\n\nStepper.displayName = \"Stepper\";\n"],"names":["STEPPER_VARIANT","VISIBILITY_STATES","cx","c","styles","rootClassName","StepperContainer","dataTestId","children","className","alignWithGrid","variant","props","classes","jsx","StepperContent","forwardRef","ref","finished","rest","isStepperContent","child","isValidElement","StepNumber","current","disabled","stepNumber","StepperButton","step","indexOfLastItem","index","currentStepIndex","whenToBeVisible","handleStepChange","handleStepFocus","completedStepLabel","placement","isCurrentStep","RovingFocusGroup.Item","Button","BUTTON_VARIANT","e","IconCheckmark","StepperNavItems","steps","firstStepRef","lastStepRef","stepListItems","tooltipTriggerItem","jsxs","Fragment","Tooltip","RovingFocusGroup.Root","useContentFocus","firstLoad","useRef","contentRef","useEffect","SCROLL_DIRECTION","useScrollButtons","scrollContainer","displayLeftScrollButton","setDisplayLeftScrollButton","useState","displayRightScrollButton","setDisplayRightScrollButton","handleHorizontalScroll","dir","scrollableContainer","scrollableContainerWidth","currentScrollLeft","observer","entries","entry","Stepper","ariaLabel","onStepChange","leftScrollButtonAriaLabel","rightScrollButtonAriaLabel","stepperContentChildren","Children","label","scrollTriggerIntoView","idx","ScrollArea.Root","ScrollArea.Viewport","ScrollArea.Scrollbar","ScrollArea.Thumb","IconChevronLeft","IconChevronRight"],"mappings":"2WAAaA,EAAkB,CAC7B,QAAS,SAEX,EAEaC,EAAoB,CAC/B,aAAc,eACd,aAAc,eACd,OAAQ,QACV,g5BCFMC,EAAKC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V,kBAAiB,0BAA0BiB,CAAgB,GAC3D,IAAKyB,EACL,MAAO,CAAE,QAAS,MAAA,EAElB,SAAA1C,EAAAA,IAAC,OAAI,YAAU,SACZ,oBAAS,IAAIiE,EAAwB,CAAC1D,EAAOS,IAC5ChB,EAAAA,IAAC,MAAA,CACC,UAAWZ,EAAG,CACZ,CAAC,GAAGG,CAAa,UAAU,EAAGyB,IAAUC,CAAA,CACzC,EACD,OAAQD,IAAUC,EAEjB,SAAAV,CAAA,CAAA,CAEJ,CAAA,CACH,CAAA,CAAA,CACF,EACF,CAEJ,EAEAqD,EAAQ,QAAU3D,GAElB2D,EAAQ,YAAc"}
|
|
@@ -6,7 +6,7 @@ import { n as tr } from "./chevron-right.es-D7aVK4ER.mjs";
|
|
|
6
6
|
import { I as er, R as H } from "./index-IpWiejWQ.mjs";
|
|
7
7
|
import { R as sr, V as pr, S as nr, T as or } from "./index-B8Mazo6u.mjs";
|
|
8
8
|
import { c as L } from "./bind-CU-R61T-.mjs";
|
|
9
|
-
import { b as ir } from "./tooltip-
|
|
9
|
+
import { b as ir } from "./tooltip-CZzwHkea.mjs";
|
|
10
10
|
import { a as lr } from "./checkmark.es-DdgIZN2R.mjs";
|
|
11
11
|
const ur = {
|
|
12
12
|
PRIMARY: "primary"
|
|
@@ -191,7 +191,7 @@ const ur = {
|
|
|
191
191
|
completedStepLabel: l
|
|
192
192
|
}, a) => {
|
|
193
193
|
const o = i.map((u, d) => {
|
|
194
|
-
const $ =
|
|
194
|
+
const $ = /* @__PURE__ */ r("span", { className: C(`${v}__tooltip-trigger-item-container`), children: /* @__PURE__ */ r(
|
|
195
195
|
A,
|
|
196
196
|
{
|
|
197
197
|
"data-testid": `${t}-disabled-sm`,
|
|
@@ -205,7 +205,7 @@ const ur = {
|
|
|
205
205
|
handleStepChange: s,
|
|
206
206
|
handleStepFocus: p
|
|
207
207
|
}
|
|
208
|
-
) })
|
|
208
|
+
) });
|
|
209
209
|
return /* @__PURE__ */ r(
|
|
210
210
|
"li",
|
|
211
211
|
{
|
|
@@ -446,4 +446,4 @@ D.displayName = "Stepper";
|
|
|
446
446
|
export {
|
|
447
447
|
D as S
|
|
448
448
|
};
|
|
449
|
-
//# sourceMappingURL=stepper-
|
|
449
|
+
//# sourceMappingURL=stepper-k0bX9m4t.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper-k0bX9m4t.mjs","sources":["../../../components/stepper/src/constants.ts","../../../components/stepper/src/stepper-container.tsx","../../../components/stepper/src/stepper-content.tsx","../../../components/stepper/src/stepper-button.tsx","../../../components/stepper/src/stepper-nav-items.tsx","../../../components/stepper/src/use-content-focus.hook.ts","../../../components/stepper/src/use-scroll-buttons.hook.ts","../../../components/stepper/src/stepper.tsx"],"sourcesContent":["export const STEPPER_VARIANT = {\n PRIMARY: \"primary\",\n SECONDARY: \"secondary\",\n} as const;\n\nexport const VISIBILITY_STATES = {\n SMALL_SCREEN: \"small-screen\",\n LARGE_SCREEN: \"large-screen\",\n ALWAYS: \"always\",\n} as const;\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./stepper-container.module.scss\";\nimport { type StepperVariant } from \"./types\";\n\nconst cx = c.bind(styles);\n\nexport type StepperContainerProps = Omit<BaseProps, \"children\"> & {\n children: ReactNode;\n alignWithGrid: boolean;\n variant: StepperVariant;\n};\n\nconst rootClassName = \"purpur-stepper-container\";\n\nexport const StepperContainer = ({\n [\"data-testid\"]: dataTestId = \"purpur-stepper-container\",\n children,\n className,\n alignWithGrid,\n variant,\n ...props\n}: StepperContainerProps) => {\n const classes: string = cx(className, rootClassName, {\n [`${rootClassName}--${variant}`]: variant,\n [`${rootClassName}--align-with-grid`]: alignWithGrid,\n });\n\n return (\n <div className={classes} data-testid={dataTestId} {...props}>\n <div\n className={cx(`${rootClassName}__inner`, {\n [`${rootClassName}__inner--align-with-grid`]: alignWithGrid,\n })}\n >\n {children}\n </div>\n </div>\n );\n};\n","import React, { forwardRef, isValidElement, type ReactElement, type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpur/common-types\";\n\nimport { type Optional, type Step } from \"./types\";\n\nexport type StepperContentProps = Omit<BaseProps, \"children\"> & {\n children: ReactNode;\n} & Optional<Step, \"disabled\" | \"finished\">;\n\nexport const StepperContent = forwardRef<HTMLDivElement, StepperContentProps>(\n ({ children, ...props }, ref) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { finished, ...rest } = props;\n return (\n <div {...rest} ref={ref}>\n {children}\n </div>\n );\n }\n);\n\nexport const isStepperContent = (child?: ReactNode): child is ReactElement<StepperContentProps> =>\n !!child && isValidElement<StepperContentProps>(child) && !!child.props.label;\n","import React, { forwardRef } from \"react\";\nimport { Button, BUTTON_VARIANT } from \"@purpur/button\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { IconCheckmark } from \"@purpur/icon/checkmark\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./stepper-button.module.scss\";\nimport {\n type HandleStepChangeFunction,\n type HandleStepFocusFunction,\n type Step,\n type StepperVariant,\n type VisibilityStates,\n} from \"./types\";\n\nconst cx = c.bind(styles);\nconst rootClassName = \"purpur-stepper-button\";\n\nexport type StepNumberProps = {\n current: boolean;\n disabled: boolean;\n stepNumber: number;\n [\"data-testid\"]?: string;\n};\n\nconst StepNumber = ({\n [\"data-testid\"]: dataTestId,\n current,\n disabled,\n stepNumber,\n}: StepNumberProps) => {\n return (\n <div\n data-testid={dataTestId}\n className={cx([\n `${rootClassName}__step-number`,\n {\n [`${rootClassName}__step-number--current`]: current,\n },\n {\n [`${rootClassName}__step-number--disabled`]: disabled,\n },\n ])}\n >\n {stepNumber}\n </div>\n );\n};\n\nexport type StepperButtonProps = Omit<BaseProps<\"button\">, \"children\"> & {\n variant: StepperVariant;\n step: Step;\n currentStepIndex: number;\n index: number;\n indexOfLastItem: number;\n whenToBeVisible: VisibilityStates;\n handleStepChange: HandleStepChangeFunction;\n handleStepFocus: HandleStepFocusFunction;\n completedStepLabel: string;\n};\n\nexport const StepperButton = forwardRef<HTMLButtonElement, StepperButtonProps>(\n (\n {\n className,\n [\"data-testid\"]: dataTestId,\n variant,\n step,\n indexOfLastItem,\n index,\n currentStepIndex,\n whenToBeVisible,\n handleStepChange,\n handleStepFocus,\n completedStepLabel,\n ...props\n },\n ref\n ) => {\n const placement = index === 0 ? \"first\" : index === indexOfLastItem ? \"last\" : \"middle\";\n const isCurrentStep = index === currentStepIndex;\n return (\n <RovingFocusGroup.Item asChild>\n <Button\n {...props}\n ref={ref}\n className={cx(\n className,\n rootClassName,\n `${rootClassName}--${placement}`,\n `${rootClassName}--${variant}`,\n `${rootClassName}--visibility-${whenToBeVisible}`,\n {\n [`${rootClassName}--current`]: isCurrentStep,\n },\n {\n [`${rootClassName}--disabled`]: step.disabled,\n },\n {\n [\"arrow-tail\"]: placement !== \"first\",\n },\n {\n [\"arrow-forward\"]: placement !== \"last\",\n }\n )}\n id={`stepper-trigger-button-${index}`}\n variant={BUTTON_VARIANT.TERTIARY_PURPLE}\n data-testid={`${dataTestId}-step-trigger-item-${index}`}\n disabled={step.disabled}\n aria-current={isCurrentStep && \"step\"}\n aria-label={\n step.finished && !isCurrentStep\n ? [step.label, completedStepLabel].filter(Boolean).join(\", \")\n : undefined\n }\n onClick={(e) => handleStepChange(e, index)}\n onFocus={handleStepFocus}\n >\n <span className={cx(`${rootClassName}__trigger-outline`)}>\n {step.finished && !isCurrentStep ? (\n <IconCheckmark\n className={cx(`${rootClassName}__icon`)}\n data-testid={`${dataTestId}-step-finished-icon`}\n size=\"sm\"\n />\n ) : (\n <StepNumber\n data-testid={`${dataTestId}-step-number`}\n current={isCurrentStep}\n disabled={step.disabled}\n stepNumber={index + 1}\n />\n )}\n <span\n className={cx(`${rootClassName}__step-label`, {\n [`sr-only--lg-down`]: !isCurrentStep,\n })}\n >\n {step.label}\n </span>\n </span>\n </Button>\n </RovingFocusGroup.Item>\n );\n }\n);\n","import React, { forwardRef, type RefObject } from \"react\";\nimport { Tooltip } from \"@purpur/tooltip\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport c from \"classnames/bind\";\n\nimport { VISIBILITY_STATES } from \"./constants\";\nimport { StepperButton } from \"./stepper-button\";\nimport styles from \"./stepper-nav-items.module.scss\";\nimport {\n type HandleStepChangeFunction,\n type HandleStepFocusFunction,\n type Step,\n type StepperVariant,\n} from \"./types\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-stepper-nav-items\";\n\nexport type StepperNavItemsProps = {\n variant: StepperVariant;\n [\"data-testid\"]?: string;\n firstStepRef: RefObject<HTMLLIElement | null>;\n lastStepRef: RefObject<HTMLLIElement | null>;\n steps: Step[];\n currentStepIndex: number;\n handleStepChange: HandleStepChangeFunction;\n handleStepFocus: HandleStepFocusFunction;\n completedStepLabel: string;\n};\n\nexport const StepperNavItems = forwardRef<HTMLOListElement, StepperNavItemsProps>(\n (\n {\n [\"data-testid\"]: dataTestId,\n variant,\n handleStepChange,\n handleStepFocus,\n steps,\n firstStepRef,\n lastStepRef,\n currentStepIndex,\n completedStepLabel,\n },\n ref\n ) => {\n const stepListItems = steps.map((step: Step, index: number) => {\n const tooltipTriggerItem = (\n <span className={cx(`${rootClassName}__tooltip-trigger-item-container`)}>\n <StepperButton\n data-testid={`${dataTestId}-disabled-sm`}\n variant={variant}\n step={step}\n indexOfLastItem={steps.length - 1}\n index={index}\n currentStepIndex={currentStepIndex}\n whenToBeVisible={VISIBILITY_STATES.SMALL_SCREEN}\n completedStepLabel={completedStepLabel}\n handleStepChange={handleStepChange}\n handleStepFocus={handleStepFocus}\n />\n </span>\n );\n\n return (\n <li\n className={cx(`${rootClassName}__list-item`, {\n [`${rootClassName}__list-item--current`]: index === currentStepIndex,\n })}\n ref={index === 0 ? firstStepRef : index === steps.length - 1 ? lastStepRef : null}\n key={step.label}\n >\n {step.disabled ? (\n <>\n <Tooltip\n contentClassName={cx(`${rootClassName}__tooltip-content`)}\n triggerElement={tooltipTriggerItem}\n >\n {step.label}\n </Tooltip>\n <StepperButton\n data-testid={`${dataTestId}-disabled-lg`}\n variant={variant}\n step={step}\n indexOfLastItem={steps.length - 1}\n index={index}\n currentStepIndex={currentStepIndex}\n whenToBeVisible={VISIBILITY_STATES.LARGE_SCREEN}\n completedStepLabel={completedStepLabel}\n handleStepChange={handleStepChange}\n handleStepFocus={handleStepFocus}\n />\n </>\n ) : (\n <StepperButton\n data-testid={dataTestId}\n variant={variant}\n step={step}\n indexOfLastItem={steps.length - 1}\n index={index}\n currentStepIndex={currentStepIndex}\n whenToBeVisible={VISIBILITY_STATES.ALWAYS}\n completedStepLabel={completedStepLabel}\n handleStepChange={handleStepChange}\n handleStepFocus={handleStepFocus}\n />\n )}\n </li>\n );\n });\n return (\n <RovingFocusGroup.Root loop={false} dir=\"ltr\">\n <ol ref={ref} className={cx(`${rootClassName}__list`)}>\n {stepListItems}\n </ol>\n </RovingFocusGroup.Root>\n );\n }\n);\n","import { type RefObject, useEffect, useRef } from \"react\";\n\ninterface UseContentFocusHook<T extends HTMLElement> {\n contentRef: RefObject<T | null>;\n}\n\nexport const useContentFocus = <T extends HTMLElement>(\n currentStepIndex: number\n): UseContentFocusHook<T> => {\n const firstLoad = useRef<boolean>(true);\n const contentRef = useRef<T | null>(null);\n\n useEffect(() => {\n if (!firstLoad.current && contentRef.current !== null) {\n contentRef.current.focus();\n }\n firstLoad.current = false;\n }, [currentStepIndex]);\n\n return {\n contentRef,\n };\n};\n","import { type RefObject, useEffect, useRef, useState } from \"react\";\n\nexport const SCROLL_DIRECTION = {\n LEFT: \"left\",\n RIGHT: \"right\",\n} as const;\n\nexport type ScrollDirection = (typeof SCROLL_DIRECTION)[keyof typeof SCROLL_DIRECTION];\n\nexport type UseScrollHook<ContainerElement, WatchedElement> = {\n scrollContainer: RefObject<ContainerElement | null>;\n firstStepRef: RefObject<WatchedElement | null>;\n lastStepRef: RefObject<WatchedElement | null>;\n displayLeftScrollButton: boolean;\n displayRightScrollButton: boolean;\n handleHorizontalScroll: (dir: ScrollDirection) => void;\n};\n\nexport const useScrollButtons = <\n ContainerElement extends HTMLElement,\n WatchedElement extends HTMLElement\n>(): UseScrollHook<ContainerElement, WatchedElement> => {\n const scrollContainer = useRef<ContainerElement | null>(null);\n const firstStepRef = useRef<WatchedElement | null>(null);\n const lastStepRef = useRef<WatchedElement | null>(null);\n const [displayLeftScrollButton, setDisplayLeftScrollButton] = useState(false);\n const [displayRightScrollButton, setDisplayRightScrollButton] = useState(false);\n\n const handleHorizontalScroll = (dir: ScrollDirection): void => {\n if (!scrollContainer.current) {\n return;\n }\n const scrollableContainer = scrollContainer.current;\n const scrollableContainerWidth = scrollableContainer.clientWidth;\n const currentScrollLeft = scrollableContainer.scrollLeft;\n if (dir === SCROLL_DIRECTION.LEFT) {\n scrollableContainer.scroll({\n behavior: \"smooth\",\n left: currentScrollLeft - scrollableContainerWidth / 2,\n });\n }\n if (dir === SCROLL_DIRECTION.RIGHT) {\n scrollableContainer.scroll({\n behavior: \"smooth\",\n left: currentScrollLeft + scrollableContainerWidth / 2,\n });\n }\n };\n\n useEffect(() => {\n if (firstStepRef.current && lastStepRef.current && scrollContainer.current) {\n const observer: IntersectionObserver = new IntersectionObserver(\n (entries: IntersectionObserverEntry[]) => {\n for (const entry of entries) {\n if (entry.target === firstStepRef.current) {\n if (entry.isIntersecting) {\n setDisplayLeftScrollButton(false);\n } else {\n setDisplayLeftScrollButton(true);\n }\n continue;\n }\n if (entry.target === lastStepRef.current) {\n if (entry.isIntersecting) {\n setDisplayRightScrollButton(false);\n } else {\n setDisplayRightScrollButton(true);\n }\n }\n }\n },\n {\n root: scrollContainer.current,\n threshold: 0.95,\n }\n );\n\n observer.observe(firstStepRef.current);\n observer.observe(lastStepRef.current);\n\n return () => observer.disconnect();\n }\n return undefined;\n }, [firstStepRef, lastStepRef, scrollContainer]);\n\n return {\n scrollContainer,\n firstStepRef,\n lastStepRef,\n displayLeftScrollButton,\n displayRightScrollButton,\n handleHorizontalScroll,\n };\n};\n","import React, { Children, type ReactElement } from \"react\";\nimport { Button, BUTTON_VARIANT } from \"@purpur/button\";\nimport type { BaseProps } from \"@purpur/common-types\";\nimport { IconChevronLeft } from \"@purpur/icon/chevron-left\";\nimport { IconChevronRight } from \"@purpur/icon/chevron-right\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport * as ScrollArea from \"@radix-ui/react-scroll-area\";\nimport c from \"classnames/bind\";\n\nimport { STEPPER_VARIANT } from \"./constants\";\nimport styles from \"./stepper.module.scss\";\nimport { StepperContainer } from \"./stepper-container\";\nimport { isStepperContent, StepperContent } from \"./stepper-content\";\nimport { StepperNavItems } from \"./stepper-nav-items\";\nimport { type Step, type StepChangeFunction, type StepperVariant } from \"./types\";\nimport { useContentFocus } from \"./use-content-focus.hook\";\nimport { SCROLL_DIRECTION, useScrollButtons } from \"./use-scroll-buttons.hook\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-stepper\";\n\nexport type StepperProps = Omit<BaseProps, \"children\"> & {\n children: Array<ReactElement<typeof StepperContent>> | ReactElement<typeof StepperContent>;\n completedStepLabel: string;\n currentStepIndex: number;\n onStepChange: StepChangeFunction;\n alignWithGrid?: boolean;\n leftScrollButtonAriaLabel: string;\n rightScrollButtonAriaLabel: string;\n variant: StepperVariant;\n};\n\nexport type StepperComponent<P> = React.FunctionComponent<P> & {\n Content: typeof StepperContent;\n};\n\nexport const Stepper: StepperComponent<StepperProps> = ({\n [\"aria-label\"]: ariaLabel,\n [\"data-testid\"]: dataTestId,\n children,\n className,\n completedStepLabel,\n currentStepIndex = 0,\n onStepChange,\n alignWithGrid = false,\n leftScrollButtonAriaLabel,\n rightScrollButtonAriaLabel,\n variant = STEPPER_VARIANT.PRIMARY,\n ...props\n}: StepperProps) => {\n const stepperContentChildren = Children.toArray(children).filter(isStepperContent);\n const steps: Step[] = Children.map(stepperContentChildren, (child) => {\n const { disabled, finished, label } = child.props;\n return {\n disabled: disabled ?? false,\n finished: finished ?? false,\n label,\n };\n });\n const { contentRef } = useContentFocus<HTMLDivElement>(currentStepIndex);\n const {\n scrollContainer,\n firstStepRef,\n lastStepRef,\n displayLeftScrollButton,\n displayRightScrollButton,\n handleHorizontalScroll,\n } = useScrollButtons<HTMLDivElement, HTMLLIElement>();\n\n const classes: string = cx([\n className,\n rootClassName,\n {\n [`${rootClassName}--${variant}`]: variant,\n },\n ]);\n const scrollTriggerIntoView = (e: React.FocusEvent | React.MouseEvent): void => {\n (e.target as HTMLButtonElement).scrollIntoView({\n behavior: \"smooth\",\n block: \"nearest\",\n inline: \"center\",\n });\n };\n\n const handleStepChange = (e: React.MouseEvent, idx: number): void => {\n e.preventDefault();\n scrollTriggerIntoView(e);\n onStepChange(idx);\n };\n\n const handleStepFocus = (e: React.FocusEvent): void => {\n scrollTriggerIntoView(e);\n };\n\n return (\n <div className={classes} {...props}>\n <StepperContainer variant={variant} alignWithGrid={alignWithGrid}>\n <div className={cx(`${rootClassName}__nav-container`)}>\n <ScrollArea.Root>\n <ScrollArea.Viewport ref={scrollContainer}>\n <div\n aria-label={ariaLabel}\n data-testid={dataTestId}\n className={cx([\n `${rootClassName}__nav`,\n {\n [`${rootClassName}__nav--${variant}`]: variant,\n },\n ])}\n >\n <RovingFocusGroup.Root loop={false} dir=\"ltr\">\n <StepperNavItems\n data-testid={dataTestId}\n variant={variant}\n firstStepRef={firstStepRef}\n lastStepRef={lastStepRef}\n steps={steps}\n currentStepIndex={currentStepIndex}\n handleStepChange={handleStepChange}\n handleStepFocus={handleStepFocus}\n completedStepLabel={completedStepLabel}\n />\n </RovingFocusGroup.Root>\n </div>\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation=\"horizontal\">\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea.Root>\n {displayLeftScrollButton && (\n <Button\n aria-label={leftScrollButtonAriaLabel}\n className={cx([\n `${rootClassName}__scroll-button`,\n `${rootClassName}__scroll-button--left`,\n ])}\n variant={BUTTON_VARIANT.TERTIARY_PURPLE}\n tabIndex={-1}\n iconOnly\n onClick={() => {\n handleHorizontalScroll(SCROLL_DIRECTION.LEFT);\n }}\n >\n <IconChevronLeft className={cx(`${rootClassName}__scroll-button-icon`)} size=\"md\" />\n </Button>\n )}\n {displayRightScrollButton && (\n <Button\n aria-label={rightScrollButtonAriaLabel}\n className={cx([\n `${rootClassName}__scroll-button`,\n `${rootClassName}__scroll-button--right`,\n ])}\n variant={BUTTON_VARIANT.TERTIARY_PURPLE}\n tabIndex={-1}\n iconOnly\n onClick={() => {\n handleHorizontalScroll(SCROLL_DIRECTION.RIGHT);\n }}\n >\n <IconChevronRight className={cx(`${rootClassName}__scroll-button-icon`)} size=\"md\" />\n </Button>\n )}\n </div>\n </StepperContainer>\n <div\n tabIndex={-1}\n aria-labelledby={`stepper-trigger-button-${currentStepIndex}`}\n ref={contentRef}\n style={{ outline: \"none\" }}\n >\n <div aria-live=\"polite\">\n {Children.map(stepperContentChildren, (child, index: number) => (\n <div\n className={cx({\n [`${rootClassName}__hidden`]: index !== currentStepIndex,\n })}\n hidden={index !== currentStepIndex}\n >\n {child}\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n};\n\nStepper.Content = StepperContent;\n\nStepper.displayName = \"Stepper\";\n"],"names":["STEPPER_VARIANT","VISIBILITY_STATES","cx","c","styles","rootClassName","StepperContainer","dataTestId","children","className","alignWithGrid","variant","props","classes","jsx","StepperContent","forwardRef","ref","finished","rest","isStepperContent","child","isValidElement","StepNumber","current","disabled","stepNumber","StepperButton","step","indexOfLastItem","index","currentStepIndex","whenToBeVisible","handleStepChange","handleStepFocus","completedStepLabel","placement","isCurrentStep","RovingFocusGroup.Item","Button","BUTTON_VARIANT","e","IconCheckmark","StepperNavItems","steps","firstStepRef","lastStepRef","stepListItems","tooltipTriggerItem","jsxs","Fragment","Tooltip","RovingFocusGroup.Root","useContentFocus","firstLoad","useRef","contentRef","useEffect","SCROLL_DIRECTION","useScrollButtons","scrollContainer","displayLeftScrollButton","setDisplayLeftScrollButton","useState","displayRightScrollButton","setDisplayRightScrollButton","handleHorizontalScroll","dir","scrollableContainer","scrollableContainerWidth","currentScrollLeft","observer","entries","entry","Stepper","ariaLabel","onStepChange","leftScrollButtonAriaLabel","rightScrollButtonAriaLabel","stepperContentChildren","Children","label","scrollTriggerIntoView","idx","ScrollArea.Root","ScrollArea.Viewport","ScrollArea.Scrollbar","ScrollArea.Thumb","IconChevronLeft","IconChevronRight"],"mappings":";;;;;;;;;;AAAO,MAAMA,KAAkB;AAAA,EAC7B,SAAS;AAEX,GAEaC,IAAoB;AAAA,EAC/B,cAAc;AAAA,EACd,cAAc;AAAA,EACd,QAAQ;AACV;;;;;;;;;;;;;;GCFMC,IAAKC,EAAE,KAAKC,EAAM,GAQlBC,IAAgB,4BAETC,KAAmB,CAAC;AAAA,EAC/B,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,MAA6B;AAC3B,QAAMC,IAAkBX,EAAGO,GAAWJ,GAAe;AAAA,IACnD,CAAC,GAAGA,CAAa,KAAKM,CAAO,EAAE,GAAGA;AAAA,IAClC,CAAC,GAAGN,CAAa,mBAAmB,GAAGK;AAAA,EAAA,CACxC;AAED,2BACG,OAAA,EAAI,WAAWG,GAAS,eAAaN,GAAa,GAAGK,GACpD,UAAA,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWZ,EAAG,GAAGG,CAAa,WAAW;AAAA,QACvC,CAAC,GAAGA,CAAa,0BAA0B,GAAGK;AAAA,MAAA,CAC/C;AAAA,MAEA,UAAAF;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ,GChCaO,KAAiBC;AAAA,EAC5B,CAAC,EAAE,UAAAR,GAAU,GAAGI,EAAA,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AAA,QACL,OAAO,EAAE,SAAS,OAAA;AAAA,QAElB,UAAA,gBAAA1C,EAAC,SAAI,aAAU,UACZ,YAAS,IAAIiE,GAAwB,CAAC1D,GAAOS,MAC5C,gBAAAhB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWZ,EAAG;AAAA,cACZ,CAAC,GAAGG,CAAa,UAAU,GAAGyB,MAAUC;AAAA,YAAA,CACzC;AAAA,YACD,QAAQD,MAAUC;AAAA,YAEjB,UAAAV;AAAA,UAAA;AAAA,QAAA,CAEJ,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;AAEAqD,EAAQ,UAAU3D;AAElB2D,EAAQ,cAAc;"}
|
package/dist/stepper.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./stepper-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./stepper-ClLQuoXr.js");exports.Stepper=e.Stepper;
|
|
2
2
|
//# sourceMappingURL=stepper.cjs.js.map
|
package/dist/stepper.es.js
CHANGED
|
@@ -11,7 +11,7 @@ import { s as Ci } from "./search.es-DoFKg2Hr.mjs";
|
|
|
11
11
|
import { P as be } from "./paragraph-Ci50OF1u.mjs";
|
|
12
12
|
import { S as Si } from "./select-BEmu_fh9.mjs";
|
|
13
13
|
import { T as Ri } from "./text-field-BQYzwIrG.mjs";
|
|
14
|
-
import { b as ur } from "./tooltip-
|
|
14
|
+
import { b as ur } from "./tooltip-CZzwHkea.mjs";
|
|
15
15
|
import { V as co } from "./visually-hidden-BYFkJEp1.mjs";
|
|
16
16
|
import { a as yi } from "./badge-DalD-yqG.mjs";
|
|
17
17
|
import { C as xi } from "./cta-link-B_FfwflB.mjs";
|
|
@@ -7440,4 +7440,4 @@ export {
|
|
|
7440
7440
|
Gu as T,
|
|
7441
7441
|
fc as c
|
|
7442
7442
|
};
|
|
7443
|
-
//# sourceMappingURL=table-
|
|
7443
|
+
//# sourceMappingURL=table-D_XW4smf.mjs.map
|