lecom-ui 5.3.81 → 5.3.83
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.
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Prism } from 'react-syntax-highlighter';
|
|
2
|
+
import * as themes from 'react-syntax-highlighter/dist/esm/styles/prism';
|
|
3
|
+
export { themes };
|
|
4
|
+
|
|
5
|
+
const SyntaxHighlighter = ({
|
|
6
|
+
style = "vscDarkPlus",
|
|
7
|
+
language = "javascript",
|
|
8
|
+
showLineNumbers = false,
|
|
9
|
+
wrapLines = false,
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
13
|
+
const themeStyle = typeof style === "string" ? themes[style] || themes.vscDarkPlus : style;
|
|
14
|
+
return /* @__PURE__ */ React.createElement(
|
|
15
|
+
Prism,
|
|
16
|
+
{
|
|
17
|
+
language,
|
|
18
|
+
style: themeStyle,
|
|
19
|
+
showLineNumbers,
|
|
20
|
+
wrapLines,
|
|
21
|
+
...props
|
|
22
|
+
},
|
|
23
|
+
children
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { SyntaxHighlighter };
|
|
@@ -16,9 +16,10 @@ const Upload = ({
|
|
|
16
16
|
required,
|
|
17
17
|
error,
|
|
18
18
|
label,
|
|
19
|
+
value,
|
|
19
20
|
id = "input-file-browse"
|
|
20
21
|
}) => {
|
|
21
|
-
const [files, setFiles] = React.useState([]);
|
|
22
|
+
const [files, setFiles] = React.useState(value ?? []);
|
|
22
23
|
const { t } = useTranslation();
|
|
23
24
|
const handleFileChange = (event) => {
|
|
24
25
|
const selectedFiles = event.target.files;
|
package/dist/index.d.ts
CHANGED
|
@@ -964,7 +964,7 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
|
|
|
964
964
|
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
965
965
|
|
|
966
966
|
declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React$1.JSX.Element;
|
|
967
|
-
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLSpanElement |
|
|
967
|
+
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLButtonElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement | HTMLLabelElement | HTMLInputElement | HTMLUListElement | HTMLObjectElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableCaptionElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLegendElement | HTMLLinkElement | HTMLMapElement | HTMLMenuElement | HTMLMetaElement | HTMLMeterElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLPictureElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSlotElement | HTMLSourceElement | HTMLStyleElement | HTMLTableElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTemplateElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLVideoElement>, "id" | "onResize"> & {
|
|
968
968
|
className?: string;
|
|
969
969
|
collapsedSize?: number | undefined;
|
|
970
970
|
collapsible?: boolean | undefined;
|
|
@@ -1095,9 +1095,10 @@ interface UploadProps {
|
|
|
1095
1095
|
required?: boolean;
|
|
1096
1096
|
error?: string;
|
|
1097
1097
|
label?: string;
|
|
1098
|
+
value?: File[];
|
|
1098
1099
|
}
|
|
1099
1100
|
declare const Upload: {
|
|
1100
|
-
({ onFilesSelected, className, accept, multiple, disabled, required, error, label, id, }: UploadProps): React$1.JSX.Element;
|
|
1101
|
+
({ onFilesSelected, className, accept, multiple, disabled, required, error, label, value, id, }: UploadProps): React$1.JSX.Element;
|
|
1101
1102
|
displayName: string;
|
|
1102
1103
|
};
|
|
1103
1104
|
|
package/package.json
CHANGED