@tamagui/stacks 1.13.3 → 1.14.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/SizableStack.js +1 -58
- package/dist/cjs/SizableStack.js.map +2 -2
- package/dist/cjs/Stacks.js +1 -71
- package/dist/cjs/Stacks.js.map +2 -2
- package/dist/cjs/ThemeableStack.js +1 -67
- package/dist/cjs/ThemeableStack.js.map +2 -2
- package/dist/cjs/getElevation.js +1 -63
- package/dist/cjs/getElevation.js.map +2 -2
- package/dist/cjs/index.js +1 -20
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/variants.js +1 -128
- package/dist/cjs/variants.js.map +2 -2
- package/dist/esm/SizableStack.js +1 -41
- package/dist/esm/SizableStack.js.map +2 -2
- package/dist/esm/SizableStack.mjs +1 -41
- package/dist/esm/SizableStack.mjs.map +2 -2
- package/dist/esm/Stacks.js +1 -44
- package/dist/esm/Stacks.js.map +2 -2
- package/dist/esm/Stacks.mjs +1 -44
- package/dist/esm/Stacks.mjs.map +2 -2
- package/dist/esm/ThemeableStack.js +1 -52
- package/dist/esm/ThemeableStack.js.map +2 -2
- package/dist/esm/ThemeableStack.mjs +1 -52
- package/dist/esm/ThemeableStack.mjs.map +2 -2
- package/dist/esm/getElevation.js +1 -41
- package/dist/esm/getElevation.js.map +2 -2
- package/dist/esm/getElevation.mjs +1 -41
- package/dist/esm/getElevation.mjs.map +2 -2
- package/dist/esm/index.js +1 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +1 -3
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/variants.js +1 -97
- package/dist/esm/variants.js.map +2 -2
- package/dist/esm/variants.mjs +1 -97
- package/dist/esm/variants.mjs.map +2 -2
- package/dist/jsx/SizableStack.js +1 -41
- package/dist/jsx/SizableStack.js.map +2 -2
- package/dist/jsx/SizableStack.mjs +1 -41
- package/dist/jsx/SizableStack.mjs.map +2 -2
- package/dist/jsx/Stacks.js +1 -44
- package/dist/jsx/Stacks.js.map +2 -2
- package/dist/jsx/Stacks.mjs +1 -44
- package/dist/jsx/Stacks.mjs.map +2 -2
- package/dist/jsx/ThemeableStack.js +1 -52
- package/dist/jsx/ThemeableStack.js.map +2 -2
- package/dist/jsx/ThemeableStack.mjs +1 -52
- package/dist/jsx/ThemeableStack.mjs.map +2 -2
- package/dist/jsx/getElevation.js +1 -41
- package/dist/jsx/getElevation.js.map +2 -2
- package/dist/jsx/getElevation.mjs +1 -41
- package/dist/jsx/getElevation.mjs.map +2 -2
- package/dist/jsx/index.js +1 -3
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +1 -3
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/variants.js +1 -97
- package/dist/jsx/variants.js.map +2 -2
- package/dist/jsx/variants.mjs +1 -97
- package/dist/jsx/variants.mjs.map +2 -2
- package/package.json +4 -4
package/dist/cjs/SizableStack.js
CHANGED
|
@@ -1,59 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var SizableStack_exports = {};
|
|
20
|
-
__export(SizableStack_exports, {
|
|
21
|
-
SizableStack: () => SizableStack
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(SizableStack_exports);
|
|
24
|
-
var import_core = require("@tamagui/core");
|
|
25
|
-
var import_get_button_sized = require("@tamagui/get-button-sized");
|
|
26
|
-
var import_Stacks = require("./Stacks");
|
|
27
|
-
var import_variants = require("./variants");
|
|
28
|
-
const SizableStack = (0, import_core.styled)(import_Stacks.XStack, {
|
|
29
|
-
name: "SizableStack",
|
|
30
|
-
variants: {
|
|
31
|
-
unstyled: {
|
|
32
|
-
true: {
|
|
33
|
-
hoverTheme: false,
|
|
34
|
-
pressTheme: false,
|
|
35
|
-
focusTheme: false,
|
|
36
|
-
elevate: false,
|
|
37
|
-
bordered: false
|
|
38
|
-
},
|
|
39
|
-
false: {
|
|
40
|
-
backgroundColor: "$background",
|
|
41
|
-
flexShrink: 1
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
hoverTheme: import_variants.hoverTheme,
|
|
45
|
-
pressTheme: import_variants.pressTheme,
|
|
46
|
-
focusTheme: import_variants.focusTheme,
|
|
47
|
-
circular: import_variants.circular,
|
|
48
|
-
elevate: import_variants.elevate,
|
|
49
|
-
bordered: import_variants.bordered,
|
|
50
|
-
size: {
|
|
51
|
-
"...size": import_get_button_sized.getButtonSized
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
-
0 && (module.exports = {
|
|
57
|
-
SizableStack
|
|
58
|
-
});
|
|
1
|
+
"use strict";var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var d=(o,r)=>{for(var a in r)s(o,a,{get:r[a],enumerable:!0})},h=(o,r,a,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of p(r))!S.call(o,t)&&t!==a&&s(o,t,{get:()=>r[t],enumerable:!(l=i(r,t))||l.enumerable});return o};var k=o=>h(s({},"__esModule",{value:!0}),o);var b={};d(b,{SizableStack:()=>n});module.exports=k(b);var m=require("@tamagui/core"),c=require("@tamagui/get-button-sized"),f=require("./Stacks"),e=require("./variants");const n=(0,m.styled)(f.XStack,{name:"SizableStack",variants:{unstyled:{true:{hoverTheme:!1,pressTheme:!1,focusTheme:!1,elevate:!1,bordered:!1},false:{backgroundColor:"$background",flexShrink:1}},hoverTheme:e.hoverTheme,pressTheme:e.pressTheme,focusTheme:e.focusTheme,circular:e.circular,elevate:e.elevate,bordered:e.bordered,size:{"...size":c.getButtonSized}}});0&&(module.exports={SizableStack});
|
|
59
2
|
//# sourceMappingURL=SizableStack.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SizableStack.tsx"],
|
|
4
4
|
"sourcesContent": ["import { GetProps, styled } from '@tamagui/core'\nimport { getButtonSized } from '@tamagui/get-button-sized'\n\nimport { XStack, YStack } from './Stacks'\nimport {\n bordered,\n circular,\n elevate,\n focusTheme,\n hoverTheme,\n pressTheme,\n} from './variants'\n\nexport const SizableStack = styled(XStack, {\n name: 'SizableStack',\n\n variants: {\n unstyled: {\n true: {\n hoverTheme: false,\n pressTheme: false,\n focusTheme: false,\n elevate: false,\n bordered: false,\n },\n false: {\n backgroundColor: '$background',\n flexShrink: 1,\n },\n },\n\n hoverTheme,\n pressTheme,\n focusTheme,\n circular,\n elevate,\n bordered,\n\n size: {\n '...size': getButtonSized,\n },\n } as const,\n})\n\nexport type SizableStackProps = GetProps<typeof SizableStack>\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAiC,yBACjCC,EAA+B,qCAE/BC,EAA+B,oBAC/BC,EAOO,sBAEA,MAAML,KAAe,UAAO,SAAQ,CACzC,KAAM,eAEN,SAAU,CACR,SAAU,CACR,KAAM,CACJ,WAAY,GACZ,WAAY,GACZ,WAAY,GACZ,QAAS,GACT,SAAU,EACZ,EACA,MAAO,CACL,gBAAiB,cACjB,WAAY,CACd,CACF,EAEA,wBACA,wBACA,wBACA,oBACA,kBACA,oBAEA,KAAM,CACJ,UAAW,gBACb,CACF,CACF,CAAC",
|
|
6
|
+
"names": ["SizableStack_exports", "__export", "SizableStack", "__toCommonJS", "import_core", "import_get_button_sized", "import_Stacks", "import_variants"]
|
|
7
7
|
}
|
package/dist/cjs/Stacks.js
CHANGED
|
@@ -1,72 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var Stacks_exports = {};
|
|
20
|
-
__export(Stacks_exports, {
|
|
21
|
-
XStack: () => XStack,
|
|
22
|
-
YStack: () => YStack,
|
|
23
|
-
ZStack: () => ZStack,
|
|
24
|
-
fullscreenStyle: () => fullscreenStyle
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(Stacks_exports);
|
|
27
|
-
var import_core = require("@tamagui/core");
|
|
28
|
-
var import_getElevation = require("./getElevation.js");
|
|
29
|
-
const fullscreenStyle = {
|
|
30
|
-
position: "absolute",
|
|
31
|
-
top: 0,
|
|
32
|
-
left: 0,
|
|
33
|
-
right: 0,
|
|
34
|
-
bottom: 0
|
|
35
|
-
};
|
|
36
|
-
const variants = {
|
|
37
|
-
fullscreen: {
|
|
38
|
-
true: fullscreenStyle
|
|
39
|
-
},
|
|
40
|
-
elevation: {
|
|
41
|
-
"...size": import_getElevation.getElevation
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const YStack = (0, import_core.styled)(import_core.Stack, {
|
|
45
|
-
flexDirection: "column",
|
|
46
|
-
name: "YStack",
|
|
47
|
-
variants
|
|
48
|
-
});
|
|
49
|
-
const XStack = (0, import_core.styled)(import_core.Stack, {
|
|
50
|
-
flexDirection: "row",
|
|
51
|
-
name: "XStack",
|
|
52
|
-
variants
|
|
53
|
-
});
|
|
54
|
-
const ZStack = (0, import_core.styled)(
|
|
55
|
-
YStack,
|
|
56
|
-
{
|
|
57
|
-
name: "ZStack",
|
|
58
|
-
position: "relative"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
neverFlatten: true,
|
|
62
|
-
isZStack: true
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
-
0 && (module.exports = {
|
|
67
|
-
XStack,
|
|
68
|
-
YStack,
|
|
69
|
-
ZStack,
|
|
70
|
-
fullscreenStyle
|
|
71
|
-
});
|
|
1
|
+
"use strict";var c=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var a in t)c(e,a,{get:t[a],enumerable:!0})},f=(e,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of k(t))!m.call(e,r)&&r!==a&&c(e,r,{get:()=>t[r],enumerable:!(s=S(t,r))||s.enumerable});return e};var u=e=>f(c({},"__esModule",{value:!0}),e);var Y={};x(Y,{XStack:()=>P,YStack:()=>l,ZStack:()=>y,fullscreenStyle:()=>i});module.exports=u(Y);var o=require("@tamagui/core"),n=require("./getElevation.js");const i={position:"absolute",top:0,left:0,right:0,bottom:0},p={fullscreen:{true:i},elevation:{"...size":n.getElevation}},l=(0,o.styled)(o.Stack,{flexDirection:"column",name:"YStack",variants:p}),P=(0,o.styled)(o.Stack,{flexDirection:"row",name:"XStack",variants:p}),y=(0,o.styled)(l,{name:"ZStack",position:"relative"},{neverFlatten:!0,isZStack:!0});0&&(module.exports={XStack,YStack,ZStack,fullscreenStyle});
|
|
72
2
|
//# sourceMappingURL=Stacks.js.map
|
package/dist/cjs/Stacks.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Stacks.tsx"],
|
|
4
4
|
"sourcesContent": ["import { GetProps, Stack, styled } from '@tamagui/core'\n\nimport { getElevation } from './getElevation.js'\n\nexport type YStackProps = GetProps<typeof YStack>\nexport type XStackProps = YStackProps\nexport type ZStackProps = YStackProps\n\nexport const fullscreenStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n} as const\n\nconst variants = {\n fullscreen: {\n true: fullscreenStyle,\n },\n elevation: {\n '...size': getElevation,\n },\n} as const\n\nexport const YStack = styled(Stack, {\n flexDirection: 'column',\n name: 'YStack',\n variants,\n})\n\nexport const XStack = styled(Stack, {\n flexDirection: 'row',\n name: 'XStack',\n variants,\n})\n\nexport const ZStack = styled(\n YStack,\n {\n name: 'ZStack',\n position: 'relative',\n },\n {\n neverFlatten: true,\n isZStack: true,\n }\n)\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,WAAAC,EAAA,WAAAC,EAAA,oBAAAC,IAAA,eAAAC,EAAAN,GAAA,IAAAO,EAAwC,yBAExCC,EAA6B,6BAMtB,MAAMH,EAAkB,CAC7B,SAAU,WACV,IAAK,EACL,KAAM,EACN,MAAO,EACP,OAAQ,CACV,EAEMI,EAAW,CACf,WAAY,CACV,KAAMJ,CACR,EACA,UAAW,CACT,UAAW,cACb,CACF,EAEaF,KAAS,UAAO,QAAO,CAClC,cAAe,SACf,KAAM,SACN,SAAAM,CACF,CAAC,EAEYP,KAAS,UAAO,QAAO,CAClC,cAAe,MACf,KAAM,SACN,SAAAO,CACF,CAAC,EAEYL,KAAS,UACpBD,EACA,CACE,KAAM,SACN,SAAU,UACZ,EACA,CACE,aAAc,GACd,SAAU,EACZ,CACF",
|
|
6
|
+
"names": ["Stacks_exports", "__export", "XStack", "YStack", "ZStack", "fullscreenStyle", "__toCommonJS", "import_core", "import_getElevation", "variants"]
|
|
7
7
|
}
|
|
@@ -1,68 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var ThemeableStack_exports = {};
|
|
20
|
-
__export(ThemeableStack_exports, {
|
|
21
|
-
ThemeableStack: () => ThemeableStack
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(ThemeableStack_exports);
|
|
24
|
-
var import_core = require("@tamagui/core");
|
|
25
|
-
var import_Stacks = require("./Stacks.js");
|
|
26
|
-
var import_variants = require("./variants.js");
|
|
27
|
-
const chromelessStyle = {
|
|
28
|
-
backgroundColor: "transparent",
|
|
29
|
-
borderColor: "transparent",
|
|
30
|
-
shadowColor: "transparent"
|
|
31
|
-
};
|
|
32
|
-
const ThemeableStack = (0, import_core.styled)(import_Stacks.YStack, {
|
|
33
|
-
name: "SizableStack",
|
|
34
|
-
variants: {
|
|
35
|
-
backgrounded: {
|
|
36
|
-
true: {
|
|
37
|
-
backgroundColor: "$background"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
radiused: import_variants.radiused,
|
|
41
|
-
hoverTheme: import_variants.hoverTheme,
|
|
42
|
-
pressTheme: import_variants.pressTheme,
|
|
43
|
-
focusTheme: import_variants.focusTheme,
|
|
44
|
-
circular: import_variants.circular,
|
|
45
|
-
padded: import_variants.padded,
|
|
46
|
-
elevate: import_variants.elevate,
|
|
47
|
-
bordered: import_variants.bordered,
|
|
48
|
-
transparent: {
|
|
49
|
-
true: {
|
|
50
|
-
backgroundColor: "transparent"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
chromeless: {
|
|
54
|
-
true: chromelessStyle,
|
|
55
|
-
all: {
|
|
56
|
-
...chromelessStyle,
|
|
57
|
-
hoverStyle: chromelessStyle,
|
|
58
|
-
pressStyle: chromelessStyle,
|
|
59
|
-
focusStyle: chromelessStyle
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
-
0 && (module.exports = {
|
|
66
|
-
ThemeableStack
|
|
67
|
-
});
|
|
1
|
+
"use strict";var l=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var b=(o,r)=>{for(var s in r)l(o,s,{get:r[s],enumerable:!0})},h=(o,r,s,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of m(r))!u.call(o,t)&&t!==s&&l(o,t,{get:()=>r[t],enumerable:!(n=d(r,t))||n.enumerable});return o};var k=o=>h(l({},"__esModule",{value:!0}),o);var i={};b(i,{ThemeableStack:()=>S});module.exports=k(i);var c=require("@tamagui/core"),p=require("./Stacks.js"),e=require("./variants.js");const a={backgroundColor:"transparent",borderColor:"transparent",shadowColor:"transparent"},S=(0,c.styled)(p.YStack,{name:"SizableStack",variants:{backgrounded:{true:{backgroundColor:"$background"}},radiused:e.radiused,hoverTheme:e.hoverTheme,pressTheme:e.pressTheme,focusTheme:e.focusTheme,circular:e.circular,padded:e.padded,elevate:e.elevate,bordered:e.bordered,transparent:{true:{backgroundColor:"transparent"}},chromeless:{true:a,all:{...a,hoverStyle:a,pressStyle:a,focusStyle:a}}}});0&&(module.exports={ThemeableStack});
|
|
68
2
|
//# sourceMappingURL=ThemeableStack.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ThemeableStack.tsx"],
|
|
4
4
|
"sourcesContent": ["import { GetProps, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks.js'\nimport {\n bordered,\n circular,\n elevate,\n focusTheme,\n hoverTheme,\n padded,\n pressTheme,\n radiused,\n} from './variants.js'\n\nconst chromelessStyle = {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n shadowColor: 'transparent',\n}\n\nexport const ThemeableStack = styled(YStack, {\n name: 'SizableStack',\n\n variants: {\n backgrounded: {\n true: {\n backgroundColor: '$background',\n },\n },\n\n radiused,\n hoverTheme,\n pressTheme,\n focusTheme,\n circular,\n padded,\n elevate,\n bordered,\n\n transparent: {\n true: {\n backgroundColor: 'transparent',\n },\n },\n\n chromeless: {\n true: chromelessStyle,\n all: {\n ...chromelessStyle,\n hoverStyle: chromelessStyle,\n pressStyle: chromelessStyle,\n focusStyle: chromelessStyle,\n },\n },\n } as const,\n})\n\nexport type ThemeableStackProps = GetProps<typeof ThemeableStack>\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAiC,yBAEjCC,EAAuB,uBACvBC,EASO,yBAEP,MAAMC,EAAkB,CACtB,gBAAiB,cACjB,YAAa,cACb,YAAa,aACf,EAEaL,KAAiB,UAAO,SAAQ,CAC3C,KAAM,eAEN,SAAU,CACR,aAAc,CACZ,KAAM,CACJ,gBAAiB,aACnB,CACF,EAEA,oBACA,wBACA,wBACA,wBACA,oBACA,gBACA,kBACA,oBAEA,YAAa,CACX,KAAM,CACJ,gBAAiB,aACnB,CACF,EAEA,WAAY,CACV,KAAMK,EACN,IAAK,CACH,GAAGA,EACH,WAAYA,EACZ,WAAYA,EACZ,WAAYA,CACd,CACF,CACF,CACF,CAAC",
|
|
6
|
+
"names": ["ThemeableStack_exports", "__export", "ThemeableStack", "__toCommonJS", "import_core", "import_Stacks", "import_variants", "chromelessStyle"]
|
|
7
7
|
}
|
package/dist/cjs/getElevation.js
CHANGED
|
@@ -1,64 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var getElevation_exports = {};
|
|
20
|
-
__export(getElevation_exports, {
|
|
21
|
-
getElevation: () => getElevation,
|
|
22
|
-
getSizedElevation: () => getSizedElevation
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(getElevation_exports);
|
|
25
|
-
var import_core = require("@tamagui/core");
|
|
26
|
-
const getElevation = (size, extras) => {
|
|
27
|
-
if (!size)
|
|
28
|
-
return;
|
|
29
|
-
const { tokens } = extras;
|
|
30
|
-
const token = tokens.size[size];
|
|
31
|
-
const sizeNum = (0, import_core.isVariable)(token) ? +token.val : size;
|
|
32
|
-
return getSizedElevation(sizeNum, extras);
|
|
33
|
-
};
|
|
34
|
-
const getSizedElevation = (val, { theme, tokens }) => {
|
|
35
|
-
let num = 0;
|
|
36
|
-
if (val === true) {
|
|
37
|
-
const val2 = (0, import_core.getVariableValue)(tokens.size["true"]);
|
|
38
|
-
if (typeof val2 === "number") {
|
|
39
|
-
num = val2;
|
|
40
|
-
} else {
|
|
41
|
-
num = 10;
|
|
42
|
-
}
|
|
43
|
-
} else {
|
|
44
|
-
num = +val;
|
|
45
|
-
}
|
|
46
|
-
if (process.env.NODE_ENV === "development") {
|
|
47
|
-
if (num !== null && isNaN(num)) {
|
|
48
|
-
console.warn("NaN shadow", num, val);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
|
|
52
|
-
const shadow = {
|
|
53
|
-
shadowColor: theme.shadowColor,
|
|
54
|
-
shadowRadius,
|
|
55
|
-
shadowOffset: { height, width: 0 }
|
|
56
|
-
};
|
|
57
|
-
return shadow;
|
|
58
|
-
};
|
|
59
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
-
0 && (module.exports = {
|
|
61
|
-
getElevation,
|
|
62
|
-
getSizedElevation
|
|
63
|
-
});
|
|
1
|
+
"use strict";var s=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(e,o)=>{for(var n in o)s(e,n,{get:o[n],enumerable:!0})},S=(e,o,n,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of c(o))!h.call(e,a)&&a!==n&&s(e,a,{get:()=>o[a],enumerable:!(t=l(o,a))||t.enumerable});return e};var f=e=>S(s({},"__esModule",{value:!0}),e);var m={};p(m,{getElevation:()=>w,getSizedElevation:()=>d});module.exports=f(m);var r=require("@tamagui/core");const w=(e,o)=>{if(!e)return;const{tokens:n}=o,t=n.size[e],a=(0,r.isVariable)(t)?+t.val:e;return d(a,o)},d=(e,{theme:o,tokens:n})=>{let t=0;if(e===!0){const i=(0,r.getVariableValue)(n.size.true);typeof i=="number"?t=i:t=10}else t=+e;process.env.NODE_ENV==="development"&&t!==null&&isNaN(t)&&console.warn("NaN shadow",t,e);const[a,u]=[Math.round(t/4+1),Math.round(t/2+2)];return{shadowColor:o.shadowColor,shadowRadius:u,shadowOffset:{height:a,width:0}}};0&&(module.exports={getElevation,getSizedElevation});
|
|
64
2
|
//# sourceMappingURL=getElevation.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/getElevation.tsx"],
|
|
4
4
|
"sourcesContent": ["import {\n SizeTokens,\n SizeVariantSpreadFunction,\n StackProps,\n VariantSpreadExtras,\n getVariableValue,\n isVariable,\n} from '@tamagui/core'\n\nexport const getElevation: SizeVariantSpreadFunction<StackProps> = (size, extras) => {\n if (!size) return\n const { tokens } = extras\n const token = tokens.size[size]\n const sizeNum = (isVariable(token) ? +token.val : size) as number\n return getSizedElevation(sizeNum, extras)\n}\n\nexport const getSizedElevation = (\n val: SizeTokens | number | boolean,\n { theme, tokens }: VariantSpreadExtras<any>\n) => {\n let num = 0\n if (val === true) {\n const val = getVariableValue(tokens.size['true'])\n if (typeof val === 'number') {\n num = val\n } else {\n num = 10\n }\n } else {\n num = +val\n }\n if (process.env.NODE_ENV === 'development') {\n if (num !== null && isNaN(num)) {\n // eslint-disable-next-line no-console\n console.warn('NaN shadow', num, val)\n }\n }\n const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)]\n const shadow = {\n shadowColor: theme.shadowColor,\n shadowRadius,\n shadowOffset: { height, width: 0 },\n }\n return shadow\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["val"]
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kBAAAE,EAAA,sBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAOO,yBAEA,MAAMH,EAAsD,CAACI,EAAMC,IAAW,CACnF,GAAI,CAACD,EAAM,OACX,KAAM,CAAE,OAAAE,CAAO,EAAID,EACbE,EAAQD,EAAO,KAAKF,CAAI,EACxBI,KAAW,cAAWD,CAAK,EAAI,CAACA,EAAM,IAAMH,EAClD,OAAOH,EAAkBO,EAASH,CAAM,CAC1C,EAEaJ,EAAoB,CAC/BQ,EACA,CAAE,MAAAC,EAAO,OAAAJ,CAAO,IACb,CACH,IAAIK,EAAM,EACV,GAAIF,IAAQ,GAAM,CAChB,MAAMA,KAAM,oBAAiBH,EAAO,KAAK,IAAO,EAC5C,OAAOG,GAAQ,SACjBE,EAAMF,EAENE,EAAM,EAEV,MACEA,EAAM,CAACF,EAEL,QAAQ,IAAI,WAAa,eACvBE,IAAQ,MAAQ,MAAMA,CAAG,GAE3B,QAAQ,KAAK,aAAcA,EAAKF,CAAG,EAGvC,KAAM,CAACG,EAAQC,CAAY,EAAI,CAAC,KAAK,MAAMF,EAAM,EAAI,CAAC,EAAG,KAAK,MAAMA,EAAM,EAAI,CAAC,CAAC,EAMhF,MALe,CACb,YAAaD,EAAM,YACnB,aAAAG,EACA,aAAc,CAAE,OAAAD,EAAQ,MAAO,CAAE,CACnC,CAEF",
|
|
6
|
+
"names": ["getElevation_exports", "__export", "getElevation", "getSizedElevation", "__toCommonJS", "import_core", "size", "extras", "tokens", "token", "sizeNum", "val", "theme", "num", "height", "shadowRadius"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
-
var src_exports = {};
|
|
17
|
-
module.exports = __toCommonJS(src_exports);
|
|
18
|
-
__reExport(src_exports, require("./Stacks.js"), module.exports);
|
|
19
|
-
__reExport(src_exports, require("./SizableStack.js"), module.exports);
|
|
20
|
-
__reExport(src_exports, require("./ThemeableStack.js"), module.exports);
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(f,r,p,x)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of c(r))!d.call(f,m)&&m!==p&&a(f,m,{get:()=>r[m],enumerable:!(x=b(r,m))||x.enumerable});return f},e=(f,r,p)=>(t(f,r,"default"),p&&t(p,r,"default"));var g=f=>t(a({},"__esModule",{value:!0}),f);var o={};module.exports=g(o);e(o,require("./Stacks.js"),module.exports);e(o,require("./SizableStack.js"),module.exports);e(o,require("./ThemeableStack.js"),module.exports);
|
|
21
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": ["export * from './Stacks.js'\nexport * from './SizableStack.js'\nexport * from './ThemeableStack.js'\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,uBAAd,gBACAE,EAAAF,EAAc,6BADd,gBAEAE,EAAAF,EAAc,+BAFd",
|
|
6
|
+
"names": ["src_exports", "__toCommonJS", "__reExport"]
|
|
7
7
|
}
|
package/dist/cjs/variants.js
CHANGED
|
@@ -1,129 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var variants_exports = {};
|
|
20
|
-
__export(variants_exports, {
|
|
21
|
-
bordered: () => bordered,
|
|
22
|
-
circular: () => circular,
|
|
23
|
-
elevate: () => elevate,
|
|
24
|
-
focusTheme: () => focusTheme,
|
|
25
|
-
hoverTheme: () => hoverTheme,
|
|
26
|
-
padded: () => padded,
|
|
27
|
-
pressTheme: () => pressTheme,
|
|
28
|
-
radiused: () => radiused
|
|
29
|
-
});
|
|
30
|
-
module.exports = __toCommonJS(variants_exports);
|
|
31
|
-
var import_getElevation = require("./getElevation");
|
|
32
|
-
const elevate = {
|
|
33
|
-
true: (_, extras) => {
|
|
34
|
-
return (0, import_getElevation.getElevation)(extras.props["size"], extras);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const bordered = (val, { props }) => {
|
|
38
|
-
return {
|
|
39
|
-
// TODO size it with size in '...size'
|
|
40
|
-
borderWidth: typeof val === "number" ? val : 1,
|
|
41
|
-
borderColor: "$borderColor",
|
|
42
|
-
...props.hoverTheme && {
|
|
43
|
-
hoverStyle: {
|
|
44
|
-
borderColor: "$borderColorHover"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
...props.pressTheme && {
|
|
48
|
-
pressStyle: {
|
|
49
|
-
borderColor: "$borderColorPress"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
...props.focusTheme && {
|
|
53
|
-
focusStyle: {
|
|
54
|
-
borderColor: "$borderColorFocus"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
const padded = {
|
|
60
|
-
true: (_, extras) => {
|
|
61
|
-
const { tokens, props } = extras;
|
|
62
|
-
return {
|
|
63
|
-
padding: tokens.space[props.size] || tokens.space["$true"]
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const radiused = {
|
|
68
|
-
true: (_, extras) => {
|
|
69
|
-
const { tokens, props } = extras;
|
|
70
|
-
return {
|
|
71
|
-
borderRadius: tokens.radius[props.size] || tokens.radius["$true"]
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
const circular = {
|
|
76
|
-
true: (_, { props, tokens }) => {
|
|
77
|
-
const size = tokens.size[props.size];
|
|
78
|
-
return {
|
|
79
|
-
width: size,
|
|
80
|
-
height: size,
|
|
81
|
-
maxWidth: size,
|
|
82
|
-
maxHeight: size,
|
|
83
|
-
minWidth: size,
|
|
84
|
-
minHeight: size,
|
|
85
|
-
borderRadius: 1e5,
|
|
86
|
-
padding: 0
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
const hoverTheme = {
|
|
91
|
-
true: {
|
|
92
|
-
hoverStyle: {
|
|
93
|
-
backgroundColor: "$backgroundHover",
|
|
94
|
-
borderColor: "$borderColorHover"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
false: {}
|
|
98
|
-
};
|
|
99
|
-
const pressTheme = {
|
|
100
|
-
true: {
|
|
101
|
-
cursor: "pointer",
|
|
102
|
-
pressStyle: {
|
|
103
|
-
backgroundColor: "$backgroundPress",
|
|
104
|
-
borderColor: "$borderColorPress"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
false: {}
|
|
108
|
-
};
|
|
109
|
-
const focusTheme = {
|
|
110
|
-
true: {
|
|
111
|
-
focusStyle: {
|
|
112
|
-
backgroundColor: "$backgroundFocus",
|
|
113
|
-
borderColor: "$borderColorFocus"
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
false: {}
|
|
117
|
-
};
|
|
118
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
-
0 && (module.exports = {
|
|
120
|
-
bordered,
|
|
121
|
-
circular,
|
|
122
|
-
elevate,
|
|
123
|
-
focusTheme,
|
|
124
|
-
hoverTheme,
|
|
125
|
-
padded,
|
|
126
|
-
pressTheme,
|
|
127
|
-
radiused
|
|
128
|
-
});
|
|
1
|
+
"use strict";var d=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var b=(o,r)=>{for(var t in r)d(o,t,{get:r[t],enumerable:!0})},i=(o,r,t,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of l(r))!c.call(o,s)&&s!==t&&d(o,s,{get:()=>r[s],enumerable:!(e=n(r,s))||e.enumerable});return o};var a=o=>i(d({},"__esModule",{value:!0}),o);var k={};b(k,{bordered:()=>h,circular:()=>g,elevate:()=>p,focusTheme:()=>x,hoverTheme:()=>$,padded:()=>C,pressTheme:()=>f,radiused:()=>m});module.exports=a(k);var u=require("./getElevation");const p={true:(o,r)=>(0,u.getElevation)(r.props.size,r)},h=(o,{props:r})=>({borderWidth:typeof o=="number"?o:1,borderColor:"$borderColor",...r.hoverTheme&&{hoverStyle:{borderColor:"$borderColorHover"}},...r.pressTheme&&{pressStyle:{borderColor:"$borderColorPress"}},...r.focusTheme&&{focusStyle:{borderColor:"$borderColorFocus"}}}),C={true:(o,r)=>{const{tokens:t,props:e}=r;return{padding:t.space[e.size]||t.space.$true}}},m={true:(o,r)=>{const{tokens:t,props:e}=r;return{borderRadius:t.radius[e.size]||t.radius.$true}}},g={true:(o,{props:r,tokens:t})=>{const e=t.size[r.size];return{width:e,height:e,maxWidth:e,maxHeight:e,minWidth:e,minHeight:e,borderRadius:1e5,padding:0}}},$={true:{hoverStyle:{backgroundColor:"$backgroundHover",borderColor:"$borderColorHover"}},false:{}},f={true:{cursor:"pointer",pressStyle:{backgroundColor:"$backgroundPress",borderColor:"$borderColorPress"}},false:{}},x={true:{focusStyle:{backgroundColor:"$backgroundFocus",borderColor:"$borderColorFocus"}},false:{}};0&&(module.exports={bordered,circular,elevate,focusTheme,hoverTheme,padded,pressTheme,radiused});
|
|
129
2
|
//# sourceMappingURL=variants.js.map
|
package/dist/cjs/variants.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/variants.tsx"],
|
|
4
4
|
"sourcesContent": ["import { getElevation } from './getElevation'\n\nexport const elevate = {\n true: (_: boolean, extras: any) => {\n return getElevation(extras.props['size'], extras)\n },\n}\n\nexport const bordered = (val: boolean | number, { props }) => {\n return {\n // TODO size it with size in '...size'\n borderWidth: typeof val === 'number' ? val : 1,\n borderColor: '$borderColor',\n\n ...(props.hoverTheme && {\n hoverStyle: {\n borderColor: '$borderColorHover',\n },\n }),\n\n ...(props.pressTheme && {\n pressStyle: {\n borderColor: '$borderColorPress',\n },\n }),\n\n ...(props.focusTheme && {\n focusStyle: {\n borderColor: '$borderColorFocus',\n },\n }),\n }\n}\n\nexport const padded = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n padding: tokens.space[props.size] || tokens.space['$true'],\n }\n },\n}\n\nexport const radiused = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n borderRadius: tokens.radius[props.size] || tokens.radius['$true'],\n }\n },\n}\n\nexport const circular = {\n true: (_, { props, tokens }) => {\n const size = tokens.size[props.size]\n return {\n width: size,\n height: size,\n maxWidth: size,\n maxHeight: size,\n minWidth: size,\n minHeight: size,\n borderRadius: 100_000,\n padding: 0,\n }\n },\n}\n\nexport const hoverTheme = {\n true: {\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n borderColor: '$borderColorHover',\n },\n },\n false: {},\n}\n\nexport const pressTheme = {\n true: {\n cursor: 'pointer',\n pressStyle: {\n backgroundColor: '$backgroundPress',\n borderColor: '$borderColorPress',\n },\n },\n false: {},\n}\n\nexport const focusTheme = {\n true: {\n focusStyle: {\n backgroundColor: '$backgroundFocus',\n borderColor: '$borderColorFocus',\n },\n },\n false: {},\n}\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,cAAAE,EAAA,aAAAC,EAAA,YAAAC,EAAA,eAAAC,EAAA,eAAAC,EAAA,WAAAC,EAAA,eAAAC,EAAA,aAAAC,IAAA,eAAAC,EAAAV,GAAA,IAAAW,EAA6B,0BAEtB,MAAMP,EAAU,CACrB,KAAM,CAACQ,EAAYC,OACV,gBAAaA,EAAO,MAAM,KAASA,CAAM,CAEpD,EAEaX,EAAW,CAACY,EAAuB,CAAE,MAAAC,CAAM,KAC/C,CAEL,YAAa,OAAOD,GAAQ,SAAWA,EAAM,EAC7C,YAAa,eAEb,GAAIC,EAAM,YAAc,CACtB,WAAY,CACV,YAAa,mBACf,CACF,EAEA,GAAIA,EAAM,YAAc,CACtB,WAAY,CACV,YAAa,mBACf,CACF,EAEA,GAAIA,EAAM,YAAc,CACtB,WAAY,CACV,YAAa,mBACf,CACF,CACF,GAGWR,EAAS,CACpB,KAAM,CAACK,EAAGC,IAAW,CACnB,KAAM,CAAE,OAAAG,EAAQ,MAAAD,CAAM,EAAIF,EAC1B,MAAO,CACL,QAASG,EAAO,MAAMD,EAAM,IAAI,GAAKC,EAAO,MAAM,KACpD,CACF,CACF,EAEaP,EAAW,CACtB,KAAM,CAACG,EAAGC,IAAW,CACnB,KAAM,CAAE,OAAAG,EAAQ,MAAAD,CAAM,EAAIF,EAC1B,MAAO,CACL,aAAcG,EAAO,OAAOD,EAAM,IAAI,GAAKC,EAAO,OAAO,KAC3D,CACF,CACF,EAEab,EAAW,CACtB,KAAM,CAACS,EAAG,CAAE,MAAAG,EAAO,OAAAC,CAAO,IAAM,CAC9B,MAAMC,EAAOD,EAAO,KAAKD,EAAM,IAAI,EACnC,MAAO,CACL,MAAOE,EACP,OAAQA,EACR,SAAUA,EACV,UAAWA,EACX,SAAUA,EACV,UAAWA,EACX,aAAc,IACd,QAAS,CACX,CACF,CACF,EAEaX,EAAa,CACxB,KAAM,CACJ,WAAY,CACV,gBAAiB,mBACjB,YAAa,mBACf,CACF,EACA,MAAO,CAAC,CACV,EAEaE,EAAa,CACxB,KAAM,CACJ,OAAQ,UACR,WAAY,CACV,gBAAiB,mBACjB,YAAa,mBACf,CACF,EACA,MAAO,CAAC,CACV,EAEaH,EAAa,CACxB,KAAM,CACJ,WAAY,CACV,gBAAiB,mBACjB,YAAa,mBACf,CACF,EACA,MAAO,CAAC,CACV",
|
|
6
|
+
"names": ["variants_exports", "__export", "bordered", "circular", "elevate", "focusTheme", "hoverTheme", "padded", "pressTheme", "radiused", "__toCommonJS", "import_getElevation", "_", "extras", "val", "props", "tokens", "size"]
|
|
7
7
|
}
|
package/dist/esm/SizableStack.js
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getButtonSized } from "@tamagui/get-button-sized";
|
|
3
|
-
import { XStack } from "./Stacks";
|
|
4
|
-
import {
|
|
5
|
-
bordered,
|
|
6
|
-
circular,
|
|
7
|
-
elevate,
|
|
8
|
-
focusTheme,
|
|
9
|
-
hoverTheme,
|
|
10
|
-
pressTheme
|
|
11
|
-
} from "./variants";
|
|
12
|
-
const SizableStack = styled(XStack, {
|
|
13
|
-
name: "SizableStack",
|
|
14
|
-
variants: {
|
|
15
|
-
unstyled: {
|
|
16
|
-
true: {
|
|
17
|
-
hoverTheme: false,
|
|
18
|
-
pressTheme: false,
|
|
19
|
-
focusTheme: false,
|
|
20
|
-
elevate: false,
|
|
21
|
-
bordered: false
|
|
22
|
-
},
|
|
23
|
-
false: {
|
|
24
|
-
backgroundColor: "$background",
|
|
25
|
-
flexShrink: 1
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
hoverTheme,
|
|
29
|
-
pressTheme,
|
|
30
|
-
focusTheme,
|
|
31
|
-
circular,
|
|
32
|
-
elevate,
|
|
33
|
-
bordered,
|
|
34
|
-
size: {
|
|
35
|
-
"...size": getButtonSized
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
export {
|
|
40
|
-
SizableStack
|
|
41
|
-
};
|
|
1
|
+
import{styled as e}from"@tamagui/core";import{getButtonSized as r}from"@tamagui/get-button-sized";import{XStack as o}from"./Stacks";import{bordered as t,circular as a,elevate as s,focusTheme as l,hoverTheme as m,pressTheme as c}from"./variants";const k=e(o,{name:"SizableStack",variants:{unstyled:{true:{hoverTheme:!1,pressTheme:!1,focusTheme:!1,elevate:!1,bordered:!1},false:{backgroundColor:"$background",flexShrink:1}},hoverTheme:m,pressTheme:c,focusTheme:l,circular:a,elevate:s,bordered:t,size:{"...size":r}}});export{k as SizableStack};
|
|
42
2
|
//# sourceMappingURL=SizableStack.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SizableStack.tsx"],
|
|
4
4
|
"sourcesContent": ["import { GetProps, styled } from '@tamagui/core'\nimport { getButtonSized } from '@tamagui/get-button-sized'\n\nimport { XStack, YStack } from './Stacks'\nimport {\n bordered,\n circular,\n elevate,\n focusTheme,\n hoverTheme,\n pressTheme,\n} from './variants'\n\nexport const SizableStack = styled(XStack, {\n name: 'SizableStack',\n\n variants: {\n unstyled: {\n true: {\n hoverTheme: false,\n pressTheme: false,\n focusTheme: false,\n elevate: false,\n bordered: false,\n },\n false: {\n backgroundColor: '$background',\n flexShrink: 1,\n },\n },\n\n hoverTheme,\n pressTheme,\n focusTheme,\n circular,\n elevate,\n bordered,\n\n size: {\n '...size': getButtonSized,\n },\n } as const,\n})\n\nexport type SizableStackProps = GetProps<typeof SizableStack>\n"],
|
|
5
|
-
"mappings": "AAAA,
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,OAAmB,UAAAA,MAAc,gBACjC,OAAS,kBAAAC,MAAsB,4BAE/B,OAAS,UAAAC,MAAsB,WAC/B,OACE,YAAAC,EACA,YAAAC,EACA,WAAAC,EACA,cAAAC,EACA,cAAAC,EACA,cAAAC,MACK,aAEA,MAAMC,EAAeT,EAAOE,EAAQ,CACzC,KAAM,eAEN,SAAU,CACR,SAAU,CACR,KAAM,CACJ,WAAY,GACZ,WAAY,GACZ,WAAY,GACZ,QAAS,GACT,SAAU,EACZ,EACA,MAAO,CACL,gBAAiB,cACjB,WAAY,CACd,CACF,EAEA,WAAAK,EACA,WAAAC,EACA,WAAAF,EACA,SAAAF,EACA,QAAAC,EACA,SAAAF,EAEA,KAAM,CACJ,UAAWF,CACb,CACF,CACF,CAAC",
|
|
6
|
+
"names": ["styled", "getButtonSized", "XStack", "bordered", "circular", "elevate", "focusTheme", "hoverTheme", "pressTheme", "SizableStack"]
|
|
7
7
|
}
|
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getButtonSized } from "@tamagui/get-button-sized";
|
|
3
|
-
import { XStack } from "./Stacks";
|
|
4
|
-
import {
|
|
5
|
-
bordered,
|
|
6
|
-
circular,
|
|
7
|
-
elevate,
|
|
8
|
-
focusTheme,
|
|
9
|
-
hoverTheme,
|
|
10
|
-
pressTheme
|
|
11
|
-
} from "./variants";
|
|
12
|
-
const SizableStack = styled(XStack, {
|
|
13
|
-
name: "SizableStack",
|
|
14
|
-
variants: {
|
|
15
|
-
unstyled: {
|
|
16
|
-
true: {
|
|
17
|
-
hoverTheme: false,
|
|
18
|
-
pressTheme: false,
|
|
19
|
-
focusTheme: false,
|
|
20
|
-
elevate: false,
|
|
21
|
-
bordered: false
|
|
22
|
-
},
|
|
23
|
-
false: {
|
|
24
|
-
backgroundColor: "$background",
|
|
25
|
-
flexShrink: 1
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
hoverTheme,
|
|
29
|
-
pressTheme,
|
|
30
|
-
focusTheme,
|
|
31
|
-
circular,
|
|
32
|
-
elevate,
|
|
33
|
-
bordered,
|
|
34
|
-
size: {
|
|
35
|
-
"...size": getButtonSized
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
export {
|
|
40
|
-
SizableStack
|
|
41
|
-
};
|
|
1
|
+
import{styled as e}from"@tamagui/core";import{getButtonSized as r}from"@tamagui/get-button-sized";import{XStack as o}from"./Stacks";import{bordered as t,circular as a,elevate as s,focusTheme as l,hoverTheme as m,pressTheme as c}from"./variants";const k=e(o,{name:"SizableStack",variants:{unstyled:{true:{hoverTheme:!1,pressTheme:!1,focusTheme:!1,elevate:!1,bordered:!1},false:{backgroundColor:"$background",flexShrink:1}},hoverTheme:m,pressTheme:c,focusTheme:l,circular:a,elevate:s,bordered:t,size:{"...size":r}}});export{k as SizableStack};
|
|
42
2
|
//# sourceMappingURL=SizableStack.mjs.map
|