@bacon-pos/ui 0.5.0 → 0.6.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/lib/commonjs/components/CodeField/CodeField.js +10 -2
- package/lib/commonjs/components/CodeField/CodeField.js.map +1 -1
- package/lib/commonjs/components/CodeField/CodeField.stories.js +15 -2
- package/lib/commonjs/components/CodeField/CodeField.stories.js.map +1 -1
- package/lib/commonjs/components/Dropdown/Dropdown.js +282 -0
- package/lib/commonjs/components/Dropdown/Dropdown.js.map +1 -0
- package/lib/commonjs/components/Dropdown/Dropdown.stories.js +421 -0
- package/lib/commonjs/components/Dropdown/Dropdown.stories.js.map +1 -0
- package/lib/commonjs/components/Dropdown/Dropdown.test.js +113 -0
- package/lib/commonjs/components/Dropdown/Dropdown.test.js.map +1 -0
- package/lib/commonjs/components/Dropdown/index.js +19 -0
- package/lib/commonjs/components/Dropdown/index.js.map +1 -0
- package/lib/commonjs/components/Menu/Menu.js +214 -0
- package/lib/commonjs/components/Menu/Menu.js.map +1 -0
- package/lib/commonjs/components/Menu/Menu.test.js +71 -0
- package/lib/commonjs/components/Menu/Menu.test.js.map +1 -0
- package/lib/commonjs/components/Menu/MenuButton.js +73 -0
- package/lib/commonjs/components/Menu/MenuButton.js.map +1 -0
- package/lib/commonjs/components/Menu/MenuButton.stories.js +166 -0
- package/lib/commonjs/components/Menu/MenuButton.stories.js.map +1 -0
- package/lib/commonjs/components/Menu/SelectButton.js +143 -0
- package/lib/commonjs/components/Menu/SelectButton.js.map +1 -0
- package/lib/commonjs/components/Menu/SelectButton.stories.js +116 -0
- package/lib/commonjs/components/Menu/SelectButton.stories.js.map +1 -0
- package/lib/commonjs/components/Menu/SelectButton.test.js +80 -0
- package/lib/commonjs/components/Menu/SelectButton.test.js.map +1 -0
- package/lib/commonjs/components/Menu/index.js +27 -0
- package/lib/commonjs/components/Menu/index.js.map +1 -0
- package/lib/commonjs/components/Select/Select.js +246 -0
- package/lib/commonjs/components/Select/Select.js.map +1 -0
- package/lib/commonjs/components/Select/Select.stories.js +221 -0
- package/lib/commonjs/components/Select/Select.stories.js.map +1 -0
- package/lib/commonjs/components/Select/Select.test.js +165 -0
- package/lib/commonjs/components/Select/Select.test.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +13 -0
- package/lib/commonjs/components/Select/index.js.map +1 -0
- package/lib/commonjs/components/UserChip/UserChip.js +121 -0
- package/lib/commonjs/components/UserChip/UserChip.js.map +1 -0
- package/lib/commonjs/components/UserChip/UserChip.stories.js +153 -0
- package/lib/commonjs/components/UserChip/UserChip.stories.js.map +1 -0
- package/lib/commonjs/components/UserChip/UserChip.test.js +59 -0
- package/lib/commonjs/components/UserChip/UserChip.test.js.map +1 -0
- package/lib/commonjs/components/UserChip/index.js +13 -0
- package/lib/commonjs/components/UserChip/index.js.map +1 -0
- package/lib/commonjs/components/index.js +57 -13
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/module/components/CodeField/CodeField.js +10 -2
- package/lib/module/components/CodeField/CodeField.js.map +1 -1
- package/lib/module/components/CodeField/CodeField.stories.js +14 -1
- package/lib/module/components/CodeField/CodeField.stories.js.map +1 -1
- package/lib/module/components/Dropdown/Dropdown.js +277 -0
- package/lib/module/components/Dropdown/Dropdown.js.map +1 -0
- package/lib/module/components/Dropdown/Dropdown.stories.js +417 -0
- package/lib/module/components/Dropdown/Dropdown.stories.js.map +1 -0
- package/lib/module/components/Dropdown/Dropdown.test.js +113 -0
- package/lib/module/components/Dropdown/Dropdown.test.js.map +1 -0
- package/lib/module/components/Dropdown/index.js +4 -0
- package/lib/module/components/Dropdown/index.js.map +1 -0
- package/lib/module/components/Menu/Menu.js +210 -0
- package/lib/module/components/Menu/Menu.js.map +1 -0
- package/lib/module/components/Menu/Menu.test.js +71 -0
- package/lib/module/components/Menu/Menu.test.js.map +1 -0
- package/lib/module/components/Menu/MenuButton.js +69 -0
- package/lib/module/components/Menu/MenuButton.js.map +1 -0
- package/lib/module/components/Menu/MenuButton.stories.js +162 -0
- package/lib/module/components/Menu/MenuButton.stories.js.map +1 -0
- package/lib/module/components/Menu/SelectButton.js +139 -0
- package/lib/module/components/Menu/SelectButton.js.map +1 -0
- package/lib/module/components/Menu/SelectButton.stories.js +112 -0
- package/lib/module/components/Menu/SelectButton.stories.js.map +1 -0
- package/lib/module/components/Menu/SelectButton.test.js +80 -0
- package/lib/module/components/Menu/SelectButton.test.js.map +1 -0
- package/lib/module/components/Menu/index.js +6 -0
- package/lib/module/components/Menu/index.js.map +1 -0
- package/lib/module/components/Select/Select.js +244 -0
- package/lib/module/components/Select/Select.js.map +1 -0
- package/lib/module/components/Select/Select.stories.js +217 -0
- package/lib/module/components/Select/Select.stories.js.map +1 -0
- package/lib/module/components/Select/Select.test.js +165 -0
- package/lib/module/components/Select/Select.test.js.map +1 -0
- package/lib/module/components/Select/index.js +4 -0
- package/lib/module/components/Select/index.js.map +1 -0
- package/lib/module/components/UserChip/UserChip.js +117 -0
- package/lib/module/components/UserChip/UserChip.js.map +1 -0
- package/lib/module/components/UserChip/UserChip.stories.js +149 -0
- package/lib/module/components/UserChip/UserChip.stories.js.map +1 -0
- package/lib/module/components/UserChip/UserChip.test.js +59 -0
- package/lib/module/components/UserChip/UserChip.test.js.map +1 -0
- package/lib/module/components/UserChip/index.js +4 -0
- package/lib/module/components/UserChip/index.js.map +1 -0
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/typescript/commonjs/components/CodeField/CodeField.d.ts +4 -2
- package/lib/typescript/commonjs/components/CodeField/CodeField.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Dropdown/Dropdown.d.ts +105 -0
- package/lib/typescript/commonjs/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Dropdown/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Dropdown/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts +66 -0
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Menu/MenuButton.d.ts +46 -0
- package/lib/typescript/commonjs/components/Menu/MenuButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Menu/SelectButton.d.ts +60 -0
- package/lib/typescript/commonjs/components/Menu/SelectButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Menu/index.d.ts +7 -0
- package/lib/typescript/commonjs/components/Menu/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Select/Select.d.ts +73 -0
- package/lib/typescript/commonjs/components/Select/Select.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Select/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Select/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/UserChip/UserChip.d.ts +33 -0
- package/lib/typescript/commonjs/components/UserChip/UserChip.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/UserChip/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/UserChip/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/index.d.ts +4 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
- package/lib/typescript/module/components/CodeField/CodeField.d.ts +4 -2
- package/lib/typescript/module/components/CodeField/CodeField.d.ts.map +1 -1
- package/lib/typescript/module/components/Dropdown/Dropdown.d.ts +105 -0
- package/lib/typescript/module/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/lib/typescript/module/components/Dropdown/index.d.ts +3 -0
- package/lib/typescript/module/components/Dropdown/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Menu/Menu.d.ts +66 -0
- package/lib/typescript/module/components/Menu/Menu.d.ts.map +1 -0
- package/lib/typescript/module/components/Menu/MenuButton.d.ts +46 -0
- package/lib/typescript/module/components/Menu/MenuButton.d.ts.map +1 -0
- package/lib/typescript/module/components/Menu/SelectButton.d.ts +60 -0
- package/lib/typescript/module/components/Menu/SelectButton.d.ts.map +1 -0
- package/lib/typescript/module/components/Menu/index.d.ts +7 -0
- package/lib/typescript/module/components/Menu/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Select/Select.d.ts +73 -0
- package/lib/typescript/module/components/Select/Select.d.ts.map +1 -0
- package/lib/typescript/module/components/Select/index.d.ts +3 -0
- package/lib/typescript/module/components/Select/index.d.ts.map +1 -0
- package/lib/typescript/module/components/UserChip/UserChip.d.ts +33 -0
- package/lib/typescript/module/components/UserChip/UserChip.d.ts.map +1 -0
- package/lib/typescript/module/components/UserChip/index.d.ts +3 -0
- package/lib/typescript/module/components/UserChip/index.d.ts.map +1 -0
- package/lib/typescript/module/components/index.d.ts +4 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/CodeField/CodeField.tsx +6 -3
- package/src/components/Dropdown/Dropdown.tsx +319 -0
- package/src/components/Dropdown/index.ts +2 -0
- package/src/components/Menu/Menu.tsx +249 -0
- package/src/components/Menu/MenuButton.tsx +98 -0
- package/src/components/Menu/SelectButton.tsx +171 -0
- package/src/components/Menu/index.ts +12 -0
- package/src/components/Select/Select.tsx +323 -0
- package/src/components/Select/index.ts +2 -0
- package/src/components/UserChip/UserChip.tsx +138 -0
- package/src/components/UserChip/index.ts +2 -0
- package/src/components/index.ts +4 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Menu = Menu;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
/** A point on a box: a vertical and a horizontal edge/center. */
|
|
11
|
+
|
|
12
|
+
const V_FRAC = {
|
|
13
|
+
top: 0,
|
|
14
|
+
center: 0.5,
|
|
15
|
+
bottom: 1
|
|
16
|
+
};
|
|
17
|
+
const H_FRAC = {
|
|
18
|
+
left: 0,
|
|
19
|
+
center: 0.5,
|
|
20
|
+
right: 1
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** State handed to the trigger renderer and (optionally) the content renderer. */
|
|
24
|
+
|
|
25
|
+
const ZERO_INSETS = {
|
|
26
|
+
top: 0,
|
|
27
|
+
right: 0,
|
|
28
|
+
bottom: 0,
|
|
29
|
+
left: 0
|
|
30
|
+
};
|
|
31
|
+
function clamp(value, min, max) {
|
|
32
|
+
if (max < min) return min;
|
|
33
|
+
return Math.min(Math.max(value, min), max);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Anchored overlay menu. Renders a trigger inline and, when open, a floating
|
|
38
|
+
* panel positioned relative to the trigger via two origins — `anchorOrigin`
|
|
39
|
+
* (point on the trigger) and `menuOrigin` (matching point on the menu). Tapping
|
|
40
|
+
* outside (or the hardware back button) dismisses it. Used to compose menu
|
|
41
|
+
* buttons, select fields, popovers, etc.
|
|
42
|
+
*/
|
|
43
|
+
function Menu({
|
|
44
|
+
renderTrigger,
|
|
45
|
+
children,
|
|
46
|
+
anchorOrigin = {
|
|
47
|
+
vertical: 'bottom',
|
|
48
|
+
horizontal: 'left'
|
|
49
|
+
},
|
|
50
|
+
menuOrigin = {
|
|
51
|
+
vertical: 'top',
|
|
52
|
+
horizontal: 'left'
|
|
53
|
+
},
|
|
54
|
+
offset = 8,
|
|
55
|
+
autoFit = true,
|
|
56
|
+
insets = ZERO_INSETS,
|
|
57
|
+
open: openProp,
|
|
58
|
+
onOpenChange,
|
|
59
|
+
screenPadding = 8,
|
|
60
|
+
triggerStyle
|
|
61
|
+
}) {
|
|
62
|
+
const triggerRef = (0, _react.useRef)(null);
|
|
63
|
+
const [uncontrolledOpen, setUncontrolledOpen] = (0, _react.useState)(false);
|
|
64
|
+
const isControlled = openProp !== undefined;
|
|
65
|
+
const open = isControlled ? openProp : uncontrolledOpen;
|
|
66
|
+
const [rect, setRect] = (0, _react.useState)(null);
|
|
67
|
+
const [menuSize, setMenuSize] = (0, _react.useState)(null);
|
|
68
|
+
// The content's natural (uncapped) height, captured once per open — used to
|
|
69
|
+
// decide whether it fits the preferred side (kept stable so the flip decision
|
|
70
|
+
// doesn't oscillate once a maxHeight cap is applied).
|
|
71
|
+
const [naturalHeight, setNaturalHeight] = (0, _react.useState)(null);
|
|
72
|
+
const anim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
73
|
+
const setOpen = next => {
|
|
74
|
+
if (!isControlled) setUncontrolledOpen(next);
|
|
75
|
+
onOpenChange?.(next);
|
|
76
|
+
};
|
|
77
|
+
const close = () => setOpen(false);
|
|
78
|
+
const toggle = () => setOpen(!open);
|
|
79
|
+
|
|
80
|
+
// Measure the trigger whenever the menu opens.
|
|
81
|
+
(0, _react.useEffect)(() => {
|
|
82
|
+
if (!open) {
|
|
83
|
+
setMenuSize(null);
|
|
84
|
+
setNaturalHeight(null);
|
|
85
|
+
anim.setValue(0);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
triggerRef.current?.measureInWindow((x, y, width, height) => {
|
|
89
|
+
setRect({
|
|
90
|
+
x,
|
|
91
|
+
y,
|
|
92
|
+
width,
|
|
93
|
+
height
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}, [open, anim]);
|
|
97
|
+
|
|
98
|
+
// Fade + scale in once the menu has been measured (so it never flashes unplaced).
|
|
99
|
+
(0, _react.useEffect)(() => {
|
|
100
|
+
if (open && rect && menuSize) {
|
|
101
|
+
_reactNative.Animated.timing(anim, {
|
|
102
|
+
toValue: 1,
|
|
103
|
+
duration: 120,
|
|
104
|
+
easing: _reactNative.Easing.out(_reactNative.Easing.ease),
|
|
105
|
+
useNativeDriver: _reactNative.Platform.OS !== 'web'
|
|
106
|
+
}).start();
|
|
107
|
+
}
|
|
108
|
+
}, [open, rect, menuSize, anim]);
|
|
109
|
+
const onMenuLayout = e => {
|
|
110
|
+
const {
|
|
111
|
+
width,
|
|
112
|
+
height
|
|
113
|
+
} = e.nativeEvent.layout;
|
|
114
|
+
if (!menuSize || menuSize.width !== width || menuSize.height !== height) {
|
|
115
|
+
setMenuSize({
|
|
116
|
+
width,
|
|
117
|
+
height
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
// Capture the natural height once — before any maxHeight cap is applied.
|
|
121
|
+
if (naturalHeight === null) setNaturalHeight(height);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// Auto-fit: choose a vertical direction with room and cap the height so the
|
|
125
|
+
// menu never runs off-screen. Only meaningful for a "drop" origin config
|
|
126
|
+
// (top↔bottom); otherwise we keep the origins as given.
|
|
127
|
+
const isDropConfig = anchorOrigin.vertical === 'bottom' && menuOrigin.vertical === 'top' || anchorOrigin.vertical === 'top' && menuOrigin.vertical === 'bottom';
|
|
128
|
+
const preferredUp = anchorOrigin.vertical === 'top' && menuOrigin.vertical === 'bottom';
|
|
129
|
+
let effAnchor = anchorOrigin;
|
|
130
|
+
let effMenu = menuOrigin;
|
|
131
|
+
let autoMaxHeight;
|
|
132
|
+
if (autoFit && isDropConfig && rect && naturalHeight !== null) {
|
|
133
|
+
const screen = _reactNative.Dimensions.get('window');
|
|
134
|
+
const spaceBelow = screen.height - insets.bottom - (rect.y + rect.height) - offset - screenPadding;
|
|
135
|
+
const spaceAbove = rect.y - insets.top - offset - screenPadding;
|
|
136
|
+
let up = preferredUp;
|
|
137
|
+
if (!preferredUp) up = naturalHeight > spaceBelow && spaceAbove > spaceBelow;else up = !(naturalHeight > spaceAbove && spaceBelow > spaceAbove);
|
|
138
|
+
const chosen = up ? spaceAbove : spaceBelow;
|
|
139
|
+
if (naturalHeight > chosen && chosen > 0) autoMaxHeight = chosen;
|
|
140
|
+
effAnchor = {
|
|
141
|
+
horizontal: anchorOrigin.horizontal,
|
|
142
|
+
vertical: up ? 'top' : 'bottom'
|
|
143
|
+
};
|
|
144
|
+
effMenu = {
|
|
145
|
+
horizontal: menuOrigin.horizontal,
|
|
146
|
+
vertical: up ? 'bottom' : 'top'
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
let top = 0;
|
|
150
|
+
let left = 0;
|
|
151
|
+
if (rect && menuSize) {
|
|
152
|
+
const screen = _reactNative.Dimensions.get('window');
|
|
153
|
+
const anchorX = rect.x + H_FRAC[effAnchor.horizontal] * rect.width;
|
|
154
|
+
const anchorY = rect.y + V_FRAC[effAnchor.vertical] * rect.height;
|
|
155
|
+
const offsetY = effMenu.vertical === 'top' ? offset : effMenu.vertical === 'bottom' ? -offset : 0;
|
|
156
|
+
left = anchorX - H_FRAC[effMenu.horizontal] * menuSize.width;
|
|
157
|
+
top = anchorY - V_FRAC[effMenu.vertical] * menuSize.height + offsetY;
|
|
158
|
+
left = clamp(left, screenPadding + insets.left, screen.width - insets.right - menuSize.width - screenPadding);
|
|
159
|
+
top = clamp(top, screenPadding + insets.top, screen.height - insets.bottom - menuSize.height - screenPadding);
|
|
160
|
+
}
|
|
161
|
+
const placed = Boolean(rect && menuSize);
|
|
162
|
+
const content = typeof children === 'function' ? children({
|
|
163
|
+
close,
|
|
164
|
+
triggerWidth: rect?.width,
|
|
165
|
+
maxHeight: autoMaxHeight
|
|
166
|
+
}) : children;
|
|
167
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
168
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
169
|
+
ref: triggerRef,
|
|
170
|
+
collapsable: false,
|
|
171
|
+
style: [{
|
|
172
|
+
alignSelf: 'flex-start'
|
|
173
|
+
}, triggerStyle],
|
|
174
|
+
children: renderTrigger({
|
|
175
|
+
open,
|
|
176
|
+
toggle,
|
|
177
|
+
close
|
|
178
|
+
})
|
|
179
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
180
|
+
visible: open,
|
|
181
|
+
transparent: true,
|
|
182
|
+
animationType: "none",
|
|
183
|
+
onRequestClose: close,
|
|
184
|
+
statusBarTranslucent: true,
|
|
185
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
186
|
+
accessibilityLabel: "Close menu",
|
|
187
|
+
onPress: close,
|
|
188
|
+
style: {
|
|
189
|
+
flex: 1
|
|
190
|
+
},
|
|
191
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
192
|
+
onLayout: onMenuLayout
|
|
193
|
+
// Stop presses inside the menu from bubbling to the backdrop.
|
|
194
|
+
,
|
|
195
|
+
onStartShouldSetResponder: () => true,
|
|
196
|
+
style: {
|
|
197
|
+
position: 'absolute',
|
|
198
|
+
top,
|
|
199
|
+
left,
|
|
200
|
+
opacity: placed ? anim : 0,
|
|
201
|
+
transform: [{
|
|
202
|
+
scale: placed ? anim.interpolate({
|
|
203
|
+
inputRange: [0, 1],
|
|
204
|
+
outputRange: [0.96, 1]
|
|
205
|
+
}) : 1
|
|
206
|
+
}]
|
|
207
|
+
},
|
|
208
|
+
children: content
|
|
209
|
+
})
|
|
210
|
+
})
|
|
211
|
+
})]
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=Menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_jsxRuntime","V_FRAC","top","center","bottom","H_FRAC","left","right","ZERO_INSETS","clamp","value","min","max","Math","Menu","renderTrigger","children","anchorOrigin","vertical","horizontal","menuOrigin","offset","autoFit","insets","open","openProp","onOpenChange","screenPadding","triggerStyle","triggerRef","useRef","uncontrolledOpen","setUncontrolledOpen","useState","isControlled","undefined","rect","setRect","menuSize","setMenuSize","naturalHeight","setNaturalHeight","anim","Animated","Value","current","setOpen","next","close","toggle","useEffect","setValue","measureInWindow","x","y","width","height","timing","toValue","duration","easing","Easing","out","ease","useNativeDriver","Platform","OS","start","onMenuLayout","e","nativeEvent","layout","isDropConfig","preferredUp","effAnchor","effMenu","autoMaxHeight","screen","Dimensions","get","spaceBelow","spaceAbove","up","chosen","anchorX","anchorY","offsetY","placed","Boolean","content","triggerWidth","maxHeight","jsxs","Fragment","jsx","View","ref","collapsable","style","alignSelf","Modal","visible","transparent","animationType","onRequestClose","statusBarTranslucent","Pressable","accessibilityLabel","onPress","flex","onLayout","onStartShouldSetResponder","position","opacity","transform","scale","interpolate","inputRange","outputRange"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Menu/Menu.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAWsB,IAAAE,WAAA,GAAAF,OAAA;AAKtB;;AAMA,MAAMG,MAAsC,GAAG;EAAEC,GAAG,EAAE,CAAC;EAAEC,MAAM,EAAE,GAAG;EAAEC,MAAM,EAAE;AAAE,CAAC;AACjF,MAAMC,MAAwC,GAAG;EAAEC,IAAI,EAAE,CAAC;EAAEH,MAAM,EAAE,GAAG;EAAEI,KAAK,EAAE;AAAE,CAAC;;AAEnF;;AAiDA,MAAMC,WAAuB,GAAG;EAAEN,GAAG,EAAE,CAAC;EAAEK,KAAK,EAAE,CAAC;EAAEH,MAAM,EAAE,CAAC;EAAEE,IAAI,EAAE;AAAE,CAAC;AASxE,SAASG,KAAKA,CAACC,KAAa,EAAEC,GAAW,EAAEC,GAAW,EAAU;EAC9D,IAAIA,GAAG,GAAGD,GAAG,EAAE,OAAOA,GAAG;EACzB,OAAOE,IAAI,CAACF,GAAG,CAACE,IAAI,CAACD,GAAG,CAACF,KAAK,EAAEC,GAAG,CAAC,EAAEC,GAAG,CAAC;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,IAAIA,CAAC;EACnBC,aAAa;EACbC,QAAQ;EACRC,YAAY,GAAG;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,UAAU,EAAE;EAAO,CAAC;EACzDC,UAAU,GAAG;IAAEF,QAAQ,EAAE,KAAK;IAAEC,UAAU,EAAE;EAAO,CAAC;EACpDE,MAAM,GAAG,CAAC;EACVC,OAA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AC;YAC1BwE,SAAS,EAAE,CAAC;cAAEC,KAAK,EAAE5B,MAAM,GAAG7C,IAAI,CAAC0E,WAAW,CAAC;gBAAEC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;gBAAEC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;cAAE,CAAC,CAAC,GAAG;YAAE,CAAC;UACtG,CAAE;UAAAtG,QAAA,EAEDyE;QAAO,CACK;MAAC,CACP;IAAC,CACP,CAAC;EAAA,CACR,CAAC;AAEP","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _reactNative = require("@testing-library/react-native");
|
|
4
|
+
var _index = require("../../theme/index.js");
|
|
5
|
+
var _MenuButton = require("./MenuButton.js");
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
function wrap(ui) {
|
|
8
|
+
return (0, _reactNative.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ThemeProvider, {
|
|
9
|
+
children: ui
|
|
10
|
+
}));
|
|
11
|
+
}
|
|
12
|
+
const options = [{
|
|
13
|
+
key: 'a',
|
|
14
|
+
label: 'Edit'
|
|
15
|
+
}, {
|
|
16
|
+
key: 'b',
|
|
17
|
+
label: 'Delete',
|
|
18
|
+
destructive: true
|
|
19
|
+
}];
|
|
20
|
+
describe('MenuButton', () => {
|
|
21
|
+
it('is closed initially — options are not shown', () => {
|
|
22
|
+
wrap(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
23
|
+
options: options
|
|
24
|
+
}));
|
|
25
|
+
expect(_reactNative.screen.queryByText('Edit')).toBeNull();
|
|
26
|
+
});
|
|
27
|
+
it('opens on trigger press and shows the options', () => {
|
|
28
|
+
wrap(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
29
|
+
options: options
|
|
30
|
+
}));
|
|
31
|
+
_reactNative.fireEvent.press(_reactNative.screen.getByLabelText('More options'));
|
|
32
|
+
expect(_reactNative.screen.getByText('Edit')).toBeTruthy();
|
|
33
|
+
expect(_reactNative.screen.getByText('Delete')).toBeTruthy();
|
|
34
|
+
});
|
|
35
|
+
it('calls onSelect with the pressed key', () => {
|
|
36
|
+
const onSelect = jest.fn();
|
|
37
|
+
wrap(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
38
|
+
options: options,
|
|
39
|
+
onSelect: onSelect
|
|
40
|
+
}));
|
|
41
|
+
_reactNative.fireEvent.press(_reactNative.screen.getByLabelText('More options'));
|
|
42
|
+
_reactNative.fireEvent.press(_reactNative.screen.getByText('Edit'));
|
|
43
|
+
expect(onSelect).toHaveBeenCalledWith('a');
|
|
44
|
+
});
|
|
45
|
+
it('closes after selecting (closeOnSelect default)', () => {
|
|
46
|
+
wrap(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
47
|
+
options: options
|
|
48
|
+
}));
|
|
49
|
+
_reactNative.fireEvent.press(_reactNative.screen.getByLabelText('More options'));
|
|
50
|
+
_reactNative.fireEvent.press(_reactNative.screen.getByText('Edit'));
|
|
51
|
+
expect(_reactNative.screen.queryByText('Edit')).toBeNull();
|
|
52
|
+
});
|
|
53
|
+
it('closes when the backdrop is pressed', () => {
|
|
54
|
+
wrap(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
55
|
+
options: options
|
|
56
|
+
}));
|
|
57
|
+
_reactNative.fireEvent.press(_reactNative.screen.getByLabelText('More options'));
|
|
58
|
+
expect(_reactNative.screen.getByText('Edit')).toBeTruthy();
|
|
59
|
+
_reactNative.fireEvent.press(_reactNative.screen.getByLabelText('Close menu'));
|
|
60
|
+
expect(_reactNative.screen.queryByText('Edit')).toBeNull();
|
|
61
|
+
});
|
|
62
|
+
it('respects a custom trigger icon / label', () => {
|
|
63
|
+
wrap(/*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
64
|
+
options: options,
|
|
65
|
+
icon: "settings",
|
|
66
|
+
accessibilityLabel: "Row actions"
|
|
67
|
+
}));
|
|
68
|
+
expect(_reactNative.screen.getByLabelText('Row actions')).toBeTruthy();
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=Menu.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_index","_MenuButton","_jsxRuntime","wrap","ui","render","jsx","ThemeProvider","children","options","key","label","destructive","describe","it","MenuButton","expect","screen","queryByText","toBeNull","fireEvent","press","getByLabelText","getByText","toBeTruthy","onSelect","jest","fn","toHaveBeenCalledWith","icon","accessibilityLabel"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Menu/Menu.test.tsx"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAA0C,IAAAG,WAAA,GAAAH,OAAA;AAG1C,SAASI,IAAIA,CAACC,EAAsB,EAAE;EACpC,OAAO,IAAAC,mBAAM,eAAC,IAAAH,WAAA,CAAAI,GAAA,EAACN,MAAA,CAAAO,aAAa;IAAAC,QAAA,EAAEJ;EAAE,CAAgB,CAAC,CAAC;AACpD;AAEA,MAAMK,OAAwB,GAAG,CAC/B;EAAEC,GAAG,EAAE,GAAG;EAAEC,KAAK,EAAE;AAAO,CAAC,EAC3B;EAAED,GAAG,EAAE,GAAG;EAAEC,KAAK,EAAE,QAAQ;EAAEC,WAAW,EAAE;AAAK,CAAC,CACjD;AAEDC,QAAQ,CAAC,YAAY,EAAE,MAAM;EAC3BC,EAAE,CAAC,6CAA6C,EAAE,MAAM;IACtDX,IAAI,cAAC,IAAAD,WAAA,CAAAI,GAAA,EAACL,WAAA,CAAAc,UAAU;MAACN,OAAO,EAAEA;IAAQ,CAAE,CAAC,CAAC;IACtCO,MAAM,CAACC,mBAAM,CAACC,WAAW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KAAK,CAACJ,mBAAM,CAACM,SAAS,CAAC,MAAM,CAAC,CAAC;IACzCP,MAAM,CAACC,mBAAM,CAACC,WAAW,CAAC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC/C,CAAC,CAAC;EAEFL,EAAE,CAAC,qCAAqC,EAAE,MAAM;IAC9CX,IAAI,cAAC,IAAAD,WAAA,CAAAI,GAAA,EAACL,WAAA,CAAAc,UAAU;MAACN,OAAO,EAAEA;IAAQ,CAAE,CAAC,CAAC;IACtCW,sBAAS,CAACC,KAAK,CAACJ,mBAAM,CAACK,cAAc,CAAC,cAAc,CAAC,CAAC;IACtDN,MAAM,CAACC,mBAAM,CAACM,SAAS,CAAC,MAAM,CAAC,CAAC,CAACC,UAAU,CAAC,CAAC;IAC7CJ,sBAAS,CAACC,KAAK,CAACJ,mBAAM,CAACK,cAAc,CAAC,YAAY,CAAC,CAAC;IACpDN,MAAM,CAACC,mBAAM,CAACC,WAAW,CAAC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC/C,CAAC,CAAC;EAEFL,EAAE,CAAC,wCAAwC,EAAE,MAAM;IACjDX,IAAI,cAAC,IAAAD,WAAA,CAAAI,GAAA,EAACL,WAAA,CAAAc,UAAU;MAACN,OAAO,EAAEA,OAAQ;MAACoB,IAAI,EAAC,UAAU;MAACC,kBAAkB,EAAC;IAAa,CAAE,CAAC,CAAC;IACvFd,MAAM,CAACC,mBAAM,CAACK,cAAc,CAAC,aAAa,CAAC,CAAC,CAACE,UAAU,CAAC,CAAC;EAC3D,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MenuButton = MenuButton;
|
|
7
|
+
var _Dropdown = require("../Dropdown/Dropdown.js");
|
|
8
|
+
var _IconButton = require("../IconButton/IconButton.js");
|
|
9
|
+
var _Menu = require("./Menu.js");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
/**
|
|
12
|
+
* A "More"-style menu button — an `IconButton` that opens an anchored `Dropdown`.
|
|
13
|
+
* The first composed component built from `IconButton` + `Icon` + `Dropdown` +
|
|
14
|
+
* `Menu`. Placement is controlled by the two-origin model (`anchorOrigin` on the
|
|
15
|
+
* trigger, `menuOrigin` on the menu). Dismisses on outside press / back button.
|
|
16
|
+
*/
|
|
17
|
+
function MenuButton({
|
|
18
|
+
options,
|
|
19
|
+
onSelect,
|
|
20
|
+
icon = 'more',
|
|
21
|
+
accessibilityLabel = 'More options',
|
|
22
|
+
variant = 'secondary',
|
|
23
|
+
size = 'md',
|
|
24
|
+
shape = 'round',
|
|
25
|
+
disabled = false,
|
|
26
|
+
anchorOrigin = {
|
|
27
|
+
vertical: 'bottom',
|
|
28
|
+
horizontal: 'right'
|
|
29
|
+
},
|
|
30
|
+
menuOrigin = {
|
|
31
|
+
vertical: 'top',
|
|
32
|
+
horizontal: 'right'
|
|
33
|
+
},
|
|
34
|
+
offset = 8,
|
|
35
|
+
menuWidth,
|
|
36
|
+
showDividers,
|
|
37
|
+
closeOnSelect = true,
|
|
38
|
+
open,
|
|
39
|
+
onOpenChange
|
|
40
|
+
}) {
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Menu.Menu, {
|
|
42
|
+
anchorOrigin: anchorOrigin,
|
|
43
|
+
menuOrigin: menuOrigin,
|
|
44
|
+
offset: offset,
|
|
45
|
+
open: open,
|
|
46
|
+
onOpenChange: onOpenChange,
|
|
47
|
+
renderTrigger: ({
|
|
48
|
+
toggle
|
|
49
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButton.IconButton, {
|
|
50
|
+
icon: icon,
|
|
51
|
+
accessibilityLabel: accessibilityLabel,
|
|
52
|
+
variant: variant,
|
|
53
|
+
size: size,
|
|
54
|
+
shape: shape,
|
|
55
|
+
disabled: disabled,
|
|
56
|
+
onPress: toggle
|
|
57
|
+
}),
|
|
58
|
+
children: ({
|
|
59
|
+
close,
|
|
60
|
+
maxHeight
|
|
61
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.Dropdown, {
|
|
62
|
+
options: options,
|
|
63
|
+
width: menuWidth,
|
|
64
|
+
maxHeight: maxHeight,
|
|
65
|
+
showDividers: showDividers,
|
|
66
|
+
onSelect: key => {
|
|
67
|
+
onSelect?.(key);
|
|
68
|
+
if (closeOnSelect) close();
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=MenuButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_Dropdown","require","_IconButton","_Menu","_jsxRuntime","MenuButton","options","onSelect","icon","accessibilityLabel","variant","size","shape","disabled","anchorOrigin","vertical","horizontal","menuOrigin","offset","menuWidth","showDividers","closeOnSelect","open","onOpenChange","jsx","Menu","renderTrigger","toggle","IconButton","onPress","children","close","maxHeight","Dropdown","width","key"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Menu/MenuButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AAA+C,IAAAG,WAAA,GAAAH,OAAA;AAqC/C;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,UAAUA,CAAC;EACzBC,OAAO;EACPC,QAAQ;EACRC,IAAI,GAAG,MAAM;EACbC,kBAAkB,GAAG,cAAc;EACnCC,OAAO,GAAG,WAAW;EACrBC,IAAI,GAAG,IAAI;EACXC,KAAK,GAAG,OAAO;EACfC,QAAQ,GAAG,KAAK;EAChBC,YAAY,GAAG;IAAEC,QAAQ,EAAE,QAAQ;IAAEC,UAAU,EAAE;EAAQ,CAAC;EAC1DC,UAAU,GAA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Up = exports.More = exports.AnchorLeft = exports.Actions = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _MenuButton = require("./MenuButton.js");
|
|
10
|
+
var _Text = require("../Text/Text.js");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const meta = {
|
|
13
|
+
title: 'Components/MenuButton',
|
|
14
|
+
component: _MenuButton.MenuButton
|
|
15
|
+
};
|
|
16
|
+
var _default = exports.default = meta;
|
|
17
|
+
/** The "More" button from the mockup: a switch row + two plain options. */
|
|
18
|
+
const More = exports.More = {
|
|
19
|
+
render: () => {
|
|
20
|
+
const [showPhotos, setShowPhotos] = (0, _react.useState)(true);
|
|
21
|
+
const options = [{
|
|
22
|
+
key: 'photos',
|
|
23
|
+
label: 'Show product photos',
|
|
24
|
+
trailing: {
|
|
25
|
+
kind: 'switch',
|
|
26
|
+
value: showPhotos,
|
|
27
|
+
onChange: setShowPhotos
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
key: 'opt2',
|
|
31
|
+
label: 'Option 2'
|
|
32
|
+
}, {
|
|
33
|
+
key: 'opt3',
|
|
34
|
+
label: 'Option 3'
|
|
35
|
+
}];
|
|
36
|
+
return (
|
|
37
|
+
/*#__PURE__*/
|
|
38
|
+
// Right-aligned in a toolbar, as in the mockup.
|
|
39
|
+
(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
40
|
+
style: {
|
|
41
|
+
padding: 24,
|
|
42
|
+
height: 360,
|
|
43
|
+
alignItems: 'flex-end'
|
|
44
|
+
},
|
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
46
|
+
options: options,
|
|
47
|
+
menuWidth: 260,
|
|
48
|
+
onSelect: () => {}
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** Action menu with a destructive row. */
|
|
56
|
+
const Actions = exports.Actions = {
|
|
57
|
+
render: () => {
|
|
58
|
+
const options = [{
|
|
59
|
+
key: 'edit',
|
|
60
|
+
label: 'Edit',
|
|
61
|
+
leading: {
|
|
62
|
+
kind: 'icon',
|
|
63
|
+
name: 'edit'
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
key: 'duplicate',
|
|
67
|
+
label: 'Duplicate',
|
|
68
|
+
leading: {
|
|
69
|
+
kind: 'icon',
|
|
70
|
+
name: 'copy-01'
|
|
71
|
+
}
|
|
72
|
+
}, {
|
|
73
|
+
key: 'div',
|
|
74
|
+
type: 'divider'
|
|
75
|
+
}, {
|
|
76
|
+
key: 'delete',
|
|
77
|
+
label: 'Delete',
|
|
78
|
+
leading: {
|
|
79
|
+
kind: 'icon',
|
|
80
|
+
name: 'trash'
|
|
81
|
+
},
|
|
82
|
+
destructive: true
|
|
83
|
+
}];
|
|
84
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
85
|
+
style: {
|
|
86
|
+
padding: 24,
|
|
87
|
+
height: 320,
|
|
88
|
+
alignItems: 'flex-end'
|
|
89
|
+
},
|
|
90
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
91
|
+
options: options,
|
|
92
|
+
menuWidth: 240,
|
|
93
|
+
onSelect: () => {}
|
|
94
|
+
})
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** Left-anchored: menu drops below, left edges aligned. */
|
|
100
|
+
const AnchorLeft = exports.AnchorLeft = {
|
|
101
|
+
render: () => {
|
|
102
|
+
const options = ['Profile', 'Billing', 'Log out'].map(label => ({
|
|
103
|
+
key: label,
|
|
104
|
+
label
|
|
105
|
+
}));
|
|
106
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
107
|
+
style: {
|
|
108
|
+
padding: 24,
|
|
109
|
+
height: 320,
|
|
110
|
+
alignItems: 'flex-start'
|
|
111
|
+
},
|
|
112
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
113
|
+
options: options,
|
|
114
|
+
menuWidth: 240,
|
|
115
|
+
anchorOrigin: {
|
|
116
|
+
vertical: 'bottom',
|
|
117
|
+
horizontal: 'left'
|
|
118
|
+
},
|
|
119
|
+
menuOrigin: {
|
|
120
|
+
vertical: 'top',
|
|
121
|
+
horizontal: 'left'
|
|
122
|
+
},
|
|
123
|
+
onSelect: () => {}
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/** Opens upward (e.g. a button near the bottom of the screen). */
|
|
130
|
+
const OpenUp = exports.OpenUp = {
|
|
131
|
+
render: () => {
|
|
132
|
+
const options = ['One', 'Two', 'Three'].map(label => ({
|
|
133
|
+
key: label,
|
|
134
|
+
label
|
|
135
|
+
}));
|
|
136
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
137
|
+
style: {
|
|
138
|
+
padding: 24,
|
|
139
|
+
height: 320,
|
|
140
|
+
justifyContent: 'flex-end',
|
|
141
|
+
alignItems: 'flex-end'
|
|
142
|
+
},
|
|
143
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_MenuButton.MenuButton, {
|
|
144
|
+
options: options,
|
|
145
|
+
menuWidth: 220,
|
|
146
|
+
anchorOrigin: {
|
|
147
|
+
vertical: 'top',
|
|
148
|
+
horizontal: 'right'
|
|
149
|
+
},
|
|
150
|
+
menuOrigin: {
|
|
151
|
+
vertical: 'bottom',
|
|
152
|
+
horizontal: 'right'
|
|
153
|
+
},
|
|
154
|
+
onSelect: () => {}
|
|
155
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
|
|
156
|
+
variant: "caption",
|
|
157
|
+
color: "secondary",
|
|
158
|
+
style: {
|
|
159
|
+
marginTop: 8
|
|
160
|
+
},
|
|
161
|
+
children: "anchor top/right \xB7 menu bottom/right"
|
|
162
|
+
})]
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=MenuButton.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_MenuButton","_Text","_jsxRuntime","meta","title","component","MenuButton","_default","exports","default","More","render","showPhotos","setShowPhotos","useState","options","key","label","trailing","kind","value","onChange","jsx","View","style","padding","height","alignItems","children","menuWidth","onSelect","Actions","leading","name","type","destructive","AnchorLeft","map","anchorOrigin","vertical","horizontal","menuOrigin","OpenUp","jsxs","justifyContent","Text","variant","color","marginTop"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Menu/MenuButton.stories.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AAAoC,IAAAI,WAAA,GAAAJ,OAAA;AAEpC,MAAMK,IAAI,GAAG;EACXC,KAAK,EAAE,uBAAuB;EAC9BC,SAAS,EAAEC;AACb,CAAmC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAErBN,IAAI;AAGnB;AACO,MAAMO,IAAW,GAAAF,OAAA,CAAAE,IAAA,GAAG;EACzBC,MAAM,EAAEA,CAAA,KAAM;IACZ,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAC,eAAQ,EAAC,IAAI,CAAC;IAClD,MAAMC,OAAwB,GAAG,CAC/B;MACEC,GAAG,EAAE,QAAQ;MACbC,KAAK,EAAE,qBAAqB;MAC5BC,QAAQ,EAAE;QAAEC,IAAI,EAAE,QAAQ;QAAEC,KAAK,EAAER,UAAU;QAAES,QAAQ,EAAER;MAAc;IACzE,CAAC,EACD;MAAEG,GAAG,EAAE,MAAM;MAAEC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