@12-apps/ui 6.78.0 → 6.78.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/dist/_internal/components/data-display/DataGrid/DataGrid.body.js +2 -2
- package/dist/_internal/components/data-display/DataGrid/DataGrid.cells.js +1 -1
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +12 -12
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +13 -13
- package/dist/_internal/components/data-display/DataViews/data-views-card-body.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +9 -9
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +2 -2
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +3 -3
- package/dist/_internal/components/data-display/index.js +3 -3
- package/dist/_internal/components/index.js +3 -3
- package/dist/{chunk-ZFXTRPQO.js → chunk-5RYPVYWP.js} +2 -2
- package/dist/{chunk-FXZUVZON.js → chunk-DYHOBKPU.js} +2 -2
- package/dist/{chunk-XYSE2QZN.js → chunk-EF4DVYD2.js} +2 -2
- package/dist/{chunk-QCQWOSSD.js → chunk-GHXW6O5T.js} +4 -9
- package/dist/chunk-GHXW6O5T.js.map +1 -0
- package/dist/{chunk-ZTPB7PVI.js → chunk-HPEBSLYP.js} +2 -2
- package/dist/{chunk-ICDAYOJ6.js → chunk-K6FW4YDA.js} +9 -2
- package/dist/chunk-K6FW4YDA.js.map +1 -0
- package/dist/{chunk-2VHAD4NE.js → chunk-LI6XSM5D.js} +3 -3
- package/dist/{chunk-FAIQCGSL.js → chunk-M3DSPEZ3.js} +2 -2
- package/dist/{chunk-GFXS5PJL.js → chunk-NBXG3SQ3.js} +3 -3
- package/dist/{chunk-SCAPSX6T.js → chunk-O36MIQIO.js} +2 -2
- package/dist/{chunk-QIYX33SH.js → chunk-RHKQ2RSY.js} +4 -4
- package/dist/{chunk-C47LBKEG.js → chunk-SFT4YN6O.js} +2 -2
- package/dist/{chunk-F6IMOMA3.js → chunk-ZPACE34U.js} +3 -3
- package/dist/data-display/DataGrid.js +3 -3
- package/dist/data-display/DataViews.js +13 -13
- package/dist/native/chunks/{chunk-TZPNJ4AU.js → chunk-AVHGS66L.js} +2 -2
- package/dist/native/chunks/{chunk-EZHCNYQO.js → chunk-BXNZHDXK.js} +6 -4
- package/dist/native/chunks/chunk-BXNZHDXK.js.map +1 -0
- package/dist/native/data-display/EmptyState.js +2 -2
- package/dist/native/data-display/ErrorState.js +1 -1
- package/dist/native/data-display/FleetMap.js +2 -2
- package/dist/native/form/Button.js +1 -1
- package/dist/types/components/data-display/DataGrid/DataGrid.cells.d.ts.map +1 -1
- package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts +6 -0
- package/dist/types/components/data-display/DataGrid/DataGrid.types.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-helpers.d.ts +1 -1
- package/dist/types/components/data-display/DataViews/data-views-grid-helpers.d.ts.map +1 -1
- package/dist/types-native/components/form/Button/Button.native.d.ts +18 -1
- package/dist/types-native/components/form/Button/Button.native.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/DataGrid/DataGrid.cells.tsx +13 -0
- package/src/components/data-display/DataGrid/DataGrid.types.ts +6 -0
- package/src/components/data-display/DataViews/data-views-grid-helpers.tsx +4 -5
- package/src/components/form/Button/Button.md +1 -1
- package/src/components/form/Button/Button.native.tsx +23 -6
- package/dist/chunk-ICDAYOJ6.js.map +0 -1
- package/dist/chunk-QCQWOSSD.js.map +0 -1
- package/dist/native/chunks/chunk-EZHCNYQO.js.map +0 -1
- /package/dist/{chunk-ZFXTRPQO.js.map → chunk-5RYPVYWP.js.map} +0 -0
- /package/dist/{chunk-FXZUVZON.js.map → chunk-DYHOBKPU.js.map} +0 -0
- /package/dist/{chunk-XYSE2QZN.js.map → chunk-EF4DVYD2.js.map} +0 -0
- /package/dist/{chunk-ZTPB7PVI.js.map → chunk-HPEBSLYP.js.map} +0 -0
- /package/dist/{chunk-2VHAD4NE.js.map → chunk-LI6XSM5D.js.map} +0 -0
- /package/dist/{chunk-FAIQCGSL.js.map → chunk-M3DSPEZ3.js.map} +0 -0
- /package/dist/{chunk-GFXS5PJL.js.map → chunk-NBXG3SQ3.js.map} +0 -0
- /package/dist/{chunk-SCAPSX6T.js.map → chunk-O36MIQIO.js.map} +0 -0
- /package/dist/{chunk-QIYX33SH.js.map → chunk-RHKQ2RSY.js.map} +0 -0
- /package/dist/{chunk-C47LBKEG.js.map → chunk-SFT4YN6O.js.map} +0 -0
- /package/dist/{chunk-F6IMOMA3.js.map → chunk-ZPACE34U.js.map} +0 -0
- /package/dist/native/chunks/{chunk-TZPNJ4AU.js.map → chunk-AVHGS66L.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridMain
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NBXG3SQ3.js";
|
|
4
4
|
import {
|
|
5
5
|
FilterDialog,
|
|
6
6
|
GridFilterPanel
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-K3PMMW23.js";
|
|
30
30
|
import {
|
|
31
31
|
ShellToolbar
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-O36MIQIO.js";
|
|
33
33
|
import {
|
|
34
34
|
SHELL_PROPS,
|
|
35
35
|
useStickyBarTop
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
} from "./chunk-5YDS6HO3.js";
|
|
41
41
|
import {
|
|
42
42
|
togglePillValues
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-GHXW6O5T.js";
|
|
44
44
|
import {
|
|
45
45
|
DataViewsLayoutProvider,
|
|
46
46
|
useDataViewsLayout
|
|
@@ -251,4 +251,4 @@ function GridShell(props) {
|
|
|
251
251
|
export {
|
|
252
252
|
GridShell
|
|
253
253
|
};
|
|
254
|
-
//# sourceMappingURL=chunk-
|
|
254
|
+
//# sourceMappingURL=chunk-RHKQ2RSY.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-4HUSG5MR.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsGrid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LI6XSM5D.js";
|
|
7
7
|
import {
|
|
8
8
|
viewStateKey
|
|
9
9
|
} from "./chunk-ZOLAYP2D.js";
|
|
@@ -166,4 +166,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
|
|
|
166
166
|
export {
|
|
167
167
|
DataViewsTableBase
|
|
168
168
|
};
|
|
169
|
-
//# sourceMappingURL=chunk-
|
|
169
|
+
//# sourceMappingURL=chunk-SFT4YN6O.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useColumnsWithActions,
|
|
3
3
|
useRenderedColumns
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HPEBSLYP.js";
|
|
5
5
|
import {
|
|
6
6
|
filterRows
|
|
7
7
|
} from "./chunk-YGQX7BNI.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
computeActiveFilterCount,
|
|
14
14
|
defaultSortFields
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GHXW6O5T.js";
|
|
16
16
|
import {
|
|
17
17
|
serverDerived,
|
|
18
18
|
useServerQuery
|
|
@@ -172,4 +172,4 @@ function useDataViewsState({
|
|
|
172
172
|
export {
|
|
173
173
|
useDataViewsState
|
|
174
174
|
};
|
|
175
|
-
//# sourceMappingURL=chunk-
|
|
175
|
+
//# sourceMappingURL=chunk-ZPACE34U.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../chunk-L5CPOEDP.js";
|
|
2
2
|
import {
|
|
3
3
|
DataGrid
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-DYHOBKPU.js";
|
|
5
5
|
import "../chunk-EARWC6PD.js";
|
|
6
6
|
import "../chunk-LDROG4QI.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-5RYPVYWP.js";
|
|
8
|
+
import "../chunk-K6FW4YDA.js";
|
|
9
9
|
import "../chunk-G3E66C6J.js";
|
|
10
10
|
import "../chunk-YKCAJ2TN.js";
|
|
11
11
|
import "../chunk-PZ5AY32C.js";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "../chunk-MBMZNSBP.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsTableBase
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-SFT4YN6O.js";
|
|
7
7
|
import "../chunk-4HUSG5MR.js";
|
|
8
8
|
import {
|
|
9
9
|
DataViewsGrid
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-LI6XSM5D.js";
|
|
11
11
|
import {
|
|
12
12
|
BaseListCard
|
|
13
13
|
} from "../chunk-CSD6SWBZ.js";
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
DropIndicator,
|
|
24
24
|
useDragItem
|
|
25
25
|
} from "../chunk-K4EKTMTC.js";
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-RHKQ2RSY.js";
|
|
27
|
+
import "../chunk-NBXG3SQ3.js";
|
|
28
28
|
import {
|
|
29
29
|
DataViewsBoard
|
|
30
30
|
} from "../chunk-7TCOYCD7.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-EF4DVYD2.js";
|
|
32
32
|
import "../chunk-555TUQ7E.js";
|
|
33
33
|
import "../chunk-LUNN5GTB.js";
|
|
34
34
|
import "../chunk-IQ2U5MVO.js";
|
|
@@ -54,8 +54,8 @@ import "../chunk-6J7RGNSF.js";
|
|
|
54
54
|
import "../chunk-LG52LMAM.js";
|
|
55
55
|
import "../chunk-C7CIUDXZ.js";
|
|
56
56
|
import "../chunk-5M4TYFR3.js";
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
57
|
+
import "../chunk-O36MIQIO.js";
|
|
58
|
+
import "../chunk-M3DSPEZ3.js";
|
|
59
59
|
import "../chunk-VBGC7G4F.js";
|
|
60
60
|
import "../chunk-WSAUWJFO.js";
|
|
61
61
|
import "../chunk-VJG43WKU.js";
|
|
@@ -68,15 +68,15 @@ import "../chunk-VMN6KG2U.js";
|
|
|
68
68
|
import "../chunk-G6EJLEVV.js";
|
|
69
69
|
import "../chunk-B2JSUFDX.js";
|
|
70
70
|
import "../chunk-DZEC6RFM.js";
|
|
71
|
-
import "../chunk-
|
|
72
|
-
import "../chunk-
|
|
71
|
+
import "../chunk-ZPACE34U.js";
|
|
72
|
+
import "../chunk-HPEBSLYP.js";
|
|
73
73
|
import "../chunk-YGQX7BNI.js";
|
|
74
74
|
import {
|
|
75
75
|
DataViewsScopeTabs,
|
|
76
76
|
assertNoScopePillOverlap,
|
|
77
77
|
resolveScope
|
|
78
78
|
} from "../chunk-PL2AB5HJ.js";
|
|
79
|
-
import "../chunk-
|
|
79
|
+
import "../chunk-GHXW6O5T.js";
|
|
80
80
|
import "../chunk-IMLIIW77.js";
|
|
81
81
|
import "../chunk-LLZWB32X.js";
|
|
82
82
|
import "../chunk-U5FOJBLG.js";
|
|
@@ -188,11 +188,11 @@ import "../chunk-AL5E624U.js";
|
|
|
188
188
|
import "../chunk-GYXUCS37.js";
|
|
189
189
|
import "../chunk-LV7LSPBF.js";
|
|
190
190
|
import "../chunk-L5CPOEDP.js";
|
|
191
|
-
import "../chunk-
|
|
191
|
+
import "../chunk-DYHOBKPU.js";
|
|
192
192
|
import "../chunk-EARWC6PD.js";
|
|
193
193
|
import "../chunk-LDROG4QI.js";
|
|
194
|
-
import "../chunk-
|
|
195
|
-
import "../chunk-
|
|
194
|
+
import "../chunk-5RYPVYWP.js";
|
|
195
|
+
import "../chunk-K6FW4YDA.js";
|
|
196
196
|
import "../chunk-G3E66C6J.js";
|
|
197
197
|
import "../chunk-SNCSGLJ6.js";
|
|
198
198
|
import "../chunk-UMICTXMP.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BXNZHDXK.js";
|
|
4
4
|
import {
|
|
5
5
|
ELEVATION_SHADOWS
|
|
6
6
|
} from "./chunk-ZRQHLTYG.js";
|
|
@@ -292,4 +292,4 @@ var styles = StyleSheet.create({
|
|
|
292
292
|
export {
|
|
293
293
|
EmptyState
|
|
294
294
|
};
|
|
295
|
-
//# sourceMappingURL=chunk-
|
|
295
|
+
//# sourceMappingURL=chunk-AVHGS66L.js.map
|
|
@@ -277,6 +277,9 @@ function Pulse({ color, radius, testID }) {
|
|
|
277
277
|
}
|
|
278
278
|
);
|
|
279
279
|
}
|
|
280
|
+
function overflowOf(visible, os = Platform2.OS) {
|
|
281
|
+
return visible || os === "android" ? "visible" : "hidden";
|
|
282
|
+
}
|
|
280
283
|
function buttonLook(theme, props) {
|
|
281
284
|
const { variant, color, size, loading, icon, children, glow, pulse, active, disabled, style } = props;
|
|
282
285
|
const palette = buttonPalette(theme, color);
|
|
@@ -285,7 +288,7 @@ function buttonLook(theme, props) {
|
|
|
285
288
|
const paint = inactive ? disabledPaint(theme, variant) : paintFor(theme, variant, color, palette, active);
|
|
286
289
|
const radius = theme.radius.field;
|
|
287
290
|
const metrics = BUTTON_SIZES[size];
|
|
288
|
-
const overflow = pulse || glow
|
|
291
|
+
const overflow = overflowOf(Boolean(pulse || glow));
|
|
289
292
|
const sized = sizeStyle(theme, size, iconOnly, icon != null);
|
|
290
293
|
const glowing = glow && !inactive ? glowStyle(palette) : null;
|
|
291
294
|
return {
|
|
@@ -313,7 +316,7 @@ function buttonLook(theme, props) {
|
|
|
313
316
|
}
|
|
314
317
|
var Button = React2.forwardRef((rawProps, ref) => {
|
|
315
318
|
const resolved = resolveButtonProps(rawProps);
|
|
316
|
-
const { loading, icon, iconPosition, pulse, ripple, children, onClick, onPress, ...others } = resolved;
|
|
319
|
+
const { loading, icon, iconPosition, pulse, ripple: _ripple, children, onClick, onPress, ...others } = resolved;
|
|
317
320
|
const theme = useUiTheme();
|
|
318
321
|
const look = buttonLook(theme, resolved);
|
|
319
322
|
const testId = resolveTestId(others, "button");
|
|
@@ -335,7 +338,6 @@ var Button = React2.forwardRef((rawProps, ref) => {
|
|
|
335
338
|
"aria-label": loadingName(loading, children),
|
|
336
339
|
disabled: look.inactive,
|
|
337
340
|
onPress: handlePress,
|
|
338
|
-
android_ripple: ripple && !look.inactive ? { color: alpha(look.palette.main, 0.2), borderless: false } : void 0,
|
|
339
341
|
style: look.container,
|
|
340
342
|
testID: testId,
|
|
341
343
|
...pressable,
|
|
@@ -367,4 +369,4 @@ var styles2 = StyleSheet2.create({
|
|
|
367
369
|
export {
|
|
368
370
|
Button
|
|
369
371
|
};
|
|
370
|
-
//# sourceMappingURL=chunk-
|
|
372
|
+
//# sourceMappingURL=chunk-BXNZHDXK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/form/Button/Button.native.tsx","../../../src/components/form/Button/Button.helpers.ts","../../../src/components/form/Button/Button.metrics.ts","../../../src/components/form/Button/Button.native.loading.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Animated,\n Easing,\n Platform,\n Pressable,\n StyleSheet,\n View,\n type GestureResponderEvent,\n type PressableStateCallbackType,\n type StyleProp,\n type TextStyle,\n type ViewStyle,\n} from 'react-native';\n\nimport { resolveButtonProps } from './Button.helpers';\nimport {\n BUTTON_FONT_WEIGHT,\n BUTTON_ICON_GAP_UNITS,\n BUTTON_LINE_HEIGHT,\n BUTTON_SIZES,\n BUTTON_WASH_ALPHA,\n GLASS_BACKGROUND_ALPHA,\n GLASS_BACKGROUND_ALPHA_PRESSED,\n GLASS_BORDER_ALPHA,\n GLOW_INNER_ALPHA,\n GLOW_RADIUS,\n PULSE_ALPHA,\n PULSE_DURATION_MS,\n PULSE_SPREAD,\n buttonPalette,\n gradientStops,\n quietInk,\n} from './Button.metrics';\nimport type { ButtonProps, ButtonVariant } from './Button.types.native';\nimport { hiddenWhile, Label, loadingName, Spinner } from './Button.native.loading';\nimport { childTestId, resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\nimport { resolveFieldEdge } from '../../../tokens/field-edge.core';\nimport { FIELD_BORDER_WIDTH, fieldHeightPx } from '../../../tokens/field-height.core';\nimport { alpha } from '../../../tokens/color';\nimport type { ColorValue, SizeValue } from '../../../tokens/vocabulary';\nimport type { UiPaletteColor, UiTheme } from '../../../tokens/theme';\n\n/** MUI's `min-width` for a button that carries a label. */\nconst MIN_WIDTH = 64;\n\ninterface Paint {\n container: ViewStyle;\n pressed: ViewStyle;\n label: TextStyle;\n}\n\n/**\n * What the web's `VARIANT_STYLES` paint, as three React Native styles: at rest,\n * while pressed (the web's `:hover`, which touch has no equivalent of), and the\n * label. Same palette arithmetic, same alphas.\n *\n * `gradient` is the one honest gap: React Native core has no gradient fill, so\n * it paints the gradient's first stop. A host wanting the real thing adds a\n * gradient library; the parity ledger records this.\n */\n/** A coloured outline: its colour for the border and the label, washed when pressed. */\nfunction outlineOf(palette: UiPaletteColor, wash: string): Paint {\n return {\n container: { backgroundColor: 'transparent', borderWidth: FIELD_BORDER_WIDTH, borderColor: palette.main },\n pressed: { backgroundColor: wash, borderColor: palette.dark },\n label: { color: palette.main },\n };\n}\n\n/**\n * A neutral outline, as on the web: it rests on the one field border and\n * writes in the theme's text ink, a role that turns with the mode — grey 700\n * was dark on a dark ground.\n */\nfunction neutralOutline(theme: UiTheme): Paint {\n const ink = theme.palette.text.primary;\n return {\n container: {\n backgroundColor: 'transparent',\n borderWidth: FIELD_BORDER_WIDTH,\n borderColor: resolveFieldEdge(theme.palette.divider, theme.palette.background.paper),\n },\n pressed: { backgroundColor: alpha(ink, BUTTON_WASH_ALPHA), borderColor: theme.palette.text.secondary },\n label: { color: ink },\n };\n}\n\nfunction paintFor(\n theme: UiTheme,\n variant: ButtonVariant,\n color: ColorValue,\n palette: UiPaletteColor,\n active: boolean,\n): Paint {\n const wash = alpha(palette.main, BUTTON_WASH_ALPHA);\n switch (variant) {\n case 'outline':\n return color === 'neutral' ? neutralOutline(theme) : outlineOf(palette, wash);\n case 'ghost':\n return {\n container: { backgroundColor: 'transparent' },\n pressed: { backgroundColor: wash },\n label: { color: quietInk(theme, palette) },\n };\n case 'text':\n return {\n container: { backgroundColor: active ? wash : 'transparent' },\n pressed: { backgroundColor: wash },\n label: { color: quietInk(theme, palette) },\n };\n case 'glass':\n return {\n container: {\n backgroundColor: alpha(theme.palette.background.paper, GLASS_BACKGROUND_ALPHA),\n borderWidth: 1,\n borderColor: alpha(theme.palette.divider, GLASS_BORDER_ALPHA),\n },\n pressed: { backgroundColor: alpha(theme.palette.background.paper, GLASS_BACKGROUND_ALPHA_PRESSED) },\n label: { color: palette.main },\n };\n case 'gradient': {\n const [from, to] = gradientStops(theme, color, palette);\n return {\n container: { backgroundColor: from },\n pressed: { backgroundColor: to },\n label: { color: '#fff' },\n };\n }\n default:\n return {\n container: { backgroundColor: palette.main },\n pressed: { backgroundColor: palette.dark },\n label: { color: palette.contrastText || '#fff' },\n };\n }\n}\n\n/** MUI's disabled treatment per variant family, so a disabled button reads as one on both sides. */\nfunction disabledPaint(theme: UiTheme, variant: ButtonVariant): Paint {\n const filled = variant === 'solid' || variant === 'gradient' || variant === 'glass';\n return {\n container: filled\n ? { backgroundColor: theme.palette.action.disabledBackground, borderWidth: 0 }\n : variant === 'outline'\n ? { backgroundColor: 'transparent', borderWidth: 1, borderColor: theme.palette.action.disabledBackground }\n : { backgroundColor: 'transparent' },\n pressed: {},\n label: { color: theme.palette.action.disabled },\n };\n}\n\nfunction sizeStyle(theme: UiTheme, size: SizeValue, iconOnly: boolean, hasIcon: boolean): ViewStyle {\n const metrics = BUTTON_SIZES[size];\n // The theme's field height for the size, as on the web: a button stands\n // level with the field beside it, and an icon-only one is that square.\n const height = fieldHeightPx(theme.fieldHeight, size);\n if (iconOnly) {\n return { padding: 0, minWidth: height, minHeight: height };\n }\n return {\n minHeight: height,\n paddingVertical: 0,\n paddingHorizontal: metrics.paddingHorizontal,\n minWidth: MIN_WIDTH,\n gap: hasIcon ? theme.spacing(BUTTON_ICON_GAP_UNITS) : undefined,\n };\n}\n\nfunction glowStyle(palette: UiPaletteColor): ViewStyle {\n return Platform.select<ViewStyle>({\n android: { elevation: 8 },\n default: {\n shadowColor: palette.main,\n shadowOpacity: GLOW_INNER_ALPHA,\n shadowRadius: GLOW_RADIUS,\n shadowOffset: { width: 0, height: 0 },\n },\n });\n}\n\n/** The web's `::after` pulse ring: a looped scale-and-fade behind the button. */\nfunction Pulse({ color, radius, testID }: { color: string; radius: number; testID: string }): React.JSX.Element {\n const progress = React.useRef(new Animated.Value(0)).current;\n\n React.useEffect(() => {\n const loop = Animated.loop(\n Animated.timing(progress, {\n toValue: 1,\n duration: PULSE_DURATION_MS,\n easing: Easing.out(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n );\n loop.start();\n return () => loop.stop();\n }, [progress]);\n\n return (\n <Animated.View\n testID={testID}\n aria-hidden\n style={[\n StyleSheet.absoluteFill,\n {\n pointerEvents: 'none',\n borderRadius: radius,\n backgroundColor: color,\n opacity: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [PULSE_ALPHA, 0, 0] }),\n transform: [\n { scale: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [1, 1 + PULSE_SPREAD / 40, 1] }) },\n ],\n },\n ]}\n />\n );\n}\n\n\ntype ResolvedProps = ReturnType<typeof resolveButtonProps<ButtonProps>>;\n\ninterface ButtonLook {\n inactive: boolean;\n palette: UiPaletteColor;\n radius: number;\n label: TextStyle;\n container: (state: PressableStateCallbackType) => StyleProp<ViewStyle>;\n}\n\n/**\n * Whether the button clips what it draws.\n *\n * The web button is `overflow: hidden` (its ripple needs it) unless the pulse\n * ring turns it visible; on native the glow's shadow needs it visible too,\n * because a view's own shadow is clipped by its own overflow there.\n *\n * An Android button never clips (FUT-3775). There, a clipped solid button that\n * turned enabled — after a disable or a loading — painted its new fill and no\n * label: an adopter's cancel, help and delivery sheets showed a red block\n * with no text. The same button unclipped draws its label in every state\n * (measured on an Android emulator with a pixel check). Nothing else needs the\n * clip there: the label, icon and spinner sit inside the padding. The ripple\n * did, since its mask is a square, so a native press shows the variant's\n * pressed paint alone, as on iOS, and `ripple` only matters on the web.\n */\nexport function overflowOf(visible: boolean, os: typeof Platform.OS = Platform.OS): ViewStyle['overflow'] {\n return visible || os === 'android' ? 'visible' : 'hidden';\n}\n\n/**\n * Everything the button paints, decided once per render from the resolved\n * props and the theme. Kept out of the component so the component reads as\n * structure — what renders where — and this reads as arithmetic.\n */\nfunction buttonLook(theme: UiTheme, props: ResolvedProps): ButtonLook {\n const { variant, color, size, loading, icon, children, glow, pulse, active, disabled, style } = props;\n const palette = buttonPalette(theme, color);\n // Loading keeps the icon (transparent), so it changes neither the shape nor the gap (FUT-3646).\n const iconOnly = icon != null && children == null;\n const inactive = Boolean(disabled) || loading;\n const paint = inactive ? disabledPaint(theme, variant) : paintFor(theme, variant, color, palette, active);\n // The theme's one field radius, so a button and the input beside it agree.\n const radius = theme.radius.field;\n const metrics = BUTTON_SIZES[size];\n const overflow = overflowOf(Boolean(pulse || glow));\n const sized = sizeStyle(theme, size, iconOnly, icon != null);\n const glowing = glow && !inactive ? glowStyle(palette) : null;\n\n return {\n inactive,\n palette,\n radius,\n label: {\n fontFamily: theme.typography.fontFamily,\n fontSize: metrics.fontSize,\n lineHeight: metrics.fontSize * BUTTON_LINE_HEIGHT,\n fontWeight: String(BUTTON_FONT_WEIGHT) as TextStyle['fontWeight'],\n textAlign: 'center',\n ...paint.label,\n },\n container: (state) => [\n styles.base,\n { borderRadius: radius, overflow },\n sized,\n paint.container,\n state.pressed && !inactive ? paint.pressed : null,\n glowing,\n style,\n ],\n };\n}\n\nexport const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {\n const resolved = resolveButtonProps(rawProps);\n // `ripple` is web-only: kept out of `others` so it never reaches the Pressable (see overflowOf).\n const { loading, icon, iconPosition, pulse, ripple: _ripple, children, onClick, onPress, ...others } = resolved;\n const theme = useUiTheme();\n const look = buttonLook(theme, resolved);\n\n // The shared stories pass `'data-testid'` as a plain prop; honour it here and\n // keep all three spellings off the element (react-native-web would drop them).\n const testId = resolveTestId(others, 'button');\n const idFor = (suffix: string) => childTestId(others, suffix, 'button');\n const rest = withoutTestIdProps(others);\n // `buttonLook` consumed these; they are not Pressable props.\n const { variant: _v, color: _c, size: _s, glow: _g, active: _a, disabled: _d, style: _st, ...pressable } = rest;\n\n const handlePress = (event: GestureResponderEvent): void => {\n onClick?.(event);\n onPress?.(event);\n };\n\n const iconNode = icon ? (\n <View style={[styles.icon, hiddenWhile(loading)]} testID={idFor('icon')}>\n {icon}\n </View>\n ) : null;\n\n return (\n <Pressable\n ref={ref}\n role=\"button\"\n aria-disabled={look.inactive}\n aria-busy={loading}\n aria-label={loadingName(loading, children)}\n disabled={look.inactive}\n onPress={handlePress}\n style={look.container}\n testID={testId}\n {...pressable}\n >\n {pulse && !look.inactive ? <Pulse color={look.palette.main} radius={look.radius} testID={idFor('pulse')} /> : null}\n {iconPosition === 'left' ? iconNode : null}\n <Label loading={loading} label={look.label} testID={idFor('busy-label')}>\n {children}\n </Label>\n {iconPosition === 'right' ? iconNode : null}\n {loading ? <Spinner color={look.label.color as string} testID={idFor('loading')} /> : null}\n </Pressable>\n );\n});\n\nButton.displayName = 'Button';\n\nconst styles = StyleSheet.create({\n base: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n alignSelf: 'flex-start',\n position: 'relative',\n },\n icon: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n","import type { ButtonBaseProps } from './Button.base';\n\ntype ButtonDefaultedKeys =\n | 'variant'\n | 'color'\n | 'size'\n | 'loading'\n | 'iconPosition'\n | 'glow'\n | 'pulse'\n | 'ripple'\n | 'active';\n\n/**\n * Generic over the renderer's own props: the web and the native `Button` pass\n * different handler types through, and both come back out untouched.\n */\ntype ResolvedButtonProps<P extends ButtonBaseProps> = P &\n Required<Pick<ButtonBaseProps, ButtonDefaultedKeys>>;\n\nconst BUTTON_DEFAULTS: Required<Pick<ButtonBaseProps, ButtonDefaultedKeys>> = {\n variant: 'solid',\n color: 'primary',\n size: 'md',\n loading: false,\n iconPosition: 'left',\n glow: false,\n pulse: false,\n ripple: true,\n active: false,\n};\n\n// Strips explicitly-undefined props before the merge, so `size={undefined}` still\n// falls back to the default exactly as a destructuring default would.\nconst definedProps = <P extends ButtonBaseProps>(props: P): Partial<P> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<P>;\n\nexport const resolveButtonProps = <P extends ButtonBaseProps>(props: P): ResolvedButtonProps<P> =>\n ({ ...BUTTON_DEFAULTS, ...definedProps(props) }) as ResolvedButtonProps<P>;\n","import { darken, lighten } from '../../../tokens/color';\nimport { ABSOLUTE_INK, NEUTRAL_RAMP } from '../../../tokens/ink.core';\nimport type { ColorValue, SizeValue } from '../../../tokens/vocabulary';\nimport type { UiPaletteColor, UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `Button` RENDERERS DRAW WITH.\n *\n * `Button.styles.ts` (web, emotion) and `Button.native.tsx` (React Native)\n * read this one table. The web turns the px into rem and the padding into a\n * shorthand string; native uses the numbers as they are. Neither restates a\n * value, which is what keeps a native `md` button 16px tall of padding and\n * 16px of type exactly like the web one.\n */\nexport interface ButtonSizeMetrics {\n paddingVertical: number;\n paddingHorizontal: number;\n fontSize: number;\n}\n\nexport const BUTTON_SIZES: Record<SizeValue, ButtonSizeMetrics> = {\n xs: { paddingVertical: 2, paddingHorizontal: 8, fontSize: 12 },\n sm: { paddingVertical: 6, paddingHorizontal: 12, fontSize: 14 },\n md: { paddingVertical: 8, paddingHorizontal: 16, fontSize: 16 },\n lg: { paddingVertical: 10, paddingHorizontal: 20, fontSize: 18 },\n xl: { paddingVertical: 12, paddingHorizontal: 24, fontSize: 20 },\n};\n\n/** A button that is only an icon is square: uniform padding, no min-width. */\nexport const ICON_ONLY_PADDING: Record<SizeValue, number> = {\n xs: 2,\n sm: 5,\n md: 7,\n lg: 9,\n xl: 11,\n};\n\n/**\n * The start/end icon slot's font-size, in px — MUI's `medium` value, pinned\n * (12-74).\n *\n * MUI sizes that slot off its OWN `size` prop, writing 18/20/22 onto the first\n * child of `.MuiButton-startIcon`. We never passed a `size`, so every button in\n * every size has always drawn medium's 20px; now that `size` IS forwarded — so\n * the rendered class finally names the size the button actually is — the number\n * would start moving with it.\n *\n * WHAT THAT ACTUALLY REACHES, measured in a browser rather than assumed: this\n * Button renders its own wrapper span around the icon (it carries the child\n * test id), so MUI's rule lands on the WRAPPER and reaches the glyph only when\n * the glyph takes its size by inheritance — `fontSize=\"inherit\"`, an em-sized\n * SVG, a text or emoji glyph. With the pin removed, such a glyph measured 18px\n * at `xs`/`sm` and 22px at `lg`/`xl` against the 20px it has always been. An\n * icon carrying an absolute size of its own does not move at all: a default\n * `SvgIcon` stayed 24×24 across all five.\n *\n * A silent resize of the inherited case is still a design decision arriving as\n * a side effect of a class-name fix, so it is pinned to what shipped before —\n * `Button.tsx` puts it on that same wrapper. Scaling the glyph with the button\n * is a ticket of its own.\n */\nexport const BUTTON_ICON_GLYPH_SIZE = 20;\n\nexport const BUTTON_FONT_WEIGHT = 500;\n/** Between the icon and the label: `theme.spacing(0.5)`. */\nexport const BUTTON_ICON_GAP_UNITS = 0.5;\nexport const BUTTON_SPINNER_SIZE = 16;\n/** MUI's `line-height` for button text. */\nexport const BUTTON_LINE_HEIGHT = 1.75;\n\n/** The wash behind an outline, ghost or text button while it is hovered or pressed. */\nexport const BUTTON_WASH_ALPHA = 0.1;\nexport const GLASS_BACKGROUND_ALPHA = 0.1;\nexport const GLASS_BACKGROUND_ALPHA_PRESSED = 0.2;\nexport const GLASS_BORDER_ALPHA = 0.2;\nexport const GLOW_INNER_ALPHA = 0.6;\nexport const GLOW_OUTER_ALPHA = 0.3;\nexport const GLOW_RADIUS = 20;\nexport const PULSE_ALPHA = 0.3;\nexport const PULSE_DURATION_MS = 2000;\nexport const PULSE_SPREAD = 15;\n\n/**\n * `neutral` has no palette slot of its own in MUI, so `Button.styles.ts` has\n * always drawn it from three greys. Same three greys here.\n */\nexport function buttonPalette(theme: UiTheme, color: ColorValue): UiPaletteColor {\n if (color === 'neutral') {\n return {\n main: NEUTRAL_RAMP[700],\n dark: NEUTRAL_RAMP[800],\n light: NEUTRAL_RAMP[500],\n contrastText: ABSOLUTE_INK.white,\n };\n }\n return theme.palette[color];\n}\n\n/**\n * The label colour for `ghost` and `text`: one step darker than `main` in\n * light mode (lighter in dark), because `main` is chosen to sit UNDER white and\n * is not legible AS text on a tinted surface. See the web `quietInk`.\n */\nexport const quietInk = (theme: UiTheme, palette: UiPaletteColor): string =>\n theme.mode === 'dark' ? lighten(palette.main, 0.35) : darken(palette.main, 0.3);\n\n/** Gradients run between two related hues; the named colours pick a specific pair. */\nexport function gradientStops(\n theme: UiTheme,\n color: ColorValue,\n palette: UiPaletteColor,\n): [string, string] {\n switch (color) {\n case 'primary':\n return [theme.palette.primary.main, theme.palette.secondary.main];\n case 'secondary':\n return [theme.palette.secondary.main, theme.palette.primary.main];\n case 'success':\n case 'warning':\n return [theme.palette[color].light, theme.palette[color].dark];\n case 'danger':\n return [theme.palette.danger.light, theme.palette.danger.dark];\n default:\n return [palette.main, palette.dark];\n }\n}\n","import * as React from 'react';\nimport { ActivityIndicator, Platform, StyleSheet, View } from 'react-native';\nimport type { TextStyle } from 'react-native';\n\nimport { BUTTON_SPINNER_SIZE } from './Button.metrics';\nimport { renderTextChildren } from '../../../platform/text-children';\n\n/**\n * The native Button's loading state (FUT-3646): the label and icon stay laid\n * out under the spinner — so the button keeps its width and shape — and the\n * button keeps its name. Split from `Button.native.tsx` to keep that file\n * under the line ceiling.\n */\n\n/**\n * The spinner over the label while loading, across the whole button; `role`\n * comes from react-native's ActivityIndicator. It used to REPLACE the label, so\n * a loading button had no accessible name (FUT-3646).\n */\nexport function Spinner({ color, testID }: { color: string; testID: string }): React.JSX.Element {\n return (\n <View style={styles.spinner}>\n <ActivityIndicator\n size={Platform.OS === 'ios' ? 'small' : BUTTON_SPINNER_SIZE}\n color={color}\n testID={testID}\n accessibilityLabel=\"loading\"\n />\n </View>\n );\n}\n\n/**\n * The button's name while loading: its text label, said outright. The label\n * stays laid out (transparent) so the width holds, but a screen reader may skip\n * a view at opacity 0 — VoiceOver does — so the name cannot ride on it alone.\n * A caller's own `aria-label` still wins, being spread after this.\n */\nexport const loadingName = (loading: boolean | undefined, children: React.ReactNode): string | undefined =>\n loading ? textOf(children) : undefined;\n\n/**\n * The text of a label made only of strings and numbers — `Salvar`, or\n * `Salvar {n}`, which React hands over as an array. Anything else (an element)\n * has no text to say here, so the name is left to the label itself.\n */\nfunction textOf(children: React.ReactNode): string | undefined {\n const parts = React.Children.toArray(children);\n const textual = parts.every((part) => typeof part === 'string' || typeof part === 'number');\n return textual && parts.length > 0 ? parts.join('') : undefined;\n}\n\n/** Laid out but unseen under the spinner while loading, so the width holds. */\nexport const hiddenWhile = (loading: boolean | undefined) => (loading ? styles.hidden : null);\n\n/** The text label; while loading, kept laid out but unseen under the spinner. */\nexport function Label({\n loading,\n label,\n testID,\n children,\n}: {\n loading: boolean | undefined;\n label: TextStyle;\n testID: string;\n children: React.ReactNode;\n}): React.ReactNode {\n const text = renderTextChildren(children, label, 1);\n return loading ? (\n <View style={styles.hidden} testID={testID}>\n {text}\n </View>\n ) : (\n text\n );\n}\n\nconst styles = StyleSheet.create({\n // The label and icon under the spinner: laid out, so the width holds, but unseen.\n hidden: {\n opacity: 0,\n },\n spinner: {\n ...StyleSheet.absoluteFillObject,\n pointerEvents: 'none',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAYA,YAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA,YAAAC;AAAA,EACA;AAAA,EACA,cAAAC;AAAA,EACA,QAAAC;AAAA,OAMK;;;ACOP,IAAM,kBAAwE;AAAA,EAC5E,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,cAAc;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;AAIA,IAAM,eAAe,CAA4B,UAC/C,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAEK,IAAM,qBAAqB,CAA4B,WAC3D,EAAE,GAAG,iBAAiB,GAAG,aAAa,KAAK,EAAE;;;ACpBzC,IAAM,eAAqD;AAAA,EAChE,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,UAAU,GAAG;AAAA,EAC7D,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,IAAI,UAAU,GAAG;AAAA,EAC9D,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,IAAI,UAAU,GAAG;AAAA,EAC9D,IAAI,EAAE,iBAAiB,IAAI,mBAAmB,IAAI,UAAU,GAAG;AAAA,EAC/D,IAAI,EAAE,iBAAiB,IAAI,mBAAmB,IAAI,UAAU,GAAG;AACjE;AAqCO,IAAM,qBAAqB;AAE3B,IAAM,wBAAwB;AAC9B,IAAM,sBAAsB;AAE5B,IAAM,qBAAqB;AA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StyleSheet","styles","View"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EmptyState
|
|
3
|
-
} from "../chunks/chunk-
|
|
4
|
-
import "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-AVHGS66L.js";
|
|
4
|
+
import "../chunks/chunk-BXNZHDXK.js";
|
|
5
5
|
import "../chunks/chunk-3JBZE4I6.js";
|
|
6
6
|
import "../chunks/chunk-ZRQHLTYG.js";
|
|
7
7
|
import "../chunks/chunk-DN73KYIZ.js";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
} from "../chunks/chunk-MJVSQXOD.js";
|
|
8
8
|
import {
|
|
9
9
|
EmptyState
|
|
10
|
-
} from "../chunks/chunk-
|
|
11
|
-
import "../chunks/chunk-
|
|
10
|
+
} from "../chunks/chunk-AVHGS66L.js";
|
|
11
|
+
import "../chunks/chunk-BXNZHDXK.js";
|
|
12
12
|
import "../chunks/chunk-3JBZE4I6.js";
|
|
13
13
|
import "../chunks/chunk-ZRQHLTYG.js";
|
|
14
14
|
import {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.cells.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataGrid/DataGrid.cells.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAqClD,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAChE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,OAAO,CA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aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoCtC;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7D,GAAG,EAAE,CAAC,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACzB;AAoDD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvD,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GACxB,KAAK,CAAC,GAAG,CAAC,OAAO,CAuCnB"}
|
|
@@ -42,6 +42,12 @@ export interface GridColumn<T = Record<string, unknown>> {
|
|
|
42
42
|
rowIndex: number;
|
|
43
43
|
col: GridColumn<T>;
|
|
44
44
|
}) => React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Fired by a click anywhere in the cell, its padding included. Opening a row
|
|
47
|
+
* from a wrapper inside the content left the padding dead: a strip either
|
|
48
|
+
* side of every column that showed the hover and did nothing (FUT-3849).
|
|
49
|
+
*/
|
|
50
|
+
onCellClick?: (row: T) => void;
|
|
45
51
|
headerCell?: (col: GridColumn<T>) => React.ReactNode;
|
|
46
52
|
/** Cell editor renderer (edit mode) */
|
|
47
53
|
editor?: (ctx: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataGrid/DataGrid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EA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C,EAAE,MAAM,CAAC;IAEtB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAEzB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,gDAAgD;IAChD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,iCAAiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE7B,gDAAgD;IAChD,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;QACpB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;KACxB,KAAK,IAAI,CAAC;IAEX,oBAAoB;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -6,7 +6,7 @@ import type { DataViewColumn, DataViewState, FilterFieldConfig, RangeFieldConfig
|
|
|
6
6
|
export declare function isActionsColumn<T extends Record<string, unknown>>(col: GridColumn<T>): boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Map the DataView columns to grid columns, applying visibility and — when a row
|
|
9
|
-
* click handler is present —
|
|
9
|
+
* click handler is present — making each non-actions cell, padding included, open the row.
|
|
10
10
|
*/
|
|
11
11
|
export declare function buildGridColumns<T extends Record<string, unknown>>(columns: DataViewColumn<T>[], visibleColumns: string[], onRowClick: ((row: T) => void) | undefined): GridColumn<T>[];
|
|
12
12
|
interface ActionsColumnConfig<T extends Record<string, unknown>> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-views-grid-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-grid-helpers.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAG3D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAMvE,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACV,MAAM,oBAAoB,CAAC;AAE5B,gDAAgD;AAChD,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAE9F;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,EAC5B,cAAc,EAAE,MAAM,EAAE,EACxB,UAAU,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,GACzC,UAAU,CAAC,CAAC,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"data-views-grid-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-grid-helpers.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAG3D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MAAM,EAAE,CAGzG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM;iCAEjB,KAAK;;;;EAKrC"}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { View, type GestureResponderEvent, type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { Platform, View, type GestureResponderEvent, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Whether the button clips what it draws.
|
|
5
|
+
*
|
|
6
|
+
* The web button is `overflow: hidden` (its ripple needs it) unless the pulse
|
|
7
|
+
* ring turns it visible; on native the glow's shadow needs it visible too,
|
|
8
|
+
* because a view's own shadow is clipped by its own overflow there.
|
|
9
|
+
*
|
|
10
|
+
* An Android button never clips (FUT-3775). There, a clipped solid button that
|
|
11
|
+
* turned enabled — after a disable or a loading — painted its new fill and no
|
|
12
|
+
* label: an adopter's cancel, help and delivery sheets showed a red block
|
|
13
|
+
* with no text. The same button unclipped draws its label in every state
|
|
14
|
+
* (measured on an Android emulator with a pixel check). Nothing else needs the
|
|
15
|
+
* clip there: the label, icon and spinner sit inside the padding. The ripple
|
|
16
|
+
* did, since its mask is a square, so a native press shows the variant's
|
|
17
|
+
* pressed paint alone, as on iOS, and `ripple` only matters on the web.
|
|
18
|
+
*/
|
|
19
|
+
export declare function overflowOf(visible: boolean, os?: typeof Platform.OS): ViewStyle['overflow'];
|
|
3
20
|
export declare const Button: React.ForwardRefExoticComponent<import("./Button.base").ButtonBaseProps & Omit<import("react-native").PressableProps, "style" | "onBlur" | "onFocus" | "onPress" | keyof import("./Button.base").ButtonBaseProps> & {
|
|
4
21
|
onClick?: (event: GestureResponderEvent) => void;
|
|
5
22
|
onPress?: (event: GestureResponderEvent) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Button/Button.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"Button.native.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Button/Button.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,QAAQ,EAGR,IAAI,EACJ,KAAK,qBAAqB,EAE1B,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAyNtB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,GAAE,OAAO,QAAQ,CAAC,EAAgB,GAAG,SAAS,CAAC,UAAU,CAAC,CAExG;AA6CD,eAAO,MAAM,MAAM;;;;;;8BAgDjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -136,6 +136,17 @@ export interface DataCellProps<T extends Record<string, unknown>> {
|
|
|
136
136
|
model: Pick<DataGridModel<T>, 'editingCell' | 'setEditingCell'>;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/** The cell's own click, padding included — never while the cell is being edited (FUT-3849). */
|
|
140
|
+
function cellClick<T extends Record<string, unknown>>(
|
|
141
|
+
column: GridColumn<T>,
|
|
142
|
+
row: T,
|
|
143
|
+
isEditing: boolean,
|
|
144
|
+
): (() => void) | undefined {
|
|
145
|
+
const onCellClick = column.onCellClick;
|
|
146
|
+
if (!onCellClick || isEditing) return undefined;
|
|
147
|
+
return () => onCellClick(row);
|
|
148
|
+
}
|
|
149
|
+
|
|
139
150
|
export function DataCell<T extends Record<string, unknown>>({
|
|
140
151
|
row,
|
|
141
152
|
rowIndex,
|
|
@@ -157,9 +168,11 @@ export function DataCell<T extends Record<string, unknown>>({
|
|
|
157
168
|
data-slot="cell"
|
|
158
169
|
data-col-id={column.id}
|
|
159
170
|
data-editing={isEditing}
|
|
171
|
+
onClick={cellClick(column, row, isEditing)}
|
|
160
172
|
sx={{
|
|
161
173
|
...columnBox(theme, column),
|
|
162
174
|
height: rowHeight,
|
|
175
|
+
...(column.onCellClick && { cursor: "pointer" }),
|
|
163
176
|
}}
|
|
164
177
|
role="gridcell"
|
|
165
178
|
tabIndex={-1}
|
|
@@ -40,6 +40,12 @@ export interface GridColumn<T = Record<string, unknown>> {
|
|
|
40
40
|
enableEdit?: boolean;
|
|
41
41
|
/** Custom renderers */
|
|
42
42
|
cell?: (ctx: { value: unknown; row: T; rowIndex: number; col: GridColumn<T> }) => React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Fired by a click anywhere in the cell, its padding included. Opening a row
|
|
45
|
+
* from a wrapper inside the content left the padding dead: a strip either
|
|
46
|
+
* side of every column that showed the hover and did nothing (FUT-3849).
|
|
47
|
+
*/
|
|
48
|
+
onCellClick?: (row: T) => void;
|
|
43
49
|
headerCell?: (col: GridColumn<T>) => React.ReactNode;
|
|
44
50
|
/** Cell editor renderer (edit mode) */
|
|
45
51
|
editor?: (ctx: {
|
|
@@ -25,7 +25,7 @@ export function isActionsColumn<T extends Record<string, unknown>>(col: GridColu
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Map the DataView columns to grid columns, applying visibility and — when a row
|
|
28
|
-
* click handler is present —
|
|
28
|
+
* click handler is present — making each non-actions cell, padding included, open the row.
|
|
29
29
|
*/
|
|
30
30
|
export function buildGridColumns<T extends Record<string, unknown>>(
|
|
31
31
|
columns: DataViewColumn<T>[],
|
|
@@ -38,13 +38,12 @@ export function buildGridColumns<T extends Record<string, unknown>>(
|
|
|
38
38
|
return {
|
|
39
39
|
...col,
|
|
40
40
|
hidden,
|
|
41
|
+
// On the cell, not a wrapper inside it: its padding opens the row too.
|
|
42
|
+
onCellClick: onRowClick,
|
|
41
43
|
cell: (ctx) => {
|
|
42
44
|
const content = col.cell ? col.cell(ctx) : ctx.value == null ? "" : String(ctx.value);
|
|
43
45
|
return (
|
|
44
|
-
<Box
|
|
45
|
-
onClick={() => onRowClick(ctx.row)}
|
|
46
|
-
sx={{ cursor: "pointer", width: "100%", height: "100%", display: "flex", alignItems: "center" }}
|
|
47
|
-
>
|
|
46
|
+
<Box sx={{ width: "100%", height: "100%", display: "flex", alignItems: "center" }}>
|
|
48
47
|
{content}
|
|
49
48
|
</Box>
|
|
50
49
|
);
|
|
@@ -61,7 +61,7 @@ import { Button } from '@procurement/ui';
|
|
|
61
61
|
| `icon` | `ReactNode` | - | Icon element to display before text |
|
|
62
62
|
| `glow` | `boolean` | `false` | Adds glow visual effect |
|
|
63
63
|
| `pulse` | `boolean` | `false` | Adds pulse animation effect |
|
|
64
|
-
| `ripple` | `boolean` | `true` | Enables/disables ripple effect on click
|
|
64
|
+
| `ripple` | `boolean` | `true` | Enables/disables ripple effect on click (web only; a native press shows the pressed paint) |
|
|
65
65
|
| `active` | `boolean` | `false` | Indicates active state (used with text) |
|
|
66
66
|
| `fullWidth` | `boolean` | `false` | Makes button take full width of container |
|
|
67
67
|
| `dataTestId` | `string` | - | Test ID for testing purposes |
|
|
@@ -228,6 +228,26 @@ interface ButtonLook {
|
|
|
228
228
|
container: (state: PressableStateCallbackType) => StyleProp<ViewStyle>;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Whether the button clips what it draws.
|
|
233
|
+
*
|
|
234
|
+
* The web button is `overflow: hidden` (its ripple needs it) unless the pulse
|
|
235
|
+
* ring turns it visible; on native the glow's shadow needs it visible too,
|
|
236
|
+
* because a view's own shadow is clipped by its own overflow there.
|
|
237
|
+
*
|
|
238
|
+
* An Android button never clips (FUT-3775). There, a clipped solid button that
|
|
239
|
+
* turned enabled — after a disable or a loading — painted its new fill and no
|
|
240
|
+
* label: an adopter's cancel, help and delivery sheets showed a red block
|
|
241
|
+
* with no text. The same button unclipped draws its label in every state
|
|
242
|
+
* (measured on an Android emulator with a pixel check). Nothing else needs the
|
|
243
|
+
* clip there: the label, icon and spinner sit inside the padding. The ripple
|
|
244
|
+
* did, since its mask is a square, so a native press shows the variant's
|
|
245
|
+
* pressed paint alone, as on iOS, and `ripple` only matters on the web.
|
|
246
|
+
*/
|
|
247
|
+
export function overflowOf(visible: boolean, os: typeof Platform.OS = Platform.OS): ViewStyle['overflow'] {
|
|
248
|
+
return visible || os === 'android' ? 'visible' : 'hidden';
|
|
249
|
+
}
|
|
250
|
+
|
|
231
251
|
/**
|
|
232
252
|
* Everything the button paints, decided once per render from the resolved
|
|
233
253
|
* props and the theme. Kept out of the component so the component reads as
|
|
@@ -243,10 +263,7 @@ function buttonLook(theme: UiTheme, props: ResolvedProps): ButtonLook {
|
|
|
243
263
|
// The theme's one field radius, so a button and the input beside it agree.
|
|
244
264
|
const radius = theme.radius.field;
|
|
245
265
|
const metrics = BUTTON_SIZES[size];
|
|
246
|
-
|
|
247
|
-
// ring turns it visible; on native the glow's shadow needs it visible too,
|
|
248
|
-
// because a view's own shadow is clipped by its own overflow there.
|
|
249
|
-
const overflow: ViewStyle['overflow'] = pulse || glow ? 'visible' : 'hidden';
|
|
266
|
+
const overflow = overflowOf(Boolean(pulse || glow));
|
|
250
267
|
const sized = sizeStyle(theme, size, iconOnly, icon != null);
|
|
251
268
|
const glowing = glow && !inactive ? glowStyle(palette) : null;
|
|
252
269
|
|
|
@@ -276,7 +293,8 @@ function buttonLook(theme: UiTheme, props: ResolvedProps): ButtonLook {
|
|
|
276
293
|
|
|
277
294
|
export const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {
|
|
278
295
|
const resolved = resolveButtonProps(rawProps);
|
|
279
|
-
|
|
296
|
+
// `ripple` is web-only: kept out of `others` so it never reaches the Pressable (see overflowOf).
|
|
297
|
+
const { loading, icon, iconPosition, pulse, ripple: _ripple, children, onClick, onPress, ...others } = resolved;
|
|
280
298
|
const theme = useUiTheme();
|
|
281
299
|
const look = buttonLook(theme, resolved);
|
|
282
300
|
|
|
@@ -308,7 +326,6 @@ export const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {
|
|
|
308
326
|
aria-label={loadingName(loading, children)}
|
|
309
327
|
disabled={look.inactive}
|
|
310
328
|
onPress={handlePress}
|
|
311
|
-
android_ripple={ripple && !look.inactive ? { color: alpha(look.palette.main, 0.2), borderless: false } : undefined}
|
|
312
329
|
style={look.container}
|
|
313
330
|
testID={testId}
|
|
314
331
|
{...pressable}
|