@ethisyscore/plugin-ui 1.76.0 → 1.78.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.
@@ -233,6 +233,10 @@ Object.defineProperty(exports, "CircularProgress", {
233
233
  enumerable: true,
234
234
  get: function () { return material.CircularProgress; }
235
235
  });
236
+ Object.defineProperty(exports, "Collapse", {
237
+ enumerable: true,
238
+ get: function () { return material.Collapse; }
239
+ });
236
240
  Object.defineProperty(exports, "Container", {
237
241
  enumerable: true,
238
242
  get: function () { return material.Container; }
@@ -1,7 +1,72 @@
1
1
  import { DialogProps } from '@mui/material';
2
- export { Alert, AlertTitle, Box, Breadcrumbs, Button, Card, CardActions, CardContent, CardHeader, Chip, CircularProgress, Container, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FilledInput, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, Grid, IconButton, Input, InputAdornment, InputLabel, LinearProgress, Link, ListItemIcon, ListItemText, Menu, MenuItem, OutlinedInput, Paper, Popover, Select, SelectChangeEvent, Skeleton, Stack, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TableHead as TableHeader, TableRow, Tabs, TextField, TextareaAutosize, Tooltip, Typography } from '@mui/material';
2
+ export { Alert, AlertTitle, Box, Breadcrumbs, Button, Card, CardActions, CardContent, CardHeader, Chip, CircularProgress, Collapse, Container, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FilledInput, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, Grid, IconButton, Input, InputAdornment, InputLabel, LinearProgress, Link, ListItemIcon, ListItemText, Menu, MenuItem, OutlinedInput, Paper, Popover, Select, SelectChangeEvent, Skeleton, Stack, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TableHead as TableHeader, TableRow, Tabs, TextField, TextareaAutosize, Tooltip, Typography } from '@mui/material';
3
3
  import * as react from 'react';
4
4
 
5
+ /**
6
+ * The host theme's extra MUI colour slots, declared for TypeScript.
7
+ *
8
+ * ## Why this file exists
9
+ *
10
+ * The host realm's theme (gogo-ui) adds colour slots MUI does not ship, and styles them in CSS
11
+ * against the class names MUI derives from the `color` prop. `grey` is the neutral one - the colour
12
+ * every "not the primary action" control in the estate uses: Cancel, Add row, Show details.
13
+ *
14
+ * `palette.grey` is a 20..900 ramp with no `.main`, so it is filtered out by MUI's own
15
+ * `createSimplePaletteValueFilter` and MUI emits NO styles for `color="grey"`. What it does emit is
16
+ * the class name - `MuiButton-outlinedGrey`, `MuiButton-textGrey` - and gogo-ui's stylesheet styles
17
+ * exactly those:
18
+ *
19
+ * // coreconnect-web/packages/gogo-ui/src/style/inputs/button.css:724
20
+ * .MuiButton-outlinedGrey {
21
+ * @apply border-grey-200 text-text-primary;
22
+ * &:hover { @apply bg-grey-200/10 text-text-primary-dark; }
23
+ *
24
+ * So the colour is real, it just lives in the host's CSS rather than in MUI's emitted styles. The
25
+ * consequence for types is that MUI's `ButtonPropsColorOverrides` has no `grey` member, and
26
+ * `color="grey"` is a type error until someone widens the union - which every consuming plugin had
27
+ * already done locally (`src/types/mui-theme.d.ts` in `timesheets`/`tech`,
28
+ * `packages/gogo-ui/src/theme/mui-extend.ts` in the host).
29
+ *
30
+ * The SDK had not, which is why PR #255 shipped `color="inherit"` as a stopgap when it promoted
31
+ * `ConnectorMappingTranslationEditorView` out of those plugins. `inherit` is not a synonym: MUI DOES
32
+ * emit styles for it (`color: inherit; borderColor: currentColor`), so the promoted component lost
33
+ * the `grey-200` border and the `text-text-primary-dark` hover the four copies had. Declaring the
34
+ * slot here is what lets the component say `grey` again and render as it did.
35
+ *
36
+ * ## Why a declaration rather than a cast
37
+ *
38
+ * `color={"grey" as ButtonProps["color"]}` at each call site would also compile, and would leave the
39
+ * next author to rediscover why. This says the true thing once: the host theme HAS this colour.
40
+ *
41
+ * ## Merging with a consumer's own declaration
42
+ *
43
+ * Interface declaration merging is additive and idempotent for identical members, so a plugin that
44
+ * already declares `grey: true` keeps compiling with this present - the two declarations merge into
45
+ * the same one-member union. `src/components/ui/__tests__/muiColorAugmentation.test.ts` compiles that
46
+ * exact situation rather than asserting it in prose.
47
+ *
48
+ * ## Why it lives in this barrel
49
+ *
50
+ * `components/ui` is the MUI seam: it is where a plugin gets `Button` and `IconButton` from, so it
51
+ * is the barrel whose consumers can write `color="grey"`. `index.ts` imports this module so the
52
+ * declaration reaches `dist/components/ui/index.d.ts` and ships to them - an augmentation only
53
+ * applies to a program that loads it.
54
+ *
55
+ * ## Why Button and not IconButton
56
+ *
57
+ * `IconButton` deliberately gets no slot. gogo-ui has no `MuiIconButton-*Grey` rule anywhere - the
58
+ * only `.MuiIconButton-root` block in `button.css` sets sizes - and MUI emits nothing for a
59
+ * `main`-less palette entry, so `color="grey"` on an IconButton resolves to the root's
60
+ * `palette.action.active`, which that theme defines as `hsl(var(--text-primary))`: the same value
61
+ * `color="inherit"` inherits from the enclosing `MuiPaper-root`. Identical pixels, so there is
62
+ * nothing to restore and no reason to widen a second interface.
63
+ */
64
+ declare module "@mui/material/Button" {
65
+ interface ButtonPropsColorOverrides {
66
+ grey: true;
67
+ }
68
+ }
69
+
5
70
  /**
6
71
  * MUI `Dialog` with the scroll-lock + focus-restore overrides plugin surfaces
7
72
  * need (AB#4808): MUI's defaults reset the page to top when a dialog opened from
@@ -1,7 +1,72 @@
1
1
  import { DialogProps } from '@mui/material';
2
- export { Alert, AlertTitle, Box, Breadcrumbs, Button, Card, CardActions, CardContent, CardHeader, Chip, CircularProgress, Container, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FilledInput, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, Grid, IconButton, Input, InputAdornment, InputLabel, LinearProgress, Link, ListItemIcon, ListItemText, Menu, MenuItem, OutlinedInput, Paper, Popover, Select, SelectChangeEvent, Skeleton, Stack, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TableHead as TableHeader, TableRow, Tabs, TextField, TextareaAutosize, Tooltip, Typography } from '@mui/material';
2
+ export { Alert, AlertTitle, Box, Breadcrumbs, Button, Card, CardActions, CardContent, CardHeader, Chip, CircularProgress, Collapse, Container, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FilledInput, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, Grid, IconButton, Input, InputAdornment, InputLabel, LinearProgress, Link, ListItemIcon, ListItemText, Menu, MenuItem, OutlinedInput, Paper, Popover, Select, SelectChangeEvent, Skeleton, Stack, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TableHead as TableHeader, TableRow, Tabs, TextField, TextareaAutosize, Tooltip, Typography } from '@mui/material';
3
3
  import * as react from 'react';
4
4
 
5
+ /**
6
+ * The host theme's extra MUI colour slots, declared for TypeScript.
7
+ *
8
+ * ## Why this file exists
9
+ *
10
+ * The host realm's theme (gogo-ui) adds colour slots MUI does not ship, and styles them in CSS
11
+ * against the class names MUI derives from the `color` prop. `grey` is the neutral one - the colour
12
+ * every "not the primary action" control in the estate uses: Cancel, Add row, Show details.
13
+ *
14
+ * `palette.grey` is a 20..900 ramp with no `.main`, so it is filtered out by MUI's own
15
+ * `createSimplePaletteValueFilter` and MUI emits NO styles for `color="grey"`. What it does emit is
16
+ * the class name - `MuiButton-outlinedGrey`, `MuiButton-textGrey` - and gogo-ui's stylesheet styles
17
+ * exactly those:
18
+ *
19
+ * // coreconnect-web/packages/gogo-ui/src/style/inputs/button.css:724
20
+ * .MuiButton-outlinedGrey {
21
+ * @apply border-grey-200 text-text-primary;
22
+ * &:hover { @apply bg-grey-200/10 text-text-primary-dark; }
23
+ *
24
+ * So the colour is real, it just lives in the host's CSS rather than in MUI's emitted styles. The
25
+ * consequence for types is that MUI's `ButtonPropsColorOverrides` has no `grey` member, and
26
+ * `color="grey"` is a type error until someone widens the union - which every consuming plugin had
27
+ * already done locally (`src/types/mui-theme.d.ts` in `timesheets`/`tech`,
28
+ * `packages/gogo-ui/src/theme/mui-extend.ts` in the host).
29
+ *
30
+ * The SDK had not, which is why PR #255 shipped `color="inherit"` as a stopgap when it promoted
31
+ * `ConnectorMappingTranslationEditorView` out of those plugins. `inherit` is not a synonym: MUI DOES
32
+ * emit styles for it (`color: inherit; borderColor: currentColor`), so the promoted component lost
33
+ * the `grey-200` border and the `text-text-primary-dark` hover the four copies had. Declaring the
34
+ * slot here is what lets the component say `grey` again and render as it did.
35
+ *
36
+ * ## Why a declaration rather than a cast
37
+ *
38
+ * `color={"grey" as ButtonProps["color"]}` at each call site would also compile, and would leave the
39
+ * next author to rediscover why. This says the true thing once: the host theme HAS this colour.
40
+ *
41
+ * ## Merging with a consumer's own declaration
42
+ *
43
+ * Interface declaration merging is additive and idempotent for identical members, so a plugin that
44
+ * already declares `grey: true` keeps compiling with this present - the two declarations merge into
45
+ * the same one-member union. `src/components/ui/__tests__/muiColorAugmentation.test.ts` compiles that
46
+ * exact situation rather than asserting it in prose.
47
+ *
48
+ * ## Why it lives in this barrel
49
+ *
50
+ * `components/ui` is the MUI seam: it is where a plugin gets `Button` and `IconButton` from, so it
51
+ * is the barrel whose consumers can write `color="grey"`. `index.ts` imports this module so the
52
+ * declaration reaches `dist/components/ui/index.d.ts` and ships to them - an augmentation only
53
+ * applies to a program that loads it.
54
+ *
55
+ * ## Why Button and not IconButton
56
+ *
57
+ * `IconButton` deliberately gets no slot. gogo-ui has no `MuiIconButton-*Grey` rule anywhere - the
58
+ * only `.MuiIconButton-root` block in `button.css` sets sizes - and MUI emits nothing for a
59
+ * `main`-less palette entry, so `color="grey"` on an IconButton resolves to the root's
60
+ * `palette.action.active`, which that theme defines as `hsl(var(--text-primary))`: the same value
61
+ * `color="inherit"` inherits from the enclosing `MuiPaper-root`. Identical pixels, so there is
62
+ * nothing to restore and no reason to widen a second interface.
63
+ */
64
+ declare module "@mui/material/Button" {
65
+ interface ButtonPropsColorOverrides {
66
+ grey: true;
67
+ }
68
+ }
69
+
5
70
  /**
6
71
  * MUI `Dialog` with the scroll-lock + focus-restore overrides plugin surfaces
7
72
  * need (AB#4808): MUI's defaults reset the page to top when a dialog opened from
@@ -1,5 +1,5 @@
1
1
  import { FormControl, InputLabel, FilledInput, InputAdornment, IconButton, Dialog as Dialog$1 } from '@mui/material';
2
- export { Alert, AlertTitle, Box, Breadcrumbs, Button, Card, CardActions, CardContent, CardHeader, Chip, CircularProgress, Container, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FilledInput, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, Grid, IconButton, Input, InputAdornment, InputLabel, LinearProgress, Link, ListItemIcon, ListItemText, Menu, MenuItem, OutlinedInput, Paper, Popover, Select, Skeleton, Stack, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TableHead as TableHeader, TableRow, Tabs, TextField, TextareaAutosize, Tooltip, Typography } from '@mui/material';
2
+ export { Alert, AlertTitle, Box, Breadcrumbs, Button, Card, CardActions, CardContent, CardHeader, Chip, CircularProgress, Collapse, Container, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, FilledInput, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, Grid, IconButton, Input, InputAdornment, InputLabel, LinearProgress, Link, ListItemIcon, ListItemText, Menu, MenuItem, OutlinedInput, Paper, Popover, Select, Skeleton, Stack, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TableHead as TableHeader, TableRow, Tabs, TextField, TextareaAutosize, Tooltip, Typography } from '@mui/material';
3
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
4
  import { memo, useState, useId, useRef, useEffect, useCallback } from 'react';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethisyscore/plugin-ui",
3
- "version": "1.76.0",
3
+ "version": "1.78.0",
4
4
  "description": "Plugin-UI umbrella SDK: client bridge + a11y/l10n primitives + brokered-MCP client (WI 4858).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",