@tamagui/demos 3.0.0-beta.831.1 → 3.0.0-beta.889.1
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 +1 -1
- package/dist/cjs/AccordionDemo.native.cjs +1 -1
- package/dist/cjs/AccordionDemo.native.js +1 -1
- package/dist/cjs/AccordionDemo.native.js.map +1 -1
- package/dist/cjs/AnimationsPresenceDemo.cjs +2 -2
- package/dist/cjs/AnimationsPresenceDemo.native.cjs +2 -2
- package/dist/cjs/AnimationsPresenceDemo.native.js +2 -2
- package/dist/cjs/AnimationsPresenceDemo.native.js.map +1 -1
- package/dist/cjs/CheckboxDemo.cjs +2 -1
- package/dist/cjs/CheckboxDemo.native.cjs +2 -1
- package/dist/cjs/CheckboxDemo.native.js +2 -1
- package/dist/cjs/CheckboxDemo.native.js.map +1 -1
- package/dist/cjs/TabsAdvancedDemo.cjs +2 -2
- package/dist/cjs/TabsAdvancedDemo.native.cjs +2 -2
- package/dist/cjs/TabsAdvancedDemo.native.js +2 -2
- package/dist/cjs/TabsAdvancedDemo.native.js.map +1 -1
- package/dist/cjs/TabsCustomDemo.cjs +7 -6
- package/dist/cjs/TabsCustomDemo.native.cjs +7 -6
- package/dist/cjs/TabsCustomDemo.native.js +7 -6
- package/dist/cjs/TabsCustomDemo.native.js.map +1 -1
- package/dist/cjs/TabsDemo.cjs +7 -6
- package/dist/cjs/TabsDemo.native.cjs +7 -6
- package/dist/cjs/TabsDemo.native.js +7 -6
- package/dist/cjs/TabsDemo.native.js.map +1 -1
- package/dist/cjs/ToggleGroupDemo.cjs +4 -3
- package/dist/cjs/ToggleGroupDemo.native.cjs +4 -3
- package/dist/cjs/ToggleGroupDemo.native.js +4 -3
- package/dist/cjs/ToggleGroupDemo.native.js.map +1 -1
- package/dist/esm/AccordionDemo.mjs +1 -1
- package/dist/esm/AccordionDemo.mjs.map +1 -1
- package/dist/esm/AccordionDemo.native.js +1 -1
- package/dist/esm/AccordionDemo.native.js.map +1 -1
- package/dist/esm/AnimationsPresenceDemo.mjs +2 -2
- package/dist/esm/AnimationsPresenceDemo.mjs.map +1 -1
- package/dist/esm/AnimationsPresenceDemo.native.js +2 -2
- package/dist/esm/AnimationsPresenceDemo.native.js.map +1 -1
- package/dist/esm/CheckboxDemo.mjs +3 -2
- package/dist/esm/CheckboxDemo.mjs.map +1 -1
- package/dist/esm/CheckboxDemo.native.js +3 -2
- package/dist/esm/CheckboxDemo.native.js.map +1 -1
- package/dist/esm/TabsAdvancedDemo.mjs +2 -2
- package/dist/esm/TabsAdvancedDemo.mjs.map +1 -1
- package/dist/esm/TabsAdvancedDemo.native.js +2 -2
- package/dist/esm/TabsAdvancedDemo.native.js.map +1 -1
- package/dist/esm/TabsCustomDemo.mjs +8 -7
- package/dist/esm/TabsCustomDemo.mjs.map +1 -1
- package/dist/esm/TabsCustomDemo.native.js +8 -7
- package/dist/esm/TabsCustomDemo.native.js.map +1 -1
- package/dist/esm/TabsDemo.mjs +8 -7
- package/dist/esm/TabsDemo.mjs.map +1 -1
- package/dist/esm/TabsDemo.native.js +8 -7
- package/dist/esm/TabsDemo.native.js.map +1 -1
- package/dist/esm/ToggleGroupDemo.mjs +5 -4
- package/dist/esm/ToggleGroupDemo.mjs.map +1 -1
- package/dist/esm/ToggleGroupDemo.native.js +5 -4
- package/dist/esm/ToggleGroupDemo.native.js.map +1 -1
- package/package.json +33 -33
- package/src/AccordionDemo.tsx +2 -2
- package/src/AnimationsPresenceDemo.tsx +5 -7
- package/src/CheckboxDemo.tsx +4 -2
- package/src/TabsAdvancedDemo.tsx +5 -7
- package/src/TabsCustomDemo.tsx +9 -13
- package/src/TabsDemo.tsx +19 -25
- package/src/ToggleGroupDemo.tsx +6 -4
|
@@ -31,7 +31,6 @@ function AccordionDemo() {
|
|
|
31
31
|
type: "multiple",
|
|
32
32
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion.Item, {
|
|
33
33
|
value: "a1",
|
|
34
|
-
mb: -1,
|
|
35
34
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Trigger, {
|
|
36
35
|
flexDirection: "row",
|
|
37
36
|
justify: "space-between",
|
|
@@ -63,6 +62,7 @@ function AccordionDemo() {
|
|
|
63
62
|
flexDirection: "row",
|
|
64
63
|
justify: "space-between",
|
|
65
64
|
borderWidth: 1,
|
|
65
|
+
borderTopWidth: 0,
|
|
66
66
|
borderColor: "border-color",
|
|
67
67
|
children: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, { children: "2. Eat 4 eggs" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Square, {
|
|
68
68
|
transparent: true,
|
|
@@ -33,7 +33,6 @@ function AccordionDemo() {
|
|
|
33
33
|
type: "multiple",
|
|
34
34
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion.Item, {
|
|
35
35
|
value: "a1",
|
|
36
|
-
mb: -1,
|
|
37
36
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Trigger, {
|
|
38
37
|
flexDirection: "row",
|
|
39
38
|
justify: "space-between",
|
|
@@ -68,6 +67,7 @@ function AccordionDemo() {
|
|
|
68
67
|
flexDirection: "row",
|
|
69
68
|
justify: "space-between",
|
|
70
69
|
borderWidth: 1,
|
|
70
|
+
borderTopWidth: 0,
|
|
71
71
|
borderColor: "border-color",
|
|
72
72
|
children: function(param) {
|
|
73
73
|
var { open } = param;
|
|
@@ -33,7 +33,6 @@ function AccordionDemo() {
|
|
|
33
33
|
type: "multiple",
|
|
34
34
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion.Item, {
|
|
35
35
|
value: "a1",
|
|
36
|
-
mb: -1,
|
|
37
36
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Trigger, {
|
|
38
37
|
flexDirection: "row",
|
|
39
38
|
justify: "space-between",
|
|
@@ -68,6 +67,7 @@ function AccordionDemo() {
|
|
|
68
67
|
flexDirection: "row",
|
|
69
68
|
justify: "space-between",
|
|
70
69
|
borderWidth: 1,
|
|
70
|
+
borderTopWidth: 0,
|
|
71
71
|
borderColor: "border-color",
|
|
72
72
|
children: function(param) {
|
|
73
73
|
var { open } = param;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionDemo.native.js","names":[],"sources":["cjs/AccordionDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar AccordionDemo_exports = {};\n__export(AccordionDemo_exports, {\n AccordionDemo: () => AccordionDemo\n});\nmodule.exports = __toCommonJS(AccordionDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_lucide_icons_2 = require(\"@tamagui/lucide-icons-2\");\nvar import_tamagui = require(\"tamagui\");\nfunction AccordionDemo() {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion, {\n overflow: \"hidden\",\n width: \"20\",\n type: \"multiple\",\n children: [\n /*
|
|
1
|
+
{"version":3,"file":"AccordionDemo.native.js","names":[],"sources":["cjs/AccordionDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar AccordionDemo_exports = {};\n__export(AccordionDemo_exports, {\n AccordionDemo: () => AccordionDemo\n});\nmodule.exports = __toCommonJS(AccordionDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_lucide_icons_2 = require(\"@tamagui/lucide-icons-2\");\nvar import_tamagui = require(\"tamagui\");\nfunction AccordionDemo() {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion, {\n overflow: \"hidden\",\n width: \"20\",\n type: \"multiple\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion.Item, {\n value: \"a1\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Trigger, {\n flexDirection: \"row\",\n justify: \"space-between\",\n borderWidth: 1,\n borderColor: \"border-color\",\n children: function(param) {\n var { open } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {\n children: \"1. Take a cold shower\"\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Square, {\n transparent: true,\n transition: \"quick\",\n rotate: open ? \"180deg\" : \"0deg\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons_2.ChevronDown, {\n size: \"1\",\n color: \"color\"\n })\n })\n ]\n });\n }\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.HeightAnimator, {\n transition: \"300ms\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Content, {\n transition: \"300ms\",\n opacity: \"exit:0\",\n borderWidth: 1,\n borderTopWidth: 0,\n borderColor: \"border-color\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {\n children: \"Cold showers can help reduce inflammation, relieve pain, improve circulation, lower stress levels, and reduce muscle soreness and fatigue.\"\n })\n })\n })\n ]\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion.Item, {\n value: \"a2\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Trigger, {\n flexDirection: \"row\",\n justify: \"space-between\",\n borderWidth: 1,\n borderTopWidth: 0,\n borderColor: \"border-color\",\n children: function(param) {\n var { open } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {\n children: \"2. Eat 4 eggs\"\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Square, {\n transparent: true,\n transition: \"quick\",\n rotate: open ? \"180deg\" : \"0deg\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons_2.ChevronDown, {\n size: \"1\",\n color: \"color\"\n })\n })\n ]\n });\n }\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.HeightAnimator, {\n transition: \"300ms\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Content, {\n transition: \"300ms\",\n opacity: \"exit:0\",\n borderWidth: 1,\n borderTopWidth: 0,\n borderColor: \"border-color\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {\n children: \"Eggs have been a dietary staple since time immemorial and there's good reason for their continued presence in our menus and meals.\"\n })\n })\n })\n ]\n })\n ]\n });\n}\n//# sourceMappingURL=AccordionDemo.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,wBAAwB,CAAC;AAC7B,SAAS,uBAAuB,EAC9B,qBAAqB,cACvB,CAAC;AACD,OAAO,UAAU,aAAa,qBAAqB;AACnD,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,wBAAwB,QAAQ,yBAAyB;AAC7D,IAAI,iBAAiB,QAAQ,SAAS;AACtC,SAAS,gBAAgB;CACvB,OAAuB,iBAAC,GAAG,mBAAmB,KAAI,CAAE,eAAe,WAAW;EAC5E,UAA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BAAC,GAAG,mBAAmB,KAAI,CAAE,mBAAmB,UAAU,EAC/E,UAAU,CACQ,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,WAAW,EACpE,UAAU,gBACZ,CAAC,GACe,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,QAAQ;MACjE,aAAa;MACb,YAAY;MACZ,QAAQ,OAAO,WAAW;MAC1B,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,sBAAsB,aAAa;OACvF,MAAM;OACN,OAAO;MACT,CAAC;KACH,CAAC,CACH,EACF,CAAC;IACH;GACF,CAAC,GACe,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,UAAU,gBAAgB;IACnF,YAAY;IACZ,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,UAAU,SAAS;KACtF,YAAY;KACZ,SAAS;KACT,aAAa;KACb,gBAAgB;KAChB,aAAa;KACb,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,WAAW,EAC9E,UAAU,qIACZ,CAAC;IACH,CAAC;GACH,CAAC,CACH;EACF,CAAC,CACH;CACF,CAAC;AACH"}
|
|
@@ -49,11 +49,11 @@ const GalleryItem = (0, import_tamagui.styled)(import_tamagui.YStack, {
|
|
|
49
49
|
opacity: 1,
|
|
50
50
|
position: "absolute",
|
|
51
51
|
inset: 0,
|
|
52
|
-
variants: { going:
|
|
52
|
+
variants: { going: import_tamagui.styled.dynamic((going) => ({
|
|
53
53
|
x: `enter:${going > 0 ? 1e3 : -1e3}px exit:${going < 0 ? 1e3 : -1e3}px`,
|
|
54
54
|
opacity: "enter:0 exit:0",
|
|
55
55
|
zIndex: "exit:0"
|
|
56
|
-
}) }
|
|
56
|
+
})) }
|
|
57
57
|
});
|
|
58
58
|
const wrap = (min, max, v) => {
|
|
59
59
|
const rangeSize = max - min;
|
|
@@ -53,13 +53,13 @@ var GalleryItem = (0, import_tamagui.styled)(import_tamagui.YStack, {
|
|
|
53
53
|
opacity: 1,
|
|
54
54
|
position: "absolute",
|
|
55
55
|
inset: 0,
|
|
56
|
-
variants: { going:
|
|
56
|
+
variants: { going: import_tamagui.styled.dynamic(function(going) {
|
|
57
57
|
return {
|
|
58
58
|
x: `enter:${going > 0 ? 1e3 : -1e3}px exit:${going < 0 ? 1e3 : -1e3}px`,
|
|
59
59
|
opacity: "enter:0 exit:0",
|
|
60
60
|
zIndex: "exit:0"
|
|
61
61
|
};
|
|
62
|
-
} }
|
|
62
|
+
}) }
|
|
63
63
|
});
|
|
64
64
|
var wrap = function(min, max, v) {
|
|
65
65
|
var rangeSize = max - min;
|
|
@@ -53,13 +53,13 @@ var GalleryItem = (0, import_tamagui.styled)(import_tamagui.YStack, {
|
|
|
53
53
|
opacity: 1,
|
|
54
54
|
position: "absolute",
|
|
55
55
|
inset: 0,
|
|
56
|
-
variants: { going:
|
|
56
|
+
variants: { going: import_tamagui.styled.dynamic(function(going) {
|
|
57
57
|
return {
|
|
58
58
|
x: `enter:${going > 0 ? 1e3 : -1e3}px exit:${going < 0 ? 1e3 : -1e3}px`,
|
|
59
59
|
opacity: "enter:0 exit:0",
|
|
60
60
|
zIndex: "exit:0"
|
|
61
61
|
};
|
|
62
|
-
} }
|
|
62
|
+
}) }
|
|
63
63
|
});
|
|
64
64
|
var wrap = function(min, max, v) {
|
|
65
65
|
var rangeSize = max - min;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimationsPresenceDemo.native.js","names":[],"sources":["cjs/AnimationsPresenceDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar AnimationsPresenceDemo_exports = {};\n__export(AnimationsPresenceDemo_exports, {\n AnimationsPresenceDemo: () => AnimationsPresenceDemo,\n images: () => images\n});\nmodule.exports = __toCommonJS(AnimationsPresenceDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_animate_presence = require(\"@tamagui/animate-presence\");\nvar import_lucide_icons_2 = require(\"@tamagui/lucide-icons-2\");\nvar import_tamagui = require(\"tamagui\");\nvar import_photo1 = __toESM(require(\"@tamagui/demos/photo/photo1\"), 1);\nvar import_photo2 = __toESM(require(\"@tamagui/demos/photo/photo2\"), 1);\nvar import_photo3 = __toESM(require(\"@tamagui/demos/photo/photo3\"), 1);\nvar images = [\n import_photo1.default,\n import_photo2.default,\n import_photo3.default\n].map(function(x) {\n return x.src || x;\n});\nvar GalleryItem = (0, import_tamagui.styled)(import_tamagui.YStack, {\n z: 1,\n x: 0,\n opacity: 1,\n position: \"absolute\",\n inset: 0,\n variants: {\n // 1 = right, 0 = nowhere, -1 = left\n going:
|
|
1
|
+
{"version":3,"file":"AnimationsPresenceDemo.native.js","names":[],"sources":["cjs/AnimationsPresenceDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar AnimationsPresenceDemo_exports = {};\n__export(AnimationsPresenceDemo_exports, {\n AnimationsPresenceDemo: () => AnimationsPresenceDemo,\n images: () => images\n});\nmodule.exports = __toCommonJS(AnimationsPresenceDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_animate_presence = require(\"@tamagui/animate-presence\");\nvar import_lucide_icons_2 = require(\"@tamagui/lucide-icons-2\");\nvar import_tamagui = require(\"tamagui\");\nvar import_photo1 = __toESM(require(\"@tamagui/demos/photo/photo1\"), 1);\nvar import_photo2 = __toESM(require(\"@tamagui/demos/photo/photo2\"), 1);\nvar import_photo3 = __toESM(require(\"@tamagui/demos/photo/photo3\"), 1);\nvar images = [\n import_photo1.default,\n import_photo2.default,\n import_photo3.default\n].map(function(x) {\n return x.src || x;\n});\nvar GalleryItem = (0, import_tamagui.styled)(import_tamagui.YStack, {\n z: 1,\n x: 0,\n opacity: 1,\n position: \"absolute\",\n inset: 0,\n variants: {\n // 1 = right, 0 = nowhere, -1 = left\n going: import_tamagui.styled.dynamic(function(going) {\n return {\n x: `enter:${going > 0 ? 1e3 : -1e3}px exit:${going < 0 ? 1e3 : -1e3}px`,\n opacity: \"enter:0 exit:0\",\n zIndex: \"exit:0\"\n };\n })\n }\n});\nvar wrap = function(min, max, v) {\n var rangeSize = max - min;\n return ((v - min) % rangeSize + rangeSize) % rangeSize + min;\n};\nfunction AnimationsPresenceDemo() {\n var [[page, going], setPage] = import_react.default.useState([\n 0,\n 0\n ]);\n var imageIndex = wrap(0, images.length, page);\n var paginate = function(going2) {\n setPage([\n page + going2,\n going2\n ]);\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {\n overflow: \"hidden\",\n bg: \"#000\",\n position: \"relative\",\n height: 300,\n width: \"100%\",\n items: \"center\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence, {\n initial: false,\n custom: {\n going\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GalleryItem, {\n transition: \"slow\",\n going,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Image, {\n src: images[imageIndex],\n width: 820,\n height: 300,\n objectFit: \"cover\"\n })\n }, page)\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, {\n \"aria-label\": \"Carousel left\",\n icon: import_lucide_icons_2.ArrowLeft,\n size: \"5\",\n position: \"absolute\",\n l: \"4\",\n boxShadow: \"0 0 10px rgba(0,0,0,0.5)\",\n z: 100,\n circular: true,\n onPress: function() {\n return paginate(-1);\n }\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, {\n \"aria-label\": \"Carousel right\",\n icon: import_lucide_icons_2.ArrowRight,\n size: \"5\",\n position: \"absolute\",\n r: \"4\",\n boxShadow: \"0 0 10px rgba(0,0,0,0.5)\",\n z: 100,\n circular: true,\n onPress: function() {\n return paginate(1);\n }\n })\n ]\n });\n}\n//# sourceMappingURL=AnimationsPresenceDemo.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iCAAiC,CAAC;AACtC,SAAS,gCAAgC;CACvC,8BAA8B;CAC9B,cAAc;AAChB,CAAC;AAC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;EACzE,UAAU;EACV,IAAI;EACJ,UAAU;EACV,QAAQ;EACR,OAAO;EACP,OAAO;EACP,UAAU;GACQ,iBAAC,GAAG,mBAAmB,IAAG,CAAE,wBAAwB,iBAAiB;IACnF,SAAS;IACT,QAAQ,EACN,MACF;IACA,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa;KACjE,YAAY;KACZ;KACA,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,OAAO;MAC1E,KAAK,OAAO;MACZ,OAAO;MACP,QAAQ;MACR,WAAW;KACb,CAAC;IACH,GAAG,IAAI;GACT,CAAC;GACe,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,QAAQ;IACjE,cAAc;IACd,MAAM,sBAAsB;IAC5B,MAAM;IACN,UAAU;IACV,GAAG;IACH,WAAW;IACX,GAAG;IACH,UAAU;IACV,SAAS,WAAW;KAClB,OAAO,SAAS,CAAC,CAAC;IACpB;GACF,CAAC;GACe,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,QAAQ;IACjE,cAAc;IACd,MAAM,sBAAsB;IAC5B,MAAM;IACN,UAAU;IACV,GAAG;IACH,WAAW;IACX,GAAG;IACH,UAAU;IACV,SAAS,WAAW;KAClB,OAAO,SAAS,CAAC;IACnB;GACF,CAAC;EACH;CACF,CAAC;AACH"}
|
|
@@ -27,6 +27,7 @@ module.exports = __toCommonJS(CheckboxDemo_exports);
|
|
|
27
27
|
var import_lucide_icons_2 = require("@tamagui/lucide-icons-2");
|
|
28
28
|
var import_tamagui = require("tamagui");
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
const checkedStyle = (0, import_tamagui.style)({ backgroundColor: "accent-background" });
|
|
30
31
|
function CheckboxDemo() {
|
|
31
32
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, {
|
|
32
33
|
name: "level3",
|
|
@@ -61,7 +62,7 @@ function CheckboxWithLabel({ size, label = "Accept terms and conditions", disabl
|
|
|
61
62
|
id,
|
|
62
63
|
size,
|
|
63
64
|
disabled,
|
|
64
|
-
activeStyle:
|
|
65
|
+
activeStyle: checkedStyle,
|
|
65
66
|
...checkboxProps,
|
|
66
67
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons_2.Check, {}) })
|
|
67
68
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, {
|
|
@@ -29,6 +29,7 @@ module.exports = __toCommonJS(CheckboxDemo_exports);
|
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
30
|
var import_lucide_icons_2 = require("@tamagui/lucide-icons-2");
|
|
31
31
|
var import_tamagui = require("tamagui");
|
|
32
|
+
var checkedStyle = (0, import_tamagui.style)({ backgroundColor: "accent-background" });
|
|
32
33
|
function CheckboxDemo() {
|
|
33
34
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, {
|
|
34
35
|
name: "level3",
|
|
@@ -64,7 +65,7 @@ function CheckboxWithLabel(param) {
|
|
|
64
65
|
id,
|
|
65
66
|
size,
|
|
66
67
|
disabled,
|
|
67
|
-
activeStyle:
|
|
68
|
+
activeStyle: checkedStyle,
|
|
68
69
|
...checkboxProps,
|
|
69
70
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons_2.Check, {}) })
|
|
70
71
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, {
|
|
@@ -29,6 +29,7 @@ module.exports = __toCommonJS(CheckboxDemo_exports);
|
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
30
|
var import_lucide_icons_2 = require("@tamagui/lucide-icons-2");
|
|
31
31
|
var import_tamagui = require("tamagui");
|
|
32
|
+
var checkedStyle = (0, import_tamagui.style)({ backgroundColor: "accent-background" });
|
|
32
33
|
function CheckboxDemo() {
|
|
33
34
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, {
|
|
34
35
|
name: "level3",
|
|
@@ -64,7 +65,7 @@ function CheckboxWithLabel(param) {
|
|
|
64
65
|
id,
|
|
65
66
|
size,
|
|
66
67
|
disabled,
|
|
67
|
-
activeStyle:
|
|
68
|
+
activeStyle: checkedStyle,
|
|
68
69
|
...checkboxProps,
|
|
69
70
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons_2.Check, {}) })
|
|
70
71
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxDemo.native.js","names":[],"sources":["cjs/CheckboxDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar CheckboxDemo_exports = {};\n__export(CheckboxDemo_exports, {\n CheckboxDemo: () => CheckboxDemo,\n CheckboxWithLabel: () => CheckboxWithLabel\n});\nmodule.exports = __toCommonJS(CheckboxDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_lucide_icons_2 = require(\"@tamagui/lucide-icons-2\");\nvar import_tamagui = require(\"tamagui\");\nfunction CheckboxDemo() {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, {\n name: \"level3\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {\n width: 300,\n items: \"center\",\n gap: \"2\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, {\n size: \"3\"\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, {\n size: \"4\",\n defaultChecked: true\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, {\n size: \"5\",\n disabled: true,\n label: \"Accept terms (disabled)\"\n })\n ]\n })\n });\n}\nfunction CheckboxWithLabel(param) {\n var { size, label = \"Accept terms and conditions\", disabled, ...checkboxProps } = param;\n var id = `checkbox-${size || \"\"}`;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, {\n name: disabled ? \"gray\" : null,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {\n width: 300,\n items: \"center\",\n gap: \"4\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Checkbox, {\n id,\n size,\n disabled,\n activeStyle:
|
|
1
|
+
{"version":3,"file":"CheckboxDemo.native.js","names":[],"sources":["cjs/CheckboxDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar CheckboxDemo_exports = {};\n__export(CheckboxDemo_exports, {\n CheckboxDemo: () => CheckboxDemo,\n CheckboxWithLabel: () => CheckboxWithLabel\n});\nmodule.exports = __toCommonJS(CheckboxDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_lucide_icons_2 = require(\"@tamagui/lucide-icons-2\");\nvar import_tamagui = require(\"tamagui\");\nvar checkedStyle = (0, import_tamagui.style)({\n backgroundColor: \"accent-background\"\n});\nfunction CheckboxDemo() {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, {\n name: \"level3\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {\n width: 300,\n items: \"center\",\n gap: \"2\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, {\n size: \"3\"\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, {\n size: \"4\",\n defaultChecked: true\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, {\n size: \"5\",\n disabled: true,\n label: \"Accept terms (disabled)\"\n })\n ]\n })\n });\n}\nfunction CheckboxWithLabel(param) {\n var { size, label = \"Accept terms and conditions\", disabled, ...checkboxProps } = param;\n var id = `checkbox-${size || \"\"}`;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, {\n name: disabled ? \"gray\" : null,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {\n width: 300,\n items: \"center\",\n gap: \"4\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Checkbox, {\n id,\n size,\n disabled,\n activeStyle: checkedStyle,\n ...checkboxProps,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Checkbox.Indicator, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons_2.Check, {})\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, {\n size,\n htmlFor: id,\n opacity: disabled ? 0.5 : 1,\n children: label\n })\n ]\n })\n });\n}\n//# sourceMappingURL=CheckboxDemo.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,uBAAuB,CAAC;AAC5B,SAAS,sBAAsB;CAC7B,oBAAoB;CACpB,yBAAyB;AAC3B,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,wBAAwB,QAAQ,yBAAyB;AAC7D,IAAI,iBAAiB,QAAQ,SAAS;AACtC,IAAI,gBAAgB,GAAG,eAAe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306,9 +306,9 @@ const AnimatedYStack = (0, import_tamagui.styled)(import_tamagui.YStack, {
|
|
|
306
306
|
x: 0,
|
|
307
307
|
opacity: 1,
|
|
308
308
|
transition: "100ms",
|
|
309
|
-
variants: { direction:
|
|
309
|
+
variants: { direction: import_tamagui.styled.dynamic((direction) => ({
|
|
310
310
|
x: `enter:${direction > 0 ? -25 : 25}px exit:${direction < 0 ? -25 : 25}px`,
|
|
311
311
|
opacity: "enter:0 exit:0",
|
|
312
312
|
zIndex: "exit:0"
|
|
313
|
-
}) }
|
|
313
|
+
})) }
|
|
314
314
|
});
|
|
@@ -347,11 +347,11 @@ var AnimatedYStack = (0, import_tamagui.styled)(import_tamagui.YStack, {
|
|
|
347
347
|
x: 0,
|
|
348
348
|
opacity: 1,
|
|
349
349
|
transition: "100ms",
|
|
350
|
-
variants: { direction:
|
|
350
|
+
variants: { direction: import_tamagui.styled.dynamic(function(direction) {
|
|
351
351
|
return {
|
|
352
352
|
x: `enter:${direction > 0 ? -25 : 25}px exit:${direction < 0 ? -25 : 25}px`,
|
|
353
353
|
opacity: "enter:0 exit:0",
|
|
354
354
|
zIndex: "exit:0"
|
|
355
355
|
};
|
|
356
|
-
} }
|
|
356
|
+
}) }
|
|
357
357
|
});
|
|
@@ -347,13 +347,13 @@ var AnimatedYStack = (0, import_tamagui.styled)(import_tamagui.YStack, {
|
|
|
347
347
|
x: 0,
|
|
348
348
|
opacity: 1,
|
|
349
349
|
transition: "100ms",
|
|
350
|
-
variants: { direction:
|
|
350
|
+
variants: { direction: import_tamagui.styled.dynamic(function(direction) {
|
|
351
351
|
return {
|
|
352
352
|
x: `enter:${direction > 0 ? -25 : 25}px exit:${direction < 0 ? -25 : 25}px`,
|
|
353
353
|
opacity: "enter:0 exit:0",
|
|
354
354
|
zIndex: "exit:0"
|
|
355
355
|
};
|
|
356
|
-
} }
|
|
356
|
+
}) }
|
|
357
357
|
});
|
|
358
358
|
|
|
359
359
|
//# sourceMappingURL=TabsAdvancedDemo.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsAdvancedDemo.native.js","names":[],"sources":["cjs/TabsAdvancedDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar TabsAdvancedDemo_exports = {};\n__export(TabsAdvancedDemo_exports, {\n TabsAdvancedDemo: () => TabsAdvancedDemo\n});\nmodule.exports = __toCommonJS(TabsAdvancedDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_tamagui = require(\"tamagui\");\nvar demos = [\n \"background\",\n \"underline\"\n];\nvar demosTitle = {\n background: \"Background Indicator\",\n underline: \"Underline Indicator\"\n};\nvar TabsAdvancedDemo = function() {\n var [demoIndex, setDemoIndex] = import_react.default.useState(0);\n var demo = demos[demoIndex];\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n demo === \"underline\" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsAdvancedUnderline, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsAdvancedBackground, {}),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XStack, {\n items: \"center\",\n gap: \"4\",\n position: \"absolute\",\n b: \"3\",\n l: \"4\",\n display: \"xxs:none\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, {\n size: \"2\",\n onPress: function() {\n return setDemoIndex(function(x) {\n return (x + 1) % demos.length;\n });\n },\n children: demosTitle[demo]\n })\n })\n ]\n });\n};\nvar TabsAdvancedBackground = function() {\n var [tabState, setTabState] = import_react.default.useState(\n /**\n * Layout of the Tab user might intend to select (hovering / focusing)\n */\n /**\n * Layout of the Tab user selected\n */\n /**\n * Used to get the direction of activation for animating the active indicator\n */\n {\n activeAt: null,\n currentTab: \"tab1\",\n intentAt: null,\n prevActiveAt: null\n }\n );\n var setCurrentTab = function(currentTab2) {\n return setTabState({\n ...tabState,\n currentTab: currentTab2\n });\n };\n var setIntentIndicator = function(intentAt2) {\n return setTabState({\n ...tabState,\n intentAt: intentAt2\n });\n };\n var setActiveIndicator = function(activeAt2) {\n return setTabState({\n ...tabState,\n prevActiveAt: tabState.activeAt,\n activeAt: activeAt2\n });\n };\n var { activeAt, intentAt, prevActiveAt, currentTab } = tabState;\n var direction = (function() {\n if (!activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x) {\n return 0;\n }\n return activeAt.x > prevActiveAt.x ? -1 : 1;\n })();\n var handleOnInteraction = function(type, layout) {\n if (type === \"select\") {\n setActiveIndicator(layout);\n } else {\n setIntentIndicator(layout);\n }\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Tabs, {\n value: currentTab,\n onValueChange: setCurrentTab,\n orientation: \"horizontal\",\n size: \"4\",\n p: \"2\",\n height: 150,\n flexDirection: \"column\",\n bg: \"background\",\n rounded: \"4\",\n activationMode: \"manual\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n children: intentAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRovingIndicator, {\n rounded: \"4\",\n width: intentAt.width,\n height: intentAt.height,\n x: intentAt.x,\n y: intentAt.y\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n children: activeAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRovingIndicator, {\n rounded: \"4\",\n theme: \"accent\",\n width: activeAt.width,\n height: activeAt.height,\n x: activeAt.x,\n y: activeAt.y\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n position: \"relative\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Tabs.List, {\n loop: false,\n \"aria-label\": \"Manage your account\",\n gap: \"2\",\n backgroundColor: \"transparent\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab1\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n children: \"Profile\"\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab2\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n children: \"Connections\"\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab3\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n children: \"Notifications\"\n })\n })\n ]\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n mode: \"wait\",\n custom: {\n direction\n },\n initial: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedYStack, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Content, {\n value: currentTab,\n forceMount: true,\n flex: 1,\n justify: \"center\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, {\n text: \"center\",\n children: currentTab\n })\n })\n }, currentTab)\n })\n ]\n });\n};\nvar TabsAdvancedUnderline = function() {\n var [tabState, setTabState] = import_react.default.useState(\n /**\n * Layout of the Tab user might intend to select (hovering / focusing)\n */\n /**\n * Layout of the Tab user selected\n */\n /**\n * Used to get the direction of activation for animating the active indicator\n */\n {\n activeAt: null,\n currentTab: \"tab1\",\n intentAt: null,\n prevActiveAt: null\n }\n );\n var setCurrentTab = function(currentTab2) {\n return setTabState({\n ...tabState,\n currentTab: currentTab2\n });\n };\n var setIntentIndicator = function(intentAt2) {\n return setTabState({\n ...tabState,\n intentAt: intentAt2\n });\n };\n var setActiveIndicator = function(activeAt2) {\n return setTabState({\n ...tabState,\n prevActiveAt: tabState.activeAt,\n activeAt: activeAt2\n });\n };\n var { activeAt, intentAt, prevActiveAt, currentTab } = tabState;\n var direction = (function() {\n if (!activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x) {\n return 0;\n }\n return activeAt.x > prevActiveAt.x ? -1 : 1;\n })();\n var handleOnInteraction = function(type, layout) {\n if (type === \"select\") {\n setActiveIndicator(layout);\n } else {\n setIntentIndicator(layout);\n }\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Tabs, {\n value: currentTab,\n onValueChange: setCurrentTab,\n orientation: \"horizontal\",\n size: \"4\",\n height: 150,\n flexDirection: \"column\",\n bg: \"background\",\n rounded: \"4\",\n activationMode: \"manual\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {\n position: \"relative\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n children: intentAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRovingIndicator, {\n width: intentAt.width,\n height: \"0-5\",\n x: intentAt.x,\n b: 0\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n children: activeAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRovingIndicator, {\n theme: \"accent\",\n active: true,\n width: activeAt.width,\n height: \"0-5\",\n x: activeAt.x,\n b: 0\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Tabs.List, {\n loop: false,\n \"aria-label\": \"Manage your account\",\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n paddingBottom: \"1-5\",\n borderColor: \"color3\",\n borderBottomWidth: \"0-5\",\n backgroundColor: \"transparent\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab1\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n select: \"none\",\n cursor: \"default\",\n children: \"Profile\"\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab2\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n select: \"none\",\n cursor: \"default\",\n children: \"Connections\"\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab3\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n select: \"none\",\n cursor: \"default\",\n children: \"Notifications\"\n })\n })\n ]\n })\n ]\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n mode: \"wait\",\n custom: {\n direction\n },\n initial: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedYStack, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Content, {\n value: currentTab,\n forceMount: true,\n flex: 1,\n justify: \"center\",\n flexBasis: \"auto\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, {\n text: \"center\",\n children: currentTab\n })\n })\n }, currentTab)\n })\n ]\n });\n};\nvar TabsRovingIndicator = function(param) {\n var { active, ...props } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n position: \"absolute\",\n backgroundColor: \"color5\",\n opacity: \"0.7 enter:0 exit:0\",\n transition: \"100ms\",\n ...active && {\n backgroundColor: \"color5\",\n opacity: 0.6\n },\n ...props\n });\n};\nvar AnimatedYStack = (0, import_tamagui.styled)(import_tamagui.YStack, {\n flex: 1,\n x: 0,\n opacity: 1,\n transition: \"100ms\",\n variants: {\n // 1 = right, 0 = nowhere, -1 = left\n direction: {\n number: function(direction) {\n return {\n x: `enter:${direction > 0 ? -25 : 25}px exit:${direction < 0 ? -25 : 25}px`,\n opacity: \"enter:0 exit:0\",\n zIndex: \"exit:0\"\n };\n }\n }\n }\n});\n//# sourceMappingURL=TabsAdvancedDemo.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QA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GAAG;CACH,SAAS;CACT,YAAY;CACZ,UAAU,EAER,WAAW,EACT,QAAQ,SAAS,WAAW;EAC1B,OAAO;GACL,GAAG,SAAS,YAAY,IAAI,CAAC,KAAK,GAAG,UAAU,YAAY,IAAI,CAAC,KAAK,GAAG;GACxE,SAAS;GACT,QAAQ;EACV;CACF,EACF,EACF;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"TabsAdvancedDemo.native.js","names":[],"sources":["cjs/TabsAdvancedDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar TabsAdvancedDemo_exports = {};\n__export(TabsAdvancedDemo_exports, {\n TabsAdvancedDemo: () => TabsAdvancedDemo\n});\nmodule.exports = __toCommonJS(TabsAdvancedDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_tamagui = require(\"tamagui\");\nvar demos = [\n \"background\",\n \"underline\"\n];\nvar demosTitle = {\n background: \"Background Indicator\",\n underline: \"Underline Indicator\"\n};\nvar TabsAdvancedDemo = function() {\n var [demoIndex, setDemoIndex] = import_react.default.useState(0);\n var demo = demos[demoIndex];\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n demo === \"underline\" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsAdvancedUnderline, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsAdvancedBackground, {}),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XStack, {\n items: \"center\",\n gap: \"4\",\n position: \"absolute\",\n b: \"3\",\n l: \"4\",\n display: \"xxs:none\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, {\n size: \"2\",\n onPress: function() {\n return setDemoIndex(function(x) {\n return (x + 1) % demos.length;\n });\n },\n children: demosTitle[demo]\n })\n })\n ]\n });\n};\nvar TabsAdvancedBackground = function() {\n var [tabState, setTabState] = import_react.default.useState(\n /**\n * Layout of the Tab user might intend to select (hovering / focusing)\n */\n /**\n * Layout of the Tab user selected\n */\n /**\n * Used to get the direction of activation for animating the active indicator\n */\n {\n activeAt: null,\n currentTab: \"tab1\",\n intentAt: null,\n prevActiveAt: null\n }\n );\n var setCurrentTab = function(currentTab2) {\n return setTabState({\n ...tabState,\n currentTab: currentTab2\n });\n };\n var setIntentIndicator = function(intentAt2) {\n return setTabState({\n ...tabState,\n intentAt: intentAt2\n });\n };\n var setActiveIndicator = function(activeAt2) {\n return setTabState({\n ...tabState,\n prevActiveAt: tabState.activeAt,\n activeAt: activeAt2\n });\n };\n var { activeAt, intentAt, prevActiveAt, currentTab } = tabState;\n var direction = (function() {\n if (!activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x) {\n return 0;\n }\n return activeAt.x > prevActiveAt.x ? -1 : 1;\n })();\n var handleOnInteraction = function(type, layout) {\n if (type === \"select\") {\n setActiveIndicator(layout);\n } else {\n setIntentIndicator(layout);\n }\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Tabs, {\n value: currentTab,\n onValueChange: setCurrentTab,\n orientation: \"horizontal\",\n size: \"4\",\n p: \"2\",\n height: 150,\n flexDirection: \"column\",\n bg: \"background\",\n rounded: \"4\",\n activationMode: \"manual\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n children: intentAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRovingIndicator, {\n rounded: \"4\",\n width: intentAt.width,\n height: intentAt.height,\n x: intentAt.x,\n y: intentAt.y\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n children: activeAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRovingIndicator, {\n rounded: \"4\",\n theme: \"accent\",\n width: activeAt.width,\n height: activeAt.height,\n x: activeAt.x,\n y: activeAt.y\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n position: \"relative\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Tabs.List, {\n loop: false,\n \"aria-label\": \"Manage your account\",\n gap: \"2\",\n backgroundColor: \"transparent\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab1\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n children: \"Profile\"\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab2\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n children: \"Connections\"\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab3\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n children: \"Notifications\"\n })\n })\n ]\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n mode: \"wait\",\n custom: {\n direction\n },\n initial: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedYStack, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Content, {\n value: currentTab,\n forceMount: true,\n flex: 1,\n justify: \"center\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, {\n text: \"center\",\n children: currentTab\n })\n })\n }, currentTab)\n })\n ]\n });\n};\nvar TabsAdvancedUnderline = function() {\n var [tabState, setTabState] = import_react.default.useState(\n /**\n * Layout of the Tab user might intend to select (hovering / focusing)\n */\n /**\n * Layout of the Tab user selected\n */\n /**\n * Used to get the direction of activation for animating the active indicator\n */\n {\n activeAt: null,\n currentTab: \"tab1\",\n intentAt: null,\n prevActiveAt: null\n }\n );\n var setCurrentTab = function(currentTab2) {\n return setTabState({\n ...tabState,\n currentTab: currentTab2\n });\n };\n var setIntentIndicator = function(intentAt2) {\n return setTabState({\n ...tabState,\n intentAt: intentAt2\n });\n };\n var setActiveIndicator = function(activeAt2) {\n return setTabState({\n ...tabState,\n prevActiveAt: tabState.activeAt,\n activeAt: activeAt2\n });\n };\n var { activeAt, intentAt, prevActiveAt, currentTab } = tabState;\n var direction = (function() {\n if (!activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x) {\n return 0;\n }\n return activeAt.x > prevActiveAt.x ? -1 : 1;\n })();\n var handleOnInteraction = function(type, layout) {\n if (type === \"select\") {\n setActiveIndicator(layout);\n } else {\n setIntentIndicator(layout);\n }\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Tabs, {\n value: currentTab,\n onValueChange: setCurrentTab,\n orientation: \"horizontal\",\n size: \"4\",\n height: 150,\n flexDirection: \"column\",\n bg: \"background\",\n rounded: \"4\",\n activationMode: \"manual\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {\n position: \"relative\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n children: intentAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRovingIndicator, {\n width: intentAt.width,\n height: \"0-5\",\n x: intentAt.x,\n b: 0\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n children: activeAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsRovingIndicator, {\n theme: \"accent\",\n active: true,\n width: activeAt.width,\n height: \"0-5\",\n x: activeAt.x,\n b: 0\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Tabs.List, {\n loop: false,\n \"aria-label\": \"Manage your account\",\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n paddingBottom: \"1-5\",\n borderColor: \"color3\",\n borderBottomWidth: \"0-5\",\n backgroundColor: \"transparent\",\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab1\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n select: \"none\",\n cursor: \"default\",\n children: \"Profile\"\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab2\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n select: \"none\",\n cursor: \"default\",\n children: \"Connections\"\n })\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, {\n unstyled: true,\n paddingHorizontal: \"3\",\n value: \"tab3\",\n onInteraction: handleOnInteraction,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, {\n select: \"none\",\n cursor: \"default\",\n children: \"Notifications\"\n })\n })\n ]\n })\n ]\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, {\n mode: \"wait\",\n custom: {\n direction\n },\n initial: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedYStack, {\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Content, {\n value: currentTab,\n forceMount: true,\n flex: 1,\n justify: \"center\",\n flexBasis: \"auto\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, {\n text: \"center\",\n children: currentTab\n })\n })\n }, currentTab)\n })\n ]\n });\n};\nvar TabsRovingIndicator = function(param) {\n var { active, ...props } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n position: \"absolute\",\n backgroundColor: \"color5\",\n opacity: \"0.7 enter:0 exit:0\",\n transition: \"100ms\",\n ...active && {\n backgroundColor: \"color5\",\n opacity: 0.6\n },\n ...props\n });\n};\nvar AnimatedYStack = (0, import_tamagui.styled)(import_tamagui.YStack, {\n flex: 1,\n x: 0,\n opacity: 1,\n transition: \"100ms\",\n variants: {\n // 1 = right, 0 = nowhere, -1 = left\n direction: import_tamagui.styled.dynamic(function(direction) {\n return {\n x: `enter:${direction > 0 ? -25 : 25}px exit:${direction < 0 ? -25 : 25}px`,\n opacity: \"enter:0 exit:0\",\n zIndex: \"exit:0\"\n };\n })\n }\n});\n//# sourceMappingURL=TabsAdvanc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eAAe,QAAQ;EACxE,UAAU;EACV,iBAAiB;EACjB,SAAS;EACT,YAAY;EACZ,GAAG,UAAU;GACX,iBAAiB;GACjB,SAAS;EACX;EACA,GAAG;CACL,CAAC;AACH;AACA,IAAI,kBAAkB,GAAG,eAAe,OAAM,CAAE,eAAe,QAAQ;CACrE,MAAM;CACN,GAAG;CACH,SAAS;CACT,YAAY;CACZ,UAAU,EAER,WAAW,eAAe,OAAO,QAAQ,SAAS,WAAW;EAC3D,OAAO;GACL,GAAG,SAAS,YAAY,IAAI,CAAC,KAAK,GAAG,UAAU,YAAY,IAAI,CAAC,KAAK,GAAG;GACxE,SAAS;GACT,QAAQ;EACV;CACF,CAAC,EACH;AACF,CAAC"}
|
|
@@ -31,17 +31,18 @@ var import_react = require("react");
|
|
|
31
31
|
var import_tamagui = require("tamagui");
|
|
32
32
|
var import_tabs = require("@tamagui/tabs");
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
const
|
|
34
|
+
const transparentActiveStyle = (0, import_tamagui.style)({ backgroundColor: "transparent" });
|
|
35
|
+
const tabSizeVariant = import_tamagui.styled.dynamic((value, env) => {
|
|
35
36
|
const { frame } = (0, import_tamagui.resolveTokenSize)(value, {
|
|
36
|
-
tokens:
|
|
37
|
-
font:
|
|
37
|
+
tokens: env.tokens,
|
|
38
|
+
font: env.font
|
|
38
39
|
});
|
|
39
40
|
return {
|
|
40
41
|
borderRadius: frame.radius,
|
|
41
42
|
height: frame.size,
|
|
42
43
|
paddingHorizontal: frame.space
|
|
43
44
|
};
|
|
44
|
-
};
|
|
45
|
+
});
|
|
45
46
|
const demos = ["horizontal", "vertical"];
|
|
46
47
|
const TabsFrame = (0, import_tamagui.styled)(import_tabs.Tabs, { displayName: "TabsFrame" });
|
|
47
48
|
const TabFrame = (0, import_tamagui.styled)(import_tabs.Tabs.Tab, {
|
|
@@ -50,7 +51,7 @@ const TabFrame = (0, import_tamagui.styled)(import_tabs.Tabs.Tab, {
|
|
|
50
51
|
cursor: "pointer",
|
|
51
52
|
backgroundColor: "transparent",
|
|
52
53
|
variants: {
|
|
53
|
-
size:
|
|
54
|
+
size: tabSizeVariant,
|
|
54
55
|
disabled: { true: { pointerEvents: "none" } },
|
|
55
56
|
active: { true: { backgroundColor: "hover:background focus:background" } }
|
|
56
57
|
}
|
|
@@ -106,7 +107,7 @@ const TabsView = ({ flexDirection = "row" }) => {
|
|
|
106
107
|
flexDirection,
|
|
107
108
|
children: content.map((name, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomTabs.Tab, {
|
|
108
109
|
value: name,
|
|
109
|
-
activeStyle:
|
|
110
|
+
activeStyle: transparentActiveStyle,
|
|
110
111
|
children: name
|
|
111
112
|
}, index))
|
|
112
113
|
}), content.map((name, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomTabs.Content, {
|
|
@@ -39,17 +39,18 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
39
39
|
var import_react = __toESM(require("react"), 1);
|
|
40
40
|
var import_tamagui = require("tamagui");
|
|
41
41
|
var import_tabs = require("@tamagui/tabs");
|
|
42
|
-
var
|
|
42
|
+
var transparentActiveStyle = (0, import_tamagui.style)({ backgroundColor: "transparent" });
|
|
43
|
+
var tabSizeVariant = import_tamagui.styled.dynamic(function(value, env) {
|
|
43
44
|
var { frame } = (0, import_tamagui.resolveTokenSize)(value, {
|
|
44
|
-
tokens:
|
|
45
|
-
font:
|
|
45
|
+
tokens: env.tokens,
|
|
46
|
+
font: env.font
|
|
46
47
|
});
|
|
47
48
|
return {
|
|
48
49
|
borderRadius: frame.radius,
|
|
49
50
|
height: frame.size,
|
|
50
51
|
paddingHorizontal: frame.space
|
|
51
52
|
};
|
|
52
|
-
};
|
|
53
|
+
});
|
|
53
54
|
var demos = ["horizontal", "vertical"];
|
|
54
55
|
var TabsFrame = (0, import_tamagui.styled)(import_tabs.Tabs, { displayName: "TabsFrame" });
|
|
55
56
|
var TabFrame = (0, import_tamagui.styled)(import_tabs.Tabs.Tab, {
|
|
@@ -58,7 +59,7 @@ var TabFrame = (0, import_tamagui.styled)(import_tabs.Tabs.Tab, {
|
|
|
58
59
|
cursor: "pointer",
|
|
59
60
|
backgroundColor: "transparent",
|
|
60
61
|
variants: {
|
|
61
|
-
size:
|
|
62
|
+
size: tabSizeVariant,
|
|
62
63
|
disabled: { true: { pointerEvents: "none" } },
|
|
63
64
|
active: { true: { backgroundColor: "hover:background focus:background" } }
|
|
64
65
|
}
|
|
@@ -118,7 +119,7 @@ var TabsView = function(param) {
|
|
|
118
119
|
children: content.map(function(name, index) {
|
|
119
120
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomTabs.Tab, {
|
|
120
121
|
value: name,
|
|
121
|
-
activeStyle:
|
|
122
|
+
activeStyle: transparentActiveStyle,
|
|
122
123
|
children: name
|
|
123
124
|
}, index);
|
|
124
125
|
})
|
|
@@ -39,17 +39,18 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
39
39
|
var import_react = __toESM(require("react"), 1);
|
|
40
40
|
var import_tamagui = require("tamagui");
|
|
41
41
|
var import_tabs = require("@tamagui/tabs");
|
|
42
|
-
var
|
|
42
|
+
var transparentActiveStyle = (0, import_tamagui.style)({ backgroundColor: "transparent" });
|
|
43
|
+
var tabSizeVariant = import_tamagui.styled.dynamic(function(value, env) {
|
|
43
44
|
var { frame } = (0, import_tamagui.resolveTokenSize)(value, {
|
|
44
|
-
tokens:
|
|
45
|
-
font:
|
|
45
|
+
tokens: env.tokens,
|
|
46
|
+
font: env.font
|
|
46
47
|
});
|
|
47
48
|
return {
|
|
48
49
|
borderRadius: frame.radius,
|
|
49
50
|
height: frame.size,
|
|
50
51
|
paddingHorizontal: frame.space
|
|
51
52
|
};
|
|
52
|
-
};
|
|
53
|
+
});
|
|
53
54
|
var demos = ["horizontal", "vertical"];
|
|
54
55
|
var TabsFrame = (0, import_tamagui.styled)(import_tabs.Tabs, { displayName: "TabsFrame" });
|
|
55
56
|
var TabFrame = (0, import_tamagui.styled)(import_tabs.Tabs.Tab, {
|
|
@@ -58,7 +59,7 @@ var TabFrame = (0, import_tamagui.styled)(import_tabs.Tabs.Tab, {
|
|
|
58
59
|
cursor: "pointer",
|
|
59
60
|
backgroundColor: "transparent",
|
|
60
61
|
variants: {
|
|
61
|
-
size:
|
|
62
|
+
size: tabSizeVariant,
|
|
62
63
|
disabled: { true: { pointerEvents: "none" } },
|
|
63
64
|
active: { true: { backgroundColor: "hover:background focus:background" } }
|
|
64
65
|
}
|
|
@@ -118,7 +119,7 @@ var TabsView = function(param) {
|
|
|
118
119
|
children: content.map(function(name, index) {
|
|
119
120
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomTabs.Tab, {
|
|
120
121
|
value: name,
|
|
121
|
-
activeStyle:
|
|
122
|
+
activeStyle: transparentActiveStyle,
|
|
122
123
|
children: name
|
|
123
124
|
}, index);
|
|
124
125
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsCustomDemo.native.js","names":[],"sources":["cjs/TabsCustomDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar TabsCustomDemo_exports = {};\n__export(TabsCustomDemo_exports, {\n ContentFrame: () => ContentFrame,\n CustomTabs: () => CustomTabs,\n TabFrame: () => TabFrame,\n TabsCustomDemo: () => TabsCustomDemo,\n TabsFrame: () => TabsFrame\n});\nmodule.exports = __toCommonJS(TabsCustomDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_tamagui = require(\"tamagui\");\nvar import_tabs = require(\"@tamagui/tabs\");\nvar tabSizeVariant = function(value,
|
|
1
|
+
{"version":3,"file":"TabsCustomDemo.native.js","names":[],"sources":["cjs/TabsCustomDemo.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar TabsCustomDemo_exports = {};\n__export(TabsCustomDemo_exports, {\n ContentFrame: () => ContentFrame,\n CustomTabs: () => CustomTabs,\n TabFrame: () => TabFrame,\n TabsCustomDemo: () => TabsCustomDemo,\n TabsFrame: () => TabsFrame\n});\nmodule.exports = __toCommonJS(TabsCustomDemo_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar import_tamagui = require(\"tamagui\");\nvar import_tabs = require(\"@tamagui/tabs\");\nvar transparentActiveStyle = (0, import_tamagui.style)({\n backgroundColor: \"transparent\"\n});\nvar tabSizeVariant = import_tamagui.styled.dynamic(function(value, env) {\n var { frame } = (0, import_tamagui.resolveTokenSize)(value, {\n tokens: env.tokens,\n font: env.font\n });\n return {\n borderRadius: frame.radius,\n height: frame.size,\n paddingHorizontal: frame.space\n };\n});\nvar demos = [\n \"horizontal\",\n \"vertical\"\n];\nvar TabsFrame = (0, import_tamagui.styled)(import_tabs.Tabs, {\n displayName: \"TabsFrame\"\n});\nvar TabFrame = (0, import_tamagui.styled)(import_tabs.Tabs.Tab, {\n displayName: \"TabsTrigger\",\n render: \"button\",\n cursor: \"pointer\",\n backgroundColor: \"transparent\",\n variants: {\n size: tabSizeVariant,\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n },\n active: {\n true: {\n backgroundColor: \"hover:background focus:background\"\n }\n }\n }\n});\nvar CONTENT_NAME = \"TabsContent\";\nvar ContentFrame = (0, import_tamagui.styled)(import_tabs.Tabs.Content, {\n displayName: CONTENT_NAME,\n flex: 1,\n p: \"6\",\n justify: \"center\",\n items: \"center\",\n bg: \"color4\",\n rounded: \"4\"\n});\nvar CustomTabs = (0, import_tamagui.withStaticProperties)(TabsFrame, {\n List: import_tabs.Tabs.List,\n Tab: TabFrame,\n Content: ContentFrame\n});\nfunction TabsCustomDemo() {\n var [demo, setDemo] = (0, import_react.useState)(demos[0]);\n return (\n // web only fix for position relative\n /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {\n px: \"4\",\n ...import_tamagui.isWeb && {\n position: \"static\"\n },\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsView, {\n flexDirection: demo === \"horizontal\" ? \"row\" : \"column\"\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XStack, {\n items: \"center\",\n gap: \"4\",\n position: \"absolute\",\n b: \"3\",\n l: \"4\",\n display: \"xxs:none\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, {\n size: \"3\",\n onPress: function() {\n return setDemo(demo === \"horizontal\" ? \"vertical\" : \"horizontal\");\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button.Text, {\n textTransform: \"capitalize\",\n children: demo\n })\n })\n })\n ]\n })\n );\n}\nvar content = [\n \"Home\",\n \"Profile\",\n \"Settings\"\n];\nvar TabsView = function(param) {\n var { flexDirection = \"row\" } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CustomTabs, {\n flexDirection: flexDirection === \"column\" ? \"row\" : \"column\",\n defaultValue: content[0],\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomTabs.List, {\n flexDirection,\n children: content.map(function(name, index) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomTabs.Tab, {\n value: name,\n activeStyle: transparentActiveStyle,\n children: name\n }, index);\n })\n }),\n content.map(function(name, index) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomTabs.Content, {\n value: name,\n children: name\n }, index);\n })\n ]\n });\n};\n//# sourceMappingURL=TabsCustomDemo.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB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