conversion-ui-library 1.0.6 → 1.0.8
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/dist/components/EditorTextField/EditorTextField.d.ts +73 -0
- package/dist/components/EditorTextField/EditorTextField.d.ts.map +1 -0
- package/dist/components/EditorTextField/EditorTextField.stories.d.ts +21 -0
- package/dist/components/EditorTextField/EditorTextField.stories.d.ts.map +1 -0
- package/dist/components/Popup/Popup.d.ts +7 -1
- package/dist/components/Popup/Popup.d.ts.map +1 -1
- package/dist/components/Popup/Popup.stories.d.ts +9 -5
- package/dist/components/Popup/Popup.stories.d.ts.map +1 -1
- package/dist/index.cjs.js +44 -34
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +8880 -8198
- package/dist/index.umd.js +45 -35
- package/package.json +2 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { OnMount } from '@monaco-editor/react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare const editorFieldVariants: (props?: ({
|
|
5
|
+
variant?: "outlined" | "ghost" | "filled" | null | undefined;
|
|
6
|
+
error?: boolean | null | undefined;
|
|
7
|
+
success?: boolean | null | undefined;
|
|
8
|
+
disabled?: boolean | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
10
|
+
export interface EditorTextFieldProps extends VariantProps<typeof editorFieldVariants> {
|
|
11
|
+
/**
|
|
12
|
+
* The value of the editor
|
|
13
|
+
*/
|
|
14
|
+
value?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Default value if uncontrolled
|
|
17
|
+
*/
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Callback when editor value changes
|
|
21
|
+
*/
|
|
22
|
+
onChange?: (value: string | undefined) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Label text displayed above the editor
|
|
25
|
+
*/
|
|
26
|
+
label?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Helper text displayed below the editor
|
|
29
|
+
*/
|
|
30
|
+
helperText?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the field is required
|
|
33
|
+
*/
|
|
34
|
+
required?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the editor is disabled
|
|
37
|
+
*/
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Programming language for syntax highlighting
|
|
41
|
+
* @default "javascript"
|
|
42
|
+
*/
|
|
43
|
+
language?: "javascript" | "typescript" | "python" | "java" | "json" | "html" | "css" | "sql" | "markdown" | "yaml" | "xml" | "plaintext";
|
|
44
|
+
/**
|
|
45
|
+
* Editor theme
|
|
46
|
+
* @default "light"
|
|
47
|
+
*/
|
|
48
|
+
theme?: "light" | "vs-dark" | "hc-black";
|
|
49
|
+
/**
|
|
50
|
+
* Height of the editor
|
|
51
|
+
* @default "200px"
|
|
52
|
+
*/
|
|
53
|
+
height?: string | number;
|
|
54
|
+
/**
|
|
55
|
+
* Placeholder text when editor is empty
|
|
56
|
+
*/
|
|
57
|
+
placeholder?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Additional className for the container
|
|
60
|
+
*/
|
|
61
|
+
className?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Options to pass to Monaco Editor
|
|
64
|
+
*/
|
|
65
|
+
options?: any;
|
|
66
|
+
/**
|
|
67
|
+
* Callback when editor is mounted
|
|
68
|
+
*/
|
|
69
|
+
onMount?: OnMount;
|
|
70
|
+
}
|
|
71
|
+
export declare const EditorTextField: React.ForwardRefExoticComponent<EditorTextFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=EditorTextField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorTextField.d.ts","sourceRoot":"","sources":["../../../src/components/EditorTextField/E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,21 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { EditorTextField } from './EditorTextField';
|
|
3
|
+
declare const meta: Meta<typeof EditorTextField>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof EditorTextField>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const TypeScript: Story;
|
|
9
|
+
export declare const JSON: Story;
|
|
10
|
+
export declare const Python: Story;
|
|
11
|
+
export declare const SQL: Story;
|
|
12
|
+
export declare const DarkTheme: Story;
|
|
13
|
+
export declare const WithError: Story;
|
|
14
|
+
export declare const WithSuccess: Story;
|
|
15
|
+
export declare const Disabled: Story;
|
|
16
|
+
export declare const Required: Story;
|
|
17
|
+
export declare const Variants: Story;
|
|
18
|
+
export declare const TallEditor: Story;
|
|
19
|
+
export declare const Controlled: Story;
|
|
20
|
+
export declare const MultipleLanguages: Story;
|
|
21
|
+
//# sourceMappingURL=EditorTextField.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorTextField.stories.d.ts","sourceRoot":"","sources":["../../../src/components/EditorTextField/EditorTextField.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CA6DtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9C,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAwBxB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAclB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAcpB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAcjB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAoBvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA0BtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAgDxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAuB/B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
export interface PopupProps {
|
|
2
3
|
open?: boolean;
|
|
3
4
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -9,6 +10,11 @@ export interface PopupProps {
|
|
|
9
10
|
onCancel?: () => void;
|
|
10
11
|
className?: string;
|
|
11
12
|
children?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to show the close (X) button
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
closable?: boolean;
|
|
12
18
|
}
|
|
13
|
-
export declare function Popup({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, className, children, }: PopupProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function Popup({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, onCancel, className, children, closable, }: PopupProps): import("react/jsx-runtime").JSX.Element;
|
|
14
20
|
//# sourceMappingURL=Popup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA+BD,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,YAAiB,EACjB,WAAgB,EAChB,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAe,GAChB,EAAE,UAAU,2CAqEZ"}
|
|
@@ -6,6 +6,11 @@ declare const meta: {
|
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
8
|
};
|
|
9
|
+
args: {
|
|
10
|
+
onConfirm: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
11
|
+
onCancel: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
12
|
+
onOpenChange: import('@vitest/spy').Mock<(...args: any[]) => any>;
|
|
13
|
+
};
|
|
9
14
|
argTypes: {
|
|
10
15
|
open: {
|
|
11
16
|
control: "boolean";
|
|
@@ -22,15 +27,14 @@ declare const meta: {
|
|
|
22
27
|
cancelLabel: {
|
|
23
28
|
control: "text";
|
|
24
29
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
onCancel: {
|
|
29
|
-
action: string;
|
|
30
|
+
closable: {
|
|
31
|
+
control: "boolean";
|
|
30
32
|
};
|
|
31
33
|
};
|
|
32
34
|
};
|
|
33
35
|
export default meta;
|
|
34
36
|
type Story = StoryObj<typeof meta>;
|
|
35
37
|
export declare const WithTrigger: Story;
|
|
38
|
+
export declare const NotClosable: Story;
|
|
39
|
+
export declare const WithClosableTrue: Story;
|
|
36
40
|
//# sourceMappingURL=Popup.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Popup.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAInC,eAAO,MAAM,WAAW,EAAE,KAiEzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAoCzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoC9B,CAAC"}
|