one 1.21.8 → 1.21.10
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/index.native.js.map +1 -1
- package/dist/cjs/layouts/Stack.cjs +1 -2
- package/dist/cjs/layouts/Stack.native.js +1 -2
- package/dist/cjs/layouts/Stack.native.js.map +1 -1
- package/dist/cjs/layouts/stack-utils/StackScreen.cjs +0 -3
- package/dist/cjs/layouts/stack-utils/StackScreen.native.js +0 -3
- package/dist/cjs/layouts/stack-utils/StackScreen.native.js.map +1 -1
- package/dist/cjs/layouts/stack-utils/__tests__/composition.test.cjs +0 -205
- package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js +0 -220
- package/dist/cjs/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -1
- package/dist/cjs/layouts/stack-utils/index.cjs +0 -2
- package/dist/cjs/layouts/stack-utils/index.native.js +0 -2
- package/dist/cjs/layouts/stack-utils/index.native.js.map +1 -1
- package/dist/esm/image/getImageData.mjs.map +1 -1
- package/dist/esm/image/getImageData.native.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/layouts/Stack.mjs +2 -3
- package/dist/esm/layouts/Stack.mjs.map +1 -1
- package/dist/esm/layouts/Stack.native.js +2 -3
- package/dist/esm/layouts/Stack.native.js.map +1 -1
- package/dist/esm/layouts/stack-utils/StackScreen.mjs +0 -3
- package/dist/esm/layouts/stack-utils/StackScreen.mjs.map +1 -1
- package/dist/esm/layouts/stack-utils/StackScreen.native.js +0 -3
- package/dist/esm/layouts/stack-utils/StackScreen.native.js.map +1 -1
- package/dist/esm/layouts/stack-utils/__tests__/composition.test.mjs +0 -205
- package/dist/esm/layouts/stack-utils/__tests__/composition.test.mjs.map +1 -1
- package/dist/esm/layouts/stack-utils/__tests__/composition.test.native.js +0 -220
- package/dist/esm/layouts/stack-utils/__tests__/composition.test.native.js.map +1 -1
- package/dist/esm/layouts/stack-utils/index.mjs +1 -2
- package/dist/esm/layouts/stack-utils/index.mjs.map +1 -1
- package/dist/esm/layouts/stack-utils/index.native.js +1 -2
- package/dist/esm/layouts/stack-utils/index.native.js.map +1 -1
- package/package.json +9 -10
- package/src/index.ts +0 -11
- package/src/layouts/Stack.tsx +0 -2
- package/src/layouts/stack-utils/README.md +0 -1
- package/src/layouts/stack-utils/StackScreen.tsx +0 -7
- package/src/layouts/stack-utils/__tests__/composition.test.tsx +0 -176
- package/src/layouts/stack-utils/index.tsx +0 -16
- package/types/image/getImageData.d.ts +1 -1
- package/types/image/getImageData.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/layouts/Stack.d.ts +0 -11
- package/types/layouts/Stack.d.ts.map +1 -1
- package/types/layouts/stack-utils/StackScreen.d.ts.map +1 -1
- package/types/layouts/stack-utils/index.d.ts +1 -3
- package/types/layouts/stack-utils/index.d.ts.map +1 -1
- package/dist/cjs/layouts/stack-utils/StackToolbar.cjs +0 -419
- package/dist/cjs/layouts/stack-utils/StackToolbar.native.js +0 -453
- package/dist/cjs/layouts/stack-utils/StackToolbar.native.js.map +0 -1
- package/dist/cjs/layouts/stack-utils/StackToolbar.types.cjs +0 -18
- package/dist/cjs/layouts/stack-utils/StackToolbar.types.native.js +0 -21
- package/dist/cjs/layouts/stack-utils/StackToolbar.types.native.js.map +0 -1
- package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.cjs +0 -63
- package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js +0 -73
- package/dist/cjs/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js.map +0 -1
- package/dist/esm/layouts/stack-utils/StackToolbar.mjs +0 -384
- package/dist/esm/layouts/stack-utils/StackToolbar.mjs.map +0 -1
- package/dist/esm/layouts/stack-utils/StackToolbar.native.js +0 -416
- package/dist/esm/layouts/stack-utils/StackToolbar.native.js.map +0 -1
- package/dist/esm/layouts/stack-utils/StackToolbar.types.mjs +0 -2
- package/dist/esm/layouts/stack-utils/StackToolbar.types.mjs.map +0 -1
- package/dist/esm/layouts/stack-utils/StackToolbar.types.native.js +0 -2
- package/dist/esm/layouts/stack-utils/StackToolbar.types.native.js.map +0 -1
- package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.mjs +0 -40
- package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.mjs.map +0 -1
- package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js +0 -47
- package/dist/esm/layouts/stack-utils/__tests__/StackToolbar.runtime.test.native.js.map +0 -1
- package/src/layouts/stack-utils/StackToolbar.tsx +0 -550
- package/src/layouts/stack-utils/StackToolbar.types.ts +0 -98
- package/src/layouts/stack-utils/__tests__/StackToolbar.runtime.test.tsx +0 -46
- package/types/layouts/stack-utils/StackToolbar.d.ts +0 -26
- package/types/layouts/stack-utils/StackToolbar.d.ts.map +0 -1
- package/types/layouts/stack-utils/StackToolbar.types.d.ts +0 -82
- package/types/layouts/stack-utils/StackToolbar.types.d.ts.map +0 -1
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
-
get: () => from[key],
|
|
13
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
var import_react = __toESM(require("react"), 1);
|
|
29
|
-
var import_react_test_renderer = __toESM(require("react-test-renderer"), 1);
|
|
30
|
-
var import_react_native = require("react-native");
|
|
31
|
-
var import_vitest = require("vitest");
|
|
32
|
-
var import_StackToolbar = require("../StackToolbar.native.js");
|
|
33
|
-
var setOptions = import_vitest.vi.fn();
|
|
34
|
-
import_vitest.vi.mock("../../../router/useNavigation", function () {
|
|
35
|
-
return {
|
|
36
|
-
useNavigation: function () {
|
|
37
|
-
return {
|
|
38
|
-
setOptions
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
(0, import_vitest.describe)("StackToolbar runtime options", function () {
|
|
44
|
-
var originalOS = import_react_native.Platform.OS;
|
|
45
|
-
(0, import_vitest.afterEach)(function () {
|
|
46
|
-
;
|
|
47
|
-
import_react_native.Platform.OS = originalOS;
|
|
48
|
-
setOptions.mockClear();
|
|
49
|
-
});
|
|
50
|
-
(0, import_vitest.it)("does not write undefined header overrides when the toolbar unmounts", function () {
|
|
51
|
-
;
|
|
52
|
-
import_react_native.Platform.OS = "ios";
|
|
53
|
-
var renderer;
|
|
54
|
-
(0, import_react_test_renderer.act)(function () {
|
|
55
|
-
renderer = import_react_test_renderer.default.create(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackToolbar.StackToolbar, {
|
|
56
|
-
placement: "right",
|
|
57
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StackToolbar.StackToolbar.Button, {
|
|
58
|
-
icon: "bell"
|
|
59
|
-
})
|
|
60
|
-
}));
|
|
61
|
-
});
|
|
62
|
-
(0, import_vitest.expect)(setOptions).toHaveBeenCalledTimes(1);
|
|
63
|
-
(0, import_vitest.expect)(setOptions).toHaveBeenLastCalledWith(import_vitest.expect.objectContaining({
|
|
64
|
-
headerShown: true,
|
|
65
|
-
unstable_headerRightItems: import_vitest.expect.any(Function)
|
|
66
|
-
}));
|
|
67
|
-
(0, import_react_test_renderer.act)(function () {
|
|
68
|
-
return renderer.unmount();
|
|
69
|
-
});
|
|
70
|
-
(0, import_vitest.expect)(setOptions).toHaveBeenCalledTimes(1);
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
//# sourceMappingURL=StackToolbar.runtime.test.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["import_jsx_runtime","require","import_react","__toESM","import_react_test_renderer","import_react_native","import_vitest","import_StackToolbar","setOptions","vi","fn","mock","useNavigation","describe","originalOS","Platform","OS","afterEach","mockClear","it","renderer","act","default","create","jsx","StackToolbar","placement","children","Button","icon"],"sources":["../../../../../src/layouts/stack-utils/__tests__/StackToolbar.runtime.test.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;gBACA;AACA,IAAAA,kBAAA,GAAAC,OAAyB;AACzB,IAAAC,YAAA,GAAAC,OAAoD,CAAAF,OAAA;AAQpD,IAAAG,0BAA6B,GAAAD,OAAA,CAAAF,OAAA;AAiBnB,IAAAI,mBAAA,GAAAJ,OAAA;AAvBV,IAAAK,aAAM,GAAaL,OAAA,SAAG;AAEtB,IAAAM,mBAAQ,GAAAN,OAAA;AAAwC,IAC9CO,UAAA,GAAeF,aAAS,CAAAG,EAAA,CAAAC,EAAA,CAAW;AACrCJ,aAAE,CAAAG,EAAA,CAAAE,IAAA;EAAA,OAIF;IACEC,aAAM,WAAAA,CAAA,EAAa;MAEnB;QACEJ;MAAE;IACF;EACF,CAAC;AAED;AACE,IAAAF,aAAA,CAAAO,QAAA;EAAC,IAACC,UAAA,GAAAT,mBAAsB,CAAAU,QAAA,CAAAC,EAAA;EACxB,IAAAV,aAAI,CAAAW,SAAA;IAEJ;IACEZ,mBAAW,CAAAU,QAAA,CAAAC,EAAA,GAAAF,UAAA;IAAaN,UACtB,CAAAU,SAAA;EAEA;EACF,EACF,EAACZ,aAAA,CAAAa,EAAA;IAED;IACAd,mBAAA,CAAAU,QAAO,CAAAC,EAAA,QAAY;IAAA,IACjBI,QAAA;IAAwB,IACtBhB,0BAAa,CAAAiB,GAAA;MAAAD,QACb,GAAAhB,0BAA2B,CAAAkB,OAAA,CAAAC,MAAO,gBAAY,IAAAvB,kBAAA,CAAAwB,GAAA,EAAAjB,mBAAA,CAAAkB,YAAA;QAC/CC,SAAA;QACHC,QAAA,qBAAA3B,kBAAA,CAAAwB,GAAA,EAAAjB,mBAAA,CAAAkB,YAAA,CAAAG,MAAA;UAEAC,IAAA;QAEA;MACD;IACF","ignoreList":[]}
|
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { MenuAction, ToolbarHost, ToolbarItem } from "@vxrn/native";
|
|
4
|
-
import { Children, createContext, Fragment, useContext, useId, useMemo } from "react";
|
|
5
|
-
import { Platform, StyleSheet } from "react-native-web";
|
|
6
|
-
import { useIsomorphicLayoutEffect } from "@vxrn/use-isomorphic-layout-effect";
|
|
7
|
-
import { useNavigation } from "../../router/useNavigation.mjs";
|
|
8
|
-
import { isChildOfType } from "../../utils/children.mjs";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
const StackToolbarPlacementContext = createContext(null);
|
|
11
|
-
function StackToolbarLabel(_props) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
function StackToolbarIcon(_props) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
function StackToolbarBadge(_props) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
function getToolbarContent(children, icon, iconRenderingMode) {
|
|
21
|
-
let label = "";
|
|
22
|
-
let iconProps = typeof icon === "string" ? {
|
|
23
|
-
sf: icon
|
|
24
|
-
} : icon ? {
|
|
25
|
-
src: icon,
|
|
26
|
-
renderingMode: iconRenderingMode
|
|
27
|
-
} : void 0;
|
|
28
|
-
let badge;
|
|
29
|
-
Children.forEach(children, child => {
|
|
30
|
-
if (typeof child === "string" || typeof child === "number") {
|
|
31
|
-
label += String(child);
|
|
32
|
-
} else if (isChildOfType(child, StackToolbarLabel)) {
|
|
33
|
-
label = child.props.children ?? "";
|
|
34
|
-
} else if (isChildOfType(child, StackToolbarIcon)) {
|
|
35
|
-
iconProps = child.props;
|
|
36
|
-
} else if (isChildOfType(child, StackToolbarBadge)) {
|
|
37
|
-
badge = child.props;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
return {
|
|
41
|
-
label,
|
|
42
|
-
icon: iconProps,
|
|
43
|
-
badge
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function getHeaderIcon(content, tintColor) {
|
|
47
|
-
if (content.icon?.sf) {
|
|
48
|
-
return {
|
|
49
|
-
type: "sfSymbol",
|
|
50
|
-
name: content.icon.sf
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
if (content.icon?.src) {
|
|
54
|
-
return {
|
|
55
|
-
type: "image",
|
|
56
|
-
source: content.icon.src,
|
|
57
|
-
tinted: (content.icon.renderingMode ?? (tintColor ? "template" : "original")) === "template"
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
if (content.icon?.xcasset) {
|
|
61
|
-
return {
|
|
62
|
-
type: "image",
|
|
63
|
-
source: {
|
|
64
|
-
uri: content.icon.xcasset
|
|
65
|
-
},
|
|
66
|
-
tinted: (content.icon.renderingMode ?? (tintColor ? "template" : "original")) === "template"
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
return void 0;
|
|
70
|
-
}
|
|
71
|
-
function getHeaderItemSharedProps(props, content) {
|
|
72
|
-
const labelStyle = StyleSheet.flatten(props.style);
|
|
73
|
-
const badgeStyle = StyleSheet.flatten(content.badge?.style);
|
|
74
|
-
return {
|
|
75
|
-
label: content.label,
|
|
76
|
-
labelStyle,
|
|
77
|
-
icon: getHeaderIcon(content, props.tintColor),
|
|
78
|
-
variant: props.variant,
|
|
79
|
-
tintColor: props.tintColor,
|
|
80
|
-
disabled: props.disabled,
|
|
81
|
-
hidesSharedBackground: props.hidesSharedBackground,
|
|
82
|
-
sharesBackground: !props.separateBackground,
|
|
83
|
-
accessibilityLabel: props.accessibilityLabel ?? content.label,
|
|
84
|
-
accessibilityHint: props.accessibilityHint,
|
|
85
|
-
badge: content.badge ? {
|
|
86
|
-
value: content.badge.children ?? "",
|
|
87
|
-
style: badgeStyle
|
|
88
|
-
} : void 0
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function getMenuItems(children) {
|
|
92
|
-
return Children.toArray(children).map(child => {
|
|
93
|
-
if (isChildOfType(child, StackToolbarMenuAction)) {
|
|
94
|
-
const content = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
|
|
95
|
-
return {
|
|
96
|
-
type: "action",
|
|
97
|
-
label: content.label,
|
|
98
|
-
description: child.props.subtitle,
|
|
99
|
-
icon: getHeaderIcon(content, child.props.tintColor),
|
|
100
|
-
onPress: child.props.onPress ?? (() => {}),
|
|
101
|
-
state: child.props.isOn ? "on" : "off",
|
|
102
|
-
disabled: child.props.disabled,
|
|
103
|
-
destructive: child.props.destructive,
|
|
104
|
-
hidden: child.props.hidden,
|
|
105
|
-
keepsMenuPresented: child.props.unstable_keepPresented,
|
|
106
|
-
discoverabilityLabel: child.props.discoverabilityLabel
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
if (isChildOfType(child, StackToolbarMenu)) {
|
|
110
|
-
const content = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
|
|
111
|
-
return {
|
|
112
|
-
type: "submenu",
|
|
113
|
-
label: content.label || child.props.title || "",
|
|
114
|
-
icon: getHeaderIcon(content, child.props.tintColor),
|
|
115
|
-
inline: child.props.inline,
|
|
116
|
-
layout: child.props.palette ? "palette" : "default",
|
|
117
|
-
destructive: child.props.destructive,
|
|
118
|
-
multiselectable: child.props.singleSelection === false,
|
|
119
|
-
items: getMenuItems(child.props.children)
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
return null;
|
|
123
|
-
}).filter(item => Boolean(item));
|
|
124
|
-
}
|
|
125
|
-
function convertToolbarChildToHeaderItem(child) {
|
|
126
|
-
if (isChildOfType(child, StackToolbarButton)) {
|
|
127
|
-
if (child.props.hidden) return null;
|
|
128
|
-
const content = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
|
|
129
|
-
return {
|
|
130
|
-
...getHeaderItemSharedProps(child.props, content),
|
|
131
|
-
type: "button",
|
|
132
|
-
onPress: child.props.onPress ?? (() => {}),
|
|
133
|
-
selected: child.props.selected
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
if (isChildOfType(child, StackToolbarMenu)) {
|
|
137
|
-
if (child.props.hidden) return null;
|
|
138
|
-
const content = getToolbarContent(child.props.children, child.props.icon, child.props.iconRenderingMode);
|
|
139
|
-
const contentWithTitle = {
|
|
140
|
-
...content,
|
|
141
|
-
label: content.label || child.props.title || ""
|
|
142
|
-
};
|
|
143
|
-
return {
|
|
144
|
-
...getHeaderItemSharedProps(child.props, contentWithTitle),
|
|
145
|
-
type: "menu",
|
|
146
|
-
menu: {
|
|
147
|
-
title: child.props.title,
|
|
148
|
-
multiselectable: child.props.singleSelection === false,
|
|
149
|
-
layout: child.props.palette ? "palette" : "default",
|
|
150
|
-
items: getMenuItems(child.props.children)
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
if (isChildOfType(child, StackToolbarSpacer)) {
|
|
155
|
-
if (child.props.hidden) return null;
|
|
156
|
-
if (child.props.width === void 0) {
|
|
157
|
-
if (process.env.NODE_ENV !== "production") {
|
|
158
|
-
console.warn("Stack.Toolbar.Spacer requires a width in header placements.");
|
|
159
|
-
}
|
|
160
|
-
return null;
|
|
161
|
-
}
|
|
162
|
-
return {
|
|
163
|
-
type: "spacing",
|
|
164
|
-
spacing: child.props.width
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
if (isChildOfType(child, StackToolbarView)) {
|
|
168
|
-
if (child.props.hidden) return null;
|
|
169
|
-
return {
|
|
170
|
-
type: "custom",
|
|
171
|
-
element: /* @__PURE__ */jsx(Fragment, {
|
|
172
|
-
children: child.props.children
|
|
173
|
-
}),
|
|
174
|
-
hidesSharedBackground: child.props.hidesSharedBackground
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
function appendStackToolbarPropsToOptions(options, props) {
|
|
180
|
-
if (Platform.OS !== "ios") return options;
|
|
181
|
-
const placement = props.placement ?? "bottom";
|
|
182
|
-
if (placement === "bottom") {
|
|
183
|
-
if (process.env.NODE_ENV !== "production") {
|
|
184
|
-
console.warn("Stack.Toolbar with bottom placement must be rendered in a page component, not inside Stack.Screen.");
|
|
185
|
-
}
|
|
186
|
-
return options;
|
|
187
|
-
}
|
|
188
|
-
if (placement !== "left" && placement !== "right") {
|
|
189
|
-
throw new Error(`Invalid placement "${placement}" for Stack.Toolbar. Expected "left", "right", or "bottom".`);
|
|
190
|
-
}
|
|
191
|
-
if (props.asChild) {
|
|
192
|
-
return placement === "left" ? {
|
|
193
|
-
...options,
|
|
194
|
-
headerShown: true,
|
|
195
|
-
headerLeft: () => props.children
|
|
196
|
-
} : {
|
|
197
|
-
...options,
|
|
198
|
-
headerShown: true,
|
|
199
|
-
headerRight: () => props.children
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
const allChildren = Children.toArray(props.children);
|
|
203
|
-
const items = allChildren.map(convertToolbarChildToHeaderItem).filter(item => Boolean(item));
|
|
204
|
-
if (process.env.NODE_ENV !== "production" && items.length !== allChildren.length) {
|
|
205
|
-
const invalidChildren = allChildren.filter(child => !isChildOfType(child, StackToolbarButton) && !isChildOfType(child, StackToolbarMenu) && !isChildOfType(child, StackToolbarSpacer) && !isChildOfType(child, StackToolbarView));
|
|
206
|
-
if (invalidChildren.length) {
|
|
207
|
-
console.warn(`Stack.Toolbar with placement="${placement}" only accepts Stack.Toolbar.Button, Menu, Spacer, and View children.`);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
const getItems = () => items;
|
|
211
|
-
return placement === "left" ? {
|
|
212
|
-
...options,
|
|
213
|
-
headerShown: true,
|
|
214
|
-
unstable_headerLeftItems: getItems
|
|
215
|
-
} : {
|
|
216
|
-
...options,
|
|
217
|
-
headerShown: true,
|
|
218
|
-
unstable_headerRightItems: getItems
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
function StackToolbarComponent(props) {
|
|
222
|
-
const parentPlacement = useContext(StackToolbarPlacementContext);
|
|
223
|
-
const navigation = useNavigation();
|
|
224
|
-
const placement = props.placement ?? "bottom";
|
|
225
|
-
const options = useMemo(() => placement === "bottom" ? {} : appendStackToolbarPropsToOptions({}, props), [placement, props.asChild, props.children]);
|
|
226
|
-
if (parentPlacement) {
|
|
227
|
-
throw new Error("Stack.Toolbar cannot be nested inside another Stack.Toolbar.");
|
|
228
|
-
}
|
|
229
|
-
useIsomorphicLayoutEffect(() => {
|
|
230
|
-
if (Platform.OS !== "ios" || placement === "bottom") return;
|
|
231
|
-
navigation.setOptions(options);
|
|
232
|
-
}, [navigation, options, placement]);
|
|
233
|
-
if (Platform.OS !== "ios" || placement !== "bottom") return null;
|
|
234
|
-
return /* @__PURE__ */jsx(StackToolbarPlacementContext.Provider, {
|
|
235
|
-
value: "bottom",
|
|
236
|
-
children: /* @__PURE__ */jsx(ToolbarHost, {
|
|
237
|
-
children: props.children
|
|
238
|
-
})
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
function StackToolbarButton(props) {
|
|
242
|
-
const placement = useContext(StackToolbarPlacementContext);
|
|
243
|
-
const identifier = useId();
|
|
244
|
-
if (Platform.OS !== "ios") return null;
|
|
245
|
-
if (!placement) throw new Error("Stack.Toolbar.Button must be used inside Stack.Toolbar.");
|
|
246
|
-
const content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
|
|
247
|
-
const badgeStyle = StyleSheet.flatten(content.badge?.style);
|
|
248
|
-
return /* @__PURE__ */jsx(ToolbarItem, {
|
|
249
|
-
identifier,
|
|
250
|
-
title: content.label,
|
|
251
|
-
systemImageName: content.icon?.sf,
|
|
252
|
-
xcassetName: content.icon?.xcasset,
|
|
253
|
-
image: props.image ?? content.icon?.src,
|
|
254
|
-
imageRenderingMode: content.icon?.renderingMode ?? props.iconRenderingMode ?? (props.tintColor ? "template" : "original"),
|
|
255
|
-
tintColor: props.tintColor,
|
|
256
|
-
hidesSharedBackground: props.hidesSharedBackground,
|
|
257
|
-
sharesBackground: !props.separateBackground,
|
|
258
|
-
barButtonItemStyle: props.variant === "done" ? "prominent" : props.variant,
|
|
259
|
-
hidden: props.hidden,
|
|
260
|
-
selected: props.selected,
|
|
261
|
-
badgeConfiguration: content.badge ? {
|
|
262
|
-
value: content.badge.children,
|
|
263
|
-
backgroundColor: badgeStyle?.backgroundColor,
|
|
264
|
-
color: badgeStyle?.color,
|
|
265
|
-
fontFamily: badgeStyle?.fontFamily,
|
|
266
|
-
fontSize: badgeStyle?.fontSize,
|
|
267
|
-
fontWeight: badgeStyle?.fontWeight
|
|
268
|
-
} : void 0,
|
|
269
|
-
titleStyle: StyleSheet.flatten(props.style),
|
|
270
|
-
accessibilityLabel: props.accessibilityLabel ?? content.label,
|
|
271
|
-
accessibilityHint: props.accessibilityHint,
|
|
272
|
-
disabled: props.disabled,
|
|
273
|
-
onSelected: props.onPress
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
function StackToolbarMenu(props) {
|
|
277
|
-
const placement = useContext(StackToolbarPlacementContext);
|
|
278
|
-
const identifier = useId();
|
|
279
|
-
if (Platform.OS !== "ios") return null;
|
|
280
|
-
if (!placement) throw new Error("Stack.Toolbar.Menu must be used inside Stack.Toolbar.");
|
|
281
|
-
const content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
|
|
282
|
-
const actions = Children.toArray(props.children).filter(child => isChildOfType(child, StackToolbarMenu) || isChildOfType(child, StackToolbarMenuAction));
|
|
283
|
-
return /* @__PURE__ */jsx(MenuAction, {
|
|
284
|
-
identifier,
|
|
285
|
-
title: props.title ?? "",
|
|
286
|
-
label: content.label || props.title,
|
|
287
|
-
icon: content.icon?.sf,
|
|
288
|
-
xcassetName: content.icon?.xcasset,
|
|
289
|
-
image: props.image ?? content.icon?.src,
|
|
290
|
-
imageRenderingMode: content.icon?.renderingMode ?? props.iconRenderingMode ?? (props.tintColor ? "template" : "original"),
|
|
291
|
-
disabled: props.disabled,
|
|
292
|
-
destructive: props.destructive,
|
|
293
|
-
hidden: props.hidden,
|
|
294
|
-
accessibilityLabel: props.accessibilityLabel ?? (content.label || props.title),
|
|
295
|
-
accessibilityHint: props.accessibilityHint,
|
|
296
|
-
displayInline: props.inline,
|
|
297
|
-
displayAsPalette: props.palette,
|
|
298
|
-
singleSelection: props.singleSelection,
|
|
299
|
-
preferredElementSize: props.elementSize,
|
|
300
|
-
tintColor: props.tintColor,
|
|
301
|
-
barButtonItemStyle: props.variant === "done" ? "prominent" : props.variant,
|
|
302
|
-
sharesBackground: !props.separateBackground,
|
|
303
|
-
hidesSharedBackground: props.hidesSharedBackground,
|
|
304
|
-
titleStyle: StyleSheet.flatten(props.style),
|
|
305
|
-
children: actions
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
function StackToolbarMenuAction(props) {
|
|
309
|
-
const placement = useContext(StackToolbarPlacementContext);
|
|
310
|
-
const identifier = useId();
|
|
311
|
-
if (Platform.OS !== "ios") return null;
|
|
312
|
-
if (!placement) throw new Error("Stack.Toolbar.MenuAction must be used inside Stack.Toolbar.Menu.");
|
|
313
|
-
const content = getToolbarContent(props.children, props.icon, props.iconRenderingMode);
|
|
314
|
-
return /* @__PURE__ */jsx(MenuAction, {
|
|
315
|
-
identifier,
|
|
316
|
-
title: content.label,
|
|
317
|
-
icon: content.icon?.sf,
|
|
318
|
-
xcassetName: content.icon?.xcasset,
|
|
319
|
-
image: props.image ?? content.icon?.src,
|
|
320
|
-
imageRenderingMode: content.icon?.renderingMode ?? props.iconRenderingMode ?? (props.tintColor ? "template" : "original"),
|
|
321
|
-
disabled: props.disabled,
|
|
322
|
-
destructive: props.destructive,
|
|
323
|
-
discoverabilityLabel: props.discoverabilityLabel,
|
|
324
|
-
subtitle: props.subtitle,
|
|
325
|
-
accessibilityLabel: props.accessibilityLabel ?? content.label,
|
|
326
|
-
accessibilityHint: props.accessibilityHint,
|
|
327
|
-
isOn: props.isOn,
|
|
328
|
-
keepPresented: props.unstable_keepPresented,
|
|
329
|
-
hidden: props.hidden,
|
|
330
|
-
onSelected: props.onPress
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
function StackToolbarSpacer(props) {
|
|
334
|
-
const placement = useContext(StackToolbarPlacementContext);
|
|
335
|
-
const identifier = useId();
|
|
336
|
-
if (Platform.OS !== "ios") return null;
|
|
337
|
-
if (!placement) throw new Error("Stack.Toolbar.Spacer must be used inside Stack.Toolbar.");
|
|
338
|
-
return /* @__PURE__ */jsx(ToolbarItem, {
|
|
339
|
-
identifier,
|
|
340
|
-
type: props.width === void 0 ? "fluidSpacer" : "fixedSpacer",
|
|
341
|
-
width: props.width,
|
|
342
|
-
hidden: props.hidden,
|
|
343
|
-
sharesBackground: props.sharesBackground
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
function StackToolbarSearchBarSlot(props) {
|
|
347
|
-
const placement = useContext(StackToolbarPlacementContext);
|
|
348
|
-
const identifier = useId();
|
|
349
|
-
if (Platform.OS !== "ios") return null;
|
|
350
|
-
if (!placement) throw new Error("Stack.Toolbar.SearchBarSlot must be used inside Stack.Toolbar.");
|
|
351
|
-
return /* @__PURE__ */jsx(ToolbarItem, {
|
|
352
|
-
identifier,
|
|
353
|
-
type: "searchBar",
|
|
354
|
-
hidden: props.hidden,
|
|
355
|
-
hidesSharedBackground: props.hidesSharedBackground,
|
|
356
|
-
sharesBackground: !props.separateBackground
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
function StackToolbarView(props) {
|
|
360
|
-
const placement = useContext(StackToolbarPlacementContext);
|
|
361
|
-
const identifier = useId();
|
|
362
|
-
if (Platform.OS !== "ios") return null;
|
|
363
|
-
if (!placement) throw new Error("Stack.Toolbar.View must be used inside Stack.Toolbar.");
|
|
364
|
-
if (props.hidden) return null;
|
|
365
|
-
return /* @__PURE__ */jsx(ToolbarItem, {
|
|
366
|
-
identifier,
|
|
367
|
-
hidesSharedBackground: props.hidesSharedBackground,
|
|
368
|
-
sharesBackground: !props.separateBackground,
|
|
369
|
-
children: props.children
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
const StackToolbar = Object.assign(StackToolbarComponent, {
|
|
373
|
-
Button: StackToolbarButton,
|
|
374
|
-
Menu: StackToolbarMenu,
|
|
375
|
-
MenuAction: StackToolbarMenuAction,
|
|
376
|
-
Spacer: StackToolbarSpacer,
|
|
377
|
-
SearchBarSlot: StackToolbarSearchBarSlot,
|
|
378
|
-
View: StackToolbarView,
|
|
379
|
-
Label: StackToolbarLabel,
|
|
380
|
-
Icon: StackToolbarIcon,
|
|
381
|
-
Badge: StackToolbarBadge
|
|
382
|
-
});
|
|
383
|
-
export { StackToolbar, StackToolbarBadge, StackToolbarButton, StackToolbarIcon, StackToolbarLabel, StackToolbarMenu, StackToolbarMenuAction, StackToolbarSearchBarSlot, StackToolbarSpacer, StackToolbarView, appendStackToolbarPropsToOptions };
|
|
384
|
-
//# sourceMappingURL=StackToolbar.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["MenuAction","ToolbarHost","ToolbarItem","Children","createContext","Fragment","useContext","useId","useMemo","Platform","StyleSheet","useIsomorphicLayoutEffect","useNavigation","isChildOfType","jsx","StackToolbarPlacementContext","StackToolbarLabel","_props","StackToolbarIcon","StackToolbarBadge","getToolbarContent","children","icon","iconRenderingMode","label","iconProps","sf","src","renderingMode","badge","forEach","child","String","props","getHeaderIcon","content","tintColor","type","name","source","tinted","xcasset","uri","getHeaderItemSharedProps","labelStyle","flatten","style","badgeStyle","variant","disabled","hidesSharedBackground","sharesBackground","separateBackground","accessibilityLabel","accessibilityHint","value","getMenuItems","toArray","map","StackToolbarMenuAction","description","subtitle","onPress","state","isOn","destructive","hidden","keepsMenuPresented","unstable_keepPresented","discoverabilityLabel","StackToolbarMenu","title","inline","layout","palette","multiselectable","singleSelection","items","filter","item","Boolean","convertToolbarChildToHeaderItem","StackToolbarButton","selected","contentWithTitle","menu","StackToolbarSpacer","width","process","env","NODE_ENV","console","warn","spacing","StackToolbarView","element","appendStackToolbarPropsToOptions","options","OS","placement","Error","asChild","headerShown","headerLeft","headerRight","allChildren","length","invalidChildren","getItems","unstable_headerLeftItems","unstable_headerRightItems","StackToolbarComponent","parentPlacement","navigation","setOptions","Provider","identifier","systemImageName","xcassetName","image","imageRenderingMode","barButtonItemStyle","badgeConfiguration","backgroundColor","color","fontFamily","fontSize","fontWeight","titleStyle","onSelected","actions","displayInline","displayAsPalette","preferredElementSize","elementSize","keepPresented","StackToolbarSearchBarSlot","StackToolbar","Object","assign","Button","Menu","Spacer","SearchBarSlot","View","Label","Icon","Badge"],"sources":["../../../../src/layouts/stack-utils/StackToolbar.tsx"],"sourcesContent":[null],"mappings":";;AAUA,SAASA,UAAA,EAAYC,WAAA,EAAaC,WAAA,QAAmB;AACrD,SACEC,QAAA,EACAC,aAAA,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