@12-apps/ui 6.39.12 → 6.39.14

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 (64) hide show
  1. package/NATIVE.md +1 -1
  2. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +7 -7
  3. package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
  4. package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +3 -3
  5. package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +3 -3
  6. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +5 -5
  7. package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
  8. package/dist/_internal/components/feedback/Dialog/Dialog.slots.js +10 -0
  9. package/dist/_internal/components/feedback/index.js +2 -2
  10. package/dist/_internal/components/index.js +5 -5
  11. package/dist/_internal/components/layout/Separator/Separator.js +2 -2
  12. package/dist/_internal/components/layout/Separator/Separator.styles.js +1 -1
  13. package/dist/_internal/components/layout/index.js +2 -2
  14. package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +3 -3
  15. package/dist/_internal/components/navigation/index.js +3 -3
  16. package/dist/_internal/social-login-button/social-login-button.js +3 -3
  17. package/dist/{chunk-SYNB3IIB.js → chunk-35443PF6.js} +8 -5
  18. package/dist/chunk-35443PF6.js.map +1 -0
  19. package/dist/chunk-5HW37NSW.js +34 -0
  20. package/dist/chunk-5HW37NSW.js.map +1 -0
  21. package/dist/{chunk-INMKA5SF.js → chunk-ARDLCGBK.js} +3 -3
  22. package/dist/{chunk-UEROWH53.js → chunk-GAMLBJE6.js} +58 -39
  23. package/dist/chunk-GAMLBJE6.js.map +1 -0
  24. package/dist/{chunk-3333KCAW.js → chunk-P22W4N5K.js} +2 -2
  25. package/dist/{chunk-IYF246UA.js → chunk-SA65SDOY.js} +2 -2
  26. package/dist/{chunk-5KWHINO5.js → chunk-SLDSWQVE.js} +2 -2
  27. package/dist/{chunk-ZNDDILNQ.js → chunk-UBEAJFMW.js} +3 -3
  28. package/dist/{chunk-DXZOSP6P.js → chunk-WVJGNIJZ.js} +2 -2
  29. package/dist/{chunk-ECIHOZPK.js → chunk-WWGD5YVW.js} +2 -2
  30. package/dist/{chunk-XSSCSRUX.js → chunk-X53F33KA.js} +4 -2
  31. package/dist/chunk-X53F33KA.js.map +1 -0
  32. package/dist/data-display/DataViews.js +7 -7
  33. package/dist/feedback/Dialog.js +2 -2
  34. package/dist/layout/Separator.js +2 -2
  35. package/dist/navigation/AppHeader.js +3 -3
  36. package/dist/social-login-button.js +3 -3
  37. package/dist/types/components/feedback/Dialog/Dialog.d.ts.map +1 -1
  38. package/dist/types/components/feedback/Dialog/Dialog.slots.d.ts +43 -0
  39. package/dist/types/components/feedback/Dialog/Dialog.slots.d.ts.map +1 -0
  40. package/dist/types/components/layout/Separator/Separator.d.ts.map +1 -1
  41. package/dist/types/components/layout/Separator/Separator.styles.d.ts +12 -4
  42. package/dist/types/components/layout/Separator/Separator.styles.d.ts.map +1 -1
  43. package/package.json +1 -1
  44. package/src/components/feedback/Dialog/Dialog.slots.ts +100 -0
  45. package/src/components/feedback/Dialog/Dialog.tsx +86 -34
  46. package/src/components/layout/Separator/Separator.styles.ts +26 -8
  47. package/src/components/layout/Separator/Separator.tsx +6 -0
  48. package/dist/_internal/components/feedback/Dialog/Dialog.paper.js +0 -8
  49. package/dist/chunk-SYNB3IIB.js.map +0 -1
  50. package/dist/chunk-UEROWH53.js.map +0 -1
  51. package/dist/chunk-XSSCSRUX.js.map +0 -1
  52. package/dist/chunk-Y4O4DITI.js +0 -25
  53. package/dist/chunk-Y4O4DITI.js.map +0 -1
  54. package/dist/types/components/feedback/Dialog/Dialog.paper.d.ts +0 -31
  55. package/dist/types/components/feedback/Dialog/Dialog.paper.d.ts.map +0 -1
  56. package/src/components/feedback/Dialog/Dialog.paper.ts +0 -64
  57. /package/dist/_internal/components/feedback/Dialog/{Dialog.paper.js.map → Dialog.slots.js.map} +0 -0
  58. /package/dist/{chunk-INMKA5SF.js.map → chunk-ARDLCGBK.js.map} +0 -0
  59. /package/dist/{chunk-3333KCAW.js.map → chunk-P22W4N5K.js.map} +0 -0
  60. /package/dist/{chunk-IYF246UA.js.map → chunk-SA65SDOY.js.map} +0 -0
  61. /package/dist/{chunk-5KWHINO5.js.map → chunk-SLDSWQVE.js.map} +0 -0
  62. /package/dist/{chunk-ZNDDILNQ.js.map → chunk-UBEAJFMW.js.map} +0 -0
  63. /package/dist/{chunk-DXZOSP6P.js.map → chunk-WVJGNIJZ.js.map} +0 -0
  64. /package/dist/{chunk-ECIHOZPK.js.map → chunk-WWGD5YVW.js.map} +0 -0
package/NATIVE.md CHANGED
@@ -93,7 +93,7 @@ Ported: **27 of 142** public subpaths carry a `react-native` condition.
93
93
  | `@12-apps/ui/data-display/FleetMap` | 23 | 2 | There is no MAP. `MapPreview` — which projects, tiles and decorates its own surface across ~2,200 lines — has no React Native build, so the native board renders the roster alone and its copy interface has neither `map` nor `mapLabel`: a caller should not be asked to name controls nothing draws. What that costs is smaller than the missing half suggests, because the web already treats this list as the component's real content rather than a sidebar — every fact a pin carries (who, how recently, how precisely, what they are carrying) is on a row, in an order the map cannot express. It is where the map goes when `MapPreview` is ported.; Every row is ALSO a tab stop. The list itself carries `tabIndex={0}` and `aria-activedescendant` exactly as the web's listbox does, so the arrow keys work and the selection is announced — but react-native-web additionally gives each `Pressable` its own `tabindex`, which the web half's `Box` rows never had. Measured on the rendered DOM: a fleet of thirty is thirty-one tab stops here against the web's one. Removing them would mean making the rows non-focusable, which would take the press target away on the renderer that has no touch.; The arrow keys are web-only. `onKeyDown` reaches the list through react-native-web's DOM events, so a browser still walks the roster with Up and Down, wrapping at both ends, declining a modified arrow and leaving the page to scroll when nothing can move. React Native delivers no key events to a `View`, so on a DEVICE none of it runs and the selection is made by touch.; `aria-selected` is passed as the attribute AND as `accessibilityState.selected`, because react-native-web derives neither from the other: without the attribute the web build announced no selection at all and conveyed it by background colour alone, which is the one thing this component refuses to do for freshness.; Hover has no touch equivalent, so the pressed wash stands in for it — and, as on the web, it must never WEAKEN the selection: a selected row keeps `action.selected` whether or not a finger is on it, rather than taking the lighter `action.hover`.; Keeping the selected row in view is the web's own arithmetic against different numbers. The web reads `offsetTop`/`scrollTop`/`clientHeight`; native gathers the same three from a row's `onLayout`, the `ScrollView`'s `onLayout` and its `onScroll`. So it needs one layout pass before it can act: a board mounted with a selection already set scrolls on the next commit rather than the first, where the web scrolls immediately.; The reload announcement is `accessibilityLiveRegion="polite"` plus `aria-live="polite"`. The first is Android's and the second is react-native-web's; iOS has no live region at all, and announcing there needs `AccessibilityInfo.announceForAccessibility`, which this component does not call — a host that must be heard on iOS makes that call itself.; A long unbroken label overflows rather than breaking mid-token: the web sets `overflowWrap: 'anywhere'` and React Native has no equivalent style, so a 40-character name with no spaces is clipped by the row instead of wrapped inside it.; `maxHeight` is a NUMBER of pixels where the web's `height` is any CSS length: React Native has no `calc`, no viewport units, and no percentage that resolves against a parent which has not sized itself.; The title, the row label and the meta line are set in MUI's default `body1`/`body2`/`caption` numbers; a host that re-themes MUI's typography variants moves the web only. |
94
94
  | `@12-apps/ui/data-display/LoadingState` | 11 | 1 | The spinner is the platform's `ActivityIndicator`, not MUI's 3.6-unit arc: same diameter and primary colour, the platform's own stroke; on iOS the two built-in sizes stand in for the five (`md` and up draw `large`).; The skeleton rows are the static tint (`alpha(text.primary, 0.13)`); MUI's `wave` sweep is a gradient pseudo-element React Native cannot draw.; The message is set in MUI's default `body2`/`body1`/`h6` numbers; a host that re-themes MUI's typography variants moves the web only. |
95
95
  | `@12-apps/ui/data-display/Progress` | 27 | 2 | `gradient` paints its first stop (`main`) flat: React Native core has no gradient fill, so the 90° run to `dark` is lost. `glass` keeps the 80% wash and the 30% hairline but not the 10px backdrop blur, which React Native has no equivalent of.; `glow` draws the web's `0 0 10px 2px alpha(main, 0.4)` shadow (and `0 0 6px 1px` on a filled segment) but not the `filter: brightness(1.1)` that goes with it, nor the circular variant's `drop-shadow` — the dial takes a box shadow round its square instead.; The indeterminate linear bar is ONE band a third of the track wide crossing every 2.1s; MUI runs two bars on two keyframe tracks. The indeterminate dial spins a quarter-circle arc once every 1.4s rather than growing and shrinking it.; The determinate bar is a clamped WIDTH; MUI translates a full-width bar by `value - 100`%. The two agree between 0 and 100 — outside it the web slides the bar off the track and native stops at the ends.; MUI's `transition: all 0.3s ease` on the bar and on every segment has no equivalent: a value change is drawn immediately.; The label is set in MUI's default `caption` ratios at the size's own step; a host that re-themes MUI's typography variants moves the web only. |
96
- | `@12-apps/ui/feedback/Dialog` | 26 | 3 | `glass` paints its 0.1 paper wash and primary hairline without the 20px backdrop blur, and the scrim behind it is a flat `alpha(black, 0.2)` without its 8px blur — React Native has no backdrop filter.; `gradient` adds nothing on native: it is a `linear-gradient` background IMAGE layered over the paper colour, and React Native core has neither a gradient fill nor a second background layer.; `role="dialog"` sits on React Native's `Modal`, which is the dialog on this side; the web puts it on MUI's paper. react-native-web gives that role to the TOP-MOST modal only, so two stacked dialogs announce one.; The modal mounts and unmounts without a transition where the web fades the paper in through MUI's `Fade`. React Native's own `animationType` is forwarded, so a consumer who wants `"fade"` or `"slide"` passes it.; The paper is `maxHeight: '100%'` inside an overlay inset by the web's `theme.spacing(2)` margin; the web writes `calc(100% - 64px)`, which React Native has no `calc` for, and 90vw, which the inset overlay stands in for.; `borderRadius` has no effect on `variant="drawer"` on EITHER renderer, so native paints the drawer SQUARE — which is what the web shows. Two things have to fail for that and both do: the web builds `${radius}px 0 0 ${radius}px` out of `theme.spacing()`, which already returns a px string, so the declaration reads `16pxpx 0 0 16pxpx` and is dropped; and that `sx` lands on a plain `Box` inside the Drawer rather than on a Paper, and MUI renders the Drawer's own Paper with `square: true`, so `shape.borderRadius` paints nothing either. Rounding the drawer is a web change (`Dialog.styles.ts` plus where the `sx` lands), made once, for both.; A `DialogContent` or `DialogActions` passed through a COMPONENT boundary still gets the padded wrapper here. The web catches that case with a `:has()` selector, which asks the DOM one step after React can; native has only the element-type check, so a body split into its own component is padded twice and stops being a sibling of the action bar.; `DialogContent` is a `ScrollView` — React Native's `overflow-y: auto` — so its padding lives on the scrolling content container rather than on the box the test id names.; The tighter top padding a body gets under a title (FUT-544) is decided by context rather than by the web's `.MuiDialogTitle-root + &`, so a SECOND `DialogContent` further down the dialog gets it too.; A `glow`ing paper stops clipping its children to its corners: a view's own shadow is clipped by its own overflow on a device, so the halo the caller asked for would not paint. The web keeps its clip and shows both.; The close button is a `Pressable` around the shared `Close` glyph at MUI's 8px `IconButton` padding; its pressed wash stands in for the web's hover.; Title, subtitle and raw text children are set in MUI's default `h6`/`body2`/`body1` numbers; a host that re-themes MUI's typography variants moves the web only. |
96
+ | `@12-apps/ui/feedback/Dialog` | 26 | 5 | `glass` paints its 0.1 paper wash and primary hairline without the 20px backdrop blur, and the scrim behind it is a flat `alpha(black, 0.2)` without its 8px blur — React Native has no backdrop filter.; `gradient` adds nothing on native: it is a `linear-gradient` background IMAGE layered over the paper colour, and React Native core has neither a gradient fill nor a second background layer.; `role="dialog"` sits on React Native's `Modal`, which is the dialog on this side; the web puts it on MUI's paper. react-native-web gives that role to the TOP-MOST modal only, so two stacked dialogs announce one.; The modal mounts and unmounts without a transition where the web fades the paper in through MUI's `Fade`. React Native's own `animationType` is forwarded, so a consumer who wants `"fade"` or `"slide"` passes it.; The paper is `maxHeight: '100%'` inside an overlay inset by the web's `theme.spacing(2)` margin; the web writes `calc(100% - 64px)`, which React Native has no `calc` for, and 90vw, which the inset overlay stands in for.; `borderRadius` has no effect on `variant="drawer"` on EITHER renderer, so native paints the drawer SQUARE — which is what the web shows. Two things have to fail for that and both do: the web builds `${radius}px 0 0 ${radius}px` out of `theme.spacing()`, which already returns a px string, so the declaration reads `16pxpx 0 0 16pxpx` and is dropped; and that `sx` lands on a plain `Box` inside the Drawer rather than on a Paper, and MUI renders the Drawer's own Paper with `square: true`, so `shape.borderRadius` paints nothing either. Rounding the drawer is a web change (`Dialog.styles.ts` plus where the `sx` lands), made once, for both.; A `DialogContent` or `DialogActions` passed through a COMPONENT boundary still gets the padded wrapper here. The web catches that case with a `:has()` selector, which asks the DOM one step after React can; native has only the element-type check, so a body split into its own component is padded twice and stops being a sibling of the action bar.; `DialogContent` is a `ScrollView` — React Native's `overflow-y: auto` — so its padding lives on the scrolling content container rather than on the box the test id names.; The tighter top padding a body gets under a title (FUT-544) is decided by context rather than by the web's `.MuiDialogTitle-root + &`, so a SECOND `DialogContent` further down the dialog gets it too.; A `glow`ing paper stops clipping its children to its corners: a view's own shadow is clipped by its own overflow on a device, so the halo the caller asked for would not paint. The web keeps its clip and shows both.; The close button is a `Pressable` around the shared `Close` glyph at MUI's 8px `IconButton` padding; its pressed wash stands in for the web's hover.; Title, subtitle and raw text children are set in MUI's default `h6`/`body2`/`body1` numbers; a host that re-themes MUI's typography variants moves the web only. |
97
97
  | `@12-apps/ui/form/Button` | 24 | 2 | — |
98
98
  | `@12-apps/ui/form/Checkbox` | 25 | 0 | The control is a pressable carrying `role="checkbox"` and `aria-checked` — the state the web's hidden `<input type="checkbox">` announces — rather than a real form element. So it is a tab stop and a screen reader reads it correctly, but the `disabled` ATTRIBUTE a DOM assertion like `toBeDisabled()` looks for is `aria-disabled` here.; The box itself IS MUI's glyph: `@12-apps/ui/icons` generates `CheckBox`, `CheckBoxOutlineBlank` and `IndeterminateCheckBox` from the same `@mui/icons-material` package MUI's own `Checkbox` imports them from.; `glow` is a static shadow of MUI's default blue rather than one breathing between a 5px and a 20px blur, and `pulse` — an expanding ring drawn with `box-shadow` spread — is not drawn at all: React Native has neither keyframes on a shadow nor shadow spread.; Hover has no touch equivalent, so the 0.1 wash the web puts behind a hovered box is not drawn; `ripple` becomes Android's own ripple and is nothing on iOS.; `rounded` and `toggle` clip and scale the glyph's own box, as the web does — which on a transparent glyph shows only where the box would have clipped it. The web's `borderRadius` on an `<svg>` is the same near-invisible change.; Both renderers check in `primary.main` whatever `color` says: `Checkbox.tsx` overrides MUI's per-colour rule with primary and wins on source order. Fixing that is a web change.; The label and the helper text are set in MUI's own numbers (`body2` at 14px, `caption` at 12px, four spacing units of helper inset); a host that re-themes MUI's typography moves the web only. |
99
99
  | `@12-apps/ui/form/Input` | 23 | 2 | The label sits ABOVE the field at its shrunk size (12px, aligned with the value's own left inset) instead of floating into a notch in the border: React Native can neither cut a notch in a border nor animate a label into one, so `floating` has nothing left to move.; `filled` keeps MUI's lopsided `25px 12px 8px` inset, which on the web is where the floating label sits inside the box — so a native filled field reads low in its box, with the label above it.; `glass` paints its 0.1 paper wash and hairline without the 20px backdrop blur (React Native has no backdrop filter), and draws ONE border where the web draws two — its own on the field root, plus the outlined fieldset's underneath.; `gradient` paints the first stop of its 135° fill flat and gives the 2px ring the gradient's first hue: React Native core has no gradient fill and no masked pseudo-element border.; Hover has no touch equivalent, so the web's hover border, its brighter glass wash and its deeper filled wash are not drawn; focus is, and it carries the same colours.; `pulse` grows by scaling the bar rather than spreading a box-shadow, which React Native does not have; `glow` is a shadow on iOS and an elevation on Android, so its halo is not symmetrical there.; `onClick` fires from the DOM click under react-native-web and from `onPressIn` on a device — react-native-web forwards only the first and React Native only the second, so exactly one runs and never both.; Enter keeps focus (`blurOnSubmit={false}`), as it does in a web `<input>`; React Native's own default for a single-line field is to dismiss the keyboard, and a caller wanting that passes its own.; An HTML `type` React Native has no keyboard for (`date`, `time`, `file`, `color`) renders a plain text field; `text`, `search`, `email`, `tel`, `url` and `number` pick the keyboard and `password` sets secure entry.; The value, label and helper text are set in MUI's own numbers (`body1` at 16px on a 23px line, the 0.75 shrunk label, `caption` at 12px); a host that re-themes MUI's typography variants moves the web only. |
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  DataViewsTableBase
4
- } from "../../../../chunk-ZNDDILNQ.js";
5
- import "../../../../chunk-3333KCAW.js";
4
+ } from "../../../../chunk-UBEAJFMW.js";
5
+ import "../../../../chunk-P22W4N5K.js";
6
6
  import "../../../../chunk-5WT4YWXC.js";
7
7
  import "../../../../chunk-ZOLAYP2D.js";
8
8
  import "../../../../chunk-AXKLCWFR.js";
@@ -40,9 +40,9 @@ import "../../../../chunk-YLGY3D52.js";
40
40
  import "../../../../chunk-S6JHTEV4.js";
41
41
  import "../../../../chunk-XZJM6EPC.js";
42
42
  import "../../../../chunk-M4KVKQRN.js";
43
- import "../../../../chunk-INMKA5SF.js";
44
- import "../../../../chunk-IYF246UA.js";
45
- import "../../../../chunk-ECIHOZPK.js";
43
+ import "../../../../chunk-ARDLCGBK.js";
44
+ import "../../../../chunk-SA65SDOY.js";
45
+ import "../../../../chunk-WWGD5YVW.js";
46
46
  import "../../../../chunk-5M4TYFR3.js";
47
47
  import "../../../../chunk-HR7YTBR7.js";
48
48
  import "../../../../chunk-DZEC6RFM.js";
@@ -121,9 +121,9 @@ import "../../../../chunk-FWPFCK4D.js";
121
121
  import "../../../../chunk-BJZOBG24.js";
122
122
  import "../../../../chunk-EMYESBIT.js";
123
123
  import "../../../../chunk-KFJKOVDD.js";
124
- import "../../../../chunk-UEROWH53.js";
124
+ import "../../../../chunk-GAMLBJE6.js";
125
125
  import "../../../../chunk-2WU52FLP.js";
126
- import "../../../../chunk-Y4O4DITI.js";
126
+ import "../../../../chunk-5HW37NSW.js";
127
127
  import "../../../../chunk-GVGJMH77.js";
128
128
  import "../../../../chunk-GYXUCS37.js";
129
129
  import "../../../../chunk-CN46HGXE.js";
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  DeleteViewDialog
4
- } from "../../../../chunk-3333KCAW.js";
4
+ } from "../../../../chunk-P22W4N5K.js";
5
5
  import "../../../../chunk-KHG57NAE.js";
6
6
  import "../../../../chunk-KFJKOVDD.js";
7
- import "../../../../chunk-UEROWH53.js";
7
+ import "../../../../chunk-GAMLBJE6.js";
8
8
  import "../../../../chunk-2WU52FLP.js";
9
- import "../../../../chunk-Y4O4DITI.js";
9
+ import "../../../../chunk-5HW37NSW.js";
10
10
  import "../../../../chunk-GVGJMH77.js";
11
11
  import "../../../../chunk-GYXUCS37.js";
12
12
  import "../../../../chunk-WEBEOBN5.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  ManageViewsDialog
4
- } from "../../../../chunk-ECIHOZPK.js";
4
+ } from "../../../../chunk-WWGD5YVW.js";
5
5
  import "../../../../chunk-KHG57NAE.js";
6
6
  import "../../../../chunk-XCBQXSTR.js";
7
7
  import "../../../../chunk-OAW6GCS3.js";
@@ -10,9 +10,9 @@ import "../../../../chunk-FWPFCK4D.js";
10
10
  import "../../../../chunk-BJZOBG24.js";
11
11
  import "../../../../chunk-EMYESBIT.js";
12
12
  import "../../../../chunk-KFJKOVDD.js";
13
- import "../../../../chunk-UEROWH53.js";
13
+ import "../../../../chunk-GAMLBJE6.js";
14
14
  import "../../../../chunk-2WU52FLP.js";
15
- import "../../../../chunk-Y4O4DITI.js";
15
+ import "../../../../chunk-5HW37NSW.js";
16
16
  import "../../../../chunk-GVGJMH77.js";
17
17
  import "../../../../chunk-GYXUCS37.js";
18
18
  import "../../../../chunk-2IBFEHIX.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  SaveViewModal
4
- } from "../../../../chunk-IYF246UA.js";
4
+ } from "../../../../chunk-SA65SDOY.js";
5
5
  import "../../../../chunk-5M4TYFR3.js";
6
6
  import "../../../../chunk-B7CNP5HW.js";
7
7
  import "../../../../chunk-KHG57NAE.js";
@@ -18,9 +18,9 @@ import "../../../../chunk-SL6454K7.js";
18
18
  import "../../../../chunk-THMT3G3L.js";
19
19
  import "../../../../chunk-RNIU447I.js";
20
20
  import "../../../../chunk-KFJKOVDD.js";
21
- import "../../../../chunk-UEROWH53.js";
21
+ import "../../../../chunk-GAMLBJE6.js";
22
22
  import "../../../../chunk-2WU52FLP.js";
23
- import "../../../../chunk-Y4O4DITI.js";
23
+ import "../../../../chunk-5HW37NSW.js";
24
24
  import "../../../../chunk-GVGJMH77.js";
25
25
  import "../../../../chunk-GYXUCS37.js";
26
26
  import "../../../../chunk-6DPAWXZ3.js";
@@ -3,9 +3,9 @@ import {
3
3
  ViewDialogs,
4
4
  ViewMutationErrorAlert,
5
5
  ViewsMenuSlot
6
- } from "../../../../chunk-INMKA5SF.js";
7
- import "../../../../chunk-IYF246UA.js";
8
- import "../../../../chunk-ECIHOZPK.js";
6
+ } from "../../../../chunk-ARDLCGBK.js";
7
+ import "../../../../chunk-SA65SDOY.js";
8
+ import "../../../../chunk-WWGD5YVW.js";
9
9
  import "../../../../chunk-5M4TYFR3.js";
10
10
  import "../../../../chunk-B7CNP5HW.js";
11
11
  import "../../../../chunk-KHG57NAE.js";
@@ -37,9 +37,9 @@ import "../../../../chunk-FWPFCK4D.js";
37
37
  import "../../../../chunk-BJZOBG24.js";
38
38
  import "../../../../chunk-EMYESBIT.js";
39
39
  import "../../../../chunk-KFJKOVDD.js";
40
- import "../../../../chunk-UEROWH53.js";
40
+ import "../../../../chunk-GAMLBJE6.js";
41
41
  import "../../../../chunk-2WU52FLP.js";
42
- import "../../../../chunk-Y4O4DITI.js";
42
+ import "../../../../chunk-5HW37NSW.js";
43
43
  import "../../../../chunk-GVGJMH77.js";
44
44
  import "../../../../chunk-GYXUCS37.js";
45
45
  import "../../../../chunk-NUGT7LMR.js";
@@ -3,9 +3,9 @@ import {
3
3
  DialogActions,
4
4
  DialogContent,
5
5
  DialogHeader
6
- } from "../../../../chunk-UEROWH53.js";
6
+ } from "../../../../chunk-GAMLBJE6.js";
7
7
  import "../../../../chunk-2WU52FLP.js";
8
- import "../../../../chunk-Y4O4DITI.js";
8
+ import "../../../../chunk-5HW37NSW.js";
9
9
  import "../../../../chunk-GVGJMH77.js";
10
10
  import "../../../../chunk-GYXUCS37.js";
11
11
  import "../../../../chunk-TYJR4GOF.js";
@@ -0,0 +1,10 @@
1
+ import {
2
+ mergedBackdropSlot,
3
+ mergedPaperSlot
4
+ } from "../../../../chunk-5HW37NSW.js";
5
+ import "../../../../chunk-PZ5AY32C.js";
6
+ export {
7
+ mergedBackdropSlot,
8
+ mergedPaperSlot
9
+ };
10
+ //# sourceMappingURL=Dialog.slots.js.map
@@ -59,9 +59,9 @@ import {
59
59
  DialogActions,
60
60
  DialogContent,
61
61
  DialogHeader
62
- } from "../../../chunk-UEROWH53.js";
62
+ } from "../../../chunk-GAMLBJE6.js";
63
63
  import "../../../chunk-2WU52FLP.js";
64
- import "../../../chunk-Y4O4DITI.js";
64
+ import "../../../chunk-5HW37NSW.js";
65
65
  import "../../../chunk-GVGJMH77.js";
66
66
  import "../../../chunk-GYXUCS37.js";
67
67
  import "../../../chunk-CN46HGXE.js";
@@ -113,7 +113,7 @@ import {
113
113
  } from "../../chunk-IQU4HKND.js";
114
114
  import {
115
115
  AppHeaderDetails
116
- } from "../../chunk-DXZOSP6P.js";
116
+ } from "../../chunk-WVJGNIJZ.js";
117
117
  import {
118
118
  Breadcrumbs
119
119
  } from "../../chunk-YRSR5LVZ.js";
@@ -625,9 +625,9 @@ import {
625
625
  DialogActions,
626
626
  DialogContent,
627
627
  DialogHeader
628
- } from "../../chunk-UEROWH53.js";
628
+ } from "../../chunk-GAMLBJE6.js";
629
629
  import "../../chunk-2WU52FLP.js";
630
- import "../../chunk-Y4O4DITI.js";
630
+ import "../../chunk-5HW37NSW.js";
631
631
  import "../../chunk-GVGJMH77.js";
632
632
  import "../../chunk-GYXUCS37.js";
633
633
  import "../../chunk-CN46HGXE.js";
@@ -768,8 +768,8 @@ import "../../chunk-CYZZHWNK.js";
768
768
  import "../../chunk-CMMPGAMJ.js";
769
769
  import {
770
770
  Separator
771
- } from "../../chunk-XSSCSRUX.js";
772
- import "../../chunk-SYNB3IIB.js";
771
+ } from "../../chunk-X53F33KA.js";
772
+ import "../../chunk-35443PF6.js";
773
773
  import {
774
774
  Avatar,
775
775
  AvatarGroup
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Separator
3
- } from "../../../../chunk-XSSCSRUX.js";
4
- import "../../../../chunk-SYNB3IIB.js";
3
+ } from "../../../../chunk-X53F33KA.js";
4
+ import "../../../../chunk-35443PF6.js";
5
5
  import "../../../../chunk-PZBK3F52.js";
6
6
  import "../../../../chunk-YKCAJ2TN.js";
7
7
  import "../../../../chunk-PZ5AY32C.js";
@@ -3,7 +3,7 @@ import {
3
3
  separatorBlockMargin,
4
4
  separatorMargin,
5
5
  separatorStyles
6
- } from "../../../../chunk-SYNB3IIB.js";
6
+ } from "../../../../chunk-35443PF6.js";
7
7
  import "../../../../chunk-PZBK3F52.js";
8
8
  import "../../../../chunk-YKCAJ2TN.js";
9
9
  import "../../../../chunk-PZ5AY32C.js";
@@ -103,8 +103,8 @@ import "../../../chunk-7WDPC46N.js";
103
103
  import "../../../chunk-CMMPGAMJ.js";
104
104
  import {
105
105
  Separator
106
- } from "../../../chunk-XSSCSRUX.js";
107
- import "../../../chunk-SYNB3IIB.js";
106
+ } from "../../../chunk-X53F33KA.js";
107
+ import "../../../chunk-35443PF6.js";
108
108
  import "../../../chunk-2GSIEDGN.js";
109
109
  import {
110
110
  Card,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  AppHeaderDetails
4
- } from "../../../../chunk-DXZOSP6P.js";
4
+ } from "../../../../chunk-WVJGNIJZ.js";
5
5
  import "../../../../chunk-QXSV7Z57.js";
6
6
  import "../../../../chunk-3U3H3BZM.js";
7
7
  import "../../../../chunk-EJYJLVPK.js";
@@ -9,9 +9,9 @@ import "../../../../chunk-FPVYD7BO.js";
9
9
  import "../../../../chunk-LYVTJLCF.js";
10
10
  import "../../../../chunk-CRN4KKNI.js";
11
11
  import "../../../../chunk-IM4DMKH4.js";
12
- import "../../../../chunk-UEROWH53.js";
12
+ import "../../../../chunk-GAMLBJE6.js";
13
13
  import "../../../../chunk-2WU52FLP.js";
14
- import "../../../../chunk-Y4O4DITI.js";
14
+ import "../../../../chunk-5HW37NSW.js";
15
15
  import "../../../../chunk-GVGJMH77.js";
16
16
  import "../../../../chunk-GYXUCS37.js";
17
17
  import "../../../../chunk-HM2JJNUE.js";
@@ -33,7 +33,7 @@ import {
33
33
  } from "../../../chunk-IQU4HKND.js";
34
34
  import {
35
35
  AppHeaderDetails
36
- } from "../../../chunk-DXZOSP6P.js";
36
+ } from "../../../chunk-WVJGNIJZ.js";
37
37
  import {
38
38
  Breadcrumbs
39
39
  } from "../../../chunk-YRSR5LVZ.js";
@@ -69,9 +69,9 @@ import "../../../chunk-WVML3ENZ.js";
69
69
  import {
70
70
  DropdownMenu
71
71
  } from "../../../chunk-U3DBQXPI.js";
72
- import "../../../chunk-UEROWH53.js";
72
+ import "../../../chunk-GAMLBJE6.js";
73
73
  import "../../../chunk-2WU52FLP.js";
74
- import "../../../chunk-Y4O4DITI.js";
74
+ import "../../../chunk-5HW37NSW.js";
75
75
  import "../../../chunk-GVGJMH77.js";
76
76
  import "../../../chunk-GYXUCS37.js";
77
77
  import "../../../chunk-HM2JJNUE.js";
@@ -5,15 +5,15 @@ import {
5
5
  GoogleIcon,
6
6
  SocialLoginButton,
7
7
  SocialLoginContainer
8
- } from "../../chunk-5KWHINO5.js";
8
+ } from "../../chunk-SLDSWQVE.js";
9
9
  import "../../chunk-INGPH3YQ.js";
10
10
  import "../../chunk-6GP2DOOO.js";
11
11
  import "../../chunk-IWEUSZY3.js";
12
12
  import "../../chunk-RB3X6CEE.js";
13
13
  import "../../chunk-CYZZHWNK.js";
14
14
  import "../../chunk-CMMPGAMJ.js";
15
- import "../../chunk-XSSCSRUX.js";
16
- import "../../chunk-SYNB3IIB.js";
15
+ import "../../chunk-X53F33KA.js";
16
+ import "../../chunk-35443PF6.js";
17
17
  import "../../chunk-VUHLNYAE.js";
18
18
  import "../../chunk-2GSIEDGN.js";
19
19
  import "../../chunk-WN5PNP6F.js";
@@ -70,13 +70,16 @@ var ruleLength = (theme, length) => {
70
70
  if (typeof length === "string") return length;
71
71
  return length <= 1 ? `${length * 100}%` : rem(theme, length);
72
72
  };
73
+ var isRelativeLength = (length) => typeof length === "number" ? length <= 1 : length.includes("%");
73
74
  var labelledSeparatorLayout = (theme, isHorizontal, length) => {
74
75
  if (isHorizontal) return { rule: {}, group: {} };
75
- if (length) return { rule: { flex: "none" }, group: {} };
76
+ if (length && !isRelativeLength(length)) return { rule: { flex: "none" }, group: {} };
76
77
  return {
77
- // A design 16px, as long as the gap beside the label at the default
78
- // spacing, so a short or unsized row still shows two rules and not a word.
79
- rule: { flex: "1 1 0", minHeight: rem(theme, 16) },
78
+ // Unset, the rules share the run; relative, each is its own fraction of it.
79
+ // Either way a design 16px floor, as long as the gap beside the label at
80
+ // the default spacing, so a short or unsized row still shows two rules and
81
+ // not a word.
82
+ rule: { flex: length ? "0 1 auto" : "1 1 0", minHeight: rem(theme, 16) },
80
83
  group: { alignSelf: "stretch" }
81
84
  };
82
85
  };
@@ -113,4 +116,4 @@ export {
113
116
  labelledSeparatorLayout,
114
117
  separatorStyles
115
118
  };
116
- //# sourceMappingURL=chunk-SYNB3IIB.js.map
119
+ //# sourceMappingURL=chunk-35443PF6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/layout/Separator/Separator.styles.ts"],"sourcesContent":["import type { CSSObject, Theme } from '@mui/material/styles/index.js';\n\nimport type {\n SeparatorOrientation,\n SeparatorProps,\n SeparatorSize,\n SeparatorVariant,\n} from './Separator.types';\nimport { FIELD_BORDER_WIDTH } from '../../../tokens/field-height.core';\nimport { rem } from '../../../tokens/relative';\n\nconst THICKNESS_PX: Record<SeparatorSize, number> = {\n xs: 1,\n sm: 2,\n md: 3,\n lg: 4,\n xl: 6,\n};\n\nconst MARGIN_PX: Record<SeparatorSize, number> = {\n xs: 4,\n sm: 8,\n md: 16,\n lg: 24,\n xl: 32,\n};\n\nconst separatorThickness = (size: SeparatorSize): number =>\n THICKNESS_PX[size] ?? THICKNESS_PX.md;\n\n/** An explicit `margin` wins; otherwise the size picks one. */\nexport const separatorMargin = (\n size: SeparatorSize,\n margin?: number | string,\n): number | string => margin ?? MARGIN_PX[size] ?? MARGIN_PX.md;\n\n// `gradient` paints a background rather than a border, so it draws its line as a\n// solid border of zero visual consequence.\nconst borderStyleFor = (variant: SeparatorVariant): 'dashed' | 'dotted' | 'solid' => {\n switch (variant) {\n case 'dashed':\n return 'dashed';\n case 'dotted':\n return 'dotted';\n default:\n return 'solid';\n }\n};\n\nconst gradientBackground = (\n variant: SeparatorVariant,\n orientation: SeparatorOrientation,\n color: string,\n): string | undefined => {\n if (variant !== 'gradient') return undefined;\n const angle = orientation === 'horizontal' ? '90deg' : '180deg';\n return `linear-gradient(${angle}, transparent 0%, ${color} 50%, transparent 100%)`;\n};\n\n// Only the leading edge carries the rule; the other three are zeroed explicitly so\n// a parent's border shorthand cannot leak through.\nconst borderEdges = (\n isHorizontal: boolean,\n thickness: string,\n style: 'dashed' | 'dotted' | 'solid',\n color: string,\n): CSSObject => {\n const leading = isHorizontal ? 'Top' : 'Left';\n const blank: CSSObject = {\n borderTopWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderRightWidth: 0,\n borderTopStyle: 'none',\n borderBottomStyle: 'none',\n borderLeftStyle: 'none',\n borderRightStyle: 'none',\n borderTopColor: 'transparent',\n borderBottomColor: 'transparent',\n borderLeftColor: 'transparent',\n borderRightColor: 'transparent',\n };\n\n return {\n ...blank,\n [`border${leading}Width`]: thickness,\n [`border${leading}Style`]: style,\n [`border${leading}Color`]: color,\n };\n};\n\ntype SeparatorStyleArgs = Required<\n Pick<SeparatorProps, 'variant' | 'orientation' | 'size'>\n> &\n Pick<SeparatorProps, 'color' | 'length'> & {\n /** From {@link separatorBlockMargin}, which both the plain and the labelled separator read. */\n blockMargin: string;\n };\n\n/**\n * The separator's margin, on the axis it separates along only: above and below\n * a horizontal rule, either side of a vertical one. A margin given as a string\n * carries its own units; a number is design px, through the type scale.\n *\n * The LABELLED separator uses this too. It used to hand the number straight to\n * `sx.margin`, where a number is SPACING UNITS — `md`'s 16 drew 128px on all\n * four sides, against 16px above and below for the unlabelled one.\n */\nexport const separatorBlockMargin = (\n theme: Theme,\n size: SeparatorSize,\n margin: number | string | undefined,\n isHorizontal: boolean,\n): string => {\n const value = separatorMargin(size, margin);\n const length = typeof value === 'string' ? value : rem(theme, value);\n return isHorizontal ? `${length} 0` : `0 ${length}`;\n};\n\n/**\n * The rule's extent along its axis. It lands in `sx`, which reads a number of 1\n * or less as a fraction of the parent, and that stays so; any other number is\n * design px, through the type scale. Unset (or `0`/`''`) is the full run.\n */\nconst ruleLength = (theme: Theme, length: SeparatorProps['length']): string => {\n if (!length) return '100%';\n if (typeof length === 'string') return length;\n return length <= 1 ? `${length * 100}%` : rem(theme, length);\n};\n\n/**\n * Whether a set `length` is a fraction of the parent rather than a fixed\n * extent: a number of 1 or less, as {@link ruleLength} reads it, or any string\n * that carries a percentage (`'50%'`, `'calc(50% - 8px)'`).\n */\nconst isRelativeLength = (length: number | string): boolean =>\n typeof length === 'number' ? length <= 1 : length.includes('%');\n\n/**\n * What a labelled separator's rules add to {@link separatorStyles}, and whether\n * the group stretches to its parent (FUT-2617, FUT-2675).\n *\n * A labelled VERTICAL separator is a flex COLUMN — rule, label, rule — and with\n * no `length` each rule is `height: 100%` of a column whose height is its own\n * content: both resolved to 0px and only the label showed. So the column\n * stretches to the row it sits in and the two rules split what the label\n * leaves, equally (`flex: 1 1 0`), never shorter than a visible minimum.\n *\n * A RELATIVE `length` (FUT-2675) resolved against that same content-height\n * column and drew 0px too. It now means what it means on a horizontal labelled\n * separator: that fraction of the run. The column stretches as above and each\n * rule is `length` of it, with no grow and the default shrink, so rule, label\n * and rule never overflow the row; the same minimum holds, and is all a block\n * parent (where `align-self` does nothing) gets.\n *\n * An ABSOLUTE `length` is exactly that long: no grow, no shrink, no basis, and\n * the column keeps its content height, centred as before.\n *\n * Only the labelled branch reads this. The plain separator keeps\n * `separatorStyles` as is, since `flex: 1 1 0` there would widen a vertical\n * separator sitting in a row. The horizontal rules already shrink around the\n * label in their row, so they are left alone.\n */\nexport const labelledSeparatorLayout = (\n theme: Theme,\n isHorizontal: boolean,\n length: SeparatorProps['length'],\n): { rule: CSSObject; group: CSSObject } => {\n if (isHorizontal) return { rule: {}, group: {} };\n if (length && !isRelativeLength(length)) return { rule: { flex: 'none' }, group: {} };\n return {\n // Unset, the rules share the run; relative, each is its own fraction of it.\n // Either way a design 16px floor, as long as the gap beside the label at\n // the default spacing, so a short or unsized row still shows two rules and\n // not a word.\n rule: { flex: length ? '0 1 auto' : '1 1 0', minHeight: rem(theme, 16) },\n group: { alignSelf: 'stretch' },\n };\n};\n\nexport const separatorStyles = (\n theme: Theme,\n { variant, orientation, size, color, blockMargin, length }: SeparatorStyleArgs,\n): CSSObject => {\n const isHorizontal = orientation === 'horizontal';\n // `xs` is the 1px hairline: it stays one device-independent pixel at every\n // root size, like every other hairline in the package; heavier rules scale.\n const thicknessPx = separatorThickness(size);\n const thickness = thicknessPx === FIELD_BORDER_WIDTH ? `${FIELD_BORDER_WIDTH}px` : rem(theme, thicknessPx);\n const along = ruleLength(theme, length);\n const resolvedColor = color || theme.palette.divider;\n\n const baseStyles: CSSObject = {\n display: 'flex',\n alignItems: 'center',\n margin: blockMargin,\n width: isHorizontal ? along : thickness,\n height: isHorizontal ? thickness : along,\n boxSizing: 'border-box',\n };\n\n if (variant === 'gradient') {\n return {\n ...baseStyles,\n background: gradientBackground(variant, orientation, resolvedColor),\n };\n }\n\n return {\n ...baseStyles,\n backgroundColor: 'transparent',\n ...borderEdges(isHorizontal, thickness, borderStyleFor(variant), resolvedColor),\n };\n};\n"],"mappings":";;;;;;;;AAWA,IAAM,eAA8C;AAAA,EAClD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,YAA2C;AAAA,EAC/C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,qBAAqB,CAAC,SAC1B,aAAa,IAAI,KAAK,aAAa;AAG9B,IAAM,kBAAkB,CAC7B,MACA,WACoB,UAAU,UAAU,IAAI,KAAK,UAAU;AAI7D,IAAM,iBAAiB,CAAC,YAA6D;AACnF,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEA,IAAM,qBAAqB,CACzB,SACA,aACA,UACuB;AACvB,MAAI,YAAY,WAAY,QAAO;AACnC,QAAM,QAAQ,gBAAgB,eAAe,UAAU;AACvD,SAAO,mBAAmB,KAAK,qBAAqB,KAAK;AAC3D;AAIA,IAAM,cAAc,CAClB,cACA,WACA,OACA,UACc;AACd,QAAM,UAAU,eAAe,QAAQ;AACvC,QAAM,QAAmB;AAAA,IACvB,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,EACpB;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,CAAC,SAAS,OAAO,OAAO,GAAG;AAAA,IAC3B,CAAC,SAAS,OAAO,OAAO,GAAG;AAAA,IAC3B,CAAC,SAAS,OAAO,OAAO,GAAG;AAAA,EAC7B;AACF;AAmBO,IAAM,uBAAuB,CAClC,OACA,MACA,QACA,iBACW;AACX,QAAM,QAAQ,gBAAgB,MAAM,MAAM;AAC1C,QAAM,SAAS,OAAO,UAAU,WAAW,QAAQ,IAAI,OAAO,KAAK;AACnE,SAAO,eAAe,GAAG,MAAM,OAAO,KAAK,MAAM;AACnD;AAOA,IAAM,aAAa,CAAC,OAAc,WAA6C;AAC7E,MAAI,CAAC,OAAQ,QAAO;AACpB,MAAI,OAAO,WAAW,SAAU,QAAO;AACvC,SAAO,UAAU,IAAI,GAAG,SAAS,GAAG,MAAM,IAAI,OAAO,MAAM;AAC7D;AAOA,IAAM,mBAAmB,CAAC,WACxB,OAAO,WAAW,WAAW,UAAU,IAAI,OAAO,SAAS,GAAG;AA2BzD,IAAM,0BAA0B,CACrC,OACA,cACA,WAC0C;AAC1C,MAAI,aAAc,QAAO,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,EAAE;AAC/C,MAAI,UAAU,CAAC,iBAAiB,MAAM,EAAG,QAAO,EAAE,MAAM,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,EAAE;AACpF,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,MAAM,EAAE,MAAM,SAAS,aAAa,SAAS,WAAW,IAAI,OAAO,EAAE,EAAE;AAAA,IACvE,OAAO,EAAE,WAAW,UAAU;AAAA,EAChC;AACF;AAEO,IAAM,kBAAkB,CAC7B,OACA,EAAE,SAAS,aAAa,MAAM,OAAO,aAAa,OAAO,MAC3C;AACd,QAAM,eAAe,gBAAgB;AAGrC,QAAM,cAAc,mBAAmB,IAAI;AAC3C,QAAM,YAAY,gBAAgB,qBAAqB,GAAG,kBAAkB,OAAO,IAAI,OAAO,WAAW;AACzG,QAAM,QAAQ,WAAW,OAAO,MAAM;AACtC,QAAM,gBAAgB,SAAS,MAAM,QAAQ;AAE7C,QAAM,aAAwB;AAAA,IAC5B,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,OAAO,eAAe,QAAQ;AAAA,IAC9B,QAAQ,eAAe,YAAY;AAAA,IACnC,WAAW;AAAA,EACb;AAEA,MAAI,YAAY,YAAY;AAC1B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,YAAY,mBAAmB,SAAS,aAAa,aAAa;AAAA,IACpE;AAAA,EACF;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,iBAAiB;AAAA,IACjB,GAAG,YAAY,cAAc,WAAW,eAAe,OAAO,GAAG,aAAa;AAAA,EAChF;AACF;","names":[]}
@@ -0,0 +1,34 @@
1
+ // src/components/feedback/Dialog/Dialog.slots.ts
2
+ function sxList(caller) {
3
+ if (caller === void 0) return [];
4
+ return Array.isArray(caller) ? caller : [caller];
5
+ }
6
+ function mergeOver(look, legacy, slot) {
7
+ return {
8
+ ...legacy,
9
+ ...slot,
10
+ sx: [look, ...sxList(legacy?.sx), ...sxList(slot?.sx)]
11
+ };
12
+ }
13
+ function mergedSlot(look, legacy, slot, finish = (merged) => merged) {
14
+ if (typeof slot === "function") {
15
+ return (ownerState) => finish(mergeOver(look, legacy, slot(ownerState)));
16
+ }
17
+ return finish(mergeOver(look, legacy, slot));
18
+ }
19
+ function mergedPaperSlot(look, testId, legacy, slot) {
20
+ return mergedSlot(look, legacy, slot, (merged) => ({
21
+ ...merged,
22
+ // A key the caller set to `undefined` does not erase the dialog's id.
23
+ "data-testid": merged["data-testid"] ?? testId
24
+ }));
25
+ }
26
+ function mergedBackdropSlot(look, legacy, slot) {
27
+ return mergedSlot(look, legacy, slot);
28
+ }
29
+
30
+ export {
31
+ mergedPaperSlot,
32
+ mergedBackdropSlot
33
+ };
34
+ //# sourceMappingURL=chunk-5HW37NSW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/feedback/Dialog/Dialog.slots.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material/styles/index.js';\n\n/**\n * A caller's slot props, MERGED over the Dialog's own rather than replacing\n * them — for the paper (FUT-2613) and the backdrop (FUT-2672).\n *\n * MUI reaches each slot through two props, and both used to replace ours\n * whole: the deprecated `PaperProps`/`BackdropProps` (spread after ours) and\n * `slotProps.paper`/`slotProps.backdrop` (which MUI itself puts over the\n * deprecated one). A caller asking for one class, or one `sx` tweak, lost the\n * variant's radius, width, background and the paper's test id with it — or,\n * on the backdrop, the scrim and the `glass` blur.\n *\n * Only the keys the merge reads are typed here; every other key the caller\n * passed rides the spread through untouched.\n */\ninterface SlotValue {\n sx?: SxProps<Theme>;\n className?: string;\n}\n\ninterface PaperSlotValue extends SlotValue {\n 'data-testid'?: string;\n}\n\n/** A slot as MUI takes it: an object, or a function of the owner state. */\ntype Slot<V, O> = V | ((ownerState: O) => V);\n\n/** Our look first, then whatever `sx` the caller adds — so the caller's escape hatch still wins. */\nfunction sxList(caller: SxProps<Theme> | undefined): readonly unknown[] {\n if (caller === undefined) return [];\n return Array.isArray(caller) ? caller : [caller];\n}\n\nfunction mergeOver<V extends SlotValue>(\n look: SxProps<Theme>,\n legacy: V | undefined,\n slot: V | undefined,\n): V {\n // MUI's own order: `slotProps.<slot>` over the deprecated `<Slot>Props`.\n return {\n ...legacy,\n ...slot,\n sx: [look, ...sxList(legacy?.sx), ...sxList(slot?.sx)] as SxProps<Theme>,\n } as V;\n}\n\n/**\n * The one slot to hand MUI: the Dialog's `look`, then the deprecated prop,\n * then `slotProps.<slot>`, each value passed through `finish`. A function slot\n * stays a function, so MUI still calls it with its owner state and its result\n * merges the same way.\n */\nfunction mergedSlot<V extends SlotValue, O>(\n look: SxProps<Theme>,\n legacy: V | undefined,\n slot: Slot<V, O> | undefined,\n finish: (merged: V) => V = (merged) => merged,\n): Slot<V, O> {\n if (typeof slot === 'function') {\n return (ownerState: O) => finish(mergeOver(look, legacy, slot(ownerState)));\n }\n return finish(mergeOver(look, legacy, slot));\n}\n\n/**\n * The paper slot: the variant's `look`, then `PaperProps`, then\n * `slotProps.paper`.\n *\n * `testId` names the paper unless the caller's props name it; the drawer passes\n * none, because its id already sits on the Drawer root.\n */\nexport function mergedPaperSlot<O>(\n look: SxProps<Theme>,\n testId: string | undefined,\n legacy: PaperSlotValue | undefined,\n slot: Slot<PaperSlotValue, O> | undefined,\n): Slot<PaperSlotValue, O> {\n return mergedSlot(look, legacy, slot, (merged) => ({\n ...merged,\n // A key the caller set to `undefined` does not erase the dialog's id.\n 'data-testid': merged['data-testid'] ?? testId,\n }));\n}\n\n/**\n * The backdrop slot: the scrim (`backdropSxOf`), then `BackdropProps`, then\n * `slotProps.backdrop`. Both renderers need it: MUI's `Dialog` would replace\n * our backdrop props with a caller's, and MUI's `Drawer` takes\n * `slotProps.backdrop` INSTEAD of `BackdropProps` whenever it is given — so\n * once the scrim rides `slotProps.backdrop`, a caller's `BackdropProps` would\n * silently drop unless it is folded in here.\n */\nexport function mergedBackdropSlot<O>(\n look: SxProps<Theme>,\n legacy: SlotValue | undefined,\n slot: Slot<SlotValue, O> | undefined,\n): Slot<SlotValue, O> {\n return mergedSlot(look, legacy, slot);\n}\n"],"mappings":";AA6BA,SAAS,OAAO,QAAwD;AACtE,MAAI,WAAW,OAAW,QAAO,CAAC;AAClC,SAAO,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC,MAAM;AACjD;AAEA,SAAS,UACP,MACA,QACA,MACG;AAEH,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,IACH,IAAI,CAAC,MAAM,GAAG,OAAO,QAAQ,EAAE,GAAG,GAAG,OAAO,MAAM,EAAE,CAAC;AAAA,EACvD;AACF;AAQA,SAAS,WACP,MACA,QACA,MACA,SAA2B,CAAC,WAAW,QAC3B;AACZ,MAAI,OAAO,SAAS,YAAY;AAC9B,WAAO,CAAC,eAAkB,OAAO,UAAU,MAAM,QAAQ,KAAK,UAAU,CAAC,CAAC;AAAA,EAC5E;AACA,SAAO,OAAO,UAAU,MAAM,QAAQ,IAAI,CAAC;AAC7C;AASO,SAAS,gBACd,MACA,QACA,QACA,MACyB;AACzB,SAAO,WAAW,MAAM,QAAQ,MAAM,CAAC,YAAY;AAAA,IACjD,GAAG;AAAA;AAAA,IAEH,eAAe,OAAO,aAAa,KAAK;AAAA,EAC1C,EAAE;AACJ;AAUO,SAAS,mBACd,MACA,QACA,MACoB;AACpB,SAAO,WAAW,MAAM,QAAQ,IAAI;AACtC;","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  SaveViewModal
3
- } from "./chunk-IYF246UA.js";
3
+ } from "./chunk-SA65SDOY.js";
4
4
  import {
5
5
  ManageViewsDialog
6
- } from "./chunk-ECIHOZPK.js";
6
+ } from "./chunk-WWGD5YVW.js";
7
7
  import {
8
8
  useDataViewsCopy
9
9
  } from "./chunk-KHG57NAE.js";
@@ -121,4 +121,4 @@ export {
121
121
  ViewsMenuSlot,
122
122
  ViewDialogs
123
123
  };
124
- //# sourceMappingURL=chunk-INMKA5SF.js.map
124
+ //# sourceMappingURL=chunk-ARDLCGBK.js.map
@@ -3,8 +3,9 @@ import {
3
3
  variantStylesOf
4
4
  } from "./chunk-2WU52FLP.js";
5
5
  import {
6
+ mergedBackdropSlot,
6
7
  mergedPaperSlot
7
- } from "./chunk-Y4O4DITI.js";
8
+ } from "./chunk-5HW37NSW.js";
8
9
  import {
9
10
  DIALOG_ACTIONS,
10
11
  DIALOG_BODY_PADDING_UNITS,
@@ -49,20 +50,54 @@ function bodyOf(children, hasTitle) {
49
50
  const pt = hasTitle ? DIALOG_BODY_PADDING_UNITS.topUnderTitle : DIALOG_BODY_PADDING_UNITS.top;
50
51
  return /* @__PURE__ */ jsx(Box, { sx: { ...BODY_SX, pt }, children });
51
52
  }
53
+ function closeHandlerOf(persistent, onClose) {
54
+ return (_event, reason) => {
55
+ if (persistent && (reason === "backdropClick" || reason === "escapeKeyDown")) {
56
+ return;
57
+ }
58
+ onClose?.();
59
+ };
60
+ }
61
+ function ModalDialog({
62
+ paperSx,
63
+ backdropSx,
64
+ testId,
65
+ dialogProps,
66
+ children
67
+ }) {
68
+ const { PaperProps: callerPaper, BackdropProps: callerBackdrop, slotProps, ...rest } = dialogProps;
69
+ return /* @__PURE__ */ jsx(
70
+ MuiDialog,
71
+ {
72
+ ...rest,
73
+ slotProps: {
74
+ ...slotProps,
75
+ paper: mergedPaperSlot(paperSx, testId, callerPaper, slotProps?.paper),
76
+ backdrop: mergedBackdropSlot(backdropSx, callerBackdrop, slotProps?.backdrop)
77
+ },
78
+ children
79
+ }
80
+ );
81
+ }
52
82
  function DrawerDialog({
53
83
  paperSx,
84
+ backdropSx,
54
85
  testId,
55
86
  drawerProps,
56
87
  children
57
88
  }) {
58
- const { PaperProps: callerPaper, slotProps, ...rest } = drawerProps;
89
+ const { PaperProps: callerPaper, BackdropProps: callerBackdrop, slotProps, ...rest } = drawerProps;
59
90
  return /* @__PURE__ */ jsx(
60
91
  Drawer,
61
92
  {
62
93
  anchor: "right",
63
94
  "data-testid": testId,
64
95
  ...rest,
65
- slotProps: { ...slotProps, paper: mergedPaperSlot(paperSx, void 0, callerPaper, slotProps?.paper) },
96
+ slotProps: {
97
+ ...slotProps,
98
+ paper: mergedPaperSlot(paperSx, void 0, callerPaper, slotProps?.paper),
99
+ backdrop: mergedBackdropSlot(backdropSx, callerBackdrop, slotProps?.backdrop)
100
+ },
66
101
  children
67
102
  }
68
103
  );
@@ -88,22 +123,13 @@ var Dialog = (rawProps) => {
88
123
  } = withDialogDefaults(rawProps);
89
124
  const theme = useTheme();
90
125
  const testId = resolveTestId(others, "dialog");
91
- const { PaperProps: callerPaper, slotProps, ...props } = withoutTestIdProps(others);
92
- const paperSx = variantStylesOf(theme, {
93
- variant,
94
- size,
95
- borderRadius,
96
- glass,
97
- gradient,
98
- glow,
99
- pulse
100
- });
101
- const handleClose = (event, reason) => {
102
- if (persistent && (reason === "backdropClick" || reason === "escapeKeyDown")) {
103
- return;
104
- }
105
- onClose?.();
126
+ const props = withoutTestIdProps(others);
127
+ const looks = {
128
+ paperSx: variantStylesOf(theme, { variant, size, borderRadius, glass, gradient, glow, pulse }),
129
+ backdropSx: backdropSxOf(theme, glass),
130
+ testId
106
131
  };
132
+ const handleClose = closeHandlerOf(persistent, onClose);
107
133
  const header = title ? /* @__PURE__ */ jsx(
108
134
  DialogHeader,
109
135
  {
@@ -116,29 +142,22 @@ var Dialog = (rawProps) => {
116
142
  ) : null;
117
143
  const body = bodyOf(children, Boolean(title));
118
144
  if (variant === "drawer") {
119
- return /* @__PURE__ */ jsxs(
120
- DrawerDialog,
121
- {
122
- paperSx,
123
- testId,
124
- drawerProps: { ...props, PaperProps: callerPaper, slotProps, open, onClose },
125
- children: [
126
- header,
127
- body
128
- ]
129
- }
130
- );
145
+ return /* @__PURE__ */ jsxs(DrawerDialog, { ...looks, drawerProps: { ...props, open, onClose: handleClose }, children: [
146
+ header,
147
+ body
148
+ ] });
131
149
  }
132
150
  return /* @__PURE__ */ jsxs(
133
- MuiDialog,
151
+ ModalDialog,
134
152
  {
135
- open,
136
- onClose: handleClose,
137
- fullScreen: variant === "fullscreen",
138
- BackdropComponent: backdrop ? Backdrop : void 0,
139
- BackdropProps: { sx: backdropSxOf(theme, glass) },
140
- ...props,
141
- slotProps: { ...slotProps, paper: mergedPaperSlot(paperSx, testId, callerPaper, slotProps?.paper) },
153
+ ...looks,
154
+ dialogProps: {
155
+ open,
156
+ onClose: handleClose,
157
+ fullScreen: variant === "fullscreen",
158
+ BackdropComponent: backdrop ? Backdrop : void 0,
159
+ ...props
160
+ },
142
161
  children: [
143
162
  header,
144
163
  body
@@ -278,4 +297,4 @@ export {
278
297
  DialogContent,
279
298
  DialogActions
280
299
  };
281
- //# sourceMappingURL=chunk-UEROWH53.js.map
300
+ //# sourceMappingURL=chunk-GAMLBJE6.js.map