@multiplatform.one/forms 7.74.0 → 7.76.0
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/cjs/Button/index.cjs +31 -7
- package/dist/cjs/Button/index.native.js +33 -7
- package/dist/cjs/Button/index.native.js.map +1 -1
- package/dist/cjs/fields/Combobox/index.native.js.map +1 -1
- package/dist/cjs/standardActions.cjs +11 -1
- package/dist/cjs/standardActions.native.js +11 -1
- package/dist/cjs/standardActions.native.js.map +1 -1
- package/dist/esm/Button/index.mjs +32 -8
- package/dist/esm/Button/index.mjs.map +1 -1
- package/dist/esm/Button/index.native.js +34 -8
- package/dist/esm/Button/index.native.js.map +1 -1
- package/dist/esm/fields/Combobox/index.mjs.map +1 -1
- package/dist/esm/fields/Combobox/index.native.js.map +1 -1
- package/dist/esm/standardActions.mjs +12 -2
- package/dist/esm/standardActions.mjs.map +1 -1
- package/dist/esm/standardActions.native.js +12 -2
- package/dist/esm/standardActions.native.js.map +1 -1
- package/dist/jsx/Button/index.mjs +32 -8
- package/dist/jsx/Button/index.mjs.map +1 -1
- package/dist/jsx/Button/index.native.js +33 -7
- package/dist/jsx/Button/index.native.js.map +1 -1
- package/dist/jsx/fields/Combobox/index.mjs.map +1 -1
- package/dist/jsx/fields/Combobox/index.native.js.map +1 -1
- package/dist/jsx/standardActions.mjs +12 -2
- package/dist/jsx/standardActions.mjs.map +1 -1
- package/dist/jsx/standardActions.native.js +11 -1
- package/dist/jsx/standardActions.native.js.map +1 -1
- package/package.json +8 -8
- package/src/Button/Button.confirmFill.spec.tsx +141 -0
- package/src/Button/IconButtonGroup.spec.tsx +14 -0
- package/src/Button/index.tsx +50 -10
- package/src/fields/Combobox/index.tsx +2 -3
- package/src/standardActions.ts +9 -1
- package/types/Button/index.d.ts.map +1 -1
- package/types/fields/Combobox/index.d.ts.map +1 -1
- package/types/standardActions.d.ts +2 -2
- package/types/standardActions.d.ts.map +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vitest-environment jsdom
|
|
3
|
+
*
|
|
4
|
+
* FZ-8439: an overlay's one confirm is the accent ✓ (IconButton
|
|
5
|
+
* plate="primary"), never a black pill. Clay on the FZ-8116 deck
|
|
6
|
+
* (rv_0ea65e640a0ef261): "The cancel and Move button are not how we like to
|
|
7
|
+
* do buttons." His complaint was the word in a pill, not ink: a hued preset
|
|
8
|
+
* fills the ✓ circle with its accent, and the hue-less house preset fills it
|
|
9
|
+
* with its ink under an inverse check, iOS's mono style (rv_d2757722a7cb0992,
|
|
10
|
+
* "ink").
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { cleanup, render, screen } from "@testing-library/react";
|
|
14
|
+
import {
|
|
15
|
+
contrastRatio,
|
|
16
|
+
createDefaultThemeConfig,
|
|
17
|
+
normalizeToHex,
|
|
18
|
+
relativeLuminance,
|
|
19
|
+
} from "@multiplatform.one/theme";
|
|
20
|
+
import type { ReactElement } from "react";
|
|
21
|
+
import { TamaguiProvider, YStack } from "tamagui";
|
|
22
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
23
|
+
import { Button } from "./index";
|
|
24
|
+
|
|
25
|
+
afterEach(cleanup);
|
|
26
|
+
|
|
27
|
+
const houseConfig = createDefaultThemeConfig();
|
|
28
|
+
const SCHEMES = ["light", "dark"] as const;
|
|
29
|
+
|
|
30
|
+
function Check({ size, color }: { size?: number; color?: string }) {
|
|
31
|
+
return <svg data-glyph="" width={size} height={size} color={color} />;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function renderIn(ui: ReactElement, theme: string) {
|
|
35
|
+
return render(
|
|
36
|
+
<TamaguiProvider config={houseConfig.tamagui} defaultTheme={theme}>
|
|
37
|
+
<YStack backgroundColor="$background">{ui}</YStack>
|
|
38
|
+
</TamaguiProvider>,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function injectedRuleValue(className: string, property: string): string | null {
|
|
43
|
+
for (const sheet of Array.from(document.styleSheets)) {
|
|
44
|
+
for (const rule of Array.from(sheet.cssRules)) {
|
|
45
|
+
if (!(rule instanceof CSSStyleRule)) continue;
|
|
46
|
+
if (!rule.selectorText.endsWith(`.${className}`)) continue;
|
|
47
|
+
const value = rule.style.getPropertyValue(property);
|
|
48
|
+
if (value) return value.trim();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function resting(el: Element, prefix: string, property: string): string | null {
|
|
55
|
+
const cls = Array.from(el.classList).find(
|
|
56
|
+
(c) => c.startsWith(prefix) && !new RegExp(`^${prefix}0(hover|active|focus|press)`).test(c),
|
|
57
|
+
);
|
|
58
|
+
return cls ? injectedRuleValue(cls, property) : null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Tamagui paints `$token` values as CSS variables from the theme the Button
|
|
63
|
+
* wraps itself in; jsdom drops tamagui's theme stylesheet, so read the
|
|
64
|
+
* variable off that theme in the config, as the browser would.
|
|
65
|
+
*/
|
|
66
|
+
function resolvePaint(paint: string, themeName: string): string {
|
|
67
|
+
const variable = /^var\(--([^)]+)\)$/.exec(paint)?.[1];
|
|
68
|
+
if (!variable) return paint;
|
|
69
|
+
const themes = houseConfig.tamagui.themes as Record<string, Record<string, { val?: unknown }>>;
|
|
70
|
+
const theme = themes[themeName];
|
|
71
|
+
if (!theme) {
|
|
72
|
+
const near = Object.keys(themes).filter((name) => name.endsWith("_accent"));
|
|
73
|
+
throw new Error(`no theme ${themeName}; accent themes: ${near.slice(0, 12).join(", ")}`);
|
|
74
|
+
}
|
|
75
|
+
const value = theme[variable]?.val;
|
|
76
|
+
return typeof value === "string" ? resolvePaint(value, themeName) : paint;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function luminance(paint: string): number {
|
|
80
|
+
const hex = normalizeToHex(paint);
|
|
81
|
+
if (!hex) throw new Error(`unreadable paint ${paint}`);
|
|
82
|
+
return relativeLuminance(hex);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function confirmPaint(scheme: string) {
|
|
86
|
+
const confirm = screen.getByRole("button", { name: "Move" });
|
|
87
|
+
const fill = resting(confirm, "_bg-", "background-color");
|
|
88
|
+
expect(fill).toBeTruthy();
|
|
89
|
+
const glyph = confirm.querySelector("[data-glyph]")!;
|
|
90
|
+
const glyphColor = glyph.getAttribute("color");
|
|
91
|
+
const ink =
|
|
92
|
+
glyphColor && glyphColor !== "currentColor" ? glyphColor : resting(confirm, "_col-", "color");
|
|
93
|
+
expect(ink).toBeTruthy();
|
|
94
|
+
return {
|
|
95
|
+
confirm,
|
|
96
|
+
fill: luminance(resolvePaint(fill!, `${scheme}_accent`)),
|
|
97
|
+
check: luminance(resolvePaint(ink!, `${scheme}_accent`)),
|
|
98
|
+
dark: scheme.startsWith("dark"),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
describe("FZ-8439: the overlay confirm is a ✓ circle, never a word in a pill", () => {
|
|
103
|
+
for (const scheme of SCHEMES) {
|
|
104
|
+
it(`${scheme}: the confirm is an icon-only circle named by its action`, () => {
|
|
105
|
+
renderIn(<Button plate="primary" icon={Check} aria-label="Move" />, scheme);
|
|
106
|
+
const confirm = screen.getByRole("button", { name: "Move" });
|
|
107
|
+
expect(confirm.getAttribute("data-mp-icon-button")).toBe("primary");
|
|
108
|
+
expect(confirm.textContent).toBe("");
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it(`${scheme}, hue-less house preset: an ink circle under an inverse check`, () => {
|
|
112
|
+
renderIn(<Button plate="primary" icon={Check} aria-label="Move" />, scheme);
|
|
113
|
+
const { fill, check, dark } = confirmPaint(scheme);
|
|
114
|
+
// Ink is the scheme's text pole: dark on a light page, light on a dark one.
|
|
115
|
+
if (dark) expect(fill).toBeGreaterThan(0.6);
|
|
116
|
+
else expect(fill).toBeLessThan(0.05);
|
|
117
|
+
expect(contrastRatio(check, fill)).toBeGreaterThanOrEqual(4.5);
|
|
118
|
+
// r3: white wherever it holds on the fill, so light mode's ✓ is white.
|
|
119
|
+
if (!dark) expect(check).toBeCloseTo(1, 5);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
it(`${scheme}, hued preset: the circle takes the accent hue`, () => {
|
|
123
|
+
renderIn(<Button plate="primary" icon={Check} aria-label="Move" />, `${scheme}_blue`);
|
|
124
|
+
const { fill, check } = confirmPaint(`${scheme}_blue`);
|
|
125
|
+
expect(fill).toBeGreaterThan(0.05);
|
|
126
|
+
expect(fill).toBeLessThan(0.6);
|
|
127
|
+
expect(contrastRatio(check, fill)).toBeGreaterThanOrEqual(3);
|
|
128
|
+
// r3 (Clay): the ✓ on an accent fill is white, iOS's checkmark.
|
|
129
|
+
expect(check).toBeCloseTo(1, 5);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it(`${scheme}: the circle's rest fill is the accent as a literal, so native paints the browser's colour`, () => {
|
|
133
|
+
renderIn(<Button plate="primary" icon={Check} aria-label="Move" />, scheme);
|
|
134
|
+
const confirm = screen.getByRole("button", { name: "Move" });
|
|
135
|
+
const fill = resting(confirm, "_bg-", "background-color");
|
|
136
|
+
const accent = resolvePaint("var(--background)", `${scheme}_accent`);
|
|
137
|
+
expect(normalizeToHex(fill!)).toBe(normalizeToHex(accent));
|
|
138
|
+
expect(fill).not.toMatch(/^var\(/);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
});
|
|
@@ -74,6 +74,20 @@ describe("LC-176: IconButtonGroup", () => {
|
|
|
74
74
|
expect(screen.getByLabelText("Back").querySelector("[data-glass]")).not.toBeNull();
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
+
it("a lone glass circle fills the button's border box, as wide as the ✓ beside it (FZ-8439)", () => {
|
|
78
|
+
glass.available = true;
|
|
79
|
+
houseRender(
|
|
80
|
+
<Surface bar>
|
|
81
|
+
<IconButton icon={Glyph} aria-label="Close" />
|
|
82
|
+
</Surface>,
|
|
83
|
+
);
|
|
84
|
+
const face = screen.getByLabelText("Close").querySelector<HTMLElement>("[data-glass]")!;
|
|
85
|
+
const inset = Number.parseFloat(face.style.top);
|
|
86
|
+
expect(inset).toBeLessThan(0);
|
|
87
|
+
for (const side of ["right", "bottom", "left"] as const)
|
|
88
|
+
expect(Number.parseFloat(face.style[side])).toBe(inset);
|
|
89
|
+
});
|
|
90
|
+
|
|
77
91
|
it("over media, the group is one capsule and its buttons draw their glyphs alone", () => {
|
|
78
92
|
houseRender(
|
|
79
93
|
<>
|
package/src/Button/index.tsx
CHANGED
|
@@ -31,7 +31,11 @@ import {
|
|
|
31
31
|
solidButtonIntents,
|
|
32
32
|
solidPaletteThemes,
|
|
33
33
|
useAccentOnSurface,
|
|
34
|
+
contrastRatio,
|
|
34
35
|
ensureKeyboardModalityTracking,
|
|
36
|
+
GLYPH_CONTRAST_FLOOR,
|
|
37
|
+
normalizeToHex,
|
|
38
|
+
relativeLuminance,
|
|
35
39
|
useBarSurface,
|
|
36
40
|
useElevatedSurface,
|
|
37
41
|
useGlyphTintOnSurface,
|
|
@@ -163,6 +167,25 @@ function normalizeButtonIcon(
|
|
|
163
167
|
return icon;
|
|
164
168
|
}
|
|
165
169
|
|
|
170
|
+
/** The fill `theme="accent"` resolves to under `themeName`, as a hex. */
|
|
171
|
+
function accentSolidFill(themeName: string | undefined): string | null {
|
|
172
|
+
if (!themeName) return null;
|
|
173
|
+
const themes = getConfig().themes as Record<string, Record<string, { val?: unknown }>>;
|
|
174
|
+
const parts = themeName.split("_");
|
|
175
|
+
for (let end = parts.length; end > 0; end--) {
|
|
176
|
+
const theme = themes[`${parts.slice(0, end).join("_")}_accent`];
|
|
177
|
+
if (!theme) continue;
|
|
178
|
+
let value = theme.background?.val;
|
|
179
|
+
for (let hop = 0; hop < 4 && typeof value === "string"; hop++) {
|
|
180
|
+
const ref = /^var\(--([^)]+)\)$/.exec(value)?.[1];
|
|
181
|
+
if (!ref) break;
|
|
182
|
+
value = theme[ref]?.val;
|
|
183
|
+
}
|
|
184
|
+
return typeof value === "string" ? normalizeToHex(value) : null;
|
|
185
|
+
}
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
|
|
166
189
|
function NativeButtonIcon({
|
|
167
190
|
icon,
|
|
168
191
|
size,
|
|
@@ -634,7 +657,8 @@ export function Button({
|
|
|
634
657
|
// LC-176: a glyph that is the whole button is bold, so it reads as one.
|
|
635
658
|
const resolvedGlyphWeight = glyphWeight ?? (iconOnly ? "bold" : "regular");
|
|
636
659
|
const elevatedGround = useElevatedSurface();
|
|
637
|
-
const
|
|
660
|
+
const hostThemeName = useThemeName();
|
|
661
|
+
const darkScheme = isDarkThemeName(hostThemeName);
|
|
638
662
|
const resolvedSize = typeof sizeProp === "number" ? sizeProp : knobProps.sizeToken;
|
|
639
663
|
const touch = useTouchSurface();
|
|
640
664
|
const recipe = resolveButtonSizeRecipe(resolvedSize, recipeFamily, touch);
|
|
@@ -831,7 +855,7 @@ export function Button({
|
|
|
831
855
|
const selectedFill = Boolean(isSelected) && !unavailable && !mediaPlate;
|
|
832
856
|
// A glyph alone holds 3:1; beside a label both take the label's AA tint.
|
|
833
857
|
const barInk =
|
|
834
|
-
accentInk && chromeless && !selectedFill && !unavailable
|
|
858
|
+
accentInk && chromeless && !selectedFill && !unavailable && !confirmPlate
|
|
835
859
|
? labelled
|
|
836
860
|
? glyphTint.label
|
|
837
861
|
: glyphTint.glyph
|
|
@@ -853,17 +877,31 @@ export function Button({
|
|
|
853
877
|
? loadGlassView()
|
|
854
878
|
: null;
|
|
855
879
|
const framedCircle = iconOnly && Boolean(circular) && !nested && !mediaPlate && !confirmPlate;
|
|
880
|
+
// FZ-8439 r3: the ✓ on an accent fill is white, iOS's checkmark, whenever
|
|
881
|
+
// white holds the glyph floor on that fill. A fill too light for it (the
|
|
882
|
+
// house ink circle in dark, a pale hue) keeps the sub-theme's on-fill. A
|
|
883
|
+
// literal, so native paints white too and not the token's off-white.
|
|
884
|
+
const accentFillHex = confirmPlate ? accentSolidFill(hostThemeName) : null;
|
|
885
|
+
const confirmInk =
|
|
886
|
+
accentFillHex &&
|
|
887
|
+
contrastRatio(relativeLuminance("#ffffff"), relativeLuminance(accentFillHex)) >=
|
|
888
|
+
GLYPH_CONTRAST_FLOOR
|
|
889
|
+
? "#ffffff"
|
|
890
|
+
: "$color";
|
|
856
891
|
// LC-176: a glyph on a plate takes the plate's on-colour at full strength,
|
|
857
892
|
// never the frame's quieter default: white on the media material, the text
|
|
858
|
-
// colour on a neutral circle
|
|
893
|
+
// colour on a neutral circle, the accent's on-fill on the confirm (FZ-8439:
|
|
894
|
+
// web glyphs inherit CSS colour, so without it the house ✓ is ink on ink).
|
|
859
895
|
const plateInk =
|
|
860
896
|
unavailable || barInk || outlinedInk
|
|
861
897
|
? undefined
|
|
862
898
|
: mediaPlate || (iconButton && groupGround === "media")
|
|
863
899
|
? "$color12"
|
|
864
|
-
:
|
|
865
|
-
?
|
|
866
|
-
:
|
|
900
|
+
: confirmPlate
|
|
901
|
+
? confirmInk
|
|
902
|
+
: framedCircle && !activeThemeName
|
|
903
|
+
? hostScoped({ color: "$color12" }).color
|
|
904
|
+
: undefined;
|
|
867
905
|
const framedCirclePx =
|
|
868
906
|
touch && typeof sizeProp !== "number"
|
|
869
907
|
? Math.max(sizeTokenPx(resolvedSize), MIN_PRESS_TARGET)
|
|
@@ -1093,6 +1131,7 @@ export function Button({
|
|
|
1093
1131
|
: undefined;
|
|
1094
1132
|
// A square box, so an `edge` pull puts the glyph itself on the gutter.
|
|
1095
1133
|
// On glass the circle, not the glyph, sits on the margin.
|
|
1134
|
+
const glassInset = typeof resolvedBorderWidth === "number" ? -resolvedBorderWidth : 0;
|
|
1096
1135
|
const glyphEdgePull =
|
|
1097
1136
|
GlassView || glassGroup ? 0 : iconButton ? -Math.max(0, (visualPx - iconSize) / 2) : edgePull;
|
|
1098
1137
|
const buttonElement = (
|
|
@@ -1162,6 +1201,7 @@ export function Button({
|
|
|
1162
1201
|
: { marginInlineEnd: glyphEdgePull }
|
|
1163
1202
|
: undefined)}
|
|
1164
1203
|
{...(restFill ? { backgroundColor: restFill } : undefined)}
|
|
1204
|
+
{...(accentFillHex && !unavailable ? { backgroundColor: accentFillHex } : undefined)}
|
|
1165
1205
|
// Solid-intent sub-themes carry the on-fill foreground as `$color`
|
|
1166
1206
|
// (LC-05); outlined frames sit on the page, so re-anchor inherited
|
|
1167
1207
|
// text/icon color (currentColor) to the hue's readable text tier.
|
|
@@ -1327,10 +1367,10 @@ export function Button({
|
|
|
1327
1367
|
pointerEvents="none"
|
|
1328
1368
|
style={{
|
|
1329
1369
|
position: "absolute",
|
|
1330
|
-
top:
|
|
1331
|
-
right:
|
|
1332
|
-
bottom:
|
|
1333
|
-
left:
|
|
1370
|
+
top: glassInset,
|
|
1371
|
+
right: glassInset,
|
|
1372
|
+
bottom: glassInset,
|
|
1373
|
+
left: glassInset,
|
|
1334
1374
|
borderRadius: visualPx / 2,
|
|
1335
1375
|
}}
|
|
1336
1376
|
/>
|
|
@@ -125,9 +125,8 @@ function listItemRingProps(keyboardRing: boolean) {
|
|
|
125
125
|
* row. On native the shim can only resolve a token the theme in scope actually
|
|
126
126
|
* carries, and the component sub-themes carry no accent solid at all.
|
|
127
127
|
* Resolve it here, where the value becomes a paint — the same shape as
|
|
128
|
-
* `mutedColor` for the search glyph. Keyed off `useMenuRowCheckInk` (
|
|
129
|
-
*
|
|
130
|
-
* (FZ-8355 r6), degrading to `$color` ink rather than black when a narrow
|
|
128
|
+
* `mutedColor` for the search glyph. Keyed off `useMenuRowCheckInk` (the accent, ink when hue-less), so
|
|
129
|
+
* the tick holds 4.5:1 on the chosen row (FZ-8355 r6, FZ-8557), degrading to `$color` ink rather than black when a narrow
|
|
131
130
|
* sub-theme lacks the key.
|
|
132
131
|
*/
|
|
133
132
|
function useSelectedMarkColor(): string {
|
package/src/standardActions.ts
CHANGED
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
ArrowClockwiseIcon,
|
|
10
|
+
CaretLeftIcon,
|
|
10
11
|
CheckIcon,
|
|
11
12
|
CopyIcon,
|
|
12
13
|
DotsThreeIcon,
|
|
14
|
+
DownloadSimpleIcon,
|
|
13
15
|
ExportIcon,
|
|
14
16
|
FunnelSimpleIcon,
|
|
15
17
|
MagnifyingGlassIcon,
|
|
@@ -38,7 +40,9 @@ export type StandardActionKind =
|
|
|
38
40
|
| "more"
|
|
39
41
|
| "remove"
|
|
40
42
|
| "replace"
|
|
41
|
-
| "retry"
|
|
43
|
+
| "retry"
|
|
44
|
+
| "back"
|
|
45
|
+
| "export";
|
|
42
46
|
|
|
43
47
|
export interface StandardAction {
|
|
44
48
|
/** The symbol, a Phosphor glyph. */
|
|
@@ -68,6 +72,8 @@ export const standardActions: Record<StandardActionKind, StandardAction> = {
|
|
|
68
72
|
remove: { icon: XIcon, label: "Remove", primary: false },
|
|
69
73
|
replace: { icon: SwapIcon, label: "Replace", primary: false },
|
|
70
74
|
retry: { icon: ArrowClockwiseIcon, label: "Retry", primary: false },
|
|
75
|
+
back: { icon: CaretLeftIcon, label: "Back", primary: false },
|
|
76
|
+
export: { icon: DownloadSimpleIcon, label: "Export", primary: false },
|
|
71
77
|
};
|
|
72
78
|
|
|
73
79
|
/**
|
|
@@ -76,6 +82,7 @@ export const standardActions: Record<StandardActionKind, StandardAction> = {
|
|
|
76
82
|
*/
|
|
77
83
|
export const standardActionWords = [
|
|
78
84
|
"add",
|
|
85
|
+
"back",
|
|
79
86
|
"cancel",
|
|
80
87
|
"close",
|
|
81
88
|
"confirm",
|
|
@@ -83,6 +90,7 @@ export const standardActionWords = [
|
|
|
83
90
|
"delete",
|
|
84
91
|
"done",
|
|
85
92
|
"edit",
|
|
93
|
+
"export",
|
|
86
94
|
"filter",
|
|
87
95
|
"more",
|
|
88
96
|
"ok",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/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,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAEhD;AAED,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAChF,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Combobox/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2BvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAc9C,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAgCtD,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Combobox/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2BvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAc9C,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAgCtD,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgF9E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,YA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OAAO,EACP,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,IAAI,EACJ,IAAI,EAAE,QAAQ,EACd,UAAU,EACV,KAAK,EACL,UAAU,EACV,UAAU,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,IAAI,EAAE,QAAQ,EACd,EAAE,EAAE,MAAM,EACV,MAAM,EACN,YAAY,EACZ,QAAQ,EAAE,YAAY,EACtB,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,YAAY,EAAE,SAAS,EACvB,GAAG,IAAI,EACR,EAAE,aAAa,2CAkNf"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* controls read the same table.
|
|
6
6
|
*/
|
|
7
7
|
import type { IconButtonProps } from "./Button";
|
|
8
|
-
export type StandardActionKind = "close" | "cancel" | "confirm" | "done" | "save" | "submit" | "add" | "delete" | "edit" | "share" | "copy" | "search" | "filter" | "more" | "remove" | "replace" | "retry";
|
|
8
|
+
export type StandardActionKind = "close" | "cancel" | "confirm" | "done" | "save" | "submit" | "add" | "delete" | "edit" | "share" | "copy" | "search" | "filter" | "more" | "remove" | "replace" | "retry" | "back" | "export";
|
|
9
9
|
export interface StandardAction {
|
|
10
10
|
/** The symbol, a Phosphor glyph. */
|
|
11
11
|
icon: NonNullable<IconButtonProps["icon"]>;
|
|
@@ -20,5 +20,5 @@ export declare const standardActions: Record<StandardActionKind, StandardAction>
|
|
|
20
20
|
* Words a text button must not wear: each has a symbol in the table above.
|
|
21
21
|
* The design lint's `action-word` rule (FZ-8033) keeps its own, wider list.
|
|
22
22
|
*/
|
|
23
|
-
export declare const standardActionWords: readonly ["add", "cancel", "close", "confirm", "copy", "delete", "done", "edit", "filter", "more", "ok", "remove", "replace", "retry", "save", "search", "share", "submit"];
|
|
23
|
+
export declare const standardActionWords: readonly ["add", "back", "cancel", "close", "confirm", "copy", "delete", "done", "edit", "export", "filter", "more", "ok", "remove", "replace", "retry", "save", "search", "share", "submit"];
|
|
24
24
|
//# sourceMappingURL=standardActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standardActions.d.ts","sourceRoot":"","sources":["../src/standardActions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"standardActions.d.ts","sourceRoot":"","sources":["../src/standardActions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,QAAQ,GACR,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,SAAS,GACT,OAAO,GACP,MAAM,GACN,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,oCAAoC;IACpC,IAAI,EAAE,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,8EAA8E;AAC9E,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,kBAAkB,EAAE,cAAc,CAoBtE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,+LAqBtB,CAAC"}
|