@tamagui/stacks 1.14.0 → 1.14.2
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 +58 -1
- package/dist/cjs/SizableStack.js.map +2 -2
- package/dist/cjs/Stacks.js +71 -1
- package/dist/cjs/Stacks.js.map +2 -2
- package/dist/cjs/ThemeableStack.js +67 -1
- package/dist/cjs/ThemeableStack.js.map +2 -2
- package/dist/cjs/getElevation.js +63 -1
- package/dist/cjs/getElevation.js.map +2 -2
- package/dist/cjs/index.js +20 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/variants.js +128 -1
- package/dist/cjs/variants.js.map +2 -2
- package/dist/esm/SizableStack.js +41 -1
- package/dist/esm/SizableStack.js.map +2 -2
- package/dist/esm/SizableStack.mjs +41 -1
- package/dist/esm/SizableStack.mjs.map +2 -2
- package/dist/esm/Stacks.js +44 -1
- package/dist/esm/Stacks.js.map +2 -2
- package/dist/esm/Stacks.mjs +44 -1
- package/dist/esm/Stacks.mjs.map +2 -2
- package/dist/esm/ThemeableStack.js +52 -1
- package/dist/esm/ThemeableStack.js.map +2 -2
- package/dist/esm/ThemeableStack.mjs +52 -1
- package/dist/esm/ThemeableStack.mjs.map +2 -2
- package/dist/esm/getElevation.js +41 -1
- package/dist/esm/getElevation.js.map +2 -2
- package/dist/esm/getElevation.mjs +41 -1
- package/dist/esm/getElevation.mjs.map +2 -2
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +3 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/variants.js +97 -1
- package/dist/esm/variants.js.map +2 -2
- package/dist/esm/variants.mjs +97 -1
- package/dist/esm/variants.mjs.map +2 -2
- package/dist/jsx/SizableStack.js +41 -1
- package/dist/jsx/SizableStack.js.map +2 -2
- package/dist/jsx/SizableStack.mjs +41 -1
- package/dist/jsx/SizableStack.mjs.map +2 -2
- package/dist/jsx/Stacks.js +44 -1
- package/dist/jsx/Stacks.js.map +2 -2
- package/dist/jsx/Stacks.mjs +44 -1
- package/dist/jsx/Stacks.mjs.map +2 -2
- package/dist/jsx/ThemeableStack.js +52 -1
- package/dist/jsx/ThemeableStack.js.map +2 -2
- package/dist/jsx/ThemeableStack.mjs +52 -1
- package/dist/jsx/ThemeableStack.mjs.map +2 -2
- package/dist/jsx/getElevation.js +41 -1
- package/dist/jsx/getElevation.js.map +2 -2
- package/dist/jsx/getElevation.mjs +41 -1
- package/dist/jsx/getElevation.mjs.map +2 -2
- package/dist/jsx/index.js +3 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +3 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/variants.js +97 -1
- package/dist/jsx/variants.js.map +2 -2
- package/dist/jsx/variants.mjs +97 -1
- package/dist/jsx/variants.mjs.map +2 -2
- package/package.json +4 -4
package/dist/cjs/SizableStack.js
CHANGED
|
@@ -1,2 +1,59 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
+
});
|
|
2
59
|
//# 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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AACjC,8BAA+B;AAE/B,oBAA+B;AAC/B,sBAOO;AAEA,MAAM,mBAAe,oBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW;AAAA,IACb;AAAA,EACF;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/cjs/Stacks.js
CHANGED
|
@@ -1,2 +1,72 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
+
});
|
|
2
72
|
//# 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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwC;AAExC,0BAA6B;AAMtB,MAAM,kBAAkB;AAAA,EAC7B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,WAAW;AAAA,EACf,YAAY;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,WAAW;AAAA,IACT,WAAW;AAAA,EACb;AACF;AAEO,MAAM,aAAS,oBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf,MAAM;AAAA,EACN;AACF,CAAC;AAEM,MAAM,aAAS,oBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf,MAAM;AAAA,EACN;AACF,CAAC;AAEM,MAAM,aAAS;AAAA,EACpB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,EACZ;AACF;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,68 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
+
});
|
|
2
68
|
//# 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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AAEjC,oBAAuB;AACvB,sBASO;AAEP,MAAM,kBAAkB;AAAA,EACtB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AACf;AAEO,MAAM,qBAAiB,oBAAO,sBAAQ;AAAA,EAC3C,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,cAAc;AAAA,MACZ,MAAM;AAAA,QACJ,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,aAAa;AAAA,MACX,MAAM;AAAA,QACJ,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IAEA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,KAAK;AAAA,QACH,GAAG;AAAA,QACH,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/cjs/getElevation.js
CHANGED
|
@@ -1,2 +1,64 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
+
});
|
|
2
64
|
//# 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": ["
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOO;AAEA,MAAM,eAAsD,CAAC,MAAM,WAAW;AACnF,MAAI,CAAC;AAAM;AACX,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,QAAQ,OAAO,KAAK,IAAI;AAC9B,QAAM,cAAW,wBAAW,KAAK,IAAI,CAAC,MAAM,MAAM;AAClD,SAAO,kBAAkB,SAAS,MAAM;AAC1C;AAEO,MAAM,oBAAoB,CAC/B,KACA,EAAE,OAAO,OAAO,MACb;AACH,MAAI,MAAM;AACV,MAAI,QAAQ,MAAM;AAChB,UAAMA,WAAM,8BAAiB,OAAO,KAAK,MAAM,CAAC;AAChD,QAAI,OAAOA,SAAQ,UAAU;AAC3B,YAAMA;AAAA,IACR,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF,OAAO;AACL,UAAM,CAAC;AAAA,EACT;AACA,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,QAAQ,QAAQ,MAAM,GAAG,GAAG;AAE9B,cAAQ,KAAK,cAAc,KAAK,GAAG;AAAA,IACrC;AAAA,EACF;AACA,QAAM,CAAC,QAAQ,YAAY,IAAI,CAAC,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,KAAK,MAAM,MAAM,IAAI,CAAC,CAAC;AAChF,QAAM,SAAS;AAAA,IACb,aAAa,MAAM;AAAA,IACnB;AAAA,IACA,cAAc,EAAE,QAAQ,OAAO,EAAE;AAAA,EACnC;AACA,SAAO;AACT;",
|
|
6
|
+
"names": ["val"]
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
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);
|
|
2
21
|
//# 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": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,wBAAd;AACA,wBAAc,8BADd;AAEA,wBAAc,gCAFd;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/cjs/variants.js
CHANGED
|
@@ -1,2 +1,129 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
+
});
|
|
2
129
|
//# 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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAEtB,MAAM,UAAU;AAAA,EACrB,MAAM,CAAC,GAAY,WAAgB;AACjC,eAAO,kCAAa,OAAO,MAAM,MAAM,GAAG,MAAM;AAAA,EAClD;AACF;AAEO,MAAM,WAAW,CAAC,KAAuB,EAAE,MAAM,MAAM;AAC5D,SAAO;AAAA;AAAA,IAEL,aAAa,OAAO,QAAQ,WAAW,MAAM;AAAA,IAC7C,aAAa;AAAA,IAEb,GAAI,MAAM,cAAc;AAAA,MACtB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,GAAI,MAAM,cAAc;AAAA,MACtB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,GAAI,MAAM,cAAc;AAAA,MACtB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,SAAS;AAAA,EACpB,MAAM,CAAC,GAAG,WAAW;AACnB,UAAM,EAAE,QAAQ,MAAM,IAAI;AAC1B,WAAO;AAAA,MACL,SAAS,OAAO,MAAM,MAAM,IAAI,KAAK,OAAO,MAAM,OAAO;AAAA,IAC3D;AAAA,EACF;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,GAAG,WAAW;AACnB,UAAM,EAAE,QAAQ,MAAM,IAAI;AAC1B,WAAO;AAAA,MACL,cAAc,OAAO,OAAO,MAAM,IAAI,KAAK,OAAO,OAAO,OAAO;AAAA,IAClE;AAAA,EACF;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,GAAG,EAAE,OAAO,OAAO,MAAM;AAC9B,UAAM,OAAO,OAAO,KAAK,MAAM,IAAI;AACnC,WAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU;AAAA,MACV,WAAW;AAAA,MACX,cAAc;AAAA,MACd,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAEO,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
package/dist/esm/SizableStack.js
CHANGED
|
@@ -1,2 +1,42 @@
|
|
|
1
|
-
import{styled
|
|
1
|
+
import { styled } from "@tamagui/core";
|
|
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
|
+
};
|
|
2
42
|
//# 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,SAAmB,cAAc;AACjC,SAAS,sBAAsB;AAE/B,SAAS,cAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,eAAe,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW;AAAA,IACb;AAAA,EACF;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,42 @@
|
|
|
1
|
-
import{styled
|
|
1
|
+
import { styled } from "@tamagui/core";
|
|
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
|
+
};
|
|
2
42
|
//# sourceMappingURL=SizableStack.mjs.map
|