@trackunit/react-form-components 0.0.128 → 0.0.129

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
@@ -341,23 +341,6 @@ const cvaCheckbox = cssClassVarianceUtilities.cvaMerge([
341
341
  "group-active:ring-blue-700",
342
342
  ], {
343
343
  variants: {
344
- disabled: {
345
- true: [
346
- "bg-slate-300",
347
- "border-slate-300",
348
- "cursor-not-allowed",
349
- "group-hover:bg-slate-300",
350
- "group-focus:bg-slate-300",
351
- "hover:bg-slate-300",
352
- "focus:bg-slate-300",
353
- "active:bg-slate-300",
354
- "focus:ring-0",
355
- "focus:ring-offset-0",
356
- "group-active:ring-0",
357
- "group-active:ring-offset-0",
358
- ],
359
- false: "",
360
- },
361
344
  invalid: {
362
345
  true: [
363
346
  "border-red-600",
@@ -397,6 +380,23 @@ const cvaCheckbox = cssClassVarianceUtilities.cvaMerge([
397
380
  "group-focus:border-blue-800",
398
381
  ],
399
382
  },
383
+ disabled: {
384
+ true: [
385
+ "bg-slate-300",
386
+ "border-slate-300",
387
+ "cursor-not-allowed",
388
+ "group-hover:bg-slate-300",
389
+ "group-focus:bg-slate-300",
390
+ "hover:bg-slate-300",
391
+ "focus:bg-slate-300",
392
+ "active:bg-slate-300",
393
+ "focus:ring-0",
394
+ "focus:ring-offset-0",
395
+ "group-active:ring-0",
396
+ "group-active:ring-offset-0",
397
+ ],
398
+ false: "",
399
+ },
400
400
  },
401
401
  compoundVariants: [
402
402
  {
@@ -421,7 +421,7 @@ const cvaCheckbox = cssClassVarianceUtilities.cvaMerge([
421
421
  ],
422
422
  defaultVariants: {
423
423
  state: "deselected",
424
- }
424
+ },
425
425
  });
426
426
  const cvaCheckboxContainer = cssClassVarianceUtilities.cvaMerge([
427
427
  "grid",
@@ -3110,7 +3110,9 @@ const EmailField = React.forwardRef((_a, ref) => {
3110
3110
  *
3111
3111
  * NOTE: If shown with a label, please use the `NumberField` component instead.
3112
3112
  */
3113
- const NumberInput = React.forwardRef((props, ref) => (jsxRuntime.jsx(BaseInput, Object.assign({ ref: ref, type: "number" }, props))));
3113
+ const NumberInput = React.forwardRef((props, ref) => {
3114
+ return jsxRuntime.jsx(BaseInput, Object.assign({ ref: ref, type: "number" }, props, { value: props.value }));
3115
+ });
3114
3116
 
3115
3117
  /**
3116
3118
  * The number field component is used for entering numeric values and includes controls for incrementally increasing or decreasing the value.
package/index.esm.js CHANGED
@@ -315,23 +315,6 @@ const cvaCheckbox = cvaMerge([
315
315
  "group-active:ring-blue-700",
316
316
  ], {
317
317
  variants: {
318
- disabled: {
319
- true: [
320
- "bg-slate-300",
321
- "border-slate-300",
322
- "cursor-not-allowed",
323
- "group-hover:bg-slate-300",
324
- "group-focus:bg-slate-300",
325
- "hover:bg-slate-300",
326
- "focus:bg-slate-300",
327
- "active:bg-slate-300",
328
- "focus:ring-0",
329
- "focus:ring-offset-0",
330
- "group-active:ring-0",
331
- "group-active:ring-offset-0",
332
- ],
333
- false: "",
334
- },
335
318
  invalid: {
336
319
  true: [
337
320
  "border-red-600",
@@ -371,6 +354,23 @@ const cvaCheckbox = cvaMerge([
371
354
  "group-focus:border-blue-800",
372
355
  ],
373
356
  },
357
+ disabled: {
358
+ true: [
359
+ "bg-slate-300",
360
+ "border-slate-300",
361
+ "cursor-not-allowed",
362
+ "group-hover:bg-slate-300",
363
+ "group-focus:bg-slate-300",
364
+ "hover:bg-slate-300",
365
+ "focus:bg-slate-300",
366
+ "active:bg-slate-300",
367
+ "focus:ring-0",
368
+ "focus:ring-offset-0",
369
+ "group-active:ring-0",
370
+ "group-active:ring-offset-0",
371
+ ],
372
+ false: "",
373
+ },
374
374
  },
375
375
  compoundVariants: [
376
376
  {
@@ -395,7 +395,7 @@ const cvaCheckbox = cvaMerge([
395
395
  ],
396
396
  defaultVariants: {
397
397
  state: "deselected",
398
- }
398
+ },
399
399
  });
400
400
  const cvaCheckboxContainer = cvaMerge([
401
401
  "grid",
@@ -3084,7 +3084,9 @@ const EmailField = forwardRef((_a, ref) => {
3084
3084
  *
3085
3085
  * NOTE: If shown with a label, please use the `NumberField` component instead.
3086
3086
  */
3087
- const NumberInput = forwardRef((props, ref) => (jsx$1(BaseInput, Object.assign({ ref: ref, type: "number" }, props))));
3087
+ const NumberInput = forwardRef((props, ref) => {
3088
+ return jsx$1(BaseInput, Object.assign({ ref: ref, type: "number" }, props, { value: props.value }));
3089
+ });
3088
3090
 
3089
3091
  /**
3090
3092
  * The number field component is used for entering numeric values and includes controls for incrementally increasing or decreasing the value.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-components",
3
- "version": "0.0.128",
3
+ "version": "0.0.129",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,8 +9,8 @@
9
9
  "dependencies": {
10
10
  "@trackunit/css-class-variance-utilities": "0.0.12",
11
11
  "@trackunit/i18n-library-translation": "0.0.72",
12
- "@trackunit/react-components": "0.1.150",
13
- "@trackunit/shared-utils": "0.0.3",
12
+ "@trackunit/react-components": "0.1.151",
13
+ "@trackunit/shared-utils": "0.0.4",
14
14
  "date-fns": "2.29.3",
15
15
  "libphonenumber-js": "1.10.36",
16
16
  "react": "18.2.0",
@@ -1,7 +1,7 @@
1
1
  export declare const cvaCheckbox: (props?: ({
2
- disabled?: boolean | null | undefined;
3
2
  invalid?: boolean | null | undefined;
4
3
  state?: "selected" | "deselected" | "indeterminate" | null | undefined;
4
+ disabled?: boolean | null | undefined;
5
5
  } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
6
  export declare const cvaCheckboxContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
7
7
  export declare const cvaCheckboxInput: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;