@tamagui/theme-base 1.0.0-beta.172
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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/cjs/colorUtils.js +60 -0
- package/dist/cjs/colorUtils.js.map +7 -0
- package/dist/cjs/colors.js +64 -0
- package/dist/cjs/colors.js.map +7 -0
- package/dist/cjs/firaFont.js +51 -0
- package/dist/cjs/firaFont.js.map +7 -0
- package/dist/cjs/fonts.js +19 -0
- package/dist/cjs/fonts.js.map +7 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/interFont.js +80 -0
- package/dist/cjs/interFont.js.map +7 -0
- package/dist/cjs/themes.js +256 -0
- package/dist/cjs/themes.js.map +7 -0
- package/dist/cjs/tokens.js +89 -0
- package/dist/cjs/tokens.js.map +7 -0
- package/dist/esm/colorUtils.js +43 -0
- package/dist/esm/colorUtils.js.map +7 -0
- package/dist/esm/colors.js +54 -0
- package/dist/esm/colors.js.map +7 -0
- package/dist/esm/firaFont.js +32 -0
- package/dist/esm/firaFont.js.map +7 -0
- package/dist/esm/fonts.js +3 -0
- package/dist/esm/fonts.js.map +7 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/interFont.js +61 -0
- package/dist/esm/interFont.js.map +7 -0
- package/dist/esm/themes.js +232 -0
- package/dist/esm/themes.js.map +7 -0
- package/dist/esm/tokens.js +62 -0
- package/dist/esm/tokens.js.map +7 -0
- package/dist/jsx/colorUtils.js +42 -0
- package/dist/jsx/colors.js +53 -0
- package/dist/jsx/firaFont.js +31 -0
- package/dist/jsx/fonts.js +2 -0
- package/dist/jsx/index.js +3 -0
- package/dist/jsx/interFont.js +60 -0
- package/dist/jsx/themes.js +231 -0
- package/dist/jsx/tokens.js +61 -0
- package/package.json +27 -0
- package/types/colorUtils.d.ts +4 -0
- package/types/colorUtils.d.ts.map +1 -0
- package/types/colors.d.ts +444 -0
- package/types/colors.d.ts.map +1 -0
- package/types/firaFont.d.ts +28 -0
- package/types/firaFont.d.ts.map +1 -0
- package/types/fonts.d.ts +3 -0
- package/types/fonts.d.ts.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.d.ts.map +1 -0
- package/types/interFont.d.ts +57 -0
- package/types/interFont.d.ts.map +1 -0
- package/types/themes.d.ts +559 -0
- package/types/themes.d.ts.map +1 -0
- package/types/tokens.d.ts +457 -0
- package/types/tokens.d.ts.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Nate Wienert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
```tsx
|
|
2
|
+
import '@tamagui/theme-base/inter.css' // web-fonts
|
|
3
|
+
import '@tamagui/theme-base/fira-code.css' // web-fonts
|
|
4
|
+
import { shorthands } from '@tamagui/shorthands'
|
|
5
|
+
import { themes, tokens } from '@tamagui/theme-base'
|
|
6
|
+
import { createTamagui } from 'tamagui'
|
|
7
|
+
|
|
8
|
+
export default createTamagui({
|
|
9
|
+
themes,
|
|
10
|
+
tokens,
|
|
11
|
+
shorthands,
|
|
12
|
+
})
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For Fira Code:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
.font_mono {
|
|
19
|
+
font-feature-settings:"liga","tnum","zero","ss01","locl","calt";
|
|
20
|
+
}
|
|
21
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
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 = /* @__PURE__ */ __name((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
|
+
}, "hexToRGBA");
|
|
35
|
+
const setColorAlpha = /* @__PURE__ */ __name((colorIn, alpha = 1) => {
|
|
36
|
+
let 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
|
+
}, "setColorAlpha");
|
|
48
|
+
const isValidHex = /* @__PURE__ */ __name((hex) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex), "isValidHex");
|
|
49
|
+
const getChunksFromString = /* @__PURE__ */ __name((st, chunkSize = 0) => st.match(new RegExp(`.{${chunkSize}}`, "g")), "getChunksFromString");
|
|
50
|
+
const convertHexUnitTo256 = /* @__PURE__ */ __name((hexStr) => parseInt(hexStr.repeat(2 / hexStr.length), 16), "convertHexUnitTo256");
|
|
51
|
+
const getAlphaFloat = /* @__PURE__ */ __name((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
|
+
}, "getAlphaFloat");
|
|
60
|
+
//# sourceMappingURL=colorUtils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/colorUtils.tsx"],
|
|
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 let 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) => 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,wBAAC,KAAa,QAAQ,MAAM;AACnD,MAAI,CAAC,WAAW,GAAG,GAAG;AACpB,UAAM,IAAI,MAAM,aAAa;AAAA,EAC/B;AACA,QAAM,YAAY,KAAK,MAAO,KAAI,SAAS,KAAK,CAAC;AACjD,QAAM,SAAS,oBAAoB,IAAI,MAAM,CAAC,GAAG,SAAS;AAC1D,QAAM,CAAC,GAAG,GAAG,GAAG,KAAK,kCAAQ,IAAI,yBAAwB,CAAC;AAC1D,SAAO,QAAQ,MAAM,MAAM,MAAM,cAAc,GAAG,KAAK;AACzD,GARyB;AAUlB,MAAM,gBAAgB,wBAAC,SAA4B,QAAQ,MAAM;AACtE,MAAI,QAAQ,GAAG,kCAAiB,OAAO;AACvC,MAAI,MAAM,WAAW,MAAM,GAAG;AAC5B,WAAO,MAAM,QAAQ,OAAO,MAAM,EAAE,QAAQ,KAAK,KAAK,QAAQ;AAAA,EAChE;AACA,MAAI,MAAM,WAAW,GAAG,GAAG;AACzB,WAAO,UAAU,OAAO,KAAK;AAAA,EAC/B;AACA,MAAI,MAAM,WAAW,MAAM,GAAG;AAC5B,WAAO,MAAM,QAAQ,OAAO,MAAM,EAAE,QAAQ,KAAK,KAAK,QAAQ;AAAA,EAChE;AACA,SAAO;AACT,GAZ6B;AAc7B,MAAM,aAAa,wBAAC,QAAgB,6BAA6B,KAAK,GAAG,GAAtD;AAEnB,MAAM,sBAAsB,wBAAC,IAAY,YAAY,MACnD,GAAG,MAAM,IAAI,OAAO,KAAK,cAAc,GAAG,CAAC,GADjB;AAG5B,MAAM,sBAAsB,wBAAC,WAAmB,SAAS,OAAO,OAAO,IAAI,OAAO,MAAM,GAAG,EAAE,GAAjE;AAE5B,MAAM,gBAAgB,wBAAC,GAAQ,QAAQ,MAAM;AAC3C,MAAI,MAAM,QAAW;AACnB,WAAO,IAAI;AAAA,EACb;AACA,MAAI,OAAO,SAAS,YAAY,QAAQ,KAAK,QAAQ,GAAG;AACtD,WAAO;AAAA,EACT;AACA,SAAO;AACT,GARsB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __export = (target, all) => {
|
|
22
|
+
for (var name in all)
|
|
23
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
|
+
};
|
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
27
|
+
for (let key of __getOwnPropNames(from))
|
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
30
|
+
}
|
|
31
|
+
return to;
|
|
32
|
+
};
|
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
var colors_exports = {};
|
|
36
|
+
__export(colors_exports, {
|
|
37
|
+
allDarkColors: () => allDarkColors,
|
|
38
|
+
allLightColors: () => allLightColors,
|
|
39
|
+
colorNames: () => colorNames,
|
|
40
|
+
colorNamesDark: () => colorNamesDark,
|
|
41
|
+
colorNamesLight: () => colorNamesLight,
|
|
42
|
+
darkColorsPostfixed: () => darkColorsPostfixed
|
|
43
|
+
});
|
|
44
|
+
module.exports = __toCommonJS(colors_exports);
|
|
45
|
+
var Colors = __toESM(require("@tamagui/colors"));
|
|
46
|
+
const colorNames = [
|
|
47
|
+
"blue",
|
|
48
|
+
"gray",
|
|
49
|
+
"green",
|
|
50
|
+
"indigo",
|
|
51
|
+
"orange",
|
|
52
|
+
"pink",
|
|
53
|
+
"purple",
|
|
54
|
+
"red",
|
|
55
|
+
"violet",
|
|
56
|
+
"yellow",
|
|
57
|
+
"teal"
|
|
58
|
+
];
|
|
59
|
+
const allLightColors = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, Colors.blue), Colors.gray), Colors.grayA), Colors.green), Colors.indigo), Colors.orange), Colors.pink), Colors.purple), Colors.red), Colors.violet), Colors.yellow), Colors.teal);
|
|
60
|
+
const allDarkColors = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, Colors.blueDark), Colors.grayDark), Colors.grayDarkA), Colors.greenDark), Colors.indigoDark), Colors.orangeDark), Colors.pinkDark), Colors.purpleDark), Colors.redDark), Colors.violetDark), Colors.yellowDark), Colors.tealDark);
|
|
61
|
+
const darkColorsPostfixed = Object.fromEntries(Object.entries(allDarkColors).map(([k, v]) => [`${k}Dark`, v]));
|
|
62
|
+
const colorNamesLight = Object.keys(allLightColors);
|
|
63
|
+
const colorNamesDark = Object.keys(allDarkColors);
|
|
64
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/colors.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as Colors from '@tamagui/colors'\n\n// nice and flat\n\nexport const colorNames = [\n 'blue',\n 'gray',\n 'green',\n 'indigo',\n 'orange',\n 'pink',\n 'purple',\n 'red',\n 'violet',\n 'yellow',\n 'teal',\n] as const\n\nexport const allLightColors = {\n ...Colors.blue,\n ...Colors.gray,\n ...Colors.grayA,\n ...Colors.green,\n ...Colors.indigo,\n ...Colors.orange,\n ...Colors.pink,\n ...Colors.purple,\n ...Colors.red,\n ...Colors.violet,\n ...Colors.yellow,\n ...Colors.teal,\n}\n\nexport const allDarkColors = {\n ...Colors.blueDark,\n ...Colors.grayDark,\n ...Colors.grayDarkA,\n ...Colors.greenDark,\n ...Colors.indigoDark,\n ...Colors.orangeDark,\n ...Colors.pinkDark,\n ...Colors.purpleDark,\n ...Colors.redDark,\n ...Colors.violetDark,\n ...Colors.yellowDark,\n ...Colors.tealDark,\n}\n\nexport const darkColorsPostfixed = Object.fromEntries(\n // Dark\n Object.entries(allDarkColors).map(([k, v]) => [`${k}Dark`, v])\n) as {\n [key in `${keyof typeof allDarkColors}Dark`]: string\n}\n\nexport type ColorNamesLight = keyof typeof allLightColors\nexport type ColorNamesDark = keyof typeof allDarkColors\n\nexport const colorNamesLight = Object.keys(allLightColors) as ColorNamesLight[]\nexport const colorNamesDark = Object.keys(allDarkColors) as ColorNamesDark[]\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AAIjB,MAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,iBAAiB,wLACzB,OAAO,OACP,OAAO,OACP,OAAO,QACP,OAAO,QACP,OAAO,SACP,OAAO,SACP,OAAO,OACP,OAAO,SACP,OAAO,MACP,OAAO,SACP,OAAO,SACP,OAAO;AAGL,MAAM,gBAAgB,wLACxB,OAAO,WACP,OAAO,WACP,OAAO,YACP,OAAO,YACP,OAAO,aACP,OAAO,aACP,OAAO,WACP,OAAO,aACP,OAAO,UACP,OAAO,aACP,OAAO,aACP,OAAO;AAGL,MAAM,sBAAsB,OAAO,YAExC,OAAO,QAAQ,aAAa,EAAE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC,CAC/D;AAOO,MAAM,kBAAkB,OAAO,KAAK,cAAc;AAClD,MAAM,iBAAiB,OAAO,KAAK,aAAa;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var firaFont_exports = {};
|
|
19
|
+
__export(firaFont_exports, {
|
|
20
|
+
firaFont: () => firaFont
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(firaFont_exports);
|
|
23
|
+
var import_core = require("@tamagui/core");
|
|
24
|
+
const firaFont = (0, import_core.createFont)({
|
|
25
|
+
family: "Fira Code, Monaco, Consolas, Ubuntu Mono, monospace",
|
|
26
|
+
size: {
|
|
27
|
+
1: 10,
|
|
28
|
+
2: 11,
|
|
29
|
+
3: 12,
|
|
30
|
+
4: 13,
|
|
31
|
+
5: 15,
|
|
32
|
+
6: 16,
|
|
33
|
+
7: 17
|
|
34
|
+
},
|
|
35
|
+
lineHeight: {
|
|
36
|
+
1: 15,
|
|
37
|
+
2: 18,
|
|
38
|
+
3: 19,
|
|
39
|
+
4: 20,
|
|
40
|
+
5: 22,
|
|
41
|
+
6: 24
|
|
42
|
+
},
|
|
43
|
+
weight: {
|
|
44
|
+
4: "300",
|
|
45
|
+
6: "700"
|
|
46
|
+
},
|
|
47
|
+
letterSpacing: {
|
|
48
|
+
4: 0
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=firaFont.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/firaFont.tsx"],
|
|
4
|
+
"sourcesContent": ["import { createFont } from '@tamagui/core'\n\nexport const firaFont = createFont({\n family: 'Fira Code, Monaco, Consolas, Ubuntu Mono, monospace',\n size: {\n 1: 10,\n 2: 11,\n 3: 12,\n 4: 13,\n 5: 15,\n 6: 16,\n 7: 17,\n },\n lineHeight: {\n 1: 15,\n 2: 18,\n 3: 19,\n 4: 20,\n 5: 22,\n 6: 24,\n },\n weight: {\n 4: '300',\n 6: '700',\n },\n letterSpacing: {\n 4: 0,\n },\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA2B;AAEpB,MAAM,WAAW,4BAAW;AAAA,EACjC,QAAQ;AAAA,EACR,MAAM;AAAA,IACJ,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EACA,YAAY;AAAA,IACV,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EACA,QAAQ;AAAA,IACN,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EACA,eAAe;AAAA,IACb,GAAG;AAAA,EACL;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var fonts_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(fonts_exports);
|
|
17
|
+
__reExport(fonts_exports, require("./interFont"), module.exports);
|
|
18
|
+
__reExport(fonts_exports, require("./firaFont"), module.exports);
|
|
19
|
+
//# sourceMappingURL=fonts.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var src_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(src_exports);
|
|
17
|
+
__reExport(src_exports, require("./themes"), module.exports);
|
|
18
|
+
__reExport(src_exports, require("./tokens"), module.exports);
|
|
19
|
+
__reExport(src_exports, require("./colors"), module.exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.tsx"],
|
|
4
|
+
"sourcesContent": ["export * from './themes'\nexport * from './tokens'\nexport * from './colors'\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,qBAAd;AACA,wBAAc,qBADd;AAEA,wBAAc,qBAFd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var interFont_exports = {};
|
|
19
|
+
__export(interFont_exports, {
|
|
20
|
+
interFont: () => interFont
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(interFont_exports);
|
|
23
|
+
var import_core = require("@tamagui/core");
|
|
24
|
+
const interFont = (0, import_core.createFont)({
|
|
25
|
+
family: 'Inter, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
|
|
26
|
+
size: {
|
|
27
|
+
1: 10,
|
|
28
|
+
2: 12,
|
|
29
|
+
3: 14,
|
|
30
|
+
4: 15,
|
|
31
|
+
5: 16,
|
|
32
|
+
6: 17,
|
|
33
|
+
7: 21,
|
|
34
|
+
8: 25,
|
|
35
|
+
9: 32,
|
|
36
|
+
10: 45,
|
|
37
|
+
11: 58,
|
|
38
|
+
12: 68,
|
|
39
|
+
13: 82,
|
|
40
|
+
14: 102,
|
|
41
|
+
15: 124,
|
|
42
|
+
16: 144
|
|
43
|
+
},
|
|
44
|
+
lineHeight: {
|
|
45
|
+
1: 15,
|
|
46
|
+
2: 20,
|
|
47
|
+
3: 25,
|
|
48
|
+
4: 27,
|
|
49
|
+
5: 29,
|
|
50
|
+
6: 31,
|
|
51
|
+
7: 34,
|
|
52
|
+
8: 38,
|
|
53
|
+
9: 42,
|
|
54
|
+
10: 54,
|
|
55
|
+
11: 72,
|
|
56
|
+
12: 80,
|
|
57
|
+
13: 100,
|
|
58
|
+
14: 120,
|
|
59
|
+
15: 150,
|
|
60
|
+
16: 170
|
|
61
|
+
},
|
|
62
|
+
weight: {
|
|
63
|
+
4: "300",
|
|
64
|
+
7: "600",
|
|
65
|
+
8: "700"
|
|
66
|
+
},
|
|
67
|
+
letterSpacing: {
|
|
68
|
+
4: 0,
|
|
69
|
+
7: 0,
|
|
70
|
+
8: -1,
|
|
71
|
+
9: -2,
|
|
72
|
+
10: -3,
|
|
73
|
+
11: -4,
|
|
74
|
+
12: -5,
|
|
75
|
+
13: -6,
|
|
76
|
+
14: -7,
|
|
77
|
+
15: -8
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=interFont.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/interFont.tsx"],
|
|
4
|
+
"sourcesContent": ["import { createFont } from '@tamagui/core'\n\nexport const interFont = createFont({\n family:\n 'Inter, -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif',\n size: {\n 1: 10,\n 2: 12,\n 3: 14,\n 4: 15,\n 5: 16,\n 6: 17,\n 7: 21,\n 8: 25,\n 9: 32,\n 10: 45,\n 11: 58,\n 12: 68,\n 13: 82,\n 14: 102,\n 15: 124,\n 16: 144,\n },\n lineHeight: {\n 1: 15,\n 2: 20,\n 3: 25,\n 4: 27,\n 5: 29,\n 6: 31,\n 7: 34,\n 8: 38,\n 9: 42,\n 10: 54,\n 11: 72,\n 12: 80,\n 13: 100,\n 14: 120,\n 15: 150,\n 16: 170,\n },\n weight: {\n 4: '300',\n 7: '600',\n 8: '700',\n },\n letterSpacing: {\n 4: 0,\n 7: 0,\n 8: -1,\n 9: -2,\n 10: -3,\n 11: -4,\n 12: -5,\n 13: -6,\n 14: -7,\n 15: -8,\n },\n})\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA2B;AAEpB,MAAM,YAAY,4BAAW;AAAA,EAClC,QACE;AAAA,EACF,MAAM;AAAA,IACJ,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAAA,EACA,YAAY;AAAA,IACV,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAAA,EACA,QAAQ;AAAA,IACN,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAAA,EACA,eAAe;AAAA,IACb,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
25
|
+
var __export = (target, all) => {
|
|
26
|
+
for (var name in all)
|
|
27
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
+
};
|
|
29
|
+
var __copyProps = (to, from, except, desc) => {
|
|
30
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
31
|
+
for (let key of __getOwnPropNames(from))
|
|
32
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
33
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
|
+
}
|
|
35
|
+
return to;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
38
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
39
|
+
var themes_exports = {};
|
|
40
|
+
__export(themes_exports, {
|
|
41
|
+
colorSchemes: () => colorSchemes,
|
|
42
|
+
darkGradient: () => darkGradient,
|
|
43
|
+
lightGradient: () => lightGradient,
|
|
44
|
+
themes: () => themes
|
|
45
|
+
});
|
|
46
|
+
module.exports = __toCommonJS(themes_exports);
|
|
47
|
+
var Colors = __toESM(require("@tamagui/colors"));
|
|
48
|
+
var import_core = require("@tamagui/core");
|
|
49
|
+
var import_colors = require("./colors");
|
|
50
|
+
var import_colorUtils = require("./colorUtils");
|
|
51
|
+
var import_tokens = require("./tokens");
|
|
52
|
+
const alternates = [1, 2, 3, 4];
|
|
53
|
+
function createThemesFrom(name, getTheme, props) {
|
|
54
|
+
const { shift = 0 } = props;
|
|
55
|
+
const theme = getTheme(0 + shift, props);
|
|
56
|
+
let themeEntries = [[name, theme]];
|
|
57
|
+
const altThemes = alternates.map((alt) => [
|
|
58
|
+
`${name}_alt${alt}`,
|
|
59
|
+
getTheme(alt + shift, props)
|
|
60
|
+
]);
|
|
61
|
+
const altButtonThemes = alternates.map((_, i) => {
|
|
62
|
+
const [bName, bTheme] = [altThemes[i][0], (altThemes[i + 1] || altThemes[i])[1]];
|
|
63
|
+
return [`${bName}_Button`, bTheme];
|
|
64
|
+
});
|
|
65
|
+
const darkerTheme = getTheme(Math.max(0, shift + (props.isLight ? 1 : -1)), props);
|
|
66
|
+
const activeTheme = makeActiveTheme(theme);
|
|
67
|
+
themeEntries = [
|
|
68
|
+
...themeEntries,
|
|
69
|
+
...altThemes,
|
|
70
|
+
...altButtonThemes,
|
|
71
|
+
[`${name}_Button`, altThemes[0][1]],
|
|
72
|
+
[`${name}_darker`, darkerTheme],
|
|
73
|
+
[`${name}_active`, activeTheme]
|
|
74
|
+
];
|
|
75
|
+
const themes2 = Object.fromEntries(themeEntries);
|
|
76
|
+
return themes2;
|
|
77
|
+
}
|
|
78
|
+
__name(createThemesFrom, "createThemesFrom");
|
|
79
|
+
const createTheme = /* @__PURE__ */ __name((str = 1, {
|
|
80
|
+
backgrounds,
|
|
81
|
+
isLight = true,
|
|
82
|
+
colors = [...backgrounds].reverse(),
|
|
83
|
+
offsets: offsetsProp
|
|
84
|
+
}) => {
|
|
85
|
+
const offsets = {
|
|
86
|
+
borderColor: (offsetsProp == null ? void 0 : offsetsProp.borderColor) ?? (offsetsProp == null ? void 0 : offsetsProp.background) ?? [0, 0, 0, 0],
|
|
87
|
+
background: (offsetsProp == null ? void 0 : offsetsProp.background) ?? [0, 0, 0, 0],
|
|
88
|
+
color: (offsetsProp == null ? void 0 : offsetsProp.color) ?? [0, 0, 0, 0]
|
|
89
|
+
};
|
|
90
|
+
const darkColors = isLight ? colors : backgrounds;
|
|
91
|
+
const lighterDir = isLight ? -1 : 1;
|
|
92
|
+
const darkerDir = -lighterDir;
|
|
93
|
+
const strongerDir = isLight ? darkerDir : lighterDir;
|
|
94
|
+
const get = /* @__PURE__ */ __name((arr, index, name = "background") => {
|
|
95
|
+
return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))];
|
|
96
|
+
}, "get");
|
|
97
|
+
const colorTranslucent = (0, import_colorUtils.setColorAlpha)((0, import_core.getVariableValue)(get(colors, 0 + str, "color")), 0.5);
|
|
98
|
+
return {
|
|
99
|
+
background: get(backgrounds, str),
|
|
100
|
+
backgroundStronger: get(backgrounds, str + strongerDir),
|
|
101
|
+
backgroundSoft: get(backgrounds, str + 3),
|
|
102
|
+
backgroundHover: get(backgrounds, str + lighterDir),
|
|
103
|
+
backgroundPress: get(backgrounds, str + darkerDir * 1),
|
|
104
|
+
backgroundFocus: get(backgrounds, str + darkerDir * 2),
|
|
105
|
+
backgroundTransparent: import_tokens.tokens.color.grayA1,
|
|
106
|
+
borderColor: isLight ? get(colors, 8 - str, "borderColor") : get(backgrounds, 2 + str, "borderColor"),
|
|
107
|
+
borderColorHover: isLight ? get(colors, 6 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
108
|
+
borderColorPress: isLight ? get(colors, 5 - str, "borderColor") : get(backgrounds, 1 + str, "borderColor"),
|
|
109
|
+
borderColorFocus: isLight ? get(colors, 4 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
110
|
+
color: get(colors, 0 + str, "color"),
|
|
111
|
+
colorHover: get(colors, 1 + str, "color"),
|
|
112
|
+
colorPress: get(colors, 2 + str, "color"),
|
|
113
|
+
colorFocus: get(colors, 3 + str, "color"),
|
|
114
|
+
colorTranslucent,
|
|
115
|
+
colorMid: colors[Math.floor(colors.length / 2)],
|
|
116
|
+
shadowColor: isLight ? import_tokens.tokens.color.grayA3 : import_tokens.tokens.color.grayA8,
|
|
117
|
+
shadowColorHover: darkColors[!isLight ? 1 : 8],
|
|
118
|
+
shadowColorPress: darkColors[!isLight ? 1 : 8],
|
|
119
|
+
shadowColorFocus: darkColors[!isLight ? 1 : 8]
|
|
120
|
+
};
|
|
121
|
+
}, "createTheme");
|
|
122
|
+
const colorSchemes = [
|
|
123
|
+
{ name: "blue", colors: Colors.blue, darkColors: Colors.blueDark },
|
|
124
|
+
{ name: "gray", colors: Colors.gray, darkColors: Colors.grayDark },
|
|
125
|
+
{ name: "green", colors: Colors.green, darkColors: Colors.greenDark },
|
|
126
|
+
{ name: "indigo", colors: Colors.indigo, darkColors: Colors.indigoDark },
|
|
127
|
+
{ name: "orange", colors: Colors.orange, darkColors: Colors.orangeDark },
|
|
128
|
+
{ name: "pink", colors: Colors.pink, darkColors: Colors.pinkDark },
|
|
129
|
+
{ name: "purple", colors: Colors.purple, darkColors: Colors.purpleDark },
|
|
130
|
+
{ name: "red", colors: Colors.red, darkColors: Colors.redDark },
|
|
131
|
+
{ name: "violet", colors: Colors.violet, darkColors: Colors.violetDark },
|
|
132
|
+
{ name: "yellow", colors: Colors.yellow, darkColors: Colors.yellowDark },
|
|
133
|
+
{ name: "teal", colors: Colors.teal, darkColors: Colors.tealDark },
|
|
134
|
+
{ name: "lime", colors: Colors.lime, darkColors: Colors.limeDark },
|
|
135
|
+
{ name: "brown", colors: Colors.brown, darkColors: Colors.brownDark }
|
|
136
|
+
];
|
|
137
|
+
const lightGradient = [
|
|
138
|
+
"#fff",
|
|
139
|
+
"#f4f4f4",
|
|
140
|
+
import_tokens.tokens.color.gray1,
|
|
141
|
+
import_tokens.tokens.color.gray2,
|
|
142
|
+
import_tokens.tokens.color.gray3,
|
|
143
|
+
import_tokens.tokens.color.gray4,
|
|
144
|
+
import_tokens.tokens.color.gray5,
|
|
145
|
+
import_tokens.tokens.color.gray6,
|
|
146
|
+
import_tokens.tokens.color.gray7,
|
|
147
|
+
import_tokens.tokens.color.gray8,
|
|
148
|
+
import_tokens.tokens.color.gray9,
|
|
149
|
+
import_tokens.tokens.color.gray10,
|
|
150
|
+
import_tokens.tokens.color.gray11,
|
|
151
|
+
import_tokens.tokens.color.gray12
|
|
152
|
+
];
|
|
153
|
+
const darkGradient = [
|
|
154
|
+
"#0f0f0f",
|
|
155
|
+
"#111111",
|
|
156
|
+
"#141414",
|
|
157
|
+
"#191919",
|
|
158
|
+
"#242424",
|
|
159
|
+
"#292929",
|
|
160
|
+
"#323232",
|
|
161
|
+
"#383838",
|
|
162
|
+
"#424242",
|
|
163
|
+
"#494949",
|
|
164
|
+
"#545454",
|
|
165
|
+
"#626262"
|
|
166
|
+
];
|
|
167
|
+
const lightThemes = createThemesFrom("light", createTheme, {
|
|
168
|
+
backgrounds: lightGradient,
|
|
169
|
+
isLight: true
|
|
170
|
+
});
|
|
171
|
+
const darkThemes = createThemesFrom("dark", createTheme, {
|
|
172
|
+
backgrounds: darkGradient,
|
|
173
|
+
colors: lightGradient,
|
|
174
|
+
isLight: false,
|
|
175
|
+
shift: 1,
|
|
176
|
+
offsets: {
|
|
177
|
+
color: [0, 6, 7, 7, 7, 7]
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
const baseThemes = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, lightThemes), {
|
|
181
|
+
light: __spreadValues(__spreadValues({}, import_colors.allLightColors), lightThemes.light),
|
|
182
|
+
light_active: makeActiveTheme(lightThemes.light),
|
|
183
|
+
light_Card: lightThemes.light,
|
|
184
|
+
light_Button: lightThemes.light_alt1
|
|
185
|
+
}), darkThemes), {
|
|
186
|
+
dark: __spreadValues(__spreadValues({}, import_colors.allDarkColors), darkThemes.dark),
|
|
187
|
+
dark_active: makeActiveTheme(darkThemes.dark),
|
|
188
|
+
dark_Card: darkThemes.dark_alt1,
|
|
189
|
+
dark_Button: darkThemes.dark_alt1
|
|
190
|
+
});
|
|
191
|
+
function makeActiveTheme(theme) {
|
|
192
|
+
const res = __spreadValues({}, theme);
|
|
193
|
+
res.backgroundHover = res.background;
|
|
194
|
+
res.colorHover = res.color;
|
|
195
|
+
res.backgroundPress = res.background;
|
|
196
|
+
res.colorPress = res.color;
|
|
197
|
+
return res;
|
|
198
|
+
}
|
|
199
|
+
__name(makeActiveTheme, "makeActiveTheme");
|
|
200
|
+
const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) => {
|
|
201
|
+
const [altLightThemes, altDarkThemes] = [colors, darkColors].map((colors2, i) => {
|
|
202
|
+
const isLight = i === 0;
|
|
203
|
+
const scheme = isLight ? "light" : "dark";
|
|
204
|
+
const shift = isLight ? 0 : 1;
|
|
205
|
+
let backgrounds = Object.values(colors2);
|
|
206
|
+
if (!isLight) {
|
|
207
|
+
const [_, h, sp, lp] = backgrounds[0].match(/hsl\(([0-9\.]+), ([0-9\.]+)\%, ([0-9\.]+)\%\)/);
|
|
208
|
+
backgrounds.unshift(`hsl(${h}, ${sp}%, ${parseFloat(lp) / 2}%)`);
|
|
209
|
+
}
|
|
210
|
+
const themeWithAlts = createThemesFrom(name, createTheme, {
|
|
211
|
+
backgrounds,
|
|
212
|
+
isLight,
|
|
213
|
+
shift,
|
|
214
|
+
isBase: false,
|
|
215
|
+
offsets: {
|
|
216
|
+
background: isLight ? [1, 1, 1, 0, 0, 0] : null,
|
|
217
|
+
borderColor: isLight ? [0, 1, 1, 2, 2, -2] : null,
|
|
218
|
+
color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1]
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
return Object.entries(themeWithAlts).map(([k, v]) => [`${scheme}_${k}`, v]);
|
|
222
|
+
});
|
|
223
|
+
const lightButtonTheme = altLightThemes[0];
|
|
224
|
+
const darkButtonTheme = altDarkThemes[0];
|
|
225
|
+
return [
|
|
226
|
+
...altLightThemes,
|
|
227
|
+
[`${lightButtonTheme[0]}_Button`, altLightThemes[2][1]],
|
|
228
|
+
...altDarkThemes,
|
|
229
|
+
[`${darkButtonTheme[0]}_Button`, altDarkThemes[2][1]]
|
|
230
|
+
];
|
|
231
|
+
});
|
|
232
|
+
const transparent = {
|
|
233
|
+
background: "transparent",
|
|
234
|
+
backgroundSoft: "transparent",
|
|
235
|
+
backgroundHover: "transparent",
|
|
236
|
+
backgroundPress: "transparent",
|
|
237
|
+
backgroundFocus: "transparent",
|
|
238
|
+
backgroundTransparent: "transparent",
|
|
239
|
+
shadowColor: "transparent",
|
|
240
|
+
shadowColorHover: "transparent",
|
|
241
|
+
shadowColorPress: "transparent",
|
|
242
|
+
shadowColorFocus: "transparent"
|
|
243
|
+
};
|
|
244
|
+
const dark_outline = __spreadValues(__spreadProps(__spreadValues({}, baseThemes.dark), {
|
|
245
|
+
borderColor: "#fff"
|
|
246
|
+
}), transparent);
|
|
247
|
+
const light_outline = __spreadValues(__spreadProps(__spreadValues({}, baseThemes.light), {
|
|
248
|
+
borderColor: "#000"
|
|
249
|
+
}), transparent);
|
|
250
|
+
const colorThemes = Object.fromEntries(colorThemeEntries);
|
|
251
|
+
const allThemes = __spreadProps(__spreadValues(__spreadValues({}, baseThemes), colorThemes), {
|
|
252
|
+
dark_outline,
|
|
253
|
+
light_outline
|
|
254
|
+
});
|
|
255
|
+
const themes = allThemes;
|
|
256
|
+
//# sourceMappingURL=themes.js.map
|