@thebuoyant-tsdev/mui-ts-library 3.24.1 → 3.26.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/README.de.md +26 -0
- package/README.md +26 -0
- package/dist/components/color-picker/ColorPicker.js +1 -1
- package/dist/components/color-picker/ColorPicker.types.d.ts +13 -0
- package/dist/components/color-picker/ColorPicker.types.js +2 -2
- package/dist/components/color-picker/PopoverColorPicker.d.ts +2 -0
- package/dist/components/color-picker/PopoverColorPicker.js +81 -0
- package/dist/components/color-picker/popoverColorPickerClasses.d.ts +15 -0
- package/dist/components/color-picker/popoverColorPickerClasses.js +7 -0
- package/dist/components/gantt-chart/GanttTaskPanel.js +187 -160
- package/dist/components/json-editor/JsonEditor.d.ts +1 -1
- package/dist/components/json-editor/JsonEditor.js +32 -31
- package/dist/components/json-editor/JsonEditor.types.d.ts +5 -0
- package/dist/components/json-editor/JsonEditor.types.js +3 -0
- package/dist/components/json-editor/JsonEditorContent.js +45 -45
- package/dist/components/json-editor/JsonEditorToolbar.d.ts +2 -1
- package/dist/components/json-editor/JsonEditorToolbar.js +86 -69
- package/dist/components/sql-editor/SqlEditorContent.js +38 -38
- package/dist/components/sql-editor/SqlEditorToolbar.js +27 -27
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +29 -27
- package/package.json +2 -1
package/README.de.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> [English Version →](README.md)
|
|
4
4
|
|
|
5
|
+
[](https://github.com/thebuoyant/mui-ts-library/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/@thebuoyant-tsdev/mui-ts-library)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
5
9
|
Eine typsichere React-Komponentenbibliothek auf Basis von **TypeScript** und **MUI (Material UI v9)**. Die Komponenten folgen MUI's Design-Sprache, unterstützen Dark Mode und Theming von Haus aus und werden mit vollständigen TypeScript-Typen, Storybook-Stories und Unit-Tests ausgeliefert.
|
|
6
10
|
|
|
7
11
|
**[→ Live-Storybook](https://thebuoyant.github.io/mui-ts-library/)** — alle Komponenten interaktiv erkunden, ohne Installation.
|
|
@@ -479,6 +483,28 @@ Dieses Projekt folgt [Semantic Versioning](https://semver.org/):
|
|
|
479
483
|
|
|
480
484
|
## Changelog
|
|
481
485
|
|
|
486
|
+
### [3.24.1] — 2026-07-10
|
|
487
|
+
|
|
488
|
+
**Behoben**
|
|
489
|
+
- `RichTextEditor`-Toolbar: `H1`/`H2`/`H3`- und `MD`-Button werden jetzt als `<svg><text>` gerendert statt als HTML-`<span>` — konsistente Render-Engine, Strichgewicht und Farbverhalten wie alle anderen SVG-Toolbar-Icons.
|
|
490
|
+
- `RadialStackedBarChart`-Stories: ungenutzten Parameter entfernt, der einen ESLint-Fehler verursachte.
|
|
491
|
+
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
### [3.24.0] — 2026-07-10
|
|
495
|
+
|
|
496
|
+
**Hinzugefügt**
|
|
497
|
+
- **CSS-Klassen-API** für `TagSelection`, `PasswordStrengthMeter` und `ColorPicker` — jedes bedeutende DOM-Element trägt jetzt einen stabilen `.MuiTs<Komponente>-<Slot>`-Klassennamen. Einzelne Slots per Plain CSS, CSS Modules oder Tailwind stylen ohne MUI-Interna anzufassen. Drei typisierte Konstanten-Objekte exportiert: `tagSelectionClasses`, `passwordStrengthMeterClasses`, `colorPickerClasses` + geteilte `muiTsStateClasses` (`.MuiTs-disabled`, `.MuiTs-error`, …). Siehe [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.de.md) für Details.
|
|
498
|
+
|
|
499
|
+
---
|
|
500
|
+
|
|
501
|
+
### [3.23.0] — 2026-07-10
|
|
502
|
+
|
|
503
|
+
**Hinzugefügt**
|
|
504
|
+
- `ColorPicker`: neue `format?: 'hex' | 'rgb' | 'hsl'`-Prop — kontrolliertes Anzeigeformat, ermöglicht dem Parent die Kontrolle über das aktive Format (z.B. für programmatische Form-Resets). Mit `onFormatChange` kombinieren. Ohne diese Prop bleibt das bisherige unkontrollierte Verhalten erhalten. Siehe [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.de.md) für Details.
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
482
508
|
### [3.22.0] — 2026-07-09
|
|
483
509
|
|
|
484
510
|
**Hinzugefügt**
|
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> [Deutsche Version →](README.de.md)
|
|
4
4
|
|
|
5
|
+
[](https://github.com/thebuoyant/mui-ts-library/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/@thebuoyant-tsdev/mui-ts-library)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
5
9
|
A type-safe React component library built on **TypeScript** and **MUI (Material UI v9)**. Components follow MUI's design language, support dark mode and theming out of the box, and ship with complete TypeScript types, Storybook stories, and unit tests.
|
|
6
10
|
|
|
7
11
|
**[→ Live Storybook](https://thebuoyant.github.io/mui-ts-library/)** — explore all components interactively, no installation needed.
|
|
@@ -479,6 +483,28 @@ This project follows [Semantic Versioning](https://semver.org/):
|
|
|
479
483
|
|
|
480
484
|
## Changelog
|
|
481
485
|
|
|
486
|
+
### [3.24.1] — 2026-07-10
|
|
487
|
+
|
|
488
|
+
**Fixed**
|
|
489
|
+
- `RichTextEditor` toolbar: `H1`/`H2`/`H3` and `MD` buttons now render as `<svg><text>` instead of a plain HTML `<span>` — consistent rendering engine, stroke weight, and color behaviour with all other SVG toolbar icons.
|
|
490
|
+
- `RadialStackedBarChart` stories: removed unused parameter that caused an ESLint error.
|
|
491
|
+
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
### [3.24.0] — 2026-07-10
|
|
495
|
+
|
|
496
|
+
**Added**
|
|
497
|
+
- **CSS Classes API** for `TagSelection`, `PasswordStrengthMeter`, and `ColorPicker` — every significant DOM node now carries a stable `.MuiTs<Component>-<slot>` class name. Style individual slots via plain CSS, CSS Modules, or Tailwind without touching MUI internals. Three typed constants objects exported: `tagSelectionClasses`, `passwordStrengthMeterClasses`, `colorPickerClasses` + shared `muiTsStateClasses` (`.MuiTs-disabled`, `.MuiTs-error`, …). See [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) for details.
|
|
498
|
+
|
|
499
|
+
---
|
|
500
|
+
|
|
501
|
+
### [3.23.0] — 2026-07-10
|
|
502
|
+
|
|
503
|
+
**Added**
|
|
504
|
+
- `ColorPicker`: new `format?: 'hex' | 'rgb' | 'hsl'` prop — controlled display format, lets the parent own the active format (e.g. for programmatic form resets). Combine with `onFormatChange`. Omit to keep existing uncontrolled behaviour. See [Full Changelog](https://github.com/thebuoyant/mui-ts-library/blob/main/CHANGELOG.md) for details.
|
|
505
|
+
|
|
506
|
+
---
|
|
507
|
+
|
|
482
508
|
### [3.22.0] — 2026-07-09
|
|
483
509
|
|
|
484
510
|
**Added**
|
|
@@ -4,8 +4,8 @@ import { clamp as n, hexToRgba as r, hslaToHsva as i, hsvaToHsla as a, hsvaToRgb
|
|
|
4
4
|
import { DEFAULT_COLOR_PICKER_TRANSLATION as u } from "./ColorPicker.types.js";
|
|
5
5
|
import { useEffect as d, useRef as f, useState as p } from "react";
|
|
6
6
|
import { Box as m, IconButton as ee, MenuItem as h, Select as te, TextField as g, Tooltip as ne, Typography as re, useTheme as ie } from "@mui/material";
|
|
7
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
8
7
|
import ae from "@mui/icons-material/Colorize";
|
|
8
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/color-picker/ColorPicker.tsx
|
|
10
10
|
function y(e, t) {
|
|
11
11
|
let r = n(e, 0, 100);
|
|
@@ -31,6 +31,19 @@ export type ColorPickerTranslation = {
|
|
|
31
31
|
hueSliderLabel: string;
|
|
32
32
|
};
|
|
33
33
|
export declare const DEFAULT_COLOR_PICKER_TRANSLATION: Required<ColorPickerTranslation>;
|
|
34
|
+
export type PopoverColorPickerTranslation = {
|
|
35
|
+
/** aria-label for the swatch trigger button. */
|
|
36
|
+
openLabel: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const DEFAULT_POPOVER_COLOR_PICKER_TRANSLATION: Required<PopoverColorPickerTranslation>;
|
|
39
|
+
export type PopoverColorPickerProps = Omit<ColorPickerProps, "translation"> & {
|
|
40
|
+
/** Size of the swatch trigger button in px (default: 28). */
|
|
41
|
+
swatchSize?: number;
|
|
42
|
+
/** Shape of the swatch button (default: `'square'`). */
|
|
43
|
+
swatchShape?: "square" | "circle";
|
|
44
|
+
/** i18n strings — merged with the inner ColorPicker translation. */
|
|
45
|
+
translation?: Partial<ColorPickerTranslation & PopoverColorPickerTranslation>;
|
|
46
|
+
};
|
|
34
47
|
export type ColorPickerProps = {
|
|
35
48
|
/** Current color — accepts hex (#rgb, #rgba, #rrggbb, #rrggbbaa), rgb()/rgba(), or hsl()/hsla(). */
|
|
36
49
|
value: string;
|
|
@@ -13,6 +13,6 @@ var e = {
|
|
|
13
13
|
savedColorsLabel: "Saved colors",
|
|
14
14
|
gradientAreaLabel: "Saturation and brightness",
|
|
15
15
|
hueSliderLabel: "Hue"
|
|
16
|
-
};
|
|
16
|
+
}, t = { openLabel: "Open color picker" };
|
|
17
17
|
//#endregion
|
|
18
|
-
export { e as DEFAULT_COLOR_PICKER_TRANSLATION };
|
|
18
|
+
export { e as DEFAULT_COLOR_PICKER_TRANSLATION, t as DEFAULT_POPOVER_COLOR_PICKER_TRANSLATION };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type PopoverColorPickerProps } from "./ColorPicker.types";
|
|
2
|
+
export declare function PopoverColorPicker({ value, onChange, onChangeCommitted, swatchSize, swatchShape, disabled, translation, ...colorPickerProps }: PopoverColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { muiTsStateClasses as e } from "../../utils/muiTsClasses.js";
|
|
2
|
+
import { popoverColorPickerClasses as t } from "./popoverColorPickerClasses.js";
|
|
3
|
+
import { DEFAULT_POPOVER_COLOR_PICKER_TRANSLATION as n } from "./ColorPicker.types.js";
|
|
4
|
+
import { ColorPicker as r } from "./ColorPicker.js";
|
|
5
|
+
import { useState as i } from "react";
|
|
6
|
+
import { Box as a, Popover as o, useTheme as s } from "@mui/material";
|
|
7
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/color-picker/PopoverColorPicker.tsx
|
|
9
|
+
var d = {
|
|
10
|
+
backgroundImage: "linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%)",
|
|
11
|
+
backgroundSize: "8px 8px",
|
|
12
|
+
backgroundPosition: "0 0, 0 4px, 4px -4px, -4px 0px"
|
|
13
|
+
};
|
|
14
|
+
function f({ value: f, onChange: p, onChangeCommitted: m, swatchSize: h = 28, swatchShape: g = "square", disabled: _ = !1, translation: v, ...y }) {
|
|
15
|
+
let b = s(), x = {
|
|
16
|
+
...n,
|
|
17
|
+
...v
|
|
18
|
+
}, [S, C] = i(null), w = !!S, T = g === "circle" ? "50%" : `${b.shape.borderRadius}px`;
|
|
19
|
+
return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(a, {
|
|
20
|
+
component: "button",
|
|
21
|
+
type: "button",
|
|
22
|
+
disabled: _,
|
|
23
|
+
"aria-label": x.openLabel,
|
|
24
|
+
"aria-expanded": w,
|
|
25
|
+
"aria-haspopup": "dialog",
|
|
26
|
+
onClick: (e) => C(e.currentTarget),
|
|
27
|
+
className: [t.root, _ ? e.disabled : void 0].filter(Boolean).join(" "),
|
|
28
|
+
sx: {
|
|
29
|
+
width: h,
|
|
30
|
+
height: h,
|
|
31
|
+
minWidth: h,
|
|
32
|
+
p: 0,
|
|
33
|
+
borderRadius: T,
|
|
34
|
+
border: `1px solid ${b.palette.divider}`,
|
|
35
|
+
cursor: _ ? "default" : "pointer",
|
|
36
|
+
overflow: "hidden",
|
|
37
|
+
flexShrink: 0,
|
|
38
|
+
...d,
|
|
39
|
+
"&:hover:not(:disabled)": { borderColor: b.palette.primary.main },
|
|
40
|
+
"&:focus-visible": {
|
|
41
|
+
outline: `2px solid ${b.palette.primary.main}`,
|
|
42
|
+
outlineOffset: 2
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
children: /* @__PURE__ */ l(a, {
|
|
46
|
+
className: t.swatch,
|
|
47
|
+
sx: {
|
|
48
|
+
width: "100%",
|
|
49
|
+
height: "100%",
|
|
50
|
+
borderRadius: "inherit",
|
|
51
|
+
backgroundColor: f
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
}), /* @__PURE__ */ l(o, {
|
|
55
|
+
open: w,
|
|
56
|
+
anchorEl: S,
|
|
57
|
+
onClose: () => C(null),
|
|
58
|
+
anchorOrigin: {
|
|
59
|
+
vertical: "bottom",
|
|
60
|
+
horizontal: "left"
|
|
61
|
+
},
|
|
62
|
+
transformOrigin: {
|
|
63
|
+
vertical: "top",
|
|
64
|
+
horizontal: "left"
|
|
65
|
+
},
|
|
66
|
+
slotProps: { paper: {
|
|
67
|
+
sx: { p: 1.5 },
|
|
68
|
+
"data-testid": "popover-color-picker"
|
|
69
|
+
} },
|
|
70
|
+
children: /* @__PURE__ */ l(r, {
|
|
71
|
+
value: f,
|
|
72
|
+
onChange: p,
|
|
73
|
+
onChangeCommitted: m,
|
|
74
|
+
disabled: _,
|
|
75
|
+
translation: v,
|
|
76
|
+
...y
|
|
77
|
+
})
|
|
78
|
+
})] });
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { f as PopoverColorPicker };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS class names for every named slot in the PopoverColorPicker component.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```css
|
|
6
|
+
* .MuiTsPopoverColorPicker-root { border-radius: 50%; }
|
|
7
|
+
* .MuiTsPopoverColorPicker-root.MuiTs-disabled { opacity: 0.4; pointer-events: none; }
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export declare const popoverColorPickerClasses: {
|
|
11
|
+
/** The swatch button that triggers the popover. Also receives `MuiTs-disabled` when `disabled={true}`. */
|
|
12
|
+
readonly root: "MuiTsPopoverColorPicker-root";
|
|
13
|
+
/** The inner colored box inside the swatch button. */
|
|
14
|
+
readonly swatch: "MuiTsPopoverColorPicker-swatch";
|
|
15
|
+
};
|