@oneplatformdev/ui 0.1.99-beta.41 → 0.1.99-beta.45

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.
@@ -36,7 +36,7 @@ function D(t) {
36
36
  "data-slot": "alert-dialog-content",
37
37
  className: l(
38
38
  "fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]",
39
- "grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg gap-4 p-6",
39
+ "grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg min-h-10 gap-4 p-6",
40
40
  "bg-background border rounded-lg shadow-lg",
41
41
  "overflow-x-hidden break-words",
42
42
  "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 duration-200",
@@ -53,7 +53,7 @@ function w(t) {
53
53
  "div",
54
54
  {
55
55
  "data-slot": "alert-dialog-header",
56
- className: l("flex flex-col gap-2 text-center sm:text-left", a),
56
+ className: l("flex flex-col gap-3 text-center sm:text-left", a),
57
57
  ...e
58
58
  }
59
59
  );
@@ -78,7 +78,7 @@ function v(t) {
78
78
  r.Title,
79
79
  {
80
80
  "data-slot": "alert-dialog-title",
81
- className: l("text-lg font-semibold break-words", a),
81
+ className: l("text-lg font-semibold break-words min-h-10 flex items-center", a),
82
82
  ...e
83
83
  }
84
84
  );
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialogRoot.js","sources":["../../src/AlertDialog/AlertDialogRoot.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '@oneplatformdev/utils';\nimport { ButtonProps, buttonVariants } from '../Button';\n\nfunction AlertDialogRoot(props: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger(props: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\nfunction AlertDialogPortal(props: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" asChild {...props} />;\n}\n\nfunction AlertDialogOverlay(props: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogContent(props: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg gap-4 p-6',\n 'bg-background border rounded-lg shadow-lg',\n 'overflow-x-hidden break-words',\n '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 duration-200',\n className\n )}\n {...rest}\n />\n </AlertDialogPortal>\n )\n}\n\n\nfunction AlertDialogHeader(props: React.ComponentProps<\"div\">) {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogFooter(props: React.ComponentProps<\"div\">) {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...rest}\n />\n )\n}\nfunction AlertDialogTitle(props: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\"text-lg font-semibold break-words\", className)}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogDescription(props: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-muted-foreground text-sm whitespace-pre-wrap break-words\", className)}\n {...rest}\n />\n )\n}\n\n\nfunction AlertDialogAction(props: React.ComponentProps<typeof AlertDialogPrimitive.Action> & ButtonProps) {\n const { className, variant, size, color, ...rest } = props;\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ variant, size, color }), className)}\n {...rest}\n />\n )\n}\nfunction AlertDialogCancel(props: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & ButtonProps) {\n const { className, variant, color = 'secondary', size, ...rest } = props\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant, size, color }), className)}\n {...rest}\n />\n )\n}\n\nexport {\n AlertDialogRoot,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogPrimitive\n};\n"],"names":["AlertDialogRoot","props","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogPortal","jsx","AlertDialogOverlay","className","rest","cn","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","variant","size","color","buttonVariants","AlertDialogCancel"],"mappings":";;;;;AAQA,SAASA,EAAgBC,GAA+D;AACtF,2BAAQC,EAAqB,MAArB,EAA0B,aAAU,gBAAgB,GAAGD,GAAO;AAC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lertDialog/AlertDialogRoot.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '@oneplatformdev/utils';\nimport { ButtonProps, buttonVariants } from '../Button';\n\nfunction AlertDialogRoot(props: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger(props: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\nfunction AlertDialogPortal(props: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" asChild {...props} />;\n}\n\nfunction AlertDialogOverlay(props: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogContent(props: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg min-h-10 gap-4 p-6',\n 'bg-background border rounded-lg shadow-lg',\n 'overflow-x-hidden break-words',\n '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 duration-200',\n className\n )}\n {...rest}\n />\n </AlertDialogPortal>\n )\n}\n\n\nfunction AlertDialogHeader(props: React.ComponentProps<\"div\">) {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\"flex flex-col gap-3 text-center sm:text-left\", className)}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogFooter(props: React.ComponentProps<\"div\">) {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...rest}\n />\n )\n}\nfunction AlertDialogTitle(props: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\"text-lg font-semibold break-words min-h-10 flex items-center\", className)}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogDescription(props: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-muted-foreground text-sm whitespace-pre-wrap break-words\", className)}\n {...rest}\n />\n )\n}\n\n\nfunction AlertDialogAction(props: React.ComponentProps<typeof AlertDialogPrimitive.Action> & ButtonProps) {\n const { className, variant, size, color, ...rest } = props;\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ variant, size, color }), className)}\n {...rest}\n />\n )\n}\nfunction AlertDialogCancel(props: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & ButtonProps) {\n const { className, variant, color = 'secondary', size, ...rest } = props\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant, size, color }), className)}\n {...rest}\n />\n )\n}\n\nexport {\n AlertDialogRoot,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogPrimitive\n};\n"],"names":["AlertDialogRoot","props","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogPortal","jsx","AlertDialogOverlay","className","rest","cn","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","variant","size","color","buttonVariants","AlertDialogCancel"],"mappings":";;;;;AAQA,SAASA,EAAgBC,GAA+D;AACtF,2BAAQC,EAAqB,MAArB,EAA0B,aAAU,gBAAgB,GAAGD,GAAO;AACxE;AAEA,SAASE,EAAmBF,GAAkE;AAC5F,2BAAQC,EAAqB,SAArB,EAA6B,aAAU,wBAAwB,GAAGD,GAAO;AACnF;AACA,SAASG,EAAkBH,GAAiE;AAC1F,SAAO,gBAAAI,EAACH,EAAqB,QAArB,EAA4B,aAAU,uBAAsB,SAAO,IAAE,GAAGD,GAAO;AACzF;AAEA,SAASK,EAAmBL,GAAkE;AAC5F,QAAM,EAAE,WAAAM,GAAW,GAAGC,EAAA,IAASP;AAC/B,SACE,gBAAAI;AAAA,IAACH,EAAqB;AAAA,IAArB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASE,EAAmBT,GAAkE;AAC5F,QAAM,EAAE,WAAAM,GAAW,GAAGC,EAAA,IAASP;AAC/B,2BACGG,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAmB;AAAA,IACpB,gBAAAD;AAAA,MAACH,EAAqB;AAAA,MAArB;AAAA,QACC,aAAU;AAAA,QACV,WAAWO;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACAF;AAAA,QAAA;AAAA,QAED,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;AAGA,SAASG,EAAkBV,GAAoC;AAC7D,QAAM,EAAE,WAAAM,GAAW,GAAGC,EAAA,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AAW,SAAAS,GAAS,OAAAE,IAAQ,aAAa,MAAAD,GAAM,GAAGT,MAASP;AACnE,SACE,gBAAAI;AAAA,IAACH,EAAqB;AAAA,IAArB;AAAA,MACC,WAAWO,EAAGU,EAAe,EAAE,SAAAH,GAAS,MAAAC,GAAM,OAAAC,EAAA,CAAO,GAAGX,CAAS;AAAA,MAChE,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.1.99-beta.42 (2026-01-14)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated @oneplatformdev/utils to 0.1.99-beta.42
6
+ - Updated @oneplatformdev/hooks to 0.1.99-beta.42
7
+ - Updated @oneplatformdev/tokens to 0.1.99-beta.42
8
+
1
9
  ## 0.1.99-beta.41 (2026-01-14)
2
10
 
3
11
  ### 🧱 Updated Dependencies
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBlock.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBtE,eAAO,MAAM,SAAS;YAAW,cAAc;;CAW9C,CAAA;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"InfoBlock.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBtE,eAAO,MAAM,SAAS;YAAW,cAAc;;CAe9C,CAAA;AAED,eAAe,SAAS,CAAC"}
@@ -1,27 +1,27 @@
1
- import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
- import { cn as s } from "@oneplatformdev/utils";
3
- import { infoBlockVariants as c } from "./infoBlockVariants.js";
4
- import { isValidElement as m, createElement as f } from "react";
5
- import { TriangleAlertIcon as p } from "lucide-react";
6
- const d = (r) => r ? m(r) ? r : f(r) : null, u = {
7
- error: /* @__PURE__ */ n(p, { className: "fill-[#DC2626] text-white!" })
8
- }, x = (r) => {
9
- const { className: t, variant: e = "error", content: o, icon: i, ...a } = r;
10
- return /* @__PURE__ */ l(
1
+ import { jsx as e, jsxs as s, Fragment as c } from "react/jsx-runtime";
2
+ import { cn as m } from "@oneplatformdev/utils";
3
+ import { infoBlockVariants as f } from "./infoBlockVariants.js";
4
+ import { isValidElement as d, createElement as p } from "react";
5
+ import { TriangleAlertIcon as u } from "lucide-react";
6
+ const h = (r) => r ? d(r) ? r : p(r) : null, x = {
7
+ error: /* @__PURE__ */ e(u, { className: "fill-[#DC2626] text-white!" })
8
+ }, B = (r) => {
9
+ const { className: t, variant: n = "error", content: o, icon: i, children: a, ...l } = r;
10
+ return /* @__PURE__ */ e(
11
11
  "div",
12
12
  {
13
- ...a,
14
- className: s(c({ className: t, variant: e })),
15
- children: [
16
- d(i ?? u[e]),
17
- /* @__PURE__ */ n("span", { children: o })
18
- ]
13
+ ...l,
14
+ className: m(f({ className: t, variant: n })),
15
+ children: a ?? /* @__PURE__ */ s(c, { children: [
16
+ h(i ?? x[n]),
17
+ /* @__PURE__ */ e("span", { children: o })
18
+ ] })
19
19
  }
20
20
  );
21
21
  };
22
- x.displayName = "InfoBlock";
22
+ B.displayName = "InfoBlock";
23
23
  export {
24
- x as InfoBlock,
25
- x as default
24
+ B as InfoBlock,
25
+ B as default
26
26
  };
27
27
  //# sourceMappingURL=InfoBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBlock.js","sources":["../../src/InfoBlock/InfoBlock.tsx"],"sourcesContent":["import { InfoBlockIconType, InfoBlockProps } from \"./InfoBlock.types\";\nimport { cn } from \"@oneplatformdev/utils\";\nimport { infoBlockVariants } from \"./infoBlockVariants\";\nimport { createElement, isValidElement } from \"react\";\nimport { TriangleAlertIcon } from \"lucide-react\";\n\nconst renderInnerIcon = (Icon?: InfoBlockIconType) => {\n if (!Icon) return null;\n if (isValidElement(Icon)) return Icon;\n return createElement(Icon);\n};\n\nconst iconByVariant: Record<NonNullable<InfoBlockProps['variant']>, InfoBlockIconType> = {\n error: <TriangleAlertIcon className='fill-[#DC2626] text-white!'/>\n}\n\nexport const InfoBlock = (props: InfoBlockProps) => {\n const { className, variant = 'error', content, icon, ...rest } = props;\n return (\n <div\n {...rest}\n className={cn(infoBlockVariants({ className, variant }))}\n >\n {renderInnerIcon(icon ?? iconByVariant[variant!])}\n <span>{content}</span>\n </div>\n )\n}\nInfoBlock.displayName = 'InfoBlock';\nexport default InfoBlock;\n\n"],"names":["renderInnerIcon","Icon","isValidElement","createElement","iconByVariant","jsx","TriangleAlertIcon","InfoBlock","props","className","variant","content","icon","rest","jsxs","cn","infoBlockVariants"],"mappings":";;;;;AAMA,MAAMA,IAAkB,CAACC,MAClBA,IACDC,EAAeD,CAAI,IAAUA,IAC1BE,EAAcF,CAAI,IAFP,MAKdG,IAAmF;AAAA,EACvF,OAAO,gBAAAC,EAACC,GAAA,EAAkB,WAAU,6BAAA,CAA4B;AAClE,GAEaC,IAAY,CAACC,MAA0B;AAClD,QAAM,EAAE,WAAAC,GAAW,SAAAC,IAAU,SAAS,SAAAC,GAAS,MAAAC,GAAM,GAAGC,MAASL;AACjE,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,WAAWE,EAAGC,EAAkB,EAAE,WAAAP,GAAW,SAAAC,EAAA,CAAS,CAAC;AAAA,MAEtD,UAAA;AAAA,QAAAV,EAAgBY,KAAQR,EAAcM,CAAQ,CAAC;AAAA,QAChD,gBAAAL,EAAC,UAAM,UAAAM,EAAA,CAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGrB;AACAJ,EAAU,cAAc;"}
1
+ {"version":3,"file":"InfoBlock.js","sources":["../../src/InfoBlock/InfoBlock.tsx"],"sourcesContent":["import { InfoBlockIconType, InfoBlockProps } from \"./InfoBlock.types\";\nimport { cn } from \"@oneplatformdev/utils\";\nimport { infoBlockVariants } from \"./infoBlockVariants\";\nimport { createElement, isValidElement } from \"react\";\nimport { TriangleAlertIcon } from \"lucide-react\";\n\nconst renderInnerIcon = (Icon?: InfoBlockIconType) => {\n if (!Icon) return null;\n if (isValidElement(Icon)) return Icon;\n return createElement(Icon);\n};\n\nconst iconByVariant: Record<NonNullable<InfoBlockProps['variant']>, InfoBlockIconType> = {\n error: <TriangleAlertIcon className='fill-[#DC2626] text-white!'/>\n}\n\nexport const InfoBlock = (props: InfoBlockProps) => {\n const { className, variant = 'error', content, icon, children, ...rest } = props;\n return (\n <div\n {...rest}\n className={cn(infoBlockVariants({ className, variant }))}\n >\n {children ?? (\n <>\n {renderInnerIcon(icon ?? iconByVariant[variant!])}\n <span>{content}</span>\n </>\n )}\n </div>\n )\n}\nInfoBlock.displayName = 'InfoBlock';\nexport default InfoBlock;\n\n"],"names":["renderInnerIcon","Icon","isValidElement","createElement","iconByVariant","jsx","TriangleAlertIcon","InfoBlock","props","className","variant","content","icon","children","rest","cn","infoBlockVariants","jsxs","Fragment"],"mappings":";;;;;AAMA,MAAMA,IAAkB,CAACC,MAClBA,IACDC,EAAeD,CAAI,IAAUA,IAC1BE,EAAcF,CAAI,IAFP,MAKdG,IAAmF;AAAA,EACvF,OAAO,gBAAAC,EAACC,GAAA,EAAkB,WAAU,6BAAA,CAA4B;AAClE,GAEaC,IAAY,CAACC,MAA0B;AAClD,QAAM,EAAE,WAAAC,GAAW,SAAAC,IAAU,SAAS,SAAAC,GAAS,MAAAC,GAAM,UAAAC,GAAU,GAAGC,EAAA,IAASN;AAC3E,SACE,gBAAAH;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGS;AAAA,MACJ,WAAWC,EAAGC,EAAkB,EAAE,WAAAP,GAAW,SAAAC,EAAA,CAAS,CAAC;AAAA,MAEtD,eACC,gBAAAO,EAAAC,GAAA,EACG,UAAA;AAAA,QAAAlB,EAAgBY,KAAQR,EAAcM,CAAQ,CAAC;AAAA,QAChD,gBAAAL,EAAC,UAAM,UAAAM,EAAA,CAAQ;AAAA,MAAA,EAAA,CACjB;AAAA,IAAA;AAAA,EAAA;AAIR;AACAJ,EAAU,cAAc;"}
@@ -1,7 +1,7 @@
1
1
  import { InfoBlockVariantsProps } from './infoBlockVariants';
2
- import { ComponentType, HTMLAttributes, ReactElement, ReactNode, SVGProps } from 'react';
2
+ import { ComponentType, HTMLAttributes, PropsWithChildren, ReactElement, ReactNode, SVGProps } from 'react';
3
3
  export type InfoBlockIconType = ComponentType<SVGProps<SVGSVGElement>> | ReactElement<SVGProps<SVGSVGElement>>;
4
- export interface InfoBlockProps extends InfoBlockVariantsProps, Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
4
+ export interface InfoBlockProps extends PropsWithChildren, InfoBlockVariantsProps, Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
5
5
  content?: ReactNode;
6
6
  icon?: InfoBlockIconType;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InfoBlock.types.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzF,MAAM,MAAM,iBAAiB,GACzB,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GACtC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE1C,MAAM,WAAW,cACf,SAAQ,sBAAsB,EAC5B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
1
+ {"version":3,"file":"InfoBlock.types.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,iBAAiB,GACzB,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GACtC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE1C,MAAM,WAAW,cACf,SAAQ,iBAAiB,EACvB,sBAAsB,EACtB,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.1.99-beta.41",
3
+ "version": "0.1.99-beta.45",
4
4
  "description": "UI component library for OnePlatform",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [
@@ -105,9 +105,9 @@
105
105
  "recharts": "^3.2.0",
106
106
  "sonner": "^2.0.7",
107
107
  "vaul": "^1.1.2",
108
- "@oneplatformdev/utils": "^0.1.99-beta.41",
109
- "@oneplatformdev/tokens": "^0.1.99-beta.41",
110
- "@oneplatformdev/hooks": "^0.1.99-beta.41"
108
+ "@oneplatformdev/hooks": "^0.1.99-beta.45",
109
+ "@oneplatformdev/tokens": "^0.1.99-beta.45",
110
+ "@oneplatformdev/utils": "^0.1.99-beta.45"
111
111
  },
112
112
  "scripts": {
113
113
  "chromatic": "chromatic"