@medixdeck/ui 0.1.18 → 0.1.19
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.cjs +56 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +45 -14
- package/dist/index.js +7350 -6720
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -312,18 +312,23 @@ export declare interface ButtonProps {
|
|
|
312
312
|
/**
|
|
313
313
|
* MedixDeck Re-usable Calendar Component
|
|
314
314
|
*
|
|
315
|
+
* Supports clicking the month or year label in the header to jump directly to
|
|
316
|
+
* a month-picker or year-picker view, avoiding tedious arrow navigation.
|
|
317
|
+
*
|
|
315
318
|
* @example
|
|
316
319
|
* ```tsx
|
|
317
|
-
* <Calendar value={date} onChange={setDate} />
|
|
320
|
+
* <Calendar value={date} onChange={setDate} colorScheme="purple" />
|
|
318
321
|
* ```
|
|
319
322
|
*/
|
|
320
|
-
export declare function Calendar({ value, onChange, minDate, maxDate, ...props }: CalendarProps): JSX_2.Element;
|
|
323
|
+
export declare function Calendar({ value, onChange, minDate, maxDate, colorScheme, ...props }: CalendarProps): JSX_2.Element;
|
|
321
324
|
|
|
322
325
|
export declare interface CalendarProps extends Omit<BoxProps, 'onChange'> {
|
|
323
326
|
value?: Date | null;
|
|
324
327
|
onChange?: (date: Date) => void;
|
|
325
328
|
minDate?: Date;
|
|
326
329
|
maxDate?: Date;
|
|
330
|
+
/** Brand color scheme ('blue' | 'purple') — defaults to 'blue' */
|
|
331
|
+
colorScheme?: 'blue' | 'purple';
|
|
327
332
|
}
|
|
328
333
|
|
|
329
334
|
/**
|
|
@@ -1388,6 +1393,11 @@ export { Heading }
|
|
|
1388
1393
|
|
|
1389
1394
|
export { HStack }
|
|
1390
1395
|
|
|
1396
|
+
/**
|
|
1397
|
+
* Converts HTML content to clean, standard Markdown text.
|
|
1398
|
+
*/
|
|
1399
|
+
export declare function htmlToMarkdown(html: string): string;
|
|
1400
|
+
|
|
1391
1401
|
export { Icon }
|
|
1392
1402
|
|
|
1393
1403
|
/**
|
|
@@ -1518,6 +1528,11 @@ export declare type LogoType = 'full' | 'icon';
|
|
|
1518
1528
|
|
|
1519
1529
|
export declare type LogoVariant = 'blue' | 'purple' | 'black' | 'white';
|
|
1520
1530
|
|
|
1531
|
+
/**
|
|
1532
|
+
* Converts standard Markdown text to HTML.
|
|
1533
|
+
*/
|
|
1534
|
+
export declare function markdownToHtml(markdown: string): string;
|
|
1535
|
+
|
|
1521
1536
|
export declare const medixConfig: SystemConfig;
|
|
1522
1537
|
|
|
1523
1538
|
/**
|
|
@@ -2103,32 +2118,48 @@ export declare const RichTextEditor: typeof RichTextInput;
|
|
|
2103
2118
|
/**
|
|
2104
2119
|
* MedixDeck RichTextInput
|
|
2105
2120
|
*
|
|
2106
|
-
* A
|
|
2107
|
-
* Supports Bold, Italic, Underline, Headings, Lists, Blockquotes, Links,
|
|
2108
|
-
* Text Alignment, and more.
|
|
2121
|
+
* A versatile editor supporting both Visual Rich Text (TipTap) and Standard Markdown modes.
|
|
2109
2122
|
*
|
|
2110
2123
|
* @example
|
|
2111
2124
|
* ```tsx
|
|
2112
|
-
* //
|
|
2113
|
-
* <RichTextInput value={
|
|
2125
|
+
* // Default Rich Text mode with Mode Toggle
|
|
2126
|
+
* <RichTextInput value={content} onChange={setContent} />
|
|
2114
2127
|
*
|
|
2115
|
-
* //
|
|
2116
|
-
* <RichTextInput
|
|
2128
|
+
* // Direct Markdown output mode for backend integration
|
|
2129
|
+
* <RichTextInput outputFormat="markdown" onChange={setMarkdown} />
|
|
2117
2130
|
* ```
|
|
2118
2131
|
*/
|
|
2119
|
-
export declare function RichTextInput({ value, defaultValue, onChange, placeholder, label, helperText, errorMessage, isInvalid, disabled, colorScheme, minHeight, maxHeight, maxLength, showCharCount, toolbarOptions, className, }: RichTextInputProps): JSX_2.Element;
|
|
2132
|
+
export declare function RichTextInput({ value, defaultValue, onChange, onMarkdownChange, onHtmlChange, outputFormat, defaultMode, mode: controlledMode, onModeChange, showModeToggle, placeholder, label, helperText, errorMessage, isInvalid, disabled, colorScheme, minHeight, maxHeight, maxLength, showCharCount, toolbarOptions, className, }: RichTextInputProps): JSX_2.Element;
|
|
2120
2133
|
|
|
2121
2134
|
export declare namespace RichTextInput {
|
|
2122
2135
|
var displayName: string;
|
|
2123
2136
|
}
|
|
2124
2137
|
|
|
2138
|
+
export declare type RichTextInputFormat = 'html' | 'markdown';
|
|
2139
|
+
|
|
2140
|
+
export declare type RichTextInputMode = 'wysiwyg' | 'markdown';
|
|
2141
|
+
|
|
2125
2142
|
export declare interface RichTextInputProps {
|
|
2126
|
-
/** HTML
|
|
2143
|
+
/** Content string (HTML or Markdown depending on outputFormat) */
|
|
2127
2144
|
value?: string;
|
|
2128
|
-
/** Default
|
|
2145
|
+
/** Default content string (uncontrolled) */
|
|
2129
2146
|
defaultValue?: string;
|
|
2130
|
-
/** Callback on
|
|
2131
|
-
onChange?: (
|
|
2147
|
+
/** Callback on content change — receives formatted string according to outputFormat */
|
|
2148
|
+
onChange?: (value: string) => void;
|
|
2149
|
+
/** Explicit callback receiving Markdown formatted string */
|
|
2150
|
+
onMarkdownChange?: (markdown: string) => void;
|
|
2151
|
+
/** Explicit callback receiving HTML formatted string */
|
|
2152
|
+
onHtmlChange?: (html: string) => void;
|
|
2153
|
+
/** Output format passed to onChange ('html' | 'markdown', default: 'html') */
|
|
2154
|
+
outputFormat?: RichTextInputFormat;
|
|
2155
|
+
/** Initial editor composition mode ('wysiwyg' | 'markdown', default: 'wysiwyg') */
|
|
2156
|
+
defaultMode?: RichTextInputMode;
|
|
2157
|
+
/** Controlled editor mode ('wysiwyg' | 'markdown') */
|
|
2158
|
+
mode?: RichTextInputMode;
|
|
2159
|
+
/** Callback when editor mode toggles */
|
|
2160
|
+
onModeChange?: (mode: RichTextInputMode) => void;
|
|
2161
|
+
/** Show the mode toggle switch in the toolbar (default: true) */
|
|
2162
|
+
showModeToggle?: boolean;
|
|
2132
2163
|
/** Placeholder text when editor is empty */
|
|
2133
2164
|
placeholder?: string;
|
|
2134
2165
|
/** Label above the editor */
|