@stackone/malachite 0.1.1 → 0.2.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 CHANGED
@@ -1,27 +1,11 @@
1
- import { CodeTextProps } from './codeText';
2
1
  import { Control } from 'react-hook-form';
3
- import { createStyles } from 'antd-style';
4
- import { CSSObject } from 'antd-style';
5
- import { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
+ import { CSSProperties } from 'react';
6
3
  import { default as default_2 } from 'react';
7
- import { EllipsisTextProps } from './ellipsisText';
8
4
  import { FC } from 'react';
9
5
  import { FieldPath } from 'react-hook-form';
10
6
  import { FieldValues } from 'react-hook-form';
11
- import { FormInstance } from 'antd';
12
- import { FormSectionTitleProps } from './formSectionText';
13
- import { HandWrittenProps } from './handWritten';
14
- import { JSX as JSX_2 } from 'react';
15
- import { LinkProps } from './link';
16
- import { PageTitleProps } from './pageTitle';
17
- import * as React_2 from 'react';
18
7
  import { ReactNode } from 'react';
19
- import { SecondaryTextProps } from './secondaryText';
20
- import { SectionTitleProps } from './sectionTitle';
21
- import { StatisticLabelProps } from './statisticLabel';
22
- import { StatisticValueProps } from './statisticValue';
23
- import { TerminalTextProps } from './terminalText';
24
- import { TextProps } from './text';
8
+ import { UseFormReturn } from 'react-hook-form';
25
9
 
26
10
  export declare const Alert: default_2.FC<AlertProps>;
27
11
 
@@ -29,18 +13,67 @@ declare interface AlertProps {
29
13
  type?: AlertType;
30
14
  message: string;
31
15
  hasMargin?: boolean;
16
+ className?: string;
32
17
  }
33
18
 
34
- declare type AlertType = 'success' | 'error' | 'warning' | 'info';
19
+ declare type AlertType = 'info' | 'success' | 'error' | 'warning';
20
+
21
+ /**
22
+ * Apply a custom theme while preserving the current theme mode (light/dark)
23
+ */
24
+ export declare function applyCustomTheme(customTheme: PartialMalachiteTheme): void;
25
+
26
+ /**
27
+ * Apply the dark theme
28
+ */
29
+ export declare function applyDarkTheme(): void;
30
+
31
+ /**
32
+ * Apply the default (light) theme
33
+ */
34
+ export declare function applyLightTheme(): void;
35
+
36
+ /**
37
+ * Apply a custom theme to Malachite components
38
+ * This function sets CSS custom properties that will be used by all Malachite components
39
+ * Works with Shadow DOM isolation by applying to all registered shadow roots
40
+ */
41
+ export declare function applyTheme(theme: PartialMalachiteTheme): void;
42
+
43
+ export declare const BaseFormComponent: default_2.FC<BaseFormComponentProps>;
44
+
45
+ declare interface BaseFormComponentProps {
46
+ label?: string;
47
+ description?: string;
48
+ hint?: string;
49
+ tooltip?: string;
50
+ required?: boolean;
51
+ key?: string;
52
+ name: FieldPath<FieldValues>;
53
+ defaultValue?: string;
54
+ loading?: boolean;
55
+ formControl?: Control<FieldValues, unknown>;
56
+ loadingComponent: default_2.ReactNode;
57
+ children?: default_2.ReactNode;
58
+ }
35
59
 
36
60
  export declare const Button: default_2.ForwardRefExoticComponent<ButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
37
61
 
38
62
  declare interface ButtonDefinition {
39
63
  label: string;
40
- onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => Promise<void> | void;
64
+ onClick?: (e?: default_2.MouseEvent<HTMLElement, MouseEvent>) => Promise<void> | void;
65
+ disabled?: boolean;
66
+ danger?: boolean;
67
+ icon?: default_2.ReactNode;
68
+ tooltip?: string;
69
+ }
70
+
71
+ declare interface ButtonDefinition_2 {
72
+ label: string;
73
+ onClick?: (e?: default_2.MouseEvent<HTMLElement, MouseEvent>) => Promise<void> | void;
41
74
  disabled?: boolean;
42
75
  danger?: boolean;
43
- icon?: React.ReactNode;
76
+ icon?: default_2.ReactNode;
44
77
  tooltip?: string;
45
78
  }
46
79
 
@@ -52,24 +85,26 @@ declare interface ButtonListProps {
52
85
  children: ReactNode;
53
86
  onClick: () => void;
54
87
  }>;
88
+ className?: string;
55
89
  }
56
90
 
57
- declare interface ButtonProps {
58
- type?: ButtonType;
91
+ declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
92
+ variant: ButtonVariant;
93
+ size?: ButtonSize;
94
+ loading?: boolean;
59
95
  disabled?: boolean;
60
- htmlType?: 'button' | 'submit' | 'reset';
61
96
  icon?: default_2.ReactNode;
62
- size?: 'xsmall' | 'small' | 'medium' | 'large';
97
+ iconPosition?: 'start' | 'end';
63
98
  flexGrow?: boolean;
64
- children?: default_2.ReactNode;
65
- loading?: boolean;
66
- tooltip?: string;
67
- onClick?: (e?: default_2.MouseEvent<HTMLElement, MouseEvent>) => void;
68
99
  fill?: boolean;
69
- iconPosition?: 'start' | 'end';
100
+ tooltip?: string;
101
+ children?: default_2.ReactNode;
102
+ onClick?: default_2.MouseEventHandler<HTMLButtonElement>;
70
103
  }
71
104
 
72
- declare type ButtonType = 'filled' | 'outline' | 'destructive' | 'green' | 'orange' | 'red' | 'ghost' | 'no-style';
105
+ declare type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large';
106
+
107
+ declare type ButtonVariant = 'filled' | 'outline' | 'destructive' | 'success' | 'warning' | 'error' | 'ghost' | 'no-style';
73
108
 
74
109
  export declare const Card: default_2.FC<CardProps>;
75
110
 
@@ -88,110 +123,126 @@ declare interface CardProps {
88
123
  alignSelf?: 'center';
89
124
  height?: string;
90
125
  footer?: default_2.ReactNode;
126
+ className?: string;
127
+ style?: default_2.CSSProperties;
91
128
  }
92
129
 
93
- declare interface Colors {
94
- orangeForeground: string;
95
- orangeBackground: string;
96
- redForeground: string;
97
- redBackground: string;
98
- greenForeground: string;
99
- greenBackground: string;
100
- primaryForeground: string;
101
- primaryBackground: string;
102
- primaryShadow: string;
103
- primaryBorder: string;
104
- primaryBorderHover: string;
105
- secondaryForeground: string;
106
- secondaryBackground: string;
107
- secondaryShadow: string;
108
- secondaryBorder: string;
109
- secondaryBorderHover: string;
110
- destructiveBackground: string;
111
- destructiveForeground: string;
112
- destructiveShadow: string;
113
- destructiveBorder: string;
114
- background: string;
115
- dimmedBackground: string;
116
- dimmedForeground: string;
117
- dimmedForegroundSecondary: string;
118
- quoteBackground: string;
119
- quoteForeground: string;
120
- linkForeground: string;
121
- linkForegroundHover: string;
130
+ declare interface CodeTextProps {
131
+ bold?: boolean;
132
+ size?: FontSize;
133
+ hasBorder?: boolean;
134
+ color?: string;
135
+ backgroundColor?: string;
136
+ children: default_2.ReactNode;
137
+ className?: string;
138
+ style?: default_2.CSSProperties;
122
139
  }
123
140
 
124
141
  export declare const CustomIcons: {
125
- AccountIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
126
- AccountsIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
127
- AddIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
128
- AdvancedLogsIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
129
- ApiKeysIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
130
- ArrowLeftIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
131
- Authentication: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
132
- BiDirectionalArrowsIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
133
- CaretDownIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
134
- CaretLeftIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
135
- CaretRightIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
136
- CaretUpIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
137
- ChangePasswordIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
138
- CheckCircleFilledIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
139
- ClearIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
140
- CloseIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
141
- CommandKeyIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
142
- CopyIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
143
- CsvIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
144
- CustomFieldIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
145
- DashboardIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
146
- DateIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
147
- DisabledIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
148
- DisableIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
149
- DocIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
150
- DownloadIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
151
- EditIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
152
- EnableIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
153
- EnumIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
154
- ExpandIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
155
- FieldMappingIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
156
- FilledCaretDownIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
157
- FilledCaretRightIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
158
- FilterIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
159
- ForbiddenIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
160
- ForwardArrowIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
161
- InfoIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
162
- IntegrationsIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
163
- KeyIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
164
- LogsIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
165
- MagicWandIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
166
- ManageTeamIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
167
- ManualWebhookIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
168
- MembersIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
169
- ModalIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
170
- NavbarCollapseIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
171
- NavbarExpandIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
172
- NotFoundIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
173
- PlusIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
174
- PreviewIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
175
- ProgrammaticWebhookIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
176
- PulseIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
177
- RefreshIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
178
- RejectIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
179
- ReloadIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
180
- RequiredFieldIndicatorIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
181
- SecurityIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
182
- SettingsIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
183
- SignOutIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
184
- SliderIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
185
- SortIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
186
- SourceIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
187
- SyntheticWebhookIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
188
- TrashIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
189
- UploadIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
190
- WebhookEventsIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
191
- WebhookIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
192
- WebhookSigningSecretIcon: (props: Partial<CustomIconComponentProps>) => JSX_2.Element;
142
+ AccountIcon: FC<IconProps>;
143
+ AccountsIcon: FC<IconProps>;
144
+ AddIcon: FC<IconProps>;
145
+ AdvancedLogsIcon: FC<IconProps>;
146
+ ApiKeysIcon: FC<IconProps>;
147
+ ArrowLeftIcon: FC<IconProps>;
148
+ AuthenticationIcon: FC<IconProps>;
149
+ BiDirectionalArrowsIcon: FC<IconProps>;
150
+ CaretDownIcon: FC<IconProps>;
151
+ CaretLeftIcon: FC<IconProps>;
152
+ CaretRightIcon: FC<IconProps>;
153
+ CaretUpIcon: FC<IconProps>;
154
+ ChangePasswordIcon: FC<IconProps>;
155
+ CheckCircleFilled: FC<IconProps>;
156
+ ClearIcon: FC<IconProps>;
157
+ CloseIcon: FC<IconProps>;
158
+ CommandKeyIcon: FC<IconProps>;
159
+ CopyIcon: FC<IconProps>;
160
+ CsvIcon: FC<IconProps>;
161
+ CustomFieldIcon: FC<IconProps>;
162
+ DashboardIcon: FC<IconProps>;
163
+ DateIcon: FC<IconProps>;
164
+ DisabledIcon: FC<IconProps>;
165
+ DisableIcon: FC<IconProps>;
166
+ DocIcon: FC<IconProps>;
167
+ DownloadIcon: FC<IconProps>;
168
+ EditIcon: FC<IconProps>;
169
+ EnableIcon: FC<IconProps>;
170
+ EnumIcon: FC<IconProps>;
171
+ ErrorCircleFilled: FC<IconProps>;
172
+ ExpandIcon: FC<IconProps>;
173
+ EyeClosedIcon: FC<IconProps>;
174
+ EyeIcon: FC<IconProps>;
175
+ FieldMappingIcon: FC<IconProps>;
176
+ FilledCaretDownIcon: FC<IconProps>;
177
+ FilledCaretRightIcon: FC<IconProps>;
178
+ FilterIcon: FC<IconProps>;
179
+ ForbiddenIcon: FC<IconProps>;
180
+ ForwardArrowIcon: FC<IconProps>;
181
+ InfoIcon: FC<IconProps>;
182
+ InfoCircleFilled: FC<IconProps>;
183
+ IntegrationsIcon: FC<IconProps>;
184
+ KeyIcon: FC<IconProps>;
185
+ LogsIcon: FC<IconProps>;
186
+ MagicWandIcon: FC<IconProps>;
187
+ ManageTeamIcon: FC<IconProps>;
188
+ ManualWebhookIcon: FC<IconProps>;
189
+ MembersIcon: FC<IconProps>;
190
+ ModalIcon: FC<IconProps>;
191
+ NavbarCollapseIcon: FC<IconProps>;
192
+ NavbarExpandIcon: FC<IconProps>;
193
+ NotFoundIcon: FC<IconProps>;
194
+ PlusIcon: FC<IconProps>;
195
+ PreviewIcon: FC<IconProps>;
196
+ ProgrammaticWebhookIcon: FC<IconProps>;
197
+ PulseIcon: FC<IconProps>;
198
+ RefreshIcon: FC<IconProps>;
199
+ RejectIcon: FC<IconProps>;
200
+ ReloadIcon: FC<IconProps>;
201
+ RequiredFieldIndicatorIcon: FC<IconProps>;
202
+ SecurityIcon: FC<IconProps>;
203
+ SettingsIcon: FC<IconProps>;
204
+ SignOutIcon: FC<IconProps>;
205
+ SliderIcon: FC<IconProps>;
206
+ SortIcon: FC<IconProps>;
207
+ SourceIcon: FC<IconProps>;
208
+ SyntheticWebhookIcon: FC<IconProps>;
209
+ TrashIcon: FC<IconProps>;
210
+ UploadIcon: FC<IconProps>;
211
+ WarningCircleFilled: FC<IconProps>;
212
+ WebhookEventsIcon: FC<IconProps>;
213
+ WebhookIcon: FC<IconProps>;
214
+ WebhookSigningSecretIcon: FC<IconProps>;
193
215
  };
194
216
 
217
+ export declare const darkTheme: MalachiteTheme;
218
+
219
+ export declare const defaultTheme: MalachiteTheme;
220
+
221
+ export declare const Dropdown: default_2.FC<DropdownProps>;
222
+
223
+ export declare interface DropdownItem {
224
+ id: string;
225
+ label: string;
226
+ }
227
+
228
+ export declare interface DropdownProps {
229
+ items: DropdownItem[];
230
+ onItemSelected?: (id?: string) => void;
231
+ defaultValue?: string;
232
+ disabled?: boolean;
233
+ error?: boolean;
234
+ className?: string;
235
+ }
236
+
237
+ declare interface EllipsisTextProps {
238
+ children: default_2.ReactNode;
239
+ tooltip?: default_2.ReactNode | string;
240
+ maxWidth?: string;
241
+ color?: TextColor;
242
+ className?: string;
243
+ style?: default_2.CSSProperties;
244
+ }
245
+
195
246
  export declare const Flex: default_2.FC<FlexProps>;
196
247
 
197
248
  export declare enum FlexAlign {
@@ -231,10 +282,13 @@ declare interface FlexProps {
231
282
  width?: string;
232
283
  id?: string;
233
284
  children?: default_2.ReactNode;
285
+ className?: string;
234
286
  }
235
287
 
236
288
  declare type FontSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
237
289
 
290
+ declare type FontWeight = 'normal' | 'semi-bold' | 'bold';
291
+
238
292
  export declare const FooterLinks: default_2.FC<FooterLinksProps>;
239
293
 
240
294
  declare interface FooterLinksProps {
@@ -242,15 +296,83 @@ declare interface FooterLinksProps {
242
296
  showDocsSupport?: boolean;
243
297
  }
244
298
 
299
+ /**
300
+ * Form component that escapes Shadow DOM to avoid "Invalid hook call" errors.
301
+ *
302
+ * This component automatically renders outside Shadow DOM boundaries, allowing
303
+ * react-hook-form hooks to work properly while maintaining the styling and
304
+ * functionality expected from a form component.
305
+ *
306
+ * @example
307
+ * // Works inside MalachiteContext - form will escape Shadow DOM automatically
308
+ * <MalachiteContext>
309
+ * <Form
310
+ * defaultValues={{ username: '', email: '' }}
311
+ * onFinish={(data) => console.log(data)}
312
+ * >
313
+ * <Input name="username" label="Username" required />
314
+ * <Input name="email" label="Email" required />
315
+ * <Button type="submit">Submit</Button>
316
+ * </Form>
317
+ * </MalachiteContext>
318
+ *
319
+ * @example
320
+ * // Advanced usage with external form instance
321
+ * const form = useForm({ defaultValues: { username: '' } });
322
+ *
323
+ * <MalachiteContext>
324
+ * <Form formInstance={form} onFinish={onSubmit}>
325
+ * <Input name="username" />
326
+ * <Button type="submit">Submit</Button>
327
+ * </Form>
328
+ * </MalachiteContext>
329
+ */
245
330
  export declare const Form: default_2.FC<FormProps>;
246
331
 
332
+ export declare const FormItem: default_2.FC<FormItemProps>;
333
+
334
+ declare interface FormItemProps {
335
+ control: Control<FieldValues, unknown>;
336
+ name: FieldPath<FieldValues>;
337
+ children: default_2.ReactNode;
338
+ }
339
+
247
340
  declare interface FormProps {
248
341
  children: default_2.ReactNode;
249
- onFinish?: () => void;
250
- formInstance?: FormInstance;
342
+ onFinish?: (data: FieldValues) => void;
343
+ formInstance?: UseFormReturn<FieldValues>;
344
+ defaultValues?: FieldValues;
345
+ className?: string;
346
+ }
347
+
348
+ declare interface FormSectionTitleProps {
349
+ children: default_2.ReactNode;
350
+ className?: string;
251
351
  style?: default_2.CSSProperties;
252
352
  }
253
353
 
354
+ /**
355
+ * Get current theme values from CSS custom properties
356
+ */
357
+ export declare function getCurrentTheme(): MalachiteTheme;
358
+
359
+ /**
360
+ * Get current theme mode from localStorage
361
+ */
362
+ export declare function getCurrentThemeMode(): 'light' | 'dark';
363
+
364
+ declare interface IconProps {
365
+ size?: number | string;
366
+ className?: string;
367
+ style?: CSSProperties;
368
+ onClick?: () => void;
369
+ }
370
+
371
+ /**
372
+ * Initialize the theme system - should be called on app startup
373
+ */
374
+ export declare function initializeTheme(): void;
375
+
254
376
  export declare const Input: default_2.FC<InputProps>;
255
377
 
256
378
  declare interface InputProps {
@@ -261,9 +383,9 @@ declare interface InputProps {
261
383
  icon?: default_2.ReactNode;
262
384
  readOnly?: boolean;
263
385
  name: FieldPath<FieldValues> | string;
264
- type?: 'text' | 'password' | 'number';
386
+ type?: InputType;
265
387
  description?: string;
266
- size?: SizeType;
388
+ size?: InputSize;
267
389
  required?: boolean;
268
390
  error?: boolean;
269
391
  loading?: boolean;
@@ -276,9 +398,163 @@ declare interface InputProps {
276
398
  buttons?: ButtonDefinition[];
277
399
  onCopyClick?: () => void;
278
400
  onChange?: (value: string) => void;
401
+ onBlur?: () => void;
402
+ }
403
+
404
+ declare type InputSize = 'small' | 'medium' | 'large';
405
+
406
+ declare type InputType = 'text' | 'password' | 'number' | 'email' | 'tel' | 'url';
407
+
408
+ declare interface LinkProps {
409
+ href: string;
410
+ target?: '_blank' | '_self' | '_parent' | '_top';
411
+ rel?: string;
412
+ children: default_2.ReactNode;
413
+ className?: string;
414
+ showRightBorder?: boolean;
415
+ showLeftBorder?: boolean;
416
+ padding?: boolean;
417
+ color?: 'default' | 'dimmed';
418
+ fontSize?: 'sm' | 'base';
279
419
  }
280
420
 
281
- export declare const Markdown: default_2.FC<MarkdownProps>;
421
+ /**
422
+ * MalachiteContext provides a Shadow DOM context with theme setup for Malachite components.
423
+ * Use this to wrap groups of Malachite components instead of each component managing its own Shadow DOM.
424
+ *
425
+ * @example
426
+ * <MalachiteContext>
427
+ * <Button variant="filled">Click me</Button>
428
+ * <Card>
429
+ * <CardContent>Hello world</CardContent>
430
+ * </Card>
431
+ * </MalachiteContext>
432
+ */
433
+ export declare const MalachiteContext: default_2.FC<MalachiteContextProps>;
434
+
435
+ declare interface MalachiteContextProps {
436
+ children: default_2.ReactNode;
437
+ className?: string;
438
+ }
439
+
440
+ export declare interface MalachiteTheme {
441
+ shadows: {
442
+ sm: string;
443
+ md: string;
444
+ lg: string;
445
+ xl: string;
446
+ default: string;
447
+ success: string;
448
+ warning: string;
449
+ error: string;
450
+ };
451
+ colors: {
452
+ shadowColor: string;
453
+ shadowOpacity: number;
454
+ card: {
455
+ background: string;
456
+ foreground: string;
457
+ border: string;
458
+ shadow: string;
459
+ dimmedBackground: string;
460
+ headerBackground: string;
461
+ footerBackground: string;
462
+ };
463
+ alert: {
464
+ info: {
465
+ background: string;
466
+ foreground: string;
467
+ };
468
+ success: {
469
+ background: string;
470
+ foreground: string;
471
+ };
472
+ error: {
473
+ background: string;
474
+ foreground: string;
475
+ };
476
+ warning: {
477
+ background: string;
478
+ foreground: string;
479
+ };
480
+ };
481
+ tooltip: {
482
+ background: string;
483
+ foreground: string;
484
+ border: string;
485
+ shadow: string;
486
+ };
487
+ primary: {
488
+ background: string;
489
+ foreground: string;
490
+ border: string;
491
+ borderHover: string;
492
+ };
493
+ outline: {
494
+ foreground: string;
495
+ };
496
+ secondary: {
497
+ background: string;
498
+ foreground: string;
499
+ border: string;
500
+ borderHover: string;
501
+ };
502
+ destructive: {
503
+ background: string;
504
+ foreground: string;
505
+ border: string;
506
+ borderHover: string;
507
+ shadow: string;
508
+ shadowLight: string;
509
+ shadowMedium: string;
510
+ };
511
+ success: {
512
+ background: string;
513
+ foreground: string;
514
+ border: string;
515
+ borderHover: string;
516
+ backgroundGlass: string;
517
+ shadowLight: string;
518
+ shadowMedium: string;
519
+ };
520
+ warning: {
521
+ background: string;
522
+ foreground: string;
523
+ border: string;
524
+ borderHover: string;
525
+ backgroundGlass: string;
526
+ shadowLight: string;
527
+ shadowMedium: string;
528
+ };
529
+ error: {
530
+ background: string;
531
+ foreground: string;
532
+ border: string;
533
+ borderHover: string;
534
+ backgroundGlass: string;
535
+ shadowLight: string;
536
+ shadowMedium: string;
537
+ };
538
+ buttonList: {
539
+ background: string;
540
+ foreground: string;
541
+ hoverBackground: string;
542
+ hoverForeground: string;
543
+ };
544
+ text: {
545
+ primary: string;
546
+ secondary: string;
547
+ dimmed: string;
548
+ placeholder: string;
549
+ destructive: string;
550
+ success: string;
551
+ warning: string;
552
+ error: string;
553
+ linkForeground: string;
554
+ linkForegroundHover: string;
555
+ };
556
+ };
557
+ }
282
558
 
283
559
  declare interface MarkdownProps {
284
560
  text: string;
@@ -293,69 +569,169 @@ declare interface PaddedProps {
293
569
  horizontal: PaddingSize;
294
570
  children: default_2.ReactNode;
295
571
  fullHeight?: boolean;
572
+ className?: string;
296
573
  }
297
574
 
298
575
  declare type PaddingSize = 'small' | 'medium' | 'large' | 'none';
299
576
 
300
- declare type SizeType = 'small' | 'middle' | 'large';
577
+ declare interface PageTitleProps {
578
+ children: default_2.ReactNode;
579
+ margin?: string;
580
+ className?: string;
581
+ style?: default_2.CSSProperties;
582
+ }
583
+
584
+ export declare interface PartialMalachiteTheme {
585
+ shadows?: Partial<MalachiteTheme['shadows']>;
586
+ colors?: {
587
+ shadowColor?: string;
588
+ shadowOpacity?: number;
589
+ card?: Partial<MalachiteTheme['colors']['card']>;
590
+ alert?: Partial<MalachiteTheme['colors']['alert']>;
591
+ tooltip?: Partial<MalachiteTheme['colors']['tooltip']>;
592
+ primary?: Partial<MalachiteTheme['colors']['primary']>;
593
+ outline?: Partial<MalachiteTheme['colors']['outline']>;
594
+ secondary?: Partial<MalachiteTheme['colors']['secondary']>;
595
+ destructive?: Partial<MalachiteTheme['colors']['destructive']>;
596
+ success?: Partial<MalachiteTheme['colors']['success']>;
597
+ warning?: Partial<MalachiteTheme['colors']['warning']>;
598
+ error?: Partial<MalachiteTheme['colors']['error']>;
599
+ buttonList?: Partial<MalachiteTheme['colors']['buttonList']>;
600
+ text?: Partial<MalachiteTheme['colors']['text']>;
601
+ };
602
+ }
603
+
604
+ /**
605
+ * Reset theme to default values
606
+ */
607
+ export declare function resetTheme(): void;
608
+
609
+ declare interface SecondaryTextProps {
610
+ children: default_2.ReactNode;
611
+ fontWeight?: FontWeight;
612
+ size?: FontSize;
613
+ textTransform?: 'uppercase' | 'lowercase' | 'capitalize' | 'none';
614
+ className?: string;
615
+ style?: default_2.CSSProperties;
616
+ }
617
+
618
+ declare interface SectionTitleProps {
619
+ children: default_2.ReactNode;
620
+ className?: string;
621
+ style?: default_2.CSSProperties;
622
+ }
623
+
624
+ /**
625
+ * ShadowEscape renders its children OUTSIDE the Shadow DOM to avoid React hook issues.
626
+ * This is used internally by form components to escape Shadow DOM boundaries.
627
+ *
628
+ * The component finds the nearest non-shadow DOM ancestor and renders there.
629
+ */
630
+ export declare const ShadowEscape: default_2.FC<ShadowEscapeProps>;
631
+
632
+ declare interface ShadowEscapeProps {
633
+ children: default_2.ReactNode;
634
+ className?: string;
635
+ }
301
636
 
302
637
  export declare const Spacer: default_2.FC<SpacerProps>;
303
638
 
304
639
  declare interface SpacerProps {
305
640
  direction?: 'horizontal' | 'vertical';
306
641
  size?: number;
307
- align?: 'center' | 'start' | 'end' | 'baseline';
642
+ align?: 'center' | 'start' | 'end' | 'baseline' | 'stretch';
308
643
  justifyContent?: 'space-between' | 'end' | 'center';
309
644
  padding?: string;
310
645
  children: default_2.ReactNode;
311
646
  id?: string;
312
647
  fullHeight?: boolean;
313
648
  fullWidth?: boolean;
649
+ className?: string;
314
650
  }
315
651
 
316
652
  export declare const Spinner: default_2.FC<SpinnerProps>;
317
653
 
318
654
  declare interface SpinnerProps {
319
655
  size?: 'xxxsmall' | 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large';
656
+ className?: string;
657
+ style?: default_2.CSSProperties;
320
658
  }
321
659
 
322
- declare type TextColor = 'regular' | 'dimmed' | 'primary' | 'secondary' | 'destructive' | 'green' | 'red' | 'orange';
660
+ declare interface StatisticLabelProps {
661
+ bold?: boolean;
662
+ children: default_2.ReactNode;
663
+ secondary?: boolean;
664
+ className?: string;
665
+ style?: default_2.CSSProperties;
666
+ }
323
667
 
324
- declare type Theme = 'dark' | 'light' | 'system';
668
+ declare interface StatisticValueProps {
669
+ children: default_2.ReactNode;
670
+ secondary?: boolean;
671
+ className?: string;
672
+ style?: default_2.CSSProperties;
673
+ }
325
674
 
326
- export declare function ThemeProvider({ children, theme, ...props }: ThemeProviderProps): React_2.JSX.Element;
675
+ declare interface TerminalTextProps {
676
+ bold?: boolean;
677
+ size?: FontSize;
678
+ children: default_2.ReactNode;
679
+ color?: TextColor;
680
+ className?: string;
681
+ style?: default_2.CSSProperties;
682
+ }
327
683
 
328
- declare type ThemeProviderProps = {
329
- children: React_2.ReactNode;
330
- theme?: Theme;
331
- };
684
+ export declare const TextArea: default_2.FC<TextAreaProps>;
332
685
 
333
- declare type ThemeProviderState = {
334
- theme: Theme;
335
- colors: Colors;
336
- useStyles: ReturnType<typeof createStyles<{
337
- colors: Colors;
338
- }, Partial<{
339
- 'button-orange': CSSObject;
340
- 'button-red': CSSObject;
341
- 'button-green': CSSObject;
342
- 'button-filled': CSSObject;
343
- 'button-outline': CSSObject;
344
- 'button-destructive': CSSObject;
345
- 'button-ghost': CSSObject;
346
- 'button-no-style': CSSObject;
347
- card: CSSObject;
348
- 'input-wrapper': CSSObject;
349
- terminalText: CSSObject;
350
- link: CSSObject;
351
- buttonList: CSSObject;
352
- buttonListItem: CSSObject;
353
- 'alert-info': CSSObject;
354
- 'alert-success': CSSObject;
355
- 'alert-error': CSSObject;
356
- 'alert-warning': CSSObject;
357
- }>>>;
358
- };
686
+ declare interface TextAreaProps {
687
+ label?: string;
688
+ hint?: string;
689
+ tooltip?: string;
690
+ placeholder?: string;
691
+ icon?: default_2.ReactNode;
692
+ readOnly?: boolean;
693
+ name: FieldPath<FieldValues> | string;
694
+ description?: string;
695
+ size?: TextAreaSize;
696
+ required?: boolean;
697
+ error?: boolean;
698
+ loading?: boolean;
699
+ defaultValue?: string;
700
+ disabled?: boolean;
701
+ prefixValue?: string;
702
+ prefixSecondaryValue?: string;
703
+ ellipsis?: boolean;
704
+ formControl?: Control<FieldValues, unknown>;
705
+ buttons?: ButtonDefinition_2[];
706
+ onCopyClick?: () => void;
707
+ onChange?: (value: string) => void;
708
+ value?: string;
709
+ onBlur?: () => void;
710
+ rows?: number;
711
+ maxLength?: number;
712
+ resize?: 'none' | 'vertical' | 'horizontal' | 'both';
713
+ }
714
+
715
+ declare type TextAreaSize = 'small' | 'medium' | 'large';
716
+
717
+ declare type TextColor = 'primary' | 'secondary' | 'dimmed' | 'destructive' | 'success' | 'warning' | 'error' | 'link';
718
+
719
+ declare interface TextProps {
720
+ color?: TextColor;
721
+ size?: FontSize;
722
+ underline?: boolean;
723
+ fontWeight?: FontWeight;
724
+ children: default_2.ReactNode;
725
+ tooltip?: string;
726
+ textAlign?: 'left' | 'center' | 'right' | 'justify';
727
+ className?: string;
728
+ style?: default_2.CSSProperties;
729
+ }
730
+
731
+ /**
732
+ * Toggle between light and dark themes
733
+ */
734
+ export declare function toggleTheme(): 'light' | 'dark';
359
735
 
360
736
  export declare const Tooltip: default_2.FC<TooltipProps>;
361
737
 
@@ -364,23 +740,22 @@ declare interface TooltipProps {
364
740
  children: default_2.ReactNode;
365
741
  delay?: number;
366
742
  wrapChildren?: boolean;
743
+ placement?: 'top' | 'bottom' | 'left' | 'right';
367
744
  }
368
745
 
369
746
  export declare const Typography: {
370
- Text: FC<TextProps>;
747
+ CodeText: FC<CodeTextProps>;
748
+ EllipsisText: FC<EllipsisTextProps>;
749
+ FormSectionTitle: FC<FormSectionTitleProps>;
750
+ LinkText: FC<LinkProps>;
751
+ MarkdownBlock: FC<MarkdownProps>;
371
752
  PageTitle: FC<PageTitleProps>;
753
+ SecondaryText: FC<SecondaryTextProps>;
754
+ SectionTitle: FC<SectionTitleProps>;
372
755
  StatisticLabel: FC<StatisticLabelProps>;
373
756
  StatisticValue: FC<StatisticValueProps>;
374
- SectionTitle: FC<SectionTitleProps>;
375
- SecondaryText: FC<SecondaryTextProps>;
376
- EllipsisText: FC<EllipsisTextProps>;
377
- CodeText: FC<CodeTextProps>;
378
- FormSectionTitle: FC<FormSectionTitleProps>;
379
757
  TerminalText: FC<TerminalTextProps>;
380
- HandWritten: FC<HandWrittenProps>;
381
- Link: ({ children, href, target, rel }: LinkProps) => JSX_2.Element;
758
+ Text: FC<TextProps>;
382
759
  };
383
760
 
384
- export declare const useTheme: () => ThemeProviderState;
385
-
386
761
  export { }