@multiplatform.one/components 7.65.0 → 7.65.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/cjs/Alert/index.cjs +26 -5
- package/dist/cjs/Alert/index.native.js +26 -5
- package/dist/cjs/Alert/index.native.js.map +1 -1
- package/dist/cjs/images/Image/framing.cjs +29 -0
- package/dist/cjs/images/Image/framing.native.js +32 -0
- package/dist/cjs/images/Image/framing.native.js.map +1 -0
- package/dist/cjs/images/Image/shared.cjs +2 -2
- package/dist/cjs/images/Image/shared.native.js +2 -2
- package/dist/cjs/images/Image/shared.native.js.map +1 -1
- package/dist/cjs/views/Dashboard.cjs +16 -131
- package/dist/cjs/views/Dashboard.native.js +16 -131
- package/dist/cjs/views/Dashboard.native.js.map +1 -1
- package/dist/cjs/views/List.cjs +14 -189
- package/dist/cjs/views/List.native.js +14 -193
- package/dist/cjs/views/List.native.js.map +1 -1
- package/dist/cjs/views/ListGroup.cjs +181 -0
- package/dist/cjs/views/ListGroup.native.js +194 -0
- package/dist/cjs/views/ListGroup.native.js.map +1 -0
- package/dist/cjs/views/ListRow.cjs +266 -0
- package/dist/cjs/views/ListRow.native.js +274 -0
- package/dist/cjs/views/ListRow.native.js.map +1 -0
- package/dist/cjs/views/ShortcutCard.cjs +100 -0
- package/dist/cjs/views/ShortcutCard.native.js +104 -0
- package/dist/cjs/views/ShortcutCard.native.js.map +1 -0
- package/dist/cjs/views/index.cjs +3 -0
- package/dist/cjs/views/index.native.js +3 -0
- package/dist/cjs/views/index.native.js.map +1 -1
- package/dist/cjs/views/widgetChrome.cjs +93 -0
- package/dist/cjs/views/widgetChrome.native.js +95 -0
- package/dist/cjs/views/widgetChrome.native.js.map +1 -0
- package/dist/esm/Alert/index.mjs +27 -6
- package/dist/esm/Alert/index.mjs.map +1 -1
- package/dist/esm/Alert/index.native.js +27 -6
- package/dist/esm/Alert/index.native.js.map +1 -1
- package/dist/esm/images/Image/framing.mjs +4 -0
- package/dist/esm/images/Image/framing.mjs.map +1 -0
- package/dist/esm/images/Image/framing.native.js +4 -0
- package/dist/esm/images/Image/framing.native.js.map +1 -0
- package/dist/esm/images/Image/shared.mjs +2 -2
- package/dist/esm/images/Image/shared.mjs.map +1 -1
- package/dist/esm/images/Image/shared.native.js +2 -2
- package/dist/esm/images/Image/shared.native.js.map +1 -1
- package/dist/esm/views/Dashboard.mjs +6 -121
- package/dist/esm/views/Dashboard.mjs.map +1 -1
- package/dist/esm/views/Dashboard.native.js +6 -121
- package/dist/esm/views/Dashboard.native.js.map +1 -1
- package/dist/esm/views/List.mjs +8 -186
- package/dist/esm/views/List.mjs.map +1 -1
- package/dist/esm/views/List.native.js +8 -190
- package/dist/esm/views/List.native.js.map +1 -1
- package/dist/esm/views/ListGroup.mjs +144 -0
- package/dist/esm/views/ListGroup.mjs.map +1 -0
- package/dist/esm/views/ListGroup.native.js +154 -0
- package/dist/esm/views/ListGroup.native.js.map +1 -0
- package/dist/esm/views/ListRow.mjs +234 -0
- package/dist/esm/views/ListRow.mjs.map +1 -0
- package/dist/esm/views/ListRow.native.js +239 -0
- package/dist/esm/views/ListRow.native.js.map +1 -0
- package/dist/esm/views/ShortcutCard.mjs +75 -0
- package/dist/esm/views/ShortcutCard.mjs.map +1 -0
- package/dist/esm/views/ShortcutCard.native.js +76 -0
- package/dist/esm/views/ShortcutCard.native.js.map +1 -0
- package/dist/esm/views/index.mjs +2 -2
- package/dist/esm/views/index.mjs.map +1 -1
- package/dist/esm/views/index.native.js +2 -2
- package/dist/esm/views/index.native.js.map +1 -1
- package/dist/esm/views/widgetChrome.mjs +66 -0
- package/dist/esm/views/widgetChrome.mjs.map +1 -0
- package/dist/esm/views/widgetChrome.native.js +65 -0
- package/dist/esm/views/widgetChrome.native.js.map +1 -0
- package/dist/jsx/Alert/index.mjs +27 -6
- package/dist/jsx/Alert/index.mjs.map +1 -1
- package/dist/jsx/Alert/index.native.js +26 -5
- package/dist/jsx/Alert/index.native.js.map +1 -1
- package/dist/jsx/feedback/NotifyHost.native.js +1 -1
- package/dist/jsx/formLayouts/PreferencePanel.native.js +1 -1
- package/dist/jsx/images/Image/framing.mjs +4 -0
- package/dist/jsx/images/Image/framing.mjs.map +1 -0
- package/dist/jsx/images/Image/framing.native.js +32 -0
- package/dist/jsx/images/Image/framing.native.js.map +1 -0
- package/dist/jsx/images/Image/shared.mjs +2 -2
- package/dist/jsx/images/Image/shared.mjs.map +1 -1
- package/dist/jsx/images/Image/shared.native.js +2 -2
- package/dist/jsx/images/Image/shared.native.js.map +1 -1
- package/dist/jsx/index.native.js +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js +1 -1
- package/dist/jsx/layouts/AsyncBoundary.native.js.map +1 -1
- package/dist/jsx/views/Dashboard.mjs +6 -121
- package/dist/jsx/views/Dashboard.mjs.map +1 -1
- package/dist/jsx/views/Dashboard.native.js +16 -131
- package/dist/jsx/views/Dashboard.native.js.map +1 -1
- package/dist/jsx/views/List.mjs +8 -186
- package/dist/jsx/views/List.mjs.map +1 -1
- package/dist/jsx/views/List.native.js +14 -193
- package/dist/jsx/views/List.native.js.map +1 -1
- package/dist/jsx/views/ListGroup.mjs +144 -0
- package/dist/jsx/views/ListGroup.mjs.map +1 -0
- package/dist/jsx/views/ListGroup.native.js +194 -0
- package/dist/jsx/views/ListGroup.native.js.map +1 -0
- package/dist/jsx/views/ListRow.mjs +234 -0
- package/dist/jsx/views/ListRow.mjs.map +1 -0
- package/dist/jsx/views/ListRow.native.js +274 -0
- package/dist/jsx/views/ListRow.native.js.map +1 -0
- package/dist/jsx/views/ShortcutCard.mjs +75 -0
- package/dist/jsx/views/ShortcutCard.mjs.map +1 -0
- package/dist/jsx/views/ShortcutCard.native.js +104 -0
- package/dist/jsx/views/ShortcutCard.native.js.map +1 -0
- package/dist/jsx/views/index.mjs +2 -2
- package/dist/jsx/views/index.mjs.map +1 -1
- package/dist/jsx/views/index.native.js +3 -0
- package/dist/jsx/views/index.native.js.map +1 -1
- package/dist/jsx/views/widgetChrome.mjs +66 -0
- package/dist/jsx/views/widgetChrome.mjs.map +1 -0
- package/dist/jsx/views/widgetChrome.native.js +95 -0
- package/dist/jsx/views/widgetChrome.native.js.map +1 -0
- package/package.json +9 -9
- package/src/Alert/Alert.spec.tsx +79 -0
- package/src/Alert/Alert.stories.tsx +32 -1
- package/src/Alert/index.tsx +54 -5
- package/src/images/Image/framing.ts +8 -0
- package/src/images/Image/shared.ts +2 -7
- package/src/overlayElevation.spec.tsx +3 -1
- package/src/views/Dashboard.tsx +5 -146
- package/src/views/Kanban.native.spec.tsx +2 -2
- package/src/views/List.tsx +22 -237
- package/src/views/ListGroup.spec.tsx +220 -0
- package/src/views/ListGroup.stories.tsx +83 -0
- package/src/views/ListGroup.tsx +189 -0
- package/src/views/ListRow.tsx +282 -0
- package/src/views/ShortcutCard.spec.tsx +40 -0
- package/src/views/ShortcutCard.stories.tsx +50 -1
- package/src/views/ShortcutCard.tsx +88 -0
- package/src/views/index.ts +6 -0
- package/src/views/widgetChrome.tsx +73 -0
- package/types/Alert/index.d.ts +9 -0
- package/types/Alert/index.d.ts.map +1 -1
- package/types/images/Image/framing.d.ts +7 -0
- package/types/images/Image/framing.d.ts.map +1 -0
- package/types/images/Image/shared.d.ts +1 -6
- package/types/images/Image/shared.d.ts.map +1 -1
- package/types/views/Dashboard.d.ts +2 -15
- package/types/views/Dashboard.d.ts.map +1 -1
- package/types/views/List.d.ts +3 -66
- package/types/views/List.d.ts.map +1 -1
- package/types/views/ListGroup.d.ts +43 -0
- package/types/views/ListGroup.d.ts.map +1 -0
- package/types/views/ListRow.d.ts +88 -0
- package/types/views/ListRow.d.ts.map +1 -0
- package/types/views/ShortcutCard.d.ts +26 -0
- package/types/views/ShortcutCard.d.ts.map +1 -0
- package/types/views/index.d.ts +1 -1
- package/types/views/index.d.ts.map +1 -1
- package/types/views/widgetChrome.d.ts +72 -0
- package/types/views/widgetChrome.d.ts.map +1 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var widgetChrome_exports = {};
|
|
24
|
+
__export(widgetChrome_exports, {
|
|
25
|
+
NestedIconWell: () => NestedIconWell,
|
|
26
|
+
splitNestedControl: () => splitNestedControl,
|
|
27
|
+
useWidgetChrome: () => useWidgetChrome
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(widgetChrome_exports);
|
|
30
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
31
|
+
var import_tamagui = require("tamagui");
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
function splitNestedControl(nested) {
|
|
34
|
+
const {
|
|
35
|
+
px,
|
|
36
|
+
hitSlop,
|
|
37
|
+
...box
|
|
38
|
+
} = nested;
|
|
39
|
+
return {
|
|
40
|
+
px,
|
|
41
|
+
hitSlop,
|
|
42
|
+
box
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function useWidgetChrome(onPress) {
|
|
46
|
+
const resolved = (0, import_theme.useResolvedKnobs)();
|
|
47
|
+
const {
|
|
48
|
+
knobProps,
|
|
49
|
+
control
|
|
50
|
+
} = resolved;
|
|
51
|
+
const nested = splitNestedControl(knobProps.nestedControl);
|
|
52
|
+
const interactive = onPress ? {
|
|
53
|
+
cursor: "pointer",
|
|
54
|
+
hoverStyle: control.hoverKnobProps,
|
|
55
|
+
pressStyle: control.pressKnobProps,
|
|
56
|
+
focusVisibleStyle: control.focusVisibleKnobProps,
|
|
57
|
+
onPress,
|
|
58
|
+
role: "button"
|
|
59
|
+
} : void 0;
|
|
60
|
+
return {
|
|
61
|
+
knobProps,
|
|
62
|
+
control,
|
|
63
|
+
nested,
|
|
64
|
+
interactive
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function NestedIconWell({
|
|
68
|
+
color,
|
|
69
|
+
box,
|
|
70
|
+
px,
|
|
71
|
+
radius,
|
|
72
|
+
children
|
|
73
|
+
}) {
|
|
74
|
+
const identity = (0, import_theme.useChartPalette)().single;
|
|
75
|
+
const fill = color || identity;
|
|
76
|
+
const ink = (0, import_theme.useReadableTextOn)(fill);
|
|
77
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
78
|
+
...box,
|
|
79
|
+
...radius,
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
justifyContent: "center",
|
|
82
|
+
backgroundColor: fill,
|
|
83
|
+
...{
|
|
84
|
+
color: ink
|
|
85
|
+
},
|
|
86
|
+
overflow: "hidden",
|
|
87
|
+
"data-nested-px": px,
|
|
88
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_theme.IconSlot, {
|
|
89
|
+
icon: children,
|
|
90
|
+
color: ink
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var widgetChrome_exports = {};
|
|
26
|
+
__export(widgetChrome_exports, {
|
|
27
|
+
NestedIconWell: () => NestedIconWell,
|
|
28
|
+
splitNestedControl: () => splitNestedControl,
|
|
29
|
+
useWidgetChrome: () => useWidgetChrome
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(widgetChrome_exports);
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
34
|
+
var import_tamagui = require("tamagui");
|
|
35
|
+
function splitNestedControl(nested) {
|
|
36
|
+
var {
|
|
37
|
+
px,
|
|
38
|
+
hitSlop,
|
|
39
|
+
...box
|
|
40
|
+
} = nested;
|
|
41
|
+
return {
|
|
42
|
+
px,
|
|
43
|
+
hitSlop,
|
|
44
|
+
box
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function useWidgetChrome(onPress) {
|
|
48
|
+
var resolved = (0, import_theme.useResolvedKnobs)();
|
|
49
|
+
var {
|
|
50
|
+
knobProps,
|
|
51
|
+
control
|
|
52
|
+
} = resolved;
|
|
53
|
+
var nested = splitNestedControl(knobProps.nestedControl);
|
|
54
|
+
var interactive = onPress ? {
|
|
55
|
+
cursor: "pointer",
|
|
56
|
+
hoverStyle: control.hoverKnobProps,
|
|
57
|
+
pressStyle: control.pressKnobProps,
|
|
58
|
+
focusVisibleStyle: control.focusVisibleKnobProps,
|
|
59
|
+
onPress,
|
|
60
|
+
role: "button"
|
|
61
|
+
} : void 0;
|
|
62
|
+
return {
|
|
63
|
+
knobProps,
|
|
64
|
+
control,
|
|
65
|
+
nested,
|
|
66
|
+
interactive
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function NestedIconWell(param) {
|
|
70
|
+
var {
|
|
71
|
+
color,
|
|
72
|
+
box,
|
|
73
|
+
px,
|
|
74
|
+
radius,
|
|
75
|
+
children
|
|
76
|
+
} = param;
|
|
77
|
+
var identity = (0, import_theme.useChartPalette)().single;
|
|
78
|
+
var fill = color || identity;
|
|
79
|
+
var ink = (0, import_theme.useReadableTextOn)(fill);
|
|
80
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
81
|
+
...box,
|
|
82
|
+
...radius,
|
|
83
|
+
alignItems: "center",
|
|
84
|
+
justifyContent: "center",
|
|
85
|
+
backgroundColor: fill,
|
|
86
|
+
color: ink,
|
|
87
|
+
overflow: "hidden",
|
|
88
|
+
"data-nested-px": px,
|
|
89
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_theme.IconSlot, {
|
|
90
|
+
icon: children,
|
|
91
|
+
color: ink
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=widgetChrome.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","widgetChrome_exports","NestedIconWell","splitNestedControl","useWidgetChrome","module","exports","import_jsx_runtime","require","import_theme","import_tamagui","nested","px","hitSlop","box","onPress","resolved","useResolvedKnobs","knobProps","control","nestedControl","interactive","cursor","hoverStyle","hoverKnobProps","pressStyle","pressKnobProps","focusVisibleStyle","focusVisibleKnobProps","role","param","color","radius","children","identity","useChartPalette","single","fill","ink","useReadableTextOn","jsx","YStack","alignItems","justifyContent","backgroundColor","overflow","IconSlot","icon"],"sources":["widgetChrome.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar widgetChrome_exports = {};\n__export(widgetChrome_exports, {\n NestedIconWell: () => NestedIconWell,\n splitNestedControl: () => splitNestedControl,\n useWidgetChrome: () => useWidgetChrome\n});\nmodule.exports = __toCommonJS(widgetChrome_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_theme = require(\"@multiplatform.one/theme\");\nvar import_tamagui = require(\"tamagui\");\nfunction splitNestedControl(nested) {\n var { px, hitSlop, ...box } = nested;\n return {\n px,\n hitSlop,\n box\n };\n}\nfunction useWidgetChrome(onPress) {\n var resolved = (0, import_theme.useResolvedKnobs)();\n var { knobProps, control } = resolved;\n var nested = splitNestedControl(knobProps.nestedControl);\n var interactive = onPress ? {\n cursor: \"pointer\",\n hoverStyle: control.hoverKnobProps,\n pressStyle: control.pressKnobProps,\n focusVisibleStyle: control.focusVisibleKnobProps,\n onPress,\n role: \"button\"\n } : void 0;\n return {\n knobProps,\n control,\n nested,\n interactive\n };\n}\nfunction NestedIconWell(param) {\n var { color, box, px, radius, children } = param;\n var identity = (0, import_theme.useChartPalette)().single;\n var fill = color || identity;\n var ink = (0, import_theme.useReadableTextOn)(fill);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ...box,\n ...radius,\n alignItems: \"center\",\n justifyContent: \"center\",\n backgroundColor: fill,\n color: ink,\n overflow: \"hidden\",\n \"data-nested-px\": px,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme.IconSlot, {\n icon: children,\n color: ink\n })\n });\n}\n//# sourceMappingURL=widgetChrome.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KA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kB,CAACiC,GAAG,EAAE/B,YAAY,CAACqC,QAAQ,EAAE;MAC3EC,IAAI,EAAEd,QAAQ;MACdF,KAAK,EAAEO;IACT,CAAC;EACH,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/dist/esm/Alert/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IconSlot, Intent, MIN_PRESS_TARGET, compareSizeTokens, edgeColorAt, ensureCompositeFocusRing, pressTargetHitSlop, pressTargetStyle, transitionProps, useAccentTintedSurface, useLegibleInkOn, useReadableTextOn, useResolvedKnobs, warnBannedErrorWords } from "@multiplatform.one/theme";
|
|
1
|
+
import { IconSlot, Intent, MIN_PRESS_TARGET, compareSizeTokens, edgeColorAt, ensureCompositeFocusRing, hairlineWidth, pressTargetHitSlop, pressTargetStyle, transitionProps, useAccentTintedSurface, useLegibleInkOn, useReadableTextOn, useResolvedKnobs, warnBannedErrorWords } from "@multiplatform.one/theme";
|
|
2
2
|
import { componentColors } from "../componentColors.mjs";
|
|
3
3
|
import { useId, useState } from "react";
|
|
4
4
|
import { useTranslation } from "../shared/i18n.mjs";
|
|
5
|
+
import { Button } from "../Button.mjs";
|
|
5
6
|
import { CheckCircleIcon, InfoIcon, WarningIcon, XCircleIcon, XIcon } from "@phosphor-icons/react";
|
|
6
7
|
import { SizableText, View, XStack, YStack, isWeb, styled, useTheme } from "tamagui";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -118,6 +119,7 @@ function hostData(attrs) {
|
|
|
118
119
|
}
|
|
119
120
|
function AlertAction({
|
|
120
121
|
label,
|
|
122
|
+
accessibilityLabel,
|
|
121
123
|
onPress,
|
|
122
124
|
nestedPx,
|
|
123
125
|
hitSlop,
|
|
@@ -132,7 +134,7 @@ function AlertAction({
|
|
|
132
134
|
return /* @__PURE__ */jsx(AlertActionTarget, {
|
|
133
135
|
group: "alertAction",
|
|
134
136
|
className: "mp-chip-dismiss",
|
|
135
|
-
"aria-label": label,
|
|
137
|
+
"aria-label": accessibilityLabel ?? label,
|
|
136
138
|
...pressTargetStyle(),
|
|
137
139
|
marginVertical: -outset,
|
|
138
140
|
marginHorizontal: -hOutset,
|
|
@@ -163,6 +165,7 @@ function AlertInner({
|
|
|
163
165
|
action,
|
|
164
166
|
actionLabel,
|
|
165
167
|
onAction,
|
|
168
|
+
actionAccessibilityLabel,
|
|
166
169
|
secondaryAction,
|
|
167
170
|
secondaryActionLabel,
|
|
168
171
|
onSecondaryAction,
|
|
@@ -171,6 +174,7 @@ function AlertInner({
|
|
|
171
174
|
visible,
|
|
172
175
|
defaultVisible = true,
|
|
173
176
|
size,
|
|
177
|
+
placement = "inline",
|
|
174
178
|
...props
|
|
175
179
|
}) {
|
|
176
180
|
const {
|
|
@@ -220,10 +224,11 @@ function AlertInner({
|
|
|
220
224
|
}),
|
|
221
225
|
color: iconColor
|
|
222
226
|
});
|
|
227
|
+
const bar = placement === "bar";
|
|
223
228
|
const hasPrimary = action != null || Boolean(actionLabel);
|
|
224
229
|
const hasSecondary = secondaryAction != null || Boolean(secondaryActionLabel);
|
|
225
230
|
const hasActions = hasPrimary || hasSecondary;
|
|
226
|
-
const stackedActions = Boolean(hasActions && (title != null && children != null || hasPrimary && hasSecondary));
|
|
231
|
+
const stackedActions = Boolean(!bar && hasActions && (title != null && children != null || hasPrimary && hasSecondary));
|
|
227
232
|
const dismissBesideAction = hasActions && !stackedActions;
|
|
228
233
|
const actionBesideAdjacent = hasSecondary || dismissBesideAction;
|
|
229
234
|
const actionShared = {
|
|
@@ -239,8 +244,17 @@ function AlertInner({
|
|
|
239
244
|
name: "accent",
|
|
240
245
|
children: node
|
|
241
246
|
}) : node;
|
|
242
|
-
const primaryAction = accentSlot(action) ?? (actionLabel ? /* @__PURE__ */jsx(
|
|
247
|
+
const primaryAction = accentSlot(action) ?? (actionLabel ? bar ? /* @__PURE__ */jsx(Button, {
|
|
248
|
+
accent: isInfo,
|
|
249
|
+
success: intent === "success",
|
|
250
|
+
warning: intent === "warning",
|
|
251
|
+
error: intent === "error",
|
|
252
|
+
"aria-label": actionAccessibilityLabel ?? actionLabel,
|
|
253
|
+
onPress: onAction,
|
|
254
|
+
children: actionLabel
|
|
255
|
+
}) : /* @__PURE__ */jsx(AlertAction, {
|
|
243
256
|
label: actionLabel,
|
|
257
|
+
accessibilityLabel: actionAccessibilityLabel,
|
|
244
258
|
onPress: onAction,
|
|
245
259
|
...actionShared
|
|
246
260
|
}) : null);
|
|
@@ -268,6 +282,12 @@ function AlertInner({
|
|
|
268
282
|
borderStartWidth: 3,
|
|
269
283
|
borderStartColor: isInfo ? componentColors.indicator.mark : "$color9"
|
|
270
284
|
};
|
|
285
|
+
const barEdge = bar ? {
|
|
286
|
+
alignItems: "center",
|
|
287
|
+
borderRadius: 0,
|
|
288
|
+
borderWidth: 0,
|
|
289
|
+
borderBottomWidth: Math.max(knobProps.surface.borderWidth, hairlineWidth)
|
|
290
|
+
} : null;
|
|
271
291
|
return /* @__PURE__ */jsxs(AlertFrame, {
|
|
272
292
|
role: assertive ? "alert" : "status",
|
|
273
293
|
"aria-live": assertive ? "assertive" : "polite",
|
|
@@ -278,14 +298,15 @@ function AlertInner({
|
|
|
278
298
|
...knobProps.panelPadding,
|
|
279
299
|
backgroundColor: isInfo ? wash ?? "$color3" : "$color3",
|
|
280
300
|
borderColor: edgeColorAt("$color6", knobProps.borderWidthStop),
|
|
281
|
-
...stripe,
|
|
301
|
+
...(bar ? barEdge : stripe),
|
|
282
302
|
...transitionProps(knobProps.motion.control),
|
|
283
303
|
...props,
|
|
284
304
|
...hostData({
|
|
305
|
+
"data-placement": placement,
|
|
285
306
|
"data-size-token": knobProps.sizeToken,
|
|
286
307
|
"data-layout": stackedActions ? "stacked" : "inline",
|
|
287
308
|
"data-nested-px": String(nestedPx),
|
|
288
|
-
"data-accent-stripe": "3"
|
|
309
|
+
"data-accent-stripe": bar ? "0" : "3"
|
|
289
310
|
}),
|
|
290
311
|
children: [iconNode ? /* @__PURE__ */jsx(View, {
|
|
291
312
|
flexShrink: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IconSlot","Intent","MIN_PRESS_TARGET","compareSizeTokens","edgeColorAt","ensureCompositeFocusRing","pressTargetHitSlop","pressTargetStyle","transitionProps","useAccentTintedSurface","useLegibleInkOn","useReadableTextOn","useResolvedKnobs","warnBannedErrorWords","componentColors","useId","useState","useTranslation","CheckCircleIcon","InfoIcon","WarningIcon","XCircleIcon","XIcon","SizableText","View","XStack","YStack","isWeb","styled","useTheme","jsx","jsxs","intentThemeMap","info","success","warning","error","intentIconMap","AlertFrame","name","width","alignItems","backgroundColor","borderColor","DISMISS_ICON","DISMISS_ICON_COMPACT","DISMISS_RING_INSET","DISMISS_RING_INSET_COMPACT","DISMISS_ADJACENT_OUTSET","DismissButton","role","tabIndex","cursor","justifyContent","flexShrink","borderWidth","borderRadius","opacity","outlineWidth","hoverStyle","pressStyle","focusStyle","focusVisibleStyle","DismissRing","padding","AlertActionTarget","AlertActionPill","paddingHorizontal","paddingVertical","activateOnEnterSpace","onPress","onKeyDown","e","key","preventDefault","hostData","attrs","AlertAction","label","nestedPx","hitSlop","besideAdjacent","body","labelType","pointy","radiusOuter","outset","Math","max","ceil","hOutset","min","group","className","marginVertical","marginHorizontal","children","minHeight","fontWeight","color","userSelect","AlertInner","intent","title","icon","action","actionLabel","onAction","secondaryAction","secondaryActionLabel","onSecondaryAction","dismissible","onDismiss","visible","defaultVisible","size","props","t","titleId","knobProps","component","document","theme","wash","washIcon","washInk","isInfo","iconColor","color11","get","textColor","stripeColor","indicator","mark","slice","color9","uncontrolledVisible","setUncontrolledVisible","smallGlyphs","sizeToken","nestedControl","px","dismissIcon","dismissVisual","dismissOutset","isTextual","n","textualChildren","Array","isArray","every","join","String","handleDismiss","IconComponent","iconNode","weight","hasPrimary","Boolean","hasSecondary","hasActions","stackedActions","dismissBesideAction","actionBesideAdjacent","actionShared","borderRadiusNested","accentSlot","node","primaryAction","secondaryNode","actionRow","flexWrap","gap","assertive","stripe","style","borderInlineStartWidth","borderInlineStartStyle","borderInlineStartColor","borderStartWidth","borderStartColor","panelPadding","borderWidthStop","motion","control","paddingTop","flexGrow","minWidth","id","fontSize","heading","Alert","themeName"],"sources":["index.mjs"],"sourcesContent":["import { IconSlot, Intent, MIN_PRESS_TARGET, compareSizeTokens, edgeColorAt, ensureCompositeFocusRing, pressTargetHitSlop, pressTargetStyle, transitionProps, useAccentTintedSurface, useLegibleInkOn, useReadableTextOn, useResolvedKnobs, warnBannedErrorWords } from \"@multiplatform.one/theme\";\nimport { componentColors } from \"../componentColors\";\nimport { useId, useState } from \"react\";\nimport { useTranslation } from \"../shared/i18n\";\nimport { CheckCircleIcon, InfoIcon, WarningIcon, XCircleIcon, XIcon } from \"@phosphor-icons/react\";\nimport { SizableText, View, XStack, YStack, isWeb, styled, useTheme } from \"tamagui\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n\nconst intentThemeMap = {\n\tinfo: \"accent\",\n\tsuccess: \"success\",\n\twarning: \"warning\",\n\terror: \"error\"\n};\nconst intentIconMap = {\n\tinfo: InfoIcon,\n\tsuccess: CheckCircleIcon,\n\twarning: WarningIcon,\n\terror: XCircleIcon\n};\nconst AlertFrame = styled(XStack, {\n\tname: \"Alert\",\n\twidth: \"100%\",\n\talignItems: \"flex-start\",\n\tbackgroundColor: \"$color3\",\n\tborderColor: \"$color6\"\n});\nconst DISMISS_ICON = 16;\nconst DISMISS_ICON_COMPACT = 14;\nconst DISMISS_RING_INSET = 4;\nconst DISMISS_RING_INSET_COMPACT = 2;\nconst DISMISS_ADJACENT_OUTSET = 6;\nconst DismissButton = styled(View, {\n\tname: \"AlertDismiss\",\n\trole: \"button\",\n\ttabIndex: 0,\n\tcursor: \"pointer\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tflexShrink: 0,\n\tborderWidth: 0,\n\tbackgroundColor: \"transparent\",\n\tborderRadius: \"$2\",\n\topacity: .7,\n\toutlineWidth: 0,\n\thoverStyle: { opacity: 1 },\n\tpressStyle: { opacity: .9 },\n\tfocusStyle: { outlineWidth: 0 },\n\tfocusVisibleStyle: {\n\t\topacity: 1,\n\t\toutlineWidth: 0\n\t}\n});\nconst DismissRing = styled(View, {\n\tname: \"AlertDismissRing\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tpadding: \"$1\",\n\tborderRadius: \"$2\",\n\thoverStyle: { backgroundColor: \"$color5\" }\n});\nconst AlertActionTarget = styled(View, {\n\tname: \"AlertAction\",\n\trole: \"button\",\n\ttabIndex: 0,\n\tcursor: \"pointer\",\n\tbackgroundColor: \"transparent\",\n\tborderWidth: 0,\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tflexShrink: 0,\n\topacity: .9,\n\toutlineWidth: 0,\n\thoverStyle: { opacity: 1 },\n\tpressStyle: { opacity: .95 },\n\tfocusStyle: { outlineWidth: 0 },\n\tfocusVisibleStyle: {\n\t\topacity: 1,\n\t\toutlineWidth: 0\n\t}\n});\nconst AlertActionPill = styled(View, {\n\tname: \"AlertActionPill\",\n\tpaddingHorizontal: \"$2\",\n\tpaddingVertical: \"$1\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\thoverStyle: { backgroundColor: \"$color5\" },\n\t\"$group-alertAction-press\": { backgroundColor: \"$color6\" }\n});\nconst activateOnEnterSpace = (onPress) => ({ onKeyDown: (e) => {\n\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\te.preventDefault?.();\n\t\tonPress?.();\n\t}\n} });\nfunction hostData(attrs) {\n\treturn attrs;\n}\nfunction AlertAction({ label, onPress, nestedPx, hitSlop, besideAdjacent, body, labelType, pointy, radiusOuter }) {\n\tconst outset = Math.max(0, Math.ceil((MIN_PRESS_TARGET - nestedPx) / 2));\n\tconst hOutset = besideAdjacent ? Math.min(outset, DISMISS_ADJACENT_OUTSET) : outset;\n\treturn /* @__PURE__ */ jsx(AlertActionTarget, {\n\t\tgroup: \"alertAction\",\n\t\tclassName: \"mp-chip-dismiss\",\n\t\t\"aria-label\": label,\n\t\t...pressTargetStyle(),\n\t\tmarginVertical: -outset,\n\t\tmarginHorizontal: -hOutset,\n\t\thitSlop: besideAdjacent ? void 0 : hitSlop,\n\t\tonPress,\n\t\t...activateOnEnterSpace(onPress),\n\t\tchildren: /* @__PURE__ */ jsx(AlertActionPill, {\n\t\t\tclassName: \"mp-chip-dismiss-ring\",\n\t\t\tminHeight: nestedPx,\n\t\t\t...radiusOuter,\n\t\t\tborderRadius: pointy ? 0 : radiusOuter.borderRadius,\n\t\t\tchildren: /* @__PURE__ */ jsx(SizableText, {\n\t\t\t\t...body,\n\t\t\t\t...labelType,\n\t\t\t\tfontWeight: \"400\",\n\t\t\t\tcolor: \"$color12\",\n\t\t\t\tuserSelect: \"none\",\n\t\t\t\tchildren: label\n\t\t\t})\n\t\t})\n\t});\n}\nfunction AlertInner({ intent = \"info\", title, children, icon, action, actionLabel, onAction, secondaryAction, secondaryActionLabel, onSecondaryAction, dismissible = false, onDismiss, visible, defaultVisible = true, size, ...props }) {\n\tconst { t } = useTranslation();\n\tconst titleId = useId();\n\tconst { knobProps } = useResolvedKnobs({\n\t\tcomponent: \"Alert\",\n\t\tsize\n\t});\n\tif (typeof document !== \"undefined\") ensureCompositeFocusRing();\n\tconst theme = useTheme();\n\tconst wash = useAccentTintedSurface();\n\tconst washIcon = useLegibleInkOn(wash, \"$accentColor\");\n\tconst washInk = useReadableTextOn(wash);\n\tconst isInfo = intent === \"info\";\n\tconst iconColor = isInfo ? washIcon : theme.color11?.get();\n\tconst textColor = isInfo ? washInk ?? \"$color12\" : \"$color12\";\n\tconst stripeColor = isInfo ? theme[componentColors.indicator.mark.slice(1)]?.get() : theme.color9?.get();\n\tconst [uncontrolledVisible, setUncontrolledVisible] = useState(defaultVisible);\n\tif (!(visible !== void 0 ? visible : uncontrolledVisible)) return null;\n\tconst smallGlyphs = compareSizeTokens(knobProps.sizeToken, \"$true\") < 0;\n\tconst nestedPx = knobProps.nestedControl.px;\n\tconst dismissIcon = smallGlyphs ? DISMISS_ICON_COMPACT : DISMISS_ICON;\n\tconst dismissVisual = dismissIcon + (smallGlyphs ? DISMISS_RING_INSET_COMPACT : DISMISS_RING_INSET) * 2;\n\tconst dismissOutset = Math.max(0, Math.ceil((MIN_PRESS_TARGET - dismissVisual) / 2));\n\tconst isTextual = (n) => typeof n === \"string\" || typeof n === \"number\";\n\tconst textualChildren = children != null && (isTextual(children) || Array.isArray(children) && children.every(isTextual)) ? Array.isArray(children) ? children.join(\"\") : String(children) : null;\n\tif (typeof title === \"string\") warnBannedErrorWords(title, { component: \"Alert\" });\n\tif (textualChildren !== null) warnBannedErrorWords(textualChildren, { component: \"Alert\" });\n\tconst handleDismiss = () => {\n\t\tif (visible === void 0) setUncontrolledVisible(false);\n\t\tonDismiss?.();\n\t};\n\tconst IconComponent = intentIconMap[intent];\n\tconst iconNode = icon === null ? null : /* @__PURE__ */ jsx(IconSlot, {\n\t\ticon: icon ?? /* @__PURE__ */ jsx(IconComponent, {\n\t\t\tsize: smallGlyphs ? 16 : 20,\n\t\t\tweight: \"fill\",\n\t\t\tcolor: iconColor\n\t\t}),\n\t\tcolor: iconColor\n\t});\n\tconst hasPrimary = action != null || Boolean(actionLabel);\n\tconst hasSecondary = secondaryAction != null || Boolean(secondaryActionLabel);\n\tconst hasActions = hasPrimary || hasSecondary;\n\tconst stackedActions = Boolean(hasActions && (title != null && children != null || hasPrimary && hasSecondary));\n\tconst dismissBesideAction = hasActions && !stackedActions;\n\tconst actionBesideAdjacent = hasSecondary || dismissBesideAction;\n\tconst actionShared = {\n\t\tnestedPx,\n\t\thitSlop: knobProps.nestedControl.hitSlop,\n\t\tbody: knobProps.body,\n\t\tlabelType: knobProps.label,\n\t\tpointy: knobProps.pointy,\n\t\tradiusOuter: knobProps.borderRadiusNested,\n\t\tbesideAdjacent: actionBesideAdjacent\n\t};\n\tconst accentSlot = (node) => isInfo && node != null ? /* @__PURE__ */ jsx(Intent, {\n\t\tname: \"accent\",\n\t\tchildren: node\n\t}) : node;\n\tconst primaryAction = accentSlot(action) ?? (actionLabel ? /* @__PURE__ */ jsx(AlertAction, {\n\t\tlabel: actionLabel,\n\t\tonPress: onAction,\n\t\t...actionShared\n\t}) : null);\n\tconst secondaryNode = accentSlot(secondaryAction) ?? (secondaryActionLabel ? /* @__PURE__ */ jsx(AlertAction, {\n\t\tlabel: secondaryActionLabel,\n\t\tonPress: onSecondaryAction,\n\t\t...actionShared\n\t}) : null);\n\tconst actionRow = hasActions ? /* @__PURE__ */ jsxs(XStack, {\n\t\tflexShrink: 0,\n\t\tflexWrap: \"wrap\",\n\t\talignItems: \"center\",\n\t\t...knobProps.gap,\n\t\t\"data-alert-actions\": \"\",\n\t\tchildren: [primaryAction, secondaryNode]\n\t}) : null;\n\tconst assertive = intent === \"error\" || intent === \"warning\";\n\tconst stripe = isWeb ? { style: {\n\t\tborderInlineStartWidth: 3,\n\t\tborderInlineStartStyle: \"solid\",\n\t\tborderInlineStartColor: stripeColor\n\t} } : {\n\t\tborderStartWidth: 3,\n\t\tborderStartColor: isInfo ? componentColors.indicator.mark : \"$color9\"\n\t};\n\treturn /* @__PURE__ */ jsxs(AlertFrame, {\n\t\trole: assertive ? \"alert\" : \"status\",\n\t\t\"aria-live\": assertive ? \"assertive\" : \"polite\",\n\t\t\"aria-labelledby\": title != null ? titleId : void 0,\n\t\ttabIndex: -1,\n\t\t...knobProps.borderRadius,\n\t\t...knobProps.gap,\n\t\t...knobProps.panelPadding,\n\t\tbackgroundColor: isInfo ? wash ?? \"$color3\" : \"$color3\",\n\t\tborderColor: edgeColorAt(\"$color6\", knobProps.borderWidthStop),\n\t\t...stripe,\n\t\t...transitionProps(knobProps.motion.control),\n\t\t...props,\n\t\t...hostData({\n\t\t\t\"data-size-token\": knobProps.sizeToken,\n\t\t\t\"data-layout\": stackedActions ? \"stacked\" : \"inline\",\n\t\t\t\"data-nested-px\": String(nestedPx),\n\t\t\t\"data-accent-stripe\": \"3\"\n\t\t}),\n\t\tchildren: [\n\t\t\ticonNode ? /* @__PURE__ */ jsx(View, {\n\t\t\t\tflexShrink: 0,\n\t\t\t\t\"aria-hidden\": true,\n\t\t\t\tpaddingTop: 1,\n\t\t\t\tchildren: iconNode\n\t\t\t}) : null,\n\t\t\t/* @__PURE__ */ jsxs(YStack, {\n\t\t\t\tflexGrow: 1,\n\t\t\t\tflexShrink: 1,\n\t\t\t\tgap: \"$1\",\n\t\t\t\tjustifyContent: \"center\",\n\t\t\t\tminWidth: 0,\n\t\t\t\tchildren: [\n\t\t\t\t\ttitle ? /* @__PURE__ */ jsx(SizableText, {\n\t\t\t\t\t\tid: titleId,\n\t\t\t\t\t\tsize: knobProps.label.fontSize,\n\t\t\t\t\t\t...knobProps.heading,\n\t\t\t\t\t\tcolor: textColor,\n\t\t\t\t\t\tchildren: title\n\t\t\t\t\t}) : null,\n\t\t\t\t\tchildren != null && (textualChildren !== null ? /* @__PURE__ */ jsx(SizableText, {\n\t\t\t\t\t\t...knobProps.body,\n\t\t\t\t\t\t...knobProps.label,\n\t\t\t\t\t\tcolor: textColor,\n\t\t\t\t\t\tfontWeight: \"400\",\n\t\t\t\t\t\tchildren: textualChildren\n\t\t\t\t\t}) : children),\n\t\t\t\t\tstackedActions ? actionRow : null\n\t\t\t\t]\n\t\t\t}),\n\t\t\t!stackedActions ? actionRow : null,\n\t\t\tdismissible ? /* @__PURE__ */ jsx(DismissButton, {\n\t\t\t\t\"aria-label\": t(\"Dismiss\"),\n\t\t\t\tclassName: \"mp-chip-dismiss\",\n\t\t\t\t...pressTargetStyle(),\n\t\t\t\t...dismissBesideAction ? { minWidth: dismissVisual + DISMISS_ADJACENT_OUTSET * 2 } : null,\n\t\t\t\tmarginVertical: -dismissOutset,\n\t\t\t\tmarginHorizontal: -(dismissBesideAction ? DISMISS_ADJACENT_OUTSET : dismissOutset),\n\t\t\t\thitSlop: dismissBesideAction ? void 0 : pressTargetHitSlop(dismissVisual),\n\t\t\t\tonPress: handleDismiss,\n\t\t\t\t...activateOnEnterSpace(handleDismiss),\n\t\t\t\tchildren: /* @__PURE__ */ jsx(DismissRing, {\n\t\t\t\t\tclassName: \"mp-chip-dismiss-ring\",\n\t\t\t\t\tpadding: smallGlyphs ? \"$0.5\" : \"$1\",\n\t\t\t\t\tborderRadius: knobProps.pointy ? 0 : \"$2\",\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(XIcon, {\n\t\t\t\t\t\tsize: dismissIcon,\n\t\t\t\t\t\tcolor: iconColor\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}) : null\n\t\t]\n\t});\n}\nfunction Alert(props) {\n\tif (!props.intent || props.intent === \"info\") return /* @__PURE__ */ jsx(AlertInner, { ...props });\n\tconst themeName = intentThemeMap[props.intent ?? \"info\"];\n\treturn /* @__PURE__ */ jsx(Intent, {\n\t\tname: themeName,\n\t\tchildren: /* @__PURE__ */ jsx(AlertInner, { ...props })\n\t});\n}\n\nexport { Alert };"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,gBAAgB,EAAEC,iBAAiB,EAAEC,WAAW,EAAEC,wBAAwB,EAAEC,kBAAkB,EAAEC,gBAAgB,EAAEC,eAAe,EAAEC,sBAAsB,EAAEC,eAAe,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,oBAAoB,QAAQ,0BAA0B;AAClS,SAASC,eAAe,QAAQ,wBAAoB;AACpD,SAASC,KAAK,EAAEC,QAAQ,QAAQ,OAAO;AACvC,SAASC,cAAc,QAAQ,oBAAgB;AAC/C,SAASC,eAAe,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,WAAW,EAAEC,KAAK,QAAQ,uBAAuB;AAClG,SAASC,WAAW,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,SAAS;AACpF,SAASC,GAAG,EAAEC,IAAI,QAAQ,mBAAmB;AAE7C,MAAMC,cAAc,GAAG;EACtBC,IAAI,E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AClFhE,OAAO,EAAEkF,mBAAmB,GAAG,KAAK,CAAC,GAAG5J,kBAAkB,CAACyI,aAAa,CAAC;MACzEzE,OAAO,EAAEmF,aAAa;MACtB,GAAGpF,oBAAoB,CAACoF,aAAa,CAAC;MACtCzD,QAAQ,EAAE,eAAgBlE,GAAG,CAACiC,WAAW,EAAE;QAC1C8B,SAAS,EAAE,sBAAsB;QACjC7B,OAAO,EAAE0E,WAAW,GAAG,MAAM,GAAG,IAAI;QACpClF,YAAY,EAAE+D,SAAS,CAACnC,MAAM,GAAG,CAAC,GAAG,IAAI;QACzCY,QAAQ,EAAE,eAAgBlE,GAAG,CAACR,KAAK,EAAE;UACpC6F,IAAI,EAAE2B,WAAW;UACjB3C,KAAK,EAAE4B;QACR,CAAC;MACF,CAAC;IACF,CAAC,CAAC,GAAG,IAAI;EAEX,CAAC,CAAC;AACH;AACA,SAASgE,KAAKA,CAAC3E,KAAK,EAAE;EACrB,IAAI,CAACA,KAAK,CAACd,MAAM,IAAIc,KAAK,CAACd,MAAM,KAAK,MAAM,EAAE,OAAO,eAAgBxE,GAAG,CAACuE,UAAU,EAAE;IAAE,GAAGe;EAAM,CAAC,CAAC;EAClG,MAAM4E,SAAS,GAAGhK,cAAc,CAACoF,KAAK,CAACd,MAAM,IAAI,MAAM,CAAC;EACxD,OAAO,eAAgBxE,GAAG,CAAC7B,MAAM,EAAE;IAClCsC,IAAI,EAAEyJ,SAAS;IACfhG,QAAQ,EAAE,eAAgBlE,GAAG,CAACuE,UAAU,EAAE;MAAE,GAAGe;IAAM,CAAC;EACvD,CAAC,CAAC;AACH;AAEA,SAAS2E,KAAK","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["IconSlot","Intent","MIN_PRESS_TARGET","compareSizeTokens","edgeColorAt","ensureCompositeFocusRing","hairlineWidth","pressTargetHitSlop","pressTargetStyle","transitionProps","useAccentTintedSurface","useLegibleInkOn","useReadableTextOn","useResolvedKnobs","warnBannedErrorWords","componentColors","useId","useState","useTranslation","Button","CheckCircleIcon","InfoIcon","WarningIcon","XCircleIcon","XIcon","SizableText","View","XStack","YStack","isWeb","styled","useTheme","jsx","jsxs","intentThemeMap","info","success","warning","error","intentIconMap","AlertFrame","name","width","alignItems","backgroundColor","borderColor","DISMISS_ICON","DISMISS_ICON_COMPACT","DISMISS_RING_INSET","DISMISS_RING_INSET_COMPACT","DISMISS_ADJACENT_OUTSET","DismissButton","role","tabIndex","cursor","justifyContent","flexShrink","borderWidth","borderRadius","opacity","outlineWidth","hoverStyle","pressStyle","focusStyle","focusVisibleStyle","DismissRing","padding","AlertActionTarget","AlertActionPill","paddingHorizontal","paddingVertical","activateOnEnterSpace","onPress","onKeyDown","e","key","preventDefault","hostData","attrs","AlertAction","label","accessibilityLabel","nestedPx","hitSlop","besideAdjacent","body","labelType","pointy","radiusOuter","outset","Math","max","ceil","hOutset","min","group","className","marginVertical","marginHorizontal","children","minHeight","fontWeight","color","userSelect","AlertInner","intent","title","icon","action","actionLabel","onAction","actionAccessibilityLabel","secondaryAction","secondaryActionLabel","onSecondaryAction","dismissible","onDismiss","visible","defaultVisible","size","placement","props","t","titleId","knobProps","component","document","theme","wash","washIcon","washInk","isInfo","iconColor","color11","get","textColor","stripeColor","indicator","mark","slice","color9","uncontrolledVisible","setUncontrolledVisible","smallGlyphs","sizeToken","nestedControl","px","dismissIcon","dismissVisual","dismissOutset","isTextual","n","textualChildren","Array","isArray","every","join","String","handleDismiss","IconComponent","iconNode","weight","bar","hasPrimary","Boolean","hasSecondary","hasActions","stackedActions","dismissBesideAction","actionBesideAdjacent","actionShared","borderRadiusNested","accentSlot","node","primaryAction","accent","secondaryNode","actionRow","flexWrap","gap","assertive","stripe","style","borderInlineStartWidth","borderInlineStartStyle","borderInlineStartColor","borderStartWidth","borderStartColor","barEdge","borderBottomWidth","surface","panelPadding","borderWidthStop","motion","control","paddingTop","flexGrow","minWidth","id","fontSize","heading","Alert","themeName"],"sources":["index.mjs"],"sourcesContent":["import { IconSlot, Intent, MIN_PRESS_TARGET, compareSizeTokens, edgeColorAt, ensureCompositeFocusRing, hairlineWidth, pressTargetHitSlop, pressTargetStyle, transitionProps, useAccentTintedSurface, useLegibleInkOn, useReadableTextOn, useResolvedKnobs, warnBannedErrorWords } from \"@multiplatform.one/theme\";\nimport { componentColors } from \"../componentColors\";\nimport { useId, useState } from \"react\";\nimport { useTranslation } from \"../shared/i18n\";\nimport { Button } from \"../Button\";\nimport { CheckCircleIcon, InfoIcon, WarningIcon, XCircleIcon, XIcon } from \"@phosphor-icons/react\";\nimport { SizableText, View, XStack, YStack, isWeb, styled, useTheme } from \"tamagui\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n\nconst intentThemeMap = {\n\tinfo: \"accent\",\n\tsuccess: \"success\",\n\twarning: \"warning\",\n\terror: \"error\"\n};\nconst intentIconMap = {\n\tinfo: InfoIcon,\n\tsuccess: CheckCircleIcon,\n\twarning: WarningIcon,\n\terror: XCircleIcon\n};\nconst AlertFrame = styled(XStack, {\n\tname: \"Alert\",\n\twidth: \"100%\",\n\talignItems: \"flex-start\",\n\tbackgroundColor: \"$color3\",\n\tborderColor: \"$color6\"\n});\nconst DISMISS_ICON = 16;\nconst DISMISS_ICON_COMPACT = 14;\nconst DISMISS_RING_INSET = 4;\nconst DISMISS_RING_INSET_COMPACT = 2;\nconst DISMISS_ADJACENT_OUTSET = 6;\nconst DismissButton = styled(View, {\n\tname: \"AlertDismiss\",\n\trole: \"button\",\n\ttabIndex: 0,\n\tcursor: \"pointer\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tflexShrink: 0,\n\tborderWidth: 0,\n\tbackgroundColor: \"transparent\",\n\tborderRadius: \"$2\",\n\topacity: .7,\n\toutlineWidth: 0,\n\thoverStyle: { opacity: 1 },\n\tpressStyle: { opacity: .9 },\n\tfocusStyle: { outlineWidth: 0 },\n\tfocusVisibleStyle: {\n\t\topacity: 1,\n\t\toutlineWidth: 0\n\t}\n});\nconst DismissRing = styled(View, {\n\tname: \"AlertDismissRing\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tpadding: \"$1\",\n\tborderRadius: \"$2\",\n\thoverStyle: { backgroundColor: \"$color5\" }\n});\nconst AlertActionTarget = styled(View, {\n\tname: \"AlertAction\",\n\trole: \"button\",\n\ttabIndex: 0,\n\tcursor: \"pointer\",\n\tbackgroundColor: \"transparent\",\n\tborderWidth: 0,\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\tflexShrink: 0,\n\topacity: .9,\n\toutlineWidth: 0,\n\thoverStyle: { opacity: 1 },\n\tpressStyle: { opacity: .95 },\n\tfocusStyle: { outlineWidth: 0 },\n\tfocusVisibleStyle: {\n\t\topacity: 1,\n\t\toutlineWidth: 0\n\t}\n});\nconst AlertActionPill = styled(View, {\n\tname: \"AlertActionPill\",\n\tpaddingHorizontal: \"$2\",\n\tpaddingVertical: \"$1\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\",\n\thoverStyle: { backgroundColor: \"$color5\" },\n\t\"$group-alertAction-press\": { backgroundColor: \"$color6\" }\n});\nconst activateOnEnterSpace = (onPress) => ({ onKeyDown: (e) => {\n\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\te.preventDefault?.();\n\t\tonPress?.();\n\t}\n} });\nfunction hostData(attrs) {\n\treturn attrs;\n}\nfunction AlertAction({ label, accessibilityLabel, onPress, nestedPx, hitSlop, besideAdjacent, body, labelType, pointy, radiusOuter }) {\n\tconst outset = Math.max(0, Math.ceil((MIN_PRESS_TARGET - nestedPx) / 2));\n\tconst hOutset = besideAdjacent ? Math.min(outset, DISMISS_ADJACENT_OUTSET) : outset;\n\treturn /* @__PURE__ */ jsx(AlertActionTarget, {\n\t\tgroup: \"alertAction\",\n\t\tclassName: \"mp-chip-dismiss\",\n\t\t\"aria-label\": accessibilityLabel ?? label,\n\t\t...pressTargetStyle(),\n\t\tmarginVertical: -outset,\n\t\tmarginHorizontal: -hOutset,\n\t\thitSlop: besideAdjacent ? void 0 : hitSlop,\n\t\tonPress,\n\t\t...activateOnEnterSpace(onPress),\n\t\tchildren: /* @__PURE__ */ jsx(AlertActionPill, {\n\t\t\tclassName: \"mp-chip-dismiss-ring\",\n\t\t\tminHeight: nestedPx,\n\t\t\t...radiusOuter,\n\t\t\tborderRadius: pointy ? 0 : radiusOuter.borderRadius,\n\t\t\tchildren: /* @__PURE__ */ jsx(SizableText, {\n\t\t\t\t...body,\n\t\t\t\t...labelType,\n\t\t\t\tfontWeight: \"400\",\n\t\t\t\tcolor: \"$color12\",\n\t\t\t\tuserSelect: \"none\",\n\t\t\t\tchildren: label\n\t\t\t})\n\t\t})\n\t});\n}\nfunction AlertInner({ intent = \"info\", title, children, icon, action, actionLabel, onAction, actionAccessibilityLabel, secondaryAction, secondaryActionLabel, onSecondaryAction, dismissible = false, onDismiss, visible, defaultVisible = true, size, placement = \"inline\", ...props }) {\n\tconst { t } = useTranslation();\n\tconst titleId = useId();\n\tconst { knobProps } = useResolvedKnobs({\n\t\tcomponent: \"Alert\",\n\t\tsize\n\t});\n\tif (typeof document !== \"undefined\") ensureCompositeFocusRing();\n\tconst theme = useTheme();\n\tconst wash = useAccentTintedSurface();\n\tconst washIcon = useLegibleInkOn(wash, \"$accentColor\");\n\tconst washInk = useReadableTextOn(wash);\n\tconst isInfo = intent === \"info\";\n\tconst iconColor = isInfo ? washIcon : theme.color11?.get();\n\tconst textColor = isInfo ? washInk ?? \"$color12\" : \"$color12\";\n\tconst stripeColor = isInfo ? theme[componentColors.indicator.mark.slice(1)]?.get() : theme.color9?.get();\n\tconst [uncontrolledVisible, setUncontrolledVisible] = useState(defaultVisible);\n\tif (!(visible !== void 0 ? visible : uncontrolledVisible)) return null;\n\tconst smallGlyphs = compareSizeTokens(knobProps.sizeToken, \"$true\") < 0;\n\tconst nestedPx = knobProps.nestedControl.px;\n\tconst dismissIcon = smallGlyphs ? DISMISS_ICON_COMPACT : DISMISS_ICON;\n\tconst dismissVisual = dismissIcon + (smallGlyphs ? DISMISS_RING_INSET_COMPACT : DISMISS_RING_INSET) * 2;\n\tconst dismissOutset = Math.max(0, Math.ceil((MIN_PRESS_TARGET - dismissVisual) / 2));\n\tconst isTextual = (n) => typeof n === \"string\" || typeof n === \"number\";\n\tconst textualChildren = children != null && (isTextual(children) || Array.isArray(children) && children.every(isTextual)) ? Array.isArray(children) ? children.join(\"\") : String(children) : null;\n\tif (typeof title === \"string\") warnBannedErrorWords(title, { component: \"Alert\" });\n\tif (textualChildren !== null) warnBannedErrorWords(textualChildren, { component: \"Alert\" });\n\tconst handleDismiss = () => {\n\t\tif (visible === void 0) setUncontrolledVisible(false);\n\t\tonDismiss?.();\n\t};\n\tconst IconComponent = intentIconMap[intent];\n\tconst iconNode = icon === null ? null : /* @__PURE__ */ jsx(IconSlot, {\n\t\ticon: icon ?? /* @__PURE__ */ jsx(IconComponent, {\n\t\t\tsize: smallGlyphs ? 16 : 20,\n\t\t\tweight: \"fill\",\n\t\t\tcolor: iconColor\n\t\t}),\n\t\tcolor: iconColor\n\t});\n\tconst bar = placement === \"bar\";\n\tconst hasPrimary = action != null || Boolean(actionLabel);\n\tconst hasSecondary = secondaryAction != null || Boolean(secondaryActionLabel);\n\tconst hasActions = hasPrimary || hasSecondary;\n\tconst stackedActions = Boolean(!bar && hasActions && (title != null && children != null || hasPrimary && hasSecondary));\n\tconst dismissBesideAction = hasActions && !stackedActions;\n\tconst actionBesideAdjacent = hasSecondary || dismissBesideAction;\n\tconst actionShared = {\n\t\tnestedPx,\n\t\thitSlop: knobProps.nestedControl.hitSlop,\n\t\tbody: knobProps.body,\n\t\tlabelType: knobProps.label,\n\t\tpointy: knobProps.pointy,\n\t\tradiusOuter: knobProps.borderRadiusNested,\n\t\tbesideAdjacent: actionBesideAdjacent\n\t};\n\tconst accentSlot = (node) => isInfo && node != null ? /* @__PURE__ */ jsx(Intent, {\n\t\tname: \"accent\",\n\t\tchildren: node\n\t}) : node;\n\tconst primaryAction = accentSlot(action) ?? (actionLabel ? bar ? /* @__PURE__ */ jsx(Button, {\n\t\taccent: isInfo,\n\t\tsuccess: intent === \"success\",\n\t\twarning: intent === \"warning\",\n\t\terror: intent === \"error\",\n\t\t\"aria-label\": actionAccessibilityLabel ?? actionLabel,\n\t\tonPress: onAction,\n\t\tchildren: actionLabel\n\t}) : /* @__PURE__ */ jsx(AlertAction, {\n\t\tlabel: actionLabel,\n\t\taccessibilityLabel: actionAccessibilityLabel,\n\t\tonPress: onAction,\n\t\t...actionShared\n\t}) : null);\n\tconst secondaryNode = accentSlot(secondaryAction) ?? (secondaryActionLabel ? /* @__PURE__ */ jsx(AlertAction, {\n\t\tlabel: secondaryActionLabel,\n\t\tonPress: onSecondaryAction,\n\t\t...actionShared\n\t}) : null);\n\tconst actionRow = hasActions ? /* @__PURE__ */ jsxs(XStack, {\n\t\tflexShrink: 0,\n\t\tflexWrap: \"wrap\",\n\t\talignItems: \"center\",\n\t\t...knobProps.gap,\n\t\t\"data-alert-actions\": \"\",\n\t\tchildren: [primaryAction, secondaryNode]\n\t}) : null;\n\tconst assertive = intent === \"error\" || intent === \"warning\";\n\tconst stripe = isWeb ? { style: {\n\t\tborderInlineStartWidth: 3,\n\t\tborderInlineStartStyle: \"solid\",\n\t\tborderInlineStartColor: stripeColor\n\t} } : {\n\t\tborderStartWidth: 3,\n\t\tborderStartColor: isInfo ? componentColors.indicator.mark : \"$color9\"\n\t};\n\tconst barEdge = bar ? {\n\t\talignItems: \"center\",\n\t\tborderRadius: 0,\n\t\tborderWidth: 0,\n\t\tborderBottomWidth: Math.max(knobProps.surface.borderWidth, hairlineWidth)\n\t} : null;\n\treturn /* @__PURE__ */ jsxs(AlertFrame, {\n\t\trole: assertive ? \"alert\" : \"status\",\n\t\t\"aria-live\": assertive ? \"assertive\" : \"polite\",\n\t\t\"aria-labelledby\": title != null ? titleId : void 0,\n\t\ttabIndex: -1,\n\t\t...knobProps.borderRadius,\n\t\t...knobProps.gap,\n\t\t...knobProps.panelPadding,\n\t\tbackgroundColor: isInfo ? wash ?? \"$color3\" : \"$color3\",\n\t\tborderColor: edgeColorAt(\"$color6\", knobProps.borderWidthStop),\n\t\t...bar ? barEdge : stripe,\n\t\t...transitionProps(knobProps.motion.control),\n\t\t...props,\n\t\t...hostData({\n\t\t\t\"data-placement\": placement,\n\t\t\t\"data-size-token\": knobProps.sizeToken,\n\t\t\t\"data-layout\": stackedActions ? \"stacked\" : \"inline\",\n\t\t\t\"data-nested-px\": String(nestedPx),\n\t\t\t\"data-accent-stripe\": bar ? \"0\" : \"3\"\n\t\t}),\n\t\tchildren: [\n\t\t\ticonNode ? /* @__PURE__ */ jsx(View, {\n\t\t\t\tflexShrink: 0,\n\t\t\t\t\"aria-hidden\": true,\n\t\t\t\tpaddingTop: 1,\n\t\t\t\tchildren: iconNode\n\t\t\t}) : null,\n\t\t\t/* @__PURE__ */ jsxs(YStack, {\n\t\t\t\tflexGrow: 1,\n\t\t\t\tflexShrink: 1,\n\t\t\t\tgap: \"$1\",\n\t\t\t\tjustifyContent: \"center\",\n\t\t\t\tminWidth: 0,\n\t\t\t\tchildren: [\n\t\t\t\t\ttitle ? /* @__PURE__ */ jsx(SizableText, {\n\t\t\t\t\t\tid: titleId,\n\t\t\t\t\t\tsize: knobProps.label.fontSize,\n\t\t\t\t\t\t...knobProps.heading,\n\t\t\t\t\t\tcolor: textColor,\n\t\t\t\t\t\tchildren: title\n\t\t\t\t\t}) : null,\n\t\t\t\t\tchildren != null && (textualChildren !== null ? /* @__PURE__ */ jsx(SizableText, {\n\t\t\t\t\t\t...knobProps.body,\n\t\t\t\t\t\t...knobProps.label,\n\t\t\t\t\t\tcolor: textColor,\n\t\t\t\t\t\tfontWeight: \"400\",\n\t\t\t\t\t\tchildren: textualChildren\n\t\t\t\t\t}) : children),\n\t\t\t\t\tstackedActions ? actionRow : null\n\t\t\t\t]\n\t\t\t}),\n\t\t\t!stackedActions ? actionRow : null,\n\t\t\tdismissible ? /* @__PURE__ */ jsx(DismissButton, {\n\t\t\t\t\"aria-label\": t(\"Dismiss\"),\n\t\t\t\tclassName: \"mp-chip-dismiss\",\n\t\t\t\t...pressTargetStyle(),\n\t\t\t\t...dismissBesideAction ? { minWidth: dismissVisual + DISMISS_ADJACENT_OUTSET * 2 } : null,\n\t\t\t\tmarginVertical: -dismissOutset,\n\t\t\t\tmarginHorizontal: -(dismissBesideAction ? DISMISS_ADJACENT_OUTSET : dismissOutset),\n\t\t\t\thitSlop: dismissBesideAction ? void 0 : pressTargetHitSlop(dismissVisual),\n\t\t\t\tonPress: handleDismiss,\n\t\t\t\t...activateOnEnterSpace(handleDismiss),\n\t\t\t\tchildren: /* @__PURE__ */ jsx(DismissRing, {\n\t\t\t\t\tclassName: \"mp-chip-dismiss-ring\",\n\t\t\t\t\tpadding: smallGlyphs ? \"$0.5\" : \"$1\",\n\t\t\t\t\tborderRadius: knobProps.pointy ? 0 : \"$2\",\n\t\t\t\t\tchildren: /* @__PURE__ */ jsx(XIcon, {\n\t\t\t\t\t\tsize: dismissIcon,\n\t\t\t\t\t\tcolor: iconColor\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}) : null\n\t\t]\n\t});\n}\nfunction Alert(props) {\n\tif (!props.intent || props.intent === \"info\") return /* @__PURE__ */ jsx(AlertInner, { ...props });\n\tconst themeName = intentThemeMap[props.intent ?? \"info\"];\n\treturn /* @__PURE__ */ jsx(Intent, {\n\t\tname: themeName,\n\t\tchildren: /* @__PURE__ */ jsx(AlertInner, { ...props })\n\t});\n}\n\nexport { Alert };"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,gBAAgB,EAAEC,iBAAiB,EAAEC,WAAW,EAAEC,wBAAwB,EAAEC,aAAa,EAAEC,kBAAkB,EAAEC,gBAAgB,EAAEC,eAAe,EAAEC,sBAAsB,EAAEC,eAAe,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,oBAAoB,QAAQ,0BAA0B;AACjT,SAASC,eAAe,QAAQ,wBAAoB;AACpD,SAASC,KAAK,EAAEC,QAAQ,QAAQ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,GAAGjK,kBAAkB,CAAC6I,aAAa,CAAC;MACzE5E,OAAO,EAAEsF,aAAa;MACtB,GAAGvF,oBAAoB,CAACuF,aAAa,CAAC;MACtC3D,QAAQ,EAAE,eAAgBnE,GAAG,CAACiC,WAAW,EAAE;QAC1C+B,SAAS,EAAE,sBAAsB;QACjC9B,OAAO,EAAE6E,WAAW,GAAG,MAAM,GAAG,IAAI;QACpCrF,YAAY,EAAEkE,SAAS,CAACrC,MAAM,GAAG,CAAC,GAAG,IAAI;QACzCY,QAAQ,EAAE,eAAgBnE,GAAG,CAACR,KAAK,EAAE;UACpC+F,IAAI,EAAE4B,WAAW;UACjB7C,KAAK,EAAE8B;QACR,CAAC;MACF,CAAC;IACF,CAAC,CAAC,GAAG,IAAI;EAEX,CAAC,CAAC;AACH;AACA,SAASqE,KAAKA,CAAChF,KAAK,EAAE;EACrB,IAAI,CAACA,KAAK,CAAChB,MAAM,IAAIgB,KAAK,CAAChB,MAAM,KAAK,MAAM,EAAE,OAAO,eAAgBzE,GAAG,CAACwE,UAAU,EAAE;IAAE,GAAGiB;EAAM,CAAC,CAAC;EAClG,MAAMiF,SAAS,GAAGxK,cAAc,CAACuF,KAAK,CAAChB,MAAM,IAAI,MAAM,CAAC;EACxD,OAAO,eAAgBzE,GAAG,CAAC/B,MAAM,EAAE;IAClCwC,IAAI,EAAEiK,SAAS;IACfvG,QAAQ,EAAE,eAAgBnE,GAAG,CAACwE,UAAU,EAAE;MAAE,GAAGiB;IAAM,CAAC;EACvD,CAAC,CAAC;AACH;AAEA,SAASgF,KAAK","ignoreList":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { IconSlot, Intent, MIN_PRESS_TARGET, compareSizeTokens, edgeColorAt, ensureCompositeFocusRing, pressTargetHitSlop, pressTargetStyle, transitionProps, useAccentTintedSurface, useLegibleInkOn, useReadableTextOn, useResolvedKnobs, warnBannedErrorWords } from "@multiplatform.one/theme";
|
|
2
|
+
import { IconSlot, Intent, MIN_PRESS_TARGET, compareSizeTokens, edgeColorAt, ensureCompositeFocusRing, hairlineWidth, pressTargetHitSlop, pressTargetStyle, transitionProps, useAccentTintedSurface, useLegibleInkOn, useReadableTextOn, useResolvedKnobs, warnBannedErrorWords } from "@multiplatform.one/theme";
|
|
3
3
|
import { componentColors } from "../componentColors.native.js";
|
|
4
4
|
import { useId, useState } from "react";
|
|
5
5
|
import { useTranslation } from "../shared/i18n.native.js";
|
|
6
|
+
import { Button } from "../Button.native.js";
|
|
6
7
|
import { CheckCircleIcon, InfoIcon, WarningIcon, XCircleIcon, XIcon } from "@phosphor-icons/react";
|
|
7
8
|
import { SizableText, View, XStack, YStack, isWeb, styled, useTheme } from "tamagui";
|
|
8
9
|
var intentThemeMap = {
|
|
@@ -146,6 +147,7 @@ function hostData(attrs) {
|
|
|
146
147
|
function AlertAction(param) {
|
|
147
148
|
var {
|
|
148
149
|
label,
|
|
150
|
+
accessibilityLabel,
|
|
149
151
|
onPress,
|
|
150
152
|
nestedPx,
|
|
151
153
|
hitSlop,
|
|
@@ -160,7 +162,7 @@ function AlertAction(param) {
|
|
|
160
162
|
return /* @__PURE__ */jsx(AlertActionTarget, {
|
|
161
163
|
group: "alertAction",
|
|
162
164
|
className: "mp-chip-dismiss",
|
|
163
|
-
"aria-label": label,
|
|
165
|
+
"aria-label": accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : label,
|
|
164
166
|
...pressTargetStyle(),
|
|
165
167
|
marginVertical: -outset,
|
|
166
168
|
marginHorizontal: -hOutset,
|
|
@@ -192,6 +194,7 @@ function AlertInner(param) {
|
|
|
192
194
|
action,
|
|
193
195
|
actionLabel,
|
|
194
196
|
onAction,
|
|
197
|
+
actionAccessibilityLabel,
|
|
195
198
|
secondaryAction,
|
|
196
199
|
secondaryActionLabel,
|
|
197
200
|
onSecondaryAction,
|
|
@@ -200,6 +203,7 @@ function AlertInner(param) {
|
|
|
200
203
|
visible,
|
|
201
204
|
defaultVisible = true,
|
|
202
205
|
size,
|
|
206
|
+
placement = "inline",
|
|
203
207
|
...props
|
|
204
208
|
} = param;
|
|
205
209
|
var _accentSlot, _accentSlot1;
|
|
@@ -253,10 +257,11 @@ function AlertInner(param) {
|
|
|
253
257
|
}),
|
|
254
258
|
color: iconColor
|
|
255
259
|
});
|
|
260
|
+
var bar = placement === "bar";
|
|
256
261
|
var hasPrimary = action != null || Boolean(actionLabel);
|
|
257
262
|
var hasSecondary = secondaryAction != null || Boolean(secondaryActionLabel);
|
|
258
263
|
var hasActions = hasPrimary || hasSecondary;
|
|
259
|
-
var stackedActions = Boolean(hasActions && (title != null && children != null || hasPrimary && hasSecondary));
|
|
264
|
+
var stackedActions = Boolean(!bar && hasActions && (title != null && children != null || hasPrimary && hasSecondary));
|
|
260
265
|
var dismissBesideAction = hasActions && !stackedActions;
|
|
261
266
|
var actionBesideAdjacent = hasSecondary || dismissBesideAction;
|
|
262
267
|
var actionShared = {
|
|
@@ -274,8 +279,17 @@ function AlertInner(param) {
|
|
|
274
279
|
children: node
|
|
275
280
|
}) : node;
|
|
276
281
|
};
|
|
277
|
-
var primaryAction = (_accentSlot = accentSlot(action)) !== null && _accentSlot !== void 0 ? _accentSlot : actionLabel ? /* @__PURE__ */jsx(
|
|
282
|
+
var primaryAction = (_accentSlot = accentSlot(action)) !== null && _accentSlot !== void 0 ? _accentSlot : actionLabel ? bar ? /* @__PURE__ */jsx(Button, {
|
|
283
|
+
accent: isInfo,
|
|
284
|
+
success: intent === "success",
|
|
285
|
+
warning: intent === "warning",
|
|
286
|
+
error: intent === "error",
|
|
287
|
+
"aria-label": actionAccessibilityLabel !== null && actionAccessibilityLabel !== void 0 ? actionAccessibilityLabel : actionLabel,
|
|
288
|
+
onPress: onAction,
|
|
289
|
+
children: actionLabel
|
|
290
|
+
}) : /* @__PURE__ */jsx(AlertAction, {
|
|
278
291
|
label: actionLabel,
|
|
292
|
+
accessibilityLabel: actionAccessibilityLabel,
|
|
279
293
|
onPress: onAction,
|
|
280
294
|
...actionShared
|
|
281
295
|
}) : null;
|
|
@@ -303,6 +317,12 @@ function AlertInner(param) {
|
|
|
303
317
|
borderStartWidth: 3,
|
|
304
318
|
borderStartColor: isInfo ? componentColors.indicator.mark : "$color9"
|
|
305
319
|
};
|
|
320
|
+
var barEdge = bar ? {
|
|
321
|
+
alignItems: "center",
|
|
322
|
+
borderRadius: 0,
|
|
323
|
+
borderWidth: 0,
|
|
324
|
+
borderBottomWidth: Math.max(knobProps.surface.borderWidth, hairlineWidth)
|
|
325
|
+
} : null;
|
|
306
326
|
return /* @__PURE__ */jsxs(AlertFrame, {
|
|
307
327
|
role: assertive ? "alert" : "status",
|
|
308
328
|
"aria-live": assertive ? "assertive" : "polite",
|
|
@@ -313,14 +333,15 @@ function AlertInner(param) {
|
|
|
313
333
|
...knobProps.panelPadding,
|
|
314
334
|
backgroundColor: isInfo ? wash !== null && wash !== void 0 ? wash : "$color3" : "$color3",
|
|
315
335
|
borderColor: edgeColorAt("$color6", knobProps.borderWidthStop),
|
|
316
|
-
...stripe,
|
|
336
|
+
...(bar ? barEdge : stripe),
|
|
317
337
|
...transitionProps(knobProps.motion.control),
|
|
318
338
|
...props,
|
|
319
339
|
...hostData({
|
|
340
|
+
"data-placement": placement,
|
|
320
341
|
"data-size-token": knobProps.sizeToken,
|
|
321
342
|
"data-layout": stackedActions ? "stacked" : "inline",
|
|
322
343
|
"data-nested-px": String(nestedPx),
|
|
323
|
-
"data-accent-stripe": "3"
|
|
344
|
+
"data-accent-stripe": bar ? "0" : "3"
|
|
324
345
|
}),
|
|
325
346
|
children: [iconNode ? /* @__PURE__ */jsx(View, {
|
|
326
347
|
flexShrink: 0,
|