@headless-react/select
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -19,2 +19,3 @@ import { MutableRefObject } from 'react'; | ||
}) | undefined>; | ||
export { useSelectContext, SelectProvider, useSelectSectionContext, SelectSectionProvider }; | ||
declare const useMultiSelectPopoverContext: () => Node<ItemValueProps>, MultiSelectPopoverProvider: import("react").Provider<Node<ItemValueProps> | undefined>; | ||
export { useSelectContext, SelectProvider, useSelectSectionContext, SelectSectionProvider, useMultiSelectPopoverContext, MultiSelectPopoverProvider }; |
@@ -7,2 +7,3 @@ import { SelectPopoverTriggerProps } from './types'; | ||
PopoverTrigger: (props: SelectPopoverTriggerProps<SingleState>) => JSX.Element; | ||
PopoverClearButton: (props: import("./types").SelectPopoverClearButtonProps) => JSX.Element; | ||
Options: (props: import("./types").SelectOptionsProps) => JSX.Element | null; | ||
@@ -18,2 +19,4 @@ Option: (props: import("./types").SelectOptionProps) => JSX.Element; | ||
PopoverTrigger: (props: SelectPopoverTriggerProps<MultiState>) => JSX.Element; | ||
PopoverItem: (props: import("./types").MultiSelectPopoverItemProps) => JSX.Element; | ||
PopoverItemClearButton: (props: import("./types").MultiSelectPopoverItemClearButtonProps) => JSX.Element; | ||
Options: (props: import("./types").SelectOptionsProps) => JSX.Element | null; | ||
@@ -20,0 +23,0 @@ Option: (props: import("./types").SelectOptionProps) => JSX.Element; |
@@ -1,3 +0,6 @@ | ||
import { SelectMenuProps, SelectPopoverTriggerProps } from './types'; | ||
import { MultiSelectPopoverItemClearButtonProps, MultiSelectPopoverItemProps, SelectMenuProps, SelectPopoverClearButtonProps, SelectPopoverTriggerProps } from './types'; | ||
export declare const PopoverTrigger: (props: SelectPopoverTriggerProps) => JSX.Element; | ||
export declare const PopoverClearButton: (props: SelectPopoverClearButtonProps) => JSX.Element; | ||
export declare const Popover: (props: SelectMenuProps) => JSX.Element | null; | ||
export declare const PopoverItem: (props: MultiSelectPopoverItemProps) => JSX.Element; | ||
export declare const PopoverItemClearButton: (props: MultiSelectPopoverItemClearButtonProps) => JSX.Element; |
@@ -7,2 +7,3 @@ declare const _default: { | ||
PopoverTrigger: (props: import("../types").SelectPopoverTriggerProps<import("../context").SingleState>) => JSX.Element; | ||
PopoverClearButton: (props: import("../types").SelectPopoverClearButtonProps) => JSX.Element; | ||
Options: (props: import("../types").SelectOptionsProps) => JSX.Element | null; | ||
@@ -9,0 +10,0 @@ Option: (props: import("../types").SelectOptionProps) => JSX.Element; |
import { ReactNode, HTMLAttributes, Key } from 'react'; | ||
import { AriaSelectProps } from '@react-types/select'; | ||
import { AriaButtonProps } from '@react-types/button'; | ||
import { Node } from '@react-types/shared'; | ||
@@ -72,2 +73,12 @@ import { AriaMultiSelectProps } from './hooks/useMultiSelect'; | ||
} | ||
export interface SelectPopoverClearButtonProps extends AriaButtonProps<'span'> { | ||
className?: string; | ||
} | ||
export interface MultiSelectPopoverItemProps extends HTMLAttributes<HTMLSpanElement> { | ||
children?: ReactNode; | ||
} | ||
export interface MultiSelectPopoverItemClearButtonProps extends AriaButtonProps<'span'> { | ||
className?: string; | ||
item: Node<ItemValueProps>; | ||
} | ||
export {}; |
{ | ||
"name": "@headless-react/select", | ||
"description": "Headless React components using react-stately and react-aria", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"source": "src/index.ts", | ||
@@ -54,3 +54,3 @@ "main": "lib/index.cjs.js", | ||
}, | ||
"gitHead": "c91881f288f2a80a1bfea86cfacb52bb450e85f2" | ||
"gitHead": "740917bbe51a395b3750252dbd3bb9ceaf131d76" | ||
} |
# @headless-react/select | ||
Headless React Select component with [`@react-aia`](https://react-spectrum.adobe.com/react-aria/index.html) and [`@react-stately`](https://react-spectrum.adobe.com/react-stately/index.html). | ||
Headless React Select component with [`@react-aria`](https://react-spectrum.adobe.com/react-aria/index.html) and [`@react-stately`](https://react-spectrum.adobe.com/react-stately/index.html). | ||
@@ -5,0 +5,0 @@ ## Getting Started |
@@ -5,3 +5,3 @@ /* eslint-disable no-undef */ | ||
import { Label } from './Label' | ||
import { Popover, PopoverTrigger } from './Popover' | ||
import { Popover, PopoverClearButton, PopoverItem, PopoverItemClearButton, PopoverTrigger } from './Popover' | ||
import { Options, Option } from './Option' | ||
@@ -16,2 +16,3 @@ import { Section, SectionHeading, SectionOptions } from './Section' | ||
PopoverTrigger: PopoverTrigger as (props: SelectPopoverTriggerProps<SingleState>) => JSX.Element, | ||
PopoverClearButton, | ||
Options, | ||
@@ -28,2 +29,4 @@ Option, | ||
PopoverTrigger: PopoverTrigger as (props: SelectPopoverTriggerProps<MultiState>) => JSX.Element, | ||
PopoverItem, | ||
PopoverItemClearButton, | ||
Options, | ||
@@ -30,0 +33,0 @@ Option, |
import { ReactNode, HTMLAttributes, Key } from 'react' | ||
import { AriaSelectProps } from '@react-types/select' | ||
import { AriaButtonProps } from '@react-types/button' | ||
import { Node } from '@react-types/shared' | ||
@@ -60,1 +61,14 @@ import { AriaMultiSelectProps } from './hooks/useMultiSelect' | ||
} | ||
export interface SelectPopoverClearButtonProps extends AriaButtonProps<'span'> { | ||
className?: string | ||
} | ||
export interface MultiSelectPopoverItemProps extends HTMLAttributes<HTMLSpanElement> { | ||
children?: ReactNode | ||
} | ||
export interface MultiSelectPopoverItemClearButtonProps extends AriaButtonProps<'span'> { | ||
className?: string; | ||
item: Node<ItemValueProps> | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
924546
21326