etudes 13.0.0 → 14.0.0
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/build/components/Accordion.d.ts +8 -0
- package/build/components/Collection.d.ts +12 -1
- package/build/components/Counter.d.ts +17 -0
- package/build/components/Dropdown.d.ts +11 -10
- package/build/etudes.js +3875 -3778
- package/build/etudes.umd.cjs +9 -9
- package/build/hooks/{useDragValue.d.ts → useInertiaDragValue.d.ts} +3 -3
- package/build/hooks/useLatest.d.ts +9 -0
- package/build/hooks/usePrevious.d.ts +1 -16
- package/build/hooks/useSizeObserver.d.ts +3 -3
- package/build/hooks/useVideoMetadataLoader.d.ts +2 -11
- package/build/hooks/useVideoSize.d.ts +2 -6
- package/build/index.d.ts +2 -1
- package/build/providers/ColorSchemeProvider.d.ts +19 -3
- package/package.json +1 -1
|
@@ -204,6 +204,7 @@ export type AccordionProps<I, S extends AccordionSection<I> = AccordionSection<I
|
|
|
204
204
|
* @exports AccordionHeader Component for each section header.
|
|
205
205
|
* @exports AccordionExpandIcon Component for the expand icon of each section.
|
|
206
206
|
* @exports AccordionCollapseIcon Component for the collapse icon of each
|
|
207
|
+
* @exports AccordionItem Component for each item in each section.
|
|
207
208
|
*/
|
|
208
209
|
export declare const Accordion: <I, S extends AccordionSection<I> = AccordionSection<I>>(props: Readonly<AccordionProps<I, S> & {
|
|
209
210
|
ref?: Ref<HTMLDivElement>;
|
|
@@ -229,3 +230,10 @@ export declare const AccordionCollapseIcon: {
|
|
|
229
230
|
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
230
231
|
displayName: string;
|
|
231
232
|
};
|
|
233
|
+
/**
|
|
234
|
+
* Component for each item of each section of an {@link Accordion}.
|
|
235
|
+
*/
|
|
236
|
+
export declare const AccordionItem: {
|
|
237
|
+
({ children, selectionMode, onActivateAt, ...props }: HTMLAttributes<HTMLDivElement | HTMLButtonElement> & Pick<CollectionProps<any>, "selectionMode" | "onActivateAt">): import("react/jsx-runtime").JSX.Element;
|
|
238
|
+
displayName: string;
|
|
239
|
+
};
|
|
@@ -157,7 +157,9 @@ export type CollectionProps<T> = HTMLAttributes<HTMLDivElement> & {
|
|
|
157
157
|
*/
|
|
158
158
|
onSelectionChange?: (selection: CollectionSelection) => void;
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
160
|
+
* Custom component type for generating items in this collection. If this is
|
|
161
|
+
* provided, the {@link CollectionItem} provided as part of the children will
|
|
162
|
+
* be ignored.
|
|
161
163
|
*/
|
|
162
164
|
ItemComponent?: ComponentType<CollectionItemProps<T>>;
|
|
163
165
|
};
|
|
@@ -165,7 +167,16 @@ export type CollectionProps<T> = HTMLAttributes<HTMLDivElement> & {
|
|
|
165
167
|
* A collection of selectable items with generic data. Items are generated based
|
|
166
168
|
* on the provided `ItemComponent`. This component supports different layouts in
|
|
167
169
|
* both horizontal and vertical orientations.
|
|
170
|
+
*
|
|
171
|
+
* @exports CollectionItem Component for each item in the collection.
|
|
168
172
|
*/
|
|
169
173
|
export declare const Collection: <T>(props: Readonly<CollectionProps<T> & {
|
|
170
174
|
ref?: Ref<HTMLDivElement>;
|
|
171
175
|
}>) => ReactElement;
|
|
176
|
+
/**
|
|
177
|
+
* Component for each item in a {@link Collection}.
|
|
178
|
+
*/
|
|
179
|
+
export declare const CollectionItem: {
|
|
180
|
+
({ children, selectionMode, onActivateAt, ...props }: HTMLAttributes<HTMLDivElement | HTMLButtonElement> & Pick<CollectionProps<any>, "selectionMode" | "onActivateAt">): import("react/jsx-runtime").JSX.Element;
|
|
181
|
+
displayName: string;
|
|
182
|
+
};
|
|
@@ -4,10 +4,27 @@ import { TextFieldProps } from './TextField.js';
|
|
|
4
4
|
* Type describing the props of {@link Counter}.
|
|
5
5
|
*/
|
|
6
6
|
export type CounterProps = Omit<HTMLAttributes<HTMLElement>, 'onChange'> & {
|
|
7
|
+
/**
|
|
8
|
+
* The minimum quantity that can be set.
|
|
9
|
+
*/
|
|
7
10
|
min?: number;
|
|
11
|
+
/**
|
|
12
|
+
* The maximum quantity that can be set.
|
|
13
|
+
*/
|
|
8
14
|
max?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The quantity.
|
|
17
|
+
*/
|
|
9
18
|
quantity?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Specifies if the quantity can be modified via user text input.
|
|
21
|
+
*/
|
|
10
22
|
allowsInput?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Handler invoked when the quantity changes.
|
|
25
|
+
*
|
|
26
|
+
* @param quantity The new quantity.
|
|
27
|
+
*/
|
|
11
28
|
onChange?: (quantity: number) => void;
|
|
12
29
|
};
|
|
13
30
|
/**
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { ComponentType, HTMLAttributes, ReactElement, Ref } from 'react';
|
|
2
2
|
import { CollectionItemProps, CollectionOrientation, CollectionProps, CollectionSelection } from './Collection.js';
|
|
3
|
-
/**
|
|
4
|
-
* Base extendable type describing the data provided to each item in
|
|
5
|
-
* {@link Dropdown}.
|
|
6
|
-
*/
|
|
7
|
-
export type DropdownItemData = {
|
|
8
|
-
label?: string;
|
|
9
|
-
};
|
|
10
3
|
/**
|
|
11
4
|
* Type describing the orientation of {@link Dropdown}.
|
|
12
5
|
*/
|
|
@@ -32,11 +25,11 @@ export type DropdownToggleProps = HTMLAttributes<HTMLButtonElement> & {
|
|
|
32
25
|
/**
|
|
33
26
|
* Type describing the props of `ItemComponent` provided to {@link Dropdown}.
|
|
34
27
|
*/
|
|
35
|
-
export type DropdownItemProps<T
|
|
28
|
+
export type DropdownItemProps<T> = CollectionItemProps<T>;
|
|
36
29
|
/**
|
|
37
30
|
* Type describing the props of {@link Dropdown}.
|
|
38
31
|
*/
|
|
39
|
-
export type DropdownProps<T
|
|
32
|
+
export type DropdownProps<T> = HTMLAttributes<HTMLDivElement> & CollectionProps<T> & {
|
|
40
33
|
/**
|
|
41
34
|
* Specifies if the internal collection collapses when an item is selected.
|
|
42
35
|
* This only works if `selectionMode` is `single`.
|
|
@@ -97,8 +90,9 @@ export type DropdownProps<T extends DropdownItemData = DropdownItemData> = HTMLA
|
|
|
97
90
|
* @exports DropdownToggle Component for the toggle button.
|
|
98
91
|
* @exports DropdownExpandIcon Component for the expand icon.
|
|
99
92
|
* @exports DropdownCollapseIcon Component for the collapse icon.
|
|
93
|
+
* @exports DropdownItem Component for each item.
|
|
100
94
|
*/
|
|
101
|
-
export declare const Dropdown: <T
|
|
95
|
+
export declare const Dropdown: <T>(props: Readonly<DropdownProps<T> & {
|
|
102
96
|
ref?: Ref<HTMLDivElement>;
|
|
103
97
|
}>) => ReactElement;
|
|
104
98
|
/**
|
|
@@ -122,3 +116,10 @@ export declare const DropdownCollapseIcon: {
|
|
|
122
116
|
({ children, style, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
123
117
|
displayName: string;
|
|
124
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* Component for each item in a {@link Dropdown}.
|
|
121
|
+
*/
|
|
122
|
+
export declare const DropdownItem: {
|
|
123
|
+
({ children, selectionMode, onActivateAt, ...props }: HTMLAttributes<HTMLDivElement | HTMLButtonElement> & Pick<CollectionProps<any>, "selectionMode" | "onActivateAt">): import("react/jsx-runtime").JSX.Element;
|
|
124
|
+
displayName: string;
|
|
125
|
+
};
|