@thebuoyant-tsdev/mui-ts-library 3.7.1 → 3.9.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.
Files changed (23) hide show
  1. package/README.de.md +23 -1
  2. package/README.md +23 -1
  3. package/dist/components/gantt-chart/GanttChart.d.ts +1 -1
  4. package/dist/components/gantt-chart/GanttChart.types.d.ts +7 -6
  5. package/dist/components/password-strength-meter/PasswordStrengthMeter.d.ts +1 -1
  6. package/dist/components/password-strength-meter/PasswordStrengthMeter.js +156 -134
  7. package/dist/components/password-strength-meter/PasswordStrengthMeter.types.d.ts +7 -1
  8. package/dist/components/password-strength-meter/PasswordStrengthMeter.types.js +3 -1
  9. package/dist/components/rich-text-editor/RichTextEditor.d.ts +7 -1
  10. package/dist/components/rich-text-editor/RichTextEditor.js +87 -73
  11. package/dist/components/rich-text-editor/RichTextEditor.types.d.ts +25 -1
  12. package/dist/components/rich-text-editor/RichTextEditor.types.js +13 -2
  13. package/dist/components/rich-text-editor/RichTextEditorEmojiPicker.d.ts +1 -1
  14. package/dist/components/rich-text-editor/RichTextEditorFooter.d.ts +1 -1
  15. package/dist/components/rich-text-editor/RichTextEditorImageDialog.d.ts +1 -1
  16. package/dist/components/rich-text-editor/RichTextEditorLinkDialog.d.ts +1 -1
  17. package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.d.ts +10 -0
  18. package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +88 -0
  19. package/dist/components/rich-text-editor/RichTextEditorTableMenu.d.ts +1 -1
  20. package/dist/components/rich-text-editor/RichTextEditorToolbar.d.ts +4 -2
  21. package/dist/components/rich-text-editor/RichTextEditorToolbar.js +211 -175
  22. package/dist/index.cjs +2 -2
  23. package/package.json +1 -1
package/README.de.md CHANGED
@@ -337,12 +337,34 @@ Dieses Projekt folgt [Semantic Versioning](https://semver.org/). In der Praxis b
337
337
 
338
338
  **Bisher nur ein Breaking Release:** [`3.0.0`](#300--2026-06-15--breaking-changes) hat `ConfirmDialog` / `ConfirmDialogProvider` / `useConfirm` entfernt und die Signatur von `TagSelection`s `onTagCreate` geändert. Jedes Release seitdem war additiv.
339
339
 
340
- **TypeScript-Hinweis:** Translation-Typen (z.B. `TagSelectionTranslation`, `SqlEditorTranslation`) bekommen mit der Zeit neue optionale Felder, wenn Features hinzukommen — ein `Partial<...>`-Objekt direkt an die `translation`-Prop zu übergeben (das in dieser README durchgängig verwendete Muster) ist immer vorwärtskompatibel. Eine eigenständige Variable, die gegen den vollen benannten Typ deklariert wird, bleibt nur kompatibel, solange neue Felder optional sind — was seit `3.6.1` der Fall ist (siehe [Changelog](#361--2026-06-22)).
340
+ **TypeScript-Hinweis:** Translation-Typen (z.B. `TagSelectionTranslation`, `SqlEditorTranslation`, `GanttTranslations`) bekommen mit der Zeit neue optionale Felder, wenn Features hinzukommen — ein `Partial<...>`-Objekt direkt an die `translation`/`translations`-Prop zu übergeben (das in dieser README durchgängig verwendete Muster) ist immer vorwärtskompatibel. Eine eigenständige Variable, die gegen den vollen benannten Typ deklariert wird, bleibt nur kompatibel, solange neue Felder optional sind. Ein Audit über alle Komponenten fand eine Lücke `GanttTranslations` hatte 3 nach Release ergänzte required Felder — behoben in `3.9.1` (siehe [Changelog](#391--2026-06-25)). Seit dieser Version ist jeder Translation-Typ optional-sicher.
341
341
 
342
342
  ---
343
343
 
344
344
  ## Changelog
345
345
 
346
+ ### [3.9.1] — 2026-06-25
347
+
348
+ **Behoben**
349
+ - GanttChart: `GanttTranslations` hatte 3 required Keys, die nach Release ergänzt wurden (`todayLabel`, `columnAssignee`, `exportCsvTooltip`) — jetzt optional, konsistent mit jedem anderen Translation-Typ. Siehe [Versionierung & Abwärtskompatibilität](#versionierung--abwärtskompatibilität).
350
+
351
+ ---
352
+
353
+ ### [3.9.0] — 2026-06-24
354
+
355
+ **PasswordStrengthMeter**
356
+ - `showCopyButton`: Kopier-Icon neben dem Passwortfeld, passt zu `showPasswordGenerator`.
357
+
358
+ ---
359
+
360
+ ### [3.8.0] — 2026-06-23
361
+
362
+ **RichTextEditor**
363
+ - `showPasteAsPlainTextButton`: Toolbar-Toggle, das eingefügten Inhalt von Formatierung befreit.
364
+ - `showMarkdownButton` + `onMarkdownChange`: Markdown-Import/Export-Dialog und ein Live-Markdown-Callback.
365
+
366
+ ---
367
+
346
368
  ### [3.7.1] — 2026-06-23
347
369
 
348
370
  **Re-Publish — fehlende README auf npm**
package/README.md CHANGED
@@ -337,12 +337,34 @@ This project follows [Semantic Versioning](https://semver.org/). In practice:
337
337
 
338
338
  **Only one breaking release to date:** [`3.0.0`](#300--2026-06-15--breaking-changes) removed `ConfirmDialog` / `ConfirmDialogProvider` / `useConfirm` and changed `TagSelection`'s `onTagCreate` signature. Every other release since has been additive.
339
339
 
340
- **TypeScript note:** translation types (e.g. `TagSelectionTranslation`, `SqlEditorTranslation`) gain new optional fields over time as features are added — passing a `Partial<...>` object straight to the `translation` prop (the pattern used throughout this README) is always forward-compatible. Declaring a standalone variable typed against the full named type only stays compatible if new fields are optional, which they are as of `3.6.1` (see [Changelog](#361--2026-06-22)).
340
+ **TypeScript note:** translation types (e.g. `TagSelectionTranslation`, `SqlEditorTranslation`, `GanttTranslations`) gain new optional fields over time as features are added — passing a `Partial<...>` object straight to the `translation`/`translations` prop (the pattern used throughout this README) is always forward-compatible. Declaring a standalone variable typed against the full named type only stays compatible if new fields are optional. An audit across all components turned up one gap — `GanttTranslations` had 3 required fields added after release — fixed in `3.9.1` (see [Changelog](#391--2026-06-25)). Every translation type is optional-safe as of that version.
341
341
 
342
342
  ---
343
343
 
344
344
  ## Changelog
345
345
 
346
+ ### [3.9.1] — 2026-06-25
347
+
348
+ **Fixed**
349
+ - GanttChart: `GanttTranslations` had 3 required keys added after release (`todayLabel`, `columnAssignee`, `exportCsvTooltip`) — now optional, matching every other translation type. See [Versioning & Compatibility](#versioning--compatibility).
350
+
351
+ ---
352
+
353
+ ### [3.9.0] — 2026-06-24
354
+
355
+ **PasswordStrengthMeter**
356
+ - `showCopyButton`: copy-to-clipboard icon next to the password field, pairs with `showPasswordGenerator`.
357
+
358
+ ---
359
+
360
+ ### [3.8.0] — 2026-06-23
361
+
362
+ **RichTextEditor**
363
+ - `showPasteAsPlainTextButton`: toolbar toggle that strips formatting from pasted content.
364
+ - `showMarkdownButton` + `onMarkdownChange`: Markdown import/export dialog and a live Markdown callback.
365
+
366
+ ---
367
+
346
368
  ### [3.7.1] — 2026-06-23
347
369
 
348
370
  **Republish — missing README on npm**
@@ -2,6 +2,6 @@ import { type GanttChartStore } from "./GanttChart.store";
2
2
  import type { GanttChartProps, GanttTheme, GanttTranslations } from "./GanttChart.types";
3
3
  export declare function useGanttChartStore<T>(selector: (state: ReturnType<GanttChartStore["getState"]>) => T): T;
4
4
  export declare function useRawGanttChartStore(): GanttChartStore;
5
- export declare function useGanttTranslations(): GanttTranslations;
5
+ export declare function useGanttTranslations(): Required<GanttTranslations>;
6
6
  export declare function useGanttTheme(): GanttTheme;
7
7
  export declare function GanttChart({ tasks, timeScale, initialExpandAll, showToolbar, defaultRangeStart, defaultRangeEnd, translations, enableBuiltinDialogs, toolbarConfig, zoomable, draggable, resizable, inlineEdit, progressDraggable, showCriticalPath, virtualizeRows, showAssigneeColumn, cascadeDependencies, statusColors, ganttTheme, onExportCSV, onTaskClick, onMilestoneClick, onAddTask, onEditTask, onDeleteTask, onStatusChange, onTasksChange, onTaskMoved, onTaskResized, onTaskCreated, onTaskUpdated, onTaskDeleted, height, width, minPanelWidth, maxPanelWidth, }: GanttChartProps): import("react/jsx-runtime").JSX.Element;
@@ -33,7 +33,8 @@ export type GanttTranslations = {
33
33
  statusDone: string;
34
34
  statusBlocked: string;
35
35
  weekColumnPrefix: string;
36
- todayLabel: string;
36
+ /** @since 2.0.0 */
37
+ todayLabel?: string;
37
38
  dateLocale: string;
38
39
  dialogAddTitle: string;
39
40
  dialogEditTitle: string;
@@ -52,8 +53,8 @@ export type GanttTranslations = {
52
53
  dialogFieldDependencies: string;
53
54
  dialogFieldDependenciesNone: string;
54
55
  columnActions: string;
55
- /** Header label for the Assignee column — shown when showAssigneeColumn=true */
56
- columnAssignee: string;
56
+ /** Header label for the Assignee column — shown when showAssigneeColumn=true @since 2.7.0 */
57
+ columnAssignee?: string;
57
58
  addTaskTooltip: string;
58
59
  editTaskTooltip: string;
59
60
  deleteTaskTooltip: string;
@@ -61,10 +62,10 @@ export type GanttTranslations = {
61
62
  expandAllTooltip: string;
62
63
  collapseAllTooltip: string;
63
64
  resetViewTooltip: string;
64
- /** Toolbar tooltip for the CSV export button */
65
- exportCsvTooltip: string;
65
+ /** Toolbar tooltip for the CSV export button @since 2.7.0 */
66
+ exportCsvTooltip?: string;
66
67
  };
67
- export declare const DEFAULT_GANTT_TRANSLATIONS: GanttTranslations;
68
+ export declare const DEFAULT_GANTT_TRANSLATIONS: Required<GanttTranslations>;
68
69
  export type GanttStatusColors = Partial<Record<GanttTaskStatus, string>>;
69
70
  export type GanttTheme = {
70
71
  statusColors?: GanttStatusColors;
@@ -1,2 +1,2 @@
1
1
  import type { PasswordStrengthMeterProps } from "./PasswordStrengthMeter.types";
2
- export declare function PasswordStrengthMeter({ value, confirmValue, name, inputRef, disabled, error, helperText, autoComplete, customRequirements, generatorOptions, showConfirmField, showPasswordAdornment, showMeter, showPasswordGenerator, showSegmentedBar, showSummary, inputSize, translation, meterColors, passwordMinLength, checkColors, onPasswordChange, onConfirmChange, onPasswordGenerated, }: PasswordStrengthMeterProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function PasswordStrengthMeter({ value, confirmValue, name, inputRef, disabled, error, helperText, autoComplete, customRequirements, generatorOptions, showConfirmField, showPasswordAdornment, showMeter, showPasswordGenerator, showSegmentedBar, showSummary, showCopyButton, inputSize, translation, meterColors, passwordMinLength, checkColors, onPasswordChange, onConfirmChange, onPasswordGenerated, }: PasswordStrengthMeterProps): import("react/jsx-runtime").JSX.Element;
@@ -2,17 +2,19 @@ import { scorePassword as e } from "./util/password-strength.util.js";
2
2
  import { PasswordStrengthBar as t } from "./PasswordStrengthBar.js";
3
3
  import { DEFAULT_CHECK_COLORS as n, DEFAULT_METER_COLORS as r, DEFAULT_PASSWORD_TRANSLATIONS as i } from "./PasswordStrengthMeter.types.js";
4
4
  import { useId as a, useMemo as o, useState as s } from "react";
5
- import { Box as c, Button as l, FormControl as u, FormHelperText as d, IconButton as f, InputAdornment as p, InputLabel as m, OutlinedInput as h, Stack as g, Tooltip as _, Typography as v } from "@mui/material";
6
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
7
- import ee from "@mui/icons-material/AutoFixHigh";
8
- import x from "@mui/icons-material/CheckCircleOutlined";
9
- import S from "@mui/icons-material/ErrorOutlined";
10
- import te from "@mui/icons-material/CheckCircle";
11
- import ne from "@mui/icons-material/Cancel";
12
- import C from "@mui/icons-material/Visibility";
13
- import w from "@mui/icons-material/VisibilityOff";
5
+ import { Box as ee, Button as te, FormControl as c, FormHelperText as l, IconButton as u, InputAdornment as d, InputLabel as f, OutlinedInput as p, Stack as m, Tooltip as h, Typography as g } from "@mui/material";
6
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
7
+ import ne from "@mui/icons-material/ContentCopy";
8
+ import re from "@mui/icons-material/Check";
9
+ import ie from "@mui/icons-material/AutoFixHigh";
10
+ import y from "@mui/icons-material/CheckCircleOutlined";
11
+ import b from "@mui/icons-material/ErrorOutlined";
12
+ import ae from "@mui/icons-material/CheckCircle";
13
+ import oe from "@mui/icons-material/Cancel";
14
+ import x from "@mui/icons-material/Visibility";
15
+ import S from "@mui/icons-material/VisibilityOff";
14
16
  //#region src/components/password-strength-meter/PasswordStrengthMeter.tsx
15
- function re(e) {
17
+ function se(e) {
16
18
  let t = [];
17
19
  e.upper && t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), e.lower && t.push("abcdefghijklmnopqrstuvwxyz"), e.numbers && t.push("0123456789"), e.symbols && t.push("!@#$%^&*()-_=+[]{}|;:,.<>?"), t.length === 0 && t.push("abcdefghijklmnopqrstuvwxyz");
18
20
  let n = t.join(""), r = new Uint32Array(e.length);
@@ -24,24 +26,24 @@ function re(e) {
24
26
  }
25
27
  return o.join("");
26
28
  }
27
- function T({ label: e, fulfilled: t, checkColors: n }) {
28
- return /* @__PURE__ */ b(g, {
29
+ function C({ label: e, fulfilled: t, checkColors: n }) {
30
+ return /* @__PURE__ */ v(m, {
29
31
  direction: "row",
30
32
  sx: {
31
33
  alignItems: "center",
32
34
  mb: .25
33
35
  },
34
36
  spacing: .5,
35
- children: [/* @__PURE__ */ y(v, {
37
+ children: [/* @__PURE__ */ _(g, {
36
38
  variant: "caption",
37
39
  children: e
38
- }), t ? /* @__PURE__ */ y(x, {
40
+ }), t ? /* @__PURE__ */ _(y, {
39
41
  "data-testid": "psm-req-success",
40
42
  style: {
41
43
  fontSize: 16,
42
44
  color: n.success
43
45
  }
44
- }) : /* @__PURE__ */ y(S, {
46
+ }) : /* @__PURE__ */ _(b, {
45
47
  "data-testid": "psm-req-failure",
46
48
  style: {
47
49
  fontSize: 16,
@@ -50,217 +52,237 @@ function T({ label: e, fulfilled: t, checkColors: n }) {
50
52
  })]
51
53
  });
52
54
  }
53
- function E({ value: x, confirmValue: S, name: E, inputRef: D, disabled: O = !1, error: k = !1, helperText: A, autoComplete: j, customRequirements: ie, generatorOptions: M, showConfirmField: N = !1, showPasswordAdornment: ae = !0, showMeter: oe = !0, showPasswordGenerator: se = !1, showSegmentedBar: ce = !1, showSummary: le = !0, inputSize: P = "medium", translation: ue, meterColors: de, passwordMinLength: F = 8, checkColors: I = n, onPasswordChange: L, onConfirmChange: R, onPasswordGenerated: z }) {
54
- let B = {
55
+ function w({ value: y, confirmValue: b, name: w, inputRef: ce, disabled: T = !1, error: le = !1, helperText: E, autoComplete: ue, customRequirements: de, generatorOptions: D, showConfirmField: O = !1, showPasswordAdornment: k = !0, showMeter: fe = !0, showPasswordGenerator: pe = !1, showSegmentedBar: me = !1, showSummary: he = !0, showCopyButton: A = !1, inputSize: j = "medium", translation: ge, meterColors: _e, passwordMinLength: M = 8, checkColors: N = n, onPasswordChange: P, onConfirmChange: ve, onPasswordGenerated: ye }) {
56
+ let F = {
55
57
  ...i,
56
- ...ue
57
- }, V = {
58
+ ...ge
59
+ }, I = {
58
60
  ...r,
59
- ...de
60
- }, H = a(), U = `${H}-password`, [W, G] = s(!1), [K, fe] = s(!1), [pe, q] = s(""), [me, J] = s(""), Y = x === void 0 ? pe : x, X = S === void 0 ? me : S, Z = N && X.length > 0, Q = Z && Y === X, $ = o(() => e(Y, F), [Y, F]);
61
- return /* @__PURE__ */ b(g, { children: [
62
- /* @__PURE__ */ b(u, {
61
+ ..._e
62
+ }, L = a(), R = `${L}-password`, [z, B] = s(!1), [V, be] = s(!1), [xe, H] = s(""), [U, W] = s(""), [G, K] = s(!1), q = y === void 0 ? xe : y, J = b === void 0 ? U : b, Y = O && J.length > 0, X = Y && q === J, Z = o(() => e(q, M), [q, M]), Se = () => {
63
+ B((e) => !e);
64
+ }, Q = (e) => {
65
+ e.preventDefault();
66
+ }, $ = (e) => {
67
+ e.preventDefault();
68
+ };
69
+ return /* @__PURE__ */ v(m, { children: [
70
+ /* @__PURE__ */ v(c, {
63
71
  variant: "outlined",
64
72
  fullWidth: !0,
65
- error: k,
73
+ error: le,
66
74
  children: [
67
- /* @__PURE__ */ y(m, {
68
- htmlFor: U,
69
- size: P,
70
- children: B.label
75
+ /* @__PURE__ */ _(f, {
76
+ htmlFor: R,
77
+ size: j,
78
+ children: F.label
71
79
  }),
72
- /* @__PURE__ */ y(h, {
73
- id: U,
74
- type: W ? "text" : "password",
80
+ /* @__PURE__ */ _(p, {
81
+ id: R,
82
+ type: z ? "text" : "password",
75
83
  fullWidth: !0,
76
- size: P,
77
- value: Y,
84
+ size: j,
85
+ value: q,
78
86
  onChange: (t) => {
79
87
  let n = t.target.value;
80
- x === void 0 && q(n), L && L(n, e(n, F));
88
+ y === void 0 && H(n), P && P(n, e(n, M));
81
89
  },
82
- disabled: O,
83
- inputRef: D,
90
+ disabled: T,
91
+ inputRef: ce,
84
92
  inputProps: {
85
93
  "data-testid": "psm-input",
86
- name: E,
87
- autoComplete: j
94
+ name: w,
95
+ autoComplete: ue
88
96
  },
89
- endAdornment: ae ? /* @__PURE__ */ y(p, {
97
+ endAdornment: k || A && q.length > 0 ? /* @__PURE__ */ v(d, {
90
98
  position: "end",
91
- children: /* @__PURE__ */ y(f, {
99
+ children: [A && q.length > 0 && /* @__PURE__ */ _(h, {
100
+ title: G ? F.copiedLabel : F.copyPasswordLabel,
101
+ arrow: !0,
102
+ children: /* @__PURE__ */ _("span", { children: /* @__PURE__ */ _(u, {
103
+ "data-testid": "psm-copy",
104
+ disabled: T,
105
+ "aria-label": G ? F.copiedLabel : F.copyPasswordLabel,
106
+ onClick: () => {
107
+ navigator.clipboard.writeText(q).then(() => {
108
+ K(!0), setTimeout(() => K(!1), 2e3);
109
+ });
110
+ },
111
+ onMouseDown: Q,
112
+ onMouseUp: $,
113
+ edge: k ? !1 : "end",
114
+ children: G ? /* @__PURE__ */ _(re, {
115
+ fontSize: "small",
116
+ color: "success"
117
+ }) : /* @__PURE__ */ _(ne, { fontSize: "small" })
118
+ }) })
119
+ }), k && /* @__PURE__ */ _(u, {
92
120
  "data-testid": "psm-toggle",
93
- disabled: O,
94
- "aria-label": W ? B.hidePasswordLabel : B.showPasswordLabel,
95
- onClick: () => {
96
- G((e) => !e);
97
- },
98
- onMouseDown: (e) => {
99
- e.preventDefault();
100
- },
101
- onMouseUp: (e) => {
102
- e.preventDefault();
103
- },
121
+ disabled: T,
122
+ "aria-label": z ? F.hidePasswordLabel : F.showPasswordLabel,
123
+ onClick: Se,
124
+ onMouseDown: Q,
125
+ onMouseUp: $,
104
126
  edge: "end",
105
- children: y(W ? w : C, {})
106
- })
127
+ children: _(z ? S : x, {})
128
+ })]
107
129
  }) : null,
108
- label: B.label
130
+ label: F.label
109
131
  }),
110
- A && /* @__PURE__ */ y(d, { children: A })
132
+ E && /* @__PURE__ */ _(l, { children: E })
111
133
  ]
112
134
  }),
113
- se && /* @__PURE__ */ y(_, {
114
- title: B.generatePasswordLabel,
135
+ pe && /* @__PURE__ */ _(h, {
136
+ title: F.generatePasswordLabel,
115
137
  arrow: !0,
116
- children: /* @__PURE__ */ y("span", { children: /* @__PURE__ */ y(l, {
138
+ children: /* @__PURE__ */ _("span", { children: /* @__PURE__ */ _(te, {
117
139
  "data-testid": "psm-generate",
118
140
  size: "small",
119
141
  variant: "text",
120
- startIcon: /* @__PURE__ */ y(ee, { fontSize: "small" }),
121
- disabled: O,
142
+ startIcon: /* @__PURE__ */ _(ie, { fontSize: "small" }),
143
+ disabled: T,
122
144
  onClick: () => {
123
- let t = re({
124
- length: M?.length ?? Math.max(16, F),
125
- upper: M?.upper ?? !0,
126
- lower: M?.lower ?? !0,
127
- numbers: M?.numbers ?? !0,
128
- symbols: M?.symbols ?? !0
145
+ let t = se({
146
+ length: D?.length ?? Math.max(16, M),
147
+ upper: D?.upper ?? !0,
148
+ lower: D?.lower ?? !0,
149
+ numbers: D?.numbers ?? !0,
150
+ symbols: D?.symbols ?? !0
129
151
  });
130
- x === void 0 && q(t), S === void 0 && J(""), L?.(t, e(t, F)), z?.(t), G(!0);
152
+ y === void 0 && H(t), b === void 0 && W(""), P?.(t, e(t, M)), ye?.(t), B(!0);
131
153
  },
132
154
  sx: {
133
155
  mt: .5,
134
156
  alignSelf: "flex-start",
135
157
  textTransform: "none"
136
158
  },
137
- children: B.generatePasswordLabel
159
+ children: F.generatePasswordLabel
138
160
  }) })
139
161
  }),
140
- N && /* @__PURE__ */ b(u, {
162
+ O && /* @__PURE__ */ v(c, {
141
163
  variant: "outlined",
142
164
  fullWidth: !0,
143
- error: Z && !Q,
165
+ error: Y && !X,
144
166
  sx: { mt: 1 },
145
167
  children: [
146
- /* @__PURE__ */ y(m, {
147
- htmlFor: `${H}-confirm`,
148
- size: P,
149
- children: B.confirmLabel
168
+ /* @__PURE__ */ _(f, {
169
+ htmlFor: `${L}-confirm`,
170
+ size: j,
171
+ children: F.confirmLabel
150
172
  }),
151
- /* @__PURE__ */ y(h, {
152
- id: `${H}-confirm`,
153
- type: K ? "text" : "password",
173
+ /* @__PURE__ */ _(p, {
174
+ id: `${L}-confirm`,
175
+ type: V ? "text" : "password",
154
176
  fullWidth: !0,
155
- size: P,
156
- value: X,
177
+ size: j,
178
+ value: J,
157
179
  onChange: (e) => {
158
180
  let t = e.target.value;
159
- S === void 0 && J(t), R?.(t, t === Y);
181
+ b === void 0 && W(t), ve?.(t, t === q);
160
182
  },
161
- disabled: O,
183
+ disabled: T,
162
184
  inputProps: { "data-testid": "psm-confirm-input" },
163
- endAdornment: /* @__PURE__ */ b(p, {
185
+ endAdornment: /* @__PURE__ */ v(d, {
164
186
  position: "end",
165
- children: [Z && (Q ? /* @__PURE__ */ y(te, {
187
+ children: [Y && (X ? /* @__PURE__ */ _(ae, {
166
188
  "data-testid": "psm-confirm-match",
167
189
  sx: {
168
- color: I.success,
190
+ color: N.success,
169
191
  mr: .5
170
192
  },
171
193
  fontSize: "small"
172
- }) : /* @__PURE__ */ y(ne, {
194
+ }) : /* @__PURE__ */ _(oe, {
173
195
  "data-testid": "psm-confirm-mismatch",
174
196
  sx: {
175
- color: I.failure,
197
+ color: N.failure,
176
198
  mr: .5
177
199
  },
178
200
  fontSize: "small"
179
- })), /* @__PURE__ */ y(f, {
201
+ })), /* @__PURE__ */ _(u, {
180
202
  size: "small",
181
- disabled: O,
182
- onClick: () => fe((e) => !e),
203
+ disabled: T,
204
+ onClick: () => be((e) => !e),
183
205
  onMouseDown: (e) => e.preventDefault(),
184
206
  edge: "end",
185
- "aria-label": K ? B.hidePasswordLabel : B.showPasswordLabel,
186
- children: y(K ? w : C, {})
207
+ "aria-label": V ? F.hidePasswordLabel : F.showPasswordLabel,
208
+ children: _(V ? S : x, {})
187
209
  })]
188
210
  }),
189
- label: B.confirmLabel
211
+ label: F.confirmLabel
190
212
  }),
191
- Z && /* @__PURE__ */ y(d, {
192
- sx: { color: Q ? I.success : I.failure },
193
- children: Q ? B.confirmMatchLabel : B.confirmMismatchLabel
213
+ Y && /* @__PURE__ */ _(l, {
214
+ sx: { color: X ? N.success : N.failure },
215
+ children: X ? F.confirmMatchLabel : F.confirmMismatchLabel
194
216
  })
195
217
  ]
196
218
  }),
197
- oe && /* @__PURE__ */ y(t, {
198
- percent: $.percent,
219
+ fe && /* @__PURE__ */ _(t, {
220
+ percent: Z.percent,
199
221
  color: ((e) => {
200
222
  switch (e.meterStatus) {
201
- case "weak": return V.weak;
202
- case "ok": return V.ok;
203
- case "good": return V.good;
204
- case "very good": return V.veryGood;
223
+ case "weak": return I.weak;
224
+ case "ok": return I.ok;
225
+ case "good": return I.good;
226
+ case "very good": return I.veryGood;
205
227
  default: return "transparent";
206
228
  }
207
- })($),
208
- ariaLabel: B.meterAriaLabel,
209
- segments: ce
229
+ })(Z),
230
+ ariaLabel: F.meterAriaLabel,
231
+ segments: me
210
232
  }),
211
- le && /* @__PURE__ */ b(c, {
233
+ he && /* @__PURE__ */ v(ee, {
212
234
  "data-testid": "psm-summary",
213
235
  sx: {
214
236
  mt: .5,
215
237
  p: .5
216
238
  },
217
- children: [/* @__PURE__ */ y(v, {
239
+ children: [/* @__PURE__ */ _(g, {
218
240
  variant: "caption",
219
241
  gutterBottom: !0,
220
242
  sx: {
221
243
  display: "block",
222
244
  fontSize: 14
223
245
  },
224
- children: B.summaryHeaderLabel
225
- }), /* @__PURE__ */ b(g, {
246
+ children: F.summaryHeaderLabel
247
+ }), /* @__PURE__ */ v(m, {
226
248
  direction: "row",
227
249
  spacing: 6,
228
- children: [/* @__PURE__ */ b(g, {
250
+ children: [/* @__PURE__ */ v(m, {
229
251
  direction: "column",
230
252
  children: [
231
- /* @__PURE__ */ y(T, {
232
- label: B.summaryMinChars.replace("{n}", String(F)),
233
- fulfilled: $.length >= F,
234
- checkColors: I
253
+ /* @__PURE__ */ _(C, {
254
+ label: F.summaryMinChars.replace("{n}", String(M)),
255
+ fulfilled: Z.length >= M,
256
+ checkColors: N
235
257
  }),
236
- /* @__PURE__ */ y(T, {
237
- label: B.summaryCapitalLetter,
238
- fulfilled: $.hasUpper,
239
- checkColors: I
258
+ /* @__PURE__ */ _(C, {
259
+ label: F.summaryCapitalLetter,
260
+ fulfilled: Z.hasUpper,
261
+ checkColors: N
240
262
  }),
241
- /* @__PURE__ */ y(T, {
242
- label: B.summaryLowerCaseLetter,
243
- fulfilled: $.hasLower,
244
- checkColors: I
263
+ /* @__PURE__ */ _(C, {
264
+ label: F.summaryLowerCaseLetter,
265
+ fulfilled: Z.hasLower,
266
+ checkColors: N
245
267
  })
246
268
  ]
247
- }), /* @__PURE__ */ b(g, {
269
+ }), /* @__PURE__ */ v(m, {
248
270
  direction: "column",
249
271
  children: [
250
- /* @__PURE__ */ y(T, {
251
- label: B.summaryNumber,
252
- fulfilled: $.hasDigit,
253
- checkColors: I
272
+ /* @__PURE__ */ _(C, {
273
+ label: F.summaryNumber,
274
+ fulfilled: Z.hasDigit,
275
+ checkColors: N
254
276
  }),
255
- /* @__PURE__ */ y(T, {
256
- label: B.summarySpecialChar,
257
- fulfilled: $.hasSymbol,
258
- checkColors: I
277
+ /* @__PURE__ */ _(C, {
278
+ label: F.summarySpecialChar,
279
+ fulfilled: Z.hasSymbol,
280
+ checkColors: N
259
281
  }),
260
- ie?.map((e, t) => /* @__PURE__ */ y(T, {
282
+ de?.map((e, t) => /* @__PURE__ */ _(C, {
261
283
  label: e.label,
262
- fulfilled: typeof e.fulfilled == "function" ? e.fulfilled(Y) : e.fulfilled,
263
- checkColors: I
284
+ fulfilled: typeof e.fulfilled == "function" ? e.fulfilled(q) : e.fulfilled,
285
+ checkColors: N
264
286
  }, t))
265
287
  ]
266
288
  })]
@@ -269,4 +291,4 @@ function E({ value: x, confirmValue: S, name: E, inputRef: D, disabled: O = !1,
269
291
  ] });
270
292
  }
271
293
  //#endregion
272
- export { E as PasswordStrengthMeter };
294
+ export { w as PasswordStrengthMeter };
@@ -40,6 +40,10 @@ export type PasswordStrengthMeterTranslation = {
40
40
  confirmMatchLabel: string;
41
41
  /** Shown when passwords do not match */
42
42
  confirmMismatchLabel: string;
43
+ /** Tooltip for the copy-to-clipboard button @since 3.9.0 */
44
+ copyPasswordLabel?: string;
45
+ /** Tooltip shown briefly after a successful copy @since 3.9.0 */
46
+ copiedLabel?: string;
43
47
  };
44
48
  /**
45
49
  * Options for the built-in password generator.
@@ -57,7 +61,7 @@ export type PasswordGeneratorOptions = {
57
61
  /** Include symbols !@#$%^&*... (default: true) */
58
62
  symbols?: boolean;
59
63
  };
60
- export declare const DEFAULT_PASSWORD_TRANSLATIONS: PasswordStrengthMeterTranslation;
64
+ export declare const DEFAULT_PASSWORD_TRANSLATIONS: Required<PasswordStrengthMeterTranslation>;
61
65
  export declare const DEFAULT_METER_COLORS: MeterColors;
62
66
  export declare const DEFAULT_CHECK_COLORS: CheckColors;
63
67
  /**
@@ -94,6 +98,8 @@ export type PasswordStrengthMeterProps = {
94
98
  showSummary?: boolean;
95
99
  /** Render the strength bar as 4 animated segments instead of a single growing bar. */
96
100
  showSegmentedBar?: boolean;
101
+ /** Show a copy-to-clipboard button next to the password field (visible once a password is entered). */
102
+ showCopyButton?: boolean;
97
103
  translation?: Partial<PasswordStrengthMeterTranslation>;
98
104
  value?: string;
99
105
  onPasswordChange?: (password: string, strengthResult: StrengthResult) => void;
@@ -13,7 +13,9 @@ var e = {
13
13
  generatePasswordLabel: "Generate secure password",
14
14
  confirmLabel: "Confirm password",
15
15
  confirmMatchLabel: "Passwords match",
16
- confirmMismatchLabel: "Passwords do not match"
16
+ confirmMismatchLabel: "Passwords do not match",
17
+ copyPasswordLabel: "Copy password",
18
+ copiedLabel: "Copied!"
17
19
  }, t = {
18
20
  weak: "#cc0000",
19
21
  ok: "#fdc010",
@@ -1,2 +1,8 @@
1
+ import { type MarkdownStorage } from "tiptap-markdown";
2
+ declare module "@tiptap/core" {
3
+ interface Storage {
4
+ markdown: MarkdownStorage;
5
+ }
6
+ }
1
7
  import { type RichTextEditorProps } from "./RichTextEditor.types";
2
- export declare function RichTextEditor({ disabled, error, height, helperText, maxCharacters, name, placeholder, readonly, showCharacterCount, showToolbar, showWordCount, toolbarConfig, translation, value, width, onBlur, onChange, onFocus, }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function RichTextEditor({ disabled, error, height, helperText, maxCharacters, name, placeholder, readonly, showCharacterCount, showToolbar, showWordCount, toolbarConfig, translation, value, width, onBlur, onChange, onFocus, onMarkdownChange, }: RichTextEditorProps): import("react/jsx-runtime").JSX.Element;