etudes 12.0.0 → 13.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 +13 -0
- package/build/components/Burger.d.ts +19 -0
- package/build/components/BurgerButton.d.ts +17 -0
- package/build/components/Button.d.ts +8 -0
- package/build/components/Carousel.d.ts +16 -0
- package/build/components/Counter.d.ts +20 -0
- package/build/components/CoverImage.d.ts +18 -2
- package/build/components/CoverVideo.d.ts +18 -2
- package/build/components/Dial.d.ts +11 -2
- package/build/components/Dropdown.d.ts +15 -2
- package/build/components/FlatSVG.d.ts +3 -0
- package/build/components/Image.d.ts +7 -0
- package/build/components/MasonryGrid.d.ts +20 -15
- package/build/components/OptionButton.d.ts +23 -2
- package/build/components/Panorama.d.ts +5 -1
- package/build/components/PanoramaSlider.d.ts +30 -9
- package/build/components/RangeSlider.d.ts +92 -11
- package/build/components/SelectableButton.d.ts +29 -0
- package/build/components/Slider.d.ts +32 -5
- package/build/components/StepSlider.d.ts +46 -11
- package/build/components/SwipeRegion.d.ts +25 -4
- package/build/components/TextField.d.ts +43 -0
- package/build/components/Video.d.ts +62 -0
- package/build/components/WithTooltip.d.ts +12 -1
- package/build/etudes.js +3772 -3617
- package/build/etudes.umd.cjs +9 -9
- package/build/hooks/useClickOutside.d.ts +8 -0
- package/build/hooks/useDrag.d.ts +6 -2
- package/build/hooks/useDragValue.d.ts +24 -3
- package/build/hooks/useDropzone.d.ts +36 -4
- package/build/hooks/useImageLoader.d.ts +7 -3
- package/build/hooks/useImageSize.d.ts +11 -6
- package/build/hooks/useInertiaDrag.d.ts +6 -2
- package/build/hooks/useInterval.d.ts +27 -7
- package/build/hooks/useMounted.d.ts +5 -0
- package/build/hooks/usePosition.d.ts +16 -4
- package/build/hooks/usePrevious.d.ts +6 -4
- package/build/hooks/useRect.d.ts +3 -1
- package/build/hooks/{useSearchParamState.d.ts → useSearchState.d.ts} +10 -3
- package/build/hooks/useSize.d.ts +3 -1
- package/build/hooks/useSizeObserver.d.ts +7 -3
- package/build/hooks/useTimeout.d.ts +32 -9
- package/build/hooks/useVideoMetadataLoader.d.ts +7 -3
- package/build/hooks/useVideoSize.d.ts +11 -5
- package/build/index.d.ts +3 -1
- package/build/operators/Conditional.d.ts +10 -0
- package/build/operators/Each.d.ts +16 -0
- package/build/operators/ExtractChild.d.ts +3 -0
- package/build/operators/ExtractChildren.d.ts +3 -0
- package/build/operators/Repeat.d.ts +15 -2
- package/build/operators/Switch.d.ts +55 -0
- package/build/providers/ColorSchemeProvider.d.ts +42 -0
- package/build/providers/ScrollPositionProvider.d.ts +39 -4
- package/build/utils/asClassNameDict.d.ts +8 -0
- package/build/utils/asComponentDict.d.ts +9 -0
- package/build/utils/asStyleDict.d.ts +8 -0
- package/build/utils/createKey.d.ts +8 -0
- package/build/utils/createKeyDeep.d.ts +8 -0
- package/build/utils/styles.d.ts +8 -0
- package/package.json +4 -4
|
@@ -200,18 +200,31 @@ export type AccordionProps<I, S extends AccordionSection<I> = AccordionSection<I
|
|
|
200
200
|
* A collection of selectable items laid out in sections in an accordion. Items
|
|
201
201
|
* are generated based on the provided `ItemComponent` while each section header
|
|
202
202
|
* is optionally provided by `HeaderComponent` or generated automatically.
|
|
203
|
+
*
|
|
204
|
+
* @exports AccordionHeader Component for each section header.
|
|
205
|
+
* @exports AccordionExpandIcon Component for the expand icon of each section.
|
|
206
|
+
* @exports AccordionCollapseIcon Component for the collapse icon of each
|
|
203
207
|
*/
|
|
204
208
|
export declare const Accordion: <I, S extends AccordionSection<I> = AccordionSection<I>>(props: Readonly<AccordionProps<I, S> & {
|
|
205
209
|
ref?: Ref<HTMLDivElement>;
|
|
206
210
|
}>) => ReactElement;
|
|
211
|
+
/**
|
|
212
|
+
* Component for each section header of an {@link Accordion}.
|
|
213
|
+
*/
|
|
207
214
|
export declare const AccordionHeader: {
|
|
208
215
|
({ children, ...props }: HTMLAttributes<HTMLButtonElement> & DropdownToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
209
216
|
displayName: string;
|
|
210
217
|
};
|
|
218
|
+
/**
|
|
219
|
+
* Component for the expand icon of each section of an {@link Accordion}.
|
|
220
|
+
*/
|
|
211
221
|
export declare const AccordionExpandIcon: {
|
|
212
222
|
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
213
223
|
displayName: string;
|
|
214
224
|
};
|
|
225
|
+
/**
|
|
226
|
+
* Component for the collapse icon of each section of an {@link Accordion}.
|
|
227
|
+
*/
|
|
215
228
|
export declare const AccordionCollapseIcon: {
|
|
216
229
|
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
217
230
|
displayName: string;
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Type describing the props of {@link Burger}.
|
|
4
|
+
*/
|
|
2
5
|
export type BurgerProps = HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
/**
|
|
7
|
+
* Specifies if the burger is in its activated state.
|
|
8
|
+
*/
|
|
3
9
|
isActive?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies if the bars are horizontally split to allow for an alternate
|
|
12
|
+
* transition.
|
|
13
|
+
*/
|
|
4
14
|
isSplit?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Specifies if the tail of the bottom bar is hidden.
|
|
17
|
+
*/
|
|
5
18
|
isTailHidden?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the number of bars to display.
|
|
21
|
+
*/
|
|
6
22
|
numberOfBars?: 2 | 3;
|
|
7
23
|
};
|
|
8
24
|
/**
|
|
@@ -11,6 +27,9 @@ export type BurgerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
11
27
|
* @exports BurgerBar Component for each bar in the burger.
|
|
12
28
|
*/
|
|
13
29
|
export declare const Burger: import('react').ForwardRefExoticComponent<Readonly<BurgerProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
30
|
+
/**
|
|
31
|
+
* Component for each bar in a {@link Burger}.
|
|
32
|
+
*/
|
|
14
33
|
export declare const BurgerBar: {
|
|
15
34
|
({ ...props }: HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
16
35
|
displayName: string;
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { BurgerProps } from './Burger.js';
|
|
3
|
+
/**
|
|
4
|
+
* Type describing the props of {@link BurgerButton}.
|
|
5
|
+
*/
|
|
3
6
|
export type BurgerButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement> & BurgerProps, 'onToggle'> & {
|
|
7
|
+
/**
|
|
8
|
+
* Handler invoked when the button is activated.
|
|
9
|
+
*/
|
|
4
10
|
onActivate?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Handler invoked when the button is deactivated.
|
|
13
|
+
*/
|
|
5
14
|
onDeactivate?: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Handler invoked when the button's active state is toggled.
|
|
17
|
+
*
|
|
18
|
+
* @param isActive The new active state of the button.
|
|
19
|
+
*/
|
|
6
20
|
onToggle?: (isActive: boolean) => void;
|
|
7
21
|
};
|
|
8
22
|
/**
|
|
@@ -12,6 +26,9 @@ export type BurgerButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement> & B
|
|
|
12
26
|
* @exports BurgerButtonBar Component for each bar in the burger button.
|
|
13
27
|
*/
|
|
14
28
|
export declare const BurgerButton: import('react').ForwardRefExoticComponent<Readonly<BurgerButtonProps> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
/**
|
|
30
|
+
* Component for each bar in a {@link BurgerButton}.
|
|
31
|
+
*/
|
|
15
32
|
export declare const BurgerButtonBar: {
|
|
16
33
|
({ ...props }: import('react').HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
34
|
displayName: string;
|
|
@@ -23,7 +23,15 @@ type AnchorVariantProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-di
|
|
|
23
23
|
label?: string;
|
|
24
24
|
opensInNewTab?: boolean;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Type describing the props of {@link Button}.
|
|
28
|
+
*/
|
|
26
29
|
export type ButtonProps = AnchorVariantProps | LinkVariantProps | NavLinkVariantProps | ButtonVariantProps;
|
|
30
|
+
/**
|
|
31
|
+
* A button component that can be used as a {@link Link}, {@link NavLink},
|
|
32
|
+
* {@link HTMLAnchorElement}, or {@link HTMLButtonElement} depending on the
|
|
33
|
+
* structure of its props.
|
|
34
|
+
*/
|
|
27
35
|
export declare function Button(props: Readonly<ButtonProps>): import("react/jsx-runtime").JSX.Element;
|
|
28
36
|
export declare namespace Button {
|
|
29
37
|
var displayName: string;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ComponentType, ForwardedRef, HTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Type describing the orientation of {@link Carousel}.
|
|
4
|
+
*/
|
|
2
5
|
export type CarouselOrientation = 'horizontal' | 'vertical';
|
|
6
|
+
/**
|
|
7
|
+
* Type describing the props of {@link Carousel}.
|
|
8
|
+
*/
|
|
3
9
|
export type CarouselProps<I> = Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'onClick' | 'onPointerCancel' | 'onPointerDown' | 'onPointerLeave' | 'onPointerUp'> & {
|
|
4
10
|
/**
|
|
5
11
|
* Current item index.
|
|
@@ -48,6 +54,16 @@ export type CarouselProps<I> = Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'on
|
|
|
48
54
|
*/
|
|
49
55
|
ItemComponent: ComponentType<I>;
|
|
50
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* A carousel component that displays a list of items in a scrollable view.
|
|
59
|
+
*
|
|
60
|
+
* Notable features:
|
|
61
|
+
* - Supports horizontal and vertical orientations.
|
|
62
|
+
* - Supports auto-advancing to the next item after a specified interval.
|
|
63
|
+
* - Supports auto-snapping to each item when scrolling.
|
|
64
|
+
* - Supports tracking item exposure (0-1) to determine how much of the
|
|
65
|
+
* current item is visible in the viewport.
|
|
66
|
+
*/
|
|
51
67
|
export declare const Carousel: <I extends HTMLAttributes<HTMLElement>>(props: Readonly<CarouselProps<I> & {
|
|
52
68
|
ref?: ForwardedRef<HTMLDivElement>;
|
|
53
69
|
}>) => ReactElement;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { TextFieldProps } from './TextField.js';
|
|
3
|
+
/**
|
|
4
|
+
* Type describing the props of {@link Counter}.
|
|
5
|
+
*/
|
|
3
6
|
export type CounterProps = Omit<HTMLAttributes<HTMLElement>, 'onChange'> & {
|
|
4
7
|
min?: number;
|
|
5
8
|
max?: number;
|
|
@@ -7,15 +10,32 @@ export type CounterProps = Omit<HTMLAttributes<HTMLElement>, 'onChange'> & {
|
|
|
7
10
|
allowsInput?: boolean;
|
|
8
11
|
onChange?: (quantity: number) => void;
|
|
9
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* A component that allows the user to increment or decrement a quantity
|
|
15
|
+
* using buttons or by typing in a text field.
|
|
16
|
+
*
|
|
17
|
+
* @exports CounterTextField Component for the text field.
|
|
18
|
+
* @exports CounterAddButton Component for the add button.
|
|
19
|
+
* @exports CounterSubtractButton Component for the subtract button.
|
|
20
|
+
*/
|
|
10
21
|
export declare const Counter: import('react').ForwardRefExoticComponent<Readonly<CounterProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
22
|
+
/**
|
|
23
|
+
* Component for the text field in a {@link Counter}.
|
|
24
|
+
*/
|
|
11
25
|
export declare const CounterTextField: {
|
|
12
26
|
({ ...props }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
13
27
|
displayName: string;
|
|
14
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Component for the add button in a {@link Counter}.
|
|
31
|
+
*/
|
|
15
32
|
export declare const CounterAddButton: {
|
|
16
33
|
({ children, ...props }: HTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
34
|
displayName: string;
|
|
18
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Component for the subtract button in a {@link Counter}.
|
|
38
|
+
*/
|
|
19
39
|
export declare const CounterSubtractButton: {
|
|
20
40
|
({ children, ...props }: HTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
|
|
21
41
|
displayName: string;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { ImageProps } from './Image.js';
|
|
3
|
+
/**
|
|
4
|
+
* Type describing the props of {@link CoverImage}.
|
|
5
|
+
*/
|
|
3
6
|
export type CoverImageProps = Omit<HTMLAttributes<HTMLDivElement>, 'onLoadStart'> & Pick<ImageProps, 'alt' | 'loadingMode' | 'sizes' | 'src' | 'srcSet' | 'onLoadStart' | 'onLoadComplete' | 'onLoadError'> & {
|
|
4
7
|
/**
|
|
5
8
|
* The known aspect ratio of the image, expressed by width / height. If
|
|
@@ -7,12 +10,25 @@ export type CoverImageProps = Omit<HTMLAttributes<HTMLDivElement>, 'onLoadStart'
|
|
|
7
10
|
*/
|
|
8
11
|
aspectRatio?: number;
|
|
9
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* A component that displays an image with a fixed aspect ratio. The image is
|
|
15
|
+
* centered and cropped to fit the container (a.k.a. viewport).
|
|
16
|
+
*
|
|
17
|
+
* @exports CoverImageContent Component for optional content inside the image.
|
|
18
|
+
* @exports CoverImageViewport Component for the viewport.
|
|
19
|
+
*/
|
|
10
20
|
export declare const CoverImage: import('react').ForwardRefExoticComponent<Readonly<CoverImageProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Component for optional content inside a {@link CoverImage}.
|
|
23
|
+
*/
|
|
24
|
+
export declare const CoverImageContent: {
|
|
12
25
|
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
13
26
|
displayName: string;
|
|
14
27
|
};
|
|
15
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Component for the viewport of a {@link CoverImage}.
|
|
30
|
+
*/
|
|
31
|
+
export declare const CoverImageViewport: {
|
|
16
32
|
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
33
|
displayName: string;
|
|
18
34
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { VideoProps } from './Video.js';
|
|
3
|
+
/**
|
|
4
|
+
* Type describing the props of {@link CoverVideo}.
|
|
5
|
+
*/
|
|
3
6
|
export type CoverVideoProps = Omit<HTMLAttributes<HTMLDivElement>, 'onCanPlay' | 'onPause' | 'onPlay'> & Pick<VideoProps, 'autoLoop' | 'autoPlay' | 'hasControls' | 'isMuted' | 'playsInline' | 'posterSrc' | 'src' | 'onPause' | 'onPlay' | 'onCanPlay' | 'onEnd' | 'onFullscreenChange' | 'onLoadMetadata' | 'onLoadMetadataComplete' | 'onLoadMetadataError' | 'onSizeChange'> & {
|
|
4
7
|
/**
|
|
5
8
|
* The known aspect ratio of the video, expressed by width / height. If
|
|
@@ -7,12 +10,25 @@ export type CoverVideoProps = Omit<HTMLAttributes<HTMLDivElement>, 'onCanPlay' |
|
|
|
7
10
|
*/
|
|
8
11
|
aspectRatio?: number;
|
|
9
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* A component that displays a video with a fixed aspect ratio. The video is
|
|
15
|
+
* centered and cropped to fit the container (a.k.a. viewport).
|
|
16
|
+
*
|
|
17
|
+
* @exports CoverVideoContent Component for optional content inside the video.
|
|
18
|
+
* @exports CoverVideoViewport Component for the viewport.
|
|
19
|
+
*/
|
|
10
20
|
export declare const CoverVideo: import('react').ForwardRefExoticComponent<Readonly<CoverVideoProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Component for optional content inside a {@link CoverVideo}.
|
|
23
|
+
*/
|
|
24
|
+
export declare const CoverVideoContent: {
|
|
12
25
|
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
13
26
|
displayName: string;
|
|
14
27
|
};
|
|
15
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Component for the viewport of a {@link CoverVideo}.
|
|
30
|
+
*/
|
|
31
|
+
export declare const CoverVideoViewport: {
|
|
16
32
|
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
17
33
|
displayName: string;
|
|
18
34
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, SVGAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Type describing the props of {@link Dial}.
|
|
4
|
+
*/
|
|
2
5
|
export type DialProps = HTMLAttributes<HTMLDivElement> & {
|
|
3
6
|
/**
|
|
4
7
|
* Current angle reading of the compass, between 0.0 - 360.0 degrees,
|
|
@@ -36,14 +39,20 @@ export type DialProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
36
39
|
/**
|
|
37
40
|
* A circular dial with a knob and a track.
|
|
38
41
|
*
|
|
39
|
-
* @exports DialKnob
|
|
40
|
-
* @exports DialTrack
|
|
42
|
+
* @exports DialKnob Component for the knob.
|
|
43
|
+
* @exports DialTrack Component for the track.
|
|
41
44
|
*/
|
|
42
45
|
export declare const Dial: import('react').ForwardRefExoticComponent<Readonly<DialProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
46
|
+
/**
|
|
47
|
+
* Component for the track of a {@link Dial}.
|
|
48
|
+
*/
|
|
43
49
|
export declare const DialTrack: {
|
|
44
50
|
({ ...props }: SVGAttributes<SVGCircleElement>): import("react/jsx-runtime").JSX.Element;
|
|
45
51
|
displayName: string;
|
|
46
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* Component for the knob of a {@link Dial}.
|
|
55
|
+
*/
|
|
47
56
|
export declare const DialKnob: {
|
|
48
57
|
({ ...props }: SVGAttributes<SVGPathElement>): import("react/jsx-runtime").JSX.Element;
|
|
49
58
|
displayName: string;
|
|
@@ -93,19 +93,32 @@ export type DropdownProps<T extends DropdownItemData = DropdownItemData> = HTMLA
|
|
|
93
93
|
* A dropdown component that is invertible (i.e. can "dropup" instead) and
|
|
94
94
|
* supports both horizontal and vertical orientations. Provide `items` and
|
|
95
95
|
* `ItemComponent` props to populate.
|
|
96
|
+
*
|
|
97
|
+
* @exports DropdownToggle Component for the toggle button.
|
|
98
|
+
* @exports DropdownExpandIcon Component for the expand icon.
|
|
99
|
+
* @exports DropdownCollapseIcon Component for the collapse icon.
|
|
96
100
|
*/
|
|
97
101
|
export declare const Dropdown: <T extends DropdownItemData = DropdownItemData>(props: Readonly<DropdownProps<T> & {
|
|
98
102
|
ref?: Ref<HTMLDivElement>;
|
|
99
103
|
}>) => ReactElement;
|
|
104
|
+
/**
|
|
105
|
+
* Component for the toggle button of a {@link Dropdown}.
|
|
106
|
+
*/
|
|
100
107
|
export declare const DropdownToggle: {
|
|
101
108
|
({ children, ...props }: HTMLAttributes<HTMLButtonElement> & DropdownToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
102
109
|
displayName: string;
|
|
103
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Component for the expand icon of a {@link Dropdown}.
|
|
113
|
+
*/
|
|
104
114
|
export declare const DropdownExpandIcon: {
|
|
105
|
-
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
115
|
+
({ children, style, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
106
116
|
displayName: string;
|
|
107
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* Component for the collapse icon of a {@link Dropdown}.
|
|
120
|
+
*/
|
|
108
121
|
export declare const DropdownCollapseIcon: {
|
|
109
|
-
({ children, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
122
|
+
({ children, style, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
110
123
|
displayName: string;
|
|
111
124
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { Size } from 'spase';
|
|
3
|
+
/**
|
|
4
|
+
* Type describing the props of {@link Image}.
|
|
5
|
+
*/
|
|
3
6
|
export type ImageProps = Omit<HTMLAttributes<HTMLImageElement>, 'alt' | 'loading' | 'sizes' | 'src' | 'srcSet' | 'onLoadStart'> & {
|
|
4
7
|
/**
|
|
5
8
|
* Optional alt text.
|
|
@@ -71,4 +74,8 @@ export type ImageProps = Omit<HTMLAttributes<HTMLImageElement>, 'alt' | 'loading
|
|
|
71
74
|
*/
|
|
72
75
|
onSizeChange?: (size?: Size) => void;
|
|
73
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* A component that renders an image with support for lazy loading, `srcset`,
|
|
79
|
+
* and `sizes` attributes.
|
|
80
|
+
*/
|
|
74
81
|
export declare const Image: import('react').ForwardRefExoticComponent<Readonly<ImageProps> & import('react').RefAttributes<HTMLImageElement>>;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Type describing the orientation of {@link MasonryGrid}.
|
|
4
|
+
*/
|
|
2
5
|
export type MasonryGridOrientation = 'horizontal' | 'vertical';
|
|
6
|
+
/**
|
|
7
|
+
* Type describing the props of {@link MasonryGrid}.
|
|
8
|
+
*/
|
|
3
9
|
export type MasonryGridProps = Omit<HTMLAttributes<HTMLDivElement>, 'role'> & {
|
|
4
10
|
alignSections?: boolean;
|
|
5
11
|
horizontalSpacing?: number;
|
|
@@ -9,20 +15,19 @@ export type MasonryGridProps = Omit<HTMLAttributes<HTMLDivElement>, 'role'> & {
|
|
|
9
15
|
verticalSpacing?: number;
|
|
10
16
|
};
|
|
11
17
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* to the *number of columns*.
|
|
18
|
+
* A component that arranges all of its immediate children in a masonry grid.
|
|
19
|
+
* Refrain from assigning CSS styles to it via `className` or `style` property,
|
|
20
|
+
* though they are still handled if absolutely necessary. Customize the grid via
|
|
21
|
+
* its supported properties. The grid can be in either vertical or horizontal
|
|
22
|
+
* orientation. The length of every child element *parallel to the direction of
|
|
23
|
+
* the orientation* is automatically set according to the number of sections
|
|
24
|
+
* specified for the grid. This means that in an horizontally oriented grid, the
|
|
25
|
+
* *width* of each child element is automatically set, whereas in a vertically
|
|
26
|
+
* oriented grid the *height* of each child element is automatically set.
|
|
27
|
+
* Additionally, the *number of sections* corresponds to the maximum the number
|
|
28
|
+
* of child elements present in the direction that is parallel to the
|
|
29
|
+
* orientation of the grid. Hence, in a vertically oriented grid, *number of
|
|
30
|
+
* sections* refers to the *number of rows*, whereas in a horizontally oriented
|
|
31
|
+
* grid, *number of sections* refers to the *number of columns*.
|
|
27
32
|
*/
|
|
28
33
|
export declare const MasonryGrid: import('react').ForwardRefExoticComponent<Readonly<MasonryGridProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Type describing the props of {@link OptionButton}.
|
|
4
|
+
*/
|
|
5
|
+
export type OptionButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-disabled' | 'aria-label' | 'disabled' | 'onChange'> & {
|
|
6
|
+
/**
|
|
7
|
+
* The current index of the option.
|
|
8
|
+
*/
|
|
3
9
|
index?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies if the button is disabled.
|
|
12
|
+
*/
|
|
4
13
|
isDisabled?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The list of options to cycle through.
|
|
16
|
+
*/
|
|
5
17
|
options: string[] | {
|
|
6
18
|
label: string;
|
|
7
19
|
value: string;
|
|
8
20
|
}[];
|
|
21
|
+
/**
|
|
22
|
+
* Handler invoked when the button is clicked.
|
|
23
|
+
*
|
|
24
|
+
* @param value The value of the next option.
|
|
25
|
+
* @param index The index of the next option.
|
|
26
|
+
*/
|
|
9
27
|
onChange?: (value: string, index: number) => void;
|
|
10
28
|
};
|
|
11
|
-
|
|
29
|
+
/**
|
|
30
|
+
* A button component that cycles through a list of options when clicked.
|
|
31
|
+
*/
|
|
32
|
+
export declare const OptionButton: import('react').ForwardRefExoticComponent<Readonly<OptionButtonProps> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { Size } from 'spase';
|
|
3
|
+
/**
|
|
4
|
+
* Type describing the props of {@link Panorama}.
|
|
5
|
+
*/
|
|
3
6
|
export type PanoramaProps = Omit<HTMLAttributes<HTMLDivElement>, 'aria-valuenow' | 'role'> & {
|
|
4
7
|
/**
|
|
5
8
|
* The current angle in degrees, 0.0 - 360.0, inclusive. When angle is 0 or
|
|
@@ -71,6 +74,7 @@ export type PanoramaProps = Omit<HTMLAttributes<HTMLDivElement>, 'aria-valuenow'
|
|
|
71
74
|
onImageSizeChange?: (size?: Size) => void;
|
|
72
75
|
};
|
|
73
76
|
/**
|
|
74
|
-
* A component containing a pannable 360° panorama image. The angle supports
|
|
77
|
+
* A component containing a pannable 360° panorama image. The angle supports
|
|
78
|
+
* two-way binding.
|
|
75
79
|
*/
|
|
76
80
|
export declare const Panorama: import('react').ForwardRefExoticComponent<Readonly<PanoramaProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { Size } from 'spase';
|
|
3
3
|
import { PanoramaProps } from './Panorama.js';
|
|
4
|
+
/**
|
|
5
|
+
* Type describing the props of {@link PanoramaSlider}.
|
|
6
|
+
*/
|
|
4
7
|
export type PanoramaSliderProps = PanoramaProps & {
|
|
5
8
|
/**
|
|
6
9
|
* Field-of-view (0.0 - 360.0 degrees, inclusive) that represents the size of
|
|
@@ -25,15 +28,33 @@ export type PanoramaSliderProps = PanoramaProps & {
|
|
|
25
28
|
viewportSize?: Size;
|
|
26
29
|
};
|
|
27
30
|
/**
|
|
28
|
-
* A slider for a {@link Panorama}
|
|
31
|
+
* A slider for a {@link Panorama}.
|
|
29
32
|
*
|
|
30
|
-
* @exports PanoramaSliderIndicator
|
|
31
|
-
* is
|
|
32
|
-
* @exports PanoramaSliderReticle
|
|
33
|
-
* backing {@link Panorama}.
|
|
34
|
-
* @exports PanoramaSliderTrack
|
|
33
|
+
* @exports PanoramaSliderIndicator Component for the active indicator that
|
|
34
|
+
* appears when the slider is dragged.
|
|
35
|
+
* @exports PanoramaSliderReticle Component for the reticle that indicates the
|
|
36
|
+
* FOV of the backing {@link Panorama}.
|
|
37
|
+
* @exports PanoramaSliderTrack Component for the slide track.
|
|
35
38
|
*/
|
|
36
39
|
export declare const PanoramaSlider: import('react').ForwardRefExoticComponent<Readonly<PanoramaSliderProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Component for the active indicator of a {@link PanoramaSlider}.
|
|
42
|
+
*/
|
|
43
|
+
export declare const PanoramaSliderIndicator: {
|
|
44
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Component for the active reticle of a {@link PanoramaSlider}.
|
|
49
|
+
*/
|
|
50
|
+
export declare const PanoramaSliderReticle: {
|
|
51
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Component for the slide track of a {@link PanoramaSlider}.
|
|
56
|
+
*/
|
|
57
|
+
export declare const PanoramaSliderTrack: {
|
|
58
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
@@ -1,22 +1,103 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Type describing the orientation of {@link RangeSlider}.
|
|
4
|
+
*/
|
|
5
|
+
export type RangeSliderOrientation = 'horizontal' | 'vertical';
|
|
6
|
+
/**
|
|
7
|
+
* Type describing the range of values of {@link RangeSlider}.
|
|
8
|
+
*/
|
|
9
|
+
export type RangeSliderRange = [number, number];
|
|
10
|
+
/**
|
|
11
|
+
* Type describing the props of {@link RangeSlider}.
|
|
12
|
+
*/
|
|
13
|
+
export type RangeSliderProps = Omit<HTMLAttributes<HTMLDivElement>, 'aria-valuemax' | 'aria-valuemin' | 'role' | 'onChange'> & {
|
|
14
|
+
/**
|
|
15
|
+
* Number of decimal places to display.
|
|
16
|
+
*/
|
|
5
17
|
decimalPlaces?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Specifies if the knobs are clipped to the track.
|
|
20
|
+
*/
|
|
6
21
|
isClipped?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Height of the knobs in pixels.
|
|
24
|
+
*/
|
|
7
25
|
knobHeight?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Invisible padding around the knobs in pixels, helps expand their hit boxes.
|
|
28
|
+
*/
|
|
8
29
|
knobPadding?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Width of the knobs in pixels.
|
|
32
|
+
*/
|
|
9
33
|
knobWidth?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Maximum value to clamp to.
|
|
36
|
+
*/
|
|
10
37
|
max: number;
|
|
38
|
+
/**
|
|
39
|
+
* Minimum value to clamp to.
|
|
40
|
+
*/
|
|
11
41
|
min: number;
|
|
12
|
-
|
|
13
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Orientation of the slider.
|
|
44
|
+
*/
|
|
45
|
+
orientation?: RangeSliderOrientation;
|
|
46
|
+
/**
|
|
47
|
+
* Range of values.
|
|
48
|
+
*/
|
|
49
|
+
range?: RangeSliderRange;
|
|
50
|
+
/**
|
|
51
|
+
* Number of intervals between the minimum and maximum values to snap to when
|
|
52
|
+
* either knob releases. If set to `-1`, the knobs will not snap to any value.
|
|
53
|
+
*/
|
|
14
54
|
steps?: number;
|
|
15
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Handler invoked when the range of values changes.
|
|
57
|
+
*
|
|
58
|
+
* @param range The current range of values.
|
|
59
|
+
*/
|
|
60
|
+
onChange?: (range: RangeSliderRange) => void;
|
|
16
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* A slider component that allows the user to select a range of values.
|
|
64
|
+
*
|
|
65
|
+
* @exports RangeSliderGutter Component for the gutter.
|
|
66
|
+
* @exports RangeSliderHighlight Component for the highlight.
|
|
67
|
+
* @exports RangeSliderKnob Component for the knob.
|
|
68
|
+
* @exports RangeSliderKnobContainer Component for the container of the knob.
|
|
69
|
+
* @exports RangeSliderLabel Component for the label.
|
|
70
|
+
*/
|
|
17
71
|
export declare const RangeSlider: import('react').ForwardRefExoticComponent<Readonly<RangeSliderProps> & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export declare const
|
|
22
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Component for the gutter of a {@link RangeSlider}.
|
|
74
|
+
*/
|
|
75
|
+
export declare const RangeSliderGutter: {
|
|
76
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
displayName: string;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Component for the label of a {@link RangeSlider}.
|
|
81
|
+
*/
|
|
82
|
+
export declare const RangeSliderLabel: {
|
|
83
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Component for the highlight of a {@link RangeSlider}.
|
|
88
|
+
*/
|
|
89
|
+
export declare const RangeSliderHighlight: {
|
|
90
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
displayName: string;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Component for the knob of a {@link RangeSlider}.
|
|
95
|
+
*/
|
|
96
|
+
export declare const RangeSliderKnob: {
|
|
97
|
+
({ ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
98
|
+
displayName: string;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Component for the container of the knob of a {@link RangeSlider}.
|
|
102
|
+
*/
|
|
103
|
+
export declare const RangeSliderKnobContainer: ({ ...props }: HTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
|