@stackone/malachite 0.3.2 → 0.5.0
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 +66 -0
- package/dist/index.js +4701 -2418
- 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;
|
|
@@ -217,6 +239,12 @@ export declare const darkTheme: MalachiteTheme;
|
|
|
217
239
|
|
|
218
240
|
export declare const defaultTheme: MalachiteTheme;
|
|
219
241
|
|
|
242
|
+
/**
|
|
243
|
+
* A 1px horizontal divider component that uses the card border style from the theme.
|
|
244
|
+
* The divider spans edge to edge of its container.
|
|
245
|
+
*/
|
|
246
|
+
export declare const Divider: default_2.FC;
|
|
247
|
+
|
|
220
248
|
export declare const Dropdown: default_2.FC<DropdownProps>;
|
|
221
249
|
|
|
222
250
|
export declare interface DropdownItem {
|
|
@@ -393,6 +421,7 @@ declare interface InputProps {
|
|
|
393
421
|
type?: InputType;
|
|
394
422
|
description?: string;
|
|
395
423
|
size?: InputSize;
|
|
424
|
+
variant?: InputVariant;
|
|
396
425
|
required?: boolean;
|
|
397
426
|
error?: boolean;
|
|
398
427
|
loading?: boolean;
|
|
@@ -412,6 +441,8 @@ declare type InputSize = 'small' | 'medium' | 'large';
|
|
|
412
441
|
|
|
413
442
|
declare type InputType = 'text' | 'password' | 'number' | 'email' | 'tel' | 'url';
|
|
414
443
|
|
|
444
|
+
declare type InputVariant = 'default' | 'ghost';
|
|
445
|
+
|
|
415
446
|
declare interface LinkProps {
|
|
416
447
|
href: string;
|
|
417
448
|
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
@@ -548,6 +579,17 @@ export declare interface MalachiteTheme {
|
|
|
548
579
|
hoverBackground: string;
|
|
549
580
|
hoverForeground: string;
|
|
550
581
|
};
|
|
582
|
+
pillButton: {
|
|
583
|
+
background: string;
|
|
584
|
+
foreground: string;
|
|
585
|
+
hoverBackground: string;
|
|
586
|
+
hoverForeground: string;
|
|
587
|
+
pressedBackground: string;
|
|
588
|
+
pressedForeground: string;
|
|
589
|
+
pressedOpacity: string;
|
|
590
|
+
activeBackground: string;
|
|
591
|
+
activeForeground: string;
|
|
592
|
+
};
|
|
551
593
|
text: {
|
|
552
594
|
primary: string;
|
|
553
595
|
secondary: string;
|
|
@@ -560,6 +602,17 @@ export declare interface MalachiteTheme {
|
|
|
560
602
|
linkForeground: string;
|
|
561
603
|
linkForegroundHover: string;
|
|
562
604
|
};
|
|
605
|
+
codeBlock: {
|
|
606
|
+
background: string;
|
|
607
|
+
foreground: string;
|
|
608
|
+
border: string;
|
|
609
|
+
lineNumber: string;
|
|
610
|
+
keyword: string;
|
|
611
|
+
comment: string;
|
|
612
|
+
string: string;
|
|
613
|
+
number: string;
|
|
614
|
+
type: string;
|
|
615
|
+
};
|
|
563
616
|
};
|
|
564
617
|
}
|
|
565
618
|
|
|
@@ -567,6 +620,7 @@ declare interface MarkdownProps {
|
|
|
567
620
|
text: string;
|
|
568
621
|
color?: TextColor;
|
|
569
622
|
size?: FontSize;
|
|
623
|
+
omitMargin?: boolean;
|
|
570
624
|
}
|
|
571
625
|
|
|
572
626
|
export declare const Padded: default_2.FC<PaddedProps>;
|
|
@@ -604,10 +658,22 @@ export declare interface PartialMalachiteTheme {
|
|
|
604
658
|
warning?: Partial<MalachiteTheme['colors']['warning']>;
|
|
605
659
|
error?: Partial<MalachiteTheme['colors']['error']>;
|
|
606
660
|
buttonList?: Partial<MalachiteTheme['colors']['buttonList']>;
|
|
661
|
+
pillButton?: Partial<MalachiteTheme['colors']['pillButton']>;
|
|
607
662
|
text?: Partial<MalachiteTheme['colors']['text']>;
|
|
663
|
+
codeBlock?: Partial<MalachiteTheme['colors']['codeBlock']>;
|
|
608
664
|
};
|
|
609
665
|
}
|
|
610
666
|
|
|
667
|
+
export declare const PillButton: default_2.FC<PillButtonProps>;
|
|
668
|
+
|
|
669
|
+
declare interface PillButtonProps {
|
|
670
|
+
label: string;
|
|
671
|
+
className?: string;
|
|
672
|
+
selected?: boolean;
|
|
673
|
+
disabled?: boolean;
|
|
674
|
+
onClick?: () => void;
|
|
675
|
+
}
|
|
676
|
+
|
|
611
677
|
/**
|
|
612
678
|
* Reset theme to default values
|
|
613
679
|
*/
|