@oneplatformdev/ui 0.1.10-8 → 0.1.10-9

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/Badge/Badge.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { badgeVariants } from './badgeVariants';
2
- import { BadgeProps } from './/Badge.types';
3
- declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
4
- export { Badge, badgeVariants };
1
+ import { BadgeProps } from './Badge.types';
2
+ export declare function Badge({ className, variant, asChild, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Badge;
5
4
  //# sourceMappingURL=Badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAI1D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,wBAAgB,KAAK,CAAC,EACL,SAAS,EACT,OAAO,EACP,OAAe,EACf,GAAG,KAAK,EACT,EAAE,UAAU,2CAU3B;AAED,eAAe,KAAK,CAAA"}
package/Badge/Badge.js CHANGED
@@ -1,10 +1,23 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { cn as a } from "@oneplatformdev/utils";
3
- import { badgeVariants as i } from "./badgeVariants.js";
4
- function p({ className: r, variant: o, ...m }) {
5
- return /* @__PURE__ */ t("div", { className: a(i({ variant: o }), r), ...m });
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { badgeVariants as s } from "./badgeVariants.js";
3
+ import { Slot as e } from "@radix-ui/react-slot";
4
+ import { cn as p } from "@oneplatformdev/utils";
5
+ function c({
6
+ className: o,
7
+ variant: a,
8
+ asChild: t = !1,
9
+ ...r
10
+ }) {
11
+ return /* @__PURE__ */ m(
12
+ t ? e : "span",
13
+ {
14
+ "data-slot": "badge",
15
+ className: p(s({ variant: a }), o),
16
+ ...r
17
+ }
18
+ );
6
19
  }
7
20
  export {
8
- p as Badge,
9
- i as badgeVariants
21
+ c as Badge,
22
+ c as default
10
23
  };
@@ -1,6 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import { badgeVariants } from './badgeVariants';
3
3
  import * as React from "react";
4
- export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
4
+ export interface BadgeProps extends React.ComponentProps<"span">, VariantProps<typeof badgeVariants> {
5
+ asChild?: boolean;
5
6
  }
6
7
  //# sourceMappingURL=Badge.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.types.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG"}
1
+ {"version":3,"file":"Badge.types.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAClC,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"badgeVariants.d.ts","sourceRoot":"","sources":["../../src/Badge/badgeVariants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;8EAkBzB,CAAA"}
1
+ {"version":3,"file":"badgeVariants.d.ts","sourceRoot":"","sources":["../../src/Badge/badgeVariants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;8EAmBzB,CAAA"}
@@ -1,13 +1,13 @@
1
1
  import { cva as r } from "class-variance-authority";
2
2
  const t = r(
3
- "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",
3
+ "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
4
4
  {
5
5
  variants: {
6
6
  variant: {
7
- default: "border-transparent bg-primary text-primary-foreground shadow-sm hover:bg-primary/80",
8
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
9
- destructive: "border-transparent bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/80",
10
- outline: "text-foreground"
7
+ default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
8
+ secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
9
+ destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
10
+ outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
11
11
  }
12
12
  },
13
13
  defaultVariants: {
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.1.10-9 (2025-09-15)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated @oneplatformdev/utils to 0.1.1-59
6
+ - Updated @oneplatformdev/hooks to 0.1.0-45
7
+ - Updated @oneplatformdev/tokens to 0.0.1-32
8
+
1
9
  ## 0.1.10-8 (2025-09-15)
2
10
 
3
11
  ### 🧱 Updated Dependencies
@@ -1,8 +1,8 @@
1
- import * as React from 'react';
2
- import * as PopoverPrimitive from '@radix-ui/react-popover';
3
- declare const Popover: (props: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
4
- declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
6
- declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from "react";
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
6
+ declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
7
7
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
8
8
  //# sourceMappingURL=Popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAK5D,QAAA,MAAM,OAAO,GACX,OAAO,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,4CAIpE,CAAC;AAEF,QAAA,MAAM,cAAc,gHAA2B,CAAA;AAE/C,QAAA,MAAM,aAAa,4GAA0B,CAAA;AAE7C,QAAA,MAAM,cAAc,gKAwBlB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAErE;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE/E;AAED,iBAAS,cAAc,CAAC,EACE,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAe/E;AAED,iBAAS,aAAa,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2CAE7E;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA"}
@@ -1,36 +1,44 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import * as p from "react";
3
- import * as o from "@radix-ui/react-popover";
4
- import { cn as l } from "@oneplatformdev/utils";
5
- import { useDialogOverlayContainer as c } from "../Dialog/DialogOverlayScope.js";
6
- const h = (t) => {
7
- const { modal: e, ...r } = t;
8
- return /* @__PURE__ */ a(o.Root, { modal: e, ...r });
9
- }, P = o.Trigger, b = o.Anchor, f = p.forwardRef(({ className: t, align: e = "center", sideOffset: r = 4, style: n, avoidCollisions: i = !0, ...d }, s) => {
10
- const m = c();
11
- return /* @__PURE__ */ a(o.Portal, { container: m, children: /* @__PURE__ */ a(
12
- o.Content,
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import * as e from "@radix-ui/react-popover";
3
+ import { cn as i } from "@oneplatformdev/utils";
4
+ function s({
5
+ ...o
6
+ }) {
7
+ return /* @__PURE__ */ t(e.Root, { "data-slot": "popover", ...o });
8
+ }
9
+ function m({
10
+ ...o
11
+ }) {
12
+ return /* @__PURE__ */ t(e.Trigger, { "data-slot": "popover-trigger", ...o });
13
+ }
14
+ function f({
15
+ className: o,
16
+ align: r = "center",
17
+ sideOffset: a = 4,
18
+ ...n
19
+ }) {
20
+ return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ t(
21
+ e.Content,
13
22
  {
14
- ref: s,
15
- align: e,
16
- sideOffset: r,
17
- className: l(
18
- "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
19
- t
23
+ "data-slot": "popover-content",
24
+ align: r,
25
+ sideOffset: a,
26
+ className: i(
27
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
28
+ o
20
29
  ),
21
- style: {
22
- pointerEvents: "auto",
23
- ...n
24
- },
25
- ...d,
26
- avoidCollisions: i
30
+ ...n
27
31
  }
28
32
  ) });
29
- });
30
- f.displayName = o.Content.displayName;
33
+ }
34
+ function l({
35
+ ...o
36
+ }) {
37
+ return /* @__PURE__ */ t(e.Anchor, { "data-slot": "popover-anchor", ...o });
38
+ }
31
39
  export {
32
- h as Popover,
33
- b as PopoverAnchor,
40
+ s as Popover,
41
+ l as PopoverAnchor,
34
42
  f as PopoverContent,
35
- P as PopoverTrigger
43
+ m as PopoverTrigger
36
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.1.10-8",
3
+ "version": "0.1.10-9",
4
4
  "description": "React hook library",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [
@@ -107,8 +107,8 @@
107
107
  "sonner": "^2.0.7",
108
108
  "vaul": "^1.1.2",
109
109
  "zod": "^4.1.8",
110
- "@oneplatformdev/tokens": "^0.0.1-31",
111
- "@oneplatformdev/utils": "^0.1.1-58",
112
- "@oneplatformdev/hooks": "^0.1.0-44"
110
+ "@oneplatformdev/tokens": "^0.0.1-32",
111
+ "@oneplatformdev/hooks": "^0.1.0-45",
112
+ "@oneplatformdev/utils": "^0.1.1-59"
113
113
  }
114
114
  }