lecom-ui 5.3.82 → 5.3.84
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
|
@@ -756,9 +756,9 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
|
|
|
756
756
|
}
|
|
757
757
|
|
|
758
758
|
declare const inputVariants: (props?: ({
|
|
759
|
-
variant?: "
|
|
760
|
-
size?: "
|
|
761
|
-
radius?: "
|
|
759
|
+
variant?: "filled" | "default" | "borderless" | null | undefined;
|
|
760
|
+
size?: "small" | "large" | "default" | null | undefined;
|
|
761
|
+
radius?: "small" | "large" | "default" | "full" | null | undefined;
|
|
762
762
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
763
763
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'sufix' | 'prefix'>, VariantProps<typeof inputVariants> {
|
|
764
764
|
sufix?: React$1.ReactNode;
|
|
@@ -962,7 +962,7 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
|
|
|
962
962
|
declare const RadioGroupItem: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
963
963
|
|
|
964
964
|
declare const ResizablePanelGroup: ({ className, ...props }: React$1.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => React$1.JSX.Element;
|
|
965
|
-
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<
|
|
965
|
+
declare const ResizablePanel: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLAttributes<HTMLElement | HTMLOListElement | HTMLLIElement | HTMLAnchorElement | HTMLSpanElement | HTMLDivElement | HTMLButtonElement | HTMLHeadingElement | HTMLParagraphElement | HTMLLabelElement | HTMLUListElement | HTMLInputElement | 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"> & {
|
|
966
966
|
className?: string;
|
|
967
967
|
collapsedSize?: number | undefined;
|
|
968
968
|
collapsible?: boolean | undefined;
|
|
@@ -1093,9 +1093,10 @@ interface UploadProps {
|
|
|
1093
1093
|
required?: boolean;
|
|
1094
1094
|
error?: string;
|
|
1095
1095
|
label?: string;
|
|
1096
|
+
value?: File[];
|
|
1096
1097
|
}
|
|
1097
1098
|
declare const Upload: {
|
|
1098
|
-
({ onFilesSelected, className, accept, multiple, disabled, required, error, label, id, }: UploadProps): React$1.JSX.Element;
|
|
1099
|
+
({ onFilesSelected, className, accept, multiple, disabled, required, error, label, value, id, }: UploadProps): React$1.JSX.Element;
|
|
1099
1100
|
displayName: string;
|
|
1100
1101
|
};
|
|
1101
1102
|
|
|
@@ -1127,10 +1128,10 @@ declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.
|
|
|
1127
1128
|
declare const TabsContent: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1128
1129
|
|
|
1129
1130
|
declare const textareaVariants: (props?: ({
|
|
1130
|
-
variant?: "
|
|
1131
|
-
size?: "
|
|
1132
|
-
radius?: "
|
|
1133
|
-
resize?: "
|
|
1131
|
+
variant?: "filled" | "default" | "borderless" | null | undefined;
|
|
1132
|
+
size?: "small" | "large" | "default" | null | undefined;
|
|
1133
|
+
radius?: "small" | "large" | "default" | "full" | null | undefined;
|
|
1134
|
+
resize?: "both" | "horizontal" | "vertical" | "default" | "vertical-limited" | null | undefined;
|
|
1134
1135
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1135
1136
|
interface TextareaProps extends React$1.ComponentProps<'textarea'>, VariantProps<typeof textareaVariants> {
|
|
1136
1137
|
}
|
|
@@ -1267,7 +1268,7 @@ declare const SheetClose: React$1.ForwardRefExoticComponent<DialogPrimitive.Dial
|
|
|
1267
1268
|
declare const SheetPortal: React$1.FC<DialogPrimitive.DialogPortalProps>;
|
|
1268
1269
|
declare const SheetOverlay: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1269
1270
|
declare const sheetVariants: (props?: ({
|
|
1270
|
-
side?: "top" | "
|
|
1271
|
+
side?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
1271
1272
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1272
1273
|
interface SheetContentProps extends React$1.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
1273
1274
|
}
|
package/package.json
CHANGED