react-widgets
Advanced tools
Comparing version
@@ -5,4 +5,4 @@ import React from 'react'; | ||
import { DataItem, WidgetHandle } from './types'; | ||
declare type ComboboxHandle = WidgetHandle; | ||
interface ComboboxProps<TDataItem = DataItem> extends WidgetHTMLProps, WidgetProps, PopupWidgetProps, Filterable<TDataItem>, BaseListboxInputProps<TDataItem, string | TDataItem> { | ||
export declare type ComboboxHandle = WidgetHandle; | ||
export interface ComboboxProps<TDataItem = DataItem> extends WidgetHTMLProps, WidgetProps, PopupWidgetProps, Filterable<TDataItem>, BaseListboxInputProps<TDataItem, string | TDataItem> { | ||
name?: string; | ||
@@ -9,0 +9,0 @@ autoSelectMatches?: boolean; |
@@ -5,4 +5,4 @@ import React from 'react'; | ||
import { DataItem, WidgetHandle } from './types'; | ||
declare type DropdownHandle = WidgetHandle; | ||
interface DropdownProps<TDataItem> extends WidgetProps, WidgetHTMLProps, PopupWidgetProps, Searchable, Filterable<TDataItem>, BaseListboxInputProps<TDataItem> { | ||
export declare type DropdownHandle = WidgetHandle; | ||
export interface DropdownProps<TDataItem> extends WidgetProps, WidgetHTMLProps, PopupWidgetProps, Searchable, Filterable<TDataItem>, BaseListboxInputProps<TDataItem> { | ||
name?: string; | ||
@@ -9,0 +9,0 @@ autoFocus?: boolean; |
@@ -13,3 +13,4 @@ import Calendar from './Calendar'; | ||
import TimeInput from './TimeInput'; | ||
export * from './types'; | ||
export { DropdownList, Combobox, Calendar, DatePicker, TimeInput, DateTimePicker, NumberPicker, Multiselect, Listbox, SlideTransitionGroup, SlideDownTransition, Localization, DateFormats, DateLocalizer, FormatterOverrides, Localizer, NumberLocalizer, RequiredDateMethods, }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,2 +6,22 @@ "use strict"; | ||
}); | ||
var _exportNames = { | ||
Calendar: true, | ||
Combobox: true, | ||
DatePicker: true, | ||
DateTimePicker: true, | ||
DropdownList: true, | ||
Listbox: true, | ||
Localization: true, | ||
DateFormats: true, | ||
DateLocalizer: true, | ||
FormatterOverrides: true, | ||
Localizer: true, | ||
NumberLocalizer: true, | ||
RequiredDateMethods: true, | ||
Multiselect: true, | ||
NumberPicker: true, | ||
SlideDownTransition: true, | ||
SlideTransitionGroup: true, | ||
TimeInput: true | ||
}; | ||
Object.defineProperty(exports, "Calendar", { | ||
@@ -140,2 +160,15 @@ enumerable: true, | ||
var _types = require("./types"); | ||
Object.keys(_types).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function () { | ||
return _types[key]; | ||
} | ||
}); | ||
}); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } | ||
@@ -142,0 +175,0 @@ |
@@ -5,4 +5,4 @@ import React from 'react'; | ||
import { DataItem, Value, WidgetHandle } from './types'; | ||
declare type MultiselectHandle = WidgetHandle; | ||
declare type ChangeHandler<TDataItem> = (dataItem: TDataItem[], metadata: { | ||
export declare type MultiselectHandle = WidgetHandle; | ||
export declare type ChangeHandler<TDataItem> = (dataItem: TDataItem[], metadata: { | ||
action: 'insert' | 'remove'; | ||
@@ -14,3 +14,3 @@ dataItem: TDataItem; | ||
}) => void; | ||
interface MultiselectProps<TDataItem = DataItem> extends WidgetHTMLProps, WidgetProps, PopupWidgetProps, Filterable<TDataItem>, Searchable, Omit<BaseListboxInputProps<TDataItem, unknown[]>, 'onChange'> { | ||
export interface MultiselectProps<TDataItem = DataItem> extends WidgetHTMLProps, WidgetProps, PopupWidgetProps, Filterable<TDataItem>, Searchable, Omit<BaseListboxInputProps<TDataItem, unknown[]>, 'onChange'> { | ||
onChange?: ChangeHandler<TDataItem>; | ||
@@ -17,0 +17,0 @@ onCreate?: (searchTerm: string) => void; |
@@ -1,22 +0,13 @@ | ||
type Overwrapped<T, U> = Pick<T, Extract<keyof T, keyof U>> | ||
export type DataItem = unknown | ||
export type Value = unknown | ||
export type RenderProp<TArg> = (arg: TArg) => React.ReactNode | ||
/// <reference types="react" /> | ||
export declare type DataItem = unknown; | ||
export declare type Value = unknown; | ||
export declare type RenderProp<TArg> = (arg: TArg) => React.ReactNode; | ||
export interface WidgetHandle { | ||
focus(): void | ||
focus(): void; | ||
} | ||
export type ElementProps<TProps, TElement> = Omit< | ||
WidgetHTMLAttributes, | ||
keyof TProps | ||
> & | ||
TProps | ||
export type SearchMetadata = { | ||
action: 'clear' | 'input' | ||
lastSearchTerm?: string | ||
originalEvent?: React.SyntheticEvent | ||
} | ||
export declare type SearchMetadata = { | ||
action: 'clear' | 'input'; | ||
lastSearchTerm?: string; | ||
originalEvent?: React.SyntheticEvent; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "react-widgets", | ||
"version": "5.0.0-beta.2", | ||
"version": "5.0.0-beta.3", | ||
"description": "An à la carte set of polished, extensible, and accessible inputs built for React", | ||
@@ -101,3 +101,3 @@ "main": "lib/index.js", | ||
"readme": "ERROR: No README data found!", | ||
"_id": "react-widgets@5.0.0-beta.0" | ||
"_id": "react-widgets@5.0.0-beta.2" | ||
} |
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
406116
0.31%170
1.19%7322
0.37%