@headless-react/select
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -1,2 +0,2 @@ | ||
import { ReactNode, HTMLAttributes } from 'react'; | ||
import { ReactNode, HTMLAttributes, Key } from 'react'; | ||
import { AriaSelectProps } from '@react-types/select'; | ||
@@ -6,5 +6,11 @@ import { Node } from '@react-types/shared'; | ||
import { MultiState, SingleState } from './context'; | ||
export declare type ItemValueProps = { | ||
declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & { | ||
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>; | ||
}[Keys]; | ||
declare type RequiredKeys = { | ||
key: Key; | ||
id: Key; | ||
[key: string | number]: any; | ||
}; | ||
export declare type ItemValueProps = RequireAtLeastOne<RequiredKeys, 'key' | 'id'>; | ||
export interface MultiSelectProps extends Omit<AriaMultiSelectProps<ItemValueProps>, 'children'> { | ||
@@ -67,1 +73,2 @@ children?: ReactNode; | ||
} | ||
export {}; |
{ | ||
"name": "@headless-react/select", | ||
"description": "Headless React components using react-stately and react-aria", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"source": "src/index.ts", | ||
@@ -54,3 +54,3 @@ "main": "lib/index.cjs.js", | ||
}, | ||
"gitHead": "e3bf56bf37b763bbfee9407850748c2bec1afb80" | ||
"gitHead": "c91881f288f2a80a1bfea86cfacb52bb450e85f2" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { ReactNode, HTMLAttributes } from 'react' | ||
import { ReactNode, HTMLAttributes, Key } from 'react' | ||
import { AriaSelectProps } from '@react-types/select' | ||
@@ -7,5 +7,13 @@ import { Node } from '@react-types/shared' | ||
export type ItemValueProps = { | ||
type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & | ||
{ | ||
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>> | ||
}[Keys] | ||
type RequiredKeys = { | ||
key: Key | ||
id: Key | ||
[key: string | number]: any | ||
} | ||
export type ItemValueProps = RequireAtLeastOne<RequiredKeys, 'key' | 'id'> | ||
export interface MultiSelectProps extends Omit<AriaMultiSelectProps<ItemValueProps>, 'children'> { | ||
@@ -12,0 +20,0 @@ children?: ReactNode |
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
916138
21123