pf-common-components 1.1.1 → 1.1.2

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/dist/ui/input.js CHANGED
@@ -12,9 +12,10 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import * as React from "react";
14
14
  import { cn } from "../lib/utils";
15
+ import { ccn } from "../lib/CommonComponentsUtil";
15
16
  const Input = React.forwardRef((_a, ref) => {
16
17
  var { className, type, extendedType, error } = _a, props = __rest(_a, ["className", "type", "extendedType", "error"]);
17
- return (_jsx("input", Object.assign({ type: type, className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", error && "border-red", className), ref: ref }, props)));
18
+ return (_jsx("input", Object.assign({ type: type, className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", ccn(error, props === null || props === void 0 ? void 0 : props.value), className), ref: ref }, props)));
18
19
  });
19
20
  Input.displayName = "Input";
20
21
  export { Input };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pf-common-components",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "npm package for bx-ui",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/ui/input.tsx CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as React from "react"
2
2
  import { cn } from "../lib/utils"
3
+ import { ccn } from "../lib/CommonComponentsUtil";
3
4
 
4
5
  export interface InputProps
5
6
  extends React.InputHTMLAttributes<HTMLInputElement> {
@@ -14,7 +15,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
14
15
  type={type}
15
16
  className={cn(
16
17
  "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
17
- error && "border-red",
18
+ ccn(error, props?.value),
18
19
  className
19
20
  )}
20
21
  ref={ref}