@socprime/react-ui 0.0.5 → 0.0.6
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/index.d.ts +1 -0
- package/package.json +1 -1
- package/ui/Accordion/Accordion.js +2 -1
- package/ui/Editor/Editor.js +20 -14
package/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ type AccordionItemProps = React$1.ComponentProps<typeof AccordionPrimitive.Item>
|
|
|
28
28
|
type AccordionTriggerProps = React$1.ComponentProps<typeof AccordionPrimitive.Trigger> & {
|
|
29
29
|
chevronPosition?: 'left' | 'right';
|
|
30
30
|
chevronVariant?: AccordionChevronVariant;
|
|
31
|
+
classNameHeader?: string;
|
|
31
32
|
};
|
|
32
33
|
type AccordionContentProps = React$1.ComponentProps<typeof AccordionPrimitive.Content>;
|
|
33
34
|
declare const Accordion: React$1.FC<AccordionProps>;
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ const AccordionItem = ({ className, children, ...props }) => {
|
|
|
22
22
|
};
|
|
23
23
|
const AccordionTrigger = ({
|
|
24
24
|
className,
|
|
25
|
+
classNameHeader,
|
|
25
26
|
children,
|
|
26
27
|
chevronPosition,
|
|
27
28
|
chevronVariant,
|
|
@@ -40,7 +41,7 @@ const AccordionTrigger = ({
|
|
|
40
41
|
)
|
|
41
42
|
}
|
|
42
43
|
) : null;
|
|
43
|
-
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
44
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: cn("flex", classNameHeader), children: /* @__PURE__ */ jsxs(
|
|
44
45
|
AccordionPrimitive.Trigger,
|
|
45
46
|
{
|
|
46
47
|
"data-slot": "accordion-trigger",
|
package/ui/Editor/Editor.js
CHANGED
|
@@ -64,28 +64,34 @@ const Editor = ({
|
|
|
64
64
|
return /* @__PURE__ */ jsxs(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
|
-
id,
|
|
68
|
-
"data-name": name,
|
|
69
67
|
className: cn(
|
|
70
68
|
"border-border bg-secondary min-h-[300px] overflow-hidden rounded-md border transition-shadow h-full",
|
|
71
69
|
className
|
|
72
70
|
),
|
|
73
|
-
onFocus: handleFocus,
|
|
74
|
-
onClick: handleFocus,
|
|
75
71
|
children: [
|
|
76
72
|
header,
|
|
77
73
|
/* @__PURE__ */ jsx(
|
|
78
|
-
|
|
74
|
+
"div",
|
|
79
75
|
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
className: "h-full",
|
|
77
|
+
id,
|
|
78
|
+
"data-name": name,
|
|
79
|
+
onFocus: handleFocus,
|
|
80
|
+
onClick: handleFocus,
|
|
81
|
+
children: /* @__PURE__ */ jsx(
|
|
82
|
+
MonacoEditor,
|
|
83
|
+
{
|
|
84
|
+
onMount: handleEditorDidMount,
|
|
85
|
+
height: "100%",
|
|
86
|
+
language,
|
|
87
|
+
value,
|
|
88
|
+
theme,
|
|
89
|
+
onChange: (val) => onChange?.(val || ""),
|
|
90
|
+
options: editorOptions,
|
|
91
|
+
loading: /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-full w-full rounded-md" }) }),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
)
|
|
89
95
|
}
|
|
90
96
|
)
|
|
91
97
|
]
|