pf-common-components 1.0.6 → 1.0.8

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/global.css CHANGED
@@ -1585,6 +1585,10 @@ video {
1585
1585
  .border-red {
1586
1586
  border-color: var(--color-red);
1587
1587
  }
1588
+ .border-red-500 {
1589
+ --tw-border-opacity: 1;
1590
+ border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
1591
+ }
1588
1592
  .border-secondary\/20 {
1589
1593
  border-color: hsl(var(--secondary) / 0.2);
1590
1594
  }
@@ -54,7 +54,7 @@ declare const MVPSelectSeparator: React.ForwardRefExoticComponent<Omit<React.HTM
54
54
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
55
  declare const MVPSelectItem: React.ForwardRefExoticComponent<Omit<{
56
56
  children?: React.ReactNode;
57
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect" | "disabled" | "value"> & {
57
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "disabled" | "value" | "onSelect"> & {
58
58
  disabled?: boolean;
59
59
  onSelect?: (value: string) => void;
60
60
  value?: string;
@@ -24,7 +24,7 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
24
24
  } & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
25
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
26
26
  children?: React.ReactNode;
27
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "heading" | "value"> & {
27
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "value" | "heading"> & {
28
28
  heading?: React.ReactNode;
29
29
  value?: string;
30
30
  forceMount?: boolean;
@@ -34,7 +34,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<React.HTMLA
34
34
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
35
35
  declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
36
36
  children?: React.ReactNode;
37
- } & Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect" | "disabled" | "value"> & {
37
+ } & Omit<React.HTMLAttributes<HTMLDivElement>, "disabled" | "value" | "onSelect"> & {
38
38
  disabled?: boolean;
39
39
  onSelect?: (value: string) => void;
40
40
  value?: string;
package/dist/ui/input.js CHANGED
@@ -12,10 +12,9 @@ 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 "src/lib/CommonComponentsUtil";
16
15
  const Input = React.forwardRef((_a, ref) => {
17
16
  var { className, type, extendedType, error } = _a, props = __rest(_a, ["className", "type", "extendedType", "error"]);
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)));
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 border-red-500", className), ref: ref }, props)));
19
18
  });
20
19
  Input.displayName = "Input";
21
20
  export { Input };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pf-common-components",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "npm package for bx-ui",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/ui/input.tsx CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as React from "react"
2
2
  import { cn } from "../lib/utils"
3
- import { ccn } from "src/lib/CommonComponentsUtil";
4
3
 
5
4
  export interface InputProps
6
5
  extends React.InputHTMLAttributes<HTMLInputElement> {
@@ -15,7 +14,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
15
14
  type={type}
16
15
  className={cn(
17
16
  "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",
18
- ccn(error, props?.value),
17
+ error && "border border-red-500",
19
18
  className
20
19
  )}
21
20
  ref={ref}