etudes 10.0.1 → 10.2.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.
@@ -1,14 +1,28 @@
1
1
  import { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
2
- import { LinkProps } from 'react-router';
3
- type ButtonVariantProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-disabled' | 'aria-label' | 'disabled' | 'rel' | 'type' | 'onClick'>;
4
- type LinkVariantProps = Omit<LinkProps, 'aria-disabled' | 'aria-label' | 'rel' | 'to' | 'target' | 'type' | 'onClick'>;
5
- type AnchorVariantProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-disabled' | 'aria-label' | 'href' | 'rel' | 'target' | 'type' | 'onClick'>;
6
- export type ButtonProps = (AnchorVariantProps | LinkVariantProps | ButtonVariantProps) & {
7
- action: string | (() => void);
2
+ import { LinkProps, NavLinkProps } from 'react-router';
3
+ type ButtonVariantProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-disabled' | 'aria-label' | 'disabled' | 'rel' | 'onClick'> & {
4
+ action: () => void;
5
+ isDisabled?: boolean;
6
+ label?: string;
7
+ };
8
+ type LinkVariantProps = Omit<LinkProps, 'aria-disabled' | 'aria-label' | 'rel' | 'to' | 'type' | 'onClick'> & {
9
+ action: string;
10
+ isDisabled?: boolean;
11
+ isNav?: false;
12
+ label?: string;
13
+ };
14
+ type NavLinkVariantProps = Omit<NavLinkProps, 'aria-disabled' | 'aria-label' | 'rel' | 'to' | 'target' | 'type' | 'onClick'> & {
15
+ action: string;
16
+ isDisabled?: boolean;
17
+ isNav: true;
18
+ label?: string;
19
+ };
20
+ type AnchorVariantProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-disabled' | 'aria-label' | 'href' | 'rel' | 'target' | 'type' | 'onClick'> & {
21
+ action: string;
8
22
  isDisabled?: boolean;
9
23
  label?: string;
10
24
  opensInNewTab?: boolean;
11
- type?: HTMLButtonElement['type'];
12
25
  };
13
- export declare function Button({ action, children, className, isDisabled, label, opensInNewTab, type, ...props }: Readonly<ButtonProps>): import("react/jsx-runtime").JSX.Element;
26
+ export type ButtonProps = AnchorVariantProps | LinkVariantProps | NavLinkVariantProps | ButtonVariantProps;
27
+ export declare function Button(props: Readonly<ButtonProps>): import("react/jsx-runtime").JSX.Element;
14
28
  export {};
@@ -32,7 +32,7 @@ export type FlatSVGProps = Omit<HTMLAttributes<HTMLElement>, 'role'> & {
32
32
  */
33
33
  shouldStripPositions?: boolean;
34
34
  /**
35
- * Specifies whether the 'style' atribute and any <style> nodes should be
35
+ * Specifies whether the 'style' attribute and any <style> nodes should be
36
36
  * removed in the SVG root node and all of its child nodes.
37
37
  */
38
38
  shouldStripStyles?: boolean;
@@ -21,7 +21,7 @@ export type MasonryGridProps = Omit<HTMLAttributes<HTMLDivElement>, 'role'> & {
21
21
  * child element is automatically set. Additionally, the *number of sections*
22
22
  * corresponds to the maximum the number of child elements present in the
23
23
  * direction that is parallel to the orientation of the grid. Hence, in a
24
- * vertically oriented grid, *number of secitons* refers to the *number of
24
+ * vertically oriented grid, *number of sections* refers to the *number of
25
25
  * rows*, whereas in a horizontally oriented grid, *number of sections* refers
26
26
  * to the *number of columns*.
27
27
  */
@@ -24,7 +24,7 @@ export type PanoramaProps = Omit<HTMLAttributes<HTMLDivElement>, 'aria-valuenow'
24
24
  */
25
25
  zeroAnchor?: number;
26
26
  /**
27
- * Handler invoked when the positionchanges. This can either be invoked from
27
+ * Handler invoked when the position changes. This can either be invoked from
28
28
  * the `angle` prop being changed or from the image being dragged.
29
29
  *
30
30
  * @param position The current position.
@@ -34,7 +34,7 @@ export type PanoramaProps = Omit<HTMLAttributes<HTMLDivElement>, 'aria-valuenow'
34
34
  /**
35
35
  * Handler invoked when the angle changes. This can either be invoked from the
36
36
  * `angle` prop being changed or from the image being dragged. When `angle` is
37
- * being double-binded, ensure that the value is only being set by this
37
+ * being double-bound, ensure that the value is only being set by this
38
38
  * handler when `isDragging` is `true` to avoid potential update overflow.
39
39
  *
40
40
  * @param angle The current angle.
@@ -65,7 +65,7 @@ export type PanoramaProps = Omit<HTMLAttributes<HTMLDivElement>, 'aria-valuenow'
65
65
  * Handler invoked when the image size changes. This is the actual size of the
66
66
  * loaded image. When no images are loaded yet, the size is `undefined`.
67
67
  *
68
- * @param size The actual size of the loaded iamge. If no images are loaded
68
+ * @param size The actual size of the loaded image. If no images are loaded
69
69
  * yet, the size is `undefined`.
70
70
  */
71
71
  onImageSizeChange?: (size?: Size) => void;
@@ -68,7 +68,7 @@ export type SliderProps = Omit<HTMLAttributes<HTMLDivElement>, 'aria-orientation
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
71
- * binded. The component consists of three customizable elements: a draggable
71
+ * bound. The component consists of three customizable elements: a draggable
72
72
  * knob, a label on the knob, and a scroll track on either side of the knob.
73
73
  * While the width and height of the slider is inferred from its CSS rules, the
74
74
  * width and height of the knob are set via props (`knobWidth` and `knobHeight`,
@@ -90,7 +90,7 @@ export type StepwiseSliderProps = Omit<HTMLAttributes<HTMLDivElement>, 'aria-val
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
92
92
  * slider when dragged. These points are referred to as "steps", indexed by an
93
- * integer referred to as "index". This index can be two-way binded. The
93
+ * integer referred to as "index". This index can be two-way bound. The
94
94
  * component consists of four customizable elements: a draggable knob, a label
95
95
  * on the knob, a scroll track before the knob and a scroll track after the
96
96
  * knob. While the width and height of the slider is inferred from its CSS