@12-apps/ui 6.24.5 → 6.24.7

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 (50) hide show
  1. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +4 -4
  2. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +5 -5
  3. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +3 -3
  4. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +2 -2
  5. package/dist/_internal/components/data-display/DataViews/data-views-search.js +1 -1
  6. package/dist/_internal/components/data-display/Sheet/Sheet.body.js +2 -2
  7. package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -4
  8. package/dist/_internal/components/data-display/Sheet/Sheet.parts.js +1 -1
  9. package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +1 -1
  10. package/dist/_internal/components/data-display/index.js +4 -4
  11. package/dist/_internal/components/index.js +5 -5
  12. package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +5 -5
  13. package/dist/_internal/components/navigation/index.js +5 -5
  14. package/dist/{chunk-OTH7H3IP.js → chunk-4J5EN4FQ.js} +4 -4
  15. package/dist/{chunk-I3E2QHTH.js → chunk-6NSIZ2ZO.js} +2 -2
  16. package/dist/{chunk-53PDVLRK.js → chunk-6OORHAE7.js} +2 -2
  17. package/dist/{chunk-6JZE4IIN.js → chunk-7MR2JCJW.js} +36 -13
  18. package/dist/chunk-7MR2JCJW.js.map +1 -0
  19. package/dist/{chunk-GVA5CYKP.js → chunk-BUQ2JUND.js} +2 -2
  20. package/dist/{chunk-LWRMKF7D.js → chunk-H5VEJDEK.js} +2 -2
  21. package/dist/{chunk-A7Q5AQVD.js → chunk-HZVFAGLZ.js} +29 -14
  22. package/dist/chunk-HZVFAGLZ.js.map +1 -0
  23. package/dist/{chunk-M2K7BPHX.js → chunk-JBMBFYFA.js} +8 -3
  24. package/dist/chunk-JBMBFYFA.js.map +1 -0
  25. package/dist/{chunk-ZXOT3U6U.js → chunk-QPLWDSYG.js} +2 -2
  26. package/dist/{chunk-POUWN4PX.js → chunk-U437KFDI.js} +1 -1
  27. package/dist/chunk-U437KFDI.js.map +1 -0
  28. package/dist/data-display/DataViews.js +5 -5
  29. package/dist/data-display/Sheet.js +4 -4
  30. package/dist/navigation/AppHeader.js +5 -5
  31. package/dist/types/components/data-display/DataViews/data-views-search.d.ts.map +1 -1
  32. package/dist/types/components/data-display/Sheet/Sheet.body.d.ts.map +1 -1
  33. package/dist/types/components/data-display/Sheet/Sheet.parts.d.ts.map +1 -1
  34. package/dist/types/components/data-display/Sheet/Sheet.styles.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/src/components/data-display/DataViews/data-views-search.tsx +62 -14
  37. package/src/components/data-display/Sheet/Sheet.body.tsx +6 -1
  38. package/src/components/data-display/Sheet/Sheet.md +4 -2
  39. package/src/components/data-display/Sheet/Sheet.parts.tsx +4 -0
  40. package/src/components/data-display/Sheet/Sheet.styles.ts +77 -17
  41. package/dist/chunk-6JZE4IIN.js.map +0 -1
  42. package/dist/chunk-A7Q5AQVD.js.map +0 -1
  43. package/dist/chunk-M2K7BPHX.js.map +0 -1
  44. package/dist/chunk-POUWN4PX.js.map +0 -1
  45. /package/dist/{chunk-OTH7H3IP.js.map → chunk-4J5EN4FQ.js.map} +0 -0
  46. /package/dist/{chunk-I3E2QHTH.js.map → chunk-6NSIZ2ZO.js.map} +0 -0
  47. /package/dist/{chunk-53PDVLRK.js.map → chunk-6OORHAE7.js.map} +0 -0
  48. /package/dist/{chunk-GVA5CYKP.js.map → chunk-BUQ2JUND.js.map} +0 -0
  49. /package/dist/{chunk-LWRMKF7D.js.map → chunk-H5VEJDEK.js.map} +0 -0
  50. /package/dist/{chunk-ZXOT3U6U.js.map → chunk-QPLWDSYG.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/Sheet/Sheet.parts.tsx"],"sourcesContent":["import CloseIcon from '@mui/icons-material/Close';\nimport Backdrop from '@mui/material/Backdrop/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport Divider from '@mui/material/Divider/index.js';\nimport Fade from '@mui/material/Fade/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { alpha, useTheme } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { withDefaults } from '../../../utils/withDefaults';\n\nimport { shimmerAnimation } from './Sheet.animations';\nimport type {\n SheetContentProps,\n SheetFooterProps,\n SheetHeaderProps,\n SheetOverlayProps,\n} from './Sheet.types';\n\n/**\n * The grab handle's own styling. A draggable handle is deliberately larger and\n * tinted, so the affordance reads as draggable before the user tries it; a\n * decorative one stays a neutral bar.\n */\nconst handleSx = (theme: Theme, isDraggable: boolean) => ({\n width: isDraggable ? 48 : 32,\n height: isDraggable ? 6 : 4,\n backgroundColor: alpha(theme.palette.text.primary, 0.3),\n borderRadius: 3,\n transition: theme.transitions.create(['all'], {\n duration: theme.transitions.duration.short,\n easing: theme.transitions.easing.easeInOut,\n }),\n position: 'relative',\n overflow: 'hidden',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: '-100%',\n width: '100%',\n height: '100%',\n background: `linear-gradient(\n 90deg,\n transparent,\n ${alpha(theme.palette.common.white, 0.3)},\n transparent\n )`,\n animation: isDraggable ? `${shimmerAnimation} 2s infinite` : 'none',\n },\n ...(isDraggable && {\n backgroundColor: alpha(theme.palette.primary.main, 0.4),\n boxShadow: `0 2px 4px ${alpha(theme.palette.primary.main, 0.2)}`,\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n transform: 'scaleX(1.15) scaleY(1.2)',\n boxShadow: `0 3px 6px ${alpha(theme.palette.primary.main, 0.3)}`,\n },\n }),\n});\n\nconst SheetHandle: React.FC<{ isDraggable: boolean }> = ({ isDraggable }) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'center',\n mb: 1,\n // The handle is decoration on a draggable header: the drag listeners sit\n // on the header itself, so letting the bar swallow the press would open\n // a dead zone in the middle of the grab target.\n pointerEvents: isDraggable ? 'none' : 'auto',\n }}\n >\n <Box sx={handleSx(theme, isDraggable)} />\n </Box>\n );\n};\n\nconst HEADER_DEFAULTS: Partial<SheetHeaderProps> = {\n isDraggable: false,\n dataTestId: 'sheet-header',\n};\n\nexport const SheetHeader: React.FC<SheetHeaderProps> = (props) => {\n const {\n title,\n description,\n showCloseButton,\n onClose,\n showHandle,\n isDraggable,\n onDragStart,\n className,\n style,\n children,\n dataTestId,\n } = withDefaults(props, HEADER_DEFAULTS);\n\n return (\n <Box\n className={className}\n data-testid={dataTestId}\n sx={{\n p: 2,\n pb: showHandle ? 1 : 2,\n cursor: isDraggable ? 'grab' : 'auto',\n '&:active': isDraggable ? { cursor: 'grabbing' } : {},\n ...style,\n }}\n onMouseDown={isDraggable ? onDragStart : undefined}\n onTouchStart={isDraggable ? onDragStart : undefined}\n >\n {showHandle && <SheetHandle isDraggable={Boolean(isDraggable)} />}\n\n <Box sx={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between' }}>\n <Box sx={{ flex: 1 }}>\n {title && (\n <Typography variant=\"h6\" sx={{ fontWeight: 600 }} data-testid={`${dataTestId}-title`}>\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ mt: 0.5 }}>\n {description}\n </Typography>\n )}\n {children}\n </Box>\n\n {showCloseButton && (\n <IconButton\n onClick={onClose}\n size=\"small\"\n sx={{ ml: 1, mt: -0.5 }}\n data-testid={`${dataTestId}-close-button`}\n >\n <CloseIcon data-testid={`${dataTestId}-close-icon`} />\n </IconButton>\n )}\n </Box>\n </Box>\n );\n};\n\nconst CONTENT_DEFAULTS: Partial<SheetContentProps> = {\n padded: true,\n dataTestId: 'sheet-content',\n};\n\nexport const SheetContent: React.FC<SheetContentProps> = (props) => {\n const { children, className, style, padded, dataTestId } = withDefaults(props, CONTENT_DEFAULTS);\n\n return (\n <Box\n className={className}\n data-testid={dataTestId}\n // No `minHeight: 0` here, deliberately: a flex item's automatic minimum\n // size only applies while its main-axis `overflow` is `visible`, and this\n // one is `auto`, so it already shrinks. `SheetBody` above is the item that\n // needs it stated.\n sx={{ flex: 1, overflow: 'auto', p: padded ? 2 : 0, ...style }}\n >\n {children}\n </Box>\n );\n};\n\nconst FOOTER_DEFAULTS: Partial<SheetFooterProps> = {\n sticky: false,\n divider: false,\n dataTestId: 'sheet-footer',\n};\n\nexport const SheetFooter: React.FC<SheetFooterProps> = (props) => {\n const { children, className, style, sticky, divider, dataTestId } = withDefaults(\n props,\n FOOTER_DEFAULTS,\n );\n\n return (\n <>\n {divider && <Divider />}\n <Box\n className={className}\n data-testid={dataTestId}\n sx={{\n p: 2,\n position: sticky ? 'sticky' : 'relative',\n bottom: sticky ? 0 : 'auto',\n backgroundColor: 'background.paper',\n borderTop: sticky ? '1px solid' : 'none',\n borderColor: 'divider',\n ...style,\n }}\n >\n {children}\n </Box>\n </>\n );\n};\n\nconst OVERLAY_DEFAULTS: Partial<SheetOverlayProps> = {\n open: false,\n blur: false,\n};\n\nexport const SheetOverlay: React.FC<SheetOverlayProps> = (props) => {\n const { open, onClick, className, style, blur } = withDefaults(props, OVERLAY_DEFAULTS);\n const theme = useTheme();\n\n return (\n <Fade in={open} timeout={300}>\n <Backdrop\n open={Boolean(open)}\n onClick={onClick}\n className={className}\n sx={{\n // One below the drawer: this backdrop replaces MUI's own (the drawer\n // is given a no-op BackdropComponent) and must sit under the panel.\n zIndex: theme.zIndex.drawer - 1,\n backgroundColor: alpha(theme.palette.common.black, blur ? 0.6 : 0.5),\n backdropFilter: blur ? 'blur(8px) saturate(180%)' : 'none',\n WebkitBackdropFilter: blur ? 'blur(8px) saturate(180%)' : 'none',\n ...style,\n }}\n />\n </Fade>\n );\n};\n"],"mappings":";;;;;;;;AAAA,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB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,OAAO,gBAAgB;AACtF,QAAM,QAAQ,SAAS;AAEvB,SACE,oBAAC,QAAK,IAAI,MAAM,SAAS,KACvB;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,QAAQ,IAAI;AAAA,MAClB;AAAA,MACA;AAAA,MACA,IAAI;AAAA;AAAA;AAAA,QAGF,QAAQ,MAAM,OAAO,SAAS;AAAA,QAC9B,iBAAiB,MAAM,MAAM,QAAQ,OAAO,OAAO,OAAO,MAAM,GAAG;AAAA,QACnE,gBAAgB,OAAO,6BAA6B;AAAA,QACpD,sBAAsB,OAAO,6BAA6B;AAAA,QAC1D,GAAG;AAAA,MACL;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
@@ -3,11 +3,11 @@ import {
3
3
  } from "../chunk-JWW2Z3RH.js";
4
4
  import {
5
5
  DataViewsTableBase
6
- } from "../chunk-ZXOT3U6U.js";
6
+ } from "../chunk-QPLWDSYG.js";
7
7
  import "../chunk-4X4KM4ZB.js";
8
8
  import {
9
9
  DataViewsGrid
10
- } from "../chunk-53PDVLRK.js";
10
+ } from "../chunk-6OORHAE7.js";
11
11
  import {
12
12
  BaseListCard
13
13
  } from "../chunk-WR5JFDQ5.js";
@@ -22,14 +22,14 @@ import {
22
22
  DropIndicator,
23
23
  useDragItem
24
24
  } from "../chunk-JCJGJX7V.js";
25
- import "../chunk-LWRMKF7D.js";
25
+ import "../chunk-H5VEJDEK.js";
26
26
  import "../chunk-BPLFM2GL.js";
27
27
  import {
28
28
  DataViewsBoard
29
29
  } from "../chunk-E55CJV65.js";
30
30
  import "../chunk-PN5CQKA2.js";
31
31
  import "../chunk-5OIH36KX.js";
32
- import "../chunk-I3E2QHTH.js";
32
+ import "../chunk-6NSIZ2ZO.js";
33
33
  import "../chunk-5WNQJ5KS.js";
34
34
  import "../chunk-EJQW2IYW.js";
35
35
  import "../chunk-6LGWJFQK.js";
@@ -46,7 +46,7 @@ import "../chunk-IAGOUTI6.js";
46
46
  import "../chunk-EMMPNB6D.js";
47
47
  import "../chunk-KX75HM5U.js";
48
48
  import "../chunk-XKV5ZIBG.js";
49
- import "../chunk-A7Q5AQVD.js";
49
+ import "../chunk-HZVFAGLZ.js";
50
50
  import "../chunk-OGGHD64H.js";
51
51
  import {
52
52
  DEFAULT_RAILS,
@@ -1,15 +1,15 @@
1
1
  import "../chunk-ITACE45O.js";
2
2
  import {
3
3
  Sheet
4
- } from "../chunk-OTH7H3IP.js";
5
- import "../chunk-M2K7BPHX.js";
6
- import "../chunk-6JZE4IIN.js";
4
+ } from "../chunk-4J5EN4FQ.js";
5
+ import "../chunk-JBMBFYFA.js";
6
+ import "../chunk-7MR2JCJW.js";
7
7
  import {
8
8
  SheetContent,
9
9
  SheetFooter,
10
10
  SheetHeader,
11
11
  SheetOverlay
12
- } from "../chunk-POUWN4PX.js";
12
+ } from "../chunk-U437KFDI.js";
13
13
  import "../chunk-OLZTGVBT.js";
14
14
  import "../chunk-CRN4KKNI.js";
15
15
  import "../chunk-F52N6ACD.js";
@@ -12,16 +12,16 @@ import {
12
12
  } from "../chunk-H37GIAAM.js";
13
13
  import {
14
14
  AppHeaderDetails
15
- } from "../chunk-GVA5CYKP.js";
15
+ } from "../chunk-BUQ2JUND.js";
16
16
  import {
17
17
  brandGradient,
18
18
  highlightOf,
19
19
  initialsOf
20
20
  } from "../chunk-IQU4HKND.js";
21
- import "../chunk-OTH7H3IP.js";
22
- import "../chunk-M2K7BPHX.js";
23
- import "../chunk-6JZE4IIN.js";
24
- import "../chunk-POUWN4PX.js";
21
+ import "../chunk-4J5EN4FQ.js";
22
+ import "../chunk-JBMBFYFA.js";
23
+ import "../chunk-7MR2JCJW.js";
24
+ import "../chunk-U437KFDI.js";
25
25
  import "../chunk-OLZTGVBT.js";
26
26
  import "../chunk-CRN4KKNI.js";
27
27
  import "../chunk-F52N6ACD.js";
@@ -1 +1 @@
1
- {"version":3,"file":"data-views-search.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-search.tsx"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,IAAY,GACb,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA6DpB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,MAAM,EACN,MAAM,GACP,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmCpB"}
1
+ {"version":3,"file":"data-views-search.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-search.tsx"],"names":[],"mappings":"AA6FA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,IAAY,GACb,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmDpB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,MAAM,EACN,MAAM,GACP,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmCpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.body.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Sheet/Sheet.body.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,UAAU,EACR,OAAO,GACP,aAAa,GACb,iBAAiB,GACjB,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,UAAU,GACV,SAAS,GACT,SAAS,GACT,QAAQ,CACX;IACC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAC/D;AA6BD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA8D9C,CAAC"}
1
+ {"version":3,"file":"Sheet.body.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Sheet/Sheet.body.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAC1C,UAAU,EACR,OAAO,GACP,aAAa,GACb,iBAAiB,GACjB,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,UAAU,GACV,SAAS,GACT,SAAS,GACT,QAAQ,CACX;IACC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAC/D;AA6BD;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmE9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sheet.parts.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Sheet/Sheet.parts.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,eAAe,CAAC;AAqEvB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA2DlD,CAAC;AAOF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAYpD,CAAC;AAQF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0BlD,CAAC;AAOF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsBpD,CAAC"}
1
+ {"version":3,"file":"Sheet.parts.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/Sheet/Sheet.parts.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EACV,iB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CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,OAAO,CAAC;CAC1B;AA8HD,UAAU,YAAa,SAAQ,iBAAiB;IAC9C,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,YAAY,KAAG,SA4B7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/ui",
3
- "version": "6.24.5",
3
+ "version": "6.24.7",
4
4
  "license": "MIT",
5
5
  "packageManager": "pnpm@10.34.5",
6
6
  "type": "module",
@@ -10,7 +10,7 @@ import SearchIcon from "@mui/icons-material/Search";
10
10
  import IconButton from "@mui/material/IconButton/index.js";
11
11
  import InputAdornment from "@mui/material/InputAdornment/index.js";
12
12
  import TextField from "@mui/material/TextField/index.js";
13
- import { useEffect, useRef, useState } from "react";
13
+ import { useCallback, useEffect, useRef, useState } from "react";
14
14
 
15
15
  import { Box } from "../../../mui/Box";
16
16
  import { useDataViewsCopy } from "./data-views-copy-context";
@@ -33,6 +33,64 @@ function boxWidth(fill: boolean): { flex: number; minWidth: number; maxWidth: nu
33
33
  return { flex: 1, minWidth: fill ? 0 : 200, maxWidth: fill ? "none" : 384 };
34
34
  }
35
35
 
36
+ /**
37
+ * The box's own draft, and the two ways it reaches `onChange`.
38
+ *
39
+ * Extracted from {@link InlineKeyword} so the commit policy reads in one place
40
+ * rather than split across a render body — and because it is where both halves
41
+ * of a defect that lost searches outright had to be fixed.
42
+ *
43
+ * ## The debounce must not be keyed on the handler's identity
44
+ *
45
+ * Every caller builds `onChange` inline — the grid's own bar passes
46
+ * `(value) => c.patch({ search: value })`, rebuilt on each render. Keying the
47
+ * effect on it re-armed the timer on every render, and a busy admin page
48
+ * re-renders more often than every 350ms as its queries land, so the timer
49
+ * never survived to fire and the term was NEVER committed: measured in one
50
+ * adopter as a dead `?q=` on a server-mode grid, where a 15-second loop pressed
51
+ * Enter over and over and the URL never moved. So the handler is read through a
52
+ * ref and the effect depends on `[draft, value]` alone.
53
+ *
54
+ * ## An immediate commit must read the BOX, not the draft
55
+ *
56
+ * A keystroke can land before React has processed the edit before it — a fast
57
+ * typist, and every Playwright `fill()` followed by `press('Enter')`. `draft` is
58
+ * then still the value from before the edit, and comparing THAT to `value` said
59
+ * "nothing changed" and dropped the keystroke, leaving the term on screen with
60
+ * an unfiltered list behind it. `commitNow` takes what the caller read off the
61
+ * element and syncs the draft to it, which also keeps the box from being reset
62
+ * to a stale draft by the next render when a host ignores the commit.
63
+ */
64
+ function useKeywordDraft(
65
+ value: string,
66
+ onChange: (next: string) => void,
67
+ ): { draft: string; setDraft: (next: string) => void; commitNow: (typed: string) => void } {
68
+ const [draft, setDraft] = useState(value);
69
+ const prev = useRef(value);
70
+ // An external change (a saved view, the URL, "Limpar") wins over the draft.
71
+ if (prev.current !== value) {
72
+ prev.current = value;
73
+ if (draft !== value) setDraft(value);
74
+ }
75
+ const commit = useRef(onChange);
76
+ useEffect(() => {
77
+ commit.current = onChange;
78
+ });
79
+ useEffect(() => {
80
+ if (draft === value) return undefined;
81
+ const timer = setTimeout(() => commit.current(draft), SEARCH_DEBOUNCE_MS);
82
+ return () => clearTimeout(timer);
83
+ }, [draft, value]);
84
+ const commitNow = useCallback(
85
+ (typed: string) => {
86
+ setDraft(typed);
87
+ if (typed !== value) commit.current(typed);
88
+ },
89
+ [value],
90
+ );
91
+ return { draft, setDraft, commitNow };
92
+ }
93
+
36
94
  /**
37
95
  * The bar's keyword box.
38
96
  *
@@ -64,18 +122,7 @@ export function InlineKeyword({
64
122
  fill?: boolean;
65
123
  }): React.JSX.Element {
66
124
  const copy = useDataViewsCopy();
67
- const [draft, setDraft] = useState(value);
68
- const prev = useRef(value);
69
- // An external change (a saved view, the URL, "Limpar") wins over the draft.
70
- if (prev.current !== value) {
71
- prev.current = value;
72
- if (draft !== value) setDraft(value);
73
- }
74
- useEffect(() => {
75
- if (draft === value) return undefined;
76
- const timer = setTimeout(() => onChange(draft), SEARCH_DEBOUNCE_MS);
77
- return () => clearTimeout(timer);
78
- }, [draft, value, onChange]);
125
+ const { draft, setDraft, commitNow } = useKeywordDraft(value, onChange);
79
126
 
80
127
  return (
81
128
  <TextField
@@ -94,7 +141,8 @@ export function InlineKeyword({
94
141
  // presses it has decided, and waiting out the timer reads as a stall.
95
142
  if (event.key !== "Enter") return;
96
143
  event.preventDefault();
97
- if (draft !== value) onChange(draft);
144
+ // The BOX, not `draft` — see {@link useKeywordDraft}.
145
+ commitNow(event.target instanceof HTMLInputElement ? event.target.value : draft);
98
146
  }}
99
147
  placeholder={copy.search.placeholder}
100
148
  inputProps={{ "aria-label": copy.search.allColumnsLabel, "data-testid": testId }}
@@ -90,7 +90,12 @@ export const SheetBody: React.FC<SheetBodyProps> = (props) => {
90
90
  onBlur={onBlur}
91
91
  data-testid={testId}
92
92
  sx={{
93
- height: '100%',
93
+ // A vertical sheet's panel is a column whose height is its CONTENT, up
94
+ // to the `size` ceiling — so this fills what the panel has rather than
95
+ // asking for a percentage of it, and `minHeight: 0` is what lets it
96
+ // shrink past its content so `SheetContent` scrolls instead of the
97
+ // panel overflowing. A side sheet's panel is full-height already.
98
+ ...(isVerticalSheet ? { flex: '1 1 auto', minHeight: 0 } : { height: '100%' }),
94
99
  display: 'flex',
95
100
  flexDirection: 'column',
96
101
  position: 'relative',
@@ -26,8 +26,10 @@ The Sheet component is ideal for:
26
26
  ### Positioning and Sizing
27
27
 
28
28
  - **position** ('top' | 'right' | 'bottom' | 'left'): Edge from which the sheet slides (default: 'bottom')
29
- - **size** ('xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full'): Predefined size options (default: 'md'). For **side sheets** (`left`/`right`) the width is **viewport-aware**: a pixel floor keeps the panel usable while the larger presets grow with the screen — `lg` occupies ≥32% and `xl` ≥40% of the viewport on wide screens — and every preset is capped at `92vw` so it never overflows a small screen. `full` is always 100%. Vertical sheets (`top`/`bottom`) use fixed heights.
30
- - **fullHeight** (boolean): Expand the sheet along its **cross axis** — side sheets become full-height (keeping the `size` width); top/bottom sheets become full-width (keeping the `size` height)
29
+ - **size** ('xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full'): Predefined size options (default: 'md'). For **side sheets** (`left`/`right`) the width is **viewport-aware**: a pixel floor keeps the panel usable while the larger presets grow with the screen — `lg` occupies ≥32% and `xl` ≥40% of the viewport on wide screens — and every preset is capped at `92vw` so it never overflows a small screen. `full` is always 100%. For **vertical sheets** (`top`/`bottom`) the preset is a **height ceiling, not a height**: the panel is as tall as its content and starts scrolling only once that would pass the preset, so a short sheet no longer reserves the rest of it as dead space.
30
+ - **fullHeight** (boolean): Expand the sheet along its **cross axis** — side sheets become full-height (keeping the `size` width); top/bottom sheets become full-width (keeping the `size` height ceiling). `size="full"` is the separate case: it means the whole viewport on **both** axes, for every position.
31
+
32
+ A vertical sheet's **width** is one rule rather than one per preset: `min(100%, 640px)`, centred. Full-bleed is a handset layout, and on a desktop it stranded a sentence and a button in a 1900px panel; 640px is Material's own ceiling for a bottom sheet above the handset breakpoint, and below it `100%` gives the phone back exactly what it had. `fullHeight` is the opt-out where a top/bottom sheet really does want the whole width.
31
33
 
32
34
  ### Visual Variants
33
35
 
@@ -159,6 +159,10 @@ export const SheetContent: React.FC<SheetContentProps> = (props) => {
159
159
  <Box
160
160
  className={className}
161
161
  data-testid={dataTestId}
162
+ // No `minHeight: 0` here, deliberately: a flex item's automatic minimum
163
+ // size only applies while its main-axis `overflow` is `visible`, and this
164
+ // one is `auto`, so it already shrinks. `SheetBody` above is the item that
165
+ // needs it stated.
162
166
  sx={{ flex: 1, overflow: 'auto', p: padded ? 2 : 0, ...style }}
163
167
  >
164
168
  {children}
@@ -17,7 +17,7 @@ const isHorizontalPosition = (position: Position) => position === 'left' || posi
17
17
  * Horizontal (left/right) sheets are viewport-aware: a px floor keeps the panel
18
18
  * usable, `…vw` lets the larger presets grow on wide screens (lg ≥32%, xl ≥40%
19
19
  * of the viewport), and the outer `min(92vw, …)` guarantees the panel never
20
- * overflows a small screen. Vertical presets stay fixed-height.
20
+ * overflows a small screen.
21
21
  */
22
22
  const HORIZONTAL_SIZES: Record<Size, string> = {
23
23
  xs: 'min(92vw, 240px)',
@@ -28,20 +28,47 @@ const HORIZONTAL_SIZES: Record<Size, string> = {
28
28
  full: '100%',
29
29
  };
30
30
 
31
- const VERTICAL_SIZES: Record<Size, number | string> = {
32
- xs: 200,
33
- sm: 300,
34
- md: 400,
35
- lg: 500,
36
- xl: 600,
37
- full: '100%',
31
+ /**
32
+ * `size` governs a vertical sheet's MAIN axis, and it is a CEILING rather than
33
+ * a height: the panel is as tall as what it holds, and starts scrolling only
34
+ * once that would pass the preset.
35
+ *
36
+ * It was a fixed `height`, which meant a short sheet reserved the rest of the
37
+ * preset as dead space — a `md` sheet holding three lines and a button drew a
38
+ * 400px panel and floated them in it. `min(…, 100%)` keeps the ceiling under
39
+ * the viewport, which is also what MUI's own bottom paper asks for.
40
+ *
41
+ * `full` is absent on purpose: it is not a ceiling, it is the whole viewport,
42
+ * and `sizeStyles` answers it before it gets here.
43
+ */
44
+ const VERTICAL_SIZES: Record<Exclude<Size, 'full'>, string> = {
45
+ xs: 'min(200px, 100%)',
46
+ sm: 'min(300px, 100%)',
47
+ md: 'min(400px, 100%)',
48
+ lg: 'min(500px, 100%)',
49
+ xl: 'min(600px, 100%)',
38
50
  };
39
51
 
52
+ /**
53
+ * How wide a top/bottom sheet is allowed to get — its CROSS axis, so it is one
54
+ * rule rather than one per `size` preset.
55
+ *
56
+ * A bottom sheet spanning the full width is a phone layout, and it was the only
57
+ * layout this component had: on a desktop a panel holding a sentence and one
58
+ * button was drawn 1900px wide, with the content stranded in the middle of it.
59
+ * 640px is Material's own ceiling for a bottom sheet above the handset
60
+ * breakpoint, and below it `100%` gives the phone back exactly what it had.
61
+ *
62
+ * `fullHeight` is the documented opt-out — it expands a vertical sheet along
63
+ * this axis — and it becomes meaningful here for the first time: it used to
64
+ * name the behaviour every bottom sheet already had.
65
+ */
66
+ const VERTICAL_MAX_WIDTH = 'min(100%, 640px)';
67
+
40
68
  interface SizeStyleInput {
41
69
  position: Position;
42
70
  size: Size;
43
71
  isDraggableVariant: boolean;
44
- isVerticalSheet: boolean;
45
72
  currentHeight: number | null;
46
73
  }
47
74
 
@@ -49,18 +76,39 @@ const sizeStyles = ({
49
76
  position,
50
77
  size,
51
78
  isDraggableVariant,
52
- isVerticalSheet,
53
79
  currentHeight,
54
80
  }: SizeStyleInput) => {
81
+ if (isHorizontalPosition(position)) {
82
+ return { width: HORIZONTAL_SIZES[size] ?? HORIZONTAL_SIZES.md };
83
+ }
84
+
85
+ // `full` is not a size on the scale — it is THE WHOLE VIEWPORT, on both axes,
86
+ // and it has to stay that: a consumer using it for a phone takeover would
87
+ // otherwise get a content-hugging 640px card out of a catalog bump, with
88
+ // nothing in the API left to ask for what they had. So it is answered before
89
+ // either rule below touches it.
90
+ if (size === 'full') return { width: '100%', height: '100%' };
91
+
92
+ // The cross axis is the same rule whatever the preset, and the draggable
93
+ // variant needs it too — dragging moves the panel's height, never its width.
94
+ // `marginInline` is what centres it: MUI pins the bottom paper `left: 0;
95
+ // right: 0`, so a definite width plus auto margins resolves to the middle.
96
+ const cross = { width: VERTICAL_MAX_WIDTH, marginInline: 'auto' };
97
+
55
98
  // The draggable variant owns its own height: the snap point decides it, so a
56
99
  // preset would fight the drag.
57
- if (isDraggableVariant && isVerticalSheet && currentHeight !== null) {
58
- return { height: currentHeight };
100
+ if (isDraggableVariant && currentHeight !== null) {
101
+ return { ...cross, height: currentHeight };
59
102
  }
60
103
 
61
- return isHorizontalPosition(position)
62
- ? { width: HORIZONTAL_SIZES[size] ?? HORIZONTAL_SIZES.md }
63
- : { height: VERTICAL_SIZES[size] ?? VERTICAL_SIZES.md };
104
+ return {
105
+ ...cross,
106
+ // A CEILING, not a height — see `VERTICAL_SIZES`. `height: auto` is stated
107
+ // rather than left off so the rule survives a caller who set a height on a
108
+ // previous render, and it is what lets the panel hug what it holds.
109
+ height: 'auto',
110
+ maxHeight: VERTICAL_SIZES[size] ?? VERTICAL_SIZES.md,
111
+ };
64
112
  };
65
113
 
66
114
  /** `r, g, b` for a hex colour, so it can feed an `rgba(var(--x), a)` custom property. */
@@ -244,10 +292,22 @@ export const panelSx = (input: PanelSxInput): CSSObject => {
244
292
  input;
245
293
 
246
294
  return {
247
- ...sizeStyles({ position, size, isDraggableVariant, isVerticalSheet, currentHeight }),
295
+ // The DEFAULT, so the glow and the elevated shadow are not clipped by the
296
+ // panel they hang off. It used to be stated last, which made it a rule
297
+ // nothing could override — including `gradient`, whose own `overflow:
298
+ // hidden` is what keeps its shimmer inside the panel. That was invisible
299
+ // while every vertical sheet was full-bleed, because the sweep starts at
300
+ // `left: -100%` and a full-width panel put it off-screen; a 640px one puts
301
+ // it on the backdrop beside the sheet.
302
+ overflow: 'visible',
303
+ ...sizeStyles({ position, size, isDraggableVariant, currentHeight }),
304
+ // A COLUMN, so `maxHeight` above can be a ceiling rather than a height: the
305
+ // body is then a flex item that shrinks against it, and the scrolling falls
306
+ // to `SheetContent` where it belongs. Without this the panel would clip a
307
+ // long sheet instead of scrolling it.
308
+ ...(isVerticalSheet ? { display: 'flex', flexDirection: 'column' } : {}),
248
309
  ...variantStyles(input),
249
310
  ...style,
250
- overflow: 'visible',
251
311
  // Expand only the cross axis so the chosen `size` still governs the main
252
312
  // axis: side sheets keep their (responsive) width and go full-height;
253
313
  // top/bottom sheets keep their height and go full-width.
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/Sheet/Sheet.styles.ts"],"sourcesContent":["import { alpha } from '@mui/material/styles/index.js';\nimport type { CSSObject, Theme } from '@mui/material/styles/index.js';\nimport type React from 'react';\n\nimport { glowAnimation, pulseAnimation, shimmerAnimation } from './Sheet.animations';\nimport type { SheetProps } from './Sheet.types';\nimport { accentFor } from '../../../tokens/scales';\n\ntype Position = NonNullable<SheetProps['position']>;\ntype Variant = NonNullable<SheetProps['variant']>;\ntype Size = NonNullable<SheetProps['size']>;\ntype Color = NonNullable<SheetProps['color']>;\n\nconst isHorizontalPosition = (position: Position) => position === 'left' || position === 'right';\n\n/**\n * Horizontal (left/right) sheets are viewport-aware: a px floor keeps the panel\n * usable, `…vw` lets the larger presets grow on wide screens (lg ≥32%, xl ≥40%\n * of the viewport), and the outer `min(92vw, …)` guarantees the panel never\n * overflows a small screen. Vertical presets stay fixed-height.\n */\nconst HORIZONTAL_SIZES: Record<Size, string> = {\n xs: 'min(92vw, 240px)',\n sm: 'min(92vw, 320px)',\n md: 'min(92vw, 400px)',\n lg: 'min(92vw, max(560px, 32vw))',\n xl: 'min(92vw, max(720px, 40vw))',\n full: '100%',\n};\n\nconst VERTICAL_SIZES: Record<Size, number | string> = {\n xs: 200,\n sm: 300,\n md: 400,\n lg: 500,\n xl: 600,\n full: '100%',\n};\n\ninterface SizeStyleInput {\n position: Position;\n size: Size;\n isDraggableVariant: boolean;\n isVerticalSheet: boolean;\n currentHeight: number | null;\n}\n\nconst sizeStyles = ({\n position,\n size,\n isDraggableVariant,\n isVerticalSheet,\n currentHeight,\n}: SizeStyleInput) => {\n // The draggable variant owns its own height: the snap point decides it, so a\n // preset would fight the drag.\n if (isDraggableVariant && isVerticalSheet && currentHeight !== null) {\n return { height: currentHeight };\n }\n\n return isHorizontalPosition(position)\n ? { width: HORIZONTAL_SIZES[size] ?? HORIZONTAL_SIZES.md }\n : { height: VERTICAL_SIZES[size] ?? VERTICAL_SIZES.md };\n};\n\n/** `r, g, b` for a hex colour, so it can feed an `rgba(var(--x), a)` custom property. */\nconst toRgbTriplet = (hexColor: string) => {\n const hex = hexColor.replace('#', '');\n const r = parseInt(hex.substring(0, 2), 16);\n const g = parseInt(hex.substring(2, 4), 16);\n const b = parseInt(hex.substring(4, 6), 16);\n return `${r}, ${g}, ${b}`;\n};\n\nconst roundedStyles = (theme: Theme, position: Position) => {\n const radius = theme.spacing(2);\n const byPosition: Record<Position, string> = {\n top: `0 0 ${radius} ${radius}`,\n bottom: `${radius} ${radius} 0 0`,\n left: `0 ${radius} ${radius} 0`,\n right: `${radius} 0 0 ${radius}`,\n };\n return { borderRadius: byPosition[position] };\n};\n\ninterface VariantStyleInput {\n theme: Theme;\n variant: Variant;\n color: Color;\n position: Position;\n elevation: number;\n glow: boolean;\n pulse: boolean;\n glass: boolean;\n gradient: boolean;\n rounded: boolean;\n disabled: boolean;\n isDragging: boolean;\n isAnimating: boolean;\n isDraggableVariant: boolean;\n isVerticalSheet: boolean;\n}\n\ntype SurfaceInput = VariantStyleInput & { accent: string };\n\n/**\n * Each variant's own additions to the shared surface — never the shared part\n * itself. Every arm of the old switch re-spread the same base, glow, pulse and\n * rounded objects before adding these few rules; `variantStyles` applies that\n * prefix once and lets the table hold only what actually differs.\n */\nconst SURFACES: Record<Variant, (input: SurfaceInput) => Record<string, unknown>> = {\n draggable: ({ theme, elevation, accent }) => ({\n boxShadow: `\n ${theme.shadows[Math.min(elevation + 4, 24)]},\n 0 -2px 10px 0 ${alpha(theme.palette.common.black, 0.1)}\n `,\n border: `1px solid ${alpha(theme.palette.divider, 0.12)}`,\n borderTop: `2px solid ${alpha(accent, 0.3)}`,\n transition: theme.transitions.create(['transform', 'box-shadow', 'border-color'], {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeInOut,\n }),\n '&:hover': { borderTopColor: alpha(accent, 0.5) },\n }),\n\n glass: ({ theme, glass }) => ({\n backgroundColor: alpha(theme.palette.background.paper, glass ? 0.75 : 0.95),\n backdropFilter: 'blur(24px) saturate(180%)',\n WebkitBackdropFilter: 'blur(24px) saturate(180%)',\n border: `1px solid ${alpha(theme.palette.divider, 0.15)}`,\n boxShadow: `\n 0 8px 32px 0 ${alpha(theme.palette.common.black, 0.15)},\n inset 0 0 0 1px ${alpha(theme.palette.common.white, 0.1)}\n `,\n }),\n\n gradient: ({ theme, color, gradient, accent }) => ({\n background: gradient\n ? `linear-gradient(\n 135deg,\n ${theme.palette.background.paper} 0%,\n ${alpha(accent, 0.08)} 50%,\n ${alpha(accentFor(theme, color)?.dark || accent, 0.12)} 100%\n )`\n : theme.palette.background.paper,\n position: 'relative' as const,\n overflow: 'hidden' as const,\n '&::before': gradient ? shimmerOverlay(theme) : {},\n }),\n\n elevated: ({ theme, elevation }) => ({\n boxShadow: `\n ${theme.shadows[elevation]},\n 0 20px 40px -15px ${alpha(theme.palette.common.black, 0.15)}\n `,\n transform: 'translateZ(0)',\n willChange: 'transform',\n }),\n\n minimal: () => ({ boxShadow: 'none', border: 'none' }),\n\n default: () => ({}),\n};\n\n/** The sweep of light the gradient variant runs across itself. */\nconst shimmerOverlay = (theme: Theme) => ({\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: '-100%',\n width: '100%',\n height: '100%',\n background: `linear-gradient(\n 90deg,\n transparent,\n ${alpha(theme.palette.common.white, 0.2)},\n transparent\n )`,\n animation: `${shimmerAnimation} 3s infinite`,\n});\n\n/**\n * The parts of the surface that do not depend on the variant: the paper colour,\n * the transition suppression while a drag or spring is driving the panel, the\n * disabled and cursor states, and the two colour custom properties the glow and\n * pulse keyframes read.\n */\nconst baseSurface = (input: VariantStyleInput, accent: string) => {\n const { theme, disabled, isDragging, isAnimating, isDraggableVariant, isVerticalSheet } = input;\n const colorRgb = toRgbTriplet(accent);\n\n return {\n backgroundColor: theme.palette.background.paper,\n // A transition would fight the per-frame height writes while a drag or a\n // snap animation is driving the panel.\n transition:\n !isDragging && !isAnimating\n ? theme.transitions.create(['all'], {\n duration: theme.transitions.duration.standard,\n easing: theme.transitions.easing.easeInOut,\n })\n : 'none',\n opacity: disabled ? 0.5 : 1,\n pointerEvents: disabled ? ('none' as const) : ('auto' as const),\n cursor: isDraggableVariant && isVerticalSheet ? 'grab' : 'auto',\n '--pulse-color': colorRgb,\n '--glow-color': colorRgb,\n ...(isDragging && { cursor: 'grabbing' }),\n };\n};\n\nconst variantStyles = (input: VariantStyleInput) => {\n const { theme, variant, color, position, glow, pulse, rounded } = input;\n const accent = accentFor(theme, color)?.main || theme.palette.primary.main;\n\n return {\n ...baseSurface(input, accent),\n // glow first, then pulse: with both set the pulse keyframes win the shared\n // `animation` slot, which is the order the original spread produced.\n ...(glow && { animation: `${glowAnimation} 2s ease-in-out infinite`, filter: 'brightness(1.05)' }),\n ...(pulse && { animation: `${pulseAnimation} 2s infinite`, position: 'relative' as const }),\n ...(rounded && roundedStyles(theme, position)),\n ...(SURFACES[variant] ?? SURFACES.default)({ ...input, accent }),\n };\n};\n\ninterface PanelSxInput extends VariantStyleInput {\n size: Size;\n currentHeight: number | null;\n fullHeight: boolean;\n style?: React.CSSProperties;\n}\n\n/**\n * The drawer paper's complete `sx`: its size, its variant surface, the caller's\n * own `style`, and the full-height rule.\n *\n * Built here rather than in the component so the component holds no style\n * branches of its own — the cross-axis rule below is four on its own.\n */\nexport const panelSx = (input: PanelSxInput): CSSObject => {\n const { position, size, isDraggableVariant, isVerticalSheet, currentHeight, fullHeight, style } =\n input;\n\n return {\n ...sizeStyles({ position, size, isDraggableVariant, isVerticalSheet, currentHeight }),\n ...variantStyles(input),\n ...style,\n overflow: 'visible',\n // Expand only the cross axis so the chosen `size` still governs the main\n // axis: side sheets keep their (responsive) width and go full-height;\n // top/bottom sheets keep their height and go full-width.\n ...(fullHeight &&\n !isDraggableVariant &&\n (isHorizontalPosition(position) ? { height: '100%' } : { width: '100%' })),\n };\n};\n"],"mappings":";;;;;;;;;;AAAA,SAAS,aAAa;AAatB,IAAM,uBAA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AE,QAAQ,WAAW;AAAA,EACzC;AACF;AAEA,IAAM,gBAAgB,CAAC,UAA6B;AAClD,QAAM,EAAE,OAAO,SAAS,OAAO,UAAU,MAAM,OAAO,QAAQ,IAAI;AAClE,QAAM,SAAS,UAAU,OAAO,KAAK,GAAG,QAAQ,MAAM,QAAQ,QAAQ;AAEtE,SAAO;AAAA,IACL,GAAG,YAAY,OAAO,MAAM;AAAA;AAAA;AAAA,IAG5B,GAAI,QAAQ,EAAE,WAAW,GAAG,aAAa,4BAA4B,QAAQ,mBAAmB;AAAA,IAChG,GAAI,SAAS,EAAE,WAAW,GAAG,cAAc,gBAAgB,UAAU,WAAoB;AAAA,IACzF,GAAI,WAAW,cAAc,OAAO,QAAQ;AAAA,IAC5C,IAAI,SAAS,OAAO,KAAK,SAAS,SAAS,EAAE,GAAG,OAAO,OAAO,CAAC;AAAA,EACjE;AACF;AAgBO,IAAM,UAAU,CAAC,UAAmC;AACzD,QAAM,EAAE,UAAU,MAAM,oBAAoB,iBAAiB,eAAe,YAAY,MAAM,IAC5F;AAEF,SAAO;AAAA,IACL,GAAG,WAAW,EAAE,UAAU,MAAM,oBAAoB,iBAAiB,cAAc,CAAC;AAAA,IACpF,GAAG,cAAc,KAAK;AAAA,IACtB,GAAG;AAAA,IACH,UAAU;AAAA;AAAA;AAAA;AAAA,IAIV,GAAI,cACF,CAAC,uBACA,qBAAqB,QAAQ,IAAI,EAAE,QAAQ,OAAO,IAAI,EAAE,OAAO,OAAO;AAAA,EAC3E;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/DataViews/data-views-search.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * THE INLINE BAR'S SEARCH — the one control on the toolbar that cannot be\n * guessed from an icon's position, which is why it is the LAST thing the\n * degradation ladder takes away. See `data-views-overflow.ts`.\n */\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport SearchIcon from \"@mui/icons-material/Search\";\nimport IconButton from \"@mui/material/IconButton/index.js\";\nimport InputAdornment from \"@mui/material/InputAdornment/index.js\";\nimport TextField from \"@mui/material/TextField/index.js\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport { Box } from \"../../../mui/Box\";\nimport { useDataViewsCopy } from \"./data-views-copy-context\";\n\n/** How long the box waits after the last keystroke before it queries. */\nconst SEARCH_DEBOUNCE_MS = 350;\n\n/**\n * How wide the keyword box is allowed to be.\n *\n * The 200px floor is right while the box shares the row: a search you cannot\n * read six characters in is not a search. It is WRONG once the box has been\n * expanded out of its collapsed state on a narrow screen, where the cluster was\n * sized for a magnifier — the floor cannot be met there, so the row scrolled\n * sideways instead (154px of overhang at 320px). In that mode the box shrinks,\n * and if what is left would still be unreadable the bar hands it the whole\n * cluster instead (`searchTakeover`).\n */\nfunction boxWidth(fill: boolean): { flex: number; minWidth: number; maxWidth: number | \"none\" } {\n return { flex: 1, minWidth: fill ? 0 : 200, maxWidth: fill ? \"none\" : 384 };\n}\n\n/**\n * The bar's keyword box.\n *\n * DEBOUNCED rather than committed on Enter/blur. In server mode every commit is\n * a round trip, and a box that only fires on blur makes the operator press a\n * key they were not told about to see any result at all — they type, nothing\n * happens, and the list looks broken. 350ms is long enough that a word costs\n * one query, short enough to feel like live search.\n *\n * `Escape` clears; the X clears without leaving the box. Both exist because\n * clearing by selecting-and-deleting is three gestures for the most common\n * thing anyone does to a search box.\n */\nexport function InlineKeyword({\n value,\n onChange,\n testId,\n autoFocus,\n onEscape,\n fill = false,\n}: {\n value: string;\n onChange: (value: string) => void;\n testId?: string;\n autoFocus?: boolean;\n /** Called on Escape with the box already empty — the collapsed bar closes it. */\n onEscape?: () => void;\n /** Take whatever width there is, with no minimum — see {@link boxWidth}. */\n fill?: boolean;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n const [draft, setDraft] = useState(value);\n const prev = useRef(value);\n // An external change (a saved view, the URL, \"Limpar\") wins over the draft.\n if (prev.current !== value) {\n prev.current = value;\n if (draft !== value) setDraft(value);\n }\n useEffect(() => {\n if (draft === value) return undefined;\n const timer = setTimeout(() => onChange(draft), SEARCH_DEBOUNCE_MS);\n return () => clearTimeout(timer);\n }, [draft, value, onChange]);\n\n return (\n <TextField\n size=\"small\"\n value={draft}\n autoFocus={autoFocus}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n if (draft === \"\") onEscape?.();\n setDraft(\"\");\n return;\n }\n // Enter still commits IMMEDIATELY, ahead of the debounce — someone who\n // presses it has decided, and waiting out the timer reads as a stall.\n if (event.key !== \"Enter\") return;\n event.preventDefault();\n if (draft !== value) onChange(draft);\n }}\n placeholder={copy.search.placeholder}\n inputProps={{ \"aria-label\": copy.search.allColumnsLabel, \"data-testid\": testId }}\n InputProps={{\n startAdornment: (\n <InputAdornment position=\"start\">\n <SearchIcon sx={{ fontSize: 16, color: \"text.secondary\" }} />\n </InputAdornment>\n ),\n endAdornment: draft ? (\n <InputAdornment position=\"end\">\n <IconButton\n size=\"small\"\n aria-label={copy.search.clear}\n data-testid={testId ? `${testId}-clear` : undefined}\n onClick={() => setDraft(\"\")}\n sx={{ p: 0.25 }}\n >\n <CloseIcon sx={{ fontSize: 14 }} />\n </IconButton>\n </InputAdornment>\n ) : undefined,\n }}\n // Takes the free space and gives it up first — step 3 of the ladder,\n // which needs no flag because flex does it (see `computeSplit`).\n sx={boxWidth(fill)}\n />\n );\n}\n\n/**\n * Step 4 of the ladder: the search as a magnifier.\n *\n * Carries a dot when a search is APPLIED. Collapsing a control that is\n * currently filtering the list, with nothing saying so, is how an operator ends\n * up staring at 3 rows of 214 and reading it as missing data.\n */\nexport function CollapsedSearch({\n active,\n onOpen,\n testId,\n}: {\n active: boolean;\n onOpen: () => void;\n testId?: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n return (\n <IconButton\n size=\"small\"\n onClick={onOpen}\n aria-label={copy.search.open}\n aria-expanded={false}\n data-testid={testId ? `${testId}-collapsed` : undefined}\n sx={{\n position: \"relative\",\n border: 1,\n borderRadius: 1,\n borderColor: active ? \"primary.main\" : \"divider\",\n color: active ? \"primary.main\" : \"text.secondary\",\n bgcolor: active ? \"action.selected\" : \"background.paper\",\n }}\n >\n <SearchIcon sx={{ fontSize: 18 }} />\n {active && (\n <Box\n component=\"span\"\n sx={{\n position: \"absolute\",\n top: 2,\n right: 2,\n width: 6,\n height: 6,\n borderRadius: \"50%\",\n bgcolor: \"primary.main\",\n }}\n />\n )}\n </IconButton>\n );\n}\n\n"],"mappings":";;;;;;;;AAOA,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,eAAe;AACtB,SAAS,WAAW,QAAQ,gBAAgB;AA2FhC,cA0CR,YA1CQ;AArFZ,IAAM,qBAAqB;AAa3B,SAAS,SAAS,MAA8E;AAC9F,SAAO,EAAE,MAAM,GAAG,UAAU,OAAO,IAAI,KAAK,UAAU,OAAO,SAAS,IAAI;AAC5E;AAeO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AACT,GASsB;AACpB,QAAM,OAAO,iBAAiB;AAC9B,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,KAAK;AACxC,QAAM,OAAO,OAAO,KAAK;AAEzB,MAAI,KAAK,YAAY,OAAO;AAC1B,SAAK,UAAU;AACf,QAAI,UAAU,MAAO,UAAS,KAAK;AAAA,EACrC;AACA,YAAU,MAAM;AACd,QAAI,UAAU,MAAO,QAAO;AAC5B,UAAM,QAAQ,WAAW,MAAM,SAAS,KAAK,GAAG,kBAAkB;AAClE,WAAO,MAAM,aAAa,KAAK;AAAA,EACjC,GAAG,CAAC,OAAO,OAAO,QAAQ,CAAC;AAE3B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAO;AAAA,MACP;AAAA,MACA,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,KAAK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,QACjC,SAAS,SAAS,oBAAoB;AAAA,MACxC;AAAA,MAEA;AAAA,4BAAC,cAAW,IAAI,EAAE,UAAU,GAAG,GAAG;AAAA,QACjC,UACC;AAAA,UAACA;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,IAAI;AAAA,cACF,UAAU;AAAA,cACV,KAAK;AAAA,cACL,OAAO;AAAA,cACP,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,cAAc;AAAA,cACd,SAAS;AAAA,YACX;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/Sheet/Sheet.body.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport React from 'react';\n\nimport { SheetContent, SheetFooter, SheetHeader } from './Sheet.parts';\nimport type { SheetProps } from './Sheet.types';\nimport { muiColor } from '../../../tokens/scales';\n\nexport interface SheetBodyProps extends Pick<\n SheetProps,\n | 'title'\n | 'description'\n | 'showCloseButton'\n | 'showHandle'\n | 'header'\n | 'footer'\n | 'loading'\n | 'color'\n | 'children'\n | 'onClick'\n | 'onFocus'\n | 'onBlur'\n> {\n testId: string;\n isDragging: boolean;\n isVerticalSheet: boolean;\n isDraggableVariant: boolean;\n onClose: () => void;\n onDragStart: (e: React.MouseEvent | React.TouchEvent) => void;\n}\n\n/**\n * The header earns its place if it would show anything at all — a grab handle,\n * either piece of text, the close button, or caller-supplied content.\n */\nconst needsHeader = (props: SheetBodyProps) =>\n Boolean(\n props.showHandle ||\n props.title ||\n props.description ||\n props.showCloseButton ||\n props.header,\n );\n\n/** The centred spinner shown in place of the children while `loading`. */\nconst SheetLoading: React.FC<Pick<SheetBodyProps, 'color'>> = ({ color }) => (\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n minHeight: 200,\n }}\n >\n <CircularProgress color={color === undefined ? undefined : muiColor(color, 'inherit')} />\n </Box>\n);\n\n/**\n * What the sheet contains, independent of which drawer is carrying it. The\n * swipeable and plain branches render exactly this — they differ only in the\n * MUI component and its swipe props, so the contents are built once.\n */\nexport const SheetBody: React.FC<SheetBodyProps> = (props) => {\n const {\n title,\n description,\n showCloseButton,\n showHandle,\n header,\n footer,\n loading,\n color,\n children,\n onClick,\n onFocus,\n onBlur,\n testId,\n isDragging,\n isVerticalSheet,\n isDraggableVariant,\n onClose,\n onDragStart,\n } = props;\n\n return (\n <Box\n onClick={onClick}\n onFocus={onFocus}\n onBlur={onBlur}\n data-testid={testId}\n sx={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n userSelect: isDragging ? 'none' : 'auto',\n }}\n >\n {needsHeader(props) && (\n <SheetHeader\n title={title}\n description={description}\n showCloseButton={showCloseButton}\n onClose={onClose}\n showHandle={showHandle && isVerticalSheet}\n isDraggable={isDraggableVariant && isVerticalSheet}\n onDragStart={onDragStart}\n dataTestId={`${testId}-header`}\n >\n {header}\n </SheetHeader>\n )}\n\n <SheetContent padded dataTestId={`${testId}-content`}>\n {loading ? <SheetLoading color={color} /> : children}\n </SheetContent>\n\n {footer && (\n <SheetFooter sticky divider dataTestId={`${testId}-footer`}>\n {footer}\n </SheetFooter>\n )}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;AAAA,OAAO,SAAS;AAChB,OAAO,sBAAsB;AAqDzB,cAgCA,YAhCA;AAnBJ,IAAM,cAAc,CAAC,UACnB;AAAA,EACE,MAAM,cACN,MAAM,SACN,MAAM,eACN,MAAM,mBACN,MAAM;AACR;AAGF,IAAM,eAAwD,CAAC,EAAE,MAAM,MACrE;AAAA,EAAC;AAAA;AAAA,IACC,IAAI;AAAA,MACF,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,YAAY;AAAA,MACZ,WAAW;AAAA,IACb;AAAA,IAEA,8BAAC,oBAAiB,OAAO,UAAU,SAAY,SAAY,SAAS,OAAO,SAAS,GAAG;AAAA;AACzF;AAQK,IAAM,YAAsC,CAAC,UAAU;AAC5D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAa;AAAA,MACb,IAAI;AAAA,QACF,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,eAAe;AAAA,QACf,UAAU;AAAA,QACV,YAAY,aAAa,SAAS;AAAA,MACpC;AAAA,MAEC;AAAA,oBAAY,KAAK,KAChB;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,YAAY,cAAc;AAAA,YAC1B,aAAa,sBAAsB;AAAA,YACnC;AAAA,YACA,YAAY,GAAG,MAAM;AAAA,YAEpB;AAAA;AAAA,QACH;AAAA,QAGF,oBAAC,gBAAa,QAAM,MAAC,YAAY,GAAG,MAAM,YACvC,oBAAU,oBAAC,gBAAa,OAAc,IAAK,UAC9C;AAAA,QAEC,UACC,oBAAC,eAAY,QAAM,MAAC,SAAO,MAAC,YAAY,GAAG,MAAM,WAC9C,kBACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/Sheet/Sheet.parts.tsx"],"sourcesContent":["import CloseIcon from '@mui/icons-material/Close';\nimport Backdrop from '@mui/material/Backdrop/index.js';\nimport Box from '@mui/material/Box/index.js';\nimport Divider from '@mui/material/Divider/index.js';\nimport Fade from '@mui/material/Fade/index.js';\nimport IconButton from '@mui/material/IconButton/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { alpha, useTheme } from '@mui/material/styles/index.js';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { withDefaults } from '../../../utils/withDefaults';\n\nimport { shimmerAnimation } from './Sheet.animations';\nimport type {\n SheetContentProps,\n SheetFooterProps,\n SheetHeaderProps,\n SheetOverlayProps,\n} from './Sheet.types';\n\n/**\n * The grab handle's own styling. A draggable handle is deliberately larger and\n * tinted, so the affordance reads as draggable before the user tries it; a\n * decorative one stays a neutral bar.\n */\nconst handleSx = (theme: Theme, isDraggable: boolean) => ({\n width: isDraggable ? 48 : 32,\n height: isDraggable ? 6 : 4,\n backgroundColor: alpha(theme.palette.text.primary, 0.3),\n borderRadius: 3,\n transition: theme.transitions.create(['all'], {\n duration: theme.transitions.duration.short,\n easing: theme.transitions.easing.easeInOut,\n }),\n position: 'relative',\n overflow: 'hidden',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: '-100%',\n width: '100%',\n height: '100%',\n background: `linear-gradient(\n 90deg,\n transparent,\n ${alpha(theme.palette.common.white, 0.3)},\n transparent\n )`,\n animation: isDraggable ? `${shimmerAnimation} 2s infinite` : 'none',\n },\n ...(isDraggable && {\n backgroundColor: alpha(theme.palette.primary.main, 0.4),\n boxShadow: `0 2px 4px ${alpha(theme.palette.primary.main, 0.2)}`,\n '&:hover': {\n backgroundColor: theme.palette.primary.main,\n transform: 'scaleX(1.15) scaleY(1.2)',\n boxShadow: `0 3px 6px ${alpha(theme.palette.primary.main, 0.3)}`,\n },\n }),\n});\n\nconst SheetHandle: React.FC<{ isDraggable: boolean }> = ({ isDraggable }) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'center',\n mb: 1,\n // The handle is decoration on a draggable header: the drag listeners sit\n // on the header itself, so letting the bar swallow the press would open\n // a dead zone in the middle of the grab target.\n pointerEvents: isDraggable ? 'none' : 'auto',\n }}\n >\n <Box sx={handleSx(theme, isDraggable)} />\n </Box>\n );\n};\n\nconst HEADER_DEFAULTS: Partial<SheetHeaderProps> = {\n isDraggable: false,\n dataTestId: 'sheet-header',\n};\n\nexport const SheetHeader: React.FC<SheetHeaderProps> = (props) => {\n const {\n title,\n description,\n showCloseButton,\n onClose,\n showHandle,\n isDraggable,\n onDragStart,\n className,\n style,\n children,\n dataTestId,\n } = withDefaults(props, HEADER_DEFAULTS);\n\n return (\n <Box\n className={className}\n data-testid={dataTestId}\n sx={{\n p: 2,\n pb: showHandle ? 1 : 2,\n cursor: isDraggable ? 'grab' : 'auto',\n '&:active': isDraggable ? { cursor: 'grabbing' } : {},\n ...style,\n }}\n onMouseDown={isDraggable ? onDragStart : undefined}\n onTouchStart={isDraggable ? onDragStart : undefined}\n >\n {showHandle && <SheetHandle isDraggable={Boolean(isDraggable)} />}\n\n <Box sx={{ display: 'flex', alignItems: 'flex-start', justifyContent: 'space-between' }}>\n <Box sx={{ flex: 1 }}>\n {title && (\n <Typography variant=\"h6\" sx={{ fontWeight: 600 }} data-testid={`${dataTestId}-title`}>\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ mt: 0.5 }}>\n {description}\n </Typography>\n )}\n {children}\n </Box>\n\n {showCloseButton && (\n <IconButton\n onClick={onClose}\n size=\"small\"\n sx={{ ml: 1, mt: -0.5 }}\n data-testid={`${dataTestId}-close-button`}\n >\n <CloseIcon data-testid={`${dataTestId}-close-icon`} />\n </IconButton>\n )}\n </Box>\n </Box>\n );\n};\n\nconst CONTENT_DEFAULTS: Partial<SheetContentProps> = {\n padded: true,\n dataTestId: 'sheet-content',\n};\n\nexport const SheetContent: React.FC<SheetContentProps> = (props) => {\n const { children, className, style, padded, dataTestId } = withDefaults(props, CONTENT_DEFAULTS);\n\n return (\n <Box\n className={className}\n data-testid={dataTestId}\n sx={{ flex: 1, overflow: 'auto', p: padded ? 2 : 0, ...style }}\n >\n {children}\n </Box>\n );\n};\n\nconst FOOTER_DEFAULTS: Partial<SheetFooterProps> = {\n sticky: false,\n divider: false,\n dataTestId: 'sheet-footer',\n};\n\nexport const SheetFooter: React.FC<SheetFooterProps> = (props) => {\n const { children, className, style, sticky, divider, dataTestId } = withDefaults(\n props,\n FOOTER_DEFAULTS,\n );\n\n return (\n <>\n {divider && <Divider />}\n <Box\n className={className}\n data-testid={dataTestId}\n sx={{\n p: 2,\n position: sticky ? 'sticky' : 'relative',\n bottom: sticky ? 0 : 'auto',\n backgroundColor: 'background.paper',\n borderTop: sticky ? '1px solid' : 'none',\n borderColor: 'divider',\n ...style,\n }}\n >\n {children}\n </Box>\n </>\n );\n};\n\nconst OVERLAY_DEFAULTS: Partial<SheetOverlayProps> = {\n open: false,\n blur: false,\n};\n\nexport const SheetOverlay: React.FC<SheetOverlayProps> = (props) => {\n const { open, onClick, className, style, blur } = withDefaults(props, OVERLAY_DEFAULTS);\n const theme = useTheme();\n\n return (\n <Fade in={open} timeout={300}>\n <Backdrop\n open={Boolean(open)}\n onClick={onClick}\n className={className}\n sx={{\n // One below the drawer: this backdrop replaces MUI's own (the drawer\n // is given a no-op BackdropComponent) and must sit under the panel.\n zIndex: theme.zIndex.drawer - 1,\n backgroundColor: alpha(theme.palette.common.black, blur ? 0.6 : 0.5),\n backdropFilter: blur ? 'blur(8px) saturate(180%)' : 'none',\n WebkitBackdropFilter: blur ? 'blur(8px) saturate(180%)' : 'none',\n ...style,\n }}\n />\n </Fade>\n );\n};\n"],"mappings":";;;;;;;;AAAA,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,SAAS;AAChB,OAAO,aAAa;AACpB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AACvB,OAAO,gBAAgB;AACvB,SAAS,OAAO,gBAAgB;AAuE1B,SAuGF,UAvGE,KA0CE,YA1CF;AApDN,IAAM,WAAW,CAAC,OAAc,iBAA0B;AAAA,EACxD,OAAO,cAAc,KAAK;AAAA,EAC1B,QAAQ,cAAc,IAAI;AAAA,EAC1B,iBAAiB,MAAM,MAAM,QAAQ,KAAK,SAAS,GAAG;AAAA,EACtD,cAAc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