@oneplatformdev/ui 0.1.99-beta.246 → 0.1.99-beta.247
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 0.1.99-beta.247 (2026-03-09)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @oneplatformdev/utils to 0.1.99-beta.247
|
|
6
|
+
- Updated @oneplatformdev/hooks to 0.1.99-beta.247
|
|
7
|
+
- Updated @oneplatformdev/tokens to 0.1.99-beta.247
|
|
8
|
+
|
|
1
9
|
## 0.1.99-beta.246 (2026-03-09)
|
|
2
10
|
|
|
3
11
|
### 🚀 Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRenderControl.d.ts","sourceRoot":"","sources":["../../src/Form/FormRenderControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAqCnE,eAAO,MAAM,iBAAiB,GAC5B,IAAI,SAAS,WAAW,GAAG,WAAW,EAEtC,OAAO,sBAAsB,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"FormRenderControl.d.ts","sourceRoot":"","sources":["../../src/Form/FormRenderControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAqCnE,eAAO,MAAM,iBAAiB,GAC5B,IAAI,SAAS,WAAW,GAAG,WAAW,EAEtC,OAAO,sBAAsB,CAAC,IAAI,CAAC,4CAgDpC,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { FormField as
|
|
1
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { FormField as h, FormItem as d, FormMessage as f, FormLabel as F } from "./Form.js";
|
|
3
3
|
import "@radix-ui/react-tooltip";
|
|
4
4
|
import { cn as l } from "@oneplatformdev/utils";
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
import { cloneElement as
|
|
7
|
-
const
|
|
8
|
-
const { label: t, tooltip: s, tooltipProps: r } = n, o = /* @__PURE__ */ e(
|
|
5
|
+
import { Tooltip as P } from "../Tooltip/Tooltip.js";
|
|
6
|
+
import { cloneElement as b } from "react";
|
|
7
|
+
const N = (n) => {
|
|
8
|
+
const { label: t, tooltip: s, tooltipProps: r } = n, o = /* @__PURE__ */ e(F, { children: t });
|
|
9
9
|
return t ? s ? /* @__PURE__ */ e(
|
|
10
|
-
|
|
10
|
+
P,
|
|
11
11
|
{
|
|
12
12
|
message: s,
|
|
13
13
|
showQuestionMark: !0,
|
|
@@ -21,10 +21,10 @@ const b = (n) => {
|
|
|
21
21
|
...r?.triggerProps,
|
|
22
22
|
className: l("cursor-help", r?.triggerProps?.className)
|
|
23
23
|
},
|
|
24
|
-
children:
|
|
24
|
+
children: b(o, { className: l("cursor-help", o.props.classNames) })
|
|
25
25
|
}
|
|
26
26
|
) : o : null;
|
|
27
|
-
},
|
|
27
|
+
}, L = (n) => {
|
|
28
28
|
const {
|
|
29
29
|
form: t,
|
|
30
30
|
name: s,
|
|
@@ -33,30 +33,31 @@ const b = (n) => {
|
|
|
33
33
|
tooltipProps: i,
|
|
34
34
|
render: m,
|
|
35
35
|
containerProps: p = {},
|
|
36
|
-
|
|
36
|
+
showErrorMessages: c = !0,
|
|
37
|
+
...a
|
|
37
38
|
} = n;
|
|
38
39
|
return /* @__PURE__ */ e(
|
|
39
|
-
|
|
40
|
+
h,
|
|
40
41
|
{
|
|
41
42
|
control: t.control,
|
|
42
43
|
name: s,
|
|
43
|
-
render: (
|
|
44
|
+
render: (g) => /* @__PURE__ */ u(d, { ...p, children: [
|
|
44
45
|
/* @__PURE__ */ e(
|
|
45
|
-
|
|
46
|
+
N,
|
|
46
47
|
{
|
|
47
48
|
label: r,
|
|
48
49
|
tooltip: o,
|
|
49
50
|
tooltipProps: i
|
|
50
51
|
}
|
|
51
52
|
),
|
|
52
|
-
m(
|
|
53
|
-
/* @__PURE__ */ e(f, {})
|
|
53
|
+
m(g),
|
|
54
|
+
c && /* @__PURE__ */ e(f, {})
|
|
54
55
|
] }),
|
|
55
|
-
...
|
|
56
|
+
...a
|
|
56
57
|
}
|
|
57
58
|
);
|
|
58
59
|
};
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
+
L as FormRenderControl
|
|
61
62
|
};
|
|
62
63
|
//# sourceMappingURL=FormRenderControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRenderControl.js","sources":["../../src/Form/FormRenderControl.tsx"],"sourcesContent":["import { FieldValues } from \"react-hook-form\";\n\nimport { FormField, FormItem, FormLabel, FormMessage } from \"./Form\";\nimport { FormRenderControlProps } from \"./FormRenderControl.types\";\nimport { Tooltip } from \"../Tooltip\";\nimport { cloneElement } from \"react\";\nimport { cn } from \"@oneplatformdev/utils\";\n\ninterface IFormLabelWithTooltipProps<\n Data extends FieldValues = FieldValues,\n> extends Pick<FormRenderControlProps<Data>, 'label' | 'tooltip' | 'tooltipProps'> {\n}\n\nconst FormLabelWithTooltip = <\n Data extends FieldValues = FieldValues,\n>(props: IFormLabelWithTooltipProps<Data>) => {\n const { label, tooltip, tooltipProps } = props;\n const cmp = <FormLabel>{label}</FormLabel>;\n if (!label) return null;\n if (!tooltip) return cmp;\n return (\n <Tooltip\n message={tooltip}\n showQuestionMark\n questionIconSize=\"sm\"\n contentProps={{\n side: \"right\",\n align: \"center\"\n }}\n {...tooltipProps}\n triggerProps={{\n ...tooltipProps?.triggerProps,\n className: cn('cursor-help', tooltipProps?.triggerProps?.className),\n }}\n >\n {cloneElement(cmp, { className: cn('cursor-help', cmp.props.classNames) })}\n </Tooltip>\n )\n}\n\nexport const FormRenderControl = <\n Data extends FieldValues = FieldValues,\n>(\n props: FormRenderControlProps<Data>\n) => {\n const {\n form,\n name,\n label,\n tooltip,\n tooltipProps,\n render,\n containerProps = {},\n ...rest\n } = props;\n return (\n <FormField\n control={form.control}\n name={name}\n render={(params) => (\n <FormItem {...containerProps}>\n <FormLabelWithTooltip\n label={label}\n tooltip={tooltip}\n tooltipProps={tooltipProps}\n />\n {/*{(label || tooltip) && (*/}\n {/* <FormLabel className={cn(\"flex items-center gap-1\")}>*/}\n {/* {label && <span>{label}</span>}*/}\n {/* {tooltip && (*/}\n {/* <Tooltip*/}\n {/* message={tooltip}*/}\n {/* showQuestionMark*/}\n {/* questionIconSize=\"xs\"*/}\n {/* contentProps={{*/}\n {/* side: \"right\",*/}\n {/* align: \"center\"*/}\n {/* }}*/}\n {/* {...props.tooltipProps}*/}\n {/* />*/}\n {/* )}*/}\n {/* </FormLabel>*/}\n {/*)}*/}\n {render(params)}\n <FormMessage
|
|
1
|
+
{"version":3,"file":"FormRenderControl.js","sources":["../../src/Form/FormRenderControl.tsx"],"sourcesContent":["import { FieldValues } from \"react-hook-form\";\n\nimport { FormField, FormItem, FormLabel, FormMessage } from \"./Form\";\nimport { FormRenderControlProps } from \"./FormRenderControl.types\";\nimport { Tooltip } from \"../Tooltip\";\nimport { cloneElement } from \"react\";\nimport { cn } from \"@oneplatformdev/utils\";\n\ninterface IFormLabelWithTooltipProps<\n Data extends FieldValues = FieldValues,\n> extends Pick<FormRenderControlProps<Data>, 'label' | 'tooltip' | 'tooltipProps'> {\n}\n\nconst FormLabelWithTooltip = <\n Data extends FieldValues = FieldValues,\n>(props: IFormLabelWithTooltipProps<Data>) => {\n const { label, tooltip, tooltipProps } = props;\n const cmp = <FormLabel>{label}</FormLabel>;\n if (!label) return null;\n if (!tooltip) return cmp;\n return (\n <Tooltip\n message={tooltip}\n showQuestionMark\n questionIconSize=\"sm\"\n contentProps={{\n side: \"right\",\n align: \"center\"\n }}\n {...tooltipProps}\n triggerProps={{\n ...tooltipProps?.triggerProps,\n className: cn('cursor-help', tooltipProps?.triggerProps?.className),\n }}\n >\n {cloneElement(cmp, { className: cn('cursor-help', cmp.props.classNames) })}\n </Tooltip>\n )\n}\n\nexport const FormRenderControl = <\n Data extends FieldValues = FieldValues,\n>(\n props: FormRenderControlProps<Data>\n) => {\n const {\n form,\n name,\n label,\n tooltip,\n tooltipProps,\n render,\n containerProps = {},\n showErrorMessages = true,\n ...rest\n } = props;\n return (\n <FormField\n control={form.control}\n name={name}\n render={(params) => (\n <FormItem {...containerProps}>\n <FormLabelWithTooltip\n label={label}\n tooltip={tooltip}\n tooltipProps={tooltipProps}\n />\n {/*{(label || tooltip) && (*/}\n {/* <FormLabel className={cn(\"flex items-center gap-1\")}>*/}\n {/* {label && <span>{label}</span>}*/}\n {/* {tooltip && (*/}\n {/* <Tooltip*/}\n {/* message={tooltip}*/}\n {/* showQuestionMark*/}\n {/* questionIconSize=\"xs\"*/}\n {/* contentProps={{*/}\n {/* side: \"right\",*/}\n {/* align: \"center\"*/}\n {/* }}*/}\n {/* {...props.tooltipProps}*/}\n {/* />*/}\n {/* )}*/}\n {/* </FormLabel>*/}\n {/*)}*/}\n {render(params)}\n {showErrorMessages && <FormMessage/>}\n </FormItem>\n )}\n {...rest}\n />\n );\n};\n"],"names":["FormLabelWithTooltip","props","label","tooltip","tooltipProps","cmp","jsx","FormLabel","Tooltip","cn","cloneElement","FormRenderControl","form","name","render","containerProps","showErrorMessages","rest","FormField","params","jsxs","FormItem","FormMessage"],"mappings":";;;;;;AAaA,MAAMA,IAAuB,CAE3BC,MAA4C;AAC5C,QAAM,EAAE,OAAAC,GAAO,SAAAC,GAAS,cAAAC,EAAA,IAAiBH,GACnCI,IAAM,gBAAAC,EAACC,GAAA,EAAW,UAAAL,EAAA,CAAM;AAC9B,SAAKA,IACAC,IAEH,gBAAAG;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,SAASL;AAAA,MACT,kBAAgB;AAAA,MAChB,kBAAiB;AAAA,MACjB,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,MAER,GAAGC;AAAA,MACJ,cAAc;AAAA,QACZ,GAAGA,GAAc;AAAA,QACjB,WAAWK,EAAG,eAAeL,GAAc,cAAc,SAAS;AAAA,MAAA;AAAA,MAGnE,UAAAM,EAAaL,GAAK,EAAE,WAAWI,EAAG,eAAeJ,EAAI,MAAM,UAAU,EAAA,CAAG;AAAA,IAAA;AAAA,EAAA,IAhBxDA,IADF;AAoBrB,GAEaM,IAAoB,CAG/BV,MACG;AACH,QAAM;AAAA,IACJ,MAAAW;AAAA,IACA,MAAAC;AAAA,IACA,OAAAX;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,QAAAU;AAAA,IACA,gBAAAC,IAAiB,CAAA;AAAA,IACjB,mBAAAC,IAAoB;AAAA,IACpB,GAAGC;AAAA,EAAA,IACDhB;AACJ,SACE,gBAAAK;AAAA,IAACY;AAAA,IAAA;AAAA,MACC,SAASN,EAAK;AAAA,MACd,MAAAC;AAAA,MACA,QAAQ,CAACM,MACP,gBAAAC,EAACC,GAAA,EAAU,GAAGN,GACZ,UAAA;AAAA,QAAA,gBAAAT;AAAA,UAACN;AAAA,UAAA;AAAA,YACC,OAAAE;AAAA,YACA,SAAAC;AAAA,YACA,cAAAC;AAAA,UAAA;AAAA,QAAA;AAAA,QAmBDU,EAAOK,CAAM;AAAA,QACbH,uBAAsBM,GAAA,CAAA,CAAW;AAAA,MAAA,GACpC;AAAA,MAED,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -14,6 +14,7 @@ export interface FormRenderControlProps<Data extends FieldValues = FieldValues>
|
|
|
14
14
|
tooltipProps?: Omit<TooltipProps, "message">;
|
|
15
15
|
render: FormRenderProps<Data>;
|
|
16
16
|
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
17
|
+
showErrorMessages?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export type FormRenderControlExtendProps<Data extends FieldValues = FieldValues> = Omit<FormRenderControlProps<Data>, 'render'>;
|
|
19
20
|
//# sourceMappingURL=FormRenderControl.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRenderControl.types.d.ts","sourceRoot":"","sources":["../../src/Form/FormRenderControl.types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,SAAS,EACT,WAAW,EACX,aAAa,EACb,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,eAAe,CAAC,IAAI,SAAS,WAAW,IAAI,CAAC,EACvD,KAAK,EACL,UAAU,EACV,SAAS,GACV,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,UAAU,EAAE,oBAAoB,CAAC;IACjC,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;CACrC,KAAK,YAAY,CAAC;AAEnB,MAAM,WAAW,sBAAsB,CACrC,IAAI,SAAS,WAAW,GAAG,WAAW;IAEtC,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAC7C,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"FormRenderControl.types.d.ts","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2
2
|
"name": "@oneplatformdev/ui",
|
|
3
|
-
"version": "0.1.99-beta.
|
|
3
|
+
"version": "0.1.99-beta.247",
|
|
4
4
|
"description": "UI component library for OnePlatform",
|
|
5
5
|
"author": "One Platform Development Team",
|
|
6
6
|
"keywords": [
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"recharts": "^3.2.0",
|
|
107
107
|
"sonner": "^2.0.7",
|
|
108
108
|
"vaul": "^1.1.2",
|
|
109
|
-
"@oneplatformdev/tokens": "^0.1.99-beta.
|
|
110
|
-
"@oneplatformdev/utils": "^0.1.99-beta.
|
|
111
|
-
"@oneplatformdev/hooks": "^0.1.99-beta.
|
|
109
|
+
"@oneplatformdev/tokens": "^0.1.99-beta.247",
|
|
110
|
+
"@oneplatformdev/utils": "^0.1.99-beta.247",
|
|
111
|
+
"@oneplatformdev/hooks": "^0.1.99-beta.247"
|
|
112
112
|
},
|
|
113
113
|
"scripts": {
|
|
114
114
|
"chromatic": "chromatic"
|