@trackunit/react-form-components 1.13.0 → 1.13.1

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.cjs.js CHANGED
@@ -374,8 +374,10 @@ const GenericActionsRenderer = ({ genericAction, disabled, fieldSize, innerRef,
374
374
  * If locked, a permission lacks but the input **can** sometimes be edited.
375
375
  * If disabled, the input **cannot** be edited and is only ever for displaying information.
376
376
  *
377
- * @param {LockedForReasons} props - The reasons for the disabled state.
378
- * @param {LockedKind} kind - The kind of disabled state. If locked, the input can sometimes be edited. If disabled, the input cannot be edited.
377
+ * @param props - The component props.
378
+ * @param props.kind - The kind of disabled state. If locked, the input can sometimes be edited. If disabled, the input cannot be edited.
379
+ * @param props.reasons - The reasons for the disabled state (optional).
380
+ * @returns {ReactElement} The tooltip icon component.
379
381
  */
380
382
  const InputLockReasonTooltip = ({ reasons, kind }) => {
381
383
  const [t] = useTranslation();
@@ -603,12 +605,9 @@ const getCountryAbbreviation = (callCode) => {
603
605
  const DEFAULT_COUNTRY_CODE = undefined;
604
606
  /**
605
607
  * A component for inputting phone numbers with an optional action button for initiating a phone call.
608
+ * See PhoneBaseInputProps for prop documentation.
606
609
  *
607
- * @param {string} [dataTestId] - The data test ID for the component.
608
- * @param {string|number} [value] - The value of the input field. The value should include the country code as well.
609
- * @param {boolean} [disabled=false] - Whether the component is disabled or not.
610
- * @param {string} [fieldSize="medium"] - The size of the input field.
611
- * @param {boolean} [disableAction=false] - Whether the action button is disabled or not.
610
+ * @returns {ReactElement} The phone input component.
612
611
  */
613
612
  const PhoneBaseInput = ({ "data-testid": dataTestId, isInvalid, disabled = false, value, defaultValue, fieldSize = "medium", disableAction = false, onChange, readOnly, onFocus, onBlur, name, ref, ...rest }) => {
614
613
  const [innerValue, setInnerValue] = react.useState(() => {
package/index.esm.js CHANGED
@@ -373,8 +373,10 @@ const GenericActionsRenderer = ({ genericAction, disabled, fieldSize, innerRef,
373
373
  * If locked, a permission lacks but the input **can** sometimes be edited.
374
374
  * If disabled, the input **cannot** be edited and is only ever for displaying information.
375
375
  *
376
- * @param {LockedForReasons} props - The reasons for the disabled state.
377
- * @param {LockedKind} kind - The kind of disabled state. If locked, the input can sometimes be edited. If disabled, the input cannot be edited.
376
+ * @param props - The component props.
377
+ * @param props.kind - The kind of disabled state. If locked, the input can sometimes be edited. If disabled, the input cannot be edited.
378
+ * @param props.reasons - The reasons for the disabled state (optional).
379
+ * @returns {ReactElement} The tooltip icon component.
378
380
  */
379
381
  const InputLockReasonTooltip = ({ reasons, kind }) => {
380
382
  const [t] = useTranslation();
@@ -602,12 +604,9 @@ const getCountryAbbreviation = (callCode) => {
602
604
  const DEFAULT_COUNTRY_CODE = undefined;
603
605
  /**
604
606
  * A component for inputting phone numbers with an optional action button for initiating a phone call.
607
+ * See PhoneBaseInputProps for prop documentation.
605
608
  *
606
- * @param {string} [dataTestId] - The data test ID for the component.
607
- * @param {string|number} [value] - The value of the input field. The value should include the country code as well.
608
- * @param {boolean} [disabled=false] - Whether the component is disabled or not.
609
- * @param {string} [fieldSize="medium"] - The size of the input field.
610
- * @param {boolean} [disableAction=false] - Whether the action button is disabled or not.
609
+ * @returns {ReactElement} The phone input component.
611
610
  */
612
611
  const PhoneBaseInput = ({ "data-testid": dataTestId, isInvalid, disabled = false, value, defaultValue, fieldSize = "medium", disableAction = false, onChange, readOnly, onFocus, onBlur, name, ref, ...rest }) => {
613
612
  const [innerValue, setInnerValue] = useState(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-components",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -14,12 +14,12 @@
14
14
  "zod": "^3.23.8",
15
15
  "react-hook-form": "7.62.0",
16
16
  "tailwind-merge": "^2.0.0",
17
- "@trackunit/css-class-variance-utilities": "1.11.19",
18
- "@trackunit/react-components": "1.16.0",
19
- "@trackunit/ui-icons": "1.11.18",
20
- "@trackunit/shared-utils": "1.13.19",
21
- "@trackunit/ui-design-tokens": "1.11.19",
22
- "@trackunit/i18n-library-translation": "1.12.0",
17
+ "@trackunit/css-class-variance-utilities": "1.11.20",
18
+ "@trackunit/react-components": "1.16.1",
19
+ "@trackunit/ui-icons": "1.11.19",
20
+ "@trackunit/shared-utils": "1.13.20",
21
+ "@trackunit/ui-design-tokens": "1.11.20",
22
+ "@trackunit/i18n-library-translation": "1.12.1",
23
23
  "string-ts": "^2.0.0",
24
24
  "@js-temporal/polyfill": "^0.5.1",
25
25
  "es-toolkit": "^1.39.10",
@@ -1,3 +1,4 @@
1
+ import { ReactElement } from "react";
1
2
  type LockedKind = "locked" | "disabled";
2
3
  export type LockedForReasons = {
3
4
  kind: LockedKind;
@@ -8,8 +9,10 @@ export type LockedForReasons = {
8
9
  * If locked, a permission lacks but the input **can** sometimes be edited.
9
10
  * If disabled, the input **cannot** be edited and is only ever for displaying information.
10
11
  *
11
- * @param {LockedForReasons} props - The reasons for the disabled state.
12
- * @param {LockedKind} kind - The kind of disabled state. If locked, the input can sometimes be edited. If disabled, the input cannot be edited.
12
+ * @param props - The component props.
13
+ * @param props.kind - The kind of disabled state. If locked, the input can sometimes be edited. If disabled, the input cannot be edited.
14
+ * @param props.reasons - The reasons for the disabled state (optional).
15
+ * @returns {ReactElement} The tooltip icon component.
13
16
  */
14
- export declare const InputLockReasonTooltip: ({ reasons, kind }: LockedForReasons) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const InputLockReasonTooltip: ({ reasons, kind }: LockedForReasons) => ReactElement;
15
18
  export {};
@@ -19,12 +19,9 @@ export interface PhoneBaseInputProps extends BaseInputExposedProps {
19
19
  }
20
20
  /**
21
21
  * A component for inputting phone numbers with an optional action button for initiating a phone call.
22
+ * See PhoneBaseInputProps for prop documentation.
22
23
  *
23
- * @param {string} [dataTestId] - The data test ID for the component.
24
- * @param {string|number} [value] - The value of the input field. The value should include the country code as well.
25
- * @param {boolean} [disabled=false] - Whether the component is disabled or not.
26
- * @param {string} [fieldSize="medium"] - The size of the input field.
27
- * @param {boolean} [disableAction=false] - Whether the action button is disabled or not.
24
+ * @returns {ReactElement} The phone input component.
28
25
  */
29
26
  export declare const PhoneBaseInput: ({ "data-testid": dataTestId, isInvalid, disabled, value, defaultValue, fieldSize, disableAction, onChange, readOnly, onFocus, onBlur, name, ref, ...rest }: PhoneBaseInputProps) => ReactElement;
30
27
  export {};