@tamagui/demos 1.114.4 → 1.115.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/dist/cjs/AccordionDemo.cjs +96 -0
- package/dist/cjs/AddThemeDemo.cjs +70 -0
- package/dist/cjs/AlertDialogDemo.cjs +96 -0
- package/dist/cjs/AnimationsDemo.cjs +100 -0
- package/dist/cjs/AnimationsEnterDemo.cjs +74 -0
- package/dist/cjs/AnimationsHoverDemo.cjs +47 -0
- package/dist/cjs/AnimationsPresenceDemo.cjs +124 -0
- package/dist/cjs/AnimationsTimingDemo.cjs +46 -0
- package/dist/cjs/AvatarDemo.cjs +53 -0
- package/dist/cjs/BuildAButtonDemo.cjs +125 -0
- package/dist/cjs/ButtonDemo.cjs +83 -0
- package/dist/cjs/{CardDemo.js → CardDemo.cjs} +67 -41
- package/dist/cjs/CheckboxDemo.cjs +70 -0
- package/dist/cjs/CheckboxHeadlessDemo.cjs +87 -0
- package/dist/cjs/CheckboxUnstyledDemo.cjs +78 -0
- package/dist/cjs/ColorsDemo.cjs +121 -0
- package/dist/cjs/DialogDemo.cjs +155 -0
- package/dist/cjs/FormsDemo.cjs +70 -0
- package/dist/cjs/Grid.cjs +71 -0
- package/dist/cjs/GroupDemo.cjs +85 -0
- package/dist/cjs/HeadingsDemo.cjs +45 -0
- package/dist/cjs/ImageDemo.cjs +36 -0
- package/dist/cjs/InputsDemo.cjs +60 -0
- package/dist/cjs/LabelDemo.cjs +60 -0
- package/dist/cjs/LinearGradientDemo.cjs +48 -0
- package/dist/cjs/ListItemDemo.cjs +100 -0
- package/dist/cjs/LucideIconsDemo.cjs +93 -0
- package/dist/cjs/NewInputsDemo.cjs +60 -0
- package/dist/cjs/PopoverDemo.cjs +145 -0
- package/dist/cjs/ProgressDemo.cjs +106 -0
- package/dist/cjs/RadioGroupDemo.cjs +71 -0
- package/dist/cjs/RadioGroupHeadlessDemo.cjs +168 -0
- package/dist/cjs/RadioGroupUnstyledDemo.cjs +142 -0
- package/dist/cjs/ReplaceThemeDemo.cjs +78 -0
- package/dist/cjs/ScrollViewDemo.cjs +74 -0
- package/dist/cjs/SelectDemo.cjs +228 -0
- package/dist/cjs/SeparatorDemo.cjs +60 -0
- package/dist/cjs/ShapesDemo.cjs +42 -0
- package/dist/cjs/SheetDemo.cjs +176 -0
- package/dist/cjs/SliderDemo.cjs +58 -0
- package/dist/cjs/SpinnerDemo.cjs +41 -0
- package/dist/cjs/StacksDemo.cjs +104 -0
- package/dist/cjs/SwitchDemo.cjs +95 -0
- package/dist/cjs/SwitchHeadlessDemo.cjs +101 -0
- package/dist/cjs/SwitchUnstyledDemo.cjs +89 -0
- package/dist/cjs/TabsAdvancedDemo.cjs +340 -0
- package/dist/cjs/TabsDemo.cjs +191 -0
- package/dist/cjs/TextDemo.cjs +52 -0
- package/dist/cjs/ThemeBuilderDemo.cjs +178 -0
- package/dist/cjs/ThemeInverseDemo.cjs +69 -0
- package/dist/cjs/ToastDemo.cjs +133 -0
- package/dist/cjs/ToastDuplicateDemo.cjs +83 -0
- package/dist/cjs/ToggleGroupDemo.cjs +97 -0
- package/dist/cjs/TokensDemo.cjs +125 -0
- package/dist/cjs/TooltipDemo.cjs +125 -0
- package/dist/cjs/UpdateThemeDemo.cjs +81 -0
- package/dist/cjs/WebNativeImageDemo.cjs +34 -0
- package/dist/cjs/index.cjs +74 -0
- package/dist/cjs/tamagui.config.cjs +29 -0
- package/dist/cjs/useOnIntersecting.cjs +66 -0
- package/package.json +22 -21
- package/dist/cjs/AccordionDemo.js +0 -43
- package/dist/cjs/AddThemeDemo.js +0 -56
- package/dist/cjs/AlertDialogDemo.js +0 -68
- package/dist/cjs/AnimationsDemo.js +0 -99
- package/dist/cjs/AnimationsEnterDemo.js +0 -55
- package/dist/cjs/AnimationsHoverDemo.js +0 -41
- package/dist/cjs/AnimationsPresenceDemo.js +0 -102
- package/dist/cjs/AnimationsTimingDemo.js +0 -40
- package/dist/cjs/AvatarDemo.js +0 -45
- package/dist/cjs/BuildAButtonDemo.js +0 -57
- package/dist/cjs/ButtonDemo.js +0 -39
- package/dist/cjs/CheckboxDemo.js +0 -40
- package/dist/cjs/CheckboxHeadlessDemo.js +0 -62
- package/dist/cjs/CheckboxUnstyledDemo.js +0 -52
- package/dist/cjs/ColorsDemo.js +0 -95
- package/dist/cjs/DialogDemo.js +0 -99
- package/dist/cjs/FormsDemo.js +0 -57
- package/dist/cjs/Grid.js +0 -58
- package/dist/cjs/GroupDemo.js +0 -39
- package/dist/cjs/HeadingsDemo.js +0 -31
- package/dist/cjs/ImageDemo.js +0 -33
- package/dist/cjs/InputsDemo.js +0 -46
- package/dist/cjs/LabelDemo.js +0 -33
- package/dist/cjs/LinearGradientDemo.js +0 -47
- package/dist/cjs/ListItemDemo.js +0 -61
- package/dist/cjs/LucideIconsDemo.js +0 -72
- package/dist/cjs/NewInputsDemo.js +0 -46
- package/dist/cjs/PopoverDemo.js +0 -126
- package/dist/cjs/ProgressDemo.js +0 -88
- package/dist/cjs/RadioGroupDemo.js +0 -36
- package/dist/cjs/RadioGroupHeadlessDemo.js +0 -117
- package/dist/cjs/RadioGroupUnstyledDemo.js +0 -107
- package/dist/cjs/ReplaceThemeDemo.js +0 -58
- package/dist/cjs/ScrollViewDemo.js +0 -43
- package/dist/cjs/SelectDemo.js +0 -190
- package/dist/cjs/SeparatorDemo.js +0 -35
- package/dist/cjs/ShapesDemo.js +0 -27
- package/dist/cjs/SheetDemo.js +0 -120
- package/dist/cjs/SliderDemo.js +0 -34
- package/dist/cjs/SpinnerDemo.js +0 -27
- package/dist/cjs/StacksDemo.js +0 -93
- package/dist/cjs/SwitchDemo.js +0 -56
- package/dist/cjs/SwitchHeadlessDemo.js +0 -87
- package/dist/cjs/SwitchUnstyledDemo.js +0 -64
- package/dist/cjs/TabsAdvancedDemo.js +0 -283
- package/dist/cjs/TabsDemo.js +0 -144
- package/dist/cjs/TextDemo.js +0 -31
- package/dist/cjs/ThemeBuilderDemo.js +0 -149
- package/dist/cjs/ThemeInverseDemo.js +0 -56
- package/dist/cjs/ToastDemo.js +0 -112
- package/dist/cjs/ToastDuplicateDemo.js +0 -64
- package/dist/cjs/ToggleGroupDemo.js +0 -63
- package/dist/cjs/TokensDemo.js +0 -100
- package/dist/cjs/TooltipDemo.js +0 -68
- package/dist/cjs/UpdateThemeDemo.js +0 -61
- package/dist/cjs/WebNativeImageDemo.js +0 -24
- package/dist/cjs/index.js +0 -71
- package/dist/cjs/tamagui.config.js +0 -22
- package/dist/cjs/useOnIntersecting.js +0 -63
- /package/dist/cjs/{AccordionDemo.js.map → AccordionDemo.cjs.map} +0 -0
- /package/dist/cjs/{AddThemeDemo.js.map → AddThemeDemo.cjs.map} +0 -0
- /package/dist/cjs/{AlertDialogDemo.js.map → AlertDialogDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsDemo.js.map → AnimationsDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsEnterDemo.js.map → AnimationsEnterDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsHoverDemo.js.map → AnimationsHoverDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsPresenceDemo.js.map → AnimationsPresenceDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsTimingDemo.js.map → AnimationsTimingDemo.cjs.map} +0 -0
- /package/dist/cjs/{AvatarDemo.js.map → AvatarDemo.cjs.map} +0 -0
- /package/dist/cjs/{BuildAButtonDemo.js.map → BuildAButtonDemo.cjs.map} +0 -0
- /package/dist/cjs/{ButtonDemo.js.map → ButtonDemo.cjs.map} +0 -0
- /package/dist/cjs/{CardDemo.js.map → CardDemo.cjs.map} +0 -0
- /package/dist/cjs/{CheckboxDemo.js.map → CheckboxDemo.cjs.map} +0 -0
- /package/dist/cjs/{CheckboxHeadlessDemo.js.map → CheckboxHeadlessDemo.cjs.map} +0 -0
- /package/dist/cjs/{CheckboxUnstyledDemo.js.map → CheckboxUnstyledDemo.cjs.map} +0 -0
- /package/dist/cjs/{ColorsDemo.js.map → ColorsDemo.cjs.map} +0 -0
- /package/dist/cjs/{DialogDemo.js.map → DialogDemo.cjs.map} +0 -0
- /package/dist/cjs/{FormsDemo.js.map → FormsDemo.cjs.map} +0 -0
- /package/dist/cjs/{Grid.js.map → Grid.cjs.map} +0 -0
- /package/dist/cjs/{GroupDemo.js.map → GroupDemo.cjs.map} +0 -0
- /package/dist/cjs/{HeadingsDemo.js.map → HeadingsDemo.cjs.map} +0 -0
- /package/dist/cjs/{ImageDemo.js.map → ImageDemo.cjs.map} +0 -0
- /package/dist/cjs/{InputsDemo.js.map → InputsDemo.cjs.map} +0 -0
- /package/dist/cjs/{LabelDemo.js.map → LabelDemo.cjs.map} +0 -0
- /package/dist/cjs/{LinearGradientDemo.js.map → LinearGradientDemo.cjs.map} +0 -0
- /package/dist/cjs/{ListItemDemo.js.map → ListItemDemo.cjs.map} +0 -0
- /package/dist/cjs/{LucideIconsDemo.js.map → LucideIconsDemo.cjs.map} +0 -0
- /package/dist/cjs/{NewInputsDemo.js.map → NewInputsDemo.cjs.map} +0 -0
- /package/dist/cjs/{PopoverDemo.js.map → PopoverDemo.cjs.map} +0 -0
- /package/dist/cjs/{ProgressDemo.js.map → ProgressDemo.cjs.map} +0 -0
- /package/dist/cjs/{RadioGroupDemo.js.map → RadioGroupDemo.cjs.map} +0 -0
- /package/dist/cjs/{RadioGroupHeadlessDemo.js.map → RadioGroupHeadlessDemo.cjs.map} +0 -0
- /package/dist/cjs/{RadioGroupUnstyledDemo.js.map → RadioGroupUnstyledDemo.cjs.map} +0 -0
- /package/dist/cjs/{ReplaceThemeDemo.js.map → ReplaceThemeDemo.cjs.map} +0 -0
- /package/dist/cjs/{ScrollViewDemo.js.map → ScrollViewDemo.cjs.map} +0 -0
- /package/dist/cjs/{SelectDemo.js.map → SelectDemo.cjs.map} +0 -0
- /package/dist/cjs/{SeparatorDemo.js.map → SeparatorDemo.cjs.map} +0 -0
- /package/dist/cjs/{ShapesDemo.js.map → ShapesDemo.cjs.map} +0 -0
- /package/dist/cjs/{SheetDemo.js.map → SheetDemo.cjs.map} +0 -0
- /package/dist/cjs/{SliderDemo.js.map → SliderDemo.cjs.map} +0 -0
- /package/dist/cjs/{SpinnerDemo.js.map → SpinnerDemo.cjs.map} +0 -0
- /package/dist/cjs/{StacksDemo.js.map → StacksDemo.cjs.map} +0 -0
- /package/dist/cjs/{SwitchDemo.js.map → SwitchDemo.cjs.map} +0 -0
- /package/dist/cjs/{SwitchHeadlessDemo.js.map → SwitchHeadlessDemo.cjs.map} +0 -0
- /package/dist/cjs/{SwitchUnstyledDemo.js.map → SwitchUnstyledDemo.cjs.map} +0 -0
- /package/dist/cjs/{TabsAdvancedDemo.js.map → TabsAdvancedDemo.cjs.map} +0 -0
- /package/dist/cjs/{TabsDemo.js.map → TabsDemo.cjs.map} +0 -0
- /package/dist/cjs/{TextDemo.js.map → TextDemo.cjs.map} +0 -0
- /package/dist/cjs/{ThemeBuilderDemo.js.map → ThemeBuilderDemo.cjs.map} +0 -0
- /package/dist/cjs/{ThemeInverseDemo.js.map → ThemeInverseDemo.cjs.map} +0 -0
- /package/dist/cjs/{ToastDemo.js.map → ToastDemo.cjs.map} +0 -0
- /package/dist/cjs/{ToastDuplicateDemo.js.map → ToastDuplicateDemo.cjs.map} +0 -0
- /package/dist/cjs/{ToggleGroupDemo.js.map → ToggleGroupDemo.cjs.map} +0 -0
- /package/dist/cjs/{TokensDemo.js.map → TokensDemo.cjs.map} +0 -0
- /package/dist/cjs/{TooltipDemo.js.map → TooltipDemo.cjs.map} +0 -0
- /package/dist/cjs/{UpdateThemeDemo.js.map → UpdateThemeDemo.cjs.map} +0 -0
- /package/dist/cjs/{WebNativeImageDemo.js.map → WebNativeImageDemo.cjs.map} +0 -0
- /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
- /package/dist/cjs/{tamagui.config.js.map → tamagui.config.cjs.map} +0 -0
- /package/dist/cjs/{useOnIntersecting.js.map → useOnIntersecting.cjs.map} +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
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 LucideIconsDemo_exports = {};
|
|
24
|
-
__export(LucideIconsDemo_exports, {
|
|
25
|
-
LucideIconsDemo: () => LucideIconsDemo
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(LucideIconsDemo_exports);
|
|
28
|
-
var import_react = __toESM(require("react")), LucideIcons = __toESM(require("@tamagui/lucide-icons")), import_react_native = require("react-native-web"), import_tamagui = require("tamagui"), import_Grid = require("./Grid"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
const lucideIcons = Object.keys(
|
|
30
|
-
// vite tree shaking workaround
|
|
31
|
-
typeof LucideIcons < "u" ? LucideIcons : {}
|
|
32
|
-
).map((name) => ({
|
|
33
|
-
key: name.toLowerCase(),
|
|
34
|
-
name,
|
|
35
|
-
Icon: LucideIcons[name]
|
|
36
|
-
}));
|
|
37
|
-
function LucideIconsDemo() {
|
|
38
|
-
const [searchRaw, setSearch] = import_react.default.useState(""), search = (0, import_tamagui.useDebounceValue)(searchRaw, 400), size = 100, iconsMemo = import_react.default.useMemo(
|
|
39
|
-
() => lucideIcons.filter((x) => x.key.includes(search.toLowerCase())).map(({ Icon, name }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
40
|
-
import_tamagui.YStack,
|
|
41
|
-
{
|
|
42
|
-
height: size + 20,
|
|
43
|
-
alignItems: "center",
|
|
44
|
-
justifyContent: "center",
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: size * 0.25 }),
|
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Spacer, {}),
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
-
import_tamagui.Paragraph,
|
|
50
|
-
{
|
|
51
|
-
height: "$6",
|
|
52
|
-
wordWrap: "break-word",
|
|
53
|
-
maxWidth: "100%",
|
|
54
|
-
textAlign: "center",
|
|
55
|
-
paddingHorizontal: "$2",
|
|
56
|
-
size: "$1",
|
|
57
|
-
opacity: 0.5,
|
|
58
|
-
children: name
|
|
59
|
-
}
|
|
60
|
-
)
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
name
|
|
64
|
-
)),
|
|
65
|
-
[search]
|
|
66
|
-
);
|
|
67
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { minWidth: "100%", padding: "$4", paddingBottom: "$0", space: !0, children: [
|
|
68
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Input, { value: searchRaw, onChangeText: setSearch, placeholder: "Search..." }),
|
|
69
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, { height: 420, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.ScrollView, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid.Grid, { itemMinWidth: size, children: iconsMemo }) }) })
|
|
70
|
-
] });
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=LucideIconsDemo.js.map
|
|
@@ -1,46 +0,0 @@
|
|
|
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 NewInputsDemo_exports = {};
|
|
16
|
-
__export(NewInputsDemo_exports, {
|
|
17
|
-
NewInputsDemo: () => NewInputsDemo
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(NewInputsDemo_exports);
|
|
20
|
-
var import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
-
function NewInputsDemo() {
|
|
22
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
23
|
-
import_tamagui.YStack,
|
|
24
|
-
{
|
|
25
|
-
width: 200,
|
|
26
|
-
minHeight: 250,
|
|
27
|
-
overflow: "hidden",
|
|
28
|
-
space: "$2",
|
|
29
|
-
margin: "$3",
|
|
30
|
-
padding: "$2",
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputDemo, { size: "$2" }),
|
|
33
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputDemo, { size: "$3" }),
|
|
34
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputDemo, { size: "$4" }),
|
|
35
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.TextArea, { placeholder: "Enter your details..." })
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
function InputDemo(props) {
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { alignItems: "center", space: "$2", children: [
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Input, { flex: 1, size: props.size, placeholder: `Size ${props.size}...` }),
|
|
43
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { size: props.size, children: "Go" })
|
|
44
|
-
] });
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=NewInputsDemo.js.map
|
package/dist/cjs/PopoverDemo.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
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 PopoverDemo_exports = {};
|
|
16
|
-
__export(PopoverDemo_exports, {
|
|
17
|
-
Demo: () => Demo,
|
|
18
|
-
PopoverDemo: () => PopoverDemo
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(PopoverDemo_exports);
|
|
21
|
-
var import_lucide_icons = require("@tamagui/lucide-icons"), import_react = require("react"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
-
function PopoverDemo() {
|
|
23
|
-
const [shouldAdapt, setShouldAdapt] = (0, import_react.useState)(!0);
|
|
24
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { gap: "$4", children: [
|
|
25
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { gap: "$2", flex: 1, justifyContent: "center", alignItems: "center", children: [
|
|
26
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
27
|
-
Demo,
|
|
28
|
-
{
|
|
29
|
-
shouldAdapt,
|
|
30
|
-
placement: "left",
|
|
31
|
-
Icon: import_lucide_icons.ChevronLeft,
|
|
32
|
-
Name: "left-popover"
|
|
33
|
-
}
|
|
34
|
-
),
|
|
35
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
36
|
-
Demo,
|
|
37
|
-
{
|
|
38
|
-
shouldAdapt,
|
|
39
|
-
placement: "bottom",
|
|
40
|
-
Icon: import_lucide_icons.ChevronDown,
|
|
41
|
-
Name: "bottom-popover"
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
45
|
-
Demo,
|
|
46
|
-
{
|
|
47
|
-
shouldAdapt,
|
|
48
|
-
placement: "top",
|
|
49
|
-
Icon: import_lucide_icons.ChevronUp,
|
|
50
|
-
Name: "top-popover"
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
-
Demo,
|
|
55
|
-
{
|
|
56
|
-
shouldAdapt,
|
|
57
|
-
placement: "right",
|
|
58
|
-
Icon: import_lucide_icons.ChevronRight,
|
|
59
|
-
Name: "right-popover"
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
] }),
|
|
63
|
-
!import_tamagui.isWeb && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Button, { onPress: () => setShouldAdapt(!shouldAdapt), children: [
|
|
64
|
-
"Adapt to Sheet: ",
|
|
65
|
-
`${shouldAdapt}`
|
|
66
|
-
] })
|
|
67
|
-
] });
|
|
68
|
-
}
|
|
69
|
-
function Demo({
|
|
70
|
-
Icon,
|
|
71
|
-
Name,
|
|
72
|
-
shouldAdapt,
|
|
73
|
-
...props
|
|
74
|
-
}) {
|
|
75
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Popover, { size: "$5", allowFlip: !0, ...props, children: [
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Popover.Trigger, { asChild: !0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { icon: Icon }) }),
|
|
77
|
-
shouldAdapt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Adapt, { when: "sm", platform: "touch", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Popover.Sheet, { modal: !0, dismissOnSnapToBottom: !0, children: [
|
|
78
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Popover.Sheet.Frame, { padding: "$4", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Adapt.Contents, {}) }),
|
|
79
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
|
-
import_tamagui.Popover.Sheet.Overlay,
|
|
81
|
-
{
|
|
82
|
-
animation: "lazy",
|
|
83
|
-
enterStyle: { opacity: 0 },
|
|
84
|
-
exitStyle: { opacity: 0 }
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
] }) }),
|
|
88
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
89
|
-
import_tamagui.Popover.Content,
|
|
90
|
-
{
|
|
91
|
-
borderWidth: 1,
|
|
92
|
-
borderColor: "$borderColor",
|
|
93
|
-
enterStyle: { y: -10, opacity: 0 },
|
|
94
|
-
exitStyle: { y: -10, opacity: 0 },
|
|
95
|
-
elevate: !0,
|
|
96
|
-
animation: [
|
|
97
|
-
"quick",
|
|
98
|
-
{
|
|
99
|
-
opacity: {
|
|
100
|
-
overshootClamping: !0
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Popover.Arrow, { borderWidth: 1, borderColor: "$borderColor" }),
|
|
106
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { gap: "$3", children: [
|
|
107
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { gap: "$3", children: [
|
|
108
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, { size: "$3", htmlFor: Name, children: "Name" }),
|
|
109
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Input, { f: 1, size: "$3", id: Name })
|
|
110
|
-
] }),
|
|
111
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Popover.Close, { asChild: !0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
|
-
import_tamagui.Button,
|
|
113
|
-
{
|
|
114
|
-
size: "$3",
|
|
115
|
-
onPress: () => {
|
|
116
|
-
},
|
|
117
|
-
children: "Submit"
|
|
118
|
-
}
|
|
119
|
-
) })
|
|
120
|
-
] })
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
)
|
|
124
|
-
] });
|
|
125
|
-
}
|
|
126
|
-
//# sourceMappingURL=PopoverDemo.js.map
|
package/dist/cjs/ProgressDemo.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
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 ProgressDemo_exports = {};
|
|
24
|
-
__export(ProgressDemo_exports, {
|
|
25
|
-
ProgressDemo: () => ProgressDemo
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(ProgressDemo_exports);
|
|
28
|
-
var import_react = __toESM(require("react")), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function ProgressDemo() {
|
|
30
|
-
const [key, setKey] = import_react.default.useState(0), [size, setSize] = import_react.default.useState(4), [progress, setProgress] = import_react.default.useState(0), sizeProp = `$${size}`;
|
|
31
|
-
return import_react.default.useEffect(() => {
|
|
32
|
-
const timer = setTimeout(() => setProgress(60), 1e3);
|
|
33
|
-
return () => {
|
|
34
|
-
clearTimeout(timer);
|
|
35
|
-
};
|
|
36
|
-
}, []), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
37
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { height: 60, alignItems: "center", gap: "$4", children: [
|
|
38
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Paragraph, { height: 30, opacity: 0.5, children: [
|
|
39
|
-
"Size: ",
|
|
40
|
-
size
|
|
41
|
-
] }),
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Progress, { size: sizeProp, value: progress, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Progress.Indicator, { animation: "bouncy" }) }, key)
|
|
43
|
-
] }),
|
|
44
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
45
|
-
import_tamagui.XStack,
|
|
46
|
-
{
|
|
47
|
-
alignItems: "center",
|
|
48
|
-
gap: "$2",
|
|
49
|
-
position: "absolute",
|
|
50
|
-
bottom: "$3",
|
|
51
|
-
left: "$4",
|
|
52
|
-
$xxs: { display: "none" },
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
55
|
-
import_tamagui.Slider,
|
|
56
|
-
{
|
|
57
|
-
size: "$2",
|
|
58
|
-
width: 130,
|
|
59
|
-
defaultValue: [4],
|
|
60
|
-
min: 2,
|
|
61
|
-
max: 6,
|
|
62
|
-
step: 1,
|
|
63
|
-
onValueChange: ([val]) => {
|
|
64
|
-
setSize(val);
|
|
65
|
-
},
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Slider.Track, { borderWidth: 1, borderColor: "$color5", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Slider.TrackActive, {}) }),
|
|
68
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Slider.Thumb, { circular: !0, index: 0 })
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { size: "$2", onPress: () => setProgress((prev) => (prev + 20) % 100), children: "Load" }),
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
|
-
import_tamagui.Button,
|
|
75
|
-
{
|
|
76
|
-
size: "$2",
|
|
77
|
-
onPress: () => {
|
|
78
|
-
setKey(Math.random()), setProgress(0);
|
|
79
|
-
},
|
|
80
|
-
children: "Reset"
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
] });
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=ProgressDemo.js.map
|
|
@@ -1,36 +0,0 @@
|
|
|
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 RadioGroupDemo_exports = {};
|
|
16
|
-
__export(RadioGroupDemo_exports, {
|
|
17
|
-
RadioGroupDemo: () => RadioGroupDemo,
|
|
18
|
-
RadioGroupItemWithLabel: () => RadioGroupItemWithLabel
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(RadioGroupDemo_exports);
|
|
21
|
-
var import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
-
function RadioGroupDemo() {
|
|
23
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.RadioGroup, { "aria-labelledby": "Select one item", defaultValue: "3", name: "form", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { width: 300, alignItems: "center", space: "$2", children: [
|
|
24
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemWithLabel, { size: "$3", value: "2", label: "Second value" }),
|
|
25
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemWithLabel, { size: "$4", value: "3", label: "Third value" }),
|
|
26
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemWithLabel, { size: "$5", value: "4", label: "Fourth value" })
|
|
27
|
-
] }) });
|
|
28
|
-
}
|
|
29
|
-
function RadioGroupItemWithLabel(props) {
|
|
30
|
-
const id = `radiogroup-${props.value}`;
|
|
31
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { width: 300, alignItems: "center", space: "$4", children: [
|
|
32
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.RadioGroup.Item, { value: props.value, id, size: props.size, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.RadioGroup.Indicator, {}) }),
|
|
33
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, { size: props.size, htmlFor: id, children: props.label })
|
|
34
|
-
] });
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=RadioGroupDemo.js.map
|
|
@@ -1,117 +0,0 @@
|
|
|
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 RadioGroupHeadlessDemo_exports = {};
|
|
24
|
-
__export(RadioGroupHeadlessDemo_exports, {
|
|
25
|
-
RadioGroupHeadlessDemo: () => RadioGroupHeadlessDemo
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(RadioGroupHeadlessDemo_exports);
|
|
28
|
-
var import_radio_headless = require("@tamagui/radio-headless"), import_roving_focus = require("@tamagui/roving-focus"), import_react = __toESM(require("react")), import_react_native = require("react-native-web"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
const RadioGroupContext = import_react.default.createContext({}), RadioGroupItemContext = import_react.default.createContext({
|
|
30
|
-
checked: !1,
|
|
31
|
-
disabled: !1
|
|
32
|
-
});
|
|
33
|
-
function RadioGroupHeadlessDemo() {
|
|
34
|
-
const { providerValue, frameAttrs, rovingFocusGroupAttrs } = (0, import_radio_headless.useRadioGroup)({
|
|
35
|
-
orientation: "vertical",
|
|
36
|
-
name: "form",
|
|
37
|
-
defaultValue: "3"
|
|
38
|
-
});
|
|
39
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupContext.Provider, { value: providerValue, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup, { ...rovingFocusGroupAttrs, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native.View, { style: styles.radioGroup, ...frameAttrs, children: [
|
|
40
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItem, { value: "2", id: "2", label: "First Value" }),
|
|
41
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItem, { value: "3", id: "3", label: "Second Value" }),
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItem, { value: "4", id: "4", label: "Third Value" })
|
|
43
|
-
] }) }) });
|
|
44
|
-
}
|
|
45
|
-
function RadioGroupItem(props) {
|
|
46
|
-
const theme = (0, import_tamagui.useTheme)(), { value, id, label } = props, {
|
|
47
|
-
providerValue,
|
|
48
|
-
native,
|
|
49
|
-
bubbleInput,
|
|
50
|
-
rovingFocusGroupAttrs,
|
|
51
|
-
frameAttrs,
|
|
52
|
-
isFormControl,
|
|
53
|
-
checked
|
|
54
|
-
} = (0, import_radio_headless.useRadioGroupItem)({
|
|
55
|
-
radioGroupContext: RadioGroupContext,
|
|
56
|
-
value,
|
|
57
|
-
id
|
|
58
|
-
});
|
|
59
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemContext.Provider, { value: providerValue, children: import_tamagui.isWeb && native ? bubbleInput : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_native.View, { style: styles.radioGroupItemContainer, children: [
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_roving_focus.RovingFocusGroup.Item, { ...rovingFocusGroupAttrs, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
|
-
import_react_native.Pressable,
|
|
62
|
-
{
|
|
63
|
-
style: {
|
|
64
|
-
...styles.radioGroupItem,
|
|
65
|
-
borderColor: theme.borderColor.get(),
|
|
66
|
-
...checked ? { borderWidth: 4 } : { backgroundColor: theme.background.get() }
|
|
67
|
-
},
|
|
68
|
-
...frameAttrs,
|
|
69
|
-
onFocus: frameAttrs.onFocus,
|
|
70
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemIndicator, {})
|
|
71
|
-
}
|
|
72
|
-
) }),
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { style: { color: theme.color.get() }, children: label }),
|
|
74
|
-
isFormControl && bubbleInput
|
|
75
|
-
] }) });
|
|
76
|
-
}
|
|
77
|
-
function RadioGroupItemIndicator() {
|
|
78
|
-
const theme = (0, import_tamagui.useTheme)(), params = (0, import_radio_headless.useRadioGroupItemIndicator)({
|
|
79
|
-
radioGroupItemContext: RadioGroupItemContext,
|
|
80
|
-
disabled: !1
|
|
81
|
-
});
|
|
82
|
-
return params.checked ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
-
import_react_native.View,
|
|
84
|
-
{
|
|
85
|
-
style: {
|
|
86
|
-
...styles.radioGroupItemIndicator,
|
|
87
|
-
backgroundColor: theme.color.get()
|
|
88
|
-
},
|
|
89
|
-
...params
|
|
90
|
-
}
|
|
91
|
-
) : null;
|
|
92
|
-
}
|
|
93
|
-
const styles = import_react_native.StyleSheet.create({
|
|
94
|
-
radioGroup: {
|
|
95
|
-
flexDirection: "column",
|
|
96
|
-
gap: 20,
|
|
97
|
-
alignItems: "flex-start"
|
|
98
|
-
},
|
|
99
|
-
radioGroupItem: {
|
|
100
|
-
borderWidth: 2,
|
|
101
|
-
width: 30,
|
|
102
|
-
height: 30,
|
|
103
|
-
justifyContent: "center",
|
|
104
|
-
alignItems: "center"
|
|
105
|
-
},
|
|
106
|
-
radioGroupItemIndicator: {
|
|
107
|
-
width: "35%",
|
|
108
|
-
height: "35%"
|
|
109
|
-
},
|
|
110
|
-
radioGroupItemContainer: {
|
|
111
|
-
justifyContent: "center",
|
|
112
|
-
alignItems: "center",
|
|
113
|
-
flexDirection: "row",
|
|
114
|
-
gap: 12
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
//# sourceMappingURL=RadioGroupHeadlessDemo.js.map
|
|
@@ -1,107 +0,0 @@
|
|
|
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 RadioGroupUnstyledDemo_exports = {};
|
|
16
|
-
__export(RadioGroupUnstyledDemo_exports, {
|
|
17
|
-
RadioGroupUnstyledDemo: () => RadioGroupUnstyledDemo
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(RadioGroupUnstyledDemo_exports);
|
|
20
|
-
var import_tamagui = require("tamagui"), import_radio_group = require("@tamagui/radio-group"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
-
const RADIO_GROUP_ITEM_NAME = "RadioGroupItem", RadioGroupItemFrame = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
|
|
22
|
-
name: RADIO_GROUP_ITEM_NAME,
|
|
23
|
-
tag: "button",
|
|
24
|
-
borderRadius: 1e3,
|
|
25
|
-
backgroundColor: "$background",
|
|
26
|
-
alignItems: "center",
|
|
27
|
-
justifyContent: "center",
|
|
28
|
-
borderWidth: 1,
|
|
29
|
-
borderColor: "$borderColor",
|
|
30
|
-
padding: 0,
|
|
31
|
-
hoverStyle: {
|
|
32
|
-
borderColor: "$borderColorHover",
|
|
33
|
-
backgroundColor: "$backgroundHover"
|
|
34
|
-
},
|
|
35
|
-
focusStyle: {
|
|
36
|
-
borderColor: "$borderColorHover",
|
|
37
|
-
backgroundColor: "$backgroundHover"
|
|
38
|
-
},
|
|
39
|
-
focusVisibleStyle: {
|
|
40
|
-
outlineStyle: "solid",
|
|
41
|
-
outlineWidth: 2,
|
|
42
|
-
outlineColor: "$outlineColor"
|
|
43
|
-
},
|
|
44
|
-
pressStyle: {
|
|
45
|
-
borderColor: "$borderColorFocus",
|
|
46
|
-
backgroundColor: "$backgroundFocus"
|
|
47
|
-
},
|
|
48
|
-
variants: {
|
|
49
|
-
disabled: {
|
|
50
|
-
true: {
|
|
51
|
-
pointerEvents: "none",
|
|
52
|
-
userSelect: "none",
|
|
53
|
-
cursor: "not-allowed",
|
|
54
|
-
hoverStyle: {
|
|
55
|
-
borderColor: "$borderColor",
|
|
56
|
-
backgroundColor: "$background"
|
|
57
|
-
},
|
|
58
|
-
pressStyle: {
|
|
59
|
-
borderColor: "$borderColor",
|
|
60
|
-
backgroundColor: "$background"
|
|
61
|
-
},
|
|
62
|
-
focusVisibleStyle: {
|
|
63
|
-
outlineWidth: 0
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}), RADIO_GROUP_INDICATOR_NAME = "RadioGroupIndicator", RadioGroupIndicatorFrame = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
|
|
69
|
-
name: RADIO_GROUP_INDICATOR_NAME,
|
|
70
|
-
width: "53%",
|
|
71
|
-
height: "53%",
|
|
72
|
-
borderRadius: 1e3,
|
|
73
|
-
backgroundColor: "$color",
|
|
74
|
-
pressTheme: !0
|
|
75
|
-
}), RADIO_GROUP_NAME = "RadioGroup", RadioGroupFrame = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
|
|
76
|
-
name: RADIO_GROUP_NAME,
|
|
77
|
-
variants: {
|
|
78
|
-
orientation: {
|
|
79
|
-
horizontal: {
|
|
80
|
-
flexDirection: "row",
|
|
81
|
-
spaceDirection: "horizontal"
|
|
82
|
-
},
|
|
83
|
-
vertical: {
|
|
84
|
-
flexDirection: "column",
|
|
85
|
-
spaceDirection: "vertical"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}), RadioGroup = (0, import_radio_group.createRadioGroup)({
|
|
90
|
-
Frame: RadioGroupFrame,
|
|
91
|
-
Indicator: RadioGroupIndicatorFrame,
|
|
92
|
-
Item: RadioGroupItemFrame
|
|
93
|
-
});
|
|
94
|
-
function RadioGroupUnstyledDemo() {
|
|
95
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroup, { "aria-labelledby": "Select one item", defaultValue: "3", name: "form", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { width: 200, alignItems: "center", space: "$2", children: [
|
|
96
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemWithLabel, { value: "2", label: "Option One" }),
|
|
97
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupItemWithLabel, { value: "3", label: "Option Two" })
|
|
98
|
-
] }) });
|
|
99
|
-
}
|
|
100
|
-
function RadioGroupItemWithLabel(props) {
|
|
101
|
-
const id = `radiogroup-${props.value}`;
|
|
102
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { width: 300, alignItems: "center", gap: "$4", children: [
|
|
103
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroup.Item, { value: props.value, id, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroup.Indicator, {}) }),
|
|
104
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, { htmlFor: id, children: props.label })
|
|
105
|
-
] });
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=RadioGroupUnstyledDemo.js.map
|
|
@@ -1,58 +0,0 @@
|
|
|
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 ReplaceThemeDemo_exports = {};
|
|
24
|
-
__export(ReplaceThemeDemo_exports, {
|
|
25
|
-
ReplaceThemeDemo: () => ReplaceThemeDemo
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(ReplaceThemeDemo_exports);
|
|
28
|
-
var import_react = __toESM(require("react")), import_theme = require("@tamagui/theme"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function ReplaceThemeDemo() {
|
|
30
|
-
const [theme, setTheme] = import_react.default.useState(), update = (0, import_tamagui.useForceUpdate)();
|
|
31
|
-
return (0, import_tamagui.useIsomorphicLayoutEffect)(() => {
|
|
32
|
-
(0, import_theme.addTheme)({
|
|
33
|
-
name: "mytheme",
|
|
34
|
-
insertCSS: !0,
|
|
35
|
-
theme: {
|
|
36
|
-
color: "red",
|
|
37
|
-
color2: "green"
|
|
38
|
-
}
|
|
39
|
-
}), setTheme("mytheme");
|
|
40
|
-
}, []), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { alignItems: "center", space: !0, children: [
|
|
41
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XStack, { gap: "$5", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, { name: theme ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Square, { borderRadius: "$8", size: 100, backgroundColor: "$color" }) }) }),
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
43
|
-
import_tamagui.Button,
|
|
44
|
-
{
|
|
45
|
-
onPress: () => {
|
|
46
|
-
(0, import_theme.replaceTheme)({
|
|
47
|
-
name: "mytheme",
|
|
48
|
-
theme: {
|
|
49
|
-
color: "blue"
|
|
50
|
-
}
|
|
51
|
-
}), update();
|
|
52
|
-
},
|
|
53
|
-
children: "Replace theme to only have $color: blue"
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
] });
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=ReplaceThemeDemo.js.map
|