@launchpad-ui/filter 0.4.12 → 0.4.14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AppliedFilterButton.d.ts","sourceRoot":"","sources":["../src/AppliedFilterButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,aAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,mBAAmB,CAAC,IAAI,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAIF,QAAA,MAAM,mBAAmB,wHAwBvB,CAAC;AAIH,YAAY,EAAE,wBAAwB,EAAE,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"AppliedFilterButton.d.ts","sourceRoot":"","sources":["../src/AppliedFilterButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,aAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,mBAAmB,CAAC,IAAI,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAIF,QAAA,MAAM,mBAAmB,wHA4BvB,CAAC;AAIH,YAAY,EAAE,wBAAwB,EAAE,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
package/dist/index.es.js CHANGED
@@ -53,12 +53,15 @@ const AppliedFilterButton = forwardRef((props, ref) => {
53
53
  onClick: onClickFilterButton,
54
54
  children: [name2 && /* @__PURE__ */ jsxs("span", {
55
55
  className: styles.appliedName,
56
+ "data-test-id": `${testId}-name`,
56
57
  children: [name2, hasDescription && ":"]
57
58
  }), hasDescription && /* @__PURE__ */ jsx("span", {
58
59
  className: styles.appliedDescription,
60
+ "data-test-id": `${testId}-description`,
59
61
  children
60
62
  }), /* @__PURE__ */ jsx(ExpandMore, {
61
- size: "small"
63
+ size: "small",
64
+ "data-test-id": `${testId}-expand`
62
65
  })]
63
66
  })
64
67
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/AppliedFilterButton.tsx","../src/FilterMenu.tsx","../src/AppliedFilter.tsx","../src/FilterButton.tsx","../src/Filter.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { ExpandMore } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\nimport { Children, forwardRef } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype AppliedFilterButtonProps = {\n name?: ReactNode;\n className?: string;\n children: ReactNode;\n onClickFilterButton?(): void;\n 'data-test-id': string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst AppliedFilterButton = forwardRef<Ref, AppliedFilterButtonProps>((props, ref) => {\n const { name, className, children, onClickFilterButton, 'data-test-id': testId } = props;\n\n const hasDescription = Children.count(children) !== 0;\n\n return (\n <div data-test-id={testId}>\n <button\n aria-haspopup\n className={cx(styles.appliedButton, className)}\n ref={ref}\n onClick={onClickFilterButton}\n >\n {name && (\n <span className={styles.appliedName}>\n {name}\n {hasDescription && ':'}\n </span>\n )}\n {hasDescription && <span className={styles.appliedDescription}>{children}</span>}\n <ExpandMore size=\"small\" />\n </button>\n </div>\n );\n});\n\nAppliedFilterButton.displayName = 'AppliedFilterButton';\n\nexport type { AppliedFilterButtonProps };\nexport { AppliedFilterButton };\n","import type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Button } from '@launchpad-ui/button';\nimport { Check } from '@launchpad-ui/icons';\nimport { Menu, MenuDivider, MenuItem, MenuSearch } from '@launchpad-ui/menu';\n\nimport styles from './styles/Filter.module.css';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype FilterOption<T = any> = {\n name?: ReactNode;\n isDisabled?: boolean;\n isDivider?: boolean;\n isChecked?: boolean;\n value: T | null;\n projKey?: string;\n nested?: boolean;\n groupHeader?: boolean;\n};\n\ntype FilterMenuProps = Pick<MenuProps<string>, 'enableVirtualization' | 'size' | 'data-test-id'> & {\n options: FilterOption[];\n onClearFilter?(): void;\n enableSearch?: boolean;\n searchValue?: string;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n onSelect?(): void;\n isLoading?: boolean;\n disabledOptionTooltip?: string;\n};\n\nconst FilterMenu = ({\n options,\n onClearFilter,\n enableSearch,\n searchValue,\n searchPlaceholder,\n searchAriaLabel,\n onSelect,\n onSearchChange,\n isLoading = false,\n disabledOptionTooltip,\n enableVirtualization,\n size,\n 'data-test-id': testId = 'filter-menu',\n}: FilterMenuProps) => {\n const filterOptions = isLoading\n ? [{ name: 'loading...', value: 'loading...', isDisabled: true }]\n : options;\n\n return (\n <>\n {onClearFilter && (\n <Button\n tabIndex={0}\n className={styles.filterClearButton}\n onClick={onClearFilter}\n kind=\"link\"\n data-test-id=\"clear-filter-button\"\n >\n CLEAR FILTER\n </Button>\n )}\n <Menu\n enableVirtualization={enableVirtualization}\n size={size}\n data-test-id={testId}\n onSelect={onSelect}\n >\n {enableSearch && (\n <MenuSearch\n value={searchValue}\n placeholder={searchPlaceholder}\n onChange={onSearchChange}\n ariaLabel={searchAriaLabel}\n />\n )}\n {filterOptions.map((option, index) => {\n if (option.isDivider) {\n return <MenuDivider key={`divider-${index}`} />;\n }\n return (\n <MenuItem\n item={option}\n disabled={option.isDisabled}\n icon={option.isChecked ? Check : null}\n key={option.value}\n role=\"menuitemradio\"\n aria-checked={option.isChecked ? 'true' : undefined}\n nested={option.nested}\n groupHeader={option.groupHeader}\n tooltip={\n option.isDisabled && disabledOptionTooltip ? disabledOptionTooltip : undefined\n }\n tooltipPlacement=\"right\"\n >\n {option.name}\n </MenuItem>\n );\n })}\n </Menu>\n </>\n );\n};\n\nexport { FilterMenu };\nexport type { FilterOption, FilterMenuProps };\n","import type { FilterOption } from './FilterMenu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\n\nimport { AppliedFilterButton } from './AppliedFilterButton';\nimport { FilterMenu } from './FilterMenu';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype AppliedFilterProps = {\n searchValue?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n onClearFilter?(): void;\n searchPlaceholder?: string;\n name?: ReactNode;\n description: ReactNode;\n options: FilterOption[];\n className?: string;\n onStateChange?({ isOpen }: { isOpen?: boolean }): void;\n onSelect?(item: FilterOption): void;\n isEmpty?: boolean;\n isLoading?: boolean;\n onClickFilterButton?(): void;\n searchAriaLabel?: string;\n 'data-test-id'?: string;\n};\n\nconst AppliedFilter = ({\n searchValue,\n onSearchChange,\n searchPlaceholder,\n name,\n description,\n options,\n className,\n isEmpty,\n isLoading,\n onClickFilterButton,\n onClearFilter,\n searchAriaLabel,\n 'data-test-id': testId = 'applied-filter',\n ...props\n}: AppliedFilterProps) => {\n const enableSearch =\n onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n return (\n <Dropdown targetClassName={className} placement=\"bottom-start\" enableArrow={false} {...props}>\n <AppliedFilterButton\n data-test-id={testId}\n name={name}\n onClickFilterButton={onClickFilterButton}\n >\n {description}\n </AppliedFilterButton>\n\n <FilterMenu\n options={options}\n searchValue={searchValue}\n searchPlaceholder={searchPlaceholder}\n enableSearch={enableSearch}\n searchAriaLabel={searchAriaLabel}\n onSearchChange={onSearchChange}\n onClearFilter={onClearFilter}\n isLoading={isLoading}\n />\n </Dropdown>\n );\n};\n\nexport type { AppliedFilterProps };\nexport { AppliedFilter };\n","import type { ReactNode, SyntheticEvent } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Close, ExpandMore } from '@launchpad-ui/icons';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { cx } from 'classix';\nimport { Children, forwardRef, useId } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype FilterButtonProps = {\n name: ReactNode;\n hideName?: boolean;\n isClearable?: boolean;\n onClear?(event: SyntheticEvent): void;\n className?: string;\n isSelected?: boolean;\n clearTooltip?: string | JSX.Element;\n children?: ReactNode;\n onClickFilterButton?(): void;\n 'data-test-id'?: string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst FilterButton = forwardRef<Ref, FilterButtonProps>((props, ref) => {\n const {\n children,\n name,\n hideName,\n isClearable,\n clearTooltip,\n onClear,\n isSelected,\n onClickFilterButton,\n className,\n 'data-test-id': testId = 'filter-button',\n ...rest\n } = props;\n const nameId = useId();\n const descriptionId = useId();\n\n const hasDescription = Children.count(children) !== 0;\n\n const nameElement = (\n <span className={styles.name}>\n {name}\n {hasDescription && ':'}\n </span>\n );\n\n return (\n <div className={styles.buttonContainer} data-test-id={testId}>\n <button\n {...rest}\n aria-labelledby={`${nameId} ${hasDescription ? descriptionId : ''}`}\n aria-haspopup\n className={cx(styles.button, className, (isClearable || isSelected) && styles.isClearable)}\n ref={ref}\n onClick={onClickFilterButton}\n >\n {hideName ? (\n <VisuallyHidden id={nameId}>{nameElement}</VisuallyHidden>\n ) : (\n <span id={nameId}>{nameElement}</span>\n )}\n {hasDescription && (\n <span id={descriptionId} className={styles.description}>\n {children}\n </span>\n )}\n {!isClearable && <ExpandMore size=\"small\" />}\n </button>\n {isClearable && (\n <Tooltip targetClassName={styles.clearTooltip} content={clearTooltip}>\n <IconButton\n aria-label=\"Clear filter\"\n className={styles.clear}\n data-test-id=\"clear-filter-button\"\n icon={<Close size=\"tiny\" />}\n onClick={onClear}\n />\n </Tooltip>\n )}\n </div>\n );\n});\n\nFilterButton.defaultProps = {\n clearTooltip: 'Clear filter',\n};\n\nFilterButton.displayName = 'FilterButton';\n\nexport { FilterButton };\nexport type { FilterButtonProps };\n","import type { FilterOption } from './FilterMenu';\nimport type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode, SyntheticEvent } from 'react';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\nimport { cx } from 'classix';\n\nimport { FilterButton } from './FilterButton';\nimport { FilterMenu } from './FilterMenu';\nimport styles from './styles/Filter.module.css';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype FilterProps = Pick<MenuProps<string>, 'size' | 'enableVirtualization'> & {\n searchValue?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n name: ReactNode;\n hideName?: boolean;\n description: ReactNode;\n options: FilterOption[];\n isClearable?: boolean;\n onClear?(): void;\n className?: string;\n onStateChange?({ isOpen }: { isOpen?: boolean }): void;\n isSelected?: boolean;\n onSelect?(item: FilterOption): void;\n isEmpty?: boolean;\n isLoading?: boolean;\n onClickFilterButton?(): void;\n disabledOptionTooltip?: string;\n 'data-test-id'?: string;\n triggerTestId?: string;\n};\n\nconst Filter = ({\n searchValue,\n onSearchChange,\n searchPlaceholder,\n searchAriaLabel,\n name,\n hideName,\n description,\n options,\n isClearable,\n onClear,\n isSelected,\n className,\n isEmpty,\n isLoading,\n onClickFilterButton,\n disabledOptionTooltip,\n 'data-test-id': testId = 'filter',\n size,\n enableVirtualization,\n ...props\n}: FilterProps) => {\n const enableSearch =\n onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n const dropdownClasses = cx(styles.filter, className);\n\n const handleClear = (event: SyntheticEvent) => {\n event.preventDefault();\n onClear?.();\n };\n\n return (\n <Dropdown targetTestId={testId} targetClassName={dropdownClasses} {...props}>\n <FilterButton\n isClearable={isClearable}\n onClear={handleClear}\n name={name}\n hideName={hideName}\n isSelected={isSelected}\n onClickFilterButton={onClickFilterButton}\n >\n {description}\n </FilterButton>\n <FilterMenu\n options={options}\n searchValue={searchValue}\n searchPlaceholder={searchPlaceholder}\n searchAriaLabel={searchAriaLabel}\n enableSearch={enableSearch}\n onSearchChange={onSearchChange}\n isLoading={isLoading}\n disabledOptionTooltip={disabledOptionTooltip}\n size={size}\n enableVirtualization={enableVirtualization}\n />\n </Dropdown>\n );\n};\n\nexport { Filter };\nexport type { FilterProps };\n"],"names":["AppliedFilterButton","forwardRef","props","ref","name","className","children","onClickFilterButton","testId","hasDescription","Children","count","cx","styles","appliedButton","_jsxs","appliedName","_jsx","appliedDescription","displayName","FilterMenu","options","onClearFilter","enableSearch","searchValue","searchPlaceholder","searchAriaLabel","onSelect","onSearchChange","isLoading","disabledOptionTooltip","enableVirtualization","size","filterOptions","value","isDisabled","_Fragment","filterClearButton","map","option","index","isDivider","isChecked","Check","undefined","nested","groupHeader","SEARCH_INPUT_THRESHOLD","AppliedFilter","description","isEmpty","length","FilterButton","hideName","isClearable","clearTooltip","onClear","isSelected","rest","nameId","useId","descriptionId","nameElement","buttonContainer","button","clear","defaultProps","Filter","dropdownClasses","filter","handleClear","event","preventDefault"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,sBAAsBC,WAA0C,CAACC,OAAOC,QAAQ;AAC9E,QAAA;AAAA,IAAEC,MAAAA;AAAAA,IAAMC;AAAAA,IAAWC;AAAAA,IAAUC;AAAAA,IAAqB,gBAAgBC;AAAAA,EAAWN,IAAAA;AAEnF,QAAMO,iBAAiBC,SAASC,MAAML,QAAf,MAA6B;AAEpD,6BACE,OAAA;AAAA,IAAK,gBAAcE;AAAAA,IAAnB,+BACE,UAAA;AAAA,MACE,iBADF;AAAA,MAEE,WAAWI,GAAGC,OAAOC,eAAeT,SAAvB;AAAA,MACb;AAAA,MACA,SAASE;AAAAA,MAJX,UAAA,CAMGH,SACCW,qBAAA,QAAA;AAAA,QAAM,WAAWF,O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;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,CArBJ,CAAA;AAAA,EAAA,CADF;AA0BD;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/AppliedFilterButton.tsx","../src/FilterMenu.tsx","../src/AppliedFilter.tsx","../src/FilterButton.tsx","../src/Filter.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { ExpandMore } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\nimport { Children, forwardRef } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype AppliedFilterButtonProps = {\n name?: ReactNode;\n className?: string;\n children: ReactNode;\n onClickFilterButton?(): void;\n 'data-test-id': string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst AppliedFilterButton = forwardRef<Ref, AppliedFilterButtonProps>((props, ref) => {\n const { name, className, children, onClickFilterButton, 'data-test-id': testId } = props;\n\n const hasDescription = Children.count(children) !== 0;\n\n return (\n <div data-test-id={testId}>\n <button\n aria-haspopup\n className={cx(styles.appliedButton, className)}\n ref={ref}\n onClick={onClickFilterButton}\n >\n {name && (\n <span className={styles.appliedName} data-test-id={`${testId}-name`}>\n {name}\n {hasDescription && ':'}\n </span>\n )}\n {hasDescription && (\n <span className={styles.appliedDescription} data-test-id={`${testId}-description`}>\n {children}\n </span>\n )}\n <ExpandMore size=\"small\" data-test-id={`${testId}-expand`} />\n </button>\n </div>\n );\n});\n\nAppliedFilterButton.displayName = 'AppliedFilterButton';\n\nexport type { AppliedFilterButtonProps };\nexport { AppliedFilterButton };\n","import type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Button } from '@launchpad-ui/button';\nimport { Check } from '@launchpad-ui/icons';\nimport { Menu, MenuDivider, MenuItem, MenuSearch } from '@launchpad-ui/menu';\n\nimport styles from './styles/Filter.module.css';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype FilterOption<T = any> = {\n name?: ReactNode;\n isDisabled?: boolean;\n isDivider?: boolean;\n isChecked?: boolean;\n value: T | null;\n projKey?: string;\n nested?: boolean;\n groupHeader?: boolean;\n};\n\ntype FilterMenuProps = Pick<MenuProps<string>, 'enableVirtualization' | 'size' | 'data-test-id'> & {\n options: FilterOption[];\n onClearFilter?(): void;\n enableSearch?: boolean;\n searchValue?: string;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n onSelect?(): void;\n isLoading?: boolean;\n disabledOptionTooltip?: string;\n};\n\nconst FilterMenu = ({\n options,\n onClearFilter,\n enableSearch,\n searchValue,\n searchPlaceholder,\n searchAriaLabel,\n onSelect,\n onSearchChange,\n isLoading = false,\n disabledOptionTooltip,\n enableVirtualization,\n size,\n 'data-test-id': testId = 'filter-menu',\n}: FilterMenuProps) => {\n const filterOptions = isLoading\n ? [{ name: 'loading...', value: 'loading...', isDisabled: true }]\n : options;\n\n return (\n <>\n {onClearFilter && (\n <Button\n tabIndex={0}\n className={styles.filterClearButton}\n onClick={onClearFilter}\n kind=\"link\"\n data-test-id=\"clear-filter-button\"\n >\n CLEAR FILTER\n </Button>\n )}\n <Menu\n enableVirtualization={enableVirtualization}\n size={size}\n data-test-id={testId}\n onSelect={onSelect}\n >\n {enableSearch && (\n <MenuSearch\n value={searchValue}\n placeholder={searchPlaceholder}\n onChange={onSearchChange}\n ariaLabel={searchAriaLabel}\n />\n )}\n {filterOptions.map((option, index) => {\n if (option.isDivider) {\n return <MenuDivider key={`divider-${index}`} />;\n }\n return (\n <MenuItem\n item={option}\n disabled={option.isDisabled}\n icon={option.isChecked ? Check : null}\n key={option.value}\n role=\"menuitemradio\"\n aria-checked={option.isChecked ? 'true' : undefined}\n nested={option.nested}\n groupHeader={option.groupHeader}\n tooltip={\n option.isDisabled && disabledOptionTooltip ? disabledOptionTooltip : undefined\n }\n tooltipPlacement=\"right\"\n >\n {option.name}\n </MenuItem>\n );\n })}\n </Menu>\n </>\n );\n};\n\nexport { FilterMenu };\nexport type { FilterOption, FilterMenuProps };\n","import type { FilterOption } from './FilterMenu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\n\nimport { AppliedFilterButton } from './AppliedFilterButton';\nimport { FilterMenu } from './FilterMenu';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype AppliedFilterProps = {\n searchValue?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n onClearFilter?(): void;\n searchPlaceholder?: string;\n name?: ReactNode;\n description: ReactNode;\n options: FilterOption[];\n className?: string;\n onStateChange?({ isOpen }: { isOpen?: boolean }): void;\n onSelect?(item: FilterOption): void;\n isEmpty?: boolean;\n isLoading?: boolean;\n onClickFilterButton?(): void;\n searchAriaLabel?: string;\n 'data-test-id'?: string;\n};\n\nconst AppliedFilter = ({\n searchValue,\n onSearchChange,\n searchPlaceholder,\n name,\n description,\n options,\n className,\n isEmpty,\n isLoading,\n onClickFilterButton,\n onClearFilter,\n searchAriaLabel,\n 'data-test-id': testId = 'applied-filter',\n ...props\n}: AppliedFilterProps) => {\n const enableSearch =\n onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n return (\n <Dropdown targetClassName={className} placement=\"bottom-start\" enableArrow={false} {...props}>\n <AppliedFilterButton\n data-test-id={testId}\n name={name}\n onClickFilterButton={onClickFilterButton}\n >\n {description}\n </AppliedFilterButton>\n\n <FilterMenu\n options={options}\n searchValue={searchValue}\n searchPlaceholder={searchPlaceholder}\n enableSearch={enableSearch}\n searchAriaLabel={searchAriaLabel}\n onSearchChange={onSearchChange}\n onClearFilter={onClearFilter}\n isLoading={isLoading}\n />\n </Dropdown>\n );\n};\n\nexport type { AppliedFilterProps };\nexport { AppliedFilter };\n","import type { ReactNode, SyntheticEvent } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Close, ExpandMore } from '@launchpad-ui/icons';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { cx } from 'classix';\nimport { Children, forwardRef, useId } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype FilterButtonProps = {\n name: ReactNode;\n hideName?: boolean;\n isClearable?: boolean;\n onClear?(event: SyntheticEvent): void;\n className?: string;\n isSelected?: boolean;\n clearTooltip?: string | JSX.Element;\n children?: ReactNode;\n onClickFilterButton?(): void;\n 'data-test-id'?: string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst FilterButton = forwardRef<Ref, FilterButtonProps>((props, ref) => {\n const {\n children,\n name,\n hideName,\n isClearable,\n clearTooltip,\n onClear,\n isSelected,\n onClickFilterButton,\n className,\n 'data-test-id': testId = 'filter-button',\n ...rest\n } = props;\n const nameId = useId();\n const descriptionId = useId();\n\n const hasDescription = Children.count(children) !== 0;\n\n const nameElement = (\n <span className={styles.name}>\n {name}\n {hasDescription && ':'}\n </span>\n );\n\n return (\n <div className={styles.buttonContainer} data-test-id={testId}>\n <button\n {...rest}\n aria-labelledby={`${nameId} ${hasDescription ? descriptionId : ''}`}\n aria-haspopup\n className={cx(styles.button, className, (isClearable || isSelected) && styles.isClearable)}\n ref={ref}\n onClick={onClickFilterButton}\n >\n {hideName ? (\n <VisuallyHidden id={nameId}>{nameElement}</VisuallyHidden>\n ) : (\n <span id={nameId}>{nameElement}</span>\n )}\n {hasDescription && (\n <span id={descriptionId} className={styles.description}>\n {children}\n </span>\n )}\n {!isClearable && <ExpandMore size=\"small\" />}\n </button>\n {isClearable && (\n <Tooltip targetClassName={styles.clearTooltip} content={clearTooltip}>\n <IconButton\n aria-label=\"Clear filter\"\n className={styles.clear}\n data-test-id=\"clear-filter-button\"\n icon={<Close size=\"tiny\" />}\n onClick={onClear}\n />\n </Tooltip>\n )}\n </div>\n );\n});\n\nFilterButton.defaultProps = {\n clearTooltip: 'Clear filter',\n};\n\nFilterButton.displayName = 'FilterButton';\n\nexport { FilterButton };\nexport type { FilterButtonProps };\n","import type { FilterOption } from './FilterMenu';\nimport type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode, SyntheticEvent } from 'react';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\nimport { cx } from 'classix';\n\nimport { FilterButton } from './FilterButton';\nimport { FilterMenu } from './FilterMenu';\nimport styles from './styles/Filter.module.css';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype FilterProps = Pick<MenuProps<string>, 'size' | 'enableVirtualization'> & {\n searchValue?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n name: ReactNode;\n hideName?: boolean;\n description: ReactNode;\n options: FilterOption[];\n isClearable?: boolean;\n onClear?(): void;\n className?: string;\n onStateChange?({ isOpen }: { isOpen?: boolean }): void;\n isSelected?: boolean;\n onSelect?(item: FilterOption): void;\n isEmpty?: boolean;\n isLoading?: boolean;\n onClickFilterButton?(): void;\n disabledOptionTooltip?: string;\n 'data-test-id'?: string;\n triggerTestId?: string;\n};\n\nconst Filter = ({\n searchValue,\n onSearchChange,\n searchPlaceholder,\n searchAriaLabel,\n name,\n hideName,\n description,\n options,\n isClearable,\n onClear,\n isSelected,\n className,\n isEmpty,\n isLoading,\n onClickFilterButton,\n disabledOptionTooltip,\n 'data-test-id': testId = 'filter',\n size,\n enableVirtualization,\n ...props\n}: FilterProps) => {\n const enableSearch =\n onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n const dropdownClasses = cx(styles.filter, className);\n\n const handleClear = (event: SyntheticEvent) => {\n event.preventDefault();\n onClear?.();\n };\n\n return (\n <Dropdown targetTestId={testId} targetClassName={dropdownClasses} {...props}>\n <FilterButton\n isClearable={isClearable}\n onClear={handleClear}\n name={name}\n hideName={hideName}\n isSelected={isSelected}\n onClickFilterButton={onClickFilterButton}\n >\n {description}\n </FilterButton>\n <FilterMenu\n options={options}\n searchValue={searchValue}\n searchPlaceholder={searchPlaceholder}\n searchAriaLabel={searchAriaLabel}\n enableSearch={enableSearch}\n onSearchChange={onSearchChange}\n isLoading={isLoading}\n disabledOptionTooltip={disabledOptionTooltip}\n size={size}\n enableVirtualization={enableVirtualization}\n />\n </Dropdown>\n );\n};\n\nexport { Filter };\nexport type { FilterProps };\n"],"names":["AppliedFilterButton","forwardRef","props","ref","name","className","children","onClickFilterButton","testId","hasDescription","Children","count","cx","styles","appliedButton","_jsxs","appliedName","_jsx","appliedDescription","displayName","FilterMenu","options","onClearFilter","enableSearch","searchValue","searchPlaceholder","searchAriaLabel","onSelect","onSearchChange","isLoading","disabledOptionTooltip","enableVirtualization","size","filterOptions","value","isDisabled","_Fragment","filterClearButton","map","option","index","isDivider","isChecked","Check","undefined","nested","groupHeader","SEARCH_INPUT_THRESHOLD","AppliedFilter","description","isEmpty","length","FilterButton","hideName","isClearable","clearTooltip","onClear","isSelected","rest","nameId","useId","descriptionId","nameElement","buttonContainer","button","clear","defaultProps","Filter","dropdownClasses","filter","handleClear","event","preventDefault"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,sBAAsBC,WAA0C,CAACC,OAAOC,QAAQ;AAC9E,QAAA;AAAA,IAAEC,MAAAA;AAAAA,IAAMC;AAAAA,IAAWC;AAAAA,IAAUC;AAAAA,IAAqB,gBAAgBC;AAAAA,EAAWN,IAAAA;AAEnF,QAAMO,iBAAiBC,SAASC,MAAML,QAAf,MAA6B;AAEpD,6BACE,OAAA;AAAA,IAAK,gBAAcE;AAAAA,IAAnB,+BACE,UAAA;AAAA,MACE,iBADF;AAAA,MAEE,WAAWI,GAAGC,OAAOC,eAAeT,SAAvB;AAAA,MACb;AAAA,MACA,SAASE;AAAAA,MAJX,UAAA,CAMGH,SACCW,qBAAA,QAAA;AAAA,QAAM,WAAWF,OAAOG;AAAAA,QAAa,gBAAe,GAAER;AAAAA,QAAtD,UAAA,CACGJ,OACAK,kBAAkB,GAFrB;AAAA,MAAA,CAPJ,GAYGA,kBAC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MACA;AAAA,IAAA,CArBJ,CAAA;AAAA,EAAA,CADF;AA0BD;"}
package/dist/index.js CHANGED
@@ -55,12 +55,15 @@ const AppliedFilterButton = react.forwardRef((props, ref) => {
55
55
  onClick: onClickFilterButton,
56
56
  children: [name2 && /* @__PURE__ */ jsxRuntime.jsxs("span", {
57
57
  className: styles.appliedName,
58
+ "data-test-id": `${testId}-name`,
58
59
  children: [name2, hasDescription && ":"]
59
60
  }), hasDescription && /* @__PURE__ */ jsxRuntime.jsx("span", {
60
61
  className: styles.appliedDescription,
62
+ "data-test-id": `${testId}-description`,
61
63
  children
62
64
  }), /* @__PURE__ */ jsxRuntime.jsx(icons.ExpandMore, {
63
- size: "small"
65
+ size: "small",
66
+ "data-test-id": `${testId}-expand`
64
67
  })]
65
68
  })
66
69
  });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/AppliedFilterButton.tsx","../src/FilterMenu.tsx","../src/AppliedFilter.tsx","../src/FilterButton.tsx","../src/Filter.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { ExpandMore } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\nimport { Children, forwardRef } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype AppliedFilterButtonProps = {\n name?: ReactNode;\n className?: string;\n children: ReactNode;\n onClickFilterButton?(): void;\n 'data-test-id': string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst AppliedFilterButton = forwardRef<Ref, AppliedFilterButtonProps>((props, ref) => {\n const { name, className, children, onClickFilterButton, 'data-test-id': testId } = props;\n\n const hasDescription = Children.count(children) !== 0;\n\n return (\n <div data-test-id={testId}>\n <button\n aria-haspopup\n className={cx(styles.appliedButton, className)}\n ref={ref}\n onClick={onClickFilterButton}\n >\n {name && (\n <span className={styles.appliedName}>\n {name}\n {hasDescription && ':'}\n </span>\n )}\n {hasDescription && <span className={styles.appliedDescription}>{children}</span>}\n <ExpandMore size=\"small\" />\n </button>\n </div>\n );\n});\n\nAppliedFilterButton.displayName = 'AppliedFilterButton';\n\nexport type { AppliedFilterButtonProps };\nexport { AppliedFilterButton };\n","import type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Button } from '@launchpad-ui/button';\nimport { Check } from '@launchpad-ui/icons';\nimport { Menu, MenuDivider, MenuItem, MenuSearch } from '@launchpad-ui/menu';\n\nimport styles from './styles/Filter.module.css';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype FilterOption<T = any> = {\n name?: ReactNode;\n isDisabled?: boolean;\n isDivider?: boolean;\n isChecked?: boolean;\n value: T | null;\n projKey?: string;\n nested?: boolean;\n groupHeader?: boolean;\n};\n\ntype FilterMenuProps = Pick<MenuProps<string>, 'enableVirtualization' | 'size' | 'data-test-id'> & {\n options: FilterOption[];\n onClearFilter?(): void;\n enableSearch?: boolean;\n searchValue?: string;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n onSelect?(): void;\n isLoading?: boolean;\n disabledOptionTooltip?: string;\n};\n\nconst FilterMenu = ({\n options,\n onClearFilter,\n enableSearch,\n searchValue,\n searchPlaceholder,\n searchAriaLabel,\n onSelect,\n onSearchChange,\n isLoading = false,\n disabledOptionTooltip,\n enableVirtualization,\n size,\n 'data-test-id': testId = 'filter-menu',\n}: FilterMenuProps) => {\n const filterOptions = isLoading\n ? [{ name: 'loading...', value: 'loading...', isDisabled: true }]\n : options;\n\n return (\n <>\n {onClearFilter && (\n <Button\n tabIndex={0}\n className={styles.filterClearButton}\n onClick={onClearFilter}\n kind=\"link\"\n data-test-id=\"clear-filter-button\"\n >\n CLEAR FILTER\n </Button>\n )}\n <Menu\n enableVirtualization={enableVirtualization}\n size={size}\n data-test-id={testId}\n onSelect={onSelect}\n >\n {enableSearch && (\n <MenuSearch\n value={searchValue}\n placeholder={searchPlaceholder}\n onChange={onSearchChange}\n ariaLabel={searchAriaLabel}\n />\n )}\n {filterOptions.map((option, index) => {\n if (option.isDivider) {\n return <MenuDivider key={`divider-${index}`} />;\n }\n return (\n <MenuItem\n item={option}\n disabled={option.isDisabled}\n icon={option.isChecked ? Check : null}\n key={option.value}\n role=\"menuitemradio\"\n aria-checked={option.isChecked ? 'true' : undefined}\n nested={option.nested}\n groupHeader={option.groupHeader}\n tooltip={\n option.isDisabled && disabledOptionTooltip ? disabledOptionTooltip : undefined\n }\n tooltipPlacement=\"right\"\n >\n {option.name}\n </MenuItem>\n );\n })}\n </Menu>\n </>\n );\n};\n\nexport { FilterMenu };\nexport type { FilterOption, FilterMenuProps };\n","import type { FilterOption } from './FilterMenu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\n\nimport { AppliedFilterButton } from './AppliedFilterButton';\nimport { FilterMenu } from './FilterMenu';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype AppliedFilterProps = {\n searchValue?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n onClearFilter?(): void;\n searchPlaceholder?: string;\n name?: ReactNode;\n description: ReactNode;\n options: FilterOption[];\n className?: string;\n onStateChange?({ isOpen }: { isOpen?: boolean }): void;\n onSelect?(item: FilterOption): void;\n isEmpty?: boolean;\n isLoading?: boolean;\n onClickFilterButton?(): void;\n searchAriaLabel?: string;\n 'data-test-id'?: string;\n};\n\nconst AppliedFilter = ({\n searchValue,\n onSearchChange,\n searchPlaceholder,\n name,\n description,\n options,\n className,\n isEmpty,\n isLoading,\n onClickFilterButton,\n onClearFilter,\n searchAriaLabel,\n 'data-test-id': testId = 'applied-filter',\n ...props\n}: AppliedFilterProps) => {\n const enableSearch =\n onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n return (\n <Dropdown targetClassName={className} placement=\"bottom-start\" enableArrow={false} {...props}>\n <AppliedFilterButton\n data-test-id={testId}\n name={name}\n onClickFilterButton={onClickFilterButton}\n >\n {description}\n </AppliedFilterButton>\n\n <FilterMenu\n options={options}\n searchValue={searchValue}\n searchPlaceholder={searchPlaceholder}\n enableSearch={enableSearch}\n searchAriaLabel={searchAriaLabel}\n onSearchChange={onSearchChange}\n onClearFilter={onClearFilter}\n isLoading={isLoading}\n />\n </Dropdown>\n );\n};\n\nexport type { AppliedFilterProps };\nexport { AppliedFilter };\n","import type { ReactNode, SyntheticEvent } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Close, ExpandMore } from '@launchpad-ui/icons';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { cx } from 'classix';\nimport { Children, forwardRef, useId } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype FilterButtonProps = {\n name: ReactNode;\n hideName?: boolean;\n isClearable?: boolean;\n onClear?(event: SyntheticEvent): void;\n className?: string;\n isSelected?: boolean;\n clearTooltip?: string | JSX.Element;\n children?: ReactNode;\n onClickFilterButton?(): void;\n 'data-test-id'?: string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst FilterButton = forwardRef<Ref, FilterButtonProps>((props, ref) => {\n const {\n children,\n name,\n hideName,\n isClearable,\n clearTooltip,\n onClear,\n isSelected,\n onClickFilterButton,\n className,\n 'data-test-id': testId = 'filter-button',\n ...rest\n } = props;\n const nameId = useId();\n const descriptionId = useId();\n\n const hasDescription = Children.count(children) !== 0;\n\n const nameElement = (\n <span className={styles.name}>\n {name}\n {hasDescription && ':'}\n </span>\n );\n\n return (\n <div className={styles.buttonContainer} data-test-id={testId}>\n <button\n {...rest}\n aria-labelledby={`${nameId} ${hasDescription ? descriptionId : ''}`}\n aria-haspopup\n className={cx(styles.button, className, (isClearable || isSelected) && styles.isClearable)}\n ref={ref}\n onClick={onClickFilterButton}\n >\n {hideName ? (\n <VisuallyHidden id={nameId}>{nameElement}</VisuallyHidden>\n ) : (\n <span id={nameId}>{nameElement}</span>\n )}\n {hasDescription && (\n <span id={descriptionId} className={styles.description}>\n {children}\n </span>\n )}\n {!isClearable && <ExpandMore size=\"small\" />}\n </button>\n {isClearable && (\n <Tooltip targetClassName={styles.clearTooltip} content={clearTooltip}>\n <IconButton\n aria-label=\"Clear filter\"\n className={styles.clear}\n data-test-id=\"clear-filter-button\"\n icon={<Close size=\"tiny\" />}\n onClick={onClear}\n />\n </Tooltip>\n )}\n </div>\n );\n});\n\nFilterButton.defaultProps = {\n clearTooltip: 'Clear filter',\n};\n\nFilterButton.displayName = 'FilterButton';\n\nexport { FilterButton };\nexport type { FilterButtonProps };\n","import type { FilterOption } from './FilterMenu';\nimport type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode, SyntheticEvent } from 'react';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\nimport { cx } from 'classix';\n\nimport { FilterButton } from './FilterButton';\nimport { FilterMenu } from './FilterMenu';\nimport styles from './styles/Filter.module.css';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype FilterProps = Pick<MenuProps<string>, 'size' | 'enableVirtualization'> & {\n searchValue?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n name: ReactNode;\n hideName?: boolean;\n description: ReactNode;\n options: FilterOption[];\n isClearable?: boolean;\n onClear?(): void;\n className?: string;\n onStateChange?({ isOpen }: { isOpen?: boolean }): void;\n isSelected?: boolean;\n onSelect?(item: FilterOption): void;\n isEmpty?: boolean;\n isLoading?: boolean;\n onClickFilterButton?(): void;\n disabledOptionTooltip?: string;\n 'data-test-id'?: string;\n triggerTestId?: string;\n};\n\nconst Filter = ({\n searchValue,\n onSearchChange,\n searchPlaceholder,\n searchAriaLabel,\n name,\n hideName,\n description,\n options,\n isClearable,\n onClear,\n isSelected,\n className,\n isEmpty,\n isLoading,\n onClickFilterButton,\n disabledOptionTooltip,\n 'data-test-id': testId = 'filter',\n size,\n enableVirtualization,\n ...props\n}: FilterProps) => {\n const enableSearch =\n onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n const dropdownClasses = cx(styles.filter, className);\n\n const handleClear = (event: SyntheticEvent) => {\n event.preventDefault();\n onClear?.();\n };\n\n return (\n <Dropdown targetTestId={testId} targetClassName={dropdownClasses} {...props}>\n <FilterButton\n isClearable={isClearable}\n onClear={handleClear}\n name={name}\n hideName={hideName}\n isSelected={isSelected}\n onClickFilterButton={onClickFilterButton}\n >\n {description}\n </FilterButton>\n <FilterMenu\n options={options}\n searchValue={searchValue}\n searchPlaceholder={searchPlaceholder}\n searchAriaLabel={searchAriaLabel}\n enableSearch={enableSearch}\n onSearchChange={onSearchChange}\n isLoading={isLoading}\n disabledOptionTooltip={disabledOptionTooltip}\n size={size}\n enableVirtualization={enableVirtualization}\n />\n </Dropdown>\n );\n};\n\nexport { Filter };\nexport type { FilterProps };\n"],"names":["AppliedFilterButton","forwardRef","props","ref","name","className","children","onClickFilterButton","testId","hasDescription","Children","count","cx","styles","appliedButton","_jsxs","appliedName","_jsx","appliedDescription","ExpandMore","displayName","FilterMenu","options","onClearFilter","enableSearch","searchValue","searchPlaceholder","searchAriaLabel","onSelect","onSearchChange","isLoading","disabledOptionTooltip","enableVirtualization","size","filterOptions","value","isDisabled","_Fragment","Button","filterClearButton","Menu","MenuSearch","map","option","index","isDivider","MenuDivider","MenuItem","isChecked","Check","undefined","nested","groupHeader","SEARCH_INPUT_THRESHOLD","AppliedFilter","description","isEmpty","length","Dropdown","FilterButton","hideName","isClearable","clearTooltip","onClear","isSelected","rest","nameId","useId","descriptionId","nameElement","buttonContainer","button","VisuallyHidden","Tooltip","IconButton","clear","Close","defaultProps","Filter","dropdownClasses","filter","handleClear","event","preventDefault"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAMA,sBAAsBC,MAAAA,WAA0C,CAACC,OAAOC,QAAQ;AAC9E,QAAA;AAAA,IAAEC,MAAAA;AAAAA,IAAMC;AA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JK,mBAAmB,CAAC,CAACJ,eAAeH,QAAQmC,SAASJ,0BAA0B,CAACG;AAElF,QAAMuB,kBAAkBnE,QAAAA,GAAGC,OAAOmE,QAAQ3E,SAAhB;AAEpB4E,QAAAA,cAAc,CAACC,UAA0B;AAC7CA,UAAMC,eAAN;AACO;AAAA,EAAA;AAGT,yCACGzB,SAAAA,UAAD;AAAA,IAAU,cAAclD;AAAAA,IAAQ,iBAAiBuE;AAAAA,IAAjD,GAAsE7E;AAAAA,IAAtE,UAAA,CACEe,2BAAA,IAAC,cAAD;AAAA,MACE,aAAA4C;AAAA,MACA,SAASoB;AAAAA,MACT,MAAA7E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MANF,UAQGmD;AAAAA,IAAAA,CATL,GAWEtC,2BAAA,IAAC,YAAD;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,CArBJ,CAAA;AAAA,EAAA,CADF;AA0BD;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/AppliedFilterButton.tsx","../src/FilterMenu.tsx","../src/AppliedFilter.tsx","../src/FilterButton.tsx","../src/Filter.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { ExpandMore } from '@launchpad-ui/icons';\nimport { cx } from 'classix';\nimport { Children, forwardRef } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype AppliedFilterButtonProps = {\n name?: ReactNode;\n className?: string;\n children: ReactNode;\n onClickFilterButton?(): void;\n 'data-test-id': string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst AppliedFilterButton = forwardRef<Ref, AppliedFilterButtonProps>((props, ref) => {\n const { name, className, children, onClickFilterButton, 'data-test-id': testId } = props;\n\n const hasDescription = Children.count(children) !== 0;\n\n return (\n <div data-test-id={testId}>\n <button\n aria-haspopup\n className={cx(styles.appliedButton, className)}\n ref={ref}\n onClick={onClickFilterButton}\n >\n {name && (\n <span className={styles.appliedName} data-test-id={`${testId}-name`}>\n {name}\n {hasDescription && ':'}\n </span>\n )}\n {hasDescription && (\n <span className={styles.appliedDescription} data-test-id={`${testId}-description`}>\n {children}\n </span>\n )}\n <ExpandMore size=\"small\" data-test-id={`${testId}-expand`} />\n </button>\n </div>\n );\n});\n\nAppliedFilterButton.displayName = 'AppliedFilterButton';\n\nexport type { AppliedFilterButtonProps };\nexport { AppliedFilterButton };\n","import type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Button } from '@launchpad-ui/button';\nimport { Check } from '@launchpad-ui/icons';\nimport { Menu, MenuDivider, MenuItem, MenuSearch } from '@launchpad-ui/menu';\n\nimport styles from './styles/Filter.module.css';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype FilterOption<T = any> = {\n name?: ReactNode;\n isDisabled?: boolean;\n isDivider?: boolean;\n isChecked?: boolean;\n value: T | null;\n projKey?: string;\n nested?: boolean;\n groupHeader?: boolean;\n};\n\ntype FilterMenuProps = Pick<MenuProps<string>, 'enableVirtualization' | 'size' | 'data-test-id'> & {\n options: FilterOption[];\n onClearFilter?(): void;\n enableSearch?: boolean;\n searchValue?: string;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n onSelect?(): void;\n isLoading?: boolean;\n disabledOptionTooltip?: string;\n};\n\nconst FilterMenu = ({\n options,\n onClearFilter,\n enableSearch,\n searchValue,\n searchPlaceholder,\n searchAriaLabel,\n onSelect,\n onSearchChange,\n isLoading = false,\n disabledOptionTooltip,\n enableVirtualization,\n size,\n 'data-test-id': testId = 'filter-menu',\n}: FilterMenuProps) => {\n const filterOptions = isLoading\n ? [{ name: 'loading...', value: 'loading...', isDisabled: true }]\n : options;\n\n return (\n <>\n {onClearFilter && (\n <Button\n tabIndex={0}\n className={styles.filterClearButton}\n onClick={onClearFilter}\n kind=\"link\"\n data-test-id=\"clear-filter-button\"\n >\n CLEAR FILTER\n </Button>\n )}\n <Menu\n enableVirtualization={enableVirtualization}\n size={size}\n data-test-id={testId}\n onSelect={onSelect}\n >\n {enableSearch && (\n <MenuSearch\n value={searchValue}\n placeholder={searchPlaceholder}\n onChange={onSearchChange}\n ariaLabel={searchAriaLabel}\n />\n )}\n {filterOptions.map((option, index) => {\n if (option.isDivider) {\n return <MenuDivider key={`divider-${index}`} />;\n }\n return (\n <MenuItem\n item={option}\n disabled={option.isDisabled}\n icon={option.isChecked ? Check : null}\n key={option.value}\n role=\"menuitemradio\"\n aria-checked={option.isChecked ? 'true' : undefined}\n nested={option.nested}\n groupHeader={option.groupHeader}\n tooltip={\n option.isDisabled && disabledOptionTooltip ? disabledOptionTooltip : undefined\n }\n tooltipPlacement=\"right\"\n >\n {option.name}\n </MenuItem>\n );\n })}\n </Menu>\n </>\n );\n};\n\nexport { FilterMenu };\nexport type { FilterOption, FilterMenuProps };\n","import type { FilterOption } from './FilterMenu';\nimport type { ChangeEvent, ReactNode } from 'react';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\n\nimport { AppliedFilterButton } from './AppliedFilterButton';\nimport { FilterMenu } from './FilterMenu';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype AppliedFilterProps = {\n searchValue?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n onClearFilter?(): void;\n searchPlaceholder?: string;\n name?: ReactNode;\n description: ReactNode;\n options: FilterOption[];\n className?: string;\n onStateChange?({ isOpen }: { isOpen?: boolean }): void;\n onSelect?(item: FilterOption): void;\n isEmpty?: boolean;\n isLoading?: boolean;\n onClickFilterButton?(): void;\n searchAriaLabel?: string;\n 'data-test-id'?: string;\n};\n\nconst AppliedFilter = ({\n searchValue,\n onSearchChange,\n searchPlaceholder,\n name,\n description,\n options,\n className,\n isEmpty,\n isLoading,\n onClickFilterButton,\n onClearFilter,\n searchAriaLabel,\n 'data-test-id': testId = 'applied-filter',\n ...props\n}: AppliedFilterProps) => {\n const enableSearch =\n onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n return (\n <Dropdown targetClassName={className} placement=\"bottom-start\" enableArrow={false} {...props}>\n <AppliedFilterButton\n data-test-id={testId}\n name={name}\n onClickFilterButton={onClickFilterButton}\n >\n {description}\n </AppliedFilterButton>\n\n <FilterMenu\n options={options}\n searchValue={searchValue}\n searchPlaceholder={searchPlaceholder}\n enableSearch={enableSearch}\n searchAriaLabel={searchAriaLabel}\n onSearchChange={onSearchChange}\n onClearFilter={onClearFilter}\n isLoading={isLoading}\n />\n </Dropdown>\n );\n};\n\nexport type { AppliedFilterProps };\nexport { AppliedFilter };\n","import type { ReactNode, SyntheticEvent } from 'react';\n\nimport { IconButton } from '@launchpad-ui/button';\nimport { Close, ExpandMore } from '@launchpad-ui/icons';\nimport { Tooltip } from '@launchpad-ui/tooltip';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { cx } from 'classix';\nimport { Children, forwardRef, useId } from 'react';\n\nimport styles from './styles/Filter.module.css';\n\ntype FilterButtonProps = {\n name: ReactNode;\n hideName?: boolean;\n isClearable?: boolean;\n onClear?(event: SyntheticEvent): void;\n className?: string;\n isSelected?: boolean;\n clearTooltip?: string | JSX.Element;\n children?: ReactNode;\n onClickFilterButton?(): void;\n 'data-test-id'?: string;\n};\n\ntype Ref = HTMLButtonElement;\n\nconst FilterButton = forwardRef<Ref, FilterButtonProps>((props, ref) => {\n const {\n children,\n name,\n hideName,\n isClearable,\n clearTooltip,\n onClear,\n isSelected,\n onClickFilterButton,\n className,\n 'data-test-id': testId = 'filter-button',\n ...rest\n } = props;\n const nameId = useId();\n const descriptionId = useId();\n\n const hasDescription = Children.count(children) !== 0;\n\n const nameElement = (\n <span className={styles.name}>\n {name}\n {hasDescription && ':'}\n </span>\n );\n\n return (\n <div className={styles.buttonContainer} data-test-id={testId}>\n <button\n {...rest}\n aria-labelledby={`${nameId} ${hasDescription ? descriptionId : ''}`}\n aria-haspopup\n className={cx(styles.button, className, (isClearable || isSelected) && styles.isClearable)}\n ref={ref}\n onClick={onClickFilterButton}\n >\n {hideName ? (\n <VisuallyHidden id={nameId}>{nameElement}</VisuallyHidden>\n ) : (\n <span id={nameId}>{nameElement}</span>\n )}\n {hasDescription && (\n <span id={descriptionId} className={styles.description}>\n {children}\n </span>\n )}\n {!isClearable && <ExpandMore size=\"small\" />}\n </button>\n {isClearable && (\n <Tooltip targetClassName={styles.clearTooltip} content={clearTooltip}>\n <IconButton\n aria-label=\"Clear filter\"\n className={styles.clear}\n data-test-id=\"clear-filter-button\"\n icon={<Close size=\"tiny\" />}\n onClick={onClear}\n />\n </Tooltip>\n )}\n </div>\n );\n});\n\nFilterButton.defaultProps = {\n clearTooltip: 'Clear filter',\n};\n\nFilterButton.displayName = 'FilterButton';\n\nexport { FilterButton };\nexport type { FilterButtonProps };\n","import type { FilterOption } from './FilterMenu';\nimport type { MenuProps } from '@launchpad-ui/menu';\nimport type { ChangeEvent, ReactNode, SyntheticEvent } from 'react';\n\nimport { Dropdown } from '@launchpad-ui/dropdown';\nimport { cx } from 'classix';\n\nimport { FilterButton } from './FilterButton';\nimport { FilterMenu } from './FilterMenu';\nimport styles from './styles/Filter.module.css';\n\nconst SEARCH_INPUT_THRESHOLD = 4;\n\ntype FilterProps = Pick<MenuProps<string>, 'size' | 'enableVirtualization'> & {\n searchValue?: string;\n onSearchChange?(event: ChangeEvent<HTMLInputElement>): void;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n name: ReactNode;\n hideName?: boolean;\n description: ReactNode;\n options: FilterOption[];\n isClearable?: boolean;\n onClear?(): void;\n className?: string;\n onStateChange?({ isOpen }: { isOpen?: boolean }): void;\n isSelected?: boolean;\n onSelect?(item: FilterOption): void;\n isEmpty?: boolean;\n isLoading?: boolean;\n onClickFilterButton?(): void;\n disabledOptionTooltip?: string;\n 'data-test-id'?: string;\n triggerTestId?: string;\n};\n\nconst Filter = ({\n searchValue,\n onSearchChange,\n searchPlaceholder,\n searchAriaLabel,\n name,\n hideName,\n description,\n options,\n isClearable,\n onClear,\n isSelected,\n className,\n isEmpty,\n isLoading,\n onClickFilterButton,\n disabledOptionTooltip,\n 'data-test-id': testId = 'filter',\n size,\n enableVirtualization,\n ...props\n}: FilterProps) => {\n const enableSearch =\n onSearchChange && (!!searchValue || options.length > SEARCH_INPUT_THRESHOLD || !isEmpty);\n\n const dropdownClasses = cx(styles.filter, className);\n\n const handleClear = (event: SyntheticEvent) => {\n event.preventDefault();\n onClear?.();\n };\n\n return (\n <Dropdown targetTestId={testId} targetClassName={dropdownClasses} {...props}>\n <FilterButton\n isClearable={isClearable}\n onClear={handleClear}\n name={name}\n hideName={hideName}\n isSelected={isSelected}\n onClickFilterButton={onClickFilterButton}\n >\n {description}\n </FilterButton>\n <FilterMenu\n options={options}\n searchValue={searchValue}\n searchPlaceholder={searchPlaceholder}\n searchAriaLabel={searchAriaLabel}\n enableSearch={enableSearch}\n onSearchChange={onSearchChange}\n isLoading={isLoading}\n disabledOptionTooltip={disabledOptionTooltip}\n size={size}\n enableVirtualization={enableVirtualization}\n />\n </Dropdown>\n );\n};\n\nexport { Filter };\nexport type { FilterProps };\n"],"names":["AppliedFilterButton","forwardRef","props","ref","name","className","children","onClickFilterButton","testId","hasDescription","Children","count","cx","styles","appliedButton","_jsxs","appliedName","_jsx","appliedDescription","ExpandMore","displayName","FilterMenu","options","onClearFilter","enableSearch","searchValue","searchPlaceholder","searchAriaLabel","onSelect","onSearchChange","isLoading","disabledOptionTooltip","enableVirtualization","size","filterOptions","value","isDisabled","_Fragment","Button","filterClearButton","Menu","MenuSearch","map","option","index","isDivider","MenuDivider","MenuItem","isChecked","Check","undefined","nested","groupHeader","SEARCH_INPUT_THRESHOLD","AppliedFilter","description","isEmpty","length","Dropdown","FilterButton","hideName","isClearable","clearTooltip","onClear","isSelected","rest","nameId","useId","descriptionId","nameElement","buttonContainer","button","VisuallyHidden","Tooltip","IconButton","clear","Close","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AA,EACAvB,MAAAA;AAAAA,EACAwD;AAAAA,EACAL,aAAAA;AAAAA,EACAjC;AAAAA,EACAuC,aAAAA;AAAAA,EACAE;AAAAA,EACAC;AAAAA,EACA3D;AAAAA,EACAmD;AAAAA,EACA1B;AAAAA,EACAvB;AAAAA,EACAwB;AAAAA,EACA,gBAAgBvB,SAAS;AAAA,EACzByB;AAAAA,EACAD;AAAAA,KACG9B;AApBW,MAqBG;AACXsB,QAAAA,eACJK,mBAAmB,CAAC,CAACJ,eAAeH,QAAQmC,SAASJ,0BAA0B,CAACG;AAElF,QAAMuB,kBAAkBnE,QAAAA,GAAGC,OAAOmE,QAAQ3E,SAAhB;AAEpB4E,QAAAA,cAAc,CAACC,UAA0B;AAC7CA,UAAMC,eAAN;AACO;AAAA,EAAA;AAGT,yCACGzB,SAAAA,UAAD;AAAA,IAAU,cAAclD;AAAAA,IAAQ,iBAAiBuE;AAAAA,IAAjD,GAAsE7E;AAAAA,IAAtE,UAAA,CACEe,2BAAA,IAAC,cAAD;AAAA,MACE,aAAA4C;AAAA,MACA,SAASoB;AAAAA,MACT,MAAA7E;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MANF,UAQGmD;AAAAA,IAAAA,CATL,GAWEtC,2BAAA,IAAC,YAAD;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,CArBJ,CAAA;AAAA,EAAA,CADF;AA0BD;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchpad-ui/filter",
3
- "version": "0.4.12",
3
+ "version": "0.4.14",
4
4
  "status": "beta",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,11 +27,11 @@
27
27
  "source": "src/index.ts",
28
28
  "dependencies": {
29
29
  "@launchpad-ui/button": "~0.7.2",
30
- "@launchpad-ui/dropdown": "~0.5.8",
31
- "@launchpad-ui/icons": "~0.5.5",
32
- "@launchpad-ui/menu": "~0.6.12",
30
+ "@launchpad-ui/dropdown": "~0.5.10",
31
+ "@launchpad-ui/icons": "~0.5.7",
32
+ "@launchpad-ui/menu": "~0.6.14",
33
33
  "@launchpad-ui/tokens": "~0.1.5",
34
- "@launchpad-ui/tooltip": "~0.6.9",
34
+ "@launchpad-ui/tooltip": "~0.6.11",
35
35
  "@react-aria/visually-hidden": "^3.4.0",
36
36
  "classix": "^2.1.13"
37
37
  },