etudes 14.4.0 → 14.5.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.
@@ -0,0 +1,64 @@
1
+ import { HTMLAttributes } from 'react';
2
+ /**
3
+ * Type describing the props of {@link Toggle}.
4
+ */
5
+ export type ToggleProps = Omit<HTMLAttributes<HTMLLabelElement>, 'onChange' | 'onClick'> & {
6
+ /**
7
+ * Specifies if the toggle is inverted.
8
+ */
9
+ isInverted?: boolean;
10
+ /**
11
+ * Specifies if the toggle is on or off.
12
+ */
13
+ isOn?: boolean;
14
+ /**
15
+ * The orientation of the toggle.
16
+ */
17
+ orientation?: 'horizontal' | 'vertical';
18
+ /**
19
+ * Handler invoked when the state of the toggle changes.
20
+ *
21
+ * @param isOn - The new state of the toggle.
22
+ */
23
+ onChange?: (isOn: boolean) => void;
24
+ };
25
+ /**
26
+ * A toggle switch component that allows users to switch between on or off.
27
+ *
28
+ * @exports ToggleKnob The knob of the toggle switch.
29
+ * @exports ToggleTrack The track of the toggle switch.
30
+ */
31
+ export declare const Toggle: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLLabelElement>, "onChange" | "onClick"> & {
32
+ /**
33
+ * Specifies if the toggle is inverted.
34
+ */
35
+ isInverted?: boolean;
36
+ /**
37
+ * Specifies if the toggle is on or off.
38
+ */
39
+ isOn?: boolean;
40
+ /**
41
+ * The orientation of the toggle.
42
+ */
43
+ orientation?: "horizontal" | "vertical";
44
+ /**
45
+ * Handler invoked when the state of the toggle changes.
46
+ *
47
+ * @param isOn - The new state of the toggle.
48
+ */
49
+ onChange?: (isOn: boolean) => void;
50
+ } & import('react').RefAttributes<HTMLLabelElement>>;
51
+ /**
52
+ * Component for the knob of a {@link Toggle}.
53
+ */
54
+ export declare const ToggleTrack: {
55
+ ({ children, ...props }: HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
56
+ displayName: string;
57
+ };
58
+ /**
59
+ * Component for the track of a {@link Toggle}.
60
+ */
61
+ export declare const ToggleKnob: {
62
+ ({ children, ...props }: HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
63
+ displayName: string;
64
+ };