@scaleflex/ui-tw 0.0.76 → 0.0.77

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,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { FieldValues, Path } from 'react-hook-form';
3
3
  import type { FormFieldGroupProps } from '../form.types';
4
- declare function FormFieldGroup<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ control, name, label, description, size, readOnly, disabled, tooltip, disabledTooltip, highlight, horizontal, horizontalLabelWidth, children, }: FormFieldGroupProps<TFieldValues, TName>): React.JSX.Element;
4
+ declare function FormFieldGroup<TFieldValues extends FieldValues, TName extends Path<TFieldValues>>({ control, name, label, description, size, readOnly, disabled, tooltip, disabledTooltip, highlight, horizontal, horizontalLabelWidth, children, inputAriaLabel, }: FormFieldGroupProps<TFieldValues, TName>): React.JSX.Element;
5
5
  export { FormFieldGroup };
@@ -19,7 +19,8 @@ function FormFieldGroup(_ref) {
19
19
  _ref$horizontal = _ref.horizontal,
20
20
  horizontal = _ref$horizontal === void 0 ? false : _ref$horizontal,
21
21
  horizontalLabelWidth = _ref.horizontalLabelWidth,
22
- children = _ref.children;
22
+ children = _ref.children,
23
+ inputAriaLabel = _ref.inputAriaLabel;
23
24
  return /*#__PURE__*/React.createElement(FormField, {
24
25
  control: control,
25
26
  name: name,
@@ -40,7 +41,9 @@ function FormFieldGroup(_ref) {
40
41
  disabled: disabled
41
42
  }, label), /*#__PURE__*/React.createElement("div", {
42
43
  className: "grid gap-1.5"
43
- }, /*#__PURE__*/React.createElement(FormControl, null, children(field, {
44
+ }, /*#__PURE__*/React.createElement(FormControl, {
45
+ "aria-label": inputAriaLabel
46
+ }, children(field, {
44
47
  size: size,
45
48
  readOnly: readOnly,
46
49
  disabled: disabled
@@ -40,6 +40,7 @@ export interface FormFieldGroupProps<TFieldValues extends FieldValues, TName ext
40
40
  highlight?: boolean;
41
41
  horizontal?: boolean;
42
42
  horizontalLabelWidth?: string;
43
+ inputAriaLabel?: string;
43
44
  }
44
45
  export interface FormSwitchFieldProps<TFieldValues extends FieldValues, TName extends Path<TFieldValues>> extends UseControllerProps<TFieldValues, TName>, FormBaseFieldProps {
45
46
  layout?: SwitchLayoutType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleflex/ui-tw",
3
- "version": "0.0.76",
3
+ "version": "0.0.77",
4
4
  "author": "scaleflex",
5
5
  "repository": "github:scaleflex/ui",
6
6
  "homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
@@ -23,7 +23,7 @@
23
23
  "@radix-ui/react-slot": "^1.1.2",
24
24
  "@radix-ui/react-switch": "^1.0.1",
25
25
  "@radix-ui/react-tooltip": "^1.2.6",
26
- "@scaleflex/icons-tw": "^0.0.76",
26
+ "@scaleflex/icons-tw": "^0.0.77",
27
27
  "@tanstack/react-table": "^8.21.3",
28
28
  "@types/lodash.merge": "^4.6.9",
29
29
  "class-variance-authority": "^0.7.1",