@happeouikit/form-elements 2.3.36 → 2.3.37

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/dist/Switch.d.ts CHANGED
@@ -1,19 +1,3 @@
1
+ import { SwitchProps } from "./Switch.types";
2
+ declare const Switch: ({ label, subtitle, description, tabIndex, id, disabled, checked, defaultChecked, required, onChange, background, "data-tip": dataTip, "data-tip-disable": dataTipDisable, "data-testid": dataTestId, ...props }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
1
3
  export default Switch;
2
- declare function Switch({ label, tabIndex, ...props }: {
3
- [x: string]: any;
4
- label: any;
5
- tabIndex: any;
6
- }): import("react/jsx-runtime").JSX.Element;
7
- declare namespace Switch {
8
- namespace propTypes {
9
- let label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
- let tabIndex: PropTypes.Requireable<number>;
11
- }
12
- namespace defaultProps {
13
- let label_1: undefined;
14
- export { label_1 as label };
15
- let tabIndex_1: number;
16
- export { tabIndex_1 as tabIndex };
17
- }
18
- }
19
- import PropTypes from "prop-types";
@@ -0,0 +1,29 @@
1
+ export interface BaseSwitchProps {
2
+ tabIndex?: number;
3
+ id?: string;
4
+ disabled?: boolean;
5
+ checked?: boolean;
6
+ background?: string;
7
+ defaultChecked?: boolean;
8
+ subtitle?: string;
9
+ description?: string;
10
+ "data-tracker"?: string;
11
+ "data-testid"?: string;
12
+ required?: boolean;
13
+ onChange?: (newValue: boolean) => void | any;
14
+ "aria-label"?: string;
15
+ "aria-expanded"?: boolean;
16
+ "aria-controls"?: string;
17
+ "aria-describedby"?: string;
18
+ [key: string]: any;
19
+ }
20
+ interface AriaLabelSwitchProps extends BaseSwitchProps {
21
+ "aria-label": string;
22
+ label?: never;
23
+ }
24
+ interface LabelSwitchProps extends BaseSwitchProps {
25
+ label: string;
26
+ "aria-label"?: never;
27
+ }
28
+ export type SwitchProps = AriaLabelSwitchProps | LabelSwitchProps;
29
+ export {};