tamagui 1.116.1 → 1.116.3
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/createTamagui.js +68 -0
- package/dist/cjs/helpers/inputHelpers.js +50 -0
- package/dist/cjs/index.js +133 -0
- package/dist/cjs/linear-gradient.js +15 -0
- package/dist/cjs/react-native-web/Dimensions.js +79 -0
- package/dist/cjs/setup.js +23 -0
- package/dist/cjs/viewTypes.js +14 -0
- package/dist/cjs/views/Anchor.js +42 -0
- package/dist/cjs/views/EnsureFlexed.js +31 -0
- package/dist/cjs/views/Fieldset.js +33 -0
- package/dist/cjs/views/Input.js +103 -0
- package/dist/cjs/views/Skeleton.js +1 -0
- package/dist/cjs/views/Spinner.js +41 -0
- package/dist/cjs/views/TamaguiProvider.js +22 -0
- package/dist/cjs/views/TamaguiProvider.server.js +22 -0
- package/dist/cjs/views/Text.js +33 -0
- package/dist/cjs/views/TextArea.js +58 -0
- package/dist/cjs/views/VisuallyHidden.js +53 -0
- package/dist/native.js +4 -4
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +3 -3
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
- package/dist/cjs/lib/linear-gradient.native.cjs +0 -18
- package/dist/cjs/lib/linear-gradient.native.cjs.map +0 -6
- /package/dist/cjs/{createTamagui.cjs.map → createTamagui.js.map} +0 -0
- /package/dist/cjs/helpers/{inputHelpers.cjs.map → inputHelpers.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{linear-gradient.cjs.map → linear-gradient.js.map} +0 -0
- /package/dist/cjs/react-native-web/{Dimensions.cjs.map → Dimensions.js.map} +0 -0
- /package/dist/cjs/{setup.cjs.map → setup.js.map} +0 -0
- /package/dist/cjs/{viewTypes.cjs.map → viewTypes.js.map} +0 -0
- /package/dist/cjs/views/{Anchor.cjs.map → Anchor.js.map} +0 -0
- /package/dist/cjs/views/{EnsureFlexed.cjs.map → EnsureFlexed.js.map} +0 -0
- /package/dist/cjs/views/{Fieldset.cjs.map → Fieldset.js.map} +0 -0
- /package/dist/cjs/views/{Input.cjs.map → Input.js.map} +0 -0
- /package/dist/cjs/views/{Skeleton.cjs.map → Skeleton.js.map} +0 -0
- /package/dist/cjs/views/{Spinner.cjs.map → Spinner.js.map} +0 -0
- /package/dist/cjs/views/{TamaguiProvider.cjs.map → TamaguiProvider.js.map} +0 -0
- /package/dist/cjs/views/{TamaguiProvider.server.cjs.map → TamaguiProvider.server.js.map} +0 -0
- /package/dist/cjs/views/{Text.cjs.map → Text.js.map} +0 -0
- /package/dist/cjs/views/{TextArea.cjs.map → TextArea.js.map} +0 -0
- /package/dist/cjs/views/{VisuallyHidden.cjs.map → VisuallyHidden.js.map} +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var createTamagui_exports = {};
|
|
16
|
+
__export(createTamagui_exports, {
|
|
17
|
+
createTamagui: () => createTamagui
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(createTamagui_exports);
|
|
20
|
+
var import_core = require("@tamagui/core");
|
|
21
|
+
const createTamagui = process.env.NODE_ENV !== "development" ? import_core.createTamagui : (conf) => {
|
|
22
|
+
const sizeTokenKeys = ["$true"], hasKeys = (expectedKeys, obj) => expectedKeys.every((k) => typeof obj[k] < "u"), tamaguiConfig = (0, import_core.createTamagui)(conf);
|
|
23
|
+
for (const name of ["size", "space"]) {
|
|
24
|
+
const tokenSet = tamaguiConfig.tokensParsed[name];
|
|
25
|
+
if (!tokenSet)
|
|
26
|
+
throw new Error(
|
|
27
|
+
`Expected tokens for "${name}" in ${Object.keys(
|
|
28
|
+
tamaguiConfig.tokensParsed
|
|
29
|
+
).join(", ")}`
|
|
30
|
+
);
|
|
31
|
+
if (!hasKeys(sizeTokenKeys, tokenSet))
|
|
32
|
+
throw new Error(`
|
|
33
|
+
createTamagui() missing expected tokens.${name}:
|
|
34
|
+
|
|
35
|
+
Received: ${Object.keys(tokenSet).join(", ")}
|
|
36
|
+
|
|
37
|
+
Expected: ${sizeTokenKeys.join(", ")}
|
|
38
|
+
|
|
39
|
+
Tamagui expects a "true" key that is the same value as your default size. This is so
|
|
40
|
+
it can size things up or down from the defaults without assuming which keys you use.
|
|
41
|
+
|
|
42
|
+
Please define a "true" or "$true" key on your size and space tokens like so (example):
|
|
43
|
+
|
|
44
|
+
size: {
|
|
45
|
+
sm: 2,
|
|
46
|
+
md: 10,
|
|
47
|
+
true: 10, // this means "md" is your default size
|
|
48
|
+
lg: 20,
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
`);
|
|
52
|
+
}
|
|
53
|
+
const expected = Object.keys(tamaguiConfig.tokensParsed.size);
|
|
54
|
+
for (const name of ["radius", "zIndex"]) {
|
|
55
|
+
const tokenSet = tamaguiConfig.tokensParsed[name], received = Object.keys(tokenSet);
|
|
56
|
+
if (!received.some((rk) => expected.includes(rk)))
|
|
57
|
+
throw new Error(`
|
|
58
|
+
createTamagui() invalid tokens.${name}:
|
|
59
|
+
|
|
60
|
+
Received: ${received.join(", ")}
|
|
61
|
+
|
|
62
|
+
Expected a subset of: ${expected.join(", ")}
|
|
63
|
+
|
|
64
|
+
`);
|
|
65
|
+
}
|
|
66
|
+
return tamaguiConfig;
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=createTamagui.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var inputHelpers_exports = {};
|
|
16
|
+
__export(inputHelpers_exports, {
|
|
17
|
+
inputSizeVariant: () => inputSizeVariant,
|
|
18
|
+
textAreaSizeVariant: () => textAreaSizeVariant
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(inputHelpers_exports);
|
|
21
|
+
var import_core = require("@tamagui/core"), import_get_button_sized = require("@tamagui/get-button-sized"), import_get_font_sized = require("@tamagui/get-font-sized"), import_get_token = require("@tamagui/get-token");
|
|
22
|
+
const inputSizeVariant = (val = "$true", extras) => {
|
|
23
|
+
if (extras.props.multiline || extras.props.numberOfLines > 1)
|
|
24
|
+
return textAreaSizeVariant(val, extras);
|
|
25
|
+
const buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
26
|
+
shift: -1,
|
|
27
|
+
bounds: [2]
|
|
28
|
+
}), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
|
|
29
|
+
return !import_core.isWeb && fontStyle && delete fontStyle.lineHeight, {
|
|
30
|
+
...fontStyle,
|
|
31
|
+
...buttonStyles,
|
|
32
|
+
paddingHorizontal
|
|
33
|
+
};
|
|
34
|
+
}, textAreaSizeVariant = (val = "$true", extras) => {
|
|
35
|
+
const { props } = extras, buttonStyles = (0, import_get_button_sized.getButtonSized)(val, extras), fontStyle = (0, import_get_font_sized.getFontSized)(val, extras), lines = props.rows ?? props.numberOfLines, height = typeof lines == "number" ? lines * (0, import_core.getVariableValue)(fontStyle.lineHeight) : "auto", paddingVertical = (0, import_get_token.getSpace)(val, {
|
|
36
|
+
shift: -2,
|
|
37
|
+
bounds: [2]
|
|
38
|
+
}), paddingHorizontal = (0, import_get_token.getSpace)(val, {
|
|
39
|
+
shift: -1,
|
|
40
|
+
bounds: [2]
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
...buttonStyles,
|
|
44
|
+
...fontStyle,
|
|
45
|
+
paddingVertical,
|
|
46
|
+
paddingHorizontal,
|
|
47
|
+
height
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=inputHelpers.js.map
|
|
@@ -0,0 +1,133 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var src_exports = {};
|
|
16
|
+
__export(src_exports, {
|
|
17
|
+
ComponentContext: () => import_core.ComponentContext,
|
|
18
|
+
Configuration: () => import_core.Configuration,
|
|
19
|
+
FontLanguage: () => import_core.FontLanguage,
|
|
20
|
+
Spacer: () => import_core.Spacer,
|
|
21
|
+
Stack: () => import_core.Stack,
|
|
22
|
+
Theme: () => import_core.Theme,
|
|
23
|
+
Unspaced: () => import_core.Unspaced,
|
|
24
|
+
View: () => import_core.View,
|
|
25
|
+
createComponent: () => import_core.createComponent,
|
|
26
|
+
createFont: () => import_core.createFont,
|
|
27
|
+
createShorthands: () => import_core.createShorthands,
|
|
28
|
+
createStyledContext: () => import_core.createStyledContext,
|
|
29
|
+
createTheme: () => import_core.createTheme,
|
|
30
|
+
createTokens: () => import_core.createTokens,
|
|
31
|
+
createVariable: () => import_core.createVariable,
|
|
32
|
+
getConfig: () => import_core.getConfig,
|
|
33
|
+
getMedia: () => import_core.getMedia,
|
|
34
|
+
getStylesAtomic: () => import_core.getStylesAtomic,
|
|
35
|
+
getThemes: () => import_core.getThemes,
|
|
36
|
+
getToken: () => import_core.getToken,
|
|
37
|
+
getTokenValue: () => import_core.getTokenValue,
|
|
38
|
+
getTokens: () => import_core.getTokens,
|
|
39
|
+
getVariable: () => import_core.getVariable,
|
|
40
|
+
getVariableName: () => import_core.getVariableName,
|
|
41
|
+
getVariableValue: () => import_core.getVariableValue,
|
|
42
|
+
insertFont: () => import_core.insertFont,
|
|
43
|
+
isChrome: () => import_core.isChrome,
|
|
44
|
+
isClient: () => import_core.isClient,
|
|
45
|
+
isServer: () => import_core.isServer,
|
|
46
|
+
isTamaguiComponent: () => import_core.isTamaguiComponent,
|
|
47
|
+
isTamaguiElement: () => import_core.isTamaguiElement,
|
|
48
|
+
isTouchable: () => import_core.isTouchable,
|
|
49
|
+
isVariable: () => import_core.isVariable,
|
|
50
|
+
isWeb: () => import_core.isWeb,
|
|
51
|
+
isWebTouchable: () => import_core.isWebTouchable,
|
|
52
|
+
matchMedia: () => import_core.matchMedia,
|
|
53
|
+
mediaObjectToString: () => import_core.mediaObjectToString,
|
|
54
|
+
mediaQueryConfig: () => import_core.mediaQueryConfig,
|
|
55
|
+
mediaState: () => import_core.mediaState,
|
|
56
|
+
setConfig: () => import_core.setConfig,
|
|
57
|
+
setupDev: () => import_core.setupDev,
|
|
58
|
+
setupReactNative: () => import_core.setupReactNative,
|
|
59
|
+
spacedChildren: () => import_core.spacedChildren,
|
|
60
|
+
styled: () => import_core.styled,
|
|
61
|
+
themeable: () => import_core.themeable,
|
|
62
|
+
useConfiguration: () => import_core.useConfiguration,
|
|
63
|
+
useDidFinishSSR: () => import_core.useDidFinishSSR,
|
|
64
|
+
useEvent: () => import_core.useEvent,
|
|
65
|
+
useGet: () => import_core.useGet,
|
|
66
|
+
useIsTouchDevice: () => import_core.useIsTouchDevice,
|
|
67
|
+
useIsomorphicLayoutEffect: () => import_core.useIsomorphicLayoutEffect,
|
|
68
|
+
useMedia: () => import_core.useMedia,
|
|
69
|
+
useProps: () => import_core.useProps,
|
|
70
|
+
usePropsAndStyle: () => import_core.usePropsAndStyle,
|
|
71
|
+
useStyle: () => import_core.useStyle,
|
|
72
|
+
useTheme: () => import_core.useTheme,
|
|
73
|
+
useThemeName: () => import_core.useThemeName,
|
|
74
|
+
variableToString: () => import_core.variableToString,
|
|
75
|
+
withStaticProperties: () => import_core.withStaticProperties
|
|
76
|
+
});
|
|
77
|
+
module.exports = __toCommonJS(src_exports);
|
|
78
|
+
var import_setup = require("./setup");
|
|
79
|
+
__reExport(src_exports, require("@tamagui/accordion"), module.exports);
|
|
80
|
+
__reExport(src_exports, require("@tamagui/adapt"), module.exports);
|
|
81
|
+
__reExport(src_exports, require("@tamagui/alert-dialog"), module.exports);
|
|
82
|
+
__reExport(src_exports, require("@tamagui/animate-presence"), module.exports);
|
|
83
|
+
__reExport(src_exports, require("@tamagui/avatar"), module.exports);
|
|
84
|
+
__reExport(src_exports, require("@tamagui/button"), module.exports);
|
|
85
|
+
__reExport(src_exports, require("@tamagui/card"), module.exports);
|
|
86
|
+
__reExport(src_exports, require("@tamagui/checkbox"), module.exports);
|
|
87
|
+
__reExport(src_exports, require("@tamagui/compose-refs"), module.exports);
|
|
88
|
+
__reExport(src_exports, require("@tamagui/create-context"), module.exports);
|
|
89
|
+
__reExport(src_exports, require("@tamagui/dialog"), module.exports);
|
|
90
|
+
__reExport(src_exports, require("@tamagui/font-size"), module.exports);
|
|
91
|
+
__reExport(src_exports, require("@tamagui/form"), module.exports);
|
|
92
|
+
__reExport(src_exports, require("@tamagui/group"), module.exports);
|
|
93
|
+
__reExport(src_exports, require("@tamagui/react-native-media-driver"), module.exports);
|
|
94
|
+
__reExport(src_exports, require("@tamagui/elements"), module.exports);
|
|
95
|
+
__reExport(src_exports, require("@tamagui/helpers-tamagui"), module.exports);
|
|
96
|
+
__reExport(src_exports, require("@tamagui/image"), module.exports);
|
|
97
|
+
__reExport(src_exports, require("@tamagui/label"), module.exports);
|
|
98
|
+
__reExport(src_exports, require("@tamagui/list-item"), module.exports);
|
|
99
|
+
__reExport(src_exports, require("@tamagui/popover"), module.exports);
|
|
100
|
+
__reExport(src_exports, require("@tamagui/popper"), module.exports);
|
|
101
|
+
__reExport(src_exports, require("@tamagui/portal"), module.exports);
|
|
102
|
+
__reExport(src_exports, require("@tamagui/progress"), module.exports);
|
|
103
|
+
__reExport(src_exports, require("@tamagui/radio-group"), module.exports);
|
|
104
|
+
__reExport(src_exports, require("@tamagui/scroll-view"), module.exports);
|
|
105
|
+
__reExport(src_exports, require("@tamagui/select"), module.exports);
|
|
106
|
+
__reExport(src_exports, require("@tamagui/separator"), module.exports);
|
|
107
|
+
__reExport(src_exports, require("@tamagui/shapes"), module.exports);
|
|
108
|
+
__reExport(src_exports, require("@tamagui/sheet"), module.exports);
|
|
109
|
+
__reExport(src_exports, require("@tamagui/slider"), module.exports);
|
|
110
|
+
__reExport(src_exports, require("@tamagui/stacks"), module.exports);
|
|
111
|
+
__reExport(src_exports, require("@tamagui/switch"), module.exports);
|
|
112
|
+
__reExport(src_exports, require("@tamagui/tabs"), module.exports);
|
|
113
|
+
__reExport(src_exports, require("@tamagui/text"), module.exports);
|
|
114
|
+
__reExport(src_exports, require("@tamagui/theme"), module.exports);
|
|
115
|
+
__reExport(src_exports, require("@tamagui/toggle-group"), module.exports);
|
|
116
|
+
__reExport(src_exports, require("@tamagui/tooltip"), module.exports);
|
|
117
|
+
__reExport(src_exports, require("@tamagui/use-controllable-state"), module.exports);
|
|
118
|
+
__reExport(src_exports, require("@tamagui/use-debounce"), module.exports);
|
|
119
|
+
__reExport(src_exports, require("@tamagui/use-force-update"), module.exports);
|
|
120
|
+
__reExport(src_exports, require("@tamagui/use-window-dimensions"), module.exports);
|
|
121
|
+
__reExport(src_exports, require("@tamagui/visually-hidden"), module.exports);
|
|
122
|
+
__reExport(src_exports, require("./createTamagui"), module.exports);
|
|
123
|
+
__reExport(src_exports, require("./viewTypes"), module.exports);
|
|
124
|
+
__reExport(src_exports, require("./views/TamaguiProvider"), module.exports);
|
|
125
|
+
__reExport(src_exports, require("./views/Anchor"), module.exports);
|
|
126
|
+
__reExport(src_exports, require("./views/EnsureFlexed"), module.exports);
|
|
127
|
+
__reExport(src_exports, require("./views/Fieldset"), module.exports);
|
|
128
|
+
__reExport(src_exports, require("./views/Input"), module.exports);
|
|
129
|
+
__reExport(src_exports, require("./views/Spinner"), module.exports);
|
|
130
|
+
__reExport(src_exports, require("./views/TextArea"), module.exports);
|
|
131
|
+
__reExport(src_exports, require("./views/Text"), module.exports);
|
|
132
|
+
var import_core = require("@tamagui/core");
|
|
133
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
+
return to;
|
|
10
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
+
var linear_gradient_exports = {};
|
|
13
|
+
module.exports = __toCommonJS(linear_gradient_exports);
|
|
14
|
+
__reExport(linear_gradient_exports, require("@tamagui/linear-gradient"), module.exports);
|
|
15
|
+
//# sourceMappingURL=linear-gradient.js.map
|
|
@@ -0,0 +1,79 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var Dimensions_exports = {};
|
|
16
|
+
__export(Dimensions_exports, {
|
|
17
|
+
Dimensions: () => Dimensions
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(Dimensions_exports);
|
|
20
|
+
const dimensions = {
|
|
21
|
+
window: {
|
|
22
|
+
fontScale: 1,
|
|
23
|
+
height: 0,
|
|
24
|
+
scale: 1,
|
|
25
|
+
width: 0
|
|
26
|
+
},
|
|
27
|
+
screen: {
|
|
28
|
+
fontScale: 1,
|
|
29
|
+
height: 0,
|
|
30
|
+
scale: 1,
|
|
31
|
+
width: 0
|
|
32
|
+
}
|
|
33
|
+
}, listeners = {}, canUseDOM = typeof window < "u";
|
|
34
|
+
let shouldInit = canUseDOM;
|
|
35
|
+
function update() {
|
|
36
|
+
if (!canUseDOM)
|
|
37
|
+
return;
|
|
38
|
+
const win = window, docEl = win.document.documentElement;
|
|
39
|
+
dimensions.window = {
|
|
40
|
+
fontScale: 1,
|
|
41
|
+
height: docEl.clientHeight,
|
|
42
|
+
scale: win.devicePixelRatio || 1,
|
|
43
|
+
width: docEl.clientWidth
|
|
44
|
+
}, dimensions.screen = {
|
|
45
|
+
fontScale: 1,
|
|
46
|
+
height: win.screen.height,
|
|
47
|
+
scale: win.devicePixelRatio || 1,
|
|
48
|
+
width: win.screen.width
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function handleResize() {
|
|
52
|
+
update(), Array.isArray(listeners.change) && listeners.change.forEach((handler) => handler(dimensions));
|
|
53
|
+
}
|
|
54
|
+
const Dimensions = {
|
|
55
|
+
get(dimension) {
|
|
56
|
+
if (shouldInit && (shouldInit = !1, update()), dimensions[dimension] === void 0)
|
|
57
|
+
throw new Error(`No dimension set for key ${dimension}`);
|
|
58
|
+
return dimensions[dimension];
|
|
59
|
+
},
|
|
60
|
+
set(initialDimensions) {
|
|
61
|
+
if (initialDimensions) {
|
|
62
|
+
if (canUseDOM)
|
|
63
|
+
throw new Error("Dimensions cannot be set in the browser");
|
|
64
|
+
initialDimensions.screen != null && (dimensions.screen = initialDimensions.screen), initialDimensions.window != null && (dimensions.window = initialDimensions.window);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
addEventListener(type, handler) {
|
|
68
|
+
return listeners[type] = listeners[type] || [], listeners[type].push(handler), {
|
|
69
|
+
remove: () => {
|
|
70
|
+
this.removeEventListener(type, handler);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
removeEventListener(type, handler) {
|
|
75
|
+
Array.isArray(listeners[type]) && (listeners[type] = listeners[type].filter((_handler) => _handler !== handler));
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
canUseDOM && window.addEventListener("resize", handleResize, !1);
|
|
79
|
+
//# sourceMappingURL=Dimensions.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
return to;
|
|
11
|
+
};
|
|
12
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
13
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
14
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
15
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
16
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
18
|
+
mod
|
|
19
|
+
));
|
|
20
|
+
var import_polyfill_dev = require("@tamagui/polyfill-dev"), React = __toESM(require("react"));
|
|
21
|
+
globalThis.React ||= React;
|
|
22
|
+
typeof requestAnimationFrame > "u" && (globalThis.requestAnimationFrame = setImmediate);
|
|
23
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
+
return to;
|
|
10
|
+
};
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
+
var viewTypes_exports = {};
|
|
13
|
+
module.exports = __toCommonJS(viewTypes_exports);
|
|
14
|
+
//# sourceMappingURL=viewTypes.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var Anchor_exports = {};
|
|
16
|
+
__export(Anchor_exports, {
|
|
17
|
+
Anchor: () => Anchor
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(Anchor_exports);
|
|
20
|
+
var import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_text = require("@tamagui/text"), import_react_native = require("react-native-web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
const AnchorFrame = (0, import_core.styled)(import_text.SizableText, {
|
|
22
|
+
name: "Anchor",
|
|
23
|
+
tag: "a",
|
|
24
|
+
accessibilityRole: "link"
|
|
25
|
+
}), Anchor = AnchorFrame.styleable(
|
|
26
|
+
({ href, target, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
27
|
+
AnchorFrame,
|
|
28
|
+
{
|
|
29
|
+
...props,
|
|
30
|
+
...import_constants.isWeb ? {
|
|
31
|
+
href,
|
|
32
|
+
target
|
|
33
|
+
} : {
|
|
34
|
+
onPress: (event) => {
|
|
35
|
+
props.onPress?.(event), href !== void 0 && import_react_native.Linking.openURL(href);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
ref
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
//# sourceMappingURL=Anchor.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var EnsureFlexed_exports = {};
|
|
16
|
+
__export(EnsureFlexed_exports, {
|
|
17
|
+
EnsureFlexed: () => EnsureFlexed
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(EnsureFlexed_exports);
|
|
20
|
+
var import_core = require("@tamagui/core");
|
|
21
|
+
const EnsureFlexed = (0, import_core.styled)(import_core.Text, {
|
|
22
|
+
opacity: 0,
|
|
23
|
+
lineHeight: 0,
|
|
24
|
+
height: 0,
|
|
25
|
+
display: "flex",
|
|
26
|
+
fontSize: 200,
|
|
27
|
+
children: "wwwwwwwwwwwwwwwwwww",
|
|
28
|
+
pointerEvents: "none"
|
|
29
|
+
});
|
|
30
|
+
EnsureFlexed.isVisuallyHidden = !0;
|
|
31
|
+
//# sourceMappingURL=EnsureFlexed.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var Fieldset_exports = {};
|
|
16
|
+
__export(Fieldset_exports, {
|
|
17
|
+
Fieldset: () => Fieldset
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(Fieldset_exports);
|
|
20
|
+
var import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks");
|
|
21
|
+
const Fieldset = (0, import_core.styled)(import_stacks.YStack, {
|
|
22
|
+
name: "Fieldset",
|
|
23
|
+
tag: "fieldset",
|
|
24
|
+
variants: {
|
|
25
|
+
horizontal: {
|
|
26
|
+
true: {
|
|
27
|
+
flexDirection: "row",
|
|
28
|
+
alignItems: "center"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=Fieldset.js.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var Input_exports = {};
|
|
24
|
+
__export(Input_exports, {
|
|
25
|
+
Input: () => Input,
|
|
26
|
+
InputFrame: () => InputFrame,
|
|
27
|
+
defaultStyles: () => defaultStyles,
|
|
28
|
+
useInputProps: () => useInputProps
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(Input_exports);
|
|
31
|
+
var import_react = __toESM(require("react")), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_focusable = require("@tamagui/focusable"), import_react_native = require("react-native-web"), import_inputHelpers = require("../helpers/inputHelpers"), import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
const defaultStyles = {
|
|
33
|
+
size: "$true",
|
|
34
|
+
fontFamily: "$body",
|
|
35
|
+
borderWidth: 1,
|
|
36
|
+
outlineWidth: 0,
|
|
37
|
+
color: "$color",
|
|
38
|
+
...import_constants.isWeb ? {
|
|
39
|
+
tabIndex: 0
|
|
40
|
+
} : {
|
|
41
|
+
focusable: !0
|
|
42
|
+
},
|
|
43
|
+
borderColor: "$borderColor",
|
|
44
|
+
backgroundColor: "$background",
|
|
45
|
+
// this fixes a flex bug where it overflows container
|
|
46
|
+
minWidth: 0,
|
|
47
|
+
hoverStyle: {
|
|
48
|
+
borderColor: "$borderColorHover"
|
|
49
|
+
},
|
|
50
|
+
focusStyle: {
|
|
51
|
+
borderColor: "$borderColorFocus"
|
|
52
|
+
},
|
|
53
|
+
focusVisibleStyle: {
|
|
54
|
+
outlineColor: "$outlineColor",
|
|
55
|
+
outlineWidth: 2,
|
|
56
|
+
outlineStyle: "solid"
|
|
57
|
+
}
|
|
58
|
+
}, InputFrame = (0, import_core.styled)(
|
|
59
|
+
import_react_native.TextInput,
|
|
60
|
+
{
|
|
61
|
+
name: "Input",
|
|
62
|
+
variants: {
|
|
63
|
+
unstyled: {
|
|
64
|
+
false: defaultStyles
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
"...size": import_inputHelpers.inputSizeVariant
|
|
68
|
+
},
|
|
69
|
+
disabled: {
|
|
70
|
+
true: {}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
isInput: !0,
|
|
79
|
+
accept: {
|
|
80
|
+
placeholderTextColor: "color",
|
|
81
|
+
selectionColor: "color"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
), Input = InputFrame.styleable((propsIn, forwardedRef) => {
|
|
85
|
+
const ref = import_react.default.useRef(null), composedRefs = (0, import_core.useComposedRefs)(forwardedRef, ref), props = useInputProps(propsIn, composedRefs);
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputFrame, { ...props });
|
|
87
|
+
});
|
|
88
|
+
function useInputProps(props, ref) {
|
|
89
|
+
const theme = (0, import_core.useTheme)(), { onChangeText, ref: combinedRef } = (0, import_focusable.useFocusable)({
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
props,
|
|
92
|
+
ref,
|
|
93
|
+
isInput: !0
|
|
94
|
+
}), placeholderColorProp = props.placeholderTextColor, placeholderTextColor = theme[placeholderColorProp]?.get() ?? placeholderColorProp ?? theme.placeholderColor?.get();
|
|
95
|
+
return {
|
|
96
|
+
ref: combinedRef,
|
|
97
|
+
readOnly: props.disabled,
|
|
98
|
+
...props,
|
|
99
|
+
placeholderTextColor,
|
|
100
|
+
onChangeText
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var Spinner_exports = {};
|
|
24
|
+
__export(Spinner_exports, {
|
|
25
|
+
Spinner: () => Spinner
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(Spinner_exports);
|
|
28
|
+
var import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks"), React = __toESM(require("react")), import_react_native = require("react-native-web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
const Spinner = import_stacks.YStack.extractable(
|
|
30
|
+
(0, import_core.themeable)(
|
|
31
|
+
React.forwardRef((props, ref) => {
|
|
32
|
+
const { size, color: colorProp, ...stackProps } = props, theme = (0, import_core.useTheme)();
|
|
33
|
+
let color = colorProp;
|
|
34
|
+
return color && color[0] === "$" && (color = (0, import_core.variableToString)(theme[color])), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, { ref, ...stackProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.ActivityIndicator, { size, color }) });
|
|
35
|
+
}),
|
|
36
|
+
{
|
|
37
|
+
componentName: "Spinner"
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
//# sourceMappingURL=Spinner.js.map
|