@codecademy/gamut

73.6.173.6.2-alpha.3e37cd.0
dist/Form/inputs/Checkbox.d.ts
~dist/Form/inputs/Checkbox.d.tsModified
+10−1
Index: package/dist/Form/inputs/Checkbox.d.ts
===================================================================
--- package/dist/Form/inputs/Checkbox.d.ts
+++ package/dist/Form/inputs/Checkbox.d.ts
@@ -1,12 +1,14 @@
 import { StyleProps } from '@codecademy/variance';
-import { InputHTMLAttributes } from 'react';
+import { ComponentPropsWithoutRef, InputHTMLAttributes } from 'react';
 import { InfoTipSubComponentProps } from '../../Tip/InfoTip/type-utils';
+import { DataAttributes } from '../../utils';
 import { checkboxPadding, checkboxTextStates } from '../styles';
 import { BaseInputProps } from '../types';
 import { CheckboxCheckedUnion, CheckboxLabelUnion } from './types';
 export type CheckboxTextProps = StyleProps<typeof checkboxTextStates>;
 export type CheckboxPaddingProps = StyleProps<typeof checkboxPadding>;
+export type CheckboxLabelProps = ComponentPropsWithoutRef<'label'> & DataAttributes;
 export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'checked' | 'value' | 'label' | 'aria-label'> & CheckboxLabelUnion & CheckboxCheckedUnion & CheckboxPaddingProps & Pick<BaseInputProps, 'name' | 'required'> & {
     multiline?: boolean;
     className?: string;
     /**
@@ -19,8 +21,15 @@
      * To override this behavior, provide `ariaLabel` or `ariaLabelledby`.
      */
     infotip?: InfoTipSubComponentProps;
     /**
+     * Props to forward to the visible label element that wraps the checkbox
+     * UI - the thing users actually click. Unlike `...rest`, which lands on
+     * the screenreader-only `<input>`, this is the slot for `data-*`/`aria-*`
+     * attributes meant for click tracking or targeting the visible element.
+     */
+    labelProps?: CheckboxLabelProps;
+    /**
      * @remarks
      * The `value` prop here gets passed to the underlying `input` component
      * and functions exactly like the HTML spec for checkboxes defines
      * (which may not be as you expect):