@sebgroup/green-react 1.3.0 → 1.4.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.
package/index.js CHANGED
@@ -2092,7 +2092,8 @@ const IconButton = _a => {
2092
2092
  const ButtonGroup = ({
2093
2093
  children,
2094
2094
  selectedIndex,
2095
- variant
2095
+ variant,
2096
+ id
2096
2097
  }) => {
2097
2098
  const [selected, setSelected] = useState(selectedIndex);
2098
2099
  const [buttons, setButtons] = useState([]);
@@ -2112,9 +2113,12 @@ const ButtonGroup = ({
2112
2113
  });
2113
2114
  setButtons(buttonProps);
2114
2115
  }, [children, selected, variant]);
2115
- return jsx(Group, {
2116
+ return jsx(Group, Object.assign({
2117
+ "data-label": "button-group",
2118
+ id: id
2119
+ }, {
2116
2120
  children: buttons.map(props => jsx(Button, Object.assign({}, props), props.key))
2117
- });
2121
+ }));
2118
2122
  };
2119
2123
 
2120
2124
  /* eslint-disable-next-line */
@@ -2298,6 +2302,7 @@ const FormItems = ({
2298
2302
  };
2299
2303
 
2300
2304
  function Group({
2305
+ id,
2301
2306
  children,
2302
2307
  error,
2303
2308
  groupBorder = false
@@ -2305,7 +2310,8 @@ function Group({
2305
2310
  const groupClassName = `group ${groupBorder ? 'group-border' : ''} ${error ? 'is-invalid' : ''}`;
2306
2311
  const errorMessage = error ? error.message || error : '';
2307
2312
  return jsxs("div", Object.assign({
2308
- className: "form-group"
2313
+ className: "form-group",
2314
+ id: id
2309
2315
  }, {
2310
2316
  children: [jsx("div", Object.assign({
2311
2317
  className: groupClassName
@@ -2429,6 +2435,7 @@ const useInput = (props, onChanges, onChangeInput) => {
2429
2435
  const [value, setValue] = useState(props.value ? props.value : '');
2430
2436
  const [checked, setChecked] = useState(props.checked ? props.checked : false);
2431
2437
  useEffect(() => {
2438
+ if (props.value !== undefined) setValue(props.value);
2432
2439
  if (ref.current && ref.current.form) {
2433
2440
  const resetListener = () => {
2434
2441
  setValue(props.value ? props.value : '');
@@ -2443,7 +2450,9 @@ const useInput = (props, onChanges, onChangeInput) => {
2443
2450
  }
2444
2451
  }, [props]);
2445
2452
  const onChange = event => {
2446
- setValue(event.target.value);
2453
+ if (props.value === undefined) {
2454
+ setValue(event.target.value);
2455
+ }
2447
2456
  setChecked(event.currentTarget.checked);
2448
2457
  onChanges && onChanges(event);
2449
2458
  onChangeInput && onChangeInput(event.target.value);
@@ -2457,7 +2466,7 @@ const useInput = (props, onChanges, onChangeInput) => {
2457
2466
  });
2458
2467
  };
2459
2468
 
2460
- const RenderInput = (type, props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel) => {
2469
+ const RenderInput = (type, props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel, testId) => {
2461
2470
  const _a = useInput(props, onChange, onChangeInput),
2462
2471
  {
2463
2472
  value
@@ -2469,7 +2478,8 @@ const RenderInput = (type, props, onChange, onChangeInput, label, info, validato
2469
2478
  // Render naked
2470
2479
  if (!label && !info && !expandableInfo) return jsx("input", Object.assign({
2471
2480
  type: type,
2472
- value: value
2481
+ value: value,
2482
+ "data-testid": testId
2473
2483
  }, propsWithDescription));
2474
2484
  return jsx(FormItem, Object.assign({
2475
2485
  validator: validator,
@@ -2486,7 +2496,8 @@ const RenderInput = (type, props, onChange, onChangeInput, label, info, validato
2486
2496
  type: type,
2487
2497
  value: value
2488
2498
  }, propsWithDescription, {
2489
- className: validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)
2499
+ className: validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator),
2500
+ "data-testid": testId
2490
2501
  }))
2491
2502
  }))
2492
2503
  }));
@@ -2495,14 +2506,15 @@ const TextInput = _a => {
2495
2506
  var {
2496
2507
  label,
2497
2508
  info,
2509
+ testId,
2498
2510
  onChange,
2499
2511
  onChangeInput,
2500
2512
  validator,
2501
2513
  expandableInfo,
2502
2514
  expandableInfoButtonLabel
2503
2515
  } = _a,
2504
- props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator", "expandableInfo", "expandableInfoButtonLabel"]);
2505
- return RenderInput('text', props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel);
2516
+ props = __rest(_a, ["label", "info", "testId", "onChange", "onChangeInput", "validator", "expandableInfo", "expandableInfoButtonLabel"]);
2517
+ return RenderInput('text', props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel, testId);
2506
2518
  };
2507
2519
  const EmailInput = _a => {
2508
2520
  var {
@@ -2510,10 +2522,11 @@ const EmailInput = _a => {
2510
2522
  info,
2511
2523
  onChange,
2512
2524
  onChangeInput,
2513
- validator
2525
+ validator,
2526
+ testId
2514
2527
  } = _a,
2515
- props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
2516
- return RenderInput('email', props, onChange, onChangeInput, label, info, validator);
2528
+ props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator", "testId"]);
2529
+ return RenderInput('email', props, onChange, onChangeInput, label, info, validator, testId);
2517
2530
  };
2518
2531
  const NumberInput = _a => {
2519
2532
  var {
@@ -2523,18 +2536,20 @@ const NumberInput = _a => {
2523
2536
  onChangeInput,
2524
2537
  validator,
2525
2538
  expandableInfo,
2526
- expandableInfoButtonLabel
2539
+ expandableInfoButtonLabel,
2540
+ testId
2527
2541
  } = _a,
2528
- props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator", "expandableInfo", "expandableInfoButtonLabel"]);
2529
- return RenderInput('number', props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel);
2542
+ props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator", "expandableInfo", "expandableInfoButtonLabel", "testId"]);
2543
+ return RenderInput('number', props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel, testId);
2530
2544
  };
2531
2545
  const Checkbox = _a => {
2532
2546
  var {
2533
2547
  label,
2534
2548
  onChange,
2535
- validator
2549
+ validator,
2550
+ testId
2536
2551
  } = _a,
2537
- props = __rest(_a, ["label", "onChange", "validator"]);
2552
+ props = __rest(_a, ["label", "onChange", "validator", "testId"]);
2538
2553
  const inputProps = useInput(props, onChange);
2539
2554
  const labelClassNames = classNames('form-control', validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator));
2540
2555
  const inputClassNames = classNames(validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator));
@@ -2546,7 +2561,8 @@ const Checkbox = _a => {
2546
2561
  className: labelClassNames
2547
2562
  }, {
2548
2563
  children: [label, jsx("input", Object.assign({
2549
- type: "checkbox"
2564
+ type: "checkbox",
2565
+ "data-testid": testId
2550
2566
  }, inputProps, {
2551
2567
  className: inputClassNames
2552
2568
  })), jsx("i", {})]
@@ -2560,9 +2576,10 @@ const Checkbox = _a => {
2560
2576
  const RadioButton = /*#__PURE__*/React.forwardRef((_a, ref) => {
2561
2577
  var {
2562
2578
  label,
2563
- validator
2579
+ validator,
2580
+ testId
2564
2581
  } = _a,
2565
- props = __rest(_a, ["label", "validator"]);
2582
+ props = __rest(_a, ["label", "validator", "testId"]);
2566
2583
  const {
2567
2584
  id
2568
2585
  } = useInput(props);
@@ -2573,7 +2590,8 @@ const RadioButton = /*#__PURE__*/React.forwardRef((_a, ref) => {
2573
2590
  }, {
2574
2591
  children: [jsx("input", Object.assign({
2575
2592
  id: id,
2576
- type: "radio"
2593
+ type: "radio",
2594
+ "data-testid": testId
2577
2595
  }, props, {
2578
2596
  className: inputClassNames,
2579
2597
  ref: ref
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/chlorophyll": "^1.4.0",
10
- "@sebgroup/extract": "^1.2.0",
9
+ "@sebgroup/chlorophyll": "^1.7.0",
10
+ "@sebgroup/extract": "^1.3.1",
11
11
  "classnames": "^2.3.2"
12
12
  },
13
13
  "description": "React components built on top of @sebgroup/chlorophyll.",
@@ -5,6 +5,7 @@ interface ButtonGroupProps {
5
5
  children: ReactElement<ButtonProps> | ReactElement<ButtonProps>[];
6
6
  selectedIndex?: number;
7
7
  variant?: ButtonVariant;
8
+ id?: string;
8
9
  }
9
- export declare const ButtonGroup: ({ children, selectedIndex, variant, }: ButtonGroupProps) => JSX.Element;
10
+ export declare const ButtonGroup: ({ children, selectedIndex, variant, id, }: ButtonGroupProps) => JSX.Element;
10
11
  export default ButtonGroup;
@@ -4,6 +4,7 @@ export interface GroupProps {
4
4
  error?: Error | string;
5
5
  groupBorder?: boolean;
6
6
  invalid?: boolean;
7
+ id?: string;
7
8
  }
8
- export declare function Group({ children, error, groupBorder }: GroupProps): JSX.Element;
9
+ export declare function Group({ id, children, error, groupBorder, }: GroupProps): JSX.Element;
9
10
  export default Group;
@@ -1,10 +1,10 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
2
  import { IValidator } from '@sebgroup/extract';
3
3
  import { CheckboxProps, NumberInputProps, RadioButtonProps, TextInputProps } from '../types';
4
- export type Renderer = (type: string, props: InputHTMLAttributes<HTMLInputElement>, onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void, onChangeInput?: (value: string) => string, label?: string, info?: string, validator?: IValidator, expandableInfo?: string, expandableInfoButtonLabel?: string) => JSX.Element;
4
+ export type Renderer = (type: string, props: InputHTMLAttributes<HTMLInputElement>, onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void, onChangeInput?: (value: string) => string, label?: string, info?: string, validator?: IValidator, expandableInfo?: string, expandableInfoButtonLabel?: string, testId?: string) => JSX.Element;
5
5
  export declare const RenderInput: Renderer;
6
- export declare const TextInput: ({ label, info, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, ...props }: TextInputProps) => JSX.Element;
7
- export declare const EmailInput: ({ label, info, onChange, onChangeInput, validator, ...props }: TextInputProps) => JSX.Element;
8
- export declare const NumberInput: ({ label, info, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, ...props }: NumberInputProps) => JSX.Element;
9
- export declare const Checkbox: ({ label, onChange, validator, ...props }: CheckboxProps) => JSX.Element;
10
- export declare const RadioButton: React.ForwardRefExoticComponent<Pick<RadioButtonProps, "label" | "onChange" | "validator" | "type" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLInputElement>>;
6
+ export declare const TextInput: ({ label, info, testId, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, ...props }: TextInputProps) => JSX.Element;
7
+ export declare const EmailInput: ({ label, info, onChange, onChangeInput, validator, testId, ...props }: TextInputProps) => JSX.Element;
8
+ export declare const NumberInput: ({ label, info, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, testId, ...props }: NumberInputProps) => JSX.Element;
9
+ export declare const Checkbox: ({ label, onChange, validator, testId, ...props }: CheckboxProps) => JSX.Element;
10
+ export declare const RadioButton: React.ForwardRefExoticComponent<Pick<RadioButtonProps, "label" | "testId" | "onChange" | "validator" | "type" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key"> & React.RefAttributes<HTMLInputElement>>;
@@ -4,12 +4,14 @@ export interface TextInputProps extends HTMLProps<HTMLInputElement> {
4
4
  type?: 'text' | 'email' | 'number';
5
5
  label?: string;
6
6
  info?: string;
7
+ testId?: string;
7
8
  expandableInfo?: string;
8
9
  expandableInfoButtonLabel?: string;
9
10
  validator?: IValidator;
10
11
  onChangeInput?: (value: string) => string;
11
12
  }
12
13
  export interface NumberInputProps extends TextInputProps {
14
+ testId?: string;
13
15
  min?: number;
14
16
  max?: number;
15
17
  step?: number;
@@ -17,10 +19,12 @@ export interface NumberInputProps extends TextInputProps {
17
19
  expandableInfoButtonLabel?: string;
18
20
  }
19
21
  export interface CheckboxProps extends HTMLProps<HTMLInputElement> {
22
+ testId?: string;
20
23
  validator?: IValidator;
21
24
  }
22
25
  export interface RadioButtonProps extends HTMLProps<HTMLInputElement> {
23
26
  label: string;
27
+ testId?: string;
24
28
  validator?: string;
25
29
  value: string;
26
30
  }