@oneplatformdev/ui 0.1.11-8 → 0.1.12
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/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/AlertDialog/AlertDialog.js +33 -32
- package/AlertDialog/AlertDialog.js.map +1 -1
- package/AlertDialog/AlertDialogRoot.js +30 -30
- package/AlertDialog/AlertDialogRoot.js.map +1 -1
- package/ButtonIcon/buttonIconVariants.js +2 -2
- package/ButtonIcon/buttonIconVariants.js.map +1 -1
- package/CHANGELOG.md +76 -0
- package/package.json +4 -4
|
@@ -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,EAIL,gBAAgB,EAEjB,MAAM,qBAAqB,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,EAIL,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAuH7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CA0B/D,CAAA;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as g, jsx as
|
|
2
|
-
import { cloneElement as p, useId as
|
|
3
|
-
import { AlertDialogRoot as
|
|
1
|
+
import { jsxs as g, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cloneElement as p, useId as T, Children as b } from "react";
|
|
3
|
+
import { AlertDialogRoot as j, AlertDialogContent as P, AlertDialogTrigger as E, AlertDialogHeader as f, AlertDialogTitle as B, AlertDialogDescription as R, AlertDialogFooter as m, AlertDialogAction as A, AlertDialogCancel as k } from "./AlertDialogRoot.js";
|
|
4
4
|
import { isValidReactElement as s } from "@oneplatformdev/utils";
|
|
5
|
-
const F = (
|
|
6
|
-
const { slotProps: e = {}, children: r } =
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
}, H = (
|
|
5
|
+
const F = (t) => {
|
|
6
|
+
const { slotProps: e = {}, children: r } = t, n = e.trigger ?? {};
|
|
7
|
+
return /* @__PURE__ */ o(E, { asChild: !0, ...n, children: r });
|
|
8
|
+
}, H = (t) => {
|
|
9
9
|
const {
|
|
10
10
|
title: e = "",
|
|
11
11
|
description: r = "",
|
|
12
12
|
slotProps: n = {},
|
|
13
13
|
children: i
|
|
14
|
-
} =
|
|
15
|
-
return i ? s(i,
|
|
14
|
+
} = t, c = n.header ?? {}, a = n.title ?? {}, l = n.description ?? {};
|
|
15
|
+
return i ? s(i, f) ? p(
|
|
16
16
|
i,
|
|
17
17
|
{ ...i.props || {}, ...c }
|
|
18
|
-
) : /* @__PURE__ */
|
|
18
|
+
) : /* @__PURE__ */ o(f, { ...c, children: i }) : /* @__PURE__ */ g(f, { children: [
|
|
19
19
|
e && s(e, B) ? p(
|
|
20
20
|
e,
|
|
21
21
|
{ ...e.props || {}, ...a }
|
|
22
|
-
) : /* @__PURE__ */
|
|
23
|
-
r && s(r,
|
|
22
|
+
) : /* @__PURE__ */ o(B, { ...a, children: e }),
|
|
23
|
+
r && s(r, R) ? p(
|
|
24
24
|
r,
|
|
25
25
|
{ ...r.props || {}, ...l }
|
|
26
|
-
) : /* @__PURE__ */
|
|
26
|
+
) : /* @__PURE__ */ o(R, { ...l, children: r })
|
|
27
27
|
] });
|
|
28
|
-
}, I = (
|
|
28
|
+
}, I = (t) => {
|
|
29
29
|
const {
|
|
30
30
|
slotProps: e = {},
|
|
31
31
|
children: r,
|
|
@@ -34,34 +34,35 @@ const F = (o) => {
|
|
|
34
34
|
cancelLabel: c = "Cancel",
|
|
35
35
|
actionLabel: a = "Continue",
|
|
36
36
|
variant: l = "confirm"
|
|
37
|
-
} =
|
|
38
|
-
return r ? s(r,
|
|
37
|
+
} = t, v = T(), D = e.footer ?? {}, x = e.cancelButton ?? {}, h = e.actionButton ?? {};
|
|
38
|
+
return r ? s(r, m) ? p(
|
|
39
39
|
r,
|
|
40
40
|
{ ...r.props || {}, ...D }
|
|
41
|
-
) : /* @__PURE__ */
|
|
41
|
+
) : /* @__PURE__ */ o(m, { ...D, children: b.map(r, (d, y) => {
|
|
42
42
|
if (!d || !s(d)) return;
|
|
43
|
-
const
|
|
44
|
-
return s(d, A) || s(d,
|
|
45
|
-
}) }) : /* @__PURE__ */ g(
|
|
46
|
-
l !== "alert" && /* @__PURE__ */
|
|
47
|
-
|
|
43
|
+
const u = d, C = p(u, { ...u.props || {}, key: u.key || `footer-${v}-action-${y}` });
|
|
44
|
+
return s(d, A) || s(d, k) ? C : /* @__PURE__ */ o(A, { asChild: !0, children: C });
|
|
45
|
+
}) }) : /* @__PURE__ */ g(m, { children: [
|
|
46
|
+
l !== "alert" && /* @__PURE__ */ o(
|
|
47
|
+
k,
|
|
48
48
|
{
|
|
49
49
|
onClick: n,
|
|
50
50
|
...x,
|
|
51
51
|
children: c
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ o(
|
|
55
55
|
A,
|
|
56
56
|
{
|
|
57
57
|
onClick: i,
|
|
58
|
-
...
|
|
59
|
-
variant:
|
|
58
|
+
...h,
|
|
59
|
+
variant: h.variant,
|
|
60
|
+
color: h.color || (l === "destructive" ? "error" : "primary"),
|
|
60
61
|
children: a
|
|
61
62
|
}
|
|
62
63
|
)
|
|
63
64
|
] });
|
|
64
|
-
}, w = (
|
|
65
|
+
}, w = (t) => {
|
|
65
66
|
const {
|
|
66
67
|
trigger: e,
|
|
67
68
|
header: r,
|
|
@@ -69,12 +70,12 @@ const F = (o) => {
|
|
|
69
70
|
slotProps: i = {},
|
|
70
71
|
children: c,
|
|
71
72
|
...a
|
|
72
|
-
} =
|
|
73
|
-
return /* @__PURE__ */ g(
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
c ? /* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
73
|
+
} = t, l = i.content ?? {};
|
|
74
|
+
return /* @__PURE__ */ g(j, { ...a, children: [
|
|
75
|
+
/* @__PURE__ */ o(F, { ...t, children: e }),
|
|
76
|
+
c ? /* @__PURE__ */ o(P, { ...l, children: c }) : /* @__PURE__ */ g(P, { ...l, children: [
|
|
77
|
+
/* @__PURE__ */ o(H, { ...t, children: r }),
|
|
78
|
+
/* @__PURE__ */ o(I, { ...t, children: n })
|
|
78
79
|
] })
|
|
79
80
|
] });
|
|
80
81
|
};
|
|
@@ -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 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 ? <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","AlertDialog","trigger","header","footer","rest","contentProps","jsxs","AlertDialogRoot","AlertDialogContent"],"mappings":";;;;AA8BA,MAAMA,IAAoE,CACxEC,MACG;AACH,QAAM,EAAE,WAAAC,IAAY,IAAI,UAAAC,MAAaF,GAC/BG,IAAeF,EAAU,WAAW,CAAA;AAC1C,2BAAQG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A,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,IACG,gBAAAY,EAAC6B,GAAA,EAAoB,GAAGH,GAAe,UAAAtC,GAAS,IAEhD,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;"}
|
|
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 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={actionButtonProps.variant}\n color={actionButtonProps.color || (variant === 'destructive' ? 'error' : 'primary')}\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 ? <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","AlertDialog","trigger","header","footer","rest","contentProps","jsxs","AlertDialogRoot","AlertDialogContent"],"mappings":";;;;AA8BA,MAAMA,IAAoE,CACxEC,MACG;AACH,QAAM,EAAE,WAAAC,IAAY,IAAI,UAAAC,MAAaF,GAC/BG,IAAeF,EAAU,WAAW,CAAA;AAC1C,2BAAQG,GAAA,EAAmB,SAAO,IAAE,GAAGD,GAAe,UAAAD,GAAS;AACjE,GAEMG,IAAmE,CAACL,M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SACE,gBAAAwC,EAACC,GAAA,EAAiB,GAAGH,GACnB,UAAA;AAAA,IAAA,gBAAAzB,EAACf,GAAA,EAA0B,GAAGC,GAAQ,UAAAoC,EAAA,CAAQ;AAAA,IAC7ClC,IACG,gBAAAY,EAAC6B,GAAA,EAAoB,GAAGH,GAAe,UAAAtC,GAAS,IAEhD,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;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "@radix-ui/react-alert-dialog";
|
|
3
3
|
import { cn as l } from "@oneplatformdev/utils";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
|
-
import { buttonVariants as
|
|
6
|
-
function
|
|
5
|
+
import { buttonVariants as d } from "../Button/buttonVariants.js";
|
|
6
|
+
function N(t) {
|
|
7
7
|
return /* @__PURE__ */ o(r.Root, { "data-slot": "alert-dialog", ...t });
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function A(t) {
|
|
10
10
|
return /* @__PURE__ */ o(r.Trigger, { "data-slot": "alert-dialog-trigger", ...t });
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function m(t) {
|
|
13
13
|
return /* @__PURE__ */ o(r.Portal, { "data-slot": "alert-dialog-portal", asChild: !0, ...t });
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function g(t) {
|
|
16
16
|
const { className: a, ...e } = t;
|
|
17
17
|
return /* @__PURE__ */ o(
|
|
18
18
|
r.Overlay,
|
|
@@ -26,10 +26,10 @@ function m(t) {
|
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function D(t) {
|
|
30
30
|
const { className: a, ...e } = t;
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */ o(
|
|
31
|
+
return /* @__PURE__ */ c(m, { children: [
|
|
32
|
+
/* @__PURE__ */ o(g, {}),
|
|
33
33
|
/* @__PURE__ */ o(
|
|
34
34
|
r.Content,
|
|
35
35
|
{
|
|
@@ -47,7 +47,7 @@ function A(t) {
|
|
|
47
47
|
)
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function w(t) {
|
|
51
51
|
const { className: a, ...e } = t;
|
|
52
52
|
return /* @__PURE__ */ o(
|
|
53
53
|
"div",
|
|
@@ -58,7 +58,7 @@ function D(t) {
|
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function b(t) {
|
|
62
62
|
const { className: a, ...e } = t;
|
|
63
63
|
return /* @__PURE__ */ o(
|
|
64
64
|
"div",
|
|
@@ -72,7 +72,7 @@ function w(t) {
|
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function v(t) {
|
|
76
76
|
const { className: a, ...e } = t;
|
|
77
77
|
return /* @__PURE__ */ o(
|
|
78
78
|
r.Title,
|
|
@@ -83,7 +83,7 @@ function b(t) {
|
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function h(t) {
|
|
87
87
|
const { className: a, ...e } = t;
|
|
88
88
|
return /* @__PURE__ */ o(
|
|
89
89
|
r.Description,
|
|
@@ -94,38 +94,38 @@ function v(t) {
|
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
const { className: a, variant: e, size: s,
|
|
97
|
+
function y(t) {
|
|
98
|
+
const { className: a, variant: e, size: s, color: n, ...i } = t;
|
|
99
99
|
return /* @__PURE__ */ o(
|
|
100
100
|
r.Action,
|
|
101
101
|
{
|
|
102
|
-
className: l(
|
|
103
|
-
...
|
|
102
|
+
className: l(d({ variant: e, size: s, color: n }), a),
|
|
103
|
+
...i
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
function z(t) {
|
|
108
|
-
const { className: a, variant: e = "
|
|
108
|
+
const { className: a, variant: e, color: s = "secondary", size: n, ...i } = t;
|
|
109
109
|
return /* @__PURE__ */ o(
|
|
110
110
|
r.Cancel,
|
|
111
111
|
{
|
|
112
|
-
className: l(
|
|
113
|
-
...
|
|
112
|
+
className: l(d({ variant: e, size: n, color: s }), a),
|
|
113
|
+
...i
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
export {
|
|
118
|
-
|
|
118
|
+
y as AlertDialogAction,
|
|
119
119
|
z as AlertDialogCancel,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
D as AlertDialogContent,
|
|
121
|
+
h as AlertDialogDescription,
|
|
122
|
+
b as AlertDialogFooter,
|
|
123
|
+
w as AlertDialogHeader,
|
|
124
|
+
g as AlertDialogOverlay,
|
|
125
|
+
m as AlertDialogPortal,
|
|
126
126
|
r as AlertDialogPrimitive,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
N as AlertDialogRoot,
|
|
128
|
+
v as AlertDialogTitle,
|
|
129
|
+
A as AlertDialogTrigger
|
|
130
130
|
};
|
|
131
131
|
//# sourceMappingURL=AlertDialogRoot.js.map
|
|
@@ -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, ...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 = '
|
|
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;AACxE;AAEA,SAASE,EAAmBF,GAAkE;AAC5F,2BAAQC,EAAqB,SAArB,EAA6B,aAAU,wB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-lg p-
|
|
27
|
-
sm: "w-6 h-6 size-6 rounded-lg p-
|
|
26
|
+
xs: "w-4 h-4 size-4 rounded-lg p-0 [&_svg]:size-3",
|
|
27
|
+
sm: "w-6 h-6 size-6 rounded-lg p-0 [&_svg]:size-4",
|
|
28
28
|
md: "w-8 h-8 size-8 rounded-lg p-1 [&_svg]:size-5",
|
|
29
29
|
lg: "w-10 h-10 size-10 rounded-lg p-2 [&_svg]:size-6"
|
|
30
30
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buttonIconVariants.js","sources":["../../src/ButtonIcon/buttonIconVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport { cn } from \"@oneplatformdev/utils\";\n\nexport const buttonIconVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n 'whitespace-nowrap font-medium aspect-square',\n 'cursor-pointer box-border',\n \"transition-colors focus-visible:outline-hidden focus-visible:ring-none focus-visible:ring-transparent\",\n \"disabled:pointer-events-none disabled:cursor-default\",\n \"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n ],\n {\n variants: {\n variant: {\n none: '',\n contained: '',\n outlined: '',\n ghost: \"\",\n },\n color: {\n primary: \"\",\n secondary: \"\",\n error: \"\"\n },\n size: {\n xs: 'w-4 h-4 size-4 rounded-lg p-
|
|
1
|
+
{"version":3,"file":"buttonIconVariants.js","sources":["../../src/ButtonIcon/buttonIconVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport { cn } from \"@oneplatformdev/utils\";\n\nexport const buttonIconVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n 'whitespace-nowrap font-medium aspect-square',\n 'cursor-pointer box-border',\n \"transition-colors focus-visible:outline-hidden focus-visible:ring-none focus-visible:ring-transparent\",\n \"disabled:pointer-events-none disabled:cursor-default\",\n \"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n ],\n {\n variants: {\n variant: {\n none: '',\n contained: '',\n outlined: '',\n ghost: \"\",\n },\n color: {\n primary: \"\",\n secondary: \"\",\n error: \"\"\n },\n size: {\n xs: 'w-4 h-4 size-4 rounded-lg p-0 [&_svg]:size-3',\n sm: 'w-6 h-6 size-6 rounded-lg p-0 [&_svg]:size-4',\n md: 'w-8 h-8 size-8 rounded-lg p-1 [&_svg]:size-5',\n lg: 'w-10 h-10 size-10 rounded-lg p-2 [&_svg]:size-6',\n },\n rounded: {\n true: \"rounded-full\",\n false: \"\",\n },\n },\n compoundVariants: [\n // PRIMARY BUTTON VARIANTS\n {\n color: 'primary',\n variant: 'contained',\n className: cn(\n 'bg-[#9368FF] border border-[#9368FF] text-[#FCFCFC] [&_svg]:text-[#FCFCFC]',\n 'hover:bg-[#7F4EEB]',\n 'focus:bg-[#7F4EEB] focus:border-[#6B3DD9]',\n 'active:bg-[#6B3DD9]',\n 'disabled:bg-[#E8E9EB] disabled:border-[#E8E9EB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'primary',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#9368FF] text-[#9368FF] [&_svg]:text-[#9368FF]',\n 'hover:bg-[#9368FF0F]',\n 'active:bg-[#9368FF0F] active:border-[#6B3DD9]',\n 'disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'primary',\n variant: 'ghost',\n className: cn(\n 'bg-transparent border border-transparent text-[#9368FF] [&_svg]:text-[#9368FF]',\n 'hover:text-[#6B3DD9] hover:[&_svg]:text-[#6B3DD9]',\n 'focus:text-[#6B3DD9] focus:[&_svg]:text-[#6B3DD9]',\n 'active:bg-[#9368FF0F]',\n 'disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n // SECONDARY BUTTON VARIANTS\n {\n color: 'secondary',\n variant: 'contained',\n className: cn(\n 'bg-[#FCFCFC] border border-[#E1E1E5] text-[#06080D] [&_svg]:text-[#06080D]',\n 'hover:bg-[#F9FAFB] hover:border-[#E1E1E5]',\n 'focus:bg-[#FCFCFC] focus:border-[#C5C7CD]',\n 'active:bg-[#F9FAFB] active:border-[#C5C7CD]',\n 'disabled:bg-[#FCFCFC] disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'secondary',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#E1E1E5] text-[#06080D] [&_svg]:text-[#06080D]',\n 'hover:bg-[#F9FAFB] hover:border-[#E1E1E5]',\n 'focus:bg-[#FCFCFC] focus:border-[#C5C7CD]',\n 'active:bg-[#F9FAFB] active:border-[#C5C7CD]',\n 'disabled:bg-[#FCFCFC] disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'secondary',\n variant: 'ghost',\n className: cn(\n 'text-[#06080D] [&_svg]:text-[#06080D] bg-transparent border border-transparent',\n 'hover:bg-[#F9FAFB]',\n 'focus:bg-[#FCFCFC]',\n 'active:bg-[#F9FAFB]',\n 'disabled:bg-[#FCFCFC] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n // ERROR BUTTON VARIANTS\n {\n color: 'error',\n variant: 'contained',\n className: cn(\n 'bg-[#EF4444] border border-[#EF4444] text-[#FCFCFC] [&_svg]:text-[#FCFCFC]',\n 'hover:bg-[#DC2626]',\n 'focus:bg-[#DC2626]',\n 'active:bg-[#DC2626]',\n 'disabled:bg-[#E8E9EB] disabled:border-[#E8E9EB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'error',\n variant: 'outlined',\n className: cn(\n 'bg-transparent border border-[#EF4444] text-[#EF4444] [&_svg]:text-[#EF4444]',\n 'hover:bg-[#EF44440F]',\n 'active:bg-[#DC26260F] active:border-[#DC2626]',\n 'disabled:border-[#EBEBEB] disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n {\n color: 'error',\n variant: 'ghost',\n className: cn(\n 'bg-transparent border border-transparent text-[#EF4444] [&_svg]:text-[#EF4444]',\n 'hover:bg-[#EF44440F] hover:text-[#DC2626] hover:[&_svg]:text-[#DC2626]',\n 'active:bg-[#DC26260F] active:border-[#DC2626]',\n 'disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n // ROUNDED BUTTON VARIANTS\n {\n variant: 'ghost',\n rounded: true,\n className: cn(\n 'shadow-[-1px_-1px_10px_rgba(6,8,13,0.06),_1px_1px_10px_rgba(6,8,13,0.06)]',\n 'disabled:text-[#666A78] disabled:[&_svg]:text-[#666A78]',\n ),\n },\n ],\n defaultVariants: {\n color: \"primary\",\n variant: \"contained\",\n size: \"lg\",\n rounded: false,\n },\n }\n)\n"],"names":["buttonIconVariants","cva","cn"],"mappings":";;AAGO,MAAMA,IAAqBC;AAAA,EAChC;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,MAAM;AAAA,QACN,WAAW;AAAA,QACX,UAAU;AAAA,QACV,OAAO;AAAA,MAAA;AAAA,MAET,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,OAAO;AAAA,MAAA;AAAA,MAET,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,SAAS;AAAA,QACP,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,kBAAkB;AAAA;AAAA,MAEhB;AAAA,QACE,OAAO;AAAA,QACP,SAAS;AAAA,QACT,WAAWC;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAAA,MAEF;AAAA,QACE,OAAO;AAAA,QACP,SAAS;AAAA,QACT,WAAWA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,MAAM;AAAA,MACN,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;"}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,79 @@
|
|
|
1
|
+
## 0.1.12 (2025-12-27)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **ButtonIcon:** add 'none' variant and update size variants in buttonIconVariants ([6b52897](https://github.com/oneplatformdev/core-web/commit/6b52897))
|
|
6
|
+
- **ButtonIcon:** add medium size option and update size variants in ButtonIcon component ([d956e21](https://github.com/oneplatformdev/core-web/commit/d956e21))
|
|
7
|
+
- update TypeScript configuration to include references for UI package ([7b29e80](https://github.com/oneplatformdev/core-web/commit/7b29e80))
|
|
8
|
+
- **Button:** update ButtonIcon component with new props and variants, enhance tooltip functionality ([905efac](https://github.com/oneplatformdev/core-web/commit/905efac))
|
|
9
|
+
- update configuration files for Storybook integration and improve TypeScript settings ([0dedbfb](https://github.com/oneplatformdev/core-web/commit/0dedbfb))
|
|
10
|
+
- **App:** add routing for button and button-icon pages, enhance navigation ([ad89b21](https://github.com/oneplatformdev/core-web/commit/ad89b21))
|
|
11
|
+
- **Button:** enhance button component with new variants, adornments, and improved props ([0d373b8](https://github.com/oneplatformdev/core-web/commit/0d373b8))
|
|
12
|
+
- enhance FormSelect with onChangePrepare and updated onChange signature ([3b4402b](https://github.com/oneplatformdev/core-web/commit/3b4402b))
|
|
13
|
+
|
|
14
|
+
### 🩹 Fixes
|
|
15
|
+
|
|
16
|
+
- **FormSelect:** ensure default value is an empty string when undefined ([056631f](https://github.com/oneplatformdev/core-web/commit/056631f))
|
|
17
|
+
- update icon size for large button variant ([1e7c0a7](https://github.com/oneplatformdev/core-web/commit/1e7c0a7))
|
|
18
|
+
- add min-width to large button variant ([e34bc71](https://github.com/oneplatformdev/core-web/commit/e34bc71))
|
|
19
|
+
- handle undefined value in FormSelect component ([9c7ae4a](https://github.com/oneplatformdev/core-web/commit/9c7ae4a))
|
|
20
|
+
- minor alert dialog content ([#41](https://github.com/oneplatformdev/core-web/pull/41))
|
|
21
|
+
- update Dialog component title font size for better readability and add .env to .gitignore ([9646134](https://github.com/oneplatformdev/core-web/commit/9646134))
|
|
22
|
+
- adjust Dialog component styling for better alignment and update container size in CSS ([afaa5af](https://github.com/oneplatformdev/core-web/commit/afaa5af))
|
|
23
|
+
- update XIcon styling in Dialog component for improved visibility ([164338b](https://github.com/oneplatformdev/core-web/commit/164338b))
|
|
24
|
+
- update dialog primitive close ([5e7c577](https://github.com/oneplatformdev/core-web/commit/5e7c577))
|
|
25
|
+
- update dialog primitive close ([560b5ba](https://github.com/oneplatformdev/core-web/commit/560b5ba))
|
|
26
|
+
- update dialog primitive close ([f63b143](https://github.com/oneplatformdev/core-web/commit/f63b143))
|
|
27
|
+
|
|
28
|
+
### 🧱 Updated Dependencies
|
|
29
|
+
|
|
30
|
+
- Updated @oneplatformdev/utils to 0.1.2
|
|
31
|
+
- Updated @oneplatformdev/hooks to 0.1.1
|
|
32
|
+
- Updated @oneplatformdev/tokens to 0.0.2
|
|
33
|
+
|
|
34
|
+
### ❤️ Thank You
|
|
35
|
+
|
|
36
|
+
- Bohdan Radchenko @BohdanRadchenko
|
|
37
|
+
- BohdanRadchenko
|
|
38
|
+
|
|
39
|
+
## 0.1.11-9 (2025-12-27)
|
|
40
|
+
|
|
41
|
+
### 🚀 Features
|
|
42
|
+
|
|
43
|
+
- **ButtonIcon:** add 'none' variant and update size variants in buttonIconVariants ([6b52897](https://github.com/oneplatformdev/core-web/commit/6b52897))
|
|
44
|
+
- **ButtonIcon:** add medium size option and update size variants in ButtonIcon component ([d956e21](https://github.com/oneplatformdev/core-web/commit/d956e21))
|
|
45
|
+
- update TypeScript configuration to include references for UI package ([7b29e80](https://github.com/oneplatformdev/core-web/commit/7b29e80))
|
|
46
|
+
- **Button:** update ButtonIcon component with new props and variants, enhance tooltip functionality ([905efac](https://github.com/oneplatformdev/core-web/commit/905efac))
|
|
47
|
+
- update configuration files for Storybook integration and improve TypeScript settings ([0dedbfb](https://github.com/oneplatformdev/core-web/commit/0dedbfb))
|
|
48
|
+
- **App:** add routing for button and button-icon pages, enhance navigation ([ad89b21](https://github.com/oneplatformdev/core-web/commit/ad89b21))
|
|
49
|
+
- **Button:** enhance button component with new variants, adornments, and improved props ([0d373b8](https://github.com/oneplatformdev/core-web/commit/0d373b8))
|
|
50
|
+
- enhance FormSelect with onChangePrepare and updated onChange signature ([3b4402b](https://github.com/oneplatformdev/core-web/commit/3b4402b))
|
|
51
|
+
|
|
52
|
+
### 🩹 Fixes
|
|
53
|
+
|
|
54
|
+
- **FormSelect:** ensure default value is an empty string when undefined ([056631f](https://github.com/oneplatformdev/core-web/commit/056631f))
|
|
55
|
+
- update icon size for large button variant ([1e7c0a7](https://github.com/oneplatformdev/core-web/commit/1e7c0a7))
|
|
56
|
+
- add min-width to large button variant ([e34bc71](https://github.com/oneplatformdev/core-web/commit/e34bc71))
|
|
57
|
+
- handle undefined value in FormSelect component ([9c7ae4a](https://github.com/oneplatformdev/core-web/commit/9c7ae4a))
|
|
58
|
+
- minor alert dialog content ([#41](https://github.com/oneplatformdev/core-web/pull/41))
|
|
59
|
+
- update Dialog component title font size for better readability and add .env to .gitignore ([9646134](https://github.com/oneplatformdev/core-web/commit/9646134))
|
|
60
|
+
- adjust Dialog component styling for better alignment and update container size in CSS ([afaa5af](https://github.com/oneplatformdev/core-web/commit/afaa5af))
|
|
61
|
+
- update XIcon styling in Dialog component for improved visibility ([164338b](https://github.com/oneplatformdev/core-web/commit/164338b))
|
|
62
|
+
- update dialog primitive close ([5e7c577](https://github.com/oneplatformdev/core-web/commit/5e7c577))
|
|
63
|
+
- update dialog primitive close ([560b5ba](https://github.com/oneplatformdev/core-web/commit/560b5ba))
|
|
64
|
+
- update dialog primitive close ([f63b143](https://github.com/oneplatformdev/core-web/commit/f63b143))
|
|
65
|
+
|
|
66
|
+
### 🧱 Updated Dependencies
|
|
67
|
+
|
|
68
|
+
- Updated @oneplatformdev/utils to 0.1.1-179
|
|
69
|
+
- Updated @oneplatformdev/hooks to 0.1.0-165
|
|
70
|
+
- Updated @oneplatformdev/tokens to 0.0.1-152
|
|
71
|
+
|
|
72
|
+
### ❤️ Thank You
|
|
73
|
+
|
|
74
|
+
- Bohdan Radchenko @BohdanRadchenko
|
|
75
|
+
- BohdanRadchenko
|
|
76
|
+
|
|
1
77
|
## 0.1.11-8 (2025-12-27)
|
|
2
78
|
|
|
3
79
|
### 🚀 Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneplatformdev/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
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.
|
|
109
|
-
"@oneplatformdev/utils": "^0.1.
|
|
110
|
-
"@oneplatformdev/hooks": "^0.1.
|
|
108
|
+
"@oneplatformdev/tokens": "^0.0.2",
|
|
109
|
+
"@oneplatformdev/utils": "^0.1.2",
|
|
110
|
+
"@oneplatformdev/hooks": "^0.1.1"
|
|
111
111
|
}
|
|
112
112
|
}
|