@tamagui/select 1.0.0-beta.11
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/Select.js +451 -0
- package/dist/cjs/Select.js.map +7 -0
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/esm/Select.js +391 -0
- package/dist/esm/Select.js.map +7 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/jsx/Select.js +301 -0
- package/dist/jsx/index.js +1 -0
- package/package.json +48 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import {
|
|
4
|
+
offset,
|
|
5
|
+
useFloating
|
|
6
|
+
} from "@floating-ui/react-dom-interactions";
|
|
7
|
+
import { usePrevious } from "@radix-ui/react-use-previous";
|
|
8
|
+
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
9
|
+
import { composeEventHandlers, useIsomorphicLayoutEffect } from "@tamagui/core";
|
|
10
|
+
import { useId } from "@tamagui/core";
|
|
11
|
+
import { createContextScope } from "@tamagui/create-context";
|
|
12
|
+
import { Separator } from "@tamagui/separator";
|
|
13
|
+
import { XStack } from "@tamagui/stacks";
|
|
14
|
+
import { useControllableState } from "@tamagui/use-controllable-state";
|
|
15
|
+
import * as React from "react";
|
|
16
|
+
import * as ReactDOM from "react-dom";
|
|
17
|
+
const OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
18
|
+
const SELECTION_KEYS = [" ", "Enter"];
|
|
19
|
+
const SELECT_NAME = "Select";
|
|
20
|
+
const WINDOW_PADDING = 8;
|
|
21
|
+
const SCROLL_ARROW_VELOCITY = 8;
|
|
22
|
+
const SCROLL_ARROW_THRESHOLD = 8;
|
|
23
|
+
const MIN_HEIGHT = 80;
|
|
24
|
+
const FALLBACK_THRESHOLD = 16;
|
|
25
|
+
const [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME);
|
|
26
|
+
const [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME);
|
|
27
|
+
const Select = /* @__PURE__ */ __name((props) => {
|
|
28
|
+
const {
|
|
29
|
+
__scopeSelect,
|
|
30
|
+
children,
|
|
31
|
+
open: openProp,
|
|
32
|
+
defaultOpen,
|
|
33
|
+
onOpenChange,
|
|
34
|
+
value: valueProp,
|
|
35
|
+
defaultValue,
|
|
36
|
+
onValueChange,
|
|
37
|
+
dir: dir2,
|
|
38
|
+
name,
|
|
39
|
+
autoComplete
|
|
40
|
+
} = props;
|
|
41
|
+
const [open, setOpen] = useControllableState({
|
|
42
|
+
prop: openProp,
|
|
43
|
+
defaultProp: defaultOpen || false,
|
|
44
|
+
onChange: onOpenChange
|
|
45
|
+
});
|
|
46
|
+
const [value, setValue] = useControllableState({
|
|
47
|
+
prop: valueProp,
|
|
48
|
+
defaultProp: defaultValue || "",
|
|
49
|
+
onChange: onValueChange
|
|
50
|
+
});
|
|
51
|
+
const selectedIndexRef = React.useRef(null);
|
|
52
|
+
const activeIndexRef = React.useRef(null);
|
|
53
|
+
const prevActiveIndex = usePrevious(activeIndex);
|
|
54
|
+
const [showArrows, setShowArrows] = React.useState(false);
|
|
55
|
+
const [scrollTop, setScrollTop] = React.useState(0);
|
|
56
|
+
const [activeIndex, setActiveIndex] = React.useState(null);
|
|
57
|
+
const [selectedIndex, setSelectedIndex] = React.useState(Math.max(0, listContentRef.current.indexOf(value)));
|
|
58
|
+
useIsomorphicLayoutEffect(() => {
|
|
59
|
+
selectedIndexRef.current = selectedIndex;
|
|
60
|
+
activeIndexRef.current = activeIndex;
|
|
61
|
+
});
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
const frame = requestAnimationFrame(() => {
|
|
64
|
+
setShowArrows(open);
|
|
65
|
+
if (!open) {
|
|
66
|
+
setScrollTop(0);
|
|
67
|
+
setMiddlewareType("align");
|
|
68
|
+
setActiveIndex(null);
|
|
69
|
+
setControlledScrolling(false);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return () => cancelAnimationFrame(frame);
|
|
73
|
+
}, [open]);
|
|
74
|
+
const showUpArrow = showArrows && scrollTop > SCROLL_ARROW_THRESHOLD;
|
|
75
|
+
const showDownArrow = showArrows && floatingRef.current && scrollTop < floatingRef.current.scrollHeight - floatingRef.current.clientHeight - SCROLL_ARROW_THRESHOLD;
|
|
76
|
+
return <SelectProvider scope={__scopeSelect} open={open}>{children}</SelectProvider>;
|
|
77
|
+
}, "Select");
|
|
78
|
+
Select.displayName = SELECT_NAME;
|
|
79
|
+
const TRIGGER_NAME = "SelectTrigger";
|
|
80
|
+
const SelectTrigger = React.forwardRef((props, forwardedRef) => {
|
|
81
|
+
const {
|
|
82
|
+
__scopeSelect,
|
|
83
|
+
disabled = false,
|
|
84
|
+
"aria-labelledby": ariaLabelledby,
|
|
85
|
+
...triggerProps
|
|
86
|
+
} = props;
|
|
87
|
+
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
88
|
+
const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
|
|
89
|
+
const getItems = useCollection(__scopeSelect);
|
|
90
|
+
const handleOpen = /* @__PURE__ */ __name(() => {
|
|
91
|
+
if (!disabled) {
|
|
92
|
+
context.onOpenChange(true);
|
|
93
|
+
resetTypeahead();
|
|
94
|
+
}
|
|
95
|
+
}, "handleOpen");
|
|
96
|
+
return <Primitive.button type="button" role="combobox" aria-controls={context.contentId} aria-expanded={context.open} aria-autocomplete="none" dir={context.dir} disabled={disabled} data-disabled={disabled ? "" : void 0} {...triggerProps} ref={composedRefs} onPointerDown={composeEventHandlers(triggerProps.onPointerDown, (event) => {
|
|
97
|
+
;
|
|
98
|
+
event.target.releasePointerCapture(event.pointerId);
|
|
99
|
+
if (event.button === 0 && event.ctrlKey === false) {
|
|
100
|
+
handleOpen();
|
|
101
|
+
context.triggerPointerDownPosRef.current = {
|
|
102
|
+
x: Math.round(event.pageX),
|
|
103
|
+
y: Math.round(event.pageY)
|
|
104
|
+
};
|
|
105
|
+
event.preventDefault();
|
|
106
|
+
}
|
|
107
|
+
})} onKeyDown={composeEventHandlers(triggerProps.onKeyDown, (event) => {
|
|
108
|
+
const isTypingAhead = searchRef.current !== "";
|
|
109
|
+
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
110
|
+
if (!isModifierKey && event.key.length === 1)
|
|
111
|
+
handleTypeaheadSearch(event.key);
|
|
112
|
+
if (isTypingAhead && event.key === " ")
|
|
113
|
+
return;
|
|
114
|
+
if (OPEN_KEYS.includes(event.key)) {
|
|
115
|
+
handleOpen();
|
|
116
|
+
event.preventDefault();
|
|
117
|
+
}
|
|
118
|
+
})} />;
|
|
119
|
+
});
|
|
120
|
+
SelectTrigger.displayName = TRIGGER_NAME;
|
|
121
|
+
const VALUE_NAME = "SelectValue";
|
|
122
|
+
const SelectValue = React.forwardRef((props, forwardedRef) => {
|
|
123
|
+
const { __scopeSelect, className, style, ...valueProps } = props;
|
|
124
|
+
return <XStack {...valueProps} pointerEvents="none" />;
|
|
125
|
+
});
|
|
126
|
+
const ICON_NAME = "SelectIcon";
|
|
127
|
+
const SelectIcon = React.forwardRef((props, forwardedRef) => {
|
|
128
|
+
const { __scopeSelect, children, ...iconProps } = props;
|
|
129
|
+
return <XStack aria-hidden {...iconProps} ref={forwardedRef}>{children || "\u25BC"}</XStack>;
|
|
130
|
+
});
|
|
131
|
+
SelectIcon.displayName = ICON_NAME;
|
|
132
|
+
const CONTENT_NAME = "SelectContent";
|
|
133
|
+
const SelectContent = React.forwardRef((props, forwardedRef) => {
|
|
134
|
+
const context = useSelectContext(CONTENT_NAME, props.__scopeSelect);
|
|
135
|
+
return props.children;
|
|
136
|
+
});
|
|
137
|
+
const GROUP_NAME = "SelectGroup";
|
|
138
|
+
const [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
139
|
+
const SelectGroup = React.forwardRef((props, forwardedRef) => {
|
|
140
|
+
const { __scopeSelect, ...groupProps } = props;
|
|
141
|
+
const groupId = useId();
|
|
142
|
+
return <SelectGroupContextProvider scope={__scopeSelect} id={groupId}><Primitive.div role="group" aria-labelledby={groupId} {...groupProps} ref={forwardedRef} /></SelectGroupContextProvider>;
|
|
143
|
+
});
|
|
144
|
+
SelectGroup.displayName = GROUP_NAME;
|
|
145
|
+
const LABEL_NAME = "SelectLabel";
|
|
146
|
+
const SelectLabel = React.forwardRef((props, forwardedRef) => {
|
|
147
|
+
const { __scopeSelect, ...labelProps } = props;
|
|
148
|
+
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
149
|
+
return <Primitive.div id={groupContext.id} {...labelProps} ref={forwardedRef} />;
|
|
150
|
+
});
|
|
151
|
+
SelectLabel.displayName = LABEL_NAME;
|
|
152
|
+
const ITEM_NAME = "SelectItem";
|
|
153
|
+
const [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
154
|
+
const SelectItem = React.forwardRef((props, forwardedRef) => {
|
|
155
|
+
const { __scopeSelect, value, disabled = false, textValue: textValueProp, ...itemProps } = props;
|
|
156
|
+
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
157
|
+
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
158
|
+
const isSelected = context.value === value;
|
|
159
|
+
const [textValue, setTextValue] = React.useState(textValueProp != null ? textValueProp : "");
|
|
160
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
161
|
+
const composedRefs = useComposedRefs(forwardedRef, isSelected ? contentContext.onSelectedItemChange : void 0);
|
|
162
|
+
const textId = useId();
|
|
163
|
+
const handleSelect = /* @__PURE__ */ __name(() => {
|
|
164
|
+
if (!disabled) {
|
|
165
|
+
context.onValueChange(value);
|
|
166
|
+
context.onOpenChange(false);
|
|
167
|
+
}
|
|
168
|
+
}, "handleSelect");
|
|
169
|
+
return <SelectItemContextProvider scope={__scopeSelect} value={value} textId={textId} isSelected={isSelected} onItemTextChange={React.useCallback((node) => {
|
|
170
|
+
setTextValue((prevTextValue) => {
|
|
171
|
+
var _a;
|
|
172
|
+
return prevTextValue || ((_a = node == null ? void 0 : node.textContent) != null ? _a : "").trim();
|
|
173
|
+
});
|
|
174
|
+
}, [])}><Collection.ItemSlot scope={__scopeSelect} value={value} disabled={disabled} textValue={textValue}><Primitive.div role="option" aria-labelledby={textId} aria-selected={isSelected && isFocused} data-state={isSelected ? "active" : "inactive"} aria-disabled={disabled || void 0} data-disabled={disabled ? "" : void 0} tabIndex={disabled ? void 0 : -1} {...itemProps} ref={composedRefs} onFocus={composeEventHandlers(itemProps.onFocus, () => setIsFocused(true))} onBlur={composeEventHandlers(itemProps.onBlur, () => setIsFocused(false))} onPointerUp={composeEventHandlers(itemProps.onPointerUp, handleSelect)} onPointerMove={composeEventHandlers(itemProps.onPointerMove, (event) => {
|
|
175
|
+
if (disabled) {
|
|
176
|
+
contentContext.onItemLeave();
|
|
177
|
+
} else {
|
|
178
|
+
event.currentTarget.focus({ preventScroll: true });
|
|
179
|
+
}
|
|
180
|
+
})} onPointerLeave={composeEventHandlers(itemProps.onPointerLeave, (event) => {
|
|
181
|
+
if (event.currentTarget === document.activeElement) {
|
|
182
|
+
contentContext.onItemLeave();
|
|
183
|
+
}
|
|
184
|
+
})} onKeyDown={composeEventHandlers(itemProps.onKeyDown, (event) => {
|
|
185
|
+
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
186
|
+
if (isTypingAhead && event.key === " ")
|
|
187
|
+
return;
|
|
188
|
+
if (SELECTION_KEYS.includes(event.key))
|
|
189
|
+
handleSelect();
|
|
190
|
+
if (event.key === " ")
|
|
191
|
+
event.preventDefault();
|
|
192
|
+
})} /></Collection.ItemSlot></SelectItemContextProvider>;
|
|
193
|
+
});
|
|
194
|
+
SelectItem.displayName = ITEM_NAME;
|
|
195
|
+
const ITEM_TEXT_NAME = "SelectItemText";
|
|
196
|
+
const SelectItemText = React.forwardRef((props, forwardedRef) => {
|
|
197
|
+
var _a;
|
|
198
|
+
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
199
|
+
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
200
|
+
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
201
|
+
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
202
|
+
const ref = React.useRef(null);
|
|
203
|
+
const composedRefs = useComposedRefs(forwardedRef, ref, itemContext.onItemTextChange, itemContext.isSelected ? contentContext.onSelectedItemTextChange : void 0);
|
|
204
|
+
return <>
|
|
205
|
+
<Primitive.span id={itemContext.textId} {...itemTextProps} ref={composedRefs} />
|
|
206
|
+
{itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null}
|
|
207
|
+
{context.bubbleSelect ? ReactDOM.createPortal(<option value={itemContext.value}>{(_a = ref.current) == null ? void 0 : _a.textContent}</option>, context.bubbleSelect) : null}
|
|
208
|
+
</>;
|
|
209
|
+
});
|
|
210
|
+
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
211
|
+
const ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
212
|
+
const SelectItemIndicator = React.forwardRef((props, forwardedRef) => {
|
|
213
|
+
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
214
|
+
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
215
|
+
return itemContext.isSelected ? <Primitive.span aria-hidden {...itemIndicatorProps} ref={forwardedRef} /> : null;
|
|
216
|
+
});
|
|
217
|
+
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
218
|
+
const SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
219
|
+
const SelectScrollUpButton = React.forwardRef((props, forwardedRef) => {
|
|
220
|
+
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
221
|
+
const [canScrollUp, setCanScrollUp] = React.useState(false);
|
|
222
|
+
const composedRefs = useComposedRefs(forwardedRef, contentContext.onScrollButtonChange);
|
|
223
|
+
return canScrollUp ? <SelectScrollButtonImpl {...props} ref={composedRefs} onAutoScroll={() => {
|
|
224
|
+
const { viewport, selectedItem } = contentContext;
|
|
225
|
+
if (viewport && selectedItem) {
|
|
226
|
+
viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;
|
|
227
|
+
}
|
|
228
|
+
}} /> : null;
|
|
229
|
+
});
|
|
230
|
+
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
231
|
+
const SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
232
|
+
const SelectScrollDownButton = React.forwardRef((props, forwardedRef) => {
|
|
233
|
+
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
234
|
+
const [canScrollDown, setCanScrollDown] = React.useState(false);
|
|
235
|
+
const composedRefs = useComposedRefs(forwardedRef, contentContext.onScrollButtonChange);
|
|
236
|
+
return canScrollDown ? <SelectScrollButtonImpl {...props} ref={composedRefs} onAutoScroll={() => {
|
|
237
|
+
const { viewport, selectedItem } = contentContext;
|
|
238
|
+
if (viewport && selectedItem) {
|
|
239
|
+
viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;
|
|
240
|
+
}
|
|
241
|
+
}} /> : null;
|
|
242
|
+
});
|
|
243
|
+
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
244
|
+
const SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => {
|
|
245
|
+
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
246
|
+
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
247
|
+
const autoScrollTimerRef = React.useRef(null);
|
|
248
|
+
const intervalRef = React.useRef();
|
|
249
|
+
const loopingRef = React.useRef(false);
|
|
250
|
+
const { x, y, reference, floating, strategy, update, refs } = useFloating({
|
|
251
|
+
strategy: "fixed",
|
|
252
|
+
placement: dir === "up" ? "top" : "bottom",
|
|
253
|
+
middleware: [offset(({ floating: floating2 }) => -floating2.height)]
|
|
254
|
+
});
|
|
255
|
+
return <Primitive.div aria-hidden {...scrollIndicatorProps} ref={forwardedRef} style={{ flexShrink: 0, ...scrollIndicatorProps.style }} onPointerMove={composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {
|
|
256
|
+
contentContext.onItemLeave();
|
|
257
|
+
if (autoScrollTimerRef.current === null) {
|
|
258
|
+
autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
|
259
|
+
}
|
|
260
|
+
})} onPointerLeave={composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {
|
|
261
|
+
clearAutoScrollTimer();
|
|
262
|
+
})} />;
|
|
263
|
+
});
|
|
264
|
+
const SEPARATOR_NAME = "SelectSeparator";
|
|
265
|
+
const SelectSeparator = Separator;
|
|
266
|
+
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
267
|
+
const BubbleSelect = React.forwardRef((props, forwardedRef) => {
|
|
268
|
+
const { value, ...selectProps } = props;
|
|
269
|
+
const ref = React.useRef(null);
|
|
270
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
271
|
+
const prevValue = usePrevious(value);
|
|
272
|
+
React.useEffect(() => {
|
|
273
|
+
const select = ref.current;
|
|
274
|
+
const selectProto = window.HTMLSelectElement.prototype;
|
|
275
|
+
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
276
|
+
const setValue = descriptor.set;
|
|
277
|
+
if (prevValue !== value && setValue) {
|
|
278
|
+
const event = new Event("change", { bubbles: true });
|
|
279
|
+
setValue.call(select, value);
|
|
280
|
+
select.dispatchEvent(event);
|
|
281
|
+
}
|
|
282
|
+
}, [prevValue, value]);
|
|
283
|
+
return null;
|
|
284
|
+
return <VisuallyHidden asChild><select {...selectProps} ref={composedRefs} defaultValue={value} /></VisuallyHidden>;
|
|
285
|
+
});
|
|
286
|
+
export {
|
|
287
|
+
Select,
|
|
288
|
+
SelectContent,
|
|
289
|
+
SelectGroup,
|
|
290
|
+
SelectIcon,
|
|
291
|
+
SelectItem,
|
|
292
|
+
SelectItemIndicator,
|
|
293
|
+
SelectItemText,
|
|
294
|
+
SelectLabel,
|
|
295
|
+
SelectScrollDownButton,
|
|
296
|
+
SelectScrollUpButton,
|
|
297
|
+
SelectSeparator,
|
|
298
|
+
SelectTrigger,
|
|
299
|
+
SelectValue,
|
|
300
|
+
createSelectScope
|
|
301
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Select";
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tamagui/select",
|
|
3
|
+
"version": "1.0.0-beta.11",
|
|
4
|
+
"sideEffects": true,
|
|
5
|
+
"source": "src/index.ts",
|
|
6
|
+
"typings": "types",
|
|
7
|
+
"main": "dist/cjs",
|
|
8
|
+
"module": "dist/esm",
|
|
9
|
+
"module:jsx": "dist/jsx",
|
|
10
|
+
"files": [
|
|
11
|
+
"types",
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tamagui-build",
|
|
16
|
+
"watch": "tamagui-build --watch",
|
|
17
|
+
"clean": "tamagui-build clean",
|
|
18
|
+
"clean:build": "tamagui-build clean:build"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@floating-ui/react-dom": "0.7.0",
|
|
22
|
+
"@floating-ui/react-dom-interactions": "^0.4.0",
|
|
23
|
+
"@floating-ui/react-native": "^0.7.0",
|
|
24
|
+
"@radix-ui/react-use-callback-ref": "^0.1.0",
|
|
25
|
+
"@radix-ui/react-use-previous": "^0.1.1",
|
|
26
|
+
"@tamagui/compose-refs": "^1.0.0-beta.11",
|
|
27
|
+
"@tamagui/core": "^1.0.0-beta.11",
|
|
28
|
+
"@tamagui/create-context": "^1.0.0-beta.11",
|
|
29
|
+
"@tamagui/separator": "^1.0.0-beta.11",
|
|
30
|
+
"@tamagui/stacks": "^1.0.0-beta.11",
|
|
31
|
+
"@tamagui/use-controllable-state": "^1.0.0-beta.11"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": "*",
|
|
35
|
+
"react-dom": "*",
|
|
36
|
+
"react-native": "*"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@tamagui/build": "^1.0.0-beta.11",
|
|
40
|
+
"@types/react-native": "^0.67.3",
|
|
41
|
+
"react": "*",
|
|
42
|
+
"react-dom": "*",
|
|
43
|
+
"react-native": "*"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}
|