etudes 7.0.1 → 7.0.3

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.
@@ -1,4 +1,4 @@
1
- import { type ComponentType, type HTMLAttributes, type PropsWithChildren, type ReactElement, type Ref } from 'react';
1
+ import { type ComponentType, type HTMLAttributes, type ReactElement, type Ref } from 'react';
2
2
  import { type CollectionItemProps, type CollectionOrientation, type CollectionProps, type CollectionSelectionMode } from './Collection.js';
3
3
  import type { DropdownToggleProps } from './Dropdown.js';
4
4
  /**
@@ -37,7 +37,7 @@ export type AccordionItemProps<T> = CollectionItemProps<T>;
37
37
  * Type describing the props of each `HeaderComponent` provided to
38
38
  * {@link Accordion}.
39
39
  */
40
- export type AccordionHeaderProps<I, S extends AccordionSection<I> = AccordionSection<I>> = HTMLAttributes<HTMLElement> & PropsWithChildren<{
40
+ export type AccordionHeaderProps<I, S extends AccordionSection<I> = AccordionSection<I>> = HTMLAttributes<HTMLElement> & {
41
41
  /**
42
42
  * The index of the corresponding section.
43
43
  */
@@ -57,11 +57,11 @@ export type AccordionHeaderProps<I, S extends AccordionSection<I> = AccordionSec
57
57
  * @param info Optional user-defined info of the custom event.
58
58
  */
59
59
  onCustomEvent?: (name: string, info?: any) => void;
60
- }>;
60
+ };
61
61
  /**
62
62
  * Type describing the props of {@link Accordion}.
63
63
  */
64
- export type AccordionProps<I, S extends AccordionSection<I> = AccordionSection<I>> = HTMLAttributes<HTMLDivElement> & PropsWithChildren<{
64
+ export type AccordionProps<I, S extends AccordionSection<I> = AccordionSection<I>> = HTMLAttributes<HTMLDivElement> & {
65
65
  /**
66
66
  * Specifies if expanded sections should automatically collapse upon expanding
67
67
  * another section.
@@ -195,7 +195,7 @@ export type AccordionProps<I, S extends AccordionSection<I> = AccordionSection<I
195
195
  * Component type for generating items for each section.
196
196
  */
197
197
  ItemComponent?: ComponentType<AccordionItemProps<I>>;
198
- }>;
198
+ };
199
199
  /**
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
@@ -204,6 +204,6 @@ export type AccordionProps<I, S extends AccordionSection<I> = AccordionSection<I
204
204
  export declare const Accordion: <I, S extends AccordionSection<I> = AccordionSection<I>>(props: AccordionProps<I, S> & {
205
205
  ref?: Ref<HTMLDivElement>;
206
206
  }) => ReactElement;
207
- export declare const AccordionHeader: ({ children, ...props }: HTMLAttributes<HTMLButtonElement> & PropsWithChildren<DropdownToggleProps>) => import("react/jsx-runtime").JSX.Element;
208
- export declare const AccordionExpandIcon: ({ children, ...props }: HTMLAttributes<HTMLDivElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
209
- export declare const AccordionCollapseIcon: ({ children, ...props }: HTMLAttributes<HTMLDivElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
207
+ export declare const AccordionHeader: ({ children, ...props }: HTMLAttributes<HTMLButtonElement> & DropdownToggleProps) => import("react/jsx-runtime").JSX.Element;
208
+ export declare const AccordionExpandIcon: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
209
+ export declare const AccordionCollapseIcon: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
2
- export type BurgerButtonProps = HTMLAttributes<HTMLButtonElement> & PropsWithChildren<{
1
+ import { type HTMLAttributes } from 'react';
2
+ export type BurgerButtonProps = HTMLAttributes<HTMLButtonElement> & {
3
3
  isActive?: boolean;
4
4
  isSplit?: boolean;
5
5
  isTailHidden?: boolean;
6
6
  onActivate?: () => void;
7
7
  onDeactivate?: () => void;
8
8
  onToggle?: (isActive: boolean) => void;
9
- }>;
9
+ };
10
10
  /**
11
11
  * Three-striped burger button component that transforms into an "X" when
12
12
  * selected.
@@ -20,7 +20,5 @@ export declare const BurgerButton: import("react").ForwardRefExoticComponent<HTM
20
20
  onActivate?: () => void;
21
21
  onDeactivate?: () => void;
22
22
  onToggle?: (isActive: boolean) => void;
23
- } & {
24
- children?: import("react").ReactNode | undefined;
25
23
  } & import("react").RefAttributes<HTMLButtonElement>>;
26
24
  export declare const BurgerButtonBar: ({ ...props }: HTMLAttributes<HTMLSpanElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
- import type { HTMLAttributes, PropsWithChildren } from 'react';
2
- export type ButtonProps = HTMLAttributes<HTMLElement> & PropsWithChildren<{
1
+ import type { HTMLAttributes } from 'react';
2
+ export type ButtonProps = HTMLAttributes<HTMLElement> & {
3
3
  href?: string;
4
4
  isDisabled?: boolean;
5
5
  label?: string;
6
6
  opensInNewTab?: boolean;
7
7
  to?: string;
8
8
  type?: HTMLButtonElement['type'];
9
- }>;
9
+ };
10
10
  export declare function Button({ children, className, href, isDisabled, label, opensInNewTab, to, type, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
1
+ import { type HTMLAttributes } from 'react';
2
2
  import { type TextFieldProps } from './TextField.js';
3
3
  export declare const Counter: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "onChange"> & {
4
4
  min?: number;
@@ -6,9 +6,7 @@ export declare const Counter: import("react").ForwardRefExoticComponent<Omit<HTM
6
6
  quantity?: number;
7
7
  allowsInput?: boolean;
8
8
  onChange?: (quantity: number) => void;
9
- } & {
10
- children?: import("react").ReactNode | undefined;
11
9
  } & import("react").RefAttributes<HTMLDivElement>>;
12
10
  export declare const CounterTextField: ({ ...props }: TextFieldProps) => import("react/jsx-runtime").JSX.Element;
13
- export declare const CounterAddButton: ({ children, ...props }: HTMLAttributes<HTMLButtonElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
14
- export declare const CounterSubtractButton: ({ children, ...props }: HTMLAttributes<HTMLButtonElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const CounterAddButton: ({ children, ...props }: HTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const CounterSubtractButton: ({ children, ...props }: HTMLAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
@@ -5,9 +5,24 @@ import { usePrevious } from '../hooks/usePrevious.js';
5
5
  import { asComponentDict, asStyleDict, cloneStyledElement, styles } from '../utils/index.js';
6
6
  import { TextField } from './TextField.js';
7
7
  export const Counter = forwardRef(({ children, style, allowsInput = true, max = NaN, min = NaN, quantity = 0, onChange, ...props }, ref) => {
8
- const handleSubtract = () => onChange?.(clamp(quantity - 1));
9
- const handleAdd = () => onChange?.(clamp(quantity + 1));
10
- const handleQuantityChange = (newValue) => onChange?.(newValue);
8
+ const handleSubtract = () => {
9
+ onChange?.(clamp(quantity - 1));
10
+ };
11
+ const handleAdd = () => {
12
+ onChange?.(clamp(quantity + 1));
13
+ };
14
+ const handleInputProgress = (value) => {
15
+ setText(value);
16
+ };
17
+ const handleInputComplete = (value) => {
18
+ const newQuantity = toQuantity(value);
19
+ if (newQuantity !== quantity) {
20
+ onChange?.(newQuantity);
21
+ }
22
+ else {
23
+ setText(toString(newQuantity));
24
+ }
25
+ };
11
26
  const toString = (qty) => {
12
27
  return qty.toLocaleString();
13
28
  };
@@ -32,19 +47,9 @@ export const Counter = forwardRef(({ children, style, allowsInput = true, max =
32
47
  useEffect(() => {
33
48
  if (prevQuantity === undefined || prevQuantity === quantity)
34
49
  return;
35
- setText(toString(clamp(quantity)));
36
- handleQuantityChange(quantity);
37
- }, [quantity]);
38
- useEffect(() => {
39
- if (isNaN(min))
40
- return;
41
- handleQuantityChange(clamp(quantity));
42
- }, [min]);
43
- useEffect(() => {
44
- if (isNaN(max))
45
- return;
46
- handleQuantityChange(clamp(quantity));
47
- }, [max]);
50
+ const value = clamp(quantity);
51
+ setText(toString(value));
52
+ }, [quantity, min, max]);
48
53
  const components = asComponentDict(children, {
49
54
  textField: CounterTextField,
50
55
  addButton: CounterAddButton,
@@ -58,16 +63,8 @@ export const Counter = forwardRef(({ children, style, allowsInput = true, max =
58
63
  isDisabled: !allowsInput,
59
64
  style: styles(FIXED_STYLES.text),
60
65
  value: text,
61
- onValueChange: setText,
62
- onUnfocus: (value) => {
63
- const newQuantity = toQuantity(value);
64
- if (newQuantity !== quantity) {
65
- onChange?.(newQuantity);
66
- }
67
- else {
68
- setText(toString(newQuantity));
69
- }
70
- },
66
+ onValueChange: handleInputProgress,
67
+ onUnfocus: handleInputComplete,
71
68
  }), cloneStyledElement(components.addButton ?? _jsx(CounterAddButton, {}), {
72
69
  className: clsx({ disabled: isAddingDisabled }),
73
70
  style: styles(FIXED_STYLES.add),
@@ -1,20 +1,18 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
1
+ import { type HTMLAttributes } from 'react';
2
2
  import { type ImageProps } from './Image.js';
3
- export type CoverImageProps = Omit<HTMLAttributes<HTMLDivElement>, 'onLoadStart'> & Pick<ImageProps, 'alt' | 'loadingMode' | 'sizes' | 'src' | 'srcSet' | 'onLoadStart' | 'onLoadComplete' | 'onLoadError'> & PropsWithChildren<{
3
+ export type CoverImageProps = Omit<HTMLAttributes<HTMLDivElement>, 'onLoadStart'> & Pick<ImageProps, 'alt' | 'loadingMode' | 'sizes' | 'src' | 'srcSet' | 'onLoadStart' | 'onLoadComplete' | 'onLoadError'> & {
4
4
  /**
5
5
  * The known aspect ratio of the image, expressed by width / height. If
6
6
  * unprovided, it will be inferred after loading the image.
7
7
  */
8
8
  aspectRatio?: number;
9
- }>;
9
+ };
10
10
  export declare const CoverImage: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "onLoadStart"> & Pick<ImageProps, "onLoadStart" | "src" | "srcSet" | "sizes" | "onLoadComplete" | "onLoadError" | "alt" | "loadingMode"> & {
11
11
  /**
12
12
  * The known aspect ratio of the image, expressed by width / height. If
13
13
  * unprovided, it will be inferred after loading the image.
14
14
  */
15
15
  aspectRatio?: number;
16
- } & {
17
- children?: import("react").ReactNode | undefined;
18
16
  } & import("react").RefAttributes<HTMLDivElement>>;
19
- export declare const CoverImageViewport: ({ children, ...props }: HTMLAttributes<HTMLDivElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
20
- export declare const CoverImageContent: ({ children, ...props }: HTMLAttributes<HTMLDivElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const CoverImageViewport: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const CoverImageContent: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,18 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
1
+ import { type HTMLAttributes } from 'react';
2
2
  import { type VideoProps } from './Video.js';
3
- export type CoverVideoProps = HTMLAttributes<HTMLDivElement> & Pick<VideoProps, 'autoLoop' | 'autoPlay' | 'hasControls' | 'isMuted' | 'playsInline' | 'posterSrc' | 'src' | 'onPause' | 'onPlay' | 'onCanPlay' | 'onEnd' | 'onFullscreenChange' | 'onLoadMetadata' | 'onLoadMetadataComplete' | 'onLoadMetadataError' | 'onSizeChange'> & PropsWithChildren<{
3
+ export type CoverVideoProps = HTMLAttributes<HTMLDivElement> & Pick<VideoProps, 'autoLoop' | 'autoPlay' | 'hasControls' | 'isMuted' | 'playsInline' | 'posterSrc' | 'src' | 'onPause' | 'onPlay' | 'onCanPlay' | 'onEnd' | 'onFullscreenChange' | 'onLoadMetadata' | 'onLoadMetadataComplete' | 'onLoadMetadataError' | 'onSizeChange'> & {
4
4
  /**
5
5
  * The known aspect ratio of the video, expressed by width / height. If
6
6
  * unprovided, it will be inferred after loading the video.
7
7
  */
8
8
  aspectRatio?: number;
9
- }>;
9
+ };
10
10
  export declare const CoverVideo: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & Pick<VideoProps, "onCanPlay" | "onPause" | "onPlay" | "src" | "onSizeChange" | "autoPlay" | "playsInline" | "autoLoop" | "hasControls" | "isMuted" | "posterSrc" | "onEnd" | "onFullscreenChange" | "onLoadMetadata" | "onLoadMetadataComplete" | "onLoadMetadataError"> & {
11
11
  /**
12
12
  * The known aspect ratio of the video, expressed by width / height. If
13
13
  * unprovided, it will be inferred after loading the video.
14
14
  */
15
15
  aspectRatio?: number;
16
- } & {
17
- children?: import("react").ReactNode | undefined;
18
16
  } & import("react").RefAttributes<HTMLDivElement>>;
19
- export declare const CoverVideoViewport: ({ children, ...props }: HTMLAttributes<HTMLDivElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
20
- export declare const CoverVideoContent: ({ children, ...props }: HTMLAttributes<HTMLDivElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const CoverVideoViewport: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const CoverVideoContent: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { type HTMLAttributes, type PropsWithChildren, type SVGAttributes } from 'react';
2
- export type DialProps = HTMLAttributes<HTMLDivElement> & PropsWithChildren<{
1
+ import { type HTMLAttributes, type SVGAttributes } from 'react';
2
+ export type DialProps = HTMLAttributes<HTMLDivElement> & {
3
3
  /**
4
4
  * Current angle reading of the compass, between 0.0 - 360.0 degrees,
5
5
  * inclusive.
@@ -32,7 +32,7 @@ export type DialProps = HTMLAttributes<HTMLDivElement> & PropsWithChildren<{
32
32
  * `stroke-width` of the `<circle>` element.
33
33
  */
34
34
  trackThickness?: number;
35
- }>;
35
+ };
36
36
  /**
37
37
  * A circular dial with a knob and a track.
38
38
  *
@@ -72,8 +72,6 @@ export declare const Dial: import("react").ForwardRefExoticComponent<HTMLAttribu
72
72
  * `stroke-width` of the `<circle>` element.
73
73
  */
74
74
  trackThickness?: number;
75
- } & {
76
- children?: import("react").ReactNode | undefined;
77
75
  } & import("react").RefAttributes<HTMLDivElement>>;
78
76
  export declare const DialTrack: ({ ...props }: SVGAttributes<SVGCircleElement>) => import("react/jsx-runtime").JSX.Element;
79
77
  export declare const DialKnob: ({ ...props }: SVGAttributes<SVGPathElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { type ComponentType, type HTMLAttributes, type PropsWithChildren, type ReactElement, type Ref } from 'react';
1
+ import { type ComponentType, type HTMLAttributes, type ReactElement, type Ref } from 'react';
2
2
  import { type CollectionItemProps, type CollectionOrientation, type CollectionProps, type CollectionSelection } from './Collection.js';
3
3
  /**
4
4
  * Base extendable type describing the data provided to each item in
@@ -36,7 +36,7 @@ export type DropdownItemProps<T extends DropdownItemData = DropdownItemData> = C
36
36
  /**
37
37
  * Type describing the props of {@link Dropdown}.
38
38
  */
39
- export type DropdownProps<T extends DropdownItemData = DropdownItemData> = HTMLAttributes<HTMLDivElement> & CollectionProps<T> & PropsWithChildren<{
39
+ export type DropdownProps<T extends DropdownItemData = DropdownItemData> = HTMLAttributes<HTMLDivElement> & CollectionProps<T> & {
40
40
  /**
41
41
  * Specifies if the internal collection collapses when an item is selected.
42
42
  * This only works if `selectionMode` is `single`.
@@ -88,7 +88,7 @@ export type DropdownProps<T extends DropdownItemData = DropdownItemData> = HTMLA
88
88
  * component. When absent, one will be generated automatically.
89
89
  */
90
90
  ToggleComponent?: ComponentType<DropdownToggleProps>;
91
- }>;
91
+ };
92
92
  /**
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
@@ -97,6 +97,6 @@ export type DropdownProps<T extends DropdownItemData = DropdownItemData> = HTMLA
97
97
  export declare const Dropdown: <T extends DropdownItemData = DropdownItemData>(props: DropdownProps<T> & {
98
98
  ref?: Ref<HTMLDivElement>;
99
99
  }) => ReactElement;
100
- export declare const DropdownToggle: ({ children, ...props }: HTMLAttributes<HTMLButtonElement> & PropsWithChildren<DropdownToggleProps>) => import("react/jsx-runtime").JSX.Element;
101
- export declare const DropdownExpandIcon: ({ children, ...props }: HTMLAttributes<HTMLDivElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
102
- export declare const DropdownCollapseIcon: ({ children, ...props }: HTMLAttributes<HTMLDivElement> & PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
100
+ export declare const DropdownToggle: ({ children, ...props }: HTMLAttributes<HTMLButtonElement> & DropdownToggleProps) => import("react/jsx-runtime").JSX.Element;
101
+ export declare const DropdownExpandIcon: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
102
+ export declare const DropdownCollapseIcon: ({ children, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
1
+ import { type HTMLAttributes } from 'react';
2
2
  import { type Size } from 'spase';
3
3
  import { type PanoramaProps } from './Panorama.js';
4
- export type PanoramaSliderProps = PanoramaProps & PropsWithChildren<{
4
+ export type PanoramaSliderProps = PanoramaProps & {
5
5
  /**
6
6
  * Field-of-view (0.0 - 360.0 degrees, inclusive) that represents the size of
7
7
  * the reticle. 360 indicates the reticle covers the entire image. If this is
@@ -23,7 +23,7 @@ export type PanoramaSliderProps = PanoramaProps & PropsWithChildren<{
23
23
  * is, this prop is ignored.
24
24
  */
25
25
  viewportSize?: Size;
26
- }>;
26
+ };
27
27
  /**
28
28
  * A slider for a {@link Panorama} component.
29
29
  *
@@ -55,8 +55,6 @@ export declare const PanoramaSlider: import("react").ForwardRefExoticComponent<H
55
55
  * is, this prop is ignored.
56
56
  */
57
57
  viewportSize?: Size;
58
- } & {
59
- children?: import("react").ReactNode | undefined;
60
58
  } & import("react").RefAttributes<HTMLDivElement>>;
61
59
  export declare const PanoramaSliderTrack: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
62
60
  export declare const PanoramaSliderReticle: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
1
+ import { type HTMLAttributes } from 'react';
2
2
  type Orientation = 'horizontal' | 'vertical';
3
3
  type Range = [number, number];
4
- export type RangeSliderProps = PropsWithChildren<{
4
+ export type RangeSliderProps = {
5
5
  decimalPlaces?: number;
6
6
  knobHeight?: number;
7
7
  knobPadding?: number;
@@ -12,21 +12,8 @@ export type RangeSliderProps = PropsWithChildren<{
12
12
  range?: Range;
13
13
  steps?: number;
14
14
  onRangeChange?: (range: Range) => void;
15
- }>;
16
- export declare const RangeSlider: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
17
- decimalPlaces?: number;
18
- knobHeight?: number;
19
- knobPadding?: number;
20
- knobWidth?: number;
21
- max: number;
22
- min: number;
23
- orientation?: Orientation;
24
- range?: Range;
25
- steps?: number;
26
- onRangeChange?: (range: Range) => void;
27
- } & {
28
- children?: import("react").ReactNode | undefined;
29
- } & import("react").RefAttributes<HTMLDivElement>>;
15
+ };
16
+ export declare const RangeSlider: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RangeSliderProps & import("react").RefAttributes<HTMLDivElement>>;
30
17
  export declare const RangeSliderGutter: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
31
18
  export declare const RangeSliderLabel: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
32
19
  export declare const RangeSliderHighlight: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,5 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
2
- export type SelectableButtonProps = HTMLAttributes<HTMLButtonElement> & PropsWithChildren<{
1
+ import { type HTMLAttributes } from 'react';
2
+ export type SelectableButtonProps = HTMLAttributes<HTMLButtonElement> & {
3
3
  isDeselectable?: boolean;
4
4
  isDisabled?: boolean;
5
5
  isSelected?: boolean;
@@ -7,7 +7,7 @@ export type SelectableButtonProps = HTMLAttributes<HTMLButtonElement> & PropsWit
7
7
  onDeselect?: () => void;
8
8
  onSelect?: () => void;
9
9
  onToggle?: (isSelected: boolean) => void;
10
- }>;
10
+ };
11
11
  export declare const SelectableButton: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & {
12
12
  isDeselectable?: boolean;
13
13
  isDisabled?: boolean;
@@ -16,6 +16,4 @@ export declare const SelectableButton: import("react").ForwardRefExoticComponent
16
16
  onDeselect?: () => void;
17
17
  onSelect?: () => void;
18
18
  onToggle?: (isSelected: boolean) => void;
19
- } & {
20
- children?: import("react").ReactNode | undefined;
21
19
  } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,6 +1,6 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
1
+ import { type HTMLAttributes } from 'react';
2
2
  export type SliderOrientation = 'horizontal' | 'vertical';
3
- export type SliderProps = HTMLAttributes<HTMLDivElement> & PropsWithChildren<{
3
+ export type SliderProps = HTMLAttributes<HTMLDivElement> & {
4
4
  /**
5
5
  * By default the position is a value from 0 - 1, 0 being the start of the
6
6
  * slider and 1 being the end. Switching on this flag inverts this behavior,
@@ -64,7 +64,7 @@ export type SliderProps = HTMLAttributes<HTMLDivElement> & PropsWithChildren<{
64
64
  * Handler invoked when dragging begins.
65
65
  */
66
66
  onDragStart?: () => void;
67
- }>;
67
+ };
68
68
  /**
69
69
  * A slider component supporting both horizontal and vertical orientations whose
70
70
  * sliding position (a decimal between 0.0 and 1.0, inclusive) can be two-way
@@ -143,8 +143,6 @@ export declare const Slider: import("react").ForwardRefExoticComponent<HTMLAttri
143
143
  * Handler invoked when dragging begins.
144
144
  */
145
145
  onDragStart?: () => void;
146
- } & {
147
- children?: import("react").ReactNode | undefined;
148
146
  } & import("react").RefAttributes<HTMLDivElement>>;
149
147
  export declare const SliderTrack: ({ ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
150
148
  export declare const SliderKnob: ({ ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { type HTMLAttributes, type PropsWithChildren } from 'react';
1
+ import { type HTMLAttributes } from 'react';
2
2
  type Orientation = 'horizontal' | 'vertical';
3
- export type StepwiseSliderProps = HTMLAttributes<HTMLDivElement> & PropsWithChildren<{
3
+ export type StepwiseSliderProps = HTMLAttributes<HTMLDivElement> & {
4
4
  /**
5
5
  * By default the position is a value from 0 - 1, 0 being the start of the
6
6
  * slider and 1 being the end. Switching on this flag inverts this behavior,
@@ -85,7 +85,7 @@ export type StepwiseSliderProps = HTMLAttributes<HTMLDivElement> & PropsWithChil
85
85
  * Handler invoked when dragging begins.
86
86
  */
87
87
  onDragStart?: () => void;
88
- }>;
88
+ };
89
89
  /**
90
90
  * A "stepwise" slider component supporting both horizontal and vertical
91
91
  * orientations that automatically snaps to a set of predefined points on the
@@ -189,8 +189,6 @@ export declare const StepwiseSlider: import("react").ForwardRefExoticComponent<H
189
189
  * Handler invoked when dragging begins.
190
190
  */
191
191
  onDragStart?: () => void;
192
- } & {
193
- children?: import("react").ReactNode | undefined;
194
192
  } & import("react").RefAttributes<HTMLDivElement>>;
195
193
  export declare const StepwiseSliderTrack: ({ ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
196
194
  export declare const StepwiseSliderKnob: ({ ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etudes",
3
- "version": "7.0.1",
3
+ "version": "7.0.3",
4
4
  "description": "A study of headless React components",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -36,32 +36,32 @@
36
36
  ],
37
37
  "devDependencies": {
38
38
  "@commitlint/config-conventional": "^19.6.0",
39
- "@eslint/js": "^9.17.0",
39
+ "@eslint/js": "^9.18.0",
40
40
  "@semantic-release/changelog": "^6.0.3",
41
41
  "@semantic-release/git": "^10.0.1",
42
42
  "@stylistic/eslint-plugin": "^2.12.1",
43
- "@types/node": "^22.10.2",
44
- "@types/react": "^19.0.2",
43
+ "@types/node": "^22.10.5",
44
+ "@types/react": "^19.0.4",
45
45
  "@types/react-dom": "^19.0.2",
46
46
  "@vitejs/plugin-react": "^4.3.4",
47
47
  "@vitest/coverage-v8": "^2.1.8",
48
48
  "autoprefixer": "^10.4.20",
49
- "concurrently": "^9.1.0",
50
- "eslint": "^9.17.0",
49
+ "concurrently": "^9.1.2",
50
+ "eslint": "^9.18.0",
51
51
  "eslint-plugin-tailwindcss": "^3.17.5",
52
52
  "postcss": "^8.4.49",
53
53
  "react": "^19.0.0",
54
54
  "react-dom": "^19.0.0",
55
- "react-router": "^7.0.2",
55
+ "react-router": "^7.1.1",
56
56
  "rimraf": "^6.0.1",
57
- "semantic-release": "^24.2.0",
57
+ "semantic-release": "^24.2.1",
58
58
  "tailwindcss": "^3.4.17",
59
59
  "tailwindcss-safe-area": "^0.6.0",
60
- "typescript": "^5.7.2",
61
- "typescript-eslint": "^8.18.1",
62
- "vite": "^6.0.4",
60
+ "typescript": "^5.7.3",
61
+ "typescript-eslint": "^8.19.1",
62
+ "vite": "^6.0.7",
63
63
  "vitest": "^2.1.8",
64
- "wait-on": "^8.0.1"
64
+ "wait-on": "^8.0.2"
65
65
  },
66
66
  "dependencies": {
67
67
  "clsx": "^2.1.1",
@@ -75,7 +75,7 @@
75
75
  "react": "^19.0.0"
76
76
  },
77
77
  "optionalDependencies": {
78
- "react-router": "^7.0.2"
78
+ "react-router": "^7.1.1"
79
79
  },
80
- "packageManager": "pnpm@9.15.0"
80
+ "packageManager": "pnpm@9.15.3"
81
81
  }