@jbpark/ui-kit 2.0.0 → 2.1.0

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.
@@ -0,0 +1,16 @@
1
+ import * as React$1 from "react";
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+
5
+ //#region src/lib/utils/index.ts
6
+ function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+ function renderConditional(value, wrapper) {
10
+ if (value === null || value === void 0) return null;
11
+ if (React$1.isValidElement(value)) return value;
12
+ return wrapper ? wrapper(value) : value;
13
+ }
14
+
15
+ //#endregion
16
+ export { renderConditional as n, cn as t };
package/dist/utils.d.mts CHANGED
@@ -1,6 +1,8 @@
1
+ import * as React$1 from "react";
1
2
  import { ClassValue } from "clsx";
2
3
 
3
4
  //#region src/lib/utils/index.d.ts
4
5
  declare function cn(...inputs: ClassValue[]): string;
6
+ declare function renderConditional<T extends React$1.ReactNode>(value: T, wrapper?: (value: NonNullable<T>) => React$1.ReactNode): React$1.ReactNode;
5
7
  //#endregion
6
- export { cn };
8
+ export { cn, renderConditional };
package/dist/utils.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { t as cn } from "./utils-DEenfsJ-.mjs";
1
+ import { n as renderConditional, t as cn } from "./utils-CssUrKWE.mjs";
2
2
 
3
- export { cn };
3
+ export { cn, renderConditional };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbpark/ui-kit",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Modern React UI component library built with TypeScript, Tailwind CSS, and Radix UI. Featuring atoms, molecules, organisms and layout templates for building beautiful interfaces.",
5
5
  "keywords": [
6
6
  "react",
@@ -88,6 +88,7 @@
88
88
  "@radix-ui/react-checkbox": "^1.3.3",
89
89
  "@radix-ui/react-dialog": "^1.1.15",
90
90
  "@radix-ui/react-label": "^2.1.8",
91
+ "@radix-ui/react-popover": "^1.1.15",
91
92
  "@radix-ui/react-progress": "^1.1.7",
92
93
  "@radix-ui/react-slot": "^1.2.3",
93
94
  "@radix-ui/react-switch": "^1.2.6",
@@ -1,10 +0,0 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- //#region src/lib/utils/index.ts
5
- function cn(...inputs) {
6
- return twMerge(clsx(inputs));
7
- }
8
-
9
- //#endregion
10
- export { cn as t };