@stackone/malachite 0.4.0 → 0.5.1
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/index.d.ts +35 -31
- package/dist/index.js +4627 -2449
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ declare interface AlertProps {
|
|
|
14
14
|
message: string;
|
|
15
15
|
hasMargin?: boolean;
|
|
16
16
|
className?: string;
|
|
17
|
+
children?: default_2.ReactNode;
|
|
18
|
+
isExpanded?: boolean;
|
|
19
|
+
onToggle?: (expanded: boolean) => void;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
declare type AlertType = 'info' | 'success' | 'error' | 'warning';
|
|
@@ -126,6 +129,25 @@ declare interface CardProps {
|
|
|
126
129
|
style?: default_2.CSSProperties;
|
|
127
130
|
}
|
|
128
131
|
|
|
132
|
+
export declare const CodeBlock: default_2.FC<CodeBlockProps>;
|
|
133
|
+
|
|
134
|
+
declare interface CodeBlockProps {
|
|
135
|
+
/** The code content to display */
|
|
136
|
+
code?: string;
|
|
137
|
+
/** JSON object to display as formatted JSON */
|
|
138
|
+
json?: object;
|
|
139
|
+
/** Show line numbers */
|
|
140
|
+
showLineNumbers?: boolean;
|
|
141
|
+
/** Custom class name */
|
|
142
|
+
className?: string;
|
|
143
|
+
/** Custom styles */
|
|
144
|
+
style?: default_2.CSSProperties;
|
|
145
|
+
/** Height of the code block */
|
|
146
|
+
height?: string | number;
|
|
147
|
+
/** Enable copy functionality */
|
|
148
|
+
enableCopy?: boolean;
|
|
149
|
+
}
|
|
150
|
+
|
|
129
151
|
declare interface CodeTextProps {
|
|
130
152
|
bold?: boolean;
|
|
131
153
|
size?: FontSize;
|
|
@@ -309,37 +331,6 @@ declare interface FooterLinksProps {
|
|
|
309
331
|
showDocsSupport?: boolean;
|
|
310
332
|
}
|
|
311
333
|
|
|
312
|
-
/**
|
|
313
|
-
* Form component that escapes Shadow DOM to avoid "Invalid hook call" errors.
|
|
314
|
-
*
|
|
315
|
-
* This component automatically renders outside Shadow DOM boundaries, allowing
|
|
316
|
-
* react-hook-form hooks to work properly while maintaining the styling and
|
|
317
|
-
* functionality expected from a form component.
|
|
318
|
-
*
|
|
319
|
-
* @example
|
|
320
|
-
* // Works inside MalachiteContext - form will escape Shadow DOM automatically
|
|
321
|
-
* <MalachiteContext>
|
|
322
|
-
* <Form
|
|
323
|
-
* defaultValues={{ username: '', email: '' }}
|
|
324
|
-
* onFinish={(data) => console.log(data)}
|
|
325
|
-
* >
|
|
326
|
-
* <Input name="username" label="Username" required />
|
|
327
|
-
* <Input name="email" label="Email" required />
|
|
328
|
-
* <Button type="submit">Submit</Button>
|
|
329
|
-
* </Form>
|
|
330
|
-
* </MalachiteContext>
|
|
331
|
-
*
|
|
332
|
-
* @example
|
|
333
|
-
* // Advanced usage with external form instance
|
|
334
|
-
* const form = useForm({ defaultValues: { username: '' } });
|
|
335
|
-
*
|
|
336
|
-
* <MalachiteContext>
|
|
337
|
-
* <Form formInstance={form} onFinish={onSubmit}>
|
|
338
|
-
* <Input name="username" />
|
|
339
|
-
* <Button type="submit">Submit</Button>
|
|
340
|
-
* </Form>
|
|
341
|
-
* </MalachiteContext>
|
|
342
|
-
*/
|
|
343
334
|
export declare const Form: default_2.FC<FormProps>;
|
|
344
335
|
|
|
345
336
|
export declare const FormItem: default_2.FC<FormItemProps>;
|
|
@@ -580,6 +571,17 @@ export declare interface MalachiteTheme {
|
|
|
580
571
|
linkForeground: string;
|
|
581
572
|
linkForegroundHover: string;
|
|
582
573
|
};
|
|
574
|
+
codeBlock: {
|
|
575
|
+
background: string;
|
|
576
|
+
foreground: string;
|
|
577
|
+
border: string;
|
|
578
|
+
lineNumber: string;
|
|
579
|
+
keyword: string;
|
|
580
|
+
comment: string;
|
|
581
|
+
string: string;
|
|
582
|
+
number: string;
|
|
583
|
+
type: string;
|
|
584
|
+
};
|
|
583
585
|
};
|
|
584
586
|
}
|
|
585
587
|
|
|
@@ -587,6 +589,7 @@ declare interface MarkdownProps {
|
|
|
587
589
|
text: string;
|
|
588
590
|
color?: TextColor;
|
|
589
591
|
size?: FontSize;
|
|
592
|
+
omitMargin?: boolean;
|
|
590
593
|
}
|
|
591
594
|
|
|
592
595
|
export declare const Padded: default_2.FC<PaddedProps>;
|
|
@@ -626,6 +629,7 @@ export declare interface PartialMalachiteTheme {
|
|
|
626
629
|
buttonList?: Partial<MalachiteTheme['colors']['buttonList']>;
|
|
627
630
|
pillButton?: Partial<MalachiteTheme['colors']['pillButton']>;
|
|
628
631
|
text?: Partial<MalachiteTheme['colors']['text']>;
|
|
632
|
+
codeBlock?: Partial<MalachiteTheme['colors']['codeBlock']>;
|
|
629
633
|
};
|
|
630
634
|
}
|
|
631
635
|
|