@12-apps/ui 6.24.4 → 6.24.6
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/dist/_internal/components/data-display/CardKit/row-actions-to-menu.js +1 -1
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +5 -5
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +2 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +2 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.parts.js +1 -1
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +1 -1
- package/dist/_internal/components/data-display/index.js +4 -4
- package/dist/_internal/components/index.js +6 -6
- package/dist/_internal/components/layout/ContentToolbar/ContentToolbar.js +1 -1
- package/dist/_internal/components/layout/index.js +1 -1
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +5 -5
- package/dist/_internal/components/navigation/index.js +5 -5
- package/dist/{chunk-OTH7H3IP.js → chunk-4J5EN4FQ.js} +4 -4
- package/dist/{chunk-JD4IVP22.js → chunk-4ZV7N5CU.js} +2 -2
- package/dist/{chunk-QX2PLXQA.js → chunk-53PDVLRK.js} +2 -2
- package/dist/{chunk-6JZE4IIN.js → chunk-7MR2JCJW.js} +36 -13
- package/dist/chunk-7MR2JCJW.js.map +1 -0
- package/dist/{chunk-GVA5CYKP.js → chunk-BUQ2JUND.js} +2 -2
- package/dist/{chunk-7GKRZJWI.js → chunk-EMMPNB6D.js} +2 -2
- package/dist/{chunk-M2K7BPHX.js → chunk-JBMBFYFA.js} +8 -3
- package/dist/chunk-JBMBFYFA.js.map +1 -0
- package/dist/{chunk-TSPHRZ4U.js → chunk-L2E7TY7P.js} +76 -36
- package/dist/chunk-L2E7TY7P.js.map +1 -0
- package/dist/{chunk-NXNNICH7.js → chunk-LWRMKF7D.js} +2 -2
- package/dist/{chunk-POUWN4PX.js → chunk-U437KFDI.js} +1 -1
- package/dist/chunk-U437KFDI.js.map +1 -0
- package/dist/{chunk-5MXVT7DO.js → chunk-ZBXG6RVJ.js} +2 -2
- package/dist/chunk-ZBXG6RVJ.js.map +1 -0
- package/dist/{chunk-JPV45AD6.js → chunk-ZXOT3U6U.js} +2 -2
- package/dist/data-display/CardKit.js +1 -1
- package/dist/data-display/DataViews.js +6 -6
- package/dist/data-display/Sheet.js +4 -4
- package/dist/layout/ContentToolbar.js +1 -1
- package/dist/navigation/AppHeader.js +5 -5
- package/dist/types/components/data-display/CardKit/row-actions-to-menu.d.ts +18 -2
- package/dist/types/components/data-display/CardKit/row-actions-to-menu.d.ts.map +1 -1
- package/dist/types/components/data-display/Sheet/Sheet.body.d.ts.map +1 -1
- package/dist/types/components/data-display/Sheet/Sheet.parts.d.ts.map +1 -1
- package/dist/types/components/data-display/Sheet/Sheet.styles.d.ts.map +1 -1
- package/dist/types/components/layout/ContentToolbar/ContentToolbar.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/CardKit/row-actions-to-menu.ts +19 -2
- package/src/components/data-display/DataViews/RESPONSIVE-BEHAVIOUR.md +43 -0
- package/src/components/data-display/Sheet/Sheet.body.tsx +6 -1
- package/src/components/data-display/Sheet/Sheet.md +4 -2
- package/src/components/data-display/Sheet/Sheet.parts.tsx +4 -0
- package/src/components/data-display/Sheet/Sheet.styles.ts +77 -17
- package/src/components/layout/ContentToolbar/ContentToolbar.tsx +82 -26
- package/dist/chunk-5MXVT7DO.js.map +0 -1
- package/dist/chunk-6JZE4IIN.js.map +0 -1
- package/dist/chunk-M2K7BPHX.js.map +0 -1
- package/dist/chunk-POUWN4PX.js.map +0 -1
- package/dist/chunk-TSPHRZ4U.js.map +0 -1
- /package/dist/{chunk-OTH7H3IP.js.map → chunk-4J5EN4FQ.js.map} +0 -0
- /package/dist/{chunk-JD4IVP22.js.map → chunk-4ZV7N5CU.js.map} +0 -0
- /package/dist/{chunk-QX2PLXQA.js.map → chunk-53PDVLRK.js.map} +0 -0
- /package/dist/{chunk-GVA5CYKP.js.map → chunk-BUQ2JUND.js.map} +0 -0
- /package/dist/{chunk-7GKRZJWI.js.map → chunk-EMMPNB6D.js.map} +0 -0
- /package/dist/{chunk-NXNNICH7.js.map → chunk-LWRMKF7D.js.map} +0 -0
- /package/dist/{chunk-JPV45AD6.js.map → chunk-ZXOT3U6U.js.map} +0 -0
|
@@ -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.
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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 &&
|
|
58
|
-
return { height: currentHeight };
|
|
100
|
+
if (isDraggableVariant && currentHeight !== null) {
|
|
101
|
+
return { ...cross, height: currentHeight };
|
|
59
102
|
}
|
|
60
103
|
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
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.
|
|
@@ -60,11 +60,24 @@ function SelectionCluster({
|
|
|
60
60
|
sx={{
|
|
61
61
|
display: 'flex',
|
|
62
62
|
minWidth: 0,
|
|
63
|
-
//
|
|
64
|
-
// (no orphaned selection row). Desktop: grow to push
|
|
65
|
-
|
|
63
|
+
// Browsing (mobile): don't grow, so the controls sit on the SAME line as
|
|
64
|
+
// the checkbox (no orphaned selection row). Desktop: grow to push
|
|
65
|
+
// controls right.
|
|
66
|
+
//
|
|
67
|
+
// SELECTING (mobile) it must be able to shrink instead. Its children are
|
|
68
|
+
// all `flex-shrink: 0`, so a cluster pinned at content width cannot wrap
|
|
69
|
+
// and the row painted past the toolbar's own edge — on Produtos at 390px
|
|
70
|
+
// that took "Ações" off-screen behind a sideways scroll, which is the
|
|
71
|
+
// one control the selection exists to reach.
|
|
72
|
+
flex: { xs: hasSelection ? '1 1 auto' : '0 0 auto', md: 1 },
|
|
66
73
|
alignItems: 'center',
|
|
67
|
-
|
|
74
|
+
// Wrapping is the phone's answer, and only the phone's: below `md` the
|
|
75
|
+
// cluster carries the count, the scope control and "Ações" at once, and
|
|
76
|
+
// no combination of those fits 320px on one line. From `md` up it stays
|
|
77
|
+
// a single line, where it always fitted.
|
|
78
|
+
flexWrap: { xs: 'wrap', md: 'nowrap' },
|
|
79
|
+
columnGap: 1.5,
|
|
80
|
+
rowGap: 1,
|
|
68
81
|
ml: edgeAlign ? -1.5 : 0,
|
|
69
82
|
}}
|
|
70
83
|
>
|
|
@@ -89,32 +102,75 @@ function SelectionCluster({
|
|
|
89
102
|
sx={{ p: 0.5, display: { xs: 'inline-flex', md: 'none' } }}
|
|
90
103
|
/>
|
|
91
104
|
{hasSelection ? (
|
|
105
|
+
<SelectionState
|
|
106
|
+
selectedCount={selectedCount}
|
|
107
|
+
clearSelection={clearSelection}
|
|
108
|
+
clearAllTestId={clearAllTestId}
|
|
109
|
+
clearAllText={clearAllText}
|
|
110
|
+
selectionExtra={selectionExtra}
|
|
111
|
+
/>
|
|
112
|
+
) : null}
|
|
113
|
+
{actionsSlot}
|
|
114
|
+
</Box>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* What the cluster shows once something IS ticked: Clear All, the count, and
|
|
120
|
+
* the host's own `selectionExtra`.
|
|
121
|
+
*
|
|
122
|
+
* Its own component only because the cluster around it is at the complexity
|
|
123
|
+
* gate's line ceiling — but the split falls where the meaning does. Everything
|
|
124
|
+
* here exists only while a selection does, and the `actions` slot deliberately
|
|
125
|
+
* stays OUTSIDE it: a toolbar may carry actions while browsing too.
|
|
126
|
+
*/
|
|
127
|
+
function SelectionState({
|
|
128
|
+
selectedCount,
|
|
129
|
+
clearSelection,
|
|
130
|
+
clearAllTestId,
|
|
131
|
+
clearAllText,
|
|
132
|
+
selectionExtra,
|
|
133
|
+
}: Pick<
|
|
134
|
+
ContentToolbarProps,
|
|
135
|
+
'selectedCount' | 'clearSelection' | 'clearAllTestId' | 'clearAllText' | 'selectionExtra'
|
|
136
|
+
>): React.JSX.Element {
|
|
137
|
+
return (
|
|
138
|
+
<>
|
|
139
|
+
<Button
|
|
140
|
+
variant="text"
|
|
141
|
+
size="small"
|
|
142
|
+
color="inherit"
|
|
143
|
+
onClick={clearSelection}
|
|
144
|
+
data-testid={clearAllTestId}
|
|
145
|
+
sx={selectionButtonSx}
|
|
146
|
+
>
|
|
147
|
+
{clearAllText}
|
|
148
|
+
</Button>
|
|
149
|
+
<Divider orientation="vertical" flexItem sx={{ height: 16, alignSelf: 'center' }} />
|
|
150
|
+
<Typography
|
|
151
|
+
component="span"
|
|
152
|
+
data-testid="selected-count-indicator"
|
|
153
|
+
sx={{ fontSize: '0.875rem', color: 'text.secondary', whiteSpace: 'nowrap', flexShrink: 0 }}
|
|
154
|
+
>
|
|
155
|
+
{selectedCount} {selectedCount === 1 ? 'item' : 'items'} selected
|
|
156
|
+
</Typography>
|
|
157
|
+
{selectionExtra !== undefined && (
|
|
92
158
|
<>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<Typography
|
|
105
|
-
component="span"
|
|
106
|
-
data-testid="selected-count-indicator"
|
|
107
|
-
sx={{ fontSize: '0.875rem', color: 'text.secondary', whiteSpace: 'nowrap', flexShrink: 0 }}
|
|
108
|
-
>
|
|
109
|
-
{selectedCount} {selectedCount === 1 ? 'item' : 'items'} selected
|
|
110
|
-
</Typography>
|
|
159
|
+
{/* A DELIBERATE break, not a wrap that happened to land here. What
|
|
160
|
+
follows — "Seleção: 48 produtos — todas as páginas", its "Limpar
|
|
161
|
+
seleção", and "Ações" — is a sentence about the selection plus the
|
|
162
|
+
control that acts on it, and letting the phone break it wherever it
|
|
163
|
+
ran out of room split that sentence mid-phrase. Zero height so it
|
|
164
|
+
costs nothing but the row gap, and `display:none` from `md` up,
|
|
165
|
+
where the line still fits. */}
|
|
166
|
+
<Box
|
|
167
|
+
aria-hidden
|
|
168
|
+
sx={{ flexBasis: '100%', height: 0, display: { xs: 'block', md: 'none' } }}
|
|
169
|
+
/>
|
|
111
170
|
{selectionExtra}
|
|
112
|
-
{actionsSlot}
|
|
113
171
|
</>
|
|
114
|
-
) : (
|
|
115
|
-
actionsSlot
|
|
116
172
|
)}
|
|
117
|
-
|
|
173
|
+
</>
|
|
118
174
|
);
|
|
119
175
|
}
|
|
120
176
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/CardKit/row-actions-to-menu.ts"],"sourcesContent":["import type { DropdownMenuItem } from '../../navigation/DropdownMenu';\nimport type { RowAction } from '../DataViews';\n\n/**\n * Adapt a list of {@link RowAction}s into single-row kebab items.\n *\n * Applies each action's `isVisible` guard, resolves its per-row `rowLabel`\n * override, carries its colour, and fires `onSelect([row])` on click.\n *\n * The point is that ONE definition drives both surfaces. An entity that already\n * declares its per-row actions as `RowAction[]` — because the table's multi-\n * select menu needs them — gets the card's kebab from the same array through\n * `renderRowMenu` / `renderCard`, with no second list to keep in step. Two\n * lists is how a \"Duplicar\" that appears in the table and not on the card\n * happens, and nothing reports it.\n */\nexport function rowActionsToMenuItems<T extends Record<string, unknown>>(\n actions: RowAction<T>[],\n row: T,\n): DropdownMenuItem[] {\n return actions\n .filter((action) => action.isVisible?.(row) ?? true)\n .map((action) => ({\n id: action.id,\n label: action.rowLabel?.(row) ?? action.label,\n color: action.color,\n onClick: () => void action.onSelect([row]),\n }));\n}\n"],"mappings":";AAgBO,SAAS,sBACd,SACA,KACoB;AACpB,SAAO,QACJ,OAAO,CAAC,WAAW,OAAO,YAAY,GAAG,KAAK,IAAI,EAClD,IAAI,CAAC,YAAY;AAAA,IAChB,IAAI,OAAO;AAAA,IACX,OAAO,OAAO,WAAW,GAAG,KAAK,OAAO;AAAA,IACxC,OAAO,OAAO;AAAA,IACd,SAAS,MAAM,KAAK,OAAO,SAAS,CAAC,GAAG,CAAC;AAAA,EAC3C,EAAE;AACN;","names":[]}
|
|
@@ -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,uBAAuB,CAAC,aAAuB,aAAa,UAAU,aAAa;AAQzF,IAAM,mBAAyC;AAAA,EAC7C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AACR;AAEA,IAAM,iBAAgD;AAAA,EACpD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AACR;AAUA,IAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAsB;AAGpB,MAAI,sBAAsB,mBAAmB,kBAAkB,MAAM;AACnE,WAAO,EAAE,QAAQ,cAAc;AAAA,EACjC;AAEA,SAAO,qBAAqB,QAAQ,IAChC,EAAE,OAAO,iBAAiB,IAAI,KAAK,iBAAiB,GAAG,IACvD,EAAE,QAAQ,eAAe,IAAI,KAAK,eAAe,GAAG;AAC1D;AAGA,I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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/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;AAAA,EACd,YAAY,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sB,OAAO,6BAA6B;AAAA,QAC1D,GAAG;AAAA,MACL;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/ContentToolbar/ContentToolbar.tsx"],"sourcesContent":["'use client';\n\nimport Box from '@mui/material/Box/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport Checkbox from '@mui/material/Checkbox/index.js';\nimport Divider from '@mui/material/Divider/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport React from 'react';\n\nimport type { ContentToolbarProps } from './ContentToolbar.types';\n\nconst selectionButtonSx = {\n minWidth: 0,\n height: 'auto',\n borderRadius: 0.5,\n fontWeight: 600,\n py: 0.5,\n px: 1.5,\n fontSize: '0.75rem',\n textTransform: 'none',\n color: 'text.primary',\n} as const;\n\ntype SelectionClusterProps = Pick<\n ContentToolbarProps,\n | 'hasSelection'\n | 'selectedCount'\n | 'selectAll'\n | 'clearSelection'\n | 'actions'\n | 'selectionExtra'\n | 'selectAllTestId'\n | 'clearAllTestId'\n | 'edgeAlign'\n | 'selectAllLabel'\n | 'selectAllText'\n | 'clearAllText'\n>;\n\n/** The left cluster: Select All + (when selecting) Clear All / count / actions. */\nfunction SelectionCluster({\n hasSelection,\n selectedCount,\n selectAll,\n clearSelection,\n actions,\n selectionExtra,\n selectAllTestId,\n clearAllTestId,\n edgeAlign = false,\n selectAllLabel,\n selectAllText,\n clearAllText,\n}: SelectionClusterProps): React.JSX.Element {\n const actionsSlot = actions !== undefined && (\n <Box sx={{ ml: 0.5, display: 'flex', flexShrink: 0, alignItems: 'center' }}>{actions}</Box>\n );\n return (\n <Box\n sx={{\n display: 'flex',\n minWidth: 0,\n // Mobile: don't grow, so the controls sit on the SAME line as the checkbox\n // (no orphaned selection row). Desktop: grow to push controls right.\n flex: { xs: '0 0 auto', md: 1 },\n alignItems: 'center',\n gap: 1.5,\n ml: edgeAlign ? -1.5 : 0,\n }}\n >\n {/* Desktop: a \"Select All\" text button (md+). Mobile: a compact checkbox\n that toggles select-all/clear — the text would eat the tight row. */}\n <Button\n variant=\"text\"\n size=\"small\"\n color=\"inherit\"\n onClick={selectAll}\n data-testid={selectAllTestId}\n sx={{ ...selectionButtonSx, display: { xs: 'none', md: 'inline-flex' } }}\n >\n {selectAllText}\n </Button>\n <Checkbox\n size=\"small\"\n checked={hasSelection}\n onChange={(event) => (event.target.checked ? selectAll() : clearSelection())}\n data-testid={`${selectAllTestId}-checkbox`}\n inputProps={{ 'aria-label': selectAllLabel }}\n sx={{ p: 0.5, display: { xs: 'inline-flex', md: 'none' } }}\n />\n {hasSelection ? (\n <>\n <Button\n variant=\"text\"\n size=\"small\"\n color=\"inherit\"\n onClick={clearSelection}\n data-testid={clearAllTestId}\n sx={selectionButtonSx}\n >\n {clearAllText}\n </Button>\n <Divider orientation=\"vertical\" flexItem sx={{ height: 16, alignSelf: 'center' }} />\n <Typography\n component=\"span\"\n data-testid=\"selected-count-indicator\"\n sx={{ fontSize: '0.875rem', color: 'text.secondary', whiteSpace: 'nowrap', flexShrink: 0 }}\n >\n {selectedCount} {selectedCount === 1 ? 'item' : 'items'} selected\n </Typography>\n {selectionExtra}\n {actionsSlot}\n </>\n ) : (\n actionsSlot\n )}\n </Box>\n );\n}\n\n/**\n * The BROWSING half of the toolbar: search + filters on the left, the page's\n * own controls on the right. Split out of {@link ContentToolbar} so that\n * function stays inside the complexity gate — it is layout only, and the\n * decision of whether to show it at all is made by the caller.\n */\nfunction BrowsingClusters({\n leadingControls,\n rightControls,\n hasSelection,\n edgeAlign,\n}: {\n leadingControls?: React.ReactNode;\n rightControls: React.ReactNode;\n hasSelection: boolean;\n edgeAlign: boolean;\n}): React.JSX.Element {\n return (\n <>\n {/* minWidth:0 lets this cluster be the one that gives up width as the row\n * tightens, which is what the filter overflow measures against. */}\n {leadingControls !== undefined && (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n flexGrow: 1,\n minWidth: 0,\n // The collapse ladder has a FLOOR — below roughly 400px even the\n // fully-collapsed row does not fit, and its controls cannot shrink\n // (they are flexShrink:0 so an over-packed row sheds instead of\n // squeezing). Past that point this scrolls rather than letting them\n // paint outside the toolbar, which is what a narrow phone did.\n overflowX: 'auto',\n // No scrollbar gutter stealing height on the common case.\n scrollbarWidth: 'thin',\n }}\n >\n {leadingControls}\n </Box>\n )}\n {/* ml:auto keeps the controls right-aligned even when the cluster wraps to\n * its own row (where justify-content:space-between would otherwise snap a\n * lone item to the left); it's a no-op on a shared row. */}\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n // Same single-line rule as the row itself: this cluster wrapping\n // INTERNALLY buys a second line just as surely as the row wrapping\n // does. It bit at exactly 900px, the `md` breakpoint where the \"N de\n // N\" counter appears and pushes Exibir/Exportar over the edge.\n flexWrap: leadingControls === undefined ? 'wrap' : 'nowrap',\n // Tight (5px) when browsing so the controls fit one line beside the\n // checkbox; roomier (14px) in selection mode where they get their own row.\n gap: hasSelection ? '14px' : '5px',\n ml: 'auto',\n mr: edgeAlign ? -1.5 : 0,\n '& > *': { flexShrink: 0 },\n }}\n >\n {rightControls}\n </Box>\n </>\n );\n}\n\n/**\n * Shared toolbar for content pages (Favorites, Personal Space, Recents, …). The\n * left cluster owns selection chrome — **Select All**, and once items are\n * selected, **Clear All** + an \"N items selected\" count + an optional `actions`\n * slot. The right cluster is a free `rightControls` slot for page-specific\n * controls (ViewSelector, SortByDropdown, MultiSelectDropdown, FilterTrigger).\n *\n * Faithful, generic MUI port of the reference `ContentPageToolbar` — the\n * domain-specific default actions are intentionally left to the consumer via\n * the `actions` slot so this stays agnostic and reusable across projects.\n *\n * @example\n * ```tsx\n * <ContentToolbar\n * hasSelection={selected.size > 0}\n * selectedCount={selected.size}\n * selectAll={selectAll}\n * clearSelection={clear}\n * rightControls={\n * <>\n * <ViewSelector viewMode={view} onViewModeChange={setView} zoom={zoom} onZoomChange={setZoom} />\n * <SortByDropdown fields={FIELDS} activeField={field} onFieldChange={setField} />\n * <MultiSelectDropdown label=\"Content Type\" options={types} selected={typeSet} onToggle={toggle} onClear={clear} />\n * <FilterTrigger open={panelOpen} onOpenChange={setPanelOpen} hasActiveFilters={hasFilters} />\n * </>\n * }\n * />\n * ```\n */\nexport function ContentToolbar({\n hasSelection,\n selectedCount,\n selectAll,\n clearSelection,\n rightControls,\n leadingControls,\n actions,\n selectionExtra,\n selectAllTestId,\n clearAllTestId,\n edgeAlign = false,\n exclusiveSelection = false,\n selectAllLabel,\n selectAllText,\n clearAllText,\n}: ContentToolbarProps): React.JSX.Element {\n // Under `exclusiveSelection` the two states are alternatives, not neighbours:\n // browsing shows the controls and no checkbox, selecting shows the checkbox\n // and no controls. Anything else double-books the row.\n const showSelection = !exclusiveSelection || hasSelection;\n const showControls = !exclusiveSelection || !hasSelection;\n return (\n // Two clusters on one line. They may wrap onto separate rows ONLY for a\n // toolbar without `leadingControls` — one carrying search + filters is\n // driven by a measured collapse ladder (see `useFilterOverflow`), and a\n // wrap there is the ladder having failed: it would silently buy a second\n // row instead of shedding a control into \"Mais\", which is the one outcome\n // the ladder exists to prevent.\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 2,\n flexWrap: leadingControls === undefined ? 'wrap' : 'nowrap',\n rowGap: 1,\n }}\n >\n {showSelection && (\n <SelectionCluster\n selectAllText={selectAllText}\n clearAllText={clearAllText}\n hasSelection={hasSelection}\n selectedCount={selectedCount}\n selectAll={selectAll}\n clearSelection={clearSelection}\n actions={actions}\n selectionExtra={selectionExtra}\n selectAllTestId={selectAllTestId}\n clearAllTestId={clearAllTestId}\n selectAllLabel={selectAllLabel}\n edgeAlign={edgeAlign}\n />\n )}\n\n {showControls && (\n <BrowsingClusters\n leadingControls={leadingControls}\n rightControls={rightControls}\n hasSelection={hasSelection}\n edgeAlign={edgeAlign}\n />\n )}\n </Box>\n );\n}\n"],"mappings":";AAEA,OAAO,SAAS;AAChB,OAAO,YAAY;AACnB,OAAO,cAAc;AACr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,SAAS,EAAE,YAAY,EAAE;AAAA,QAC3B;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AA+BO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AACF,GAA2C;AAIzC,QAAM,gBAAgB,CAAC,sBAAsB;AAC7C,QAAM,eAAe,CAAC,sBAAsB,CAAC;AAC7C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOE;AAAA,MAAC;AAAA;AAAA,QACC,IAAI;AAAA,UACF,SAAS;AAAA,UACT,YAAY;AAAA,UACZ,gBAAgB;AAAA,UAChB,KAAK;AAAA,UACL,UAAU,oBAAoB,SAAY,SAAS;AAAA,UACnD,QAAQ;AAAA,QACV;AAAA,QAEC;AAAA,2BACC;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF;AAAA,UAGD,gBACC;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA;AAEJ;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|