@tamagui/theme-base 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.
@@ -1,65 +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 colorUtils_exports = {};
20
- __export(colorUtils_exports, {
21
- hexToRGBA: () => hexToRGBA,
22
- setColorAlpha: () => setColorAlpha
23
- });
24
- module.exports = __toCommonJS(colorUtils_exports);
25
- var import_core = require("@tamagui/core");
26
- const hexToRGBA = (hex, alpha = 1) => {
27
- if (!isValidHex(hex)) {
28
- throw new Error("Invalid HEX");
29
- }
30
- const chunkSize = Math.floor((hex.length - 1) / 3);
31
- const hexArr = getChunksFromString(hex.slice(1), chunkSize);
32
- const [r, g, b, a] = (hexArr == null ? void 0 : hexArr.map(convertHexUnitTo256)) ?? [];
33
- return `rgba(${r}, ${g}, ${b}, ${getAlphaFloat(a, alpha)})`;
34
- };
35
- const setColorAlpha = (colorIn, alpha = 1) => {
36
- const color = `${(0, import_core.getVariableValue)(colorIn)}`;
37
- if (color.startsWith("hsl(")) {
38
- return color.replace("hsl", "hsla").replace(")", `, ${alpha})`);
39
- }
40
- if (color.startsWith("#")) {
41
- return hexToRGBA(color, alpha);
42
- }
43
- if (color.startsWith("rgb(")) {
44
- return color.replace("rgb", "rgba").replace(")", `, ${alpha})`);
45
- }
46
- return color;
47
- };
48
- const isValidHex = (hex) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
49
- const getChunksFromString = (st, chunkSize = 0) => st.match(new RegExp(`.{${chunkSize}}`, "g"));
50
- const convertHexUnitTo256 = (hexStr) => parseInt(hexStr.repeat(2 / hexStr.length), 16);
51
- const getAlphaFloat = (a, alpha = 1) => {
52
- if (a !== void 0) {
53
- return a / 255;
54
- }
55
- if (typeof alpha !== "number" || alpha < 0 || alpha > 1) {
56
- return 1;
57
- }
58
- return alpha;
59
- };
60
- // Annotate the CommonJS export names for ESM import in node:
61
- 0 && (module.exports = {
62
- hexToRGBA,
63
- setColorAlpha
64
- });
1
+ "use strict";var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var p=(t,r)=>{for(var e in r)o(t,e,{get:r[e],enumerable:!0})},$=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of f(r))!b.call(t,n)&&n!==e&&o(t,n,{get:()=>r[n],enumerable:!(s=u(r,n))||s.enumerable});return t};var h=t=>$(o({},"__esModule",{value:!0}),t);var E={};p(E,{hexToRGBA:()=>a,setColorAlpha:()=>m});module.exports=h(E);var i=require("@tamagui/core");const a=(t,r=1)=>{if(!V(t))throw new Error("Invalid HEX");const e=Math.floor((t.length-1)/3),s=d(t.slice(1),e),[n,c,g,l]=(s==null?void 0:s.map(w))??[];return`rgba(${n}, ${c}, ${g}, ${A(l,r)})`},m=(t,r=1)=>{const e=`${(0,i.getVariableValue)(t)}`;return e.startsWith("hsl(")?e.replace("hsl","hsla").replace(")",`, ${r})`):e.startsWith("#")?a(e,r):e.startsWith("rgb(")?e.replace("rgb","rgba").replace(")",`, ${r})`):e},V=t=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(t),d=(t,r=0)=>t.match(new RegExp(`.{${r}}`,"g")),w=t=>parseInt(t.repeat(2/t.length),16),A=(t,r=1)=>t!==void 0?t/255:typeof r!="number"||r<0||r>1?1:r;0&&(module.exports={hexToRGBA,setColorAlpha});
65
2
  //# sourceMappingURL=colorUtils.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/colorUtils.tsx"],
4
4
  "sourcesContent": ["import { Variable, getVariableValue } from '@tamagui/core'\n\nexport const hexToRGBA = (hex: string, alpha = 1) => {\n if (!isValidHex(hex)) {\n throw new Error('Invalid HEX')\n }\n const chunkSize = Math.floor((hex.length - 1) / 3)\n const hexArr = getChunksFromString(hex.slice(1), chunkSize)\n const [r, g, b, a] = hexArr?.map(convertHexUnitTo256) ?? []\n return `rgba(${r}, ${g}, ${b}, ${getAlphaFloat(a, alpha)})`\n}\n\nexport const setColorAlpha = (colorIn: string | Variable, alpha = 1) => {\n const color = `${getVariableValue(colorIn)}`\n if (color.startsWith('hsl(')) {\n return color.replace('hsl', 'hsla').replace(')', `, ${alpha})`)\n }\n if (color.startsWith('#')) {\n return hexToRGBA(color, alpha)\n }\n if (color.startsWith('rgb(')) {\n return color.replace('rgb', 'rgba').replace(')', `, ${alpha})`)\n }\n return color\n}\n\nconst isValidHex = (hex: string) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex)\n\nconst getChunksFromString = (st: string, chunkSize = 0) =>\n st.match(new RegExp(`.{${chunkSize}}`, 'g'))\n\nconst convertHexUnitTo256 = (hexStr: string) =>\n parseInt(hexStr.repeat(2 / hexStr.length), 16)\n\nconst getAlphaFloat = (a: any, alpha = 1) => {\n if (a !== undefined) {\n return a / 255\n }\n if (typeof alpha !== 'number' || alpha < 0 || alpha > 1) {\n return 1\n }\n return alpha\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA2C;AAEpC,MAAM,YAAY,CAAC,KAAa,QAAQ,MAAM;AACnD,MAAI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", "g", "b", "a", "convertHexUnitTo256", "getAlphaFloat", "colorIn", "color", "st", "hexStr"]
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -1,26 +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("./themes"), module.exports);
19
- __reExport(src_exports, require("./tokens"), module.exports);
20
- __reExport(src_exports, require("@tamagui/colors"), module.exports);
21
- if (process.env.NODE_ENV === "development") {
22
- console.log(
23
- `Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.`
24
- );
25
- }
1
+ "use strict";var n=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var p=(a,o,m,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of l(o))!v.call(a,r)&&r!==m&&n(a,r,{get:()=>o[r],enumerable:!(s=i(o,r))||s.enumerable});return a},t=(a,o,m)=>(p(a,o,"default"),m&&p(m,o,"default"));var u=a=>p(n({},"__esModule",{value:!0}),a);var e={};module.exports=u(e);t(e,require("./themes"),module.exports);t(e,require("./tokens"),module.exports);t(e,require("@tamagui/colors"),module.exports);process.env.NODE_ENV==="development"&&console.log("Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.");
26
2
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './themes'\nexport * from './tokens'\nexport * from '@tamagui/colors'\n\nif (process.env.NODE_ENV === 'development') {\n console.log(\n `Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.`\n )\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,qBAAd;AACA,wBAAc,qBADd;AAEA,wBAAc,4BAFd;AAIA,IAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,UAAQ;AAAA,IACN;AAAA,EACF;AACF;",
6
- "names": []
5
+ "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,oBAAd,gBACAE,EAAAF,EAAc,oBADd,gBAEAE,EAAAF,EAAc,2BAFd,gBAII,QAAQ,IAAI,WAAa,eAC3B,QAAQ,IACN,+NACF",
6
+ "names": ["src_exports", "__toCommonJS", "__reExport"]
7
7
  }
@@ -1,65 +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 themes_exports = {};
20
- __export(themes_exports, {
21
- themes: () => themes
22
- });
23
- module.exports = __toCommonJS(themes_exports);
24
- var import_create_themes = require("@tamagui/create-themes");
25
- var import_tokens = require("./tokens");
26
- const themes = (0, import_create_themes.createThemes)({
27
- activeColor: "blue",
28
- light: [
29
- "#fff",
30
- "#f4f4f4",
31
- "hsl(0, 0%, 99.0%)",
32
- "hsl(0, 0%, 97.3%)",
33
- "hsl(0, 0%, 95.1%)",
34
- "hsl(0, 0%, 93.0%)",
35
- "hsl(0, 0%, 90.9%)",
36
- "hsl(0, 0%, 88.7%)",
37
- "hsl(0, 0%, 85.8%)",
38
- "hsl(0, 0%, 78.0%)",
39
- "hsl(0, 0%, 56.1%)",
40
- "hsl(0, 0%, 52.3%)",
41
- "hsl(0, 0%, 43.5%)",
42
- "hsl(0, 0%, 9.0%)"
43
- ],
44
- dark: [
45
- "#111111",
46
- "#151515",
47
- "#191919",
48
- "#232323",
49
- "#282828",
50
- "#323232",
51
- "#383838",
52
- "#424242",
53
- "#494949",
54
- "#545454",
55
- "#626262",
56
- "#a5a5a5"
57
- ],
58
- colorsLight: import_tokens.colorTokens.light,
59
- colorsDark: import_tokens.colorTokens.dark
60
- });
61
- // Annotate the CommonJS export names for ESM import in node:
62
- 0 && (module.exports = {
63
- themes
64
- });
1
+ "use strict";var l=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var t in e)l(o,t,{get:e[t],enumerable:!0})},k=(o,e,t,h)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of a(e))!f.call(o,s)&&s!==t&&l(o,s,{get:()=>e[s],enumerable:!(h=i(e,s))||h.enumerable});return o};var m=o=>k(l({},"__esModule",{value:!0}),o);var y={};d(y,{themes:()=>c});module.exports=m(y);var n=require("@tamagui/create-themes"),r=require("./tokens");const c=(0,n.createThemes)({activeColor:"blue",light:["#fff","#f4f4f4","hsl(0, 0%, 99.0%)","hsl(0, 0%, 97.3%)","hsl(0, 0%, 95.1%)","hsl(0, 0%, 93.0%)","hsl(0, 0%, 90.9%)","hsl(0, 0%, 88.7%)","hsl(0, 0%, 85.8%)","hsl(0, 0%, 78.0%)","hsl(0, 0%, 56.1%)","hsl(0, 0%, 52.3%)","hsl(0, 0%, 43.5%)","hsl(0, 0%, 9.0%)"],dark:["#111111","#151515","#191919","#232323","#282828","#323232","#383838","#424242","#494949","#545454","#626262","#a5a5a5"],colorsLight:r.colorTokens.light,colorsDark:r.colorTokens.dark});0&&(module.exports={themes});
65
2
  //# sourceMappingURL=themes.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/themes.tsx"],
4
4
  "sourcesContent": ["import { GeneratedThemes, createThemes } from '@tamagui/create-themes'\n\nimport { colorTokens } from './tokens'\n\ntype LightColorSets = typeof colorTokens.light\n\ntype ColorNames = keyof LightColorSets\ntype ColorShades = keyof UnionToIntersection<LightColorSets[keyof LightColorSets]>\n\nexport const themes: GeneratedThemes<ColorNames, ColorShades> = createThemes({\n activeColor: 'blue',\n light: [\n '#fff',\n '#f4f4f4',\n 'hsl(0, 0%, 99.0%)',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 93.0%)',\n 'hsl(0, 0%, 90.9%)',\n 'hsl(0, 0%, 88.7%)',\n 'hsl(0, 0%, 85.8%)',\n 'hsl(0, 0%, 78.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 52.3%)',\n 'hsl(0, 0%, 43.5%)',\n 'hsl(0, 0%, 9.0%)',\n ],\n dark: [\n '#111111',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#383838',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n ],\n colorsLight: colorTokens.light,\n colorsDark: colorTokens.dark,\n})\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (\n k: infer I\n) => void\n ? I\n : never\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAA8C;AAE9C,oBAA4B;AAOrB,MAAM,aAAmD,mCAAa;AAAA,EAC3E,aAAa;AAAA,EACb,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAa,0BAAY;AAAA,EACzB,YAAY,0BAAY;AAC1B,CAAC;",
6
- "names": []
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA8C,kCAE9CC,EAA4B,oBAOrB,MAAMH,KAAmD,gBAAa,CAC3E,YAAa,OACb,MAAO,CACL,OACA,UACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,kBACF,EACA,KAAM,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,SACF,EACA,YAAa,cAAY,MACzB,WAAY,cAAY,IAC1B,CAAC",
6
+ "names": ["themes_exports", "__export", "themes", "__toCommonJS", "import_create_themes", "import_tokens"]
7
7
  }
@@ -1,180 +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 tokens_exports = {};
20
- __export(tokens_exports, {
21
- color: () => color,
22
- colorTokens: () => colorTokens,
23
- darkColors: () => darkColors,
24
- lightColors: () => lightColors,
25
- radius: () => radius,
26
- size: () => size,
27
- space: () => space,
28
- tokens: () => tokens,
29
- zIndex: () => zIndex
30
- });
31
- module.exports = __toCommonJS(tokens_exports);
32
- var import_colors = require("@tamagui/colors");
33
- var import_core = require("@tamagui/core");
34
- const size = {
35
- $0: 0,
36
- "$0.25": 2,
37
- "$0.5": 4,
38
- "$0.75": 8,
39
- $1: 20,
40
- "$1.5": 24,
41
- $2: 28,
42
- "$2.5": 32,
43
- $3: 36,
44
- "$3.5": 40,
45
- $4: 44,
46
- $true: 44,
47
- "$4.5": 48,
48
- $5: 52,
49
- $6: 64,
50
- $7: 74,
51
- $8: 84,
52
- $9: 94,
53
- $10: 104,
54
- $11: 124,
55
- $12: 144,
56
- $13: 164,
57
- $14: 184,
58
- $15: 204,
59
- $16: 224,
60
- $17: 224,
61
- $18: 244,
62
- $19: 264,
63
- $20: 284
64
- };
65
- const spaces = Object.entries(size).map(([k, v]) => {
66
- return [k, sizeToSpace(v)];
67
- });
68
- function sizeToSpace(v) {
69
- if (v === 0)
70
- return 0;
71
- if (v === 2)
72
- return 0.5;
73
- if (v === 4)
74
- return 1;
75
- if (v === 8)
76
- return 1.5;
77
- if (v <= 16)
78
- return Math.round(v * 0.333);
79
- return Math.floor(v * 0.7 - 12);
80
- }
81
- const spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v]);
82
- const space = {
83
- ...Object.fromEntries(spaces),
84
- ...Object.fromEntries(spacesNegative)
85
- };
86
- const zIndex = {
87
- 0: 0,
88
- 1: 100,
89
- 2: 200,
90
- 3: 300,
91
- 4: 400,
92
- 5: 500
93
- };
94
- const colorTokens = {
95
- light: {
96
- blue: import_colors.blue,
97
- gray: import_colors.gray,
98
- green: import_colors.green,
99
- orange: import_colors.orange,
100
- pink: import_colors.pink,
101
- purple: import_colors.purple,
102
- red: import_colors.red,
103
- yellow: import_colors.yellow
104
- },
105
- dark: {
106
- blue: import_colors.blueDark,
107
- gray: import_colors.grayDark,
108
- green: import_colors.greenDark,
109
- orange: import_colors.orangeDark,
110
- pink: import_colors.pinkDark,
111
- purple: import_colors.purpleDark,
112
- red: import_colors.redDark,
113
- yellow: import_colors.yellowDark
114
- }
115
- };
116
- const darkColors = {
117
- ...colorTokens.dark.blue,
118
- ...colorTokens.dark.gray,
119
- ...colorTokens.dark.green,
120
- ...colorTokens.dark.orange,
121
- ...colorTokens.dark.pink,
122
- ...colorTokens.dark.purple,
123
- ...colorTokens.dark.red,
124
- ...colorTokens.dark.yellow
125
- };
126
- const lightColors = {
127
- ...colorTokens.light.blue,
128
- ...colorTokens.light.gray,
129
- ...colorTokens.light.green,
130
- ...colorTokens.light.orange,
131
- ...colorTokens.light.pink,
132
- ...colorTokens.light.purple,
133
- ...colorTokens.light.red,
134
- ...colorTokens.light.yellow
135
- };
136
- const color = {
137
- ...postfixObjKeys(lightColors, "Light"),
138
- ...postfixObjKeys(darkColors, "Dark")
139
- };
140
- function postfixObjKeys(obj, postfix) {
141
- return Object.fromEntries(
142
- Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])
143
- );
144
- }
145
- const radius = {
146
- 0: 0,
147
- 1: 3,
148
- 2: 5,
149
- 3: 7,
150
- 4: 9,
151
- true: 9,
152
- 5: 10,
153
- 6: 16,
154
- 7: 19,
155
- 8: 22,
156
- 9: 26,
157
- 10: 34,
158
- 11: 42,
159
- 12: 50
160
- };
161
- const tokens = (0, import_core.createTokens)({
162
- color,
163
- radius,
164
- zIndex,
165
- space,
166
- size
167
- });
168
- // Annotate the CommonJS export names for ESM import in node:
169
- 0 && (module.exports = {
170
- color,
171
- colorTokens,
172
- darkColors,
173
- lightColors,
174
- radius,
175
- size,
176
- space,
177
- tokens,
178
- zIndex
179
- });
1
+ "use strict";var a=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var z=(r,n)=>{for(var i in n)a(r,i,{get:n[i],enumerable:!0})},h=(r,n,i,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of b(n))!x.call(r,s)&&s!==i&&a(r,s,{get:()=>n[s],enumerable:!(o=K(n,s))||o.enumerable});return r};var S=r=>h(a({},"__esModule",{value:!0}),r);var w={};z(w,{color:()=>d,colorTokens:()=>t,darkColors:()=>c,lightColors:()=>u,radius:()=>f,size:()=>l,space:()=>g,tokens:()=>j,zIndex:()=>k});module.exports=S(w);var e=require("@tamagui/colors"),$=require("@tamagui/core");const l={$0:0,"$0.25":2,"$0.5":4,"$0.75":8,$1:20,"$1.5":24,$2:28,"$2.5":32,$3:36,"$3.5":40,$4:44,$true:44,"$4.5":48,$5:52,$6:64,$7:74,$8:84,$9:94,$10:104,$11:124,$12:144,$13:164,$14:184,$15:204,$16:224,$17:224,$18:244,$19:264,$20:284},y=Object.entries(l).map(([r,n])=>[r,m(n)]);function m(r){return r===0?0:r===2?.5:r===4?1:r===8?1.5:r<=16?Math.round(r*.333):Math.floor(r*.7-12)}const D=y.slice(1).map(([r,n])=>[`-${r.slice(1)}`,-n]),g={...Object.fromEntries(y),...Object.fromEntries(D)},k={0:0,1:100,2:200,3:300,4:400,5:500},t={light:{blue:e.blue,gray:e.gray,green:e.green,orange:e.orange,pink:e.pink,purple:e.purple,red:e.red,yellow:e.yellow},dark:{blue:e.blueDark,gray:e.grayDark,green:e.greenDark,orange:e.orangeDark,pink:e.pinkDark,purple:e.purpleDark,red:e.redDark,yellow:e.yellowDark}},c={...t.dark.blue,...t.dark.gray,...t.dark.green,...t.dark.orange,...t.dark.pink,...t.dark.purple,...t.dark.red,...t.dark.yellow},u={...t.light.blue,...t.light.gray,...t.light.green,...t.light.orange,...t.light.pink,...t.light.purple,...t.light.red,...t.light.yellow},d={...p(u,"Light"),...p(c,"Dark")};function p(r,n){return Object.fromEntries(Object.entries(r).map(([i,o])=>[`${i}${n}`,o]))}const f={0:0,1:3,2:5,3:7,4:9,true:9,5:10,6:16,7:19,8:22,9:26,10:34,11:42,12:50},j=(0,$.createTokens)({color:d,radius:f,zIndex:k,space:g,size:l});0&&(module.exports={color,colorTokens,darkColors,lightColors,radius,size,space,tokens,zIndex});
180
2
  //# sourceMappingURL=tokens.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/tokens.tsx"],
4
4
  "sourcesContent": ["import {\n blue,\n blueDark,\n gray,\n grayDark,\n green,\n greenDark,\n orange,\n orangeDark,\n pink,\n pinkDark,\n purple,\n purpleDark,\n red,\n redDark,\n yellow,\n yellowDark,\n} from '@tamagui/colors'\nimport { Variable, createTokens, createVariable } from '@tamagui/core'\n\n// should roughly map to button/input etc height at each level\n// fonts should match that height/lineHeight at each stop\n// so these are really non-linear on purpose\n// why?\n// - at sizes <1, used for fine grained things (borders, smallest paddingY)\n// - so smallest padY should be roughly 1-4px so it can join with lineHeight\n// - at sizes >=1, have to consider \"pressability\" (jumps up)\n// - after that it should go upwards somewhat naturally\n// - H1 / headings top out at 10 naturally, so after 10 we can go upwards faster\n// but also one more wrinkle...\n// space is used in conjunction with size\n// i'm setting space to generally just a fixed fraction of size (~1/3-2/3 still fine tuning)\nexport const size = {\n $0: 0,\n '$0.25': 2,\n '$0.5': 4,\n '$0.75': 8,\n $1: 20,\n '$1.5': 24,\n $2: 28,\n '$2.5': 32,\n $3: 36,\n '$3.5': 40,\n $4: 44,\n $true: 44,\n '$4.5': 48,\n $5: 52,\n $6: 64,\n $7: 74,\n $8: 84,\n $9: 94,\n $10: 104,\n $11: 124,\n $12: 144,\n $13: 164,\n $14: 184,\n $15: 204,\n $16: 224,\n $17: 224,\n $18: 244,\n $19: 264,\n $20: 284,\n}\n\ntype SizeKeysIn = keyof typeof size\ntype Sizes = {\n [Key in SizeKeysIn extends `$${infer Key}` ? Key : SizeKeysIn]: number\n}\ntype SizeKeys = `${keyof Sizes extends `${infer K}` ? K : never}`\n\nconst spaces = Object.entries(size).map(([k, v]) => {\n return [k, sizeToSpace(v)] as const\n})\n\n// a bit odd but keeping backward compat for values >8 while fixing below\nfunction sizeToSpace(v: number) {\n if (v === 0) return 0\n if (v === 2) return 0.5\n if (v === 4) return 1\n if (v === 8) return 1.5\n if (v <= 16) return Math.round(v * 0.333)\n return Math.floor(v * 0.7 - 12)\n}\n\nconst spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v])\n\ntype SizeKeysWithNegatives =\n | Exclude<`-${SizeKeys extends `$${infer Key}` ? Key : SizeKeys}`, '-0'>\n | SizeKeys\n\nexport const space: {\n [Key in SizeKeysWithNegatives]: Key extends keyof Sizes ? Sizes[Key] : number\n} = {\n ...Object.fromEntries(spaces),\n ...Object.fromEntries(spacesNegative),\n} as any\n\nexport const zIndex = {\n 0: 0,\n 1: 100,\n 2: 200,\n 3: 300,\n 4: 400,\n 5: 500,\n}\n\nexport const colorTokens = {\n light: {\n blue: blue,\n gray: gray,\n green: green,\n orange: orange,\n pink: pink,\n purple: purple,\n red: red,\n yellow: yellow,\n },\n dark: {\n blue: blueDark,\n gray: grayDark,\n green: greenDark,\n orange: orangeDark,\n pink: pinkDark,\n purple: purpleDark,\n red: redDark,\n yellow: yellowDark,\n },\n}\n\nexport const darkColors = {\n ...colorTokens.dark.blue,\n ...colorTokens.dark.gray,\n ...colorTokens.dark.green,\n ...colorTokens.dark.orange,\n ...colorTokens.dark.pink,\n ...colorTokens.dark.purple,\n ...colorTokens.dark.red,\n ...colorTokens.dark.yellow,\n}\n\nexport const lightColors = {\n ...colorTokens.light.blue,\n ...colorTokens.light.gray,\n ...colorTokens.light.green,\n ...colorTokens.light.orange,\n ...colorTokens.light.pink,\n ...colorTokens.light.purple,\n ...colorTokens.light.red,\n ...colorTokens.light.yellow,\n}\n\nexport const color = {\n ...postfixObjKeys(lightColors, 'Light'),\n ...postfixObjKeys(darkColors, 'Dark'),\n}\n\nfunction postfixObjKeys<\n A extends { [key: string]: Variable<string> | string },\n B extends string\n>(\n obj: A,\n postfix: B\n): {\n [Key in `${keyof A extends string ? keyof A : never}${B}`]: Variable<string> | string\n} {\n return Object.fromEntries(\n Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])\n ) as any\n}\n\nexport const radius = {\n 0: 0,\n 1: 3,\n 2: 5,\n 3: 7,\n 4: 9,\n true: 9,\n 5: 10,\n 6: 16,\n 7: 19,\n 8: 22,\n 9: 26,\n 10: 34,\n 11: 42,\n 12: 50,\n}\n\nexport const tokens = createTokens({\n color,\n radius,\n zIndex,\n space,\n size,\n})\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAiBO;AACP,kBAAuD;AAchD,MAAM,OAAO;AAAA,EAClB,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,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N,KAAM,OACN,MAAO,QACP,OAAQ,SACR,KAAM,OACN,OAAQ,SACR,IAAK,MACL,OAAQ,QACV,EACA,KAAM,CACJ,KAAM,WACN,KAAM,WACN,MAAO,YACP,OAAQ,aACR,KAAM,WACN,OAAQ,aACR,IAAK,UACL,OAAQ,YACV,CACF,EAEaC,EAAa,CACxB,GAAGD,EAAY,KAAK,KACpB,GAAGA,EAAY,KAAK,KACpB,GAAGA,EAAY,KAAK,MACpB,GAAGA,EAAY,KAAK,OACpB,GAAGA,EAAY,KAAK,KACpB,GAAGA,EAAY,KAAK,OACpB,GAAGA,EAAY,KAAK,IACpB,GAAGA,EAAY,KAAK,MACtB,EAEaE,EAAc,CACzB,GAAGF,EAAY,MAAM,KACrB,GAAGA,EAAY,MAAM,KACrB,GAAGA,EAAY,MAAM,MACrB,GAAGA,EAAY,MAAM,OACrB,GAAGA,EAAY,MAAM,KACrB,GAAGA,EAAY,MAAM,OACrB,GAAGA,EAAY,MAAM,IACrB,GAAGA,EAAY,MAAM,MACvB,EAEaD,EAAQ,CACnB,GAAGiB,EAAed,EAAa,OAAO,EACtC,GAAGc,EAAef,EAAY,MAAM,CACtC,EAEA,SAASe,EAIPC,EACAC,EAGA,CACA,OAAO,OAAO,YACZ,OAAO,QAAQD,CAAG,EAAE,IAAI,CAAC,CAACL,EAAGC,CAAC,IAAM,CAAC,GAAGD,IAAIM,IAAWL,CAAC,CAAC,CAC3D,CACF,CAEO,MAAMV,EAAS,CACpB,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,KAAM,EACN,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAEaG,KAAS,gBAAa,CACjC,MAAAP,EACA,OAAAI,EACA,OAAAI,EACA,MAAAF,EACA,KAAAD,CACF,CAAC",
6
+ "names": ["tokens_exports", "__export", "color", "colorTokens", "darkColors", "lightColors", "radius", "size", "space", "tokens", "zIndex", "__toCommonJS", "import_colors", "import_core", "spaces", "k", "v", "sizeToSpace", "spacesNegative", "postfixObjKeys", "obj", "postfix"]
7
7
  }
@@ -1,40 +1,2 @@
1
- import { getVariableValue } from "@tamagui/core";
2
- const hexToRGBA = (hex, alpha = 1) => {
3
- if (!isValidHex(hex)) {
4
- throw new Error("Invalid HEX");
5
- }
6
- const chunkSize = Math.floor((hex.length - 1) / 3);
7
- const hexArr = getChunksFromString(hex.slice(1), chunkSize);
8
- const [r, g, b, a] = (hexArr == null ? void 0 : hexArr.map(convertHexUnitTo256)) ?? [];
9
- return `rgba(${r}, ${g}, ${b}, ${getAlphaFloat(a, alpha)})`;
10
- };
11
- const setColorAlpha = (colorIn, alpha = 1) => {
12
- const color = `${getVariableValue(colorIn)}`;
13
- if (color.startsWith("hsl(")) {
14
- return color.replace("hsl", "hsla").replace(")", `, ${alpha})`);
15
- }
16
- if (color.startsWith("#")) {
17
- return hexToRGBA(color, alpha);
18
- }
19
- if (color.startsWith("rgb(")) {
20
- return color.replace("rgb", "rgba").replace(")", `, ${alpha})`);
21
- }
22
- return color;
23
- };
24
- const isValidHex = (hex) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
25
- const getChunksFromString = (st, chunkSize = 0) => st.match(new RegExp(`.{${chunkSize}}`, "g"));
26
- const convertHexUnitTo256 = (hexStr) => parseInt(hexStr.repeat(2 / hexStr.length), 16);
27
- const getAlphaFloat = (a, alpha = 1) => {
28
- if (a !== void 0) {
29
- return a / 255;
30
- }
31
- if (typeof alpha !== "number" || alpha < 0 || alpha > 1) {
32
- return 1;
33
- }
34
- return alpha;
35
- };
36
- export {
37
- hexToRGBA,
38
- setColorAlpha
39
- };
1
+ import{getVariableValue as c}from"@tamagui/core";const g=(t,r=1)=>{if(!l(t))throw new Error("Invalid HEX");const e=Math.floor((t.length-1)/3),n=u(t.slice(1),e),[s,o,i,a]=(n==null?void 0:n.map(f))??[];return`rgba(${s}, ${o}, ${i}, ${b(a,r)})`},h=(t,r=1)=>{const e=`${c(t)}`;return e.startsWith("hsl(")?e.replace("hsl","hsla").replace(")",`, ${r})`):e.startsWith("#")?g(e,r):e.startsWith("rgb(")?e.replace("rgb","rgba").replace(")",`, ${r})`):e},l=t=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(t),u=(t,r=0)=>t.match(new RegExp(`.{${r}}`,"g")),f=t=>parseInt(t.repeat(2/t.length),16),b=(t,r=1)=>t!==void 0?t/255:typeof r!="number"||r<0||r>1?1:r;export{g as hexToRGBA,h as setColorAlpha};
40
2
  //# sourceMappingURL=colorUtils.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/colorUtils.tsx"],
4
4
  "sourcesContent": ["import { Variable, getVariableValue } from '@tamagui/core'\n\nexport const hexToRGBA = (hex: string, alpha = 1) => {\n if (!isValidHex(hex)) {\n throw new Error('Invalid HEX')\n }\n const chunkSize = Math.floor((hex.length - 1) / 3)\n const hexArr = getChunksFromString(hex.slice(1), chunkSize)\n const [r, g, b, a] = hexArr?.map(convertHexUnitTo256) ?? []\n return `rgba(${r}, ${g}, ${b}, ${getAlphaFloat(a, alpha)})`\n}\n\nexport const setColorAlpha = (colorIn: string | Variable, alpha = 1) => {\n const color = `${getVariableValue(colorIn)}`\n if (color.startsWith('hsl(')) {\n return color.replace('hsl', 'hsla').replace(')', `, ${alpha})`)\n }\n if (color.startsWith('#')) {\n return hexToRGBA(color, alpha)\n }\n if (color.startsWith('rgb(')) {\n return color.replace('rgb', 'rgba').replace(')', `, ${alpha})`)\n }\n return color\n}\n\nconst isValidHex = (hex: string) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex)\n\nconst getChunksFromString = (st: string, chunkSize = 0) =>\n st.match(new RegExp(`.{${chunkSize}}`, 'g'))\n\nconst convertHexUnitTo256 = (hexStr: string) =>\n parseInt(hexStr.repeat(2 / hexStr.length), 16)\n\nconst getAlphaFloat = (a: any, alpha = 1) => {\n if (a !== undefined) {\n return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alpha", "isValidHex", "chunkSize", "hexArr", "getChunksFromString", "r", "g", "b", "convertHexUnitTo256", "getAlphaFloat", "setColorAlpha", "colorIn", "color", "st", "hexStr", "a"]
7
7
  }
@@ -1,40 +1,2 @@
1
- import { getVariableValue } from "@tamagui/core";
2
- const hexToRGBA = (hex, alpha = 1) => {
3
- if (!isValidHex(hex)) {
4
- throw new Error("Invalid HEX");
5
- }
6
- const chunkSize = Math.floor((hex.length - 1) / 3);
7
- const hexArr = getChunksFromString(hex.slice(1), chunkSize);
8
- const [r, g, b, a] = (hexArr == null ? void 0 : hexArr.map(convertHexUnitTo256)) ?? [];
9
- return `rgba(${r}, ${g}, ${b}, ${getAlphaFloat(a, alpha)})`;
10
- };
11
- const setColorAlpha = (colorIn, alpha = 1) => {
12
- const color = `${getVariableValue(colorIn)}`;
13
- if (color.startsWith("hsl(")) {
14
- return color.replace("hsl", "hsla").replace(")", `, ${alpha})`);
15
- }
16
- if (color.startsWith("#")) {
17
- return hexToRGBA(color, alpha);
18
- }
19
- if (color.startsWith("rgb(")) {
20
- return color.replace("rgb", "rgba").replace(")", `, ${alpha})`);
21
- }
22
- return color;
23
- };
24
- const isValidHex = (hex) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);
25
- const getChunksFromString = (st, chunkSize = 0) => st.match(new RegExp(`.{${chunkSize}}`, "g"));
26
- const convertHexUnitTo256 = (hexStr) => parseInt(hexStr.repeat(2 / hexStr.length), 16);
27
- const getAlphaFloat = (a, alpha = 1) => {
28
- if (a !== void 0) {
29
- return a / 255;
30
- }
31
- if (typeof alpha !== "number" || alpha < 0 || alpha > 1) {
32
- return 1;
33
- }
34
- return alpha;
35
- };
36
- export {
37
- hexToRGBA,
38
- setColorAlpha
39
- };
1
+ import{getVariableValue as c}from"@tamagui/core";const g=(t,r=1)=>{if(!l(t))throw new Error("Invalid HEX");const e=Math.floor((t.length-1)/3),n=u(t.slice(1),e),[s,o,i,a]=(n==null?void 0:n.map(f))??[];return`rgba(${s}, ${o}, ${i}, ${b(a,r)})`},h=(t,r=1)=>{const e=`${c(t)}`;return e.startsWith("hsl(")?e.replace("hsl","hsla").replace(")",`, ${r})`):e.startsWith("#")?g(e,r):e.startsWith("rgb(")?e.replace("rgb","rgba").replace(")",`, ${r})`):e},l=t=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(t),u=(t,r=0)=>t.match(new RegExp(`.{${r}}`,"g")),f=t=>parseInt(t.repeat(2/t.length),16),b=(t,r=1)=>t!==void 0?t/255:typeof r!="number"||r<0||r>1?1:r;export{g as hexToRGBA,h as setColorAlpha};
40
2
  //# sourceMappingURL=colorUtils.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/colorUtils.tsx"],
4
4
  "sourcesContent": ["import { Variable, getVariableValue } from '@tamagui/core'\n\nexport const hexToRGBA = (hex: string, alpha = 1) => {\n if (!isValidHex(hex)) {\n throw new Error('Invalid HEX')\n }\n const chunkSize = Math.floor((hex.length - 1) / 3)\n const hexArr = getChunksFromString(hex.slice(1), chunkSize)\n const [r, g, b, a] = hexArr?.map(convertHexUnitTo256) ?? []\n return `rgba(${r}, ${g}, ${b}, ${getAlphaFloat(a, alpha)})`\n}\n\nexport const setColorAlpha = (colorIn: string | Variable, alpha = 1) => {\n const color = `${getVariableValue(colorIn)}`\n if (color.startsWith('hsl(')) {\n return color.replace('hsl', 'hsla').replace(')', `, ${alpha})`)\n }\n if (color.startsWith('#')) {\n return hexToRGBA(color, alpha)\n }\n if (color.startsWith('rgb(')) {\n return color.replace('rgb', 'rgba').replace(')', `, ${alpha})`)\n }\n return color\n}\n\nconst isValidHex = (hex: string) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex)\n\nconst getChunksFromString = (st: string, chunkSize = 0) =>\n st.match(new RegExp(`.{${chunkSize}}`, 'g'))\n\nconst convertHexUnitTo256 = (hexStr: string) =>\n parseInt(hexStr.repeat(2 / hexStr.length), 16)\n\nconst getAlphaFloat = (a: any,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": ["getVariableValue", "hexToRGBA", "hex", "alpha", "isValidHex", "chunkSize", "hexArr", "getChunksFromString", "r", "g", "b", "convertHexUnitTo256", "getAlphaFloat", "setColorAlpha", "colorIn", "color", "st", "hexStr", "a"]
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,9 +1,2 @@
1
- export * from "./themes";
2
- export * from "./tokens";
3
- export * from "@tamagui/colors";
4
- if (process.env.NODE_ENV === "development") {
5
- console.log(
6
- `Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.`
7
- );
8
- }
1
+ export*from"./themes";export*from"./tokens";export*from"@tamagui/colors";process.env.NODE_ENV==="development"&&console.log("Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.");
9
2
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './themes'\nexport * from './tokens'\nexport * from '@tamagui/colors'\n\nif (process.env.NODE_ENV === 'development') {\n console.log(\n `Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.`\n )\n}\n"],
5
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AAEd,IAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,UAAQ;AAAA,IACN;AAAA,EACF;AACF;",
5
+ "mappings": "AAAA,WAAc,WACd,WAAc,WACd,WAAc,kBAEV,QAAQ,IAAI,WAAa,eAC3B,QAAQ,IACN,+NACF",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,2 @@
1
- export * from "./themes";
2
- export * from "./tokens";
3
- export * from "@tamagui/colors";
4
- if (process.env.NODE_ENV === "development") {
5
- console.log(
6
- `Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.`
7
- );
8
- }
1
+ export*from"./themes";export*from"./tokens";export*from"@tamagui/colors";process.env.NODE_ENV==="development"&&console.log("Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.");
9
2
  //# sourceMappingURL=index.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
4
  "sourcesContent": ["export * from './themes'\nexport * from './tokens'\nexport * from '@tamagui/colors'\n\nif (process.env.NODE_ENV === 'development') {\n console.log(\n `Note: We've moved @tamagui/theme-base over to @tamagui/themes. They are much improved and easier to use. If you really want to keep this package, copy and paste the contents into your app as it will be removed eventually.`\n )\n}\n"],
5
- "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AAEd,IAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,UAAQ;AAAA,IACN;AAAA,EACF;AACF;",
5
+ "mappings": "AAAA,WAAc,WACd,WAAc,WACd,WAAc,kBAEV,QAAQ,IAAI,WAAa,eAC3B,QAAQ,IACN,+NACF",
6
6
  "names": []
7
7
  }
@@ -1,41 +1,2 @@
1
- import { createThemes } from "@tamagui/create-themes";
2
- import { colorTokens } from "./tokens";
3
- const themes = createThemes({
4
- activeColor: "blue",
5
- light: [
6
- "#fff",
7
- "#f4f4f4",
8
- "hsl(0, 0%, 99.0%)",
9
- "hsl(0, 0%, 97.3%)",
10
- "hsl(0, 0%, 95.1%)",
11
- "hsl(0, 0%, 93.0%)",
12
- "hsl(0, 0%, 90.9%)",
13
- "hsl(0, 0%, 88.7%)",
14
- "hsl(0, 0%, 85.8%)",
15
- "hsl(0, 0%, 78.0%)",
16
- "hsl(0, 0%, 56.1%)",
17
- "hsl(0, 0%, 52.3%)",
18
- "hsl(0, 0%, 43.5%)",
19
- "hsl(0, 0%, 9.0%)"
20
- ],
21
- dark: [
22
- "#111111",
23
- "#151515",
24
- "#191919",
25
- "#232323",
26
- "#282828",
27
- "#323232",
28
- "#383838",
29
- "#424242",
30
- "#494949",
31
- "#545454",
32
- "#626262",
33
- "#a5a5a5"
34
- ],
35
- colorsLight: colorTokens.light,
36
- colorsDark: colorTokens.dark
37
- });
38
- export {
39
- themes
40
- };
1
+ import{createThemes as o}from"@tamagui/create-themes";import{colorTokens as e}from"./tokens";const r=o({activeColor:"blue",light:["#fff","#f4f4f4","hsl(0, 0%, 99.0%)","hsl(0, 0%, 97.3%)","hsl(0, 0%, 95.1%)","hsl(0, 0%, 93.0%)","hsl(0, 0%, 90.9%)","hsl(0, 0%, 88.7%)","hsl(0, 0%, 85.8%)","hsl(0, 0%, 78.0%)","hsl(0, 0%, 56.1%)","hsl(0, 0%, 52.3%)","hsl(0, 0%, 43.5%)","hsl(0, 0%, 9.0%)"],dark:["#111111","#151515","#191919","#232323","#282828","#323232","#383838","#424242","#494949","#545454","#626262","#a5a5a5"],colorsLight:e.light,colorsDark:e.dark});export{r as themes};
41
2
  //# sourceMappingURL=themes.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/themes.tsx"],
4
4
  "sourcesContent": ["import { GeneratedThemes, createThemes } from '@tamagui/create-themes'\n\nimport { colorTokens } from './tokens'\n\ntype LightColorSets = typeof colorTokens.light\n\ntype ColorNames = keyof LightColorSets\ntype ColorShades = keyof UnionToIntersection<LightColorSets[keyof LightColorSets]>\n\nexport const themes: GeneratedThemes<ColorNames, ColorShades> = createThemes({\n activeColor: 'blue',\n light: [\n '#fff',\n '#f4f4f4',\n 'hsl(0, 0%, 99.0%)',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 93.0%)',\n 'hsl(0, 0%, 90.9%)',\n 'hsl(0, 0%, 88.7%)',\n 'hsl(0, 0%, 85.8%)',\n 'hsl(0, 0%, 78.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 52.3%)',\n 'hsl(0, 0%, 43.5%)',\n 'hsl(0, 0%, 9.0%)',\n ],\n dark: [\n '#111111',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#383838',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n ],\n colorsLight: colorTokens.light,\n colorsDark: colorTokens.dark,\n})\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (\n k: infer I\n) => void\n ? I\n : never\n"],
5
- "mappings": "AAAA,SAA0B,oBAAoB;AAE9C,SAAS,mBAAmB;AAOrB,MAAM,SAAmD,aAAa;AAAA,EAC3E,aAAa;AAAA,EACb,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAa,YAAY;AAAA,EACzB,YAAY,YAAY;AAC1B,CAAC;",
6
- "names": []
5
+ "mappings": "AAAA,OAA0B,gBAAAA,MAAoB,yBAE9C,OAAS,eAAAC,MAAmB,WAOrB,MAAMC,EAAmDF,EAAa,CAC3E,YAAa,OACb,MAAO,CACL,OACA,UACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,kBACF,EACA,KAAM,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,SACF,EACA,YAAaC,EAAY,MACzB,WAAYA,EAAY,IAC1B,CAAC",
6
+ "names": ["createThemes", "colorTokens", "themes"]
7
7
  }
@@ -1,41 +1,2 @@
1
- import { createThemes } from "@tamagui/create-themes";
2
- import { colorTokens } from "./tokens";
3
- const themes = createThemes({
4
- activeColor: "blue",
5
- light: [
6
- "#fff",
7
- "#f4f4f4",
8
- "hsl(0, 0%, 99.0%)",
9
- "hsl(0, 0%, 97.3%)",
10
- "hsl(0, 0%, 95.1%)",
11
- "hsl(0, 0%, 93.0%)",
12
- "hsl(0, 0%, 90.9%)",
13
- "hsl(0, 0%, 88.7%)",
14
- "hsl(0, 0%, 85.8%)",
15
- "hsl(0, 0%, 78.0%)",
16
- "hsl(0, 0%, 56.1%)",
17
- "hsl(0, 0%, 52.3%)",
18
- "hsl(0, 0%, 43.5%)",
19
- "hsl(0, 0%, 9.0%)"
20
- ],
21
- dark: [
22
- "#111111",
23
- "#151515",
24
- "#191919",
25
- "#232323",
26
- "#282828",
27
- "#323232",
28
- "#383838",
29
- "#424242",
30
- "#494949",
31
- "#545454",
32
- "#626262",
33
- "#a5a5a5"
34
- ],
35
- colorsLight: colorTokens.light,
36
- colorsDark: colorTokens.dark
37
- });
38
- export {
39
- themes
40
- };
1
+ import{createThemes as o}from"@tamagui/create-themes";import{colorTokens as e}from"./tokens";const r=o({activeColor:"blue",light:["#fff","#f4f4f4","hsl(0, 0%, 99.0%)","hsl(0, 0%, 97.3%)","hsl(0, 0%, 95.1%)","hsl(0, 0%, 93.0%)","hsl(0, 0%, 90.9%)","hsl(0, 0%, 88.7%)","hsl(0, 0%, 85.8%)","hsl(0, 0%, 78.0%)","hsl(0, 0%, 56.1%)","hsl(0, 0%, 52.3%)","hsl(0, 0%, 43.5%)","hsl(0, 0%, 9.0%)"],dark:["#111111","#151515","#191919","#232323","#282828","#323232","#383838","#424242","#494949","#545454","#626262","#a5a5a5"],colorsLight:e.light,colorsDark:e.dark});export{r as themes};
41
2
  //# sourceMappingURL=themes.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/themes.tsx"],
4
4
  "sourcesContent": ["import { GeneratedThemes, createThemes } from '@tamagui/create-themes'\n\nimport { colorTokens } from './tokens'\n\ntype LightColorSets = typeof colorTokens.light\n\ntype ColorNames = keyof LightColorSets\ntype ColorShades = keyof UnionToIntersection<LightColorSets[keyof LightColorSets]>\n\nexport const themes: GeneratedThemes<ColorNames, ColorShades> = createThemes({\n activeColor: 'blue',\n light: [\n '#fff',\n '#f4f4f4',\n 'hsl(0, 0%, 99.0%)',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 93.0%)',\n 'hsl(0, 0%, 90.9%)',\n 'hsl(0, 0%, 88.7%)',\n 'hsl(0, 0%, 85.8%)',\n 'hsl(0, 0%, 78.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 52.3%)',\n 'hsl(0, 0%, 43.5%)',\n 'hsl(0, 0%, 9.0%)',\n ],\n dark: [\n '#111111',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#383838',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n ],\n colorsLight: colorTokens.light,\n colorsDark: colorTokens.dark,\n})\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (\n k: infer I\n) => void\n ? I\n : never\n"],
5
- "mappings": "AAAA,SAA0B,oBAAoB;AAE9C,SAAS,mBAAmB;AAOrB,MAAM,SAAmD,aAAa;AAAA,EAC3E,aAAa;AAAA,EACb,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAa,YAAY;AAAA,EACzB,YAAY,YAAY;AAC1B,CAAC;",
6
- "names": []
5
+ "mappings": "AAAA,OAA0B,gBAAAA,MAAoB,yBAE9C,OAAS,eAAAC,MAAmB,WAOrB,MAAMC,EAAmDF,EAAa,CAC3E,YAAa,OACb,MAAO,CACL,OACA,UACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,kBACF,EACA,KAAM,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,SACF,EACA,YAAaC,EAAY,MACzB,WAAYA,EAAY,IAC1B,CAAC",
6
+ "names": ["createThemes", "colorTokens", "themes"]
7
7
  }
@@ -1,165 +1,2 @@
1
- import {
2
- blue,
3
- blueDark,
4
- gray,
5
- grayDark,
6
- green,
7
- greenDark,
8
- orange,
9
- orangeDark,
10
- pink,
11
- pinkDark,
12
- purple,
13
- purpleDark,
14
- red,
15
- redDark,
16
- yellow,
17
- yellowDark
18
- } from "@tamagui/colors";
19
- import { createTokens } from "@tamagui/core";
20
- const size = {
21
- $0: 0,
22
- "$0.25": 2,
23
- "$0.5": 4,
24
- "$0.75": 8,
25
- $1: 20,
26
- "$1.5": 24,
27
- $2: 28,
28
- "$2.5": 32,
29
- $3: 36,
30
- "$3.5": 40,
31
- $4: 44,
32
- $true: 44,
33
- "$4.5": 48,
34
- $5: 52,
35
- $6: 64,
36
- $7: 74,
37
- $8: 84,
38
- $9: 94,
39
- $10: 104,
40
- $11: 124,
41
- $12: 144,
42
- $13: 164,
43
- $14: 184,
44
- $15: 204,
45
- $16: 224,
46
- $17: 224,
47
- $18: 244,
48
- $19: 264,
49
- $20: 284
50
- };
51
- const spaces = Object.entries(size).map(([k, v]) => {
52
- return [k, sizeToSpace(v)];
53
- });
54
- function sizeToSpace(v) {
55
- if (v === 0)
56
- return 0;
57
- if (v === 2)
58
- return 0.5;
59
- if (v === 4)
60
- return 1;
61
- if (v === 8)
62
- return 1.5;
63
- if (v <= 16)
64
- return Math.round(v * 0.333);
65
- return Math.floor(v * 0.7 - 12);
66
- }
67
- const spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v]);
68
- const space = {
69
- ...Object.fromEntries(spaces),
70
- ...Object.fromEntries(spacesNegative)
71
- };
72
- const zIndex = {
73
- 0: 0,
74
- 1: 100,
75
- 2: 200,
76
- 3: 300,
77
- 4: 400,
78
- 5: 500
79
- };
80
- const colorTokens = {
81
- light: {
82
- blue,
83
- gray,
84
- green,
85
- orange,
86
- pink,
87
- purple,
88
- red,
89
- yellow
90
- },
91
- dark: {
92
- blue: blueDark,
93
- gray: grayDark,
94
- green: greenDark,
95
- orange: orangeDark,
96
- pink: pinkDark,
97
- purple: purpleDark,
98
- red: redDark,
99
- yellow: yellowDark
100
- }
101
- };
102
- const darkColors = {
103
- ...colorTokens.dark.blue,
104
- ...colorTokens.dark.gray,
105
- ...colorTokens.dark.green,
106
- ...colorTokens.dark.orange,
107
- ...colorTokens.dark.pink,
108
- ...colorTokens.dark.purple,
109
- ...colorTokens.dark.red,
110
- ...colorTokens.dark.yellow
111
- };
112
- const lightColors = {
113
- ...colorTokens.light.blue,
114
- ...colorTokens.light.gray,
115
- ...colorTokens.light.green,
116
- ...colorTokens.light.orange,
117
- ...colorTokens.light.pink,
118
- ...colorTokens.light.purple,
119
- ...colorTokens.light.red,
120
- ...colorTokens.light.yellow
121
- };
122
- const color = {
123
- ...postfixObjKeys(lightColors, "Light"),
124
- ...postfixObjKeys(darkColors, "Dark")
125
- };
126
- function postfixObjKeys(obj, postfix) {
127
- return Object.fromEntries(
128
- Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])
129
- );
130
- }
131
- const radius = {
132
- 0: 0,
133
- 1: 3,
134
- 2: 5,
135
- 3: 7,
136
- 4: 9,
137
- true: 9,
138
- 5: 10,
139
- 6: 16,
140
- 7: 19,
141
- 8: 22,
142
- 9: 26,
143
- 10: 34,
144
- 11: 42,
145
- 12: 50
146
- };
147
- const tokens = createTokens({
148
- color,
149
- radius,
150
- zIndex,
151
- space,
152
- size
153
- });
154
- export {
155
- color,
156
- colorTokens,
157
- darkColors,
158
- lightColors,
159
- radius,
160
- size,
161
- space,
162
- tokens,
163
- zIndex
164
- };
1
+ import{blue as l,blueDark as y,gray as p,grayDark as $,green as g,greenDark as k,orange as c,orangeDark as u,pink as d,pinkDark as f,purple as K,purpleDark as b,red as x,redDark as z,yellow as h,yellowDark as S}from"@tamagui/colors";import{createTokens as m}from"@tamagui/core";const n={$0:0,"$0.25":2,"$0.5":4,"$0.75":8,$1:20,"$1.5":24,$2:28,"$2.5":32,$3:36,"$3.5":40,$4:44,$true:44,"$4.5":48,$5:52,$6:64,$7:74,$8:84,$9:94,$10:104,$11:124,$12:144,$13:164,$14:184,$15:204,$16:224,$17:224,$18:244,$19:264,$20:284},i=Object.entries(n).map(([r,t])=>[r,D(t)]);function D(r){return r===0?0:r===2?.5:r===4?1:r===8?1.5:r<=16?Math.round(r*.333):Math.floor(r*.7-12)}const j=i.slice(1).map(([r,t])=>[`-${r.slice(1)}`,-t]),w={...Object.fromEntries(i),...Object.fromEntries(j)},O={0:0,1:100,2:200,3:300,4:400,5:500},e={light:{blue:l,gray:p,green:g,orange:c,pink:d,purple:K,red:x,yellow:h},dark:{blue:y,gray:$,green:k,orange:u,pink:f,purple:b,red:z,yellow:S}},A={...e.dark.blue,...e.dark.gray,...e.dark.green,...e.dark.orange,...e.dark.pink,...e.dark.purple,...e.dark.red,...e.dark.yellow},E={...e.light.blue,...e.light.gray,...e.light.green,...e.light.orange,...e.light.pink,...e.light.purple,...e.light.red,...e.light.yellow},I={...s(E,"Light"),...s(A,"Dark")};function s(r,t){return Object.fromEntries(Object.entries(r).map(([o,a])=>[`${o}${t}`,a]))}const V={0:0,1:3,2:5,3:7,4:9,true:9,5:10,6:16,7:19,8:22,9:26,10:34,11:42,12:50},M=m({color:I,radius:V,zIndex:O,space:w,size:n});export{I as color,e as colorTokens,A as darkColors,E as lightColors,V as radius,n as size,w as space,M as tokens,O as zIndex};
165
2
  //# sourceMappingURL=tokens.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/tokens.tsx"],
4
4
  "sourcesContent": ["import {\n blue,\n blueDark,\n gray,\n grayDark,\n green,\n greenDark,\n orange,\n orangeDark,\n pink,\n pinkDark,\n purple,\n purpleDark,\n red,\n redDark,\n yellow,\n yellowDark,\n} from '@tamagui/colors'\nimport { Variable, createTokens, createVariable } from '@tamagui/core'\n\n// should roughly map to button/input etc height at each level\n// fonts should match that height/lineHeight at each stop\n// so these are really non-linear on purpose\n// why?\n// - at sizes <1, used for fine grained things (borders, smallest paddingY)\n// - so smallest padY should be roughly 1-4px so it can join with lineHeight\n// - at sizes >=1, have to consider \"pressability\" (jumps up)\n// - after that it should go upwards somewhat naturally\n// - H1 / headings top out at 10 naturally, so after 10 we can go upwards faster\n// but also one more wrinkle...\n// space is used in conjunction with size\n// i'm setting space to generally just a fixed fraction of size (~1/3-2/3 still fine tuning)\nexport const size = {\n $0: 0,\n '$0.25': 2,\n '$0.5': 4,\n '$0.75': 8,\n $1: 20,\n '$1.5': 24,\n $2: 28,\n '$2.5': 32,\n $3: 36,\n '$3.5': 40,\n $4: 44,\n $true: 44,\n '$4.5': 48,\n $5: 52,\n $6: 64,\n $7: 74,\n $8: 84,\n $9: 94,\n $10: 104,\n $11: 124,\n $12: 144,\n $13: 164,\n $14: 184,\n $15: 204,\n $16: 224,\n $17: 224,\n $18: 244,\n $19: 264,\n $20: 284,\n}\n\ntype SizeKeysIn = keyof typeof size\ntype Sizes = {\n [Key in SizeKeysIn extends `$${infer Key}` ? Key : SizeKeysIn]: number\n}\ntype SizeKeys = `${keyof Sizes extends `${infer K}` ? K : never}`\n\nconst spaces = Object.entries(size).map(([k, v]) => {\n return [k, sizeToSpace(v)] as const\n})\n\n// a bit odd but keeping backward compat for values >8 while fixing below\nfunction sizeToSpace(v: number) {\n if (v === 0) return 0\n if (v === 2) return 0.5\n if (v === 4) return 1\n if (v === 8) return 1.5\n if (v <= 16) return Math.round(v * 0.333)\n return Math.floor(v * 0.7 - 12)\n}\n\nconst spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v])\n\ntype SizeKeysWithNegatives =\n | Exclude<`-${SizeKeys extends `$${infer Key}` ? Key : SizeKeys}`, '-0'>\n | SizeKeys\n\nexport const space: {\n [Key in SizeKeysWithNegatives]: Key extends keyof Sizes ? Sizes[Key] : number\n} = {\n ...Object.fromEntries(spaces),\n ...Object.fromEntries(spacesNegative),\n} as any\n\nexport const zIndex = {\n 0: 0,\n 1: 100,\n 2: 200,\n 3: 300,\n 4: 400,\n 5: 500,\n}\n\nexport const colorTokens = {\n light: {\n blue: blue,\n gray: gray,\n green: green,\n orange: orange,\n pink: pink,\n purple: purple,\n red: red,\n yellow: yellow,\n },\n dark: {\n blue: blueDark,\n gray: grayDark,\n green: greenDark,\n orange: orangeDark,\n pink: pinkDark,\n purple: purpleDark,\n red: redDark,\n yellow: yellowDark,\n },\n}\n\nexport const darkColors = {\n ...colorTokens.dark.blue,\n ...colorTokens.dark.gray,\n ...colorTokens.dark.green,\n ...colorTokens.dark.orange,\n ...colorTokens.dark.pink,\n ...colorTokens.dark.purple,\n ...colorTokens.dark.red,\n ...colorTokens.dark.yellow,\n}\n\nexport const lightColors = {\n ...colorTokens.light.blue,\n ...colorTokens.light.gray,\n ...colorTokens.light.green,\n ...colorTokens.light.orange,\n ...colorTokens.light.pink,\n ...colorTokens.light.purple,\n ...colorTokens.light.red,\n ...colorTokens.light.yellow,\n}\n\nexport const color = {\n ...postfixObjKeys(lightColors, 'Light'),\n ...postfixObjKeys(darkColors, 'Dark'),\n}\n\nfunction postfixObjKeys<\n A extends { [key: string]: Variable<string> | string },\n B extends string\n>(\n obj: A,\n postfix: B\n): {\n [Key in `${keyof A extends string ? keyof A : never}${B}`]: Variable<string> | string\n} {\n return Object.fromEntries(\n Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])\n ) as any\n}\n\nexport const radius = {\n 0: 0,\n 1: 3,\n 2: 5,\n 3: 7,\n 4: 9,\n true: 9,\n 5: 10,\n 6: 16,\n 7: 19,\n 8: 22,\n 9: 26,\n 10: 34,\n 11: 42,\n 12: 50,\n}\n\nexport const tokens = createTokens({\n color,\n radius,\n zIndex,\n space,\n size,\n})\n"],
5
- "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAmB,oBAAoC;AAchD,MAAM,OAAO;AAAA,EAClB,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AACP;AAQA,MAAM,SAAS,OAAO,QAAQ,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM;AAClD,SAAO,CAAC,GAAG,YAAY,CAAC,CAAC;AAC3B,CAAC;AAGD,SAAS,YAAY,GAAW;AAC9B,MAAI,MAAM;AAAG,WAAO;AACpB,MAAI,MAAM;AAAG,WAAO;AACpB,MAAI,MAAM;AAAG,WAAO;AACpB,MAAI,MAAM;AAAG,WAAO;AACpB,MAAI,KAAK;A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Y,MAAM,OACrB,GAAGA,EAAY,MAAM,KACrB,GAAGA,EAAY,MAAM,OACrB,GAAGA,EAAY,MAAM,IACrB,GAAGA,EAAY,MAAM,MACvB,EAEaG,EAAQ,CACnB,GAAGC,EAAeF,EAAa,OAAO,EACtC,GAAGE,EAAeH,EAAY,MAAM,CACtC,EAEA,SAASG,EAIPC,EACAC,EAGA,CACA,OAAO,OAAO,YACZ,OAAO,QAAQD,CAAG,EAAE,IAAI,CAAC,CAACX,EAAGC,CAAC,IAAM,CAAC,GAAGD,IAAIY,IAAWX,CAAC,CAAC,CAC3D,CACF,CAEO,MAAMY,EAAS,CACpB,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,KAAM,EACN,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAEaC,EAASjB,EAAa,CACjC,MAAAY,EACA,OAAAI,EACA,OAAAR,EACA,MAAAD,EACA,KAAAN,CACF,CAAC",
6
+ "names": ["blue", "blueDark", "gray", "grayDark", "green", "greenDark", "orange", "orangeDark", "pink", "pinkDark", "purple", "purpleDark", "red", "redDark", "yellow", "yellowDark", "createTokens", "size", "spaces", "k", "v", "sizeToSpace", "spacesNegative", "space", "zIndex", "colorTokens", "darkColors", "lightColors", "color", "postfixObjKeys", "obj", "postfix", "radius", "tokens"]
7
7
  }
@@ -1,165 +1,2 @@
1
- import {
2
- blue,
3
- blueDark,
4
- gray,
5
- grayDark,
6
- green,
7
- greenDark,
8
- orange,
9
- orangeDark,
10
- pink,
11
- pinkDark,
12
- purple,
13
- purpleDark,
14
- red,
15
- redDark,
16
- yellow,
17
- yellowDark
18
- } from "@tamagui/colors";
19
- import { createTokens } from "@tamagui/core";
20
- const size = {
21
- $0: 0,
22
- "$0.25": 2,
23
- "$0.5": 4,
24
- "$0.75": 8,
25
- $1: 20,
26
- "$1.5": 24,
27
- $2: 28,
28
- "$2.5": 32,
29
- $3: 36,
30
- "$3.5": 40,
31
- $4: 44,
32
- $true: 44,
33
- "$4.5": 48,
34
- $5: 52,
35
- $6: 64,
36
- $7: 74,
37
- $8: 84,
38
- $9: 94,
39
- $10: 104,
40
- $11: 124,
41
- $12: 144,
42
- $13: 164,
43
- $14: 184,
44
- $15: 204,
45
- $16: 224,
46
- $17: 224,
47
- $18: 244,
48
- $19: 264,
49
- $20: 284
50
- };
51
- const spaces = Object.entries(size).map(([k, v]) => {
52
- return [k, sizeToSpace(v)];
53
- });
54
- function sizeToSpace(v) {
55
- if (v === 0)
56
- return 0;
57
- if (v === 2)
58
- return 0.5;
59
- if (v === 4)
60
- return 1;
61
- if (v === 8)
62
- return 1.5;
63
- if (v <= 16)
64
- return Math.round(v * 0.333);
65
- return Math.floor(v * 0.7 - 12);
66
- }
67
- const spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v]);
68
- const space = {
69
- ...Object.fromEntries(spaces),
70
- ...Object.fromEntries(spacesNegative)
71
- };
72
- const zIndex = {
73
- 0: 0,
74
- 1: 100,
75
- 2: 200,
76
- 3: 300,
77
- 4: 400,
78
- 5: 500
79
- };
80
- const colorTokens = {
81
- light: {
82
- blue,
83
- gray,
84
- green,
85
- orange,
86
- pink,
87
- purple,
88
- red,
89
- yellow
90
- },
91
- dark: {
92
- blue: blueDark,
93
- gray: grayDark,
94
- green: greenDark,
95
- orange: orangeDark,
96
- pink: pinkDark,
97
- purple: purpleDark,
98
- red: redDark,
99
- yellow: yellowDark
100
- }
101
- };
102
- const darkColors = {
103
- ...colorTokens.dark.blue,
104
- ...colorTokens.dark.gray,
105
- ...colorTokens.dark.green,
106
- ...colorTokens.dark.orange,
107
- ...colorTokens.dark.pink,
108
- ...colorTokens.dark.purple,
109
- ...colorTokens.dark.red,
110
- ...colorTokens.dark.yellow
111
- };
112
- const lightColors = {
113
- ...colorTokens.light.blue,
114
- ...colorTokens.light.gray,
115
- ...colorTokens.light.green,
116
- ...colorTokens.light.orange,
117
- ...colorTokens.light.pink,
118
- ...colorTokens.light.purple,
119
- ...colorTokens.light.red,
120
- ...colorTokens.light.yellow
121
- };
122
- const color = {
123
- ...postfixObjKeys(lightColors, "Light"),
124
- ...postfixObjKeys(darkColors, "Dark")
125
- };
126
- function postfixObjKeys(obj, postfix) {
127
- return Object.fromEntries(
128
- Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])
129
- );
130
- }
131
- const radius = {
132
- 0: 0,
133
- 1: 3,
134
- 2: 5,
135
- 3: 7,
136
- 4: 9,
137
- true: 9,
138
- 5: 10,
139
- 6: 16,
140
- 7: 19,
141
- 8: 22,
142
- 9: 26,
143
- 10: 34,
144
- 11: 42,
145
- 12: 50
146
- };
147
- const tokens = createTokens({
148
- color,
149
- radius,
150
- zIndex,
151
- space,
152
- size
153
- });
154
- export {
155
- color,
156
- colorTokens,
157
- darkColors,
158
- lightColors,
159
- radius,
160
- size,
161
- space,
162
- tokens,
163
- zIndex
164
- };
1
+ import{blue as l,blueDark as y,gray as p,grayDark as $,green as g,greenDark as k,orange as c,orangeDark as u,pink as d,pinkDark as f,purple as K,purpleDark as b,red as x,redDark as z,yellow as h,yellowDark as S}from"@tamagui/colors";import{createTokens as m}from"@tamagui/core";const n={$0:0,"$0.25":2,"$0.5":4,"$0.75":8,$1:20,"$1.5":24,$2:28,"$2.5":32,$3:36,"$3.5":40,$4:44,$true:44,"$4.5":48,$5:52,$6:64,$7:74,$8:84,$9:94,$10:104,$11:124,$12:144,$13:164,$14:184,$15:204,$16:224,$17:224,$18:244,$19:264,$20:284},i=Object.entries(n).map(([r,t])=>[r,D(t)]);function D(r){return r===0?0:r===2?.5:r===4?1:r===8?1.5:r<=16?Math.round(r*.333):Math.floor(r*.7-12)}const j=i.slice(1).map(([r,t])=>[`-${r.slice(1)}`,-t]),w={...Object.fromEntries(i),...Object.fromEntries(j)},O={0:0,1:100,2:200,3:300,4:400,5:500},e={light:{blue:l,gray:p,green:g,orange:c,pink:d,purple:K,red:x,yellow:h},dark:{blue:y,gray:$,green:k,orange:u,pink:f,purple:b,red:z,yellow:S}},A={...e.dark.blue,...e.dark.gray,...e.dark.green,...e.dark.orange,...e.dark.pink,...e.dark.purple,...e.dark.red,...e.dark.yellow},E={...e.light.blue,...e.light.gray,...e.light.green,...e.light.orange,...e.light.pink,...e.light.purple,...e.light.red,...e.light.yellow},I={...s(E,"Light"),...s(A,"Dark")};function s(r,t){return Object.fromEntries(Object.entries(r).map(([o,a])=>[`${o}${t}`,a]))}const V={0:0,1:3,2:5,3:7,4:9,true:9,5:10,6:16,7:19,8:22,9:26,10:34,11:42,12:50},M=m({color:I,radius:V,zIndex:O,space:w,size:n});export{I as color,e as colorTokens,A as darkColors,E as lightColors,V as radius,n as size,w as space,M as tokens,O as zIndex};
165
2
  //# sourceMappingURL=tokens.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/tokens.tsx"],
4
4
  "sourcesContent": ["import {\n blue,\n blueDark,\n gray,\n grayDark,\n green,\n greenDark,\n orange,\n orangeDark,\n pink,\n pinkDark,\n purple,\n purpleDark,\n red,\n redDark,\n yellow,\n yellowDark,\n} from '@tamagui/colors'\nimport { Variable, createTokens, createVariable } from '@tamagui/core'\n\n// should roughly map to button/input etc height at each level\n// fonts should match that height/lineHeight at each stop\n// so these are really non-linear on purpose\n// why?\n// - at sizes <1, used for fine grained things (borders, smallest paddingY)\n// - so smallest padY should be roughly 1-4px so it can join with lineHeight\n// - at sizes >=1, have to consider \"pressability\" (jumps up)\n// - after that it should go upwards somewhat naturally\n// - H1 / headings top out at 10 naturally, so after 10 we can go upwards faster\n// but also one more wrinkle...\n// space is used in conjunction with size\n// i'm setting space to generally just a fixed fraction of size (~1/3-2/3 still fine tuning)\nexport const size = {\n $0: 0,\n '$0.25': 2,\n '$0.5': 4,\n '$0.75': 8,\n $1: 20,\n '$1.5': 24,\n $2: 28,\n '$2.5': 32,\n $3: 36,\n '$3.5': 40,\n $4: 44,\n $true: 44,\n '$4.5': 48,\n $5: 52,\n $6: 64,\n $7: 74,\n $8: 84,\n $9: 94,\n $10: 104,\n $11: 124,\n $12: 144,\n $13: 164,\n $14: 184,\n $15: 204,\n $16: 224,\n $17: 224,\n $18: 244,\n $19: 264,\n $20: 284,\n}\n\ntype SizeKeysIn = keyof typeof size\ntype Sizes = {\n [Key in SizeKeysIn extends `$${infer Key}` ? Key : SizeKeysIn]: number\n}\ntype SizeKeys = `${keyof Sizes extends `${infer K}` ? K : never}`\n\nconst spaces = Object.entries(size).map(([k, v]) => {\n return [k, sizeToSpace(v)] as const\n})\n\n// a bit odd but keeping backward compat for values >8 while fixing below\nfunction sizeToSpace(v: number) {\n if (v === 0) return 0\n if (v === 2) return 0.5\n if (v === 4) return 1\n if (v === 8) return 1.5\n if (v <= 16) return Math.round(v * 0.333)\n return Math.floor(v * 0.7 - 12)\n}\n\nconst spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v])\n\ntype SizeKeysWithNegatives =\n | Exclude<`-${SizeKeys extends `$${infer Key}` ? Key : SizeKeys}`, '-0'>\n | SizeKeys\n\nexport const space: {\n [Key in SizeKeysWithNegatives]: Key extends keyof Sizes ? Sizes[Key] : number\n} = {\n ...Object.fromEntries(spaces),\n ...Object.fromEntries(spacesNegative),\n} as any\n\nexport const zIndex = {\n 0: 0,\n 1: 100,\n 2: 200,\n 3: 300,\n 4: 400,\n 5: 500,\n}\n\nexport const colorTokens = {\n light: {\n blue: blue,\n gray: gray,\n green: green,\n orange: orange,\n pink: pink,\n purple: purple,\n red: red,\n yellow: yellow,\n },\n dark: {\n blue: blueDark,\n gray: grayDark,\n green: greenDark,\n orange: orangeDark,\n pink: pinkDark,\n purple: purpleDark,\n red: redDark,\n yellow: yellowDark,\n },\n}\n\nexport const darkColors = {\n ...colorTokens.dark.blue,\n ...colorTokens.dark.gray,\n ...colorTokens.dark.green,\n ...colorTokens.dark.orange,\n ...colorTokens.dark.pink,\n ...colorTokens.dark.purple,\n ...colorTokens.dark.red,\n ...colorTokens.dark.yellow,\n}\n\nexport const lightColors = {\n ...colorTokens.light.blue,\n ...colorTokens.light.gray,\n ...colorTokens.light.green,\n ...colorTokens.light.orange,\n ...colorTokens.light.pink,\n ...colorTokens.light.purple,\n ...colorTokens.light.red,\n ...colorTokens.light.yellow,\n}\n\nexport const color = {\n ...postfixObjKeys(lightColors, 'Light'),\n ...postfixObjKeys(darkColors, 'Dark'),\n}\n\nfunction postfixObjKeys<\n A extends { [key: string]: Variable<string> | string },\n B extends string\n>(\n obj: A,\n postfix: B\n): {\n [Key in `${keyof A extends string ? keyof A : never}${B}`]: Variable<string> | string\n} {\n return Object.fromEntries(\n Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])\n ) as any\n}\n\nexport const radius = {\n 0: 0,\n 1: 3,\n 2: 5,\n 3: 7,\n 4: 9,\n true: 9,\n 5: 10,\n 6: 16,\n 7: 19,\n 8: 22,\n 9: 26,\n 10: 34,\n 11: 42,\n 12: 50,\n}\n\nexport const tokens = createTokens({\n color,\n radius,\n zIndex,\n space,\n size,\n})\n"],
5
- "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAmB,oBAAoC;AAchD,MAAM,OAAO;AAAA,EAClB,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ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AQE,EACR,KAAME,EACN,OAAQE,EACR,IAAKE,EACL,OAAQE,CACV,EACA,KAAM,CACJ,KAAMb,EACN,KAAME,EACN,MAAOE,EACP,OAAQE,EACR,KAAME,EACN,OAAQE,EACR,IAAKE,EACL,OAAQE,CACV,CACF,EAEaW,EAAa,CACxB,GAAGD,EAAY,KAAK,KACpB,GAAGA,EAAY,KAAK,KACpB,GAAGA,EAAY,KAAK,MACpB,GAAGA,EAAY,KAAK,OACpB,GAAGA,EAAY,KAAK,KACpB,GAAGA,EAAY,KAAK,OACpB,GAAGA,EAAY,KAAK,IACpB,GAAGA,EAAY,KAAK,MACtB,EAEaE,EAAc,CACzB,GAAGF,EAAY,MAAM,KACrB,GAAGA,EAAY,MAAM,KACrB,GAAGA,EAAY,MAAM,MACrB,GAAGA,EAAY,MAAM,OACrB,GAAGA,EAAY,MAAM,KACrB,GAAGA,EAAY,MAAM,OACrB,GAAGA,EAAY,MAAM,IACrB,GAAGA,EAAY,MAAM,MACvB,EAEaG,EAAQ,CACnB,GAAGC,EAAeF,EAAa,OAAO,EACtC,GAAGE,EAAeH,EAAY,MAAM,CACtC,EAEA,SAASG,EAIPC,EACAC,EAGA,CACA,OAAO,OAAO,YACZ,OAAO,QAAQD,CAAG,EAAE,IAAI,CAAC,CAACX,EAAGC,CAAC,IAAM,CAAC,GAAGD,IAAIY,IAAWX,CAAC,CAAC,CAC3D,CACF,CAEO,MAAMY,EAAS,CACpB,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,EAAG,EACH,KAAM,EACN,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,EAAG,GACH,GAAI,GACJ,GAAI,GACJ,GAAI,EACN,EAEaC,EAASjB,EAAa,CACjC,MAAAY,EACA,OAAAI,EACA,OAAAR,EACA,MAAAD,EACA,KAAAN,CACF,CAAC",
6
+ "names": ["blue", "blueDark", "gray", "grayDark", "green", "greenDark", "orange", "orangeDark", "pink", "pinkDark", "purple", "purpleDark", "red", "redDark", "yellow", "yellowDark", "createTokens", "size", "spaces", "k", "v", "sizeToSpace", "spacesNegative", "space", "zIndex", "colorTokens", "darkColors", "lightColors", "color", "postfixObjKeys", "obj", "postfix", "radius", "tokens"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/theme-base",
3
- "version": "1.13.3",
3
+ "version": "1.14.0",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -27,12 +27,12 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@tamagui/colors": "1.13.3",
31
- "@tamagui/core": "1.13.3",
32
- "@tamagui/create-themes": "1.13.3"
30
+ "@tamagui/colors": "1.14.0",
31
+ "@tamagui/core": "1.14.0",
32
+ "@tamagui/create-themes": "1.14.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@tamagui/build": "1.13.3"
35
+ "@tamagui/build": "1.14.0"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public"