@oneplatformdev/ui 0.1.10-80 → 0.1.10-82

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../src/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,EAAE,EAEF,iBAAiB,EAGlB,MAAM,OAAO,CAAC;AAYf,OAAO,EAKL,gBAAgB,EAGjB,MAAM,qBAAqB,CAAC;AAoI7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAiC/D,CAAA;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../src/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,EAAE,EAEF,iBAAiB,EAGlB,MAAM,OAAO,CAAC;AAYf,OAAO,EAKL,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAwH7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAiC/D,CAAA;AAED,eAAe,WAAW,CAAC"}
@@ -1,35 +1,29 @@
1
1
  import { jsxs as g, jsx as t } from "react/jsx-runtime";
2
- import { cloneElement as a, useId as j, Children as y } from "react";
3
- import { AlertDialogRoot as E, AlertDialogContent as h, AlertDialogTrigger as B, AlertDialogHeader as f, AlertDialogTitle as v, AlertDialogDescription as R, AlertDialogFooter as A, AlertDialogAction as D, AlertDialogCancel as k } from "./AlertDialogRoot.js";
2
+ import { cloneElement as d, useId as b, Children as j } from "react";
3
+ import { AlertDialogRoot as y, AlertDialogContent as u, AlertDialogTrigger as E, AlertDialogHeader as f, AlertDialogTitle as B, AlertDialogDescription as v, AlertDialogFooter as A, AlertDialogAction as D, AlertDialogCancel as R } from "./AlertDialogRoot.js";
4
4
  import { isValidReactElement as s } from "@oneplatformdev/utils";
5
5
  const F = (o) => {
6
6
  const { slotProps: e = {}, children: r } = o, i = e.trigger ?? {};
7
- return s(r, B) ? a(
8
- r,
9
- {
10
- ...r.props || {},
11
- ...i
12
- }
13
- ) : /* @__PURE__ */ t(B, { asChild: !0, children: r });
7
+ return /* @__PURE__ */ t(E, { asChild: !0, ...i, children: r });
14
8
  }, H = (o) => {
15
9
  const {
16
10
  title: e = "",
17
11
  description: r = "",
18
12
  slotProps: i = {},
19
13
  children: l
20
- } = o, n = i.header ?? {}, d = i.title ?? {}, c = i.description ?? {};
21
- return l ? s(l, f) ? a(
14
+ } = o, n = i.header ?? {}, a = i.title ?? {}, c = i.description ?? {};
15
+ return l ? s(l, f) ? d(
22
16
  l,
23
17
  { ...l.props || {}, ...n }
24
18
  ) : /* @__PURE__ */ t(f, { ...n, children: l }) : /* @__PURE__ */ g(f, { children: [
25
- e && s(e, v) ? a(
19
+ e && s(e, B) ? d(
26
20
  e,
27
- { ...e.props || {}, ...d }
28
- ) : /* @__PURE__ */ t(v, { ...d, children: e }),
29
- r && s(r, R) ? a(
21
+ { ...e.props || {}, ...a }
22
+ ) : /* @__PURE__ */ t(B, { ...a, children: e }),
23
+ r && s(r, v) ? d(
30
24
  r,
31
25
  { ...r.props || {}, ...c }
32
- ) : /* @__PURE__ */ t(R, { ...c, children: r })
26
+ ) : /* @__PURE__ */ t(v, { ...c, children: r })
33
27
  ] });
34
28
  }, I = (o) => {
35
29
  const {
@@ -38,22 +32,22 @@ const F = (o) => {
38
32
  onCancel: i,
39
33
  onConfirm: l,
40
34
  cancelLabel: n = "Cancel",
41
- actionLabel: d = "Continue",
35
+ actionLabel: a = "Continue",
42
36
  variant: c = "confirm"
43
- } = o, x = j(), m = e.footer ?? {}, T = e.cancelButton ?? {}, C = e.actionButton ?? {};
44
- return r ? s(r, A) ? a(
37
+ } = o, k = b(), m = e.footer ?? {}, x = e.cancelButton ?? {}, C = e.actionButton ?? {};
38
+ return r ? s(r, A) ? d(
45
39
  r,
46
40
  { ...r.props || {}, ...m }
47
- ) : /* @__PURE__ */ t(A, { ...m, children: y.map(r, (p, b) => {
41
+ ) : /* @__PURE__ */ t(A, { ...m, children: j.map(r, (p, T) => {
48
42
  if (!p || !s(p)) return;
49
- const u = p, P = a(u, { ...u.props || {}, key: u.key || `footer-${x}-action-${b}` });
50
- return s(p, D) || s(p, k) ? P : /* @__PURE__ */ t(D, { asChild: !0, children: P });
43
+ const h = p, P = d(h, { ...h.props || {}, key: h.key || `footer-${k}-action-${T}` });
44
+ return s(p, D) || s(p, R) ? P : /* @__PURE__ */ t(D, { asChild: !0, children: P });
51
45
  }) }) : /* @__PURE__ */ g(A, { children: [
52
46
  c !== "alert" && /* @__PURE__ */ t(
53
- k,
47
+ R,
54
48
  {
55
49
  onClick: i,
56
- ...T,
50
+ ...x,
57
51
  children: n
58
52
  }
59
53
  ),
@@ -63,7 +57,7 @@ const F = (o) => {
63
57
  onClick: l,
64
58
  ...C,
65
59
  variant: C.variant || c === "destructive" ? "destructive" : "default",
66
- children: d
60
+ children: a
67
61
  }
68
62
  )
69
63
  ] });
@@ -74,17 +68,17 @@ const F = (o) => {
74
68
  footer: i,
75
69
  slotProps: l = {},
76
70
  children: n,
77
- ...d
71
+ ...a
78
72
  } = o, c = l.content ?? {};
79
- return /* @__PURE__ */ g(E, { ...d, children: [
73
+ return /* @__PURE__ */ g(y, { ...a, children: [
80
74
  /* @__PURE__ */ t(F, { ...o, children: e }),
81
- n ? s(n, h) ? a(
75
+ n ? s(n, u) ? d(
82
76
  n,
83
77
  {
84
78
  ...n.props || {},
85
79
  ...c
86
80
  }
87
- ) : /* @__PURE__ */ t(h, { ...c, children: n }) : /* @__PURE__ */ g(h, { ...c, children: [
81
+ ) : /* @__PURE__ */ t(u, { ...c, children: n }) : /* @__PURE__ */ g(u, { ...c, children: [
88
82
  /* @__PURE__ */ t(H, { ...o, children: r }),
89
83
  /* @__PURE__ */ t(I, { ...o, children: i })
90
84
  ] })
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialog.js","sources":["../../src/AlertDialog/AlertDialog.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n FC,\n Key,\n PropsWithChildren,\n ReactElement,\n useId,\n} from 'react';\nimport {\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogRoot,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from './AlertDialogRoot';\nimport {\n AlertDialogContentProps,\n AlertDialogDescriptionProps,\n AlertDialogFooterProps,\n AlertDialogHeaderProps,\n AlertDialogProps,\n AlertDialogTitleProps,\n AlertDialogTriggerProps,\n} from './AlertDialog.types';\n\nimport { isValidReactElement } from '@oneplatformdev/utils';\n\nconst RenderAlertDialogTrigger: FC<PropsWithChildren<AlertDialogProps>> = (\n props\n) => {\n const { slotProps = {}, children } = props;\n\n const triggerProps = slotProps.trigger ?? {};\n\n if (isValidReactElement(children, AlertDialogTrigger)) {\n return cloneElement<AlertDialogTriggerProps>(\n children as ReactElement<AlertDialogTriggerProps>,\n {\n ...((children as ReactElement<AlertDialogTriggerProps>).props || {}),\n ...triggerProps,\n }\n );\n }\n\n return <AlertDialogTrigger asChild>{children}</AlertDialogTrigger>;\n};\n\nconst RenderAlertDialogHeader: FC<PropsWithChildren<AlertDialogProps>> = (props) => {\n const {\n title = '',\n description = '',\n slotProps = {},\n children,\n } = props;\n\n const headerProps = slotProps.header ?? {};\n const titleProps = slotProps.title ?? {};\n const descriptionProps = slotProps.description ?? {};\n\n if(children) {\n return isValidReactElement(children, AlertDialogHeader)\n ? cloneElement<AlertDialogHeaderProps>(\n children as ReactElement<AlertDialogHeaderProps>,\n { ...((children as ReactElement<AlertDialogHeaderProps>).props || {}), ...headerProps }\n )\n : <AlertDialogHeader {...headerProps}>{children}</AlertDialogHeader>\n }\n\n return (\n <AlertDialogHeader>\n {Boolean(title) && isValidReactElement(title, AlertDialogTitle)\n ? cloneElement<AlertDialogTitleProps>(\n title as ReactElement<AlertDialogTitleProps>,\n { ...((title as ReactElement<AlertDialogTitleProps>).props || {}), ...titleProps }\n )\n : <AlertDialogTitle {...titleProps}>{title}</AlertDialogTitle>}\n\n {Boolean(description) && isValidReactElement(description, AlertDialogDescription)\n ? cloneElement<AlertDialogDescriptionProps>(\n description as ReactElement<AlertDialogDescriptionProps>,\n { ...((description as ReactElement<AlertDialogDescriptionProps>).props || {}), ...descriptionProps }\n )\n : <AlertDialogDescription {...descriptionProps}>{description}</AlertDialogDescription>\n }\n </AlertDialogHeader>\n )\n}\n\nconst RenderAlertDialogFooter: FC<PropsWithChildren<AlertDialogProps>> = (props) => {\n const {\n slotProps = {},\n children,\n onCancel,\n onConfirm,\n cancelLabel = 'Cancel',\n actionLabel = 'Continue',\n variant = 'confirm',\n } = props;\n const footerId = useId();\n\n const footerProps = slotProps.footer ?? {};\n const cancelButtonProps = slotProps.cancelButton ?? {};\n const actionButtonProps = slotProps.actionButton ?? {};\n\n if(children) {\n return isValidReactElement(children, AlertDialogFooter)\n ? cloneElement<AlertDialogFooterProps>(\n children as ReactElement<AlertDialogFooterProps>,\n { ...((children as ReactElement<AlertDialogFooterProps>).props || {}), ...footerProps }\n )\n : (\n <AlertDialogFooter {...footerProps}>\n {Children.map(children, (child, i) => {\n if(!child || !isValidReactElement(child)) return;\n\n const reactChild = child as ReactElement;\n const clonedChild = cloneElement(reactChild, {...(reactChild.props || {}), key: (reactChild.key || `footer-${footerId}-action-${i}` as unknown as Key)});\n\n if(isValidReactElement(child, AlertDialogAction) || isValidReactElement(child, AlertDialogCancel)) {\n return clonedChild;\n }\n\n return (\n <AlertDialogAction asChild>\n {clonedChild}\n </AlertDialogAction>\n )\n })}\n </AlertDialogFooter>\n )\n }\n\n return (\n <AlertDialogFooter>\n {variant !== 'alert' && (\n <AlertDialogCancel\n onClick={onCancel}\n {...cancelButtonProps}\n >\n {cancelLabel}\n </AlertDialogCancel>\n )}\n <AlertDialogAction\n onClick={onConfirm}\n {...actionButtonProps}\n variant={\n actionButtonProps.variant || variant === 'destructive' ? 'destructive' : 'default'\n }\n >\n {actionLabel}\n </AlertDialogAction>\n </AlertDialogFooter>\n )\n}\n\n/**\n * Component for show Alert Dialog.\n * @public\n * @see [Documentation](#)\n * @example\n * > Import:\n * ```tsx\n * import { AlertDialog } from '@oneplatformdev/ui/AlertDialog';\n * ```\n * > Simple example:\n * ```tsx\n * <AlertDialog\n * trigger={'Trigger text'} // may be any ReactNode | Button | string\n * variant='alert' // 'confirm' (default) | 'alert' | 'destructive'\n * title='Dialog title'\n * description='Description text...'\n * />\n * ```\n * > Base example:\n * ```tsx\n * <AlertDialog\n * trigger={<Button variant=\"outline\">Simple Trigger</Button>}\n * title='Dialog title'\n * description='Description text...'\n * onCancel={(event) => console.log(event, 'Cancel')}\n * onConfirm={(event) => console.log(event, 'Confirm')}\n * />\n * ```\n * > Trigger example: Button with icon children\n * ```tsx\n * <AlertDialog\n * trigger={<Button variant=\"outline\" size=\"icon\"><PencilLine /></Button>}\n * title=\"Dialog title with icon trigger\"\n * description=\"Description text...\"\n * onCancel={(event) => console.log(event, 'Cancel')}\n * onConfirm={(event) => console.log(event, 'Confirm')}\n * />\n * ```\n *\n * > Full content example:\n * ```tsx\n * <AlertDialog trigger={<Button variant=\"outline\">Full Content Trigger</Button>}>\n * Full Content...\n * </AlertDialog>\n * ```\n *\n * > Full control example:\n * ```tsx\n * <AlertDialog\n * open={true}\n * onOpenChange={(nextState) => console.log(nextState)}\n * trigger={<Button variant=\"outline\">Control Trigger</Button>}\n * header={<div>Custom Header</div>}\n * footer={[\n * <Button key='cancel' variant=\"outline\" onClick={() => {}}>On Action</Button>,\n * <Button key='action' variant=\"outline\" onClick={() => {}}>On Action</Button>,\n * ]}\n * />\n * ```\n */\nexport const AlertDialog: FC<PropsWithChildren<AlertDialogProps>> = (props) => {\n const {\n trigger,\n header,\n footer,\n slotProps = {},\n children,\n ...rest\n } = props;\n\n const contentProps = slotProps.content ?? {};\n\n return (\n <AlertDialogRoot {...rest}>\n <RenderAlertDialogTrigger {...props}>{trigger}</RenderAlertDialogTrigger>\n {children\n ? isValidReactElement(children, AlertDialogContent)\n ? cloneElement<AlertDialogContentProps>(\n children as ReactElement<AlertDialogContentProps>,\n {\n ...((children as ReactElement<AlertDialogContentProps>).props || {}),\n ...contentProps\n })\n : <AlertDialogContent {...contentProps}>{children}</AlertDialogContent>\n : (\n <AlertDialogContent {...contentProps}>\n <RenderAlertDialogHeader {...props}>{header}</RenderAlertDialogHeader>\n <RenderAlertDialogFooter {...props}>{footer}</RenderAlertDialogFooter>\n </AlertDialogContent>\n )\n }\n </AlertDialogRoot>\n )\n}\n\nexport default AlertDialog;\n"],"names":["RenderAlertDialogTrigger","props","slotProps","children","triggerProps","isValidReactElement","AlertDialogTrigger","cloneElement","jsx","RenderAlertDialogHeader","title","description","headerProps","titleProps","descriptionProps","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","RenderAlertDialogFooter","onCancel","onConfirm","cancelLabel","actionLabel","variant","footerId","useId","footerProps","cancelButtonProps","actionButtonProps","AlertDialogFooter","child","i","reactChild","clonedChild","AlertDialogAction","AlertDialogCancel","AlertDialog","trigger","header","footer","rest","contentProps","jsxs","AlertDialogRoot","AlertDialogContent"],"mappings":";;;;AAgCA,MAAMA,IAAoE,CACxEC,MACG;AACH,QAAM,EAAE,WAAAC,IAAY,IAAI,UAAAC,MAAaF,GAE/BG,IAAeF,EAAU,WAAW,CAAA;AAE1C,SAAIG,EAAoBF,GAAUG,CAAkB,IAC3CC;AAAA,IACLJ;AAAA,IACA;AAAA,MACE,GAAKA,EAAmD,SAAS,CAAA;AAAA,MACjE,GAAGC;AAAA,IAAA;AAAA,EACL,IAIG,gBA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C;AAAA,EAAA,IACDvC,GAEEwC,IAAevC,EAAU,WAAW,CAAA;AAE1C,SACE,gBAAAwC,EAACC,GAAA,EAAiB,GAAGH,GACnB,UAAA;AAAA,IAAA,gBAAAhC,EAACR,GAAA,EAA0B,GAAGC,GAAQ,UAAAoC,EAAA,CAAQ;AAAA,IAC7ClC,IACGE,EAAoBF,GAAUyC,CAAkB,IAC9CrC;AAAA,MACAJ;AAAA,MACA;AAAA,QACE,GAAKA,EAAmD,SAAS,CAAA;AAAA,QACjE,GAAGsC;AAAA,MAAA;AAAA,IACL,IACA,gBAAAjC,EAACoC,GAAA,EAAoB,GAAGH,GAAe,UAAAtC,GAAS,IAElD,gBAAAuC,EAACE,GAAA,EAAoB,GAAGH,GACtB,UAAA;AAAA,MAAA,gBAAAjC,EAACC,GAAA,EAAyB,GAAGR,GAAQ,UAAAqC,EAAA,CAAO;AAAA,MAC5C,gBAAA9B,EAACU,GAAA,EAAyB,GAAGjB,GAAQ,UAAAsC,EAAA,CAAO;AAAA,IAAA,EAAA,CAC9C;AAAA,EAAA,GAGN;AAEJ;"}
1
+ {"version":3,"file":"AlertDialog.js","sources":["../../src/AlertDialog/AlertDialog.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n FC,\n Key,\n PropsWithChildren,\n ReactElement,\n useId,\n} from 'react';\nimport {\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogRoot,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from './AlertDialogRoot';\nimport {\n AlertDialogContentProps,\n AlertDialogDescriptionProps,\n AlertDialogFooterProps,\n AlertDialogHeaderProps,\n AlertDialogProps,\n AlertDialogTitleProps,\n} from './AlertDialog.types';\n\nimport { isValidReactElement } from '@oneplatformdev/utils';\n\nconst RenderAlertDialogTrigger: FC<PropsWithChildren<AlertDialogProps>> = (\n props\n) => {\n const { slotProps = {}, children } = props;\n const triggerProps = slotProps.trigger ?? {};\n return <AlertDialogTrigger asChild {...triggerProps}>{children}</AlertDialogTrigger>;\n};\n\nconst RenderAlertDialogHeader: FC<PropsWithChildren<AlertDialogProps>> = (props) => {\n const {\n title = '',\n description = '',\n slotProps = {},\n children,\n } = props;\n\n const headerProps = slotProps.header ?? {};\n const titleProps = slotProps.title ?? {};\n const descriptionProps = slotProps.description ?? {};\n\n if(children) {\n return isValidReactElement(children, AlertDialogHeader)\n ? cloneElement<AlertDialogHeaderProps>(\n children as ReactElement<AlertDialogHeaderProps>,\n { ...((children as ReactElement<AlertDialogHeaderProps>).props || {}), ...headerProps }\n )\n : <AlertDialogHeader {...headerProps}>{children}</AlertDialogHeader>\n }\n\n return (\n <AlertDialogHeader>\n {Boolean(title) && isValidReactElement(title, AlertDialogTitle)\n ? cloneElement<AlertDialogTitleProps>(\n title as ReactElement<AlertDialogTitleProps>,\n { ...((title as ReactElement<AlertDialogTitleProps>).props || {}), ...titleProps }\n )\n : <AlertDialogTitle {...titleProps}>{title}</AlertDialogTitle>}\n\n {Boolean(description) && isValidReactElement(description, AlertDialogDescription)\n ? cloneElement<AlertDialogDescriptionProps>(\n description as ReactElement<AlertDialogDescriptionProps>,\n { ...((description as ReactElement<AlertDialogDescriptionProps>).props || {}), ...descriptionProps }\n )\n : <AlertDialogDescription {...descriptionProps}>{description}</AlertDialogDescription>\n }\n </AlertDialogHeader>\n )\n}\n\nconst RenderAlertDialogFooter: FC<PropsWithChildren<AlertDialogProps>> = (props) => {\n const {\n slotProps = {},\n children,\n onCancel,\n onConfirm,\n cancelLabel = 'Cancel',\n actionLabel = 'Continue',\n variant = 'confirm',\n } = props;\n const footerId = useId();\n\n const footerProps = slotProps.footer ?? {};\n const cancelButtonProps = slotProps.cancelButton ?? {};\n const actionButtonProps = slotProps.actionButton ?? {};\n\n if(children) {\n return isValidReactElement(children, AlertDialogFooter)\n ? cloneElement<AlertDialogFooterProps>(\n children as ReactElement<AlertDialogFooterProps>,\n { ...((children as ReactElement<AlertDialogFooterProps>).props || {}), ...footerProps }\n )\n : (\n <AlertDialogFooter {...footerProps}>\n {Children.map(children, (child, i) => {\n if(!child || !isValidReactElement(child)) return;\n\n const reactChild = child as ReactElement;\n const clonedChild = cloneElement(reactChild, {...(reactChild.props || {}), key: (reactChild.key || `footer-${footerId}-action-${i}` as unknown as Key)});\n\n if(isValidReactElement(child, AlertDialogAction) || isValidReactElement(child, AlertDialogCancel)) {\n return clonedChild;\n }\n\n return (\n <AlertDialogAction asChild>\n {clonedChild}\n </AlertDialogAction>\n )\n })}\n </AlertDialogFooter>\n )\n }\n\n return (\n <AlertDialogFooter>\n {variant !== 'alert' && (\n <AlertDialogCancel\n onClick={onCancel}\n {...cancelButtonProps}\n >\n {cancelLabel}\n </AlertDialogCancel>\n )}\n <AlertDialogAction\n onClick={onConfirm}\n {...actionButtonProps}\n variant={\n actionButtonProps.variant || variant === 'destructive' ? 'destructive' : 'default'\n }\n >\n {actionLabel}\n </AlertDialogAction>\n </AlertDialogFooter>\n )\n}\n\n/**\n * Component for show Alert Dialog.\n * @public\n * @see [Documentation](#)\n * @example\n * > Import:\n * ```tsx\n * import { AlertDialog } from '@oneplatformdev/ui/AlertDialog';\n * ```\n * > Simple example:\n * ```tsx\n * <AlertDialog\n * trigger={'Trigger text'} // may be any ReactNode | Button | string\n * variant='alert' // 'confirm' (default) | 'alert' | 'destructive'\n * title='Dialog title'\n * description='Description text...'\n * />\n * ```\n * > Base example:\n * ```tsx\n * <AlertDialog\n * trigger={<Button variant=\"outline\">Simple Trigger</Button>}\n * title='Dialog title'\n * description='Description text...'\n * onCancel={(event) => console.log(event, 'Cancel')}\n * onConfirm={(event) => console.log(event, 'Confirm')}\n * />\n * ```\n * > Trigger example: Button with icon children\n * ```tsx\n * <AlertDialog\n * trigger={<Button variant=\"outline\" size=\"icon\"><PencilLine /></Button>}\n * title=\"Dialog title with icon trigger\"\n * description=\"Description text...\"\n * onCancel={(event) => console.log(event, 'Cancel')}\n * onConfirm={(event) => console.log(event, 'Confirm')}\n * />\n * ```\n *\n * > Full content example:\n * ```tsx\n * <AlertDialog trigger={<Button variant=\"outline\">Full Content Trigger</Button>}>\n * Full Content...\n * </AlertDialog>\n * ```\n *\n * > Full control example:\n * ```tsx\n * <AlertDialog\n * open={true}\n * onOpenChange={(nextState) => console.log(nextState)}\n * trigger={<Button variant=\"outline\">Control Trigger</Button>}\n * header={<div>Custom Header</div>}\n * footer={[\n * <Button key='cancel' variant=\"outline\" onClick={() => {}}>On Action</Button>,\n * <Button key='action' variant=\"outline\" onClick={() => {}}>On Action</Button>,\n * ]}\n * />\n * ```\n */\nexport const AlertDialog: FC<PropsWithChildren<AlertDialogProps>> = (props) => {\n const {\n trigger,\n header,\n footer,\n slotProps = {},\n children,\n ...rest\n } = props;\n\n const contentProps = slotProps.content ?? {};\n\n return (\n <AlertDialogRoot {...rest}>\n <RenderAlertDialogTrigger {...props}>{trigger}</RenderAlertDialogTrigger>\n {children\n ? isValidReactElement(children, AlertDialogContent)\n ? cloneElement<AlertDialogContentProps>(\n children as ReactElement<AlertDialogContentProps>,\n {\n ...((children as ReactElement<AlertDialogContentProps>).props || {}),\n ...contentProps\n })\n : <AlertDialogContent {...contentProps}>{children}</AlertDialogContent>\n : (\n <AlertDialogContent {...contentProps}>\n <RenderAlertDialogHeader {...props}>{header}</RenderAlertDialogHeader>\n <RenderAlertDialogFooter {...props}>{footer}</RenderAlertDialogFooter>\n </AlertDialogContent>\n )\n }\n </AlertDialogRoot>\n )\n}\n\nexport default AlertDialog;\n"],"names":["RenderAlertDialogTrigger","props","slotProps","children","triggerProps","AlertDialogTrigger","RenderAlertDialogHeader","title","description","headerProps","titleProps","descriptionProps","isValidReactElement","AlertDialogHeader","cloneElement","jsx","AlertDialogTitle","AlertDialogDescription","RenderAlertDialogFooter","onCancel","onConfirm","cancelLabel","actionLabel","variant","footerId","useId","footerProps","cancelButtonProps","actionButtonProps","AlertDialogFooter","child","i","reactChild","clonedChild","AlertDialogAction","AlertDialogCancel","AlertD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AA;AAAA,EACH,GACF;AAEJ,GA8Dac,IAAuD,CAACnC,MAAU;AAC7E,QAAM;AAAA,IACJ,SAAAoC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAArC,IAAY,CAAA;AAAA,IACZ,UAAAC;AAAA,IACA,GAAGqC;AAAA,EAAA,IACDvC,GAEEwC,IAAevC,EAAU,WAAW,CAAA;AAE1C,SACE,gBAAAwC,EAACC,GAAA,EAAiB,GAAGH,GACnB,UAAA;AAAA,IAAA,gBAAAzB,EAACf,GAAA,EAA0B,GAAGC,GAAQ,UAAAoC,EAAA,CAAQ;AAAA,IAC7ClC,IACGS,EAAoBT,GAAUyC,CAAkB,IAC9C9B;AAAA,MACAX;AAAA,MACA;AAAA,QACE,GAAKA,EAAmD,SAAS,CAAA;AAAA,QACjE,GAAGsC;AAAA,MAAA;AAAA,IACL,IACA,gBAAA1B,EAAC6B,GAAA,EAAoB,GAAGH,GAAe,UAAAtC,GAAS,IAElD,gBAAAuC,EAACE,GAAA,EAAoB,GAAGH,GACtB,UAAA;AAAA,MAAA,gBAAA1B,EAACT,GAAA,EAAyB,GAAGL,GAAQ,UAAAqC,EAAA,CAAO;AAAA,MAC5C,gBAAAvB,EAACG,GAAA,EAAyB,GAAGjB,GAAQ,UAAAsC,EAAA,CAAO;AAAA,IAAA,EAAA,CAC9C;AAAA,EAAA,GAGN;AAEJ;"}
@@ -10,7 +10,7 @@ function N(t) {
10
10
  return /* @__PURE__ */ o(l.Trigger, { "data-slot": "alert-dialog-trigger", ...t });
11
11
  }
12
12
  function d(t) {
13
- return /* @__PURE__ */ o(l.Portal, { "data-slot": "alert-dialog-portal", ...t });
13
+ return /* @__PURE__ */ o(l.Portal, { "data-slot": "alert-dialog-portal", asChild: !0, ...t });
14
14
  }
15
15
  function m(t) {
16
16
  const { className: a, ...e } = t;
@@ -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\" {...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 \"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\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\", 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\", className)}\n {...rest}\n />\n )\n}\n\n\nfunction AlertDialogAction(props: React.ComponentProps<typeof AlertDialogPrimitive.Action> & ButtonProps) {\n const { className, variant, size, ...rest } = props;\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ variant, size }), className)}\n {...rest}\n />\n )\n}\nfunction AlertDialogCancel(props: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & ButtonProps) {\n const { className, variant = 'outline', size, ...rest } = props\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant, size }), 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","AlertDialogOverlay","className","rest","jsx","cn","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","variant","size","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,2BAAQC,EAAqB,QAArB,EAA4B,aAAU,uBAAuB,GAAGD,GAAO;AACjF;AAEA,SAASI,EAAmBJ,GAAkE;AAC5F,QAAM,EAAE,WAAAK,GAAW,GAAGC,EAAA,IAASN;AAC/B,SACE,gBAAAO;AAAA,IAACN,EAAqB;AAAA,IAArB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASG,EAAmBT,GAAkE;AAC5F,QAAM,EAAE,WAAAK,GAAW,GAAGC,EAAA,IAASN;AAC/B,2BACGG,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAI,EAACH,GAAA,EAAmB;AAAA,IACpB,gBAAAG;AAAA,MAACN,EAAqB;AAAA,MAArB;AAAA,QACC,aAAU;AAAA,QACV,WAAWO;AAAA,UACT;AAAA,UACAH;AAAA,QAAA;AAAA,QAED,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;AAGA,SAASI,EAAkBV,GAAoC;AAC7D,QAAM,EAAE,WAAAK,GAAW,GAAGC,EAAA,IAASN;AAC/B,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,gDAAgDH,CAAS;AAAA,MACtE,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASK,EAAkBX,GAAoC;AAC7D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AA;AAAA,EAAA;AAGV;"}
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 \"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\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\", 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\", className)}\n {...rest}\n />\n )\n}\n\n\nfunction AlertDialogAction(props: React.ComponentProps<typeof AlertDialogPrimitive.Action> & ButtonProps) {\n const { className, variant, size, ...rest } = props;\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ variant, size }), className)}\n {...rest}\n />\n )\n}\nfunction AlertDialogCancel(props: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & ButtonProps) {\n const { className, variant = 'outline', size, ...rest } = props\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant, size }), 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","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,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,IAASP;AAC/B,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAA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;AAAA,IAArB;AAAA,MACC,WAAWO,EAAGS,EAAe,EAAE,SAAAF,GAAS,MAAAC,EAAA,CAAM,GAAGV,CAAS;AAAA,MACzD,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 0.1.10-82 (2025-11-10)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated @oneplatformdev/utils to 0.1.1-131
6
+ - Updated @oneplatformdev/hooks to 0.1.0-117
7
+ - Updated @oneplatformdev/tokens to 0.0.1-104
8
+
9
+ ## 0.1.10-81 (2025-11-09)
10
+
11
+ ### 🧱 Updated Dependencies
12
+
13
+ - Updated @oneplatformdev/utils to 0.1.1-130
14
+ - Updated @oneplatformdev/hooks to 0.1.0-116
15
+ - Updated @oneplatformdev/tokens to 0.0.1-103
16
+
1
17
  ## 0.1.10-80 (2025-11-09)
2
18
 
3
19
  ### 🧱 Updated Dependencies
package/Dialog/Dialog.js CHANGED
@@ -118,7 +118,7 @@ function N({
118
118
  o.Title,
119
119
  {
120
120
  "data-slot": "dialog-title",
121
- className: n("text-lg leading-none font-semibold", t),
121
+ className: n("text-xl leading-none font-bold text-[#06080D]", t),
122
122
  ...a
123
123
  }
124
124
  );
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Dialog({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"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 {...props}\n />\n )\n}\n\nfunction DialogContent(props: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n const {\n className,\n children,\n showCloseButton = true,\n style,\n ...rest\n } = props;\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay>\n <DialogPrimitive.Content\n data-slot=\"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)] gap-4 sm:max-w-2xl',\n 'bg-background rounded-lg border p-6 shadow-lg duration-200',\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',\n className\n )}\n {...rest}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n 'absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100',\n 'data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',\n 'ring-offset-background focus:ring-transparent focus:ring-0 focus:ring-offset-0 focus:outline-hidden',\n 'focus:outline-none focus:ring-0',\n 'disabled:pointer-events-none [&_svg]:pointer-events-none',\n '[&_svg]:shrink-0 [&_svg:not([class*=\\'size-\\'])]:size-5',\n 'cursor-pointer size-10 flex items-center justify-center',\n\n )}\n >\n <XIcon/>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogOverlay>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogPrimitive\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","style","rest","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;AAQA,SAASA,EAAO;AAAA,EACE,GAAGC;AACL,GAAsD;AACpE,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAc;AAAA,EACE,GAAGF;AACL,GAAyD;AAC9E,2BAA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A;AAAA,cAAA,gBAAAD,EAACQ,GAAA,EAAK;AAAA,cACN,gBAAAR,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,QAAA,CAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACjC;AAAA,IAAA;AAAA,EAAA,GAGN,EAAA,CACF;AAEJ;AAEA,SAASS,EAAa,EAAE,WAAAV,GAAW,GAAGN,KAAsC;AAC1E,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,gDAAgDF,CAAS;AAAA,MACtE,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASiB,EAAa,EAAE,WAAAX,GAAW,GAAGN,KAAsC;AAC1E,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASkB,EAAY;AAAA,EACE,WAAAZ;AAAA,EACA,GAAGN;AACL,GAAuD;AAC1E,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,sCAAsCF,CAAS;AAAA,MAC5D,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASmB,EAAkB;AAAA,EACE,WAAAb;AAAA,EACA,GAAGN;AACL,GAA6D;AACtF,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,iCAAiCF,CAAS;AAAA,MACvD,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"Dialog.js","sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Dialog({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"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 {...props}\n />\n )\n}\n\nfunction DialogContent(props: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n const {\n className,\n children,\n showCloseButton = true,\n style,\n ...rest\n } = props;\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay>\n <DialogPrimitive.Content\n data-slot=\"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)] gap-4 sm:max-w-2xl',\n 'bg-background rounded-lg border p-6 shadow-lg duration-200',\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',\n className\n )}\n {...rest}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n 'absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100',\n 'data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',\n 'ring-offset-background focus:ring-transparent focus:ring-0 focus:ring-offset-0 focus:outline-hidden',\n 'focus:outline-none focus:ring-0',\n 'disabled:pointer-events-none [&_svg]:pointer-events-none',\n '[&_svg]:shrink-0 [&_svg:not([class*=\\'size-\\'])]:size-5',\n 'cursor-pointer size-10 flex items-center justify-center',\n\n )}\n >\n <XIcon/>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogOverlay>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-xl leading-none font-bold text-[#06080D]\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogPrimitive\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","style","rest","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;AAQA,SAASA,EAAO;AAAA,EACE,GAAGC;AACL,GAAsD;AACpE,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAc;AAAA,EACE,GAAGF;AACL,GAAyD;AAC9E,2BAAQC,EAAgB,SAAhB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;AAEA,SAASG,EAAa;AAAA,EACE,GAAGH;AACL,GAAwD;AAC5E,2BAAQC,EAAgB,QAAhB,EAAuB,aAAU,iBAAiB,GAAGD,GAAO;AACtE;AAEA,SAASI,EAAY;AAAA,EACE,GAAGJ;AACL,GAAuD;AAC1E,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASK,EAAc;AAAA,EACE,WAAAC;AAAA,EACA,GAAGN;AACL,GAAyD;AAC9E,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASS,EAAcT,GAEpB;AACD,QAAM;AAAA,IACJ,WAAAM;AAAA,IACA,UAAAI;AAAA,IACA,iBAAAC,IAAkB;AAAA,IAClB,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDb;AACJ,SACE,gBAAAO,EAACJ,GAAA,EAAa,aAAU,iBACtB,4BAACE,GAAA,EACC,UAAA,gBAAAS;AAAA,IAACb,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGO;AAAA,MACJ,O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A,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,iCAAiCF,CAAS;AAAA,MACvD,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.1.10-80",
3
+ "version": "0.1.10-82",
4
4
  "description": "UI component library for OnePlatform",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [
@@ -105,8 +105,8 @@
105
105
  "recharts": "^3.2.0",
106
106
  "sonner": "^2.0.7",
107
107
  "vaul": "^1.1.2",
108
- "@oneplatformdev/tokens": "^0.0.1-102",
109
- "@oneplatformdev/hooks": "^0.1.0-115",
110
- "@oneplatformdev/utils": "^0.1.1-129"
108
+ "@oneplatformdev/tokens": "^0.0.1-104",
109
+ "@oneplatformdev/hooks": "^0.1.0-117",
110
+ "@oneplatformdev/utils": "^0.1.1-131"
111
111
  }
112
112
  }