@xaui/native 0.9.1-alpha.3 → 0.9.1-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3FV4COTM.js +68 -0
- package/dist/chunk-423RQBOX.js +21 -0
- package/dist/chunk-42FMGB5M.js +661 -0
- package/dist/chunk-4GTAZM2C.js +174 -0
- package/dist/chunk-4XPLPQLM.cjs +147 -0
- package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
- package/dist/chunk-5GO7MAVY.cjs +74 -0
- package/dist/chunk-5PTBRJM7.cjs +346 -0
- package/dist/chunk-5RQ7AZPN.cjs +455 -0
- package/dist/chunk-5Z4P6WHR.cjs +525 -0
- package/dist/chunk-7DPL3ZDS.cjs +21 -0
- package/dist/chunk-7EIHHOHP.cjs +42 -0
- package/dist/chunk-7SEZGVTY.js +62 -0
- package/dist/chunk-7XKQJQF2.cjs +70 -0
- package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
- package/dist/chunk-A5OCK3C2.js +525 -0
- package/dist/chunk-AETWQQWU.cjs +92 -0
- package/dist/chunk-ANNUYP55.cjs +431 -0
- package/dist/chunk-BA2DBSAN.js +102 -0
- package/dist/chunk-BFMTUMTU.js +669 -0
- package/dist/chunk-BVJQ3UPZ.js +62 -0
- package/dist/chunk-DFME724B.js +147 -0
- package/dist/chunk-E2CWBQTV.js +119 -0
- package/dist/chunk-EGLLDKN6.js +9 -0
- package/dist/chunk-EJQCQPET.cjs +9 -0
- package/dist/chunk-F6CQ6CBI.cjs +112 -0
- package/dist/chunk-F6W3JQ7K.js +42 -0
- package/dist/chunk-FNEUOBCV.cjs +174 -0
- package/dist/chunk-G7K652GC.js +145 -0
- package/dist/chunk-GGW42MY4.js +20 -0
- package/dist/chunk-GLGU2WFL.cjs +190 -0
- package/dist/chunk-GPVNCJ3Z.cjs +696 -0
- package/dist/chunk-GVQOD3VW.js +74 -0
- package/dist/chunk-IHOCANCQ.js +293 -0
- package/dist/chunk-JDFV4W6N.cjs +700 -0
- package/dist/chunk-KOC3KQIT.js +124 -0
- package/dist/chunk-KPWZLUES.cjs +124 -0
- package/dist/chunk-L7JN6OBQ.cjs +314 -0
- package/dist/chunk-MC7SY2QH.cjs +20 -0
- package/dist/chunk-MDVSCWJI.js +314 -0
- package/dist/chunk-N527BTY4.cjs +366 -0
- package/dist/chunk-NYRXUGVL.js +104 -0
- package/dist/{chunk-AW63PTQ4.cjs → chunk-OHEHPQLC.cjs} +72 -72
- package/dist/chunk-Q3WFY5N3.js +366 -0
- package/dist/chunk-QGN2BBJO.cjs +104 -0
- package/dist/chunk-RDTKAAHX.js +346 -0
- package/dist/chunk-TGZZ3RZU.cjs +86 -0
- package/dist/{chunk-2KXQATVL.js → chunk-TZG3DERP.js} +46 -46
- package/dist/chunk-URSKA2VR.js +190 -0
- package/dist/chunk-V4WDMM6Z.js +86 -0
- package/dist/chunk-VJEER76X.js +455 -0
- package/dist/chunk-VZBWYWEI.cjs +736 -0
- package/dist/chunk-WR7YLDVV.cjs +68 -0
- package/dist/chunk-X4HQ4H2V.js +701 -0
- package/dist/chunk-XFSW3ZNI.cjs +145 -0
- package/dist/chunk-XQFAUDR2.cjs +62 -0
- package/dist/chunk-ZH5XVNHG.js +92 -0
- package/dist/chunk-ZH6BHLQR.js +431 -0
- package/dist/chunk-ZP2E2H2G.cjs +119 -0
- package/dist/chunk-ZVWXM3UK.cjs +293 -0
- package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
- package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
- package/dist/components/alert/index.cjs +20 -0
- package/dist/components/alert/index.d.cts +169 -0
- package/dist/components/alert/index.d.ts +169 -0
- package/dist/components/alert/index.js +20 -0
- package/dist/components/button/index.cjs +21 -0
- package/dist/components/button/index.d.cts +613 -0
- package/dist/components/button/index.d.ts +613 -0
- package/dist/components/button/index.js +21 -0
- package/dist/components/card/index.cjs +22 -0
- package/dist/components/card/index.d.cts +620 -0
- package/dist/components/card/index.d.ts +620 -0
- package/dist/components/card/index.js +22 -0
- package/dist/components/checkbox/index.cjs +26 -0
- package/dist/components/checkbox/index.d.cts +1136 -0
- package/dist/components/checkbox/index.d.ts +1136 -0
- package/dist/components/checkbox/index.js +26 -0
- package/dist/components/chip/index.cjs +20 -0
- package/dist/components/chip/index.d.cts +608 -0
- package/dist/components/chip/index.d.ts +608 -0
- package/dist/components/chip/index.js +20 -0
- package/dist/components/divider/index.cjs +13 -0
- package/dist/components/divider/index.d.cts +117 -0
- package/dist/components/divider/index.d.ts +117 -0
- package/dist/components/divider/index.js +13 -0
- package/dist/components/input/index.cjs +25 -0
- package/dist/components/input/index.d.cts +205 -0
- package/dist/components/input/index.d.ts +205 -0
- package/dist/components/input/index.js +25 -0
- package/dist/components/input-group/index.cjs +27 -0
- package/dist/components/input-group/index.d.cts +270 -0
- package/dist/components/input-group/index.d.ts +270 -0
- package/dist/components/input-group/index.js +27 -0
- package/dist/components/input-otp/index.cjs +29 -0
- package/dist/components/input-otp/index.d.cts +325 -0
- package/dist/components/input-otp/index.d.ts +325 -0
- package/dist/components/input-otp/index.js +29 -0
- package/dist/components/radio/index.cjs +26 -0
- package/dist/components/radio/index.d.cts +1102 -0
- package/dist/components/radio/index.d.ts +1102 -0
- package/dist/components/radio/index.js +26 -0
- package/dist/components/spinner/index.cjs +16 -0
- package/dist/components/spinner/index.d.cts +104 -0
- package/dist/components/spinner/index.d.ts +104 -0
- package/dist/components/spinner/index.js +16 -0
- package/dist/components/switch/index.cjs +27 -0
- package/dist/components/switch/index.d.cts +1154 -0
- package/dist/components/switch/index.d.ts +1154 -0
- package/dist/components/switch/index.js +27 -0
- package/dist/components/text-area/index.cjs +14 -0
- package/dist/components/text-area/index.d.cts +73 -0
- package/dist/components/text-area/index.d.ts +73 -0
- package/dist/components/text-area/index.js +14 -0
- package/dist/components/typography/index.cjs +15 -0
- package/dist/components/typography/index.d.cts +116 -0
- package/dist/components/typography/index.d.ts +116 -0
- package/dist/components/typography/index.js +15 -0
- package/dist/components/view/index.cjs +17 -0
- package/dist/components/view/index.d.cts +152 -0
- package/dist/components/view/index.d.ts +152 -0
- package/dist/components/view/index.js +17 -0
- package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
- package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
- package/dist/icon.type-Kml72iSz.d.ts +73 -0
- package/dist/icon.type-d_i9ma-i.d.cts +73 -0
- package/dist/index.cjs +252 -4
- package/dist/index.d.cts +110 -4
- package/dist/index.d.ts +110 -4
- package/dist/index.js +271 -23
- package/dist/input.type-BUMDlzL9.d.cts +167 -0
- package/dist/input.type-D2qgi03E.d.ts +167 -0
- package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
- package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
- package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
- package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
- package/dist/system/index.cjs +60 -3
- package/dist/system/index.d.cts +347 -181
- package/dist/system/index.d.ts +347 -181
- package/dist/system/index.js +71 -14
- package/dist/theme/index.cjs +4 -3
- package/dist/theme/index.d.cts +34 -23
- package/dist/theme/index.d.ts +34 -23
- package/dist/theme/index.js +3 -2
- package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
- package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
- package/package.json +184 -18
- package/dist/chunk-QAMNNTGM.js +0 -637
- package/dist/chunk-V63JO65F.cjs +0 -637
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createRecipe
|
|
3
|
+
} from "./chunk-4GTAZM2C.js";
|
|
4
|
+
import {
|
|
5
|
+
useXAUITheme
|
|
6
|
+
} from "./chunk-A3EGFI6T.js";
|
|
7
|
+
import {
|
|
8
|
+
Slot
|
|
9
|
+
} from "./chunk-E2CWBQTV.js";
|
|
10
|
+
import {
|
|
11
|
+
useStyleProps
|
|
12
|
+
} from "./chunk-URSKA2VR.js";
|
|
13
|
+
|
|
14
|
+
// src/components/typography/typography.tsx
|
|
15
|
+
import { forwardRef } from "react";
|
|
16
|
+
import { Text } from "react-native";
|
|
17
|
+
|
|
18
|
+
// src/components/typography/typography.recipe.ts
|
|
19
|
+
var SLOTS = ["root"];
|
|
20
|
+
var VARIANT_TOKENS = {
|
|
21
|
+
h1: { fg: "foreground" },
|
|
22
|
+
h2: { fg: "foreground" },
|
|
23
|
+
h3: { fg: "foreground" },
|
|
24
|
+
h4: { fg: "foreground" },
|
|
25
|
+
h5: { fg: "foreground" },
|
|
26
|
+
h6: { fg: "foreground" },
|
|
27
|
+
body: { fg: "foreground" },
|
|
28
|
+
"body-sm": { fg: "foreground" },
|
|
29
|
+
"body-xs": { fg: "foreground" },
|
|
30
|
+
code: { fg: "foreground" }
|
|
31
|
+
};
|
|
32
|
+
var ROLES = {
|
|
33
|
+
h1: { step: "4xl", weight: "bold", family: "heading", letterSpacing: -0.5 },
|
|
34
|
+
h2: { step: "3xl", weight: "bold", family: "heading", letterSpacing: -0.4 },
|
|
35
|
+
h3: { step: "2xl", weight: "bold", family: "heading", letterSpacing: -0.3 },
|
|
36
|
+
h4: { step: "xl", weight: "semibold", family: "heading" },
|
|
37
|
+
h5: { step: "lg", weight: "semibold", family: "heading" },
|
|
38
|
+
h6: { step: "md", weight: "semibold", family: "heading" },
|
|
39
|
+
body: { step: "md", weight: "regular", family: "body" },
|
|
40
|
+
"body-sm": { step: "sm", weight: "regular", family: "body" },
|
|
41
|
+
"body-xs": { step: "xs", weight: "regular", family: "body" },
|
|
42
|
+
code: { step: "sm", weight: "regular", family: "mono", chip: true }
|
|
43
|
+
};
|
|
44
|
+
function metricsOf({ step, weight, family, letterSpacing, chip }) {
|
|
45
|
+
return (theme) => ({
|
|
46
|
+
root: {
|
|
47
|
+
fontSize: theme.fontSizes[step],
|
|
48
|
+
lineHeight: theme.lineHeights[step],
|
|
49
|
+
fontWeight: theme.fontWeights[weight],
|
|
50
|
+
fontFamily: theme.fontFamilies[family],
|
|
51
|
+
...letterSpacing === void 0 ? {} : { letterSpacing },
|
|
52
|
+
...chip === void 0 ? {} : {
|
|
53
|
+
alignSelf: "flex-start",
|
|
54
|
+
backgroundColor: theme.colors.default,
|
|
55
|
+
paddingHorizontal: theme.spacing(1.5),
|
|
56
|
+
paddingVertical: theme.spacing(0.5),
|
|
57
|
+
borderRadius: theme.radius.md
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
var ROLE_AXIS = Object.fromEntries(
|
|
63
|
+
Object.entries(ROLES).map(([name, spec]) => [name, metricsOf(spec)])
|
|
64
|
+
);
|
|
65
|
+
var typographyRecipe = createRecipe({
|
|
66
|
+
slots: SLOTS,
|
|
67
|
+
variantTokens: VARIANT_TOKENS,
|
|
68
|
+
// Ink only. The chip's fill is a token, not a role, so it belongs to the metrics above —
|
|
69
|
+
// where it also stays inside the cache key instead of being recomputed with the tint.
|
|
70
|
+
paint: (_theme, colors) => ({ root: { color: colors.fg } }),
|
|
71
|
+
variants: { variant: ROLE_AXIS },
|
|
72
|
+
defaultVariants: { variant: "body" }
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// src/components/typography/typography.tsx
|
|
76
|
+
import { jsx } from "react/jsx-runtime";
|
|
77
|
+
var Typography = forwardRef(function Typography2({ children, variant, color, asChild = false, style, ...props }, ref) {
|
|
78
|
+
const theme = useXAUITheme();
|
|
79
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
80
|
+
const selection = { variant };
|
|
81
|
+
const styles = typographyRecipe.resolve({ theme, selection });
|
|
82
|
+
const tint = color ? typographyRecipe.tint({ theme, color, selection }) : void 0;
|
|
83
|
+
const rootStyle = [styles.root, tint?.root, styleProps, style];
|
|
84
|
+
const Root = asChild ? Slot : Text;
|
|
85
|
+
return /* @__PURE__ */ jsx(Root, { ref, style: rootStyle, ...rest, children });
|
|
86
|
+
});
|
|
87
|
+
Typography.displayName = "XAUI.Typography";
|
|
88
|
+
|
|
89
|
+
// src/components/typography/text-span.tsx
|
|
90
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
91
|
+
import { Text as Text2 } from "react-native";
|
|
92
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
93
|
+
var TextSpan = forwardRef2(function TextSpan2({ children, asChild = false, style, ...props }, ref) {
|
|
94
|
+
const [styleProps, rest] = useStyleProps(props);
|
|
95
|
+
const Root = asChild ? Slot : Text2;
|
|
96
|
+
return /* @__PURE__ */ jsx2(Root, { ref, style: [styleProps, style], ...rest, children });
|
|
97
|
+
});
|
|
98
|
+
TextSpan.displayName = "XAUI.TextSpan";
|
|
99
|
+
|
|
100
|
+
export {
|
|
101
|
+
typographyRecipe,
|
|
102
|
+
Typography,
|
|
103
|
+
TextSpan
|
|
104
|
+
};
|
|
@@ -2,67 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk57SJ4LJFcjs = require('./chunk-57SJ4LJF.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkMC7SY2QHcjs = require('./chunk-MC7SY2QH.cjs');
|
|
6
9
|
|
|
7
10
|
// src/provider/xaui-provider.tsx
|
|
8
11
|
var _reactnative = require('react-native');
|
|
9
12
|
|
|
10
|
-
// src/utils/stable-hash.ts
|
|
11
|
-
function canonical(value) {
|
|
12
|
-
if (value === null || typeof value !== "object") return _nullishCoalesce(JSON.stringify(value), () => ( "null"));
|
|
13
|
-
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
14
|
-
const entries = Object.entries(value).filter(([, v]) => typeof v !== "function").sort(([a], [b]) => a < b ? -1 : 1).map(([k, v]) => `${JSON.stringify(k)}:${canonical(v)}`);
|
|
15
|
-
return `{${entries.join(",")}}`;
|
|
16
|
-
}
|
|
17
|
-
function stableHash(value) {
|
|
18
|
-
const input = canonical(value);
|
|
19
|
-
let hash = 2166136261;
|
|
20
|
-
for (let i = 0; i < input.length; i++) {
|
|
21
|
-
hash ^= input.charCodeAt(i);
|
|
22
|
-
hash = Math.imul(hash, 16777619) >>> 0;
|
|
23
|
-
}
|
|
24
|
-
return hash.toString(36);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
13
|
// src/theme/derive-colors.ts
|
|
28
14
|
function deriveColors(s) {
|
|
29
15
|
return {
|
|
30
|
-
accentPressed:
|
|
31
|
-
successPressed:
|
|
32
|
-
warningPressed:
|
|
33
|
-
dangerPressed:
|
|
34
|
-
defaultPressed:
|
|
35
|
-
surfacePressed:
|
|
36
|
-
defaultSoft:
|
|
16
|
+
accentPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.accent, s.foreground, 0.1),
|
|
17
|
+
successPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.success, s.foreground, 0.1),
|
|
18
|
+
warningPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.warning, s.foreground, 0.1),
|
|
19
|
+
dangerPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.danger, s.foreground, 0.1),
|
|
20
|
+
defaultPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.default, s.defaultForeground, 0.04),
|
|
21
|
+
surfacePressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.08),
|
|
22
|
+
defaultSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.default, 0.5),
|
|
37
23
|
defaultSoftForeground: s.defaultForeground,
|
|
38
|
-
defaultSoftPressed:
|
|
39
|
-
accentSoft:
|
|
40
|
-
accentSoftForeground:
|
|
41
|
-
accentSoftPressed:
|
|
42
|
-
successSoft:
|
|
43
|
-
successSoftForeground:
|
|
44
|
-
successSoftPressed:
|
|
45
|
-
warningSoft:
|
|
46
|
-
warningSoftForeground:
|
|
47
|
-
warningSoftPressed:
|
|
48
|
-
dangerSoft:
|
|
49
|
-
dangerSoftForeground:
|
|
50
|
-
dangerSoftPressed:
|
|
51
|
-
backgroundSecondary:
|
|
52
|
-
backgroundTertiary:
|
|
24
|
+
defaultSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.default, 0.6),
|
|
25
|
+
accentSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.accent, 0.15),
|
|
26
|
+
accentSoftForeground: _chunk57SJ4LJFcjs.mix.call(void 0, s.accent, s.foreground, 0.2),
|
|
27
|
+
accentSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.accent, 0.2),
|
|
28
|
+
successSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.success, 0.15),
|
|
29
|
+
successSoftForeground: _chunk57SJ4LJFcjs.mix.call(void 0, s.success, s.foreground, 0.3),
|
|
30
|
+
successSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.success, 0.2),
|
|
31
|
+
warningSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.warning, 0.15),
|
|
32
|
+
warningSoftForeground: _chunk57SJ4LJFcjs.mix.call(void 0, s.warning, s.foreground, 0.35),
|
|
33
|
+
warningSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.warning, 0.2),
|
|
34
|
+
dangerSoft: _chunk57SJ4LJFcjs.alpha.call(void 0, s.danger, 0.15),
|
|
35
|
+
dangerSoftForeground: _chunk57SJ4LJFcjs.mix.call(void 0, s.danger, s.foreground, 0.2),
|
|
36
|
+
dangerSoftPressed: _chunk57SJ4LJFcjs.alpha.call(void 0, s.danger, 0.2),
|
|
37
|
+
backgroundSecondary: _chunk57SJ4LJFcjs.mix.call(void 0, s.background, s.foreground, 0.04),
|
|
38
|
+
backgroundTertiary: _chunk57SJ4LJFcjs.mix.call(void 0, s.background, s.foreground, 0.08),
|
|
53
39
|
backgroundInverse: s.foreground,
|
|
54
|
-
borderSecondary:
|
|
55
|
-
borderTertiary:
|
|
56
|
-
separatorSecondary:
|
|
57
|
-
separatorTertiary:
|
|
58
|
-
fieldPressed:
|
|
40
|
+
borderSecondary: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.22),
|
|
41
|
+
borderTertiary: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.34),
|
|
42
|
+
separatorSecondary: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.15),
|
|
43
|
+
separatorTertiary: _chunk57SJ4LJFcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.19),
|
|
44
|
+
fieldPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.fieldBackground, s.fieldForeground, 0.1),
|
|
59
45
|
fieldFocus: s.fieldBackground,
|
|
60
|
-
fieldBorderPressed:
|
|
61
|
-
fieldBorderFocus:
|
|
46
|
+
fieldBorderPressed: _chunk57SJ4LJFcjs.mix.call(void 0, s.fieldBorder, s.fieldForeground, 0.12),
|
|
47
|
+
fieldBorderFocus: _chunk57SJ4LJFcjs.mix.call(void 0, s.fieldBorder, s.fieldForeground, 0.26)
|
|
62
48
|
};
|
|
63
49
|
}
|
|
64
50
|
|
|
65
51
|
// src/theme/scales.ts
|
|
52
|
+
|
|
66
53
|
var SPACING_UNIT = 4;
|
|
67
54
|
var RADIUS_BASE = 12;
|
|
68
55
|
function buildRadius(base) {
|
|
@@ -75,7 +62,16 @@ function buildRadius(base) {
|
|
|
75
62
|
"2xl": base * 2,
|
|
76
63
|
"3xl": base * 3,
|
|
77
64
|
"4xl": base * 4,
|
|
78
|
-
|
|
65
|
+
/**
|
|
66
|
+
* HeroUI's value, reached from the other side of the scale: their `--radius-field` is
|
|
67
|
+
* an alias of their `--radius-xl`, and their base is 8 where ours is 12 — so their
|
|
68
|
+
* field corner is 12 points and, at our default base, so is this.
|
|
69
|
+
*
|
|
70
|
+
* It coincides with `lg` today and is still its own key, because that is what lets a
|
|
71
|
+
* theme round its fields without rounding its cards. It was `base * 1.75`, which put a
|
|
72
|
+
* 48-tall field at 87% of its geometric maximum — a gélule rather than a rounded box.
|
|
73
|
+
*/
|
|
74
|
+
field: base,
|
|
79
75
|
full: 9999
|
|
80
76
|
};
|
|
81
77
|
}
|
|
@@ -114,7 +110,10 @@ var fontWeights = {
|
|
|
114
110
|
var fontFamilies = {
|
|
115
111
|
body: "System",
|
|
116
112
|
heading: "System",
|
|
117
|
-
|
|
113
|
+
// `'monospace'` is an Android family name, not a generic one: iOS does not resolve it and
|
|
114
|
+
// silently falls back to the system face, so code set with it is not monospaced there.
|
|
115
|
+
// Menlo is the face iOS ships, and it is what HeroUI Native selects for the same reason.
|
|
116
|
+
mono: _reactnative.Platform.OS === "ios" ? "Menlo" : "monospace"
|
|
118
117
|
};
|
|
119
118
|
var borderWidth = { default: 1, field: 1 };
|
|
120
119
|
var opacity = { disabled: 0.5 };
|
|
@@ -171,7 +170,7 @@ var tokens = {
|
|
|
171
170
|
foreground: "#18181b",
|
|
172
171
|
surface: "#ffffff",
|
|
173
172
|
surfaceForeground: "#18181b",
|
|
174
|
-
surfaceSecondary: "#
|
|
173
|
+
surfaceSecondary: "#ececee",
|
|
175
174
|
surfaceSecondaryForeground: "#18181b",
|
|
176
175
|
surfaceTertiary: "#e4e4e7",
|
|
177
176
|
surfaceTertiaryForeground: "#18181b",
|
|
@@ -179,7 +178,7 @@ var tokens = {
|
|
|
179
178
|
overlayForeground: "#18181b",
|
|
180
179
|
backdrop: "rgba(0, 0, 0, 0.2)",
|
|
181
180
|
muted: "#71717a",
|
|
182
|
-
default: "#
|
|
181
|
+
default: "#e4e4e7",
|
|
183
182
|
defaultForeground: "#18181b",
|
|
184
183
|
accent: "#9333ea",
|
|
185
184
|
accentForeground: "#faf5ff",
|
|
@@ -189,7 +188,7 @@ var tokens = {
|
|
|
189
188
|
fieldBorder: "#e4e4e7",
|
|
190
189
|
success: "#15803d",
|
|
191
190
|
successForeground: "#fafafa",
|
|
192
|
-
warning: "#
|
|
191
|
+
warning: "#c2410c",
|
|
193
192
|
warningForeground: "#fafafa",
|
|
194
193
|
danger: "#dc2626",
|
|
195
194
|
dangerForeground: "#fafafa",
|
|
@@ -199,24 +198,24 @@ var tokens = {
|
|
|
199
198
|
separator: "#d4d4d8",
|
|
200
199
|
focus: "#9333ea",
|
|
201
200
|
link: "#18181b",
|
|
202
|
-
accentPressed: "#
|
|
203
|
-
successPressed: "#
|
|
204
|
-
warningPressed: "#
|
|
205
|
-
dangerPressed: "#
|
|
206
|
-
defaultPressed: "#
|
|
201
|
+
accentPressed: "#8533d3",
|
|
202
|
+
successPressed: "#1b753a",
|
|
203
|
+
warningPressed: "#af3e15",
|
|
204
|
+
dangerPressed: "#c72927",
|
|
205
|
+
defaultPressed: "#dbdbde",
|
|
207
206
|
surfacePressed: "#eaeaea",
|
|
208
|
-
defaultSoft: "rgba(
|
|
207
|
+
defaultSoft: "rgba(228, 228, 231, 0.5)",
|
|
209
208
|
defaultSoftForeground: "#18181b",
|
|
210
|
-
defaultSoftPressed: "rgba(
|
|
209
|
+
defaultSoftPressed: "rgba(228, 228, 231, 0.6)",
|
|
211
210
|
accentSoft: "rgba(147, 51, 234, 0.15)",
|
|
212
211
|
accentSoftForeground: "#7833bc",
|
|
213
212
|
accentSoftPressed: "rgba(147, 51, 234, 0.2)",
|
|
214
213
|
successSoft: "rgba(21, 128, 61, 0.15)",
|
|
215
214
|
successSoftForeground: "#205f34",
|
|
216
215
|
successSoftPressed: "rgba(21, 128, 61, 0.2)",
|
|
217
|
-
warningSoft: "rgba(
|
|
218
|
-
warningSoftForeground: "#
|
|
219
|
-
warningSoftPressed: "rgba(
|
|
216
|
+
warningSoft: "rgba(194, 65, 12, 0.15)",
|
|
217
|
+
warningSoftForeground: "#82361e",
|
|
218
|
+
warningSoftPressed: "rgba(194, 65, 12, 0.2)",
|
|
220
219
|
dangerSoft: "rgba(220, 38, 38, 0.15)",
|
|
221
220
|
dangerSoftForeground: "#b22b28",
|
|
222
221
|
dangerSoftPressed: "rgba(220, 38, 38, 0.2)",
|
|
@@ -259,7 +258,7 @@ var tokens = {
|
|
|
259
258
|
fieldBorder: "#3f3f46",
|
|
260
259
|
success: "#4ade80",
|
|
261
260
|
successForeground: "#18181b",
|
|
262
|
-
warning: "#
|
|
261
|
+
warning: "#fb923c",
|
|
263
262
|
warningForeground: "#18181b",
|
|
264
263
|
danger: "#f87171",
|
|
265
264
|
dangerForeground: "#18181b",
|
|
@@ -269,10 +268,10 @@ var tokens = {
|
|
|
269
268
|
separator: "#52525b",
|
|
270
269
|
focus: "#c084fc",
|
|
271
270
|
link: "#fafafa",
|
|
272
|
-
accentPressed: "#
|
|
273
|
-
successPressed: "#
|
|
274
|
-
warningPressed: "#
|
|
275
|
-
dangerPressed: "#
|
|
271
|
+
accentPressed: "#c691fd",
|
|
272
|
+
successPressed: "#64e18d",
|
|
273
|
+
warningPressed: "#fc9d55",
|
|
274
|
+
dangerPressed: "#fa807e",
|
|
276
275
|
defaultPressed: "#2e2e31",
|
|
277
276
|
surfacePressed: "#27272a",
|
|
278
277
|
defaultSoft: "rgba(39, 39, 42, 0.5)",
|
|
@@ -284,9 +283,9 @@ var tokens = {
|
|
|
284
283
|
successSoft: "rgba(74, 222, 128, 0.15)",
|
|
285
284
|
successSoftForeground: "#8de8a6",
|
|
286
285
|
successSoftPressed: "rgba(74, 222, 128, 0.2)",
|
|
287
|
-
warningSoft: "rgba(251,
|
|
288
|
-
warningSoftForeground: "#
|
|
289
|
-
warningSoftPressed: "rgba(251,
|
|
286
|
+
warningSoft: "rgba(251, 146, 60, 0.15)",
|
|
287
|
+
warningSoftForeground: "#feb887",
|
|
288
|
+
warningSoftPressed: "rgba(251, 146, 60, 0.2)",
|
|
290
289
|
dangerSoft: "rgba(248, 113, 113, 0.15)",
|
|
291
290
|
dangerSoftForeground: "#fc8f8c",
|
|
292
291
|
dangerSoftPressed: "rgba(248, 113, 113, 0.2)",
|
|
@@ -377,7 +376,7 @@ function resolveMode(mode, config, id) {
|
|
|
377
376
|
};
|
|
378
377
|
}
|
|
379
378
|
function createTheme(config = {}) {
|
|
380
|
-
const id = stableHash(config);
|
|
379
|
+
const id = _chunkMC7SY2QHcjs.stableHash.call(void 0, config);
|
|
381
380
|
return {
|
|
382
381
|
id,
|
|
383
382
|
light: resolveMode("light", config, id),
|
|
@@ -387,6 +386,7 @@ function createTheme(config = {}) {
|
|
|
387
386
|
var defaultTheme = createTheme();
|
|
388
387
|
|
|
389
388
|
// src/provider/xaui-provider.tsx
|
|
389
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
390
390
|
function XAUIProvider({
|
|
391
391
|
children,
|
|
392
392
|
theme = defaultTheme,
|
|
@@ -394,7 +394,7 @@ function XAUIProvider({
|
|
|
394
394
|
}) {
|
|
395
395
|
const scheme = _reactnative.useColorScheme.call(void 0, );
|
|
396
396
|
const resolved = colorMode === "system" ? scheme === "dark" ? "dark" : "light" : colorMode;
|
|
397
|
-
return /* @__PURE__ */
|
|
397
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk57SJ4LJFcjs.ThemeContext.Provider, { value: theme[resolved], children });
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
// src/theme/palette.ts
|