@thebuoyant-tsdev/mui-ts-library 1.4.0 → 2.0.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/README.de.md CHANGED
@@ -10,13 +10,13 @@ Eine typsichere React-Komponentenbibliothek auf Basis von **TypeScript** und **M
10
10
 
11
11
  | Komponente | Beschreibung | Docs |
12
12
  |---|---|---|
13
- | [`ConfirmDialog`](#confirmdialog) | Deklarativer Async-Bestätigungs-Dialog — `await confirm({ title, severity })` von überall in der App | [Vollständiges Manual →](user-manuals/ConfirmDialog.de.md) |
14
- | [`GanttChart`](#ganttchart) | Projekt-Timeline mit hierarchischen Aufgaben, Meilensteinen, Drag & Drop, Zoom und integrierten CRUD-Dialogen | [Vollständiges Manual →](user-manuals/GanttChart.de.md) |
13
+ | [`ConfirmDialog`](#confirmdialog) | Deklarativer Async-Bestätigungs-Dialog — `await confirm({ title, severity })` von überall in der App. Unterstützt Countdown-Auto-Confirm und `Enter` = Bestätigen. | [Vollständiges Manual →](user-manuals/ConfirmDialog.de.md) |
14
+ | [`GanttChart`](#ganttchart) | Projekt-Timeline mit hierarchischen Aufgaben, Meilensteinen, Drag & Drop, Ctrl+Scroll-Zoom, Heute-Chip und integrierten CRUD-Dialogen | [Vollständiges Manual →](user-manuals/GanttChart.de.md) |
15
15
  | [`TagSelection`](#tagselection) | Multi-Tag-Auswahlfeld mit Autocomplete, freier Tag-Erstellung, Overflow-Chips und MUI-Theme-Farben | [Vollständiges Manual →](user-manuals/TagSelection.de.md) |
16
- | [`PasswordStrengthMeter`](#passwordstrengthmeter) | Passwort-Eingabe mit animiertem Stärke-Meter und Anforderungsliste | [Vollständiges Manual →](user-manuals/PasswordStrengthMeter.de.md) |
16
+ | [`PasswordStrengthMeter`](#passwordstrengthmeter) | Passwort-Eingabe mit animiertem Stärke-Meter, segmentierter Balkenanzeige, eigenen Anforderungen und Anforderungsliste | [Vollständiges Manual →](user-manuals/PasswordStrengthMeter.de.md) |
17
17
  | [`RichTextEditor`](#richtexteditor) | WYSIWYG-Editor (TipTap v3) mit Toolbar, Link-Dialog, Textfarbe, Hervorhebung, Wörter-Zähler, Vollbild-Modus und Markdown-Einfügen | [Vollständiges Manual →](user-manuals/RichTextEditor.de.md) |
18
- | [`SqlEditor`](#sqleditor) | SQL-Code-Editor (CodeMirror 6) mit Syntax-Highlighting, Multi-Dialekt, Autocomplete und Linting | [Vollständiges Manual →](user-manuals/SqlEditor.de.md) |
19
- | [`JsonEditor`](#jsoneditor) | JSON-Code-Editor (CodeMirror 6) mit Echtzeit-Validierung, Format- und Komprimieren-Schaltfläche | [Vollständiges Manual →](user-manuals/JsonEditor.de.md) |
18
+ | [`SqlEditor`](#sqleditor) | SQL-Code-Editor (CodeMirror 6) mit Syntax-Highlighting, Multi-Dialekt, Autocomplete, Linting und `Cmd+Enter`-Ausführen-Shortcut | [Vollständiges Manual →](user-manuals/SqlEditor.de.md) |
19
+ | [`JsonEditor`](#jsoneditor) | JSON-Code-Editor (CodeMirror 6) mit Echtzeit-Validierung, Format- und Komprimieren-Schaltfläche sowie optionaler Minimap | [Vollständiges Manual →](user-manuals/JsonEditor.de.md) |
20
20
 
21
21
  ---
22
22
 
@@ -62,7 +62,7 @@ import { ConfirmDialogProvider, useConfirm } from '@thebuoyant-tsdev/mui-ts-libr
62
62
 
63
63
  // Überall innerhalb der App
64
64
  const confirm = useConfirm();
65
- const ok = await confirm({ title: 'Eintrag löschen?', severity: 'error', confirmLabel: 'Löschen' });
65
+ const ok = await confirm({ title: 'Eintrag löschen?', severity: 'error', confirmLabel: 'Löschen', countdown: 10 });
66
66
  if (ok) handleDelete();
67
67
  ```
68
68
 
@@ -81,7 +81,7 @@ const tasks: GanttTask[] = [
81
81
  { id: '2', name: 'Go-Live', status: 'planned', startDate: new Date('2026-03-31'), endDate: new Date('2026-03-31'), isMilestone: true },
82
82
  ];
83
83
 
84
- <GanttChart tasks={tasks} timeScale="months" height={500} draggable resizable onTasksChange={save} />
84
+ <GanttChart tasks={tasks} timeScale="months" height={500} draggable resizable zoomable onTasksChange={save} />
85
85
  ```
86
86
 
87
87
  → [Vollständige Dokumentation](user-manuals/GanttChart.de.md)
@@ -113,6 +113,7 @@ import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
113
113
 
114
114
  <PasswordStrengthMeter
115
115
  passwordMinLength={10}
116
+ showSegmentedBar
116
117
  onPasswordChange={(password, result) => console.log(result.score)}
117
118
  />
118
119
  ```
@@ -145,6 +146,7 @@ import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
145
146
  placeholder="SQL-Abfrage eingeben …"
146
147
  dialect="postgresql"
147
148
  onChange={(sql) => console.log(sql)}
149
+ onExecute={(sql) => query(sql)}
148
150
  />
149
151
  ```
150
152
 
@@ -160,6 +162,7 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
160
162
  <JsonEditor
161
163
  placeholder="JSON eingeben …"
162
164
  showValidation
165
+ showMinimap
163
166
  onChange={(json) => console.log(json)}
164
167
  />
165
168
  ```
package/README.md CHANGED
@@ -10,13 +10,13 @@ A type-safe React component library built on **TypeScript** and **MUI (Material
10
10
 
11
11
  | Component | Description | Docs |
12
12
  |---|---|---|
13
- | [`ConfirmDialog`](#confirmdialog) | Declarative async confirmation dialog — `await confirm({ title, severity })` from anywhere in the app | [Full Manual →](user-manuals/ConfirmDialog.md) |
14
- | [`GanttChart`](#ganttchart) | Project timeline with hierarchical tasks, milestones, drag & drop, zoom, and built-in CRUD dialogs | [Full Manual →](user-manuals/GanttChart.md) |
13
+ | [`ConfirmDialog`](#confirmdialog) | Declarative async confirmation dialog — `await confirm({ title, severity })` from anywhere in the app. Supports countdown auto-confirm and `Enter` = confirm shortcut. | [Full Manual →](user-manuals/ConfirmDialog.md) |
14
+ | [`GanttChart`](#ganttchart) | Project timeline with hierarchical tasks, milestones, drag & drop, Ctrl+Scroll zoom, today chip, and built-in CRUD dialogs | [Full Manual →](user-manuals/GanttChart.md) |
15
15
  | [`TagSelection`](#tagselection) | Multi-tag selector with autocomplete, free tag creation, overflow chips, and MUI theme colors | [Full Manual →](user-manuals/TagSelection.md) |
16
- | [`PasswordStrengthMeter`](#passwordstrengthmeter) | Password input with animated strength meter and requirements checklist | [Full Manual →](user-manuals/PasswordStrengthMeter.md) |
16
+ | [`PasswordStrengthMeter`](#passwordstrengthmeter) | Password input with animated strength meter, segmented bar, custom requirements, and requirements checklist | [Full Manual →](user-manuals/PasswordStrengthMeter.md) |
17
17
  | [`RichTextEditor`](#richtexteditor) | WYSIWYG editor (TipTap v3) with toolbar, link dialog, text color, highlight, word count, fullscreen mode, and Markdown paste | [Full Manual →](user-manuals/RichTextEditor.md) |
18
- | [`SqlEditor`](#sqleditor) | SQL code editor (CodeMirror 6) with syntax highlighting, multi-dialect, autocomplete, and linting | [Full Manual →](user-manuals/SqlEditor.md) |
19
- | [`JsonEditor`](#jsoneditor) | JSON code editor (CodeMirror 6) with real-time validation, Format, and Compact buttons | [Full Manual →](user-manuals/JsonEditor.md) |
18
+ | [`SqlEditor`](#sqleditor) | SQL code editor (CodeMirror 6) with syntax highlighting, multi-dialect, autocomplete, linting, and `Cmd+Enter` execute shortcut | [Full Manual →](user-manuals/SqlEditor.md) |
19
+ | [`JsonEditor`](#jsoneditor) | JSON code editor (CodeMirror 6) with real-time validation, Format, Compact buttons, and optional minimap | [Full Manual →](user-manuals/JsonEditor.md) |
20
20
 
21
21
  ---
22
22
 
@@ -62,7 +62,7 @@ import { ConfirmDialogProvider, useConfirm } from '@thebuoyant-tsdev/mui-ts-libr
62
62
 
63
63
  // Anywhere inside
64
64
  const confirm = useConfirm();
65
- const ok = await confirm({ title: 'Delete entry?', severity: 'error', confirmLabel: 'Delete' });
65
+ const ok = await confirm({ title: 'Delete entry?', severity: 'error', confirmLabel: 'Delete', countdown: 10 });
66
66
  if (ok) handleDelete();
67
67
  ```
68
68
 
@@ -81,7 +81,7 @@ const tasks: GanttTask[] = [
81
81
  { id: '2', name: 'Go-Live', status: 'planned', startDate: new Date('2026-03-31'), endDate: new Date('2026-03-31'), isMilestone: true },
82
82
  ];
83
83
 
84
- <GanttChart tasks={tasks} timeScale="months" height={500} draggable resizable onTasksChange={save} />
84
+ <GanttChart tasks={tasks} timeScale="months" height={500} draggable resizable zoomable onTasksChange={save} />
85
85
  ```
86
86
 
87
87
  → [Full documentation](user-manuals/GanttChart.md)
@@ -113,6 +113,7 @@ import { PasswordStrengthMeter } from '@thebuoyant-tsdev/mui-ts-library';
113
113
 
114
114
  <PasswordStrengthMeter
115
115
  passwordMinLength={10}
116
+ showSegmentedBar
116
117
  onPasswordChange={(password, result) => console.log(result.score)}
117
118
  />
118
119
  ```
@@ -145,6 +146,7 @@ import { SqlEditor } from '@thebuoyant-tsdev/mui-ts-library';
145
146
  placeholder="Enter SQL query…"
146
147
  dialect="postgresql"
147
148
  onChange={(sql) => console.log(sql)}
149
+ onExecute={(sql) => runQuery(sql)}
148
150
  />
149
151
  ```
150
152
 
@@ -160,6 +162,7 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
160
162
  <JsonEditor
161
163
  placeholder="Enter JSON…"
162
164
  showValidation
165
+ showMinimap
163
166
  onChange={(json) => console.log(json)}
164
167
  />
165
168
  ```
@@ -8,6 +8,8 @@ export declare const DEFAULT_CONFIRM_DIALOG_TRANSLATION: ConfirmDialogTranslatio
8
8
  export type ConfirmDialogOptions = {
9
9
  cancelLabel?: string;
10
10
  confirmLabel?: string;
11
+ /** Auto-confirm after this many seconds. Shows a live countdown in the confirm button. */
12
+ countdown?: number;
11
13
  description?: string | React.ReactNode;
12
14
  hideCancelButton?: boolean;
13
15
  maxWidth?: "xs" | "sm" | "md" | "lg" | "xl";
@@ -31,6 +31,7 @@ export type GanttTranslations = {
31
31
  statusDone: string;
32
32
  statusBlocked: string;
33
33
  weekColumnPrefix: string;
34
+ todayLabel: string;
34
35
  dateLocale: string;
35
36
  dialogAddTitle: string;
36
37
  dialogEditTitle: string;
@@ -12,6 +12,10 @@ export type HeaderGroup = {
12
12
  type GanttTimelineHeaderProps = {
13
13
  columns: HeaderColumn[];
14
14
  groups?: HeaderGroup[];
15
+ todayX?: number | null;
16
+ todayLabel?: string;
17
+ todayTooltip?: string;
18
+ todayColor?: string;
15
19
  };
16
- export declare function GanttTimelineHeader({ columns, groups }: GanttTimelineHeaderProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function GanttTimelineHeader({ columns, groups, todayX, todayLabel, todayTooltip, todayColor, }: GanttTimelineHeaderProps): import("react/jsx-runtime").JSX.Element;
17
21
  export {};
@@ -1,2 +1,2 @@
1
1
  import { type JsonEditorProps } from "./JsonEditor.types";
2
- export declare function JsonEditor({ value, onChange, onValidChange, placeholder, height, width, disabled, readonly, error, helperText, name, indent, showLineNumbers, showLineColumn, showValidation, toolbarConfig, translation, highlightColors, onBlur, onFocus, }: JsonEditorProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function JsonEditor({ value, onChange, onValidChange, placeholder, height, width, disabled, readonly, error, helperText, name, indent, showLineNumbers, showLineColumn, showMinimap, showValidation, toolbarConfig, translation, highlightColors, onBlur, onFocus, }: JsonEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -46,6 +46,8 @@ export type JsonEditorProps = {
46
46
  readonly?: boolean;
47
47
  showLineColumn?: boolean;
48
48
  showLineNumbers?: boolean;
49
+ /** Shows a scaled-down document overview (minimap) on the right side of the editor. */
50
+ showMinimap?: boolean;
49
51
  /** Shows a Valid / Invalid JSON indicator in the footer. */
50
52
  showValidation?: boolean;
51
53
  toolbarConfig?: JsonEditorToolbarConfig;
@@ -7,11 +7,12 @@ type JsonEditorContentProps = {
7
7
  disabled?: boolean;
8
8
  readonly?: boolean;
9
9
  showLineNumbers?: boolean;
10
+ showMinimap?: boolean;
10
11
  highlightColors?: JsonEditorHighlightColors;
11
12
  onViewReady: (view: EditorView | null) => void;
12
13
  onCursorChange: (line: number, col: number) => void;
13
14
  onBlur?: () => void;
14
15
  onFocus?: () => void;
15
16
  };
16
- export declare function JsonEditorContent({ value, onChange, placeholder, disabled, readonly, showLineNumbers, highlightColors, onViewReady, onCursorChange, onBlur, onFocus, }: JsonEditorContentProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function JsonEditorContent({ value, onChange, placeholder, disabled, readonly, showLineNumbers, showMinimap, highlightColors, onViewReady, onCursorChange, onBlur, onFocus, }: JsonEditorContentProps): import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -2,11 +2,13 @@ type PasswordStrengthBarProps = {
2
2
  percent: number;
3
3
  color: string;
4
4
  ariaLabel: string;
5
+ /** When true, renders 4 separate animated segments instead of a single bar. */
6
+ segments?: boolean;
5
7
  };
6
8
  /**
7
9
  * Visuelle Fortschrittsleiste für die Passwortstärke.
8
10
  * role="progressbar" macht die Anzeige für Screenreader zugänglich —
9
11
  * ohne aria-Attribute wäre sie für assistive Technologien unsichtbar.
10
12
  */
11
- export declare function PasswordStrengthBar({ percent, color, ariaLabel }: PasswordStrengthBarProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function PasswordStrengthBar({ percent, color, ariaLabel, segments }: PasswordStrengthBarProps): import("react/jsx-runtime").JSX.Element;
12
14
  export {};
@@ -1,2 +1,2 @@
1
1
  import type { PasswordStrengthMeterProps } from "./PasswordStrengthMeter.types";
2
- export declare function PasswordStrengthMeter({ value, name, inputRef, disabled, error, helperText, autoComplete, showPasswordAdornment, showMeter, showSummary, inputSize, translation, meterColors, passwordMinLength, checkColors, onPasswordChange, }: PasswordStrengthMeterProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function PasswordStrengthMeter({ value, name, inputRef, disabled, error, helperText, autoComplete, customRequirements, showPasswordAdornment, showMeter, showSegmentedBar, showSummary, inputSize, translation, meterColors, passwordMinLength, checkColors, onPasswordChange, }: PasswordStrengthMeterProps): import("react/jsx-runtime").JSX.Element;
@@ -36,9 +36,19 @@ export type PasswordStrengthMeterTranslation = {
36
36
  export declare const DEFAULT_PASSWORD_TRANSLATIONS: PasswordStrengthMeterTranslation;
37
37
  export declare const DEFAULT_METER_COLORS: MeterColors;
38
38
  export declare const DEFAULT_CHECK_COLORS: CheckColors;
39
+ /**
40
+ * A single custom password requirement.
41
+ * `fulfilled` can be a static boolean or a function evaluated on the current password.
42
+ */
43
+ export type CustomRequirement = {
44
+ label: string;
45
+ fulfilled: boolean | ((password: string) => boolean);
46
+ };
39
47
  export type PasswordStrengthMeterProps = {
40
48
  autoComplete?: string;
41
49
  checkColors?: CheckColors;
50
+ /** Additional custom requirements shown alongside the built-in ones. */
51
+ customRequirements?: CustomRequirement[];
42
52
  disabled?: boolean;
43
53
  error?: boolean;
44
54
  helperText?: string;
@@ -50,6 +60,8 @@ export type PasswordStrengthMeterProps = {
50
60
  showMeter?: boolean;
51
61
  showPasswordAdornment?: boolean;
52
62
  showSummary?: boolean;
63
+ /** Render the strength bar as 4 animated segments instead of a single growing bar. */
64
+ showSegmentedBar?: boolean;
53
65
  translation?: Partial<PasswordStrengthMeterTranslation>;
54
66
  value?: string;
55
67
  onPasswordChange?: (password: string, strengthResult: StrengthResult) => void;
@@ -12,6 +12,7 @@ type SqlEditorContentProps = {
12
12
  stringColor?: string;
13
13
  identifierColor?: string;
14
14
  schema?: SqlSchema;
15
+ onExecute?: (sql: string) => void;
15
16
  onLint?: (sql: string) => Promise<SqlLintError[]> | SqlLintError[];
16
17
  onDiagnosticsChange?: (count: number) => void;
17
18
  onViewReady: (view: EditorView | null) => void;
@@ -19,5 +20,5 @@ type SqlEditorContentProps = {
19
20
  onBlur?: () => void;
20
21
  onFocus?: () => void;
21
22
  };
22
- export declare function SqlEditorContent({ value, onChange, placeholder, disabled, readonly, showLineNumbers, dialect, keywordColor, stringColor, identifierColor, schema, onLint, onDiagnosticsChange, onViewReady, onCursorChange, onBlur, onFocus, }: SqlEditorContentProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function SqlEditorContent({ value, onChange, placeholder, disabled, readonly, showLineNumbers, dialect, keywordColor, stringColor, identifierColor, schema, onExecute, onLint, onDiagnosticsChange, onViewReady, onCursorChange, onBlur, onFocus, }: SqlEditorContentProps): import("react/jsx-runtime").JSX.Element;
23
24
  export {};