@12-apps/ui 6.96.0 → 6.96.2
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/NATIVE.md +1 -1
- package/dist/_internal/components/data-display/Avatar/Avatar.js +1 -1
- package/dist/_internal/components/data-display/Chip/Chip.js +3 -3
- package/dist/_internal/components/data-display/Chip/Chip.metrics.js +5 -1
- package/dist/_internal/components/data-display/Chip/Chip.styles.js +2 -2
- package/dist/_internal/components/data-display/index.js +4 -4
- package/dist/_internal/components/index.js +13 -13
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +8 -8
- package/dist/_internal/components/layout/SettingCard/SettingCard.metrics.js +1 -1
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +6 -6
- package/dist/_internal/components/layout/SettingCard/SettingCard.styles.js +2 -2
- package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +7 -7
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +7 -7
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +9 -9
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +8 -8
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +9 -9
- package/dist/_internal/components/layout/index.js +12 -12
- package/dist/_internal/user-avatar/user-avatar.js +2 -2
- package/dist/{chunk-X2GWR75Q.js → chunk-2C7AWMV7.js} +8 -3
- package/dist/chunk-2C7AWMV7.js.map +1 -0
- package/dist/{chunk-ZDAAHCIS.js → chunk-44BTMZB6.js} +4 -4
- package/dist/{chunk-DHAXUVMR.js → chunk-44I2KXKW.js} +24 -6
- package/dist/chunk-44I2KXKW.js.map +1 -0
- package/dist/{chunk-JIEVKHOH.js → chunk-EXEBN5ZP.js} +16 -1
- package/dist/chunk-EXEBN5ZP.js.map +1 -0
- package/dist/{chunk-3EIRRLCQ.js → chunk-F3UHWLTD.js} +4 -4
- package/dist/{chunk-E5I776YW.js → chunk-GZBLDPXY.js} +6 -2
- package/dist/{chunk-E5I776YW.js.map → chunk-GZBLDPXY.js.map} +1 -1
- package/dist/{chunk-CW5Z67NA.js → chunk-IAPFZJ6I.js} +4 -4
- package/dist/{chunk-E2UOEI7N.js → chunk-JJYECKEL.js} +2 -2
- package/dist/chunk-KSZ6GH3J.js +44 -0
- package/dist/chunk-KSZ6GH3J.js.map +1 -0
- package/dist/{chunk-NI67M453.js → chunk-L2ICH44N.js} +3 -3
- package/dist/{chunk-6ZAKPYWX.js → chunk-RCULGFEH.js} +4 -4
- package/dist/{chunk-E4NFH77Z.js → chunk-SSWNJR36.js} +3 -3
- package/dist/{chunk-IQWPVPV5.js → chunk-UJ7EHEXG.js} +2 -2
- package/dist/{chunk-SKIAWOUC.js → chunk-XSLF3YGH.js} +4 -4
- package/dist/data-display/Avatar.js +1 -1
- package/dist/data-display/Chip.js +3 -3
- package/dist/layout/SettingCard.js +12 -12
- package/dist/native/data-display/Chip.js +7 -3
- package/dist/native/data-display/Chip.js.map +1 -1
- package/dist/types/components/data-display/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/data-display/Chip/Chip.base.d.ts +4 -2
- package/dist/types/components/data-display/Chip/Chip.base.d.ts.map +1 -1
- package/dist/types/components/data-display/Chip/Chip.metrics.d.ts +11 -0
- package/dist/types/components/data-display/Chip/Chip.metrics.d.ts.map +1 -1
- package/dist/types/components/data-display/Chip/Chip.styles.d.ts.map +1 -1
- package/dist/types/components/layout/SettingCard/SettingCard.metrics.d.ts +19 -2
- package/dist/types/components/layout/SettingCard/SettingCard.metrics.d.ts.map +1 -1
- package/dist/types/components/layout/SettingCard/SettingCard.summary.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Chip/Chip.base.d.ts +4 -2
- package/dist/types-native/components/data-display/Chip/Chip.base.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Chip/Chip.look.native.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Chip/Chip.metrics.d.ts +11 -0
- package/dist/types-native/components/data-display/Chip/Chip.metrics.d.ts.map +1 -1
- package/dist/user-avatar.js +2 -2
- package/package.json +1 -1
- package/src/components/data-display/Avatar/Avatar.tsx +22 -3
- package/src/components/data-display/Chip/Chip.base.ts +4 -2
- package/src/components/data-display/Chip/Chip.look.native.ts +8 -3
- package/src/components/data-display/Chip/Chip.metrics.ts +8 -0
- package/src/components/data-display/Chip/Chip.styles.tsx +41 -3
- package/src/components/data-display/Chip/chip.md +1 -1
- package/src/components/layout/SettingCard/SettingCard.metrics.ts +19 -2
- package/src/components/layout/SettingCard/SettingCard.summary.tsx +5 -0
- package/dist/chunk-BFRVMCQM.js +0 -27
- package/dist/chunk-BFRVMCQM.js.map +0 -1
- package/dist/chunk-DHAXUVMR.js.map +0 -1
- package/dist/chunk-JIEVKHOH.js.map +0 -1
- package/dist/chunk-X2GWR75Q.js.map +0 -1
- /package/dist/{chunk-ZDAAHCIS.js.map → chunk-44BTMZB6.js.map} +0 -0
- /package/dist/{chunk-3EIRRLCQ.js.map → chunk-F3UHWLTD.js.map} +0 -0
- /package/dist/{chunk-CW5Z67NA.js.map → chunk-IAPFZJ6I.js.map} +0 -0
- /package/dist/{chunk-E2UOEI7N.js.map → chunk-JJYECKEL.js.map} +0 -0
- /package/dist/{chunk-NI67M453.js.map → chunk-L2ICH44N.js.map} +0 -0
- /package/dist/{chunk-6ZAKPYWX.js.map → chunk-RCULGFEH.js.map} +0 -0
- /package/dist/{chunk-E4NFH77Z.js.map → chunk-SSWNJR36.js.map} +0 -0
- /package/dist/{chunk-IQWPVPV5.js.map → chunk-UJ7EHEXG.js.map} +0 -0
- /package/dist/{chunk-SKIAWOUC.js.map → chunk-XSLF3YGH.js.map} +0 -0
package/NATIVE.md
CHANGED
|
@@ -89,7 +89,7 @@ Ported: **28 of 154** public subpaths carry a `react-native` condition.
|
|
|
89
89
|
| `@12-apps/ui/data-display/Alert` | 42 | 2 | `glass` paints its 0.85 paper wash and hairline without the 20px backdrop blur and saturation — React Native has no backdrop filter.; `gradient` paints its first stop (`alpha(light, 0.9)`) flat and has no shimmer sweep — React Native core has no gradient fill and no pseudo-elements.; Hover (a 6% tint layer), press (a 20% one, easing back) and `:focus-visible` (the keyboard ring) have no touch equivalent; the close button's pressed state stands in for its hover.; The hairline the web draws around a `Button` placed inside the message is a descendant selector; native children are rendered as given. Consecutive text children DO flow as one sentence (`src/platform/text-children.tsx`); an element child breaks the run, as a block would on the web.; After dismissal the web keeps a collapsed, hidden node in the DOM; native unmounts once the 300ms collapse has run.; Title, description and children are set in MUI's default `body1`/`body2` numbers; a host that re-themes MUI's typography variants moves the web only. |
|
|
90
90
|
| `@12-apps/ui/data-display/Avatar` | 45 | 1 | Hover has no touch equivalent: the interactive lift (`scale(1.1) translateY(-2px)`, the `0 8px 20px` shadow and the brightness), the `:active` squeeze and the `:focus-visible` ring are all web-only. The avatar still reports itself as a button and takes a tab stop.; The shimmer that runs across a loading avatar is a moving gradient; React Native core has neither, so the box keeps its accent and only the overlay and its spinner say it is loading. `backdrop-filter: blur(2px)` behind that overlay has no equivalent either — the wash is the flat `alpha(paper, 0.7)`.; `glow` paints the halo but not the `brightness(1.05)` filter that goes with it; React Native has no filters.; `pulse` is a ring behind the avatar scaling out to 10px and fading, rather than MUI's growing `box-shadow` on an `::after` — the same colour, cadence and travel, drawn by a sibling.; The status dot is a bordered circle placed at MUI's `overlap="circular"` inset; MUI's `Badge` additionally draws a `::after` ripple layer over it.; `AvatarGroup` overlaps and counts exactly as the web does, but the web ALSO gives every child a paper ring through a `& > *` descendant rule. A native renderer cannot restyle children, so an avatar in a group takes `bordered` from its own prop.; The default and broken-image glyphs are the house `Icon` at 24px, which is what MUI's `SvgIcon` draws them at here; the initials are set in the theme's own font rather than MUI's `Avatar` typography. |
|
|
91
91
|
| `@12-apps/ui/data-display/Badge` | 55 | 1 | `gradient` paints the 135° run's first stop flat and `glass` keeps its 10% wash and 20% hairline without the `blur(10px) saturate(200%)` backdrop or the inset white highlight — React Native has no gradient fill, no backdrop filter and no inset shadow.; `shimmer` is a gradient sweeping across a pseudo-element and is not drawn at all; the chip keeps its variant's paint.; `glow` draws the 15px halo but not the `brightness(1.1)` filter beside it, and `glow` WITH `pulse` breathes only the scale and the opacity — the halo itself cannot be animated, because a box shadow is not an animatable style there.; Hover has no touch equivalent: the chip's `scale(1.1)` under the pointer and the glow's brighter hover halo are web-only.; `count` is drawn as a pill (`height / 2`); MUI asks for `border-radius: 50%`, which on a chip wider than it is tall is an ellipse React Native cannot express.; MUI's `transition: all 0.3s` on the chip has no equivalent: a colour or size change is drawn immediately. The mount, pulse and close animations are `Animated` and do run.; `onClick` on the badge reaches the DOM through react-native-web and fires there, as it does on the web; a device has no click, so a shared screen that needs a press should put one on its own child. |
|
|
92
|
-
| `@12-apps/ui/data-display/Chip` | 25 |
|
|
92
|
+
| `@12-apps/ui/data-display/Chip` | 25 | 1 | Hover has no touch equivalent, so a press stands in for it: the chip takes MUI's hover wash (`palette[color].dark` filled, `alpha(main, 0.04)` outlined) while pressed, but not this package's own 1px lift or the `0 4px 12px` shadow under it, which are `:hover`-only.; The keyboard contract — Enter and Space activate, Delete and Backspace remove — is shared (`chipKeyAction`) and answered under react-native-web, half by its `Pressable` and half by the chip's own handler. On a DEVICE none of it runs: React Native delivers no key events to a `View`, so a chip there is pressed and removed by touch.; MUI restyles the leading icon ELEMENT through a class — 24px, 18px when small, and `inherit` ink on a coloured chip. A native renderer cannot restyle an arbitrary node, so the slot carries MUI's margins and the glyph keeps the size and colour it was given.; An `avatarSrc` is drawn as a round `Image` at MUI's 24px (18px small) box; MUI's own `Avatar` additionally shows an initials fallback and repaints itself in `primary.dark`/`secondary.dark` for those two colours.; MUI's `transition: background-color, box-shadow` and this package's `all 0.2s cubic-bezier(0.4, 0, 0.2, 1)` have no equivalent: a colour change is drawn immediately.; A keyboard activation (Space on a selectable chip, Delete on a deletable one) fires `onClick` and `onDelete` but not `onPress`: it only exists under react-native-web, where the chip synthesizes the activation `Pressable` will not, and so has no `GestureResponderEvent` to pass. A press on a device fires both. |
|
|
93
93
|
| `@12-apps/ui/data-display/EmptyState` | 23 | 0 | The actions are house `Button`s (solid/outline, `sm`) sized to MUI's medium contained and outlined buttons — same padding, 14px type, radius, half-alpha border, elevation-2 shadow, 20px icon and 120px floor; MUI additionally uppercases the label and sets the icon 8px from the label where the house button sets 4.; The help link opens through `Linking.openURL` on a device; `target`/`rel` are web-only and reach the DOM through react-native-web's anchor.; Title, description and link are set in MUI's default `h6`/`body2`/`body1` numbers; a host that re-themes MUI's typography variants moves the web only. |
|
|
94
94
|
| `@12-apps/ui/data-display/ErrorState` | 13 | 0 | The retry is the house `Button` (outline, `sm`) sized to MUI's medium outlined button — same 5px/15px padding, 14px type, radius, 20px icon and 120px floor; MUI additionally uppercases the label, draws its border at `alpha(main, 0.5)`, and sets the icon 8px from the label where the house button sets 4.; Title and message are set in MUI's default `h6`/`body2` numbers; a host that re-themes MUI's typography variants moves the web only. |
|
|
95
95
|
| `@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. |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Chip
|
|
3
|
-
} from "../../../../chunk-
|
|
4
|
-
import "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-L2ICH44N.js";
|
|
4
|
+
import "../../../../chunk-44I2KXKW.js";
|
|
5
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
6
6
|
import "../../../../chunk-BF4FYOAR.js";
|
|
7
7
|
import "../../../../chunk-XJAD6E3V.js";
|
|
8
8
|
import "../../../../chunk-F5H2ZXST.js";
|
|
@@ -11,10 +11,12 @@ import {
|
|
|
11
11
|
HOVER_SHADOW,
|
|
12
12
|
OUTLINED_BORDER_ALPHA,
|
|
13
13
|
OUTLINED_HOVER_ALPHA,
|
|
14
|
+
SOFT_FOCUS_RING,
|
|
14
15
|
SOFT_GROUND_ALPHA,
|
|
15
16
|
SOFT_HOVER_ALPHA,
|
|
17
|
+
SOFT_WARNING_LIGHT_DARKEN,
|
|
16
18
|
chipMuiSize
|
|
17
|
-
} from "../../../../chunk-
|
|
19
|
+
} from "../../../../chunk-GZBLDPXY.js";
|
|
18
20
|
import "../../../../chunk-PZ5AY32C.js";
|
|
19
21
|
export {
|
|
20
22
|
CHIP_DISABLED_OPACITY,
|
|
@@ -29,8 +31,10 @@ export {
|
|
|
29
31
|
HOVER_SHADOW,
|
|
30
32
|
OUTLINED_BORDER_ALPHA,
|
|
31
33
|
OUTLINED_HOVER_ALPHA,
|
|
34
|
+
SOFT_FOCUS_RING,
|
|
32
35
|
SOFT_GROUND_ALPHA,
|
|
33
36
|
SOFT_HOVER_ALPHA,
|
|
37
|
+
SOFT_WARNING_LIGHT_DARKEN,
|
|
34
38
|
chipMuiSize
|
|
35
39
|
};
|
|
36
40
|
//# sourceMappingURL=Chip.metrics.js.map
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
chipStyles,
|
|
4
4
|
iconWithTestId,
|
|
5
5
|
makeKeyDownHandler
|
|
6
|
-
} from "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
6
|
+
} from "../../../../chunk-44I2KXKW.js";
|
|
7
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
8
8
|
import "../../../../chunk-BF4FYOAR.js";
|
|
9
9
|
import "../../../../chunk-XJAD6E3V.js";
|
|
10
10
|
import "../../../../chunk-F5H2ZXST.js";
|
|
@@ -200,9 +200,9 @@ import {
|
|
|
200
200
|
} from "../../../chunk-M2M4IDFU.js";
|
|
201
201
|
import {
|
|
202
202
|
Chip
|
|
203
|
-
} from "../../../chunk-
|
|
204
|
-
import "../../../chunk-
|
|
205
|
-
import "../../../chunk-
|
|
203
|
+
} from "../../../chunk-L2ICH44N.js";
|
|
204
|
+
import "../../../chunk-44I2KXKW.js";
|
|
205
|
+
import "../../../chunk-GZBLDPXY.js";
|
|
206
206
|
import "../../../chunk-BF4FYOAR.js";
|
|
207
207
|
import "../../../chunk-ARGVUTTL.js";
|
|
208
208
|
import "../../../chunk-PZS7N74L.js";
|
|
@@ -314,7 +314,7 @@ import {
|
|
|
314
314
|
import {
|
|
315
315
|
Avatar,
|
|
316
316
|
AvatarGroup
|
|
317
|
-
} from "../../../chunk-
|
|
317
|
+
} from "../../../chunk-EXEBN5ZP.js";
|
|
318
318
|
import "../../../chunk-7XSCEHGA.js";
|
|
319
319
|
import "../../../chunk-MTEQEPNY.js";
|
|
320
320
|
import "../../../chunk-6ZZGK5DT.js";
|
|
@@ -187,24 +187,24 @@ import "../../chunk-QUWK7SYN.js";
|
|
|
187
187
|
import "../../chunk-QGUNUXTT.js";
|
|
188
188
|
import {
|
|
189
189
|
SettingCard
|
|
190
|
-
} from "../../chunk-
|
|
190
|
+
} from "../../chunk-XSLF3YGH.js";
|
|
191
191
|
import {
|
|
192
192
|
SettingToggle
|
|
193
|
-
} from "../../chunk-
|
|
193
|
+
} from "../../chunk-SSWNJR36.js";
|
|
194
194
|
import {
|
|
195
195
|
SettingGroup
|
|
196
|
-
} from "../../chunk-
|
|
196
|
+
} from "../../chunk-RCULGFEH.js";
|
|
197
197
|
import "../../chunk-SALQ65SM.js";
|
|
198
|
-
import "../../chunk-
|
|
199
|
-
import "../../chunk-
|
|
198
|
+
import "../../chunk-44BTMZB6.js";
|
|
199
|
+
import "../../chunk-2C7AWMV7.js";
|
|
200
200
|
import "../../chunk-XJQNSMGA.js";
|
|
201
201
|
import {
|
|
202
202
|
SETTING_GRID_CONTAINER,
|
|
203
203
|
SettingGrid
|
|
204
|
-
} from "../../chunk-
|
|
205
|
-
import "../../chunk-
|
|
206
|
-
import "../../chunk-
|
|
207
|
-
import "../../chunk-
|
|
204
|
+
} from "../../chunk-IAPFZJ6I.js";
|
|
205
|
+
import "../../chunk-F3UHWLTD.js";
|
|
206
|
+
import "../../chunk-UJ7EHEXG.js";
|
|
207
|
+
import "../../chunk-KSZ6GH3J.js";
|
|
208
208
|
import "../../chunk-UJP2VS2H.js";
|
|
209
209
|
import {
|
|
210
210
|
UploadButton
|
|
@@ -641,9 +641,9 @@ import {
|
|
|
641
641
|
import "../../chunk-2GTORM5E.js";
|
|
642
642
|
import {
|
|
643
643
|
Chip
|
|
644
|
-
} from "../../chunk-
|
|
645
|
-
import "../../chunk-
|
|
646
|
-
import "../../chunk-
|
|
644
|
+
} from "../../chunk-L2ICH44N.js";
|
|
645
|
+
import "../../chunk-44I2KXKW.js";
|
|
646
|
+
import "../../chunk-GZBLDPXY.js";
|
|
647
647
|
import "../../chunk-BF4FYOAR.js";
|
|
648
648
|
import "../../chunk-NCS2TBIP.js";
|
|
649
649
|
import {
|
|
@@ -924,7 +924,7 @@ import "../../chunk-DVRNW33K.js";
|
|
|
924
924
|
import {
|
|
925
925
|
Avatar,
|
|
926
926
|
AvatarGroup
|
|
927
|
-
} from "../../chunk-
|
|
927
|
+
} from "../../chunk-EXEBN5ZP.js";
|
|
928
928
|
import "../../chunk-7XSCEHGA.js";
|
|
929
929
|
import "../../chunk-MTEQEPNY.js";
|
|
930
930
|
import "../../chunk-6ZZGK5DT.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SettingCard
|
|
3
|
-
} from "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-XSLF3YGH.js";
|
|
4
4
|
import "../../../../chunk-SALQ65SM.js";
|
|
5
|
-
import "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
5
|
+
import "../../../../chunk-2C7AWMV7.js";
|
|
6
|
+
import "../../../../chunk-F3UHWLTD.js";
|
|
7
|
+
import "../../../../chunk-UJ7EHEXG.js";
|
|
8
|
+
import "../../../../chunk-KSZ6GH3J.js";
|
|
9
9
|
import "../../../../chunk-RN7UJI7S.js";
|
|
10
10
|
import "../../../../chunk-JYWF76Z5.js";
|
|
11
11
|
import "../../../../chunk-GGMB6LJH.js";
|
|
@@ -14,9 +14,9 @@ import "../../../../chunk-Z5WUSI47.js";
|
|
|
14
14
|
import "../../../../chunk-BCWL7HUO.js";
|
|
15
15
|
import "../../../../chunk-QYJ25FWM.js";
|
|
16
16
|
import "../../../../chunk-2GTORM5E.js";
|
|
17
|
-
import "../../../../chunk-
|
|
18
|
-
import "../../../../chunk-
|
|
19
|
-
import "../../../../chunk-
|
|
17
|
+
import "../../../../chunk-L2ICH44N.js";
|
|
18
|
+
import "../../../../chunk-44I2KXKW.js";
|
|
19
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
20
20
|
import "../../../../chunk-BF4FYOAR.js";
|
|
21
21
|
import "../../../../chunk-LV7LSPBF.js";
|
|
22
22
|
import "../../../../chunk-PGGGKYWG.js";
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
SaveError,
|
|
5
5
|
SettingHeader,
|
|
6
6
|
partTestId
|
|
7
|
-
} from "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
9
|
-
import "../../../../chunk-
|
|
7
|
+
} from "../../../../chunk-F3UHWLTD.js";
|
|
8
|
+
import "../../../../chunk-UJ7EHEXG.js";
|
|
9
|
+
import "../../../../chunk-KSZ6GH3J.js";
|
|
10
10
|
import "../../../../chunk-RN7UJI7S.js";
|
|
11
11
|
import "../../../../chunk-JYWF76Z5.js";
|
|
12
12
|
import "../../../../chunk-GGMB6LJH.js";
|
|
13
13
|
import "../../../../chunk-2GTORM5E.js";
|
|
14
|
-
import "../../../../chunk-
|
|
15
|
-
import "../../../../chunk-
|
|
16
|
-
import "../../../../chunk-
|
|
14
|
+
import "../../../../chunk-L2ICH44N.js";
|
|
15
|
+
import "../../../../chunk-44I2KXKW.js";
|
|
16
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
17
17
|
import "../../../../chunk-BF4FYOAR.js";
|
|
18
18
|
import "../../../../chunk-PGGGKYWG.js";
|
|
19
19
|
import "../../../../chunk-YEKPQAOW.js";
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
surfaceStyles,
|
|
15
15
|
titleStyles,
|
|
16
16
|
withCallerSx
|
|
17
|
-
} from "../../../../chunk-
|
|
18
|
-
import "../../../../chunk-
|
|
17
|
+
} from "../../../../chunk-UJ7EHEXG.js";
|
|
18
|
+
import "../../../../chunk-KSZ6GH3J.js";
|
|
19
19
|
import "../../../../chunk-HDBP55R3.js";
|
|
20
20
|
import "../../../../chunk-F5H2ZXST.js";
|
|
21
21
|
import "../../../../chunk-N3GAFIXG.js";
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
SummaryInfo,
|
|
3
3
|
useClamped,
|
|
4
4
|
useSummaryInfo
|
|
5
|
-
} from "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
5
|
+
} from "../../../../chunk-2C7AWMV7.js";
|
|
6
|
+
import "../../../../chunk-F3UHWLTD.js";
|
|
7
|
+
import "../../../../chunk-UJ7EHEXG.js";
|
|
8
|
+
import "../../../../chunk-KSZ6GH3J.js";
|
|
9
9
|
import "../../../../chunk-RN7UJI7S.js";
|
|
10
10
|
import "../../../../chunk-JYWF76Z5.js";
|
|
11
11
|
import "../../../../chunk-GGMB6LJH.js";
|
|
@@ -14,9 +14,9 @@ import "../../../../chunk-Z5WUSI47.js";
|
|
|
14
14
|
import "../../../../chunk-BCWL7HUO.js";
|
|
15
15
|
import "../../../../chunk-QYJ25FWM.js";
|
|
16
16
|
import "../../../../chunk-2GTORM5E.js";
|
|
17
|
-
import "../../../../chunk-
|
|
18
|
-
import "../../../../chunk-
|
|
19
|
-
import "../../../../chunk-
|
|
17
|
+
import "../../../../chunk-L2ICH44N.js";
|
|
18
|
+
import "../../../../chunk-44I2KXKW.js";
|
|
19
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
20
20
|
import "../../../../chunk-BF4FYOAR.js";
|
|
21
21
|
import "../../../../chunk-PGGGKYWG.js";
|
|
22
22
|
import "../../../../chunk-YEKPQAOW.js";
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
SETTING_GRID_CONTAINER,
|
|
3
3
|
SettingGrid,
|
|
4
4
|
settingGridStyles
|
|
5
|
-
} from "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
5
|
+
} from "../../../../chunk-IAPFZJ6I.js";
|
|
6
|
+
import "../../../../chunk-F3UHWLTD.js";
|
|
7
|
+
import "../../../../chunk-UJ7EHEXG.js";
|
|
8
|
+
import "../../../../chunk-KSZ6GH3J.js";
|
|
9
9
|
import "../../../../chunk-RN7UJI7S.js";
|
|
10
10
|
import "../../../../chunk-JYWF76Z5.js";
|
|
11
11
|
import "../../../../chunk-GGMB6LJH.js";
|
|
12
12
|
import "../../../../chunk-2GTORM5E.js";
|
|
13
|
-
import "../../../../chunk-
|
|
14
|
-
import "../../../../chunk-
|
|
15
|
-
import "../../../../chunk-
|
|
13
|
+
import "../../../../chunk-L2ICH44N.js";
|
|
14
|
+
import "../../../../chunk-44I2KXKW.js";
|
|
15
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
16
16
|
import "../../../../chunk-BF4FYOAR.js";
|
|
17
17
|
import "../../../../chunk-PGGGKYWG.js";
|
|
18
18
|
import "../../../../chunk-YEKPQAOW.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SettingGroup
|
|
3
|
-
} from "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-RCULGFEH.js";
|
|
4
4
|
import "../../../../chunk-SALQ65SM.js";
|
|
5
|
-
import "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
5
|
+
import "../../../../chunk-44BTMZB6.js";
|
|
6
|
+
import "../../../../chunk-2C7AWMV7.js";
|
|
7
7
|
import "../../../../chunk-XJQNSMGA.js";
|
|
8
|
-
import "../../../../chunk-
|
|
9
|
-
import "../../../../chunk-
|
|
10
|
-
import "../../../../chunk-
|
|
8
|
+
import "../../../../chunk-F3UHWLTD.js";
|
|
9
|
+
import "../../../../chunk-UJ7EHEXG.js";
|
|
10
|
+
import "../../../../chunk-KSZ6GH3J.js";
|
|
11
11
|
import "../../../../chunk-RN7UJI7S.js";
|
|
12
12
|
import "../../../../chunk-JYWF76Z5.js";
|
|
13
13
|
import "../../../../chunk-GGMB6LJH.js";
|
|
@@ -17,9 +17,9 @@ import "../../../../chunk-Z5WUSI47.js";
|
|
|
17
17
|
import "../../../../chunk-BCWL7HUO.js";
|
|
18
18
|
import "../../../../chunk-QYJ25FWM.js";
|
|
19
19
|
import "../../../../chunk-2GTORM5E.js";
|
|
20
|
-
import "../../../../chunk-
|
|
21
|
-
import "../../../../chunk-
|
|
22
|
-
import "../../../../chunk-
|
|
20
|
+
import "../../../../chunk-L2ICH44N.js";
|
|
21
|
+
import "../../../../chunk-44I2KXKW.js";
|
|
22
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
23
23
|
import "../../../../chunk-BF4FYOAR.js";
|
|
24
24
|
import "../../../../chunk-4PJ52YBO.js";
|
|
25
25
|
import "../../../../chunk-EIMFA7KP.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SettingSwitchBlock,
|
|
3
3
|
useSettingSwitchIds
|
|
4
|
-
} from "../../../../chunk-
|
|
5
|
-
import "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
7
|
-
import "../../../../chunk-
|
|
8
|
-
import "../../../../chunk-
|
|
4
|
+
} from "../../../../chunk-44BTMZB6.js";
|
|
5
|
+
import "../../../../chunk-2C7AWMV7.js";
|
|
6
|
+
import "../../../../chunk-F3UHWLTD.js";
|
|
7
|
+
import "../../../../chunk-UJ7EHEXG.js";
|
|
8
|
+
import "../../../../chunk-KSZ6GH3J.js";
|
|
9
9
|
import "../../../../chunk-RN7UJI7S.js";
|
|
10
10
|
import "../../../../chunk-JYWF76Z5.js";
|
|
11
11
|
import "../../../../chunk-GGMB6LJH.js";
|
|
@@ -15,9 +15,9 @@ import "../../../../chunk-Z5WUSI47.js";
|
|
|
15
15
|
import "../../../../chunk-BCWL7HUO.js";
|
|
16
16
|
import "../../../../chunk-QYJ25FWM.js";
|
|
17
17
|
import "../../../../chunk-2GTORM5E.js";
|
|
18
|
-
import "../../../../chunk-
|
|
19
|
-
import "../../../../chunk-
|
|
20
|
-
import "../../../../chunk-
|
|
18
|
+
import "../../../../chunk-L2ICH44N.js";
|
|
19
|
+
import "../../../../chunk-44I2KXKW.js";
|
|
20
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
21
21
|
import "../../../../chunk-BF4FYOAR.js";
|
|
22
22
|
import "../../../../chunk-4PJ52YBO.js";
|
|
23
23
|
import "../../../../chunk-EIMFA7KP.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SettingToggle
|
|
3
|
-
} from "../../../../chunk-
|
|
3
|
+
} from "../../../../chunk-SSWNJR36.js";
|
|
4
4
|
import "../../../../chunk-SALQ65SM.js";
|
|
5
|
-
import "../../../../chunk-
|
|
6
|
-
import "../../../../chunk-
|
|
5
|
+
import "../../../../chunk-44BTMZB6.js";
|
|
6
|
+
import "../../../../chunk-2C7AWMV7.js";
|
|
7
7
|
import "../../../../chunk-XJQNSMGA.js";
|
|
8
|
-
import "../../../../chunk-
|
|
9
|
-
import "../../../../chunk-
|
|
10
|
-
import "../../../../chunk-
|
|
8
|
+
import "../../../../chunk-F3UHWLTD.js";
|
|
9
|
+
import "../../../../chunk-UJ7EHEXG.js";
|
|
10
|
+
import "../../../../chunk-KSZ6GH3J.js";
|
|
11
11
|
import "../../../../chunk-RN7UJI7S.js";
|
|
12
12
|
import "../../../../chunk-JYWF76Z5.js";
|
|
13
13
|
import "../../../../chunk-GGMB6LJH.js";
|
|
@@ -17,9 +17,9 @@ import "../../../../chunk-Z5WUSI47.js";
|
|
|
17
17
|
import "../../../../chunk-BCWL7HUO.js";
|
|
18
18
|
import "../../../../chunk-QYJ25FWM.js";
|
|
19
19
|
import "../../../../chunk-2GTORM5E.js";
|
|
20
|
-
import "../../../../chunk-
|
|
21
|
-
import "../../../../chunk-
|
|
22
|
-
import "../../../../chunk-
|
|
20
|
+
import "../../../../chunk-L2ICH44N.js";
|
|
21
|
+
import "../../../../chunk-44I2KXKW.js";
|
|
22
|
+
import "../../../../chunk-GZBLDPXY.js";
|
|
23
23
|
import "../../../../chunk-BF4FYOAR.js";
|
|
24
24
|
import "../../../../chunk-4PJ52YBO.js";
|
|
25
25
|
import "../../../../chunk-EIMFA7KP.js";
|
|
@@ -43,24 +43,24 @@ import "../../../chunk-QUWK7SYN.js";
|
|
|
43
43
|
import "../../../chunk-QGUNUXTT.js";
|
|
44
44
|
import {
|
|
45
45
|
SettingCard
|
|
46
|
-
} from "../../../chunk-
|
|
46
|
+
} from "../../../chunk-XSLF3YGH.js";
|
|
47
47
|
import {
|
|
48
48
|
SettingToggle
|
|
49
|
-
} from "../../../chunk-
|
|
49
|
+
} from "../../../chunk-SSWNJR36.js";
|
|
50
50
|
import {
|
|
51
51
|
SettingGroup
|
|
52
|
-
} from "../../../chunk-
|
|
52
|
+
} from "../../../chunk-RCULGFEH.js";
|
|
53
53
|
import "../../../chunk-SALQ65SM.js";
|
|
54
|
-
import "../../../chunk-
|
|
55
|
-
import "../../../chunk-
|
|
54
|
+
import "../../../chunk-44BTMZB6.js";
|
|
55
|
+
import "../../../chunk-2C7AWMV7.js";
|
|
56
56
|
import "../../../chunk-XJQNSMGA.js";
|
|
57
57
|
import {
|
|
58
58
|
SETTING_GRID_CONTAINER,
|
|
59
59
|
SettingGrid
|
|
60
|
-
} from "../../../chunk-
|
|
61
|
-
import "../../../chunk-
|
|
62
|
-
import "../../../chunk-
|
|
63
|
-
import "../../../chunk-
|
|
60
|
+
} from "../../../chunk-IAPFZJ6I.js";
|
|
61
|
+
import "../../../chunk-F3UHWLTD.js";
|
|
62
|
+
import "../../../chunk-UJ7EHEXG.js";
|
|
63
|
+
import "../../../chunk-KSZ6GH3J.js";
|
|
64
64
|
import "../../../chunk-QS5OHHBY.js";
|
|
65
65
|
import {
|
|
66
66
|
Accordion,
|
|
@@ -97,9 +97,9 @@ import "../../../chunk-QD4TM6UK.js";
|
|
|
97
97
|
import "../../../chunk-EMPVMZAB.js";
|
|
98
98
|
import "../../../chunk-7WDPC46N.js";
|
|
99
99
|
import "../../../chunk-2GTORM5E.js";
|
|
100
|
-
import "../../../chunk-
|
|
101
|
-
import "../../../chunk-
|
|
102
|
-
import "../../../chunk-
|
|
100
|
+
import "../../../chunk-L2ICH44N.js";
|
|
101
|
+
import "../../../chunk-44I2KXKW.js";
|
|
102
|
+
import "../../../chunk-GZBLDPXY.js";
|
|
103
103
|
import "../../../chunk-BF4FYOAR.js";
|
|
104
104
|
import "../../../chunk-4NS4PJJH.js";
|
|
105
105
|
import {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
UserAvatar,
|
|
4
4
|
UserMenu
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-JJYECKEL.js";
|
|
6
6
|
import "../../chunk-DQ22UKMZ.js";
|
|
7
7
|
import "../../chunk-UDQSIRAP.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-EXEBN5ZP.js";
|
|
9
9
|
import "../../chunk-7XSCEHGA.js";
|
|
10
10
|
import "../../chunk-MTEQEPNY.js";
|
|
11
11
|
import "../../chunk-6ZZGK5DT.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
partTestId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F3UHWLTD.js";
|
|
4
4
|
import {
|
|
5
5
|
SETTING_CARD
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KSZ6GH3J.js";
|
|
7
7
|
import {
|
|
8
8
|
InteractiveTooltip
|
|
9
9
|
} from "./chunk-Z5WUSI47.js";
|
|
@@ -59,6 +59,11 @@ var SummaryInfo = ({
|
|
|
59
59
|
display: "inline-flex",
|
|
60
60
|
alignItems: "center",
|
|
61
61
|
justifyContent: "center",
|
|
62
|
+
// A real box, not an overlay: a 16 px glyph in a 40 px target whose extra
|
|
63
|
+
// height is handed back as margin, so the title row keeps its height.
|
|
64
|
+
minWidth: rem(theme, SETTING_CARD.infoTapTarget),
|
|
65
|
+
minHeight: rem(theme, SETTING_CARD.infoTapTarget),
|
|
66
|
+
margin: `${rem(theme, SETTING_CARD.infoTapMarginBlock)} ${rem(theme, SETTING_CARD.infoTapMarginInline)}`,
|
|
62
67
|
padding: 0,
|
|
63
68
|
border: 0,
|
|
64
69
|
background: "none",
|
|
@@ -92,4 +97,4 @@ export {
|
|
|
92
97
|
SummaryInfo,
|
|
93
98
|
useSummaryInfo
|
|
94
99
|
};
|
|
95
|
-
//# sourceMappingURL=chunk-
|
|
100
|
+
//# sourceMappingURL=chunk-2C7AWMV7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/SettingCard/SettingCard.summary.tsx"],"sourcesContent":["import Box from '@mui/material/Box/index.js';\nimport { useTheme } from '@mui/material/styles/index.js';\nimport React, { useCallback, useLayoutEffect, useState } from 'react';\n\nimport { Icon } from '../../../icons';\nimport { rem } from '../../../tokens/relative';\nimport { InteractiveTooltip } from '../../data-display/InteractiveTooltip';\n\nimport { SETTING_CARD } from './SettingCard.metrics';\nimport { partTestId } from './SettingCard.parts';\n\n/**\n * Whether a clamped element is hiding text — measured, never guessed from the\n * string's length, because what fits depends on the width the card is GIVEN.\n * Re-measured whenever the element resizes, so a card that widens drops its [i].\n */\nexport const useClamped = (content?: unknown): { ref: (node: HTMLElement | null) => void; clamped: boolean } => {\n const [node, setNode] = useState<HTMLElement | null>(null);\n const [clamped, setClamped] = useState(false);\n const ref = useCallback((next: HTMLElement | null) => setNode(next), []);\n\n useLayoutEffect(() => {\n if (!node) return undefined;\n const measure = (): void => setClamped(node.scrollHeight > node.clientHeight + 1);\n measure();\n if (typeof ResizeObserver === 'undefined') return undefined;\n const observer = new ResizeObserver(measure);\n observer.observe(node);\n return () => observer.disconnect();\n // `content` too: a summary that grows from two lines to three inside the\n // same clamped height fires no resize, so the text changing re-measures.\n }, [node, content]);\n\n return { ref, clamped };\n};\n\n/**\n * The [i] beside a card's title while its summary is cut: hover shows the whole\n * text, a click or tap pins it — so it works on a phone, where there is no hover.\n */\nexport const SummaryInfo: React.FC<{ label: string; summary: React.ReactNode; dataTestId?: string }> = ({\n label,\n summary,\n dataTestId,\n}) => {\n const theme = useTheme();\n return (\n <InteractiveTooltip\n variant=\"light\"\n size=\"sm\"\n maxWidth={SETTING_CARD.infoMaxWidth}\n hoverContent={summary}\n pinnedContent={summary}\n dataTestId={partTestId(dataTestId, 'info')}\n >\n <Box\n component=\"button\"\n type=\"button\"\n aria-label={label}\n sx={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n // A real box, not an overlay: a 16 px glyph in a 40 px target whose extra\n // height is handed back as margin, so the title row keeps its height.\n minWidth: rem(theme, SETTING_CARD.infoTapTarget),\n minHeight: rem(theme, SETTING_CARD.infoTapTarget),\n margin: `${rem(theme, SETTING_CARD.infoTapMarginBlock)} ${rem(theme, SETTING_CARD.infoTapMarginInline)}`,\n padding: 0,\n border: 0,\n background: 'none',\n color: theme.palette.text.secondary,\n cursor: 'pointer',\n borderRadius: '50%',\n '&:focus-visible': {\n outline: `${rem(theme, SETTING_CARD.infoFocusRingWidth)} solid ${theme.palette.primary.main}`,\n outlineOffset: rem(theme, SETTING_CARD.infoFocusRingOffset),\n },\n }}\n >\n <Icon name=\"InfoOutlined\" size=\"xs\" />\n </Box>\n </InteractiveTooltip>\n );\n};\n\n/**\n * The summary's measuring ref, and the [i] for the header while it is cut —\n * `null` when there is no summary, it fits, or `show` is false (an open card).\n */\nexport const useSummaryInfo = ({\n summary,\n show = true,\n label,\n dataTestId,\n}: {\n summary: React.ReactNode;\n show?: boolean;\n label: string;\n dataTestId?: string;\n}): { ref: (node: HTMLElement | null) => void; info: React.ReactNode } => {\n const { ref, clamped } = useClamped(summary);\n const visible = show && clamped && summary != null;\n return { ref, info: visible ? <SummaryInfo label={label} summary={summary} dataTestId={dataTestId} /> : null };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAO,SAAS;AAChB,SAAS,gBAAgB;AACzB,SAAgB,aAAa,iBAAiB,gBAAgB;AA8EtD;AAhED,IAAM,aAAa,CAAC,YAAqF;AAC9G,QAAM,CAAC,MAAM,OAAO,IAAI,SAA6B,IAAI;AACzD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,MAAM,YAAY,CAAC,SAA6B,QAAQ,IAAI,GAAG,CAAC,CAAC;AAEvE,kBAAgB,MAAM;AACpB,QAAI,CAAC,KAAM,QAAO;AAClB,UAAM,UAAU,MAAY,WAAW,KAAK,eAAe,KAAK,eAAe,CAAC;AAChF,YAAQ;AACR,QAAI,OAAO,mBAAmB,YAAa,QAAO;AAClD,UAAM,WAAW,IAAI,eAAe,OAAO;AAC3C,aAAS,QAAQ,IAAI;AACrB,WAAO,MAAM,SAAS,WAAW;AAAA,EAGnC,GAAG,CAAC,MAAM,OAAO,CAAC;AAElB,SAAO,EAAE,KAAK,QAAQ;AACxB;AAMO,IAAM,cAA0F,CAAC;AAAA,EACtG;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,QAAQ,SAAS;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,UAAU,aAAa;AAAA,MACvB,cAAc;AAAA,MACd,eAAe;AAAA,MACf,YAAY,WAAW,YAAY,MAAM;AAAA,MAEzC;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAK;AAAA,UACL,cAAY;AAAA,UACZ,IAAI;AAAA,YACF,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,gBAAgB;AAAA;AAAA;AAAA,YAGhB,UAAU,IAAI,OAAO,aAAa,aAAa;AAAA,YAC/C,WAAW,IAAI,OAAO,aAAa,aAAa;AAAA,YAChD,QAAQ,GAAG,IAAI,OAAO,aAAa,kBAAkB,CAAC,IAAI,IAAI,OAAO,aAAa,mBAAmB,CAAC;AAAA,YACtG,SAAS;AAAA,YACT,QAAQ;AAAA,YACR,YAAY;AAAA,YACZ,OAAO,MAAM,QAAQ,KAAK;AAAA,YAC1B,QAAQ;AAAA,YACR,cAAc;AAAA,YACd,mBAAmB;AAAA,cACjB,SAAS,GAAG,IAAI,OAAO,aAAa,kBAAkB,CAAC,UAAU,MAAM,QAAQ,QAAQ,IAAI;AAAA,cAC3F,eAAe,IAAI,OAAO,aAAa,mBAAmB;AAAA,YAC5D;AAAA,UACF;AAAA,UAEA,8BAAC,QAAK,MAAK,gBAAe,MAAK,MAAK;AAAA;AAAA,MACtC;AAAA;AAAA,EACF;AAEJ;AAMO,IAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AACF,MAK0E;AACxE,QAAM,EAAE,KAAK,QAAQ,IAAI,WAAW,OAAO;AAC3C,QAAM,UAAU,QAAQ,WAAW,WAAW;AAC9C,SAAO,EAAE,KAAK,MAAM,UAAU,oBAAC,eAAY,OAAc,SAAkB,YAAwB,IAAK,KAAK;AAC/G;","names":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useSummaryInfo
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2C7AWMV7.js";
|
|
4
4
|
import {
|
|
5
5
|
PendingSpinner,
|
|
6
6
|
SaveError,
|
|
7
7
|
SettingHeader,
|
|
8
8
|
partTestId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-F3UHWLTD.js";
|
|
10
10
|
import {
|
|
11
11
|
clampStyles,
|
|
12
12
|
descriptionStyles
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UJ7EHEXG.js";
|
|
14
14
|
import {
|
|
15
15
|
SR_ONLY_SX
|
|
16
16
|
} from "./chunk-PUFA7FQ7.js";
|
|
@@ -87,4 +87,4 @@ export {
|
|
|
87
87
|
useSettingSwitchIds,
|
|
88
88
|
SettingSwitchBlock
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-44BTMZB6.js.map
|
|
@@ -4,9 +4,11 @@ import {
|
|
|
4
4
|
CHIP_TRANSITION_MS,
|
|
5
5
|
HOVER_LIFT_PX,
|
|
6
6
|
HOVER_SHADOW,
|
|
7
|
+
SOFT_FOCUS_RING,
|
|
7
8
|
SOFT_GROUND_ALPHA,
|
|
8
|
-
SOFT_HOVER_ALPHA
|
|
9
|
-
|
|
9
|
+
SOFT_HOVER_ALPHA,
|
|
10
|
+
SOFT_WARNING_LIGHT_DARKEN
|
|
11
|
+
} from "./chunk-GZBLDPXY.js";
|
|
10
12
|
import {
|
|
11
13
|
chipKeyAction
|
|
12
14
|
} from "./chunk-BF4FYOAR.js";
|
|
@@ -22,7 +24,7 @@ import {
|
|
|
22
24
|
// src/components/data-display/Chip/Chip.styles.tsx
|
|
23
25
|
import Avatar from "@mui/material/Avatar/index.js";
|
|
24
26
|
import React from "react";
|
|
25
|
-
import { alpha } from "@mui/material/styles/index.js";
|
|
27
|
+
import { alpha, darken } from "@mui/material/styles/index.js";
|
|
26
28
|
import { jsx } from "react/jsx-runtime";
|
|
27
29
|
var makeKeyDownHandler = (args) => (event) => {
|
|
28
30
|
const action = chipKeyAction(event.key, args);
|
|
@@ -55,7 +57,11 @@ var paletteKey = (color) => {
|
|
|
55
57
|
var softStyles = (color) => {
|
|
56
58
|
const key = paletteKey(color);
|
|
57
59
|
const ground = (theme) => key ? alpha(theme.palette[key].main, SOFT_GROUND_ALPHA) : theme.palette.action.selected;
|
|
58
|
-
const ink = (theme) =>
|
|
60
|
+
const ink = (theme) => {
|
|
61
|
+
if (!key) return theme.palette.text.secondary;
|
|
62
|
+
if (theme.palette.mode === "dark") return theme.palette[key].light;
|
|
63
|
+
return key === "warning" ? darken(theme.palette.warning.dark, SOFT_WARNING_LIGHT_DARKEN) : theme.palette[key].dark;
|
|
64
|
+
};
|
|
59
65
|
return {
|
|
60
66
|
backgroundColor: ground,
|
|
61
67
|
color: ink,
|
|
@@ -64,9 +70,21 @@ var softStyles = (color) => {
|
|
|
64
70
|
"& .MuiChip-icon": { color: ink },
|
|
65
71
|
"&.MuiChip-clickable:hover": {
|
|
66
72
|
backgroundColor: (theme) => key ? alpha(theme.palette[key].main, SOFT_HOVER_ALPHA) : theme.palette.action.hover
|
|
67
|
-
}
|
|
73
|
+
},
|
|
74
|
+
// `neutral` keeps MUI's glyph and focus exactly as they were.
|
|
75
|
+
...key ? accentedStates(key, ink) : {}
|
|
68
76
|
};
|
|
69
77
|
};
|
|
78
|
+
var accentedStates = (key, ink) => ({
|
|
79
|
+
"& .MuiChip-deleteIcon": { color: ink, "&:hover": { color: ink } },
|
|
80
|
+
"&.Mui-focusVisible": {
|
|
81
|
+
backgroundColor: (theme) => alpha(theme.palette[key].main, SOFT_GROUND_ALPHA),
|
|
82
|
+
outlineStyle: "solid",
|
|
83
|
+
outlineWidth: (theme) => rem(theme, SOFT_FOCUS_RING.width),
|
|
84
|
+
outlineColor: ink,
|
|
85
|
+
outlineOffset: (theme) => rem(theme, SOFT_FOCUS_RING.offset)
|
|
86
|
+
}
|
|
87
|
+
});
|
|
70
88
|
var chipStyles = ({
|
|
71
89
|
variant,
|
|
72
90
|
color = "primary",
|
|
@@ -110,4 +128,4 @@ export {
|
|
|
110
128
|
chipStyles,
|
|
111
129
|
iconWithTestId
|
|
112
130
|
};
|
|
113
|
-
//# sourceMappingURL=chunk-
|
|
131
|
+
//# sourceMappingURL=chunk-44I2KXKW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/Chip/Chip.styles.tsx"],"sourcesContent":["import Avatar from '@mui/material/Avatar/index.js';\nimport type { SxProps, Theme } from '@mui/material/styles/index.js';\nimport type { KeyboardEvent, ReactElement } from 'react';\nimport React from 'react';\n\nimport { chipKeyAction, type ChipKeyArgs } from './Chip.helpers';\nimport { alpha, darken } from '@mui/material/styles/index.js';\n\nimport {\n CHIP_SIZES,\n CHIP_TRANSITION_EASING,\n CHIP_TRANSITION_MS,\n HOVER_LIFT_PX,\n HOVER_SHADOW,\n SOFT_FOCUS_RING,\n SOFT_GROUND_ALPHA,\n SOFT_HOVER_ALPHA,\n SOFT_WARNING_LIGHT_DARKEN,\n} from './Chip.metrics';\nimport type { ChipProps } from './Chip.types';\nimport { shadowInk } from '../../../tokens/ink';\nimport { rem, rems, sxRem } from '../../../tokens/relative';\n\n/**\n * A chip is not a native control, so the two keyboard conventions it stands in\n * for are wired by hand: Delete/Backspace removes it, Enter/Space activates it.\n * The DECISION is `chipKeyAction`, which the native half reads too.\n */\nexport const makeKeyDownHandler =\n (args: ChipKeyArgs & { onClick?: () => void; onDelete?: () => void }) =>\n (event: KeyboardEvent): void => {\n const action = chipKeyAction(event.key, args);\n if (action === null) return;\n event.preventDefault();\n if (action === 'delete') {\n args.onDelete?.();\n return;\n }\n args.onClick?.();\n };\n\nexport const avatarFor = (\n avatar: ChipProps['avatar'],\n avatarSrc?: string,\n): ReactElement | undefined => {\n if (avatar && React.isValidElement(avatar)) {\n return avatar;\n }\n if (avatarSrc) {\n const { avatarSize } = CHIP_SIZES.medium;\n return <Avatar src={avatarSrc} sx={{ width: sxRem(avatarSize), height: sxRem(avatarSize) }} />;\n }\n return undefined;\n};\n\ninterface ChipStyleArgs {\n variant: ChipProps['variant'];\n color?: ChipProps['color'];\n selected?: boolean;\n clickable?: boolean;\n disabled?: boolean;\n}\n\n/** The lift's shadow, per mode — the same numbers the native chip reads. */\nconst hoverShadow = (theme: Theme): string =>\n `0 ${rems(theme, HOVER_SHADOW.offsetY, HOVER_SHADOW.blur)} ${shadowInk(\n theme,\n theme.palette.mode === 'dark' ? HOVER_SHADOW.alphaDark : HOVER_SHADOW.alphaLight,\n )}`;\n\n/**\n * Selection styling uses SEMANTIC palette tokens (not hardcoded rgba). A filled\n * selected chip keeps MUI's solid `color.main` + contrast text (clear active\n * state); an outlined selected chip gets a subtle theme-driven `action.selected`\n * tint so it reads as active without muddying the fill.\n */\n/** The palette entry a colour paints with; `neutral` has none and takes the ink. */\nconst paletteKey = (color: NonNullable<ChipProps['color']>): 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | null => {\n if (color === 'neutral') return null;\n return color === 'danger' ? 'error' : color;\n};\n\n/**\n * `soft`: the colour's tint for a ground, and for ink the step that reads on it:\n * the `dark` step in light mode, the `light` step in dark mode (FUT-4442). The\n * ground is a 14% tint over the page, so on a near-black page the ink has to be\n * lighter than `main`; `dark` there is 2.6 to 3.9:1, `light` clears 4.5:1. In\n * light mode warning's `dark` is 3.25:1 on its tint, so it is darkened by\n * `SOFT_WARNING_LIGHT_DARKEN` (4.77:1, FUT-4464). The label, the icon and the\n * delete glyph all take it.\n */\nconst softStyles = (color: NonNullable<ChipProps['color']>): SxProps<Theme> => {\n const key = paletteKey(color);\n const ground = (theme: Theme): string =>\n key ? alpha(theme.palette[key].main, SOFT_GROUND_ALPHA) : theme.palette.action.selected;\n const ink = (theme: Theme): string => {\n if (!key) return theme.palette.text.secondary;\n if (theme.palette.mode === 'dark') return theme.palette[key].light;\n // Warning's `dark` step is too light for its own tint (FUT-4464).\n return key === 'warning' ? darken(theme.palette.warning.dark, SOFT_WARNING_LIGHT_DARKEN) : theme.palette[key].dark;\n };\n return {\n backgroundColor: ground,\n color: ink,\n // A state is read at a glance: the label is set semibold.\n fontWeight: 600,\n '& .MuiChip-icon': { color: ink },\n '&.MuiChip-clickable:hover': {\n backgroundColor: (theme: Theme) => (key ? alpha(theme.palette[key].main, SOFT_HOVER_ALPHA) : theme.palette.action.hover),\n },\n // `neutral` keeps MUI's glyph and focus exactly as they were.\n ...(key ? (accentedStates(key, ink) as object) : {}),\n };\n};\n\n/**\n * What only an accented soft chip changes (FUT-4442, FUT-4461). MUI paints the\n * delete glyph in `contrastText` at 0.7, near-black on a dark ground, so the glyph\n * takes the ink. Focus, in both modes: the chip keeps its resting ground (MUI's\n * `dark` step puts the ink at about 1:1 in light mode and sinks the light ink in\n * dark mode) and draws a ring in the ink, so focus shows without the ground.\n */\nconst accentedStates = (\n key: Exclude<ReturnType<typeof paletteKey>, null>,\n ink: (theme: Theme) => string,\n): SxProps<Theme> => ({\n '& .MuiChip-deleteIcon': { color: ink, '&:hover': { color: ink } },\n '&.Mui-focusVisible': {\n backgroundColor: (theme: Theme) => alpha(theme.palette[key].main, SOFT_GROUND_ALPHA),\n outlineStyle: 'solid',\n outlineWidth: (theme: Theme) => rem(theme, SOFT_FOCUS_RING.width),\n outlineColor: ink,\n outlineOffset: (theme: Theme) => rem(theme, SOFT_FOCUS_RING.offset),\n },\n});\n\nexport const chipStyles = ({\n variant,\n color = 'primary',\n selected,\n clickable,\n disabled,\n}: ChipStyleArgs): SxProps<Theme> => {\n const lifts = clickable && !disabled;\n\n return {\n ...(variant === 'soft' ? (softStyles(color) as object) : {}),\n // Enhanced styling for outlined variant\n ...(variant === 'outlined' && {\n borderWidth: '1px',\n borderStyle: 'solid',\n backgroundColor: 'transparent',\n }),\n ...(selected &&\n variant === 'outlined' && {\n backgroundColor: (theme: Theme) => theme.palette.action.selected,\n }),\n '&:hover': {\n ...(lifts && {\n transform: (theme: Theme) => `translateY(${rem(theme, -HOVER_LIFT_PX)})`,\n boxShadow: (theme: Theme) => hoverShadow(theme),\n }),\n },\n '&:active': {\n ...(lifts && {\n transform: 'translateY(0px)',\n }),\n },\n transition: `all ${CHIP_TRANSITION_MS / 1000}s ${CHIP_TRANSITION_EASING}`,\n };\n};\n\nexport const iconWithTestId = (\n icon: ChipProps['icon'],\n testId: string,\n): ReactElement | undefined =>\n icon && React.isValidElement(icon)\n ? React.cloneElement(icon as ReactElement, {\n 'data-testid': testId,\n } as Record<string, unknown>)\n : undefined;\n"],"mappings":"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","names":[]}
|