radix-native 0.0.1
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 +51 -0
- package/dist/index.cjs +4323 -0
- package/dist/index.d.cts +861 -0
- package/dist/index.d.mts +861 -0
- package/dist/index.d.ts +861 -0
- package/dist/index.mjs +4285 -0
- package/package.json +51 -0
- package/src/components/actions/Button.tsx +337 -0
- package/src/components/actions/Checkbox.tsx +216 -0
- package/src/components/actions/CheckboxCards.tsx +257 -0
- package/src/components/actions/CheckboxGroup.tsx +249 -0
- package/src/components/actions/index.ts +4 -0
- package/src/components/layout/Box.tsx +108 -0
- package/src/components/layout/Flex.tsx +149 -0
- package/src/components/layout/Grid.tsx +224 -0
- package/src/components/layout/index.ts +9 -0
- package/src/components/playground/ThemeControls.tsx +456 -0
- package/src/components/playground/index.ts +1 -0
- package/src/components/typography/Blockquote.tsx +137 -0
- package/src/components/typography/Code.tsx +164 -0
- package/src/components/typography/Em.tsx +68 -0
- package/src/components/typography/Heading.tsx +136 -0
- package/src/components/typography/Kbd.tsx +162 -0
- package/src/components/typography/Link.tsx +173 -0
- package/src/components/typography/Quote.tsx +71 -0
- package/src/components/typography/Strong.tsx +70 -0
- package/src/components/typography/Text.tsx +140 -0
- package/src/components/typography/index.ts +9 -0
- package/src/hooks/useResolveColor.ts +24 -0
- package/src/hooks/useThemeContext.ts +11 -0
- package/src/index.ts +63 -0
- package/src/theme/Theme.tsx +12 -0
- package/src/theme/ThemeContext.ts +4 -0
- package/src/theme/ThemeImpl.tsx +54 -0
- package/src/theme/ThemeRoot.tsx +65 -0
- package/src/theme/createTheme.tsx +17 -0
- package/src/theme/resolveGrayColor.ts +38 -0
- package/src/theme/theme.types.ts +95 -0
- package/src/tokens/colors/amber.ts +28 -0
- package/src/tokens/colors/blue.ts +28 -0
- package/src/tokens/colors/bronze.ts +28 -0
- package/src/tokens/colors/brown.ts +28 -0
- package/src/tokens/colors/crimson.ts +28 -0
- package/src/tokens/colors/cyan.ts +28 -0
- package/src/tokens/colors/gold.ts +28 -0
- package/src/tokens/colors/grass.ts +28 -0
- package/src/tokens/colors/gray.ts +28 -0
- package/src/tokens/colors/green.ts +28 -0
- package/src/tokens/colors/index.ts +36 -0
- package/src/tokens/colors/indigo.ts +28 -0
- package/src/tokens/colors/iris.ts +28 -0
- package/src/tokens/colors/jade.ts +28 -0
- package/src/tokens/colors/lime.ts +28 -0
- package/src/tokens/colors/mauve.ts +28 -0
- package/src/tokens/colors/mint.ts +28 -0
- package/src/tokens/colors/olive.ts +28 -0
- package/src/tokens/colors/orange.ts +28 -0
- package/src/tokens/colors/pink.ts +28 -0
- package/src/tokens/colors/plum.ts +28 -0
- package/src/tokens/colors/purple.ts +28 -0
- package/src/tokens/colors/red.ts +28 -0
- package/src/tokens/colors/ruby.ts +28 -0
- package/src/tokens/colors/sage.ts +28 -0
- package/src/tokens/colors/sand.ts +28 -0
- package/src/tokens/colors/sky.ts +28 -0
- package/src/tokens/colors/slate.ts +28 -0
- package/src/tokens/colors/teal.ts +28 -0
- package/src/tokens/colors/tomato.ts +28 -0
- package/src/tokens/colors/types.ts +69 -0
- package/src/tokens/colors/violet.ts +28 -0
- package/src/tokens/colors/yellow.ts +28 -0
- package/src/tokens/index.ts +5 -0
- package/src/tokens/radius.ts +56 -0
- package/src/tokens/scaling.ts +10 -0
- package/src/tokens/spacing.ts +21 -0
- package/src/tokens/typography.ts +60 -0
- package/src/utils/applyScaling.ts +6 -0
- package/src/utils/classicEffect.ts +46 -0
- package/src/utils/resolveColor.ts +69 -0
- package/src/utils/resolveSpace.ts +13 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,4285 @@
|
|
|
1
|
+
import React, { useState, useCallback, useMemo, useContext, createContext } from 'react';
|
|
2
|
+
import { useColorScheme, Platform, View, Text as Text$1, Linking, Pressable, ActivityIndicator, Animated, useWindowDimensions, ScrollView, StyleSheet } from 'react-native';
|
|
3
|
+
|
|
4
|
+
const ThemeContext = React.createContext(void 0);
|
|
5
|
+
|
|
6
|
+
function resolveGrayColor(accentColor) {
|
|
7
|
+
switch (accentColor) {
|
|
8
|
+
case "tomato":
|
|
9
|
+
case "red":
|
|
10
|
+
case "ruby":
|
|
11
|
+
case "crimson":
|
|
12
|
+
case "pink":
|
|
13
|
+
case "plum":
|
|
14
|
+
case "purple":
|
|
15
|
+
case "violet":
|
|
16
|
+
return "mauve";
|
|
17
|
+
case "iris":
|
|
18
|
+
case "indigo":
|
|
19
|
+
case "blue":
|
|
20
|
+
case "sky":
|
|
21
|
+
case "cyan":
|
|
22
|
+
return "slate";
|
|
23
|
+
case "teal":
|
|
24
|
+
case "jade":
|
|
25
|
+
case "mint":
|
|
26
|
+
case "green":
|
|
27
|
+
return "sage";
|
|
28
|
+
case "grass":
|
|
29
|
+
case "lime":
|
|
30
|
+
return "olive";
|
|
31
|
+
case "gray":
|
|
32
|
+
return "gray";
|
|
33
|
+
case "yellow":
|
|
34
|
+
case "amber":
|
|
35
|
+
case "orange":
|
|
36
|
+
case "brown":
|
|
37
|
+
case "gold":
|
|
38
|
+
case "bronze":
|
|
39
|
+
return "sand";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function ThemeRoot({
|
|
44
|
+
appearance: appearanceProp = "inherit",
|
|
45
|
+
accentColor: accentColorProp = "indigo",
|
|
46
|
+
grayColor: grayColorProp = "auto",
|
|
47
|
+
radius: radiusProp = "medium",
|
|
48
|
+
scaling: scalingProp = "100%",
|
|
49
|
+
fonts: fontsProp = {},
|
|
50
|
+
colorOverrides: colorOverridesProp = {},
|
|
51
|
+
children
|
|
52
|
+
}) {
|
|
53
|
+
const systemColorScheme = useColorScheme();
|
|
54
|
+
const [appearance, setAppearance] = React.useState(
|
|
55
|
+
() => appearanceProp === "inherit" ? systemColorScheme === "dark" ? "dark" : "light" : appearanceProp
|
|
56
|
+
);
|
|
57
|
+
const [accentColor, setAccentColor] = React.useState(accentColorProp);
|
|
58
|
+
const [grayColor, setGrayColor] = React.useState(grayColorProp);
|
|
59
|
+
const [radius, setRadius] = React.useState(radiusProp);
|
|
60
|
+
const [scaling, setScaling] = React.useState(scalingProp);
|
|
61
|
+
React.useEffect(() => {
|
|
62
|
+
setAppearance(
|
|
63
|
+
appearanceProp === "inherit" ? systemColorScheme === "dark" ? "dark" : "light" : appearanceProp
|
|
64
|
+
);
|
|
65
|
+
}, [appearanceProp, systemColorScheme]);
|
|
66
|
+
React.useEffect(() => {
|
|
67
|
+
setAccentColor(accentColorProp);
|
|
68
|
+
}, [accentColorProp]);
|
|
69
|
+
React.useEffect(() => {
|
|
70
|
+
setGrayColor(grayColorProp);
|
|
71
|
+
}, [grayColorProp]);
|
|
72
|
+
React.useEffect(() => {
|
|
73
|
+
setRadius(radiusProp);
|
|
74
|
+
}, [radiusProp]);
|
|
75
|
+
React.useEffect(() => {
|
|
76
|
+
setScaling(scalingProp);
|
|
77
|
+
}, [scalingProp]);
|
|
78
|
+
const resolvedGrayColor = grayColor === "auto" ? resolveGrayColor(accentColor) : grayColor;
|
|
79
|
+
const value = React.useMemo(
|
|
80
|
+
() => ({
|
|
81
|
+
appearance,
|
|
82
|
+
accentColor,
|
|
83
|
+
grayColor,
|
|
84
|
+
resolvedGrayColor,
|
|
85
|
+
radius,
|
|
86
|
+
scaling,
|
|
87
|
+
fonts: fontsProp,
|
|
88
|
+
colorOverrides: colorOverridesProp,
|
|
89
|
+
onAppearanceChange: setAppearance,
|
|
90
|
+
onAccentColorChange: setAccentColor,
|
|
91
|
+
onGrayColorChange: setGrayColor,
|
|
92
|
+
onRadiusChange: setRadius,
|
|
93
|
+
onScalingChange: setScaling
|
|
94
|
+
}),
|
|
95
|
+
[appearance, accentColor, grayColor, resolvedGrayColor, radius, scaling, fontsProp, colorOverridesProp]
|
|
96
|
+
);
|
|
97
|
+
return /* @__PURE__ */ React.createElement(ThemeContext.Provider, { value }, children);
|
|
98
|
+
}
|
|
99
|
+
ThemeRoot.displayName = "ThemeRoot";
|
|
100
|
+
|
|
101
|
+
function ThemeImpl({
|
|
102
|
+
appearance: appearanceProp,
|
|
103
|
+
accentColor: accentColorProp,
|
|
104
|
+
grayColor: grayColorProp,
|
|
105
|
+
radius: radiusProp,
|
|
106
|
+
scaling: scalingProp,
|
|
107
|
+
fonts: fontsProp,
|
|
108
|
+
colorOverrides: colorOverridesProp,
|
|
109
|
+
children
|
|
110
|
+
}) {
|
|
111
|
+
const parent = React.useContext(ThemeContext);
|
|
112
|
+
const appearance = appearanceProp !== void 0 && appearanceProp !== "inherit" ? appearanceProp : parent.appearance;
|
|
113
|
+
const accentColor = accentColorProp ?? parent.accentColor;
|
|
114
|
+
const grayColor = grayColorProp ?? parent.resolvedGrayColor;
|
|
115
|
+
const radius = radiusProp ?? parent.radius;
|
|
116
|
+
const scaling = scalingProp ?? parent.scaling;
|
|
117
|
+
const resolvedGrayColor = grayColor === "auto" ? resolveGrayColor(accentColor) : grayColor;
|
|
118
|
+
const value = React.useMemo(
|
|
119
|
+
() => ({
|
|
120
|
+
appearance,
|
|
121
|
+
accentColor,
|
|
122
|
+
grayColor,
|
|
123
|
+
resolvedGrayColor,
|
|
124
|
+
radius,
|
|
125
|
+
scaling,
|
|
126
|
+
fonts: fontsProp ?? parent.fonts,
|
|
127
|
+
colorOverrides: colorOverridesProp ?? parent.colorOverrides,
|
|
128
|
+
// Handlers always bubble up to ThemeRoot
|
|
129
|
+
onAppearanceChange: parent.onAppearanceChange,
|
|
130
|
+
onAccentColorChange: parent.onAccentColorChange,
|
|
131
|
+
onGrayColorChange: parent.onGrayColorChange,
|
|
132
|
+
onRadiusChange: parent.onRadiusChange,
|
|
133
|
+
onScalingChange: parent.onScalingChange
|
|
134
|
+
}),
|
|
135
|
+
[appearance, accentColor, grayColor, resolvedGrayColor, radius, scaling, fontsProp, colorOverridesProp, parent]
|
|
136
|
+
);
|
|
137
|
+
return /* @__PURE__ */ React.createElement(ThemeContext.Provider, { value }, children);
|
|
138
|
+
}
|
|
139
|
+
ThemeImpl.displayName = "ThemeImpl";
|
|
140
|
+
|
|
141
|
+
function Theme(props) {
|
|
142
|
+
const context = React.useContext(ThemeContext);
|
|
143
|
+
const isRoot = context === void 0;
|
|
144
|
+
return isRoot ? /* @__PURE__ */ React.createElement(ThemeRoot, { ...props }) : /* @__PURE__ */ React.createElement(ThemeImpl, { ...props });
|
|
145
|
+
}
|
|
146
|
+
Theme.displayName = "Theme";
|
|
147
|
+
|
|
148
|
+
function createTheme(config) {
|
|
149
|
+
function ThemeProvider({ children }) {
|
|
150
|
+
return /* @__PURE__ */ React.createElement(Theme, { ...config }, children);
|
|
151
|
+
}
|
|
152
|
+
ThemeProvider.displayName = "ThemeProvider";
|
|
153
|
+
return ThemeProvider;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function useThemeContext() {
|
|
157
|
+
const context = React.useContext(ThemeContext);
|
|
158
|
+
if (context === void 0) {
|
|
159
|
+
throw new Error("`useThemeContext` must be used within a `Theme`");
|
|
160
|
+
}
|
|
161
|
+
return context;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const tomato = {
|
|
165
|
+
light: {
|
|
166
|
+
1: "#fffcfc",
|
|
167
|
+
2: "#fff8f7",
|
|
168
|
+
3: "#feebe7",
|
|
169
|
+
4: "#ffdcd3",
|
|
170
|
+
5: "#ffcdc2",
|
|
171
|
+
6: "#fdbdaf",
|
|
172
|
+
7: "#f5a898",
|
|
173
|
+
8: "#ec8e7b",
|
|
174
|
+
9: "#e54d2e",
|
|
175
|
+
10: "#dd4425",
|
|
176
|
+
11: "#d13415",
|
|
177
|
+
12: "#5c271f",
|
|
178
|
+
a1: "#ff000003",
|
|
179
|
+
a2: "#ff200008",
|
|
180
|
+
a3: "#f52b0018",
|
|
181
|
+
a4: "#ff35002c",
|
|
182
|
+
a5: "#ff2e003d",
|
|
183
|
+
a6: "#f92d0050",
|
|
184
|
+
a7: "#e7280067",
|
|
185
|
+
a8: "#db250084",
|
|
186
|
+
a9: "#df2600d1",
|
|
187
|
+
a10: "#d72400da",
|
|
188
|
+
a11: "#cd2200ea",
|
|
189
|
+
a12: "#460900e0",
|
|
190
|
+
contrast: "#ffffff",
|
|
191
|
+
surface: "#fff6f5cc",
|
|
192
|
+
indicator: "#e54d2e",
|
|
193
|
+
track: "#e54d2e"
|
|
194
|
+
},
|
|
195
|
+
dark: {
|
|
196
|
+
1: "#181111",
|
|
197
|
+
2: "#1f1513",
|
|
198
|
+
3: "#391714",
|
|
199
|
+
4: "#4e1511",
|
|
200
|
+
5: "#5e1c16",
|
|
201
|
+
6: "#6e2920",
|
|
202
|
+
7: "#853a2d",
|
|
203
|
+
8: "#ac4d39",
|
|
204
|
+
9: "#e54d2e",
|
|
205
|
+
10: "#ec6142",
|
|
206
|
+
11: "#ff977d",
|
|
207
|
+
12: "#fbd3cb",
|
|
208
|
+
a1: "#f1121208",
|
|
209
|
+
a2: "#ff55330f",
|
|
210
|
+
a3: "#ff35232b",
|
|
211
|
+
a4: "#fd201142",
|
|
212
|
+
a5: "#fe332153",
|
|
213
|
+
a6: "#ff4f3864",
|
|
214
|
+
a7: "#fd644a7d",
|
|
215
|
+
a8: "#fe6d4ea7",
|
|
216
|
+
a9: "#fe5431e4",
|
|
217
|
+
a10: "#ff6847eb",
|
|
218
|
+
a11: "#ff977d",
|
|
219
|
+
a12: "#ffd6cefb",
|
|
220
|
+
contrast: "#ffffff",
|
|
221
|
+
surface: "#2d191580",
|
|
222
|
+
indicator: "#e54d2e",
|
|
223
|
+
track: "#e54d2e"
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const red = {
|
|
228
|
+
light: {
|
|
229
|
+
1: "#fffcfc",
|
|
230
|
+
2: "#fff7f7",
|
|
231
|
+
3: "#feebec",
|
|
232
|
+
4: "#ffdbdc",
|
|
233
|
+
5: "#ffcdce",
|
|
234
|
+
6: "#fdbdbe",
|
|
235
|
+
7: "#f4a9aa",
|
|
236
|
+
8: "#eb8e90",
|
|
237
|
+
9: "#e5484d",
|
|
238
|
+
10: "#dc3e42",
|
|
239
|
+
11: "#ce2c31",
|
|
240
|
+
12: "#641723",
|
|
241
|
+
a1: "#ff000003",
|
|
242
|
+
a2: "#ff000008",
|
|
243
|
+
a3: "#f3000d14",
|
|
244
|
+
a4: "#ff000824",
|
|
245
|
+
a5: "#ff000632",
|
|
246
|
+
a6: "#f8000442",
|
|
247
|
+
a7: "#df000356",
|
|
248
|
+
a8: "#d2000571",
|
|
249
|
+
a9: "#db0007b7",
|
|
250
|
+
a10: "#d10005c1",
|
|
251
|
+
a11: "#c40006d3",
|
|
252
|
+
a12: "#55000de8",
|
|
253
|
+
contrast: "#ffffff",
|
|
254
|
+
surface: "#fff5f5cc",
|
|
255
|
+
indicator: "#e5484d",
|
|
256
|
+
track: "#e5484d"
|
|
257
|
+
},
|
|
258
|
+
dark: {
|
|
259
|
+
1: "#191111",
|
|
260
|
+
2: "#201314",
|
|
261
|
+
3: "#3b1219",
|
|
262
|
+
4: "#500f1c",
|
|
263
|
+
5: "#611623",
|
|
264
|
+
6: "#72232d",
|
|
265
|
+
7: "#8c333a",
|
|
266
|
+
8: "#b54548",
|
|
267
|
+
9: "#e5484d",
|
|
268
|
+
10: "#ec5d5e",
|
|
269
|
+
11: "#ff9592",
|
|
270
|
+
12: "#ffd1d9",
|
|
271
|
+
a1: "#f4121209",
|
|
272
|
+
a2: "#f22f3e11",
|
|
273
|
+
a3: "#ff173f2d",
|
|
274
|
+
a4: "#fe0a3b44",
|
|
275
|
+
a5: "#ff204756",
|
|
276
|
+
a6: "#ff3e5668",
|
|
277
|
+
a7: "#ff536184",
|
|
278
|
+
a8: "#ff5d61b0",
|
|
279
|
+
a9: "#fe4e54e4",
|
|
280
|
+
a10: "#ff6465eb",
|
|
281
|
+
a11: "#ff9592",
|
|
282
|
+
a12: "#ffd1d9",
|
|
283
|
+
contrast: "#ffffff",
|
|
284
|
+
surface: "#2f151780",
|
|
285
|
+
indicator: "#e5484d",
|
|
286
|
+
track: "#e5484d"
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
const ruby = {
|
|
291
|
+
light: {
|
|
292
|
+
1: "#fffcfd",
|
|
293
|
+
2: "#fff7f8",
|
|
294
|
+
3: "#feeaed",
|
|
295
|
+
4: "#ffdce1",
|
|
296
|
+
5: "#ffced6",
|
|
297
|
+
6: "#f8bfc8",
|
|
298
|
+
7: "#efacb8",
|
|
299
|
+
8: "#e592a3",
|
|
300
|
+
9: "#e54666",
|
|
301
|
+
10: "#dc3b5d",
|
|
302
|
+
11: "#ca244d",
|
|
303
|
+
12: "#64172b",
|
|
304
|
+
a1: "#ff005503",
|
|
305
|
+
a2: "#ff002008",
|
|
306
|
+
a3: "#f3002515",
|
|
307
|
+
a4: "#ff002523",
|
|
308
|
+
a5: "#ff002a31",
|
|
309
|
+
a6: "#e4002440",
|
|
310
|
+
a7: "#ce002553",
|
|
311
|
+
a8: "#c300286d",
|
|
312
|
+
a9: "#db002cb9",
|
|
313
|
+
a10: "#d2002cc4",
|
|
314
|
+
a11: "#c10030db",
|
|
315
|
+
a12: "#550016e8",
|
|
316
|
+
contrast: "#ffffff",
|
|
317
|
+
surface: "#fff5f6cc",
|
|
318
|
+
indicator: "#e54666",
|
|
319
|
+
track: "#e54666"
|
|
320
|
+
},
|
|
321
|
+
dark: {
|
|
322
|
+
1: "#191113",
|
|
323
|
+
2: "#1e1517",
|
|
324
|
+
3: "#3a141e",
|
|
325
|
+
4: "#4e1325",
|
|
326
|
+
5: "#5e1a2e",
|
|
327
|
+
6: "#6f2539",
|
|
328
|
+
7: "#883447",
|
|
329
|
+
8: "#b3445a",
|
|
330
|
+
9: "#e54666",
|
|
331
|
+
10: "#ec5a72",
|
|
332
|
+
11: "#ff949d",
|
|
333
|
+
12: "#fed2e1",
|
|
334
|
+
a1: "#f4124a09",
|
|
335
|
+
a2: "#fe5a7f0e",
|
|
336
|
+
a3: "#ff235d2c",
|
|
337
|
+
a4: "#fd195e42",
|
|
338
|
+
a5: "#fe2d6b53",
|
|
339
|
+
a6: "#ff447665",
|
|
340
|
+
a7: "#ff577d80",
|
|
341
|
+
a8: "#ff5c7cae",
|
|
342
|
+
a9: "#fe4c70e4",
|
|
343
|
+
a10: "#ff617beb",
|
|
344
|
+
a11: "#ff949d",
|
|
345
|
+
a12: "#ffd3e2fe",
|
|
346
|
+
contrast: "#ffffff",
|
|
347
|
+
surface: "#2b191d80",
|
|
348
|
+
indicator: "#e54666",
|
|
349
|
+
track: "#e54666"
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
const crimson = {
|
|
354
|
+
light: {
|
|
355
|
+
1: "#fffcfd",
|
|
356
|
+
2: "#fef7f9",
|
|
357
|
+
3: "#ffe9f0",
|
|
358
|
+
4: "#fedce7",
|
|
359
|
+
5: "#facedd",
|
|
360
|
+
6: "#f3bed1",
|
|
361
|
+
7: "#eaacc3",
|
|
362
|
+
8: "#e093b2",
|
|
363
|
+
9: "#e93d82",
|
|
364
|
+
10: "#df3478",
|
|
365
|
+
11: "#cb1d63",
|
|
366
|
+
12: "#621639",
|
|
367
|
+
a1: "#ff005503",
|
|
368
|
+
a2: "#e0004008",
|
|
369
|
+
a3: "#ff005216",
|
|
370
|
+
a4: "#f8005123",
|
|
371
|
+
a5: "#e5004f31",
|
|
372
|
+
a6: "#d0004b41",
|
|
373
|
+
a7: "#bf004753",
|
|
374
|
+
a8: "#b6004a6c",
|
|
375
|
+
a9: "#e2005bc2",
|
|
376
|
+
a10: "#d70056cb",
|
|
377
|
+
a11: "#c4004fe2",
|
|
378
|
+
a12: "#530026e9",
|
|
379
|
+
contrast: "#ffffff",
|
|
380
|
+
surface: "#fef5f8cc",
|
|
381
|
+
indicator: "#e93d82",
|
|
382
|
+
track: "#e93d82"
|
|
383
|
+
},
|
|
384
|
+
dark: {
|
|
385
|
+
1: "#191114",
|
|
386
|
+
2: "#201318",
|
|
387
|
+
3: "#381525",
|
|
388
|
+
4: "#4d122f",
|
|
389
|
+
5: "#5c1839",
|
|
390
|
+
6: "#6d2545",
|
|
391
|
+
7: "#873356",
|
|
392
|
+
8: "#b0436e",
|
|
393
|
+
9: "#e93d82",
|
|
394
|
+
10: "#ee518a",
|
|
395
|
+
11: "#ff92ad",
|
|
396
|
+
12: "#fdd3e8",
|
|
397
|
+
a1: "#f4126709",
|
|
398
|
+
a2: "#f22f7a11",
|
|
399
|
+
a3: "#fe2a8b2a",
|
|
400
|
+
a4: "#fd158741",
|
|
401
|
+
a5: "#fd278f51",
|
|
402
|
+
a6: "#fe459763",
|
|
403
|
+
a7: "#fd559b7f",
|
|
404
|
+
a8: "#fe5b9bab",
|
|
405
|
+
a9: "#fe418de8",
|
|
406
|
+
a10: "#ff5693ed",
|
|
407
|
+
a11: "#ff92ad",
|
|
408
|
+
a12: "#ffd5eafd",
|
|
409
|
+
contrast: "#ffffff",
|
|
410
|
+
surface: "#2f151f80",
|
|
411
|
+
indicator: "#e93d82",
|
|
412
|
+
track: "#e93d82"
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
const pink = {
|
|
417
|
+
light: {
|
|
418
|
+
1: "#fffcfe",
|
|
419
|
+
2: "#fef7fb",
|
|
420
|
+
3: "#fee9f5",
|
|
421
|
+
4: "#fbdcef",
|
|
422
|
+
5: "#f6cee7",
|
|
423
|
+
6: "#efbfdd",
|
|
424
|
+
7: "#e7acd0",
|
|
425
|
+
8: "#dd93c2",
|
|
426
|
+
9: "#d6409f",
|
|
427
|
+
10: "#cf3897",
|
|
428
|
+
11: "#c2298a",
|
|
429
|
+
12: "#651249",
|
|
430
|
+
a1: "#ff00aa03",
|
|
431
|
+
a2: "#e0008008",
|
|
432
|
+
a3: "#f4008c16",
|
|
433
|
+
a4: "#e2008b23",
|
|
434
|
+
a5: "#d1008331",
|
|
435
|
+
a6: "#c0007840",
|
|
436
|
+
a7: "#b6006f53",
|
|
437
|
+
a8: "#af006f6c",
|
|
438
|
+
a9: "#c8007fbf",
|
|
439
|
+
a10: "#c2007ac7",
|
|
440
|
+
a11: "#b60074d6",
|
|
441
|
+
a12: "#59003bed",
|
|
442
|
+
contrast: "#ffffff",
|
|
443
|
+
surface: "#fef5facc",
|
|
444
|
+
indicator: "#d6409f",
|
|
445
|
+
track: "#d6409f"
|
|
446
|
+
},
|
|
447
|
+
dark: {
|
|
448
|
+
1: "#191117",
|
|
449
|
+
2: "#21121d",
|
|
450
|
+
3: "#37172f",
|
|
451
|
+
4: "#4b143d",
|
|
452
|
+
5: "#591c47",
|
|
453
|
+
6: "#692955",
|
|
454
|
+
7: "#833869",
|
|
455
|
+
8: "#a84885",
|
|
456
|
+
9: "#d6409f",
|
|
457
|
+
10: "#de51a8",
|
|
458
|
+
11: "#ff8dcc",
|
|
459
|
+
12: "#fdd1ea",
|
|
460
|
+
a1: "#f412bc09",
|
|
461
|
+
a2: "#f420bb12",
|
|
462
|
+
a3: "#fe37cc29",
|
|
463
|
+
a4: "#fc1ec43f",
|
|
464
|
+
a5: "#fd35c24e",
|
|
465
|
+
a6: "#fd51c75f",
|
|
466
|
+
a7: "#fd62c87b",
|
|
467
|
+
a8: "#ff68c8a2",
|
|
468
|
+
a9: "#fe49bcd4",
|
|
469
|
+
a10: "#ff5cc0dc",
|
|
470
|
+
a11: "#ff8dcc",
|
|
471
|
+
a12: "#ffd3ecfd",
|
|
472
|
+
contrast: "#ffffff",
|
|
473
|
+
surface: "#31132980",
|
|
474
|
+
indicator: "#d6409f",
|
|
475
|
+
track: "#d6409f"
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
const plum = {
|
|
480
|
+
light: {
|
|
481
|
+
1: "#fefcff",
|
|
482
|
+
2: "#fdf7fd",
|
|
483
|
+
3: "#fbebfb",
|
|
484
|
+
4: "#f7def8",
|
|
485
|
+
5: "#f2d1f3",
|
|
486
|
+
6: "#e9c2ec",
|
|
487
|
+
7: "#deade3",
|
|
488
|
+
8: "#cf91d8",
|
|
489
|
+
9: "#ab4aba",
|
|
490
|
+
10: "#a144af",
|
|
491
|
+
11: "#953ea3",
|
|
492
|
+
12: "#53195d",
|
|
493
|
+
a1: "#aa00ff03",
|
|
494
|
+
a2: "#c000c008",
|
|
495
|
+
a3: "#cc00cc14",
|
|
496
|
+
a4: "#c200c921",
|
|
497
|
+
a5: "#b700bd2e",
|
|
498
|
+
a6: "#a400b03d",
|
|
499
|
+
a7: "#9900a852",
|
|
500
|
+
a8: "#9000a56e",
|
|
501
|
+
a9: "#89009eb5",
|
|
502
|
+
a10: "#7f0092bb",
|
|
503
|
+
a11: "#730086c1",
|
|
504
|
+
a12: "#40004be6",
|
|
505
|
+
contrast: "#ffffff",
|
|
506
|
+
surface: "#fdf5fdcc",
|
|
507
|
+
indicator: "#ab4aba",
|
|
508
|
+
track: "#ab4aba"
|
|
509
|
+
},
|
|
510
|
+
dark: {
|
|
511
|
+
1: "#181118",
|
|
512
|
+
2: "#201320",
|
|
513
|
+
3: "#351a35",
|
|
514
|
+
4: "#451d47",
|
|
515
|
+
5: "#512454",
|
|
516
|
+
6: "#5e3061",
|
|
517
|
+
7: "#734079",
|
|
518
|
+
8: "#92549c",
|
|
519
|
+
9: "#ab4aba",
|
|
520
|
+
10: "#b658c4",
|
|
521
|
+
11: "#e796f3",
|
|
522
|
+
12: "#f4d4f4",
|
|
523
|
+
a1: "#f112f108",
|
|
524
|
+
a2: "#f22ff211",
|
|
525
|
+
a3: "#fd4cfd27",
|
|
526
|
+
a4: "#f646ff3a",
|
|
527
|
+
a5: "#f455ff48",
|
|
528
|
+
a6: "#f66dff56",
|
|
529
|
+
a7: "#f07cfd70",
|
|
530
|
+
a8: "#ee84ff95",
|
|
531
|
+
a9: "#e961feb6",
|
|
532
|
+
a10: "#ed70ffc0",
|
|
533
|
+
a11: "#f19cfef3",
|
|
534
|
+
a12: "#feddfef4",
|
|
535
|
+
contrast: "#ffffff",
|
|
536
|
+
surface: "#2f152f80",
|
|
537
|
+
indicator: "#ab4aba",
|
|
538
|
+
track: "#ab4aba"
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
const purple = {
|
|
543
|
+
light: {
|
|
544
|
+
1: "#fefcfe",
|
|
545
|
+
2: "#fbf7fe",
|
|
546
|
+
3: "#f7edfe",
|
|
547
|
+
4: "#f2e2fc",
|
|
548
|
+
5: "#ead5f9",
|
|
549
|
+
6: "#e0c4f4",
|
|
550
|
+
7: "#d1afec",
|
|
551
|
+
8: "#be93e4",
|
|
552
|
+
9: "#8e4ec6",
|
|
553
|
+
10: "#8347b9",
|
|
554
|
+
11: "#8145b5",
|
|
555
|
+
12: "#402060",
|
|
556
|
+
a1: "#aa00aa03",
|
|
557
|
+
a2: "#8000e008",
|
|
558
|
+
a3: "#8e00f112",
|
|
559
|
+
a4: "#8d00e51d",
|
|
560
|
+
a5: "#8000db2a",
|
|
561
|
+
a6: "#7a01d03b",
|
|
562
|
+
a7: "#6d00c350",
|
|
563
|
+
a8: "#6600c06c",
|
|
564
|
+
a9: "#5c00adb1",
|
|
565
|
+
a10: "#53009eb8",
|
|
566
|
+
a11: "#52009aba",
|
|
567
|
+
a12: "#250049df",
|
|
568
|
+
contrast: "#ffffff",
|
|
569
|
+
surface: "#faf5fecc",
|
|
570
|
+
indicator: "#8e4ec6",
|
|
571
|
+
track: "#8e4ec6"
|
|
572
|
+
},
|
|
573
|
+
dark: {
|
|
574
|
+
1: "#18111b",
|
|
575
|
+
2: "#1e1523",
|
|
576
|
+
3: "#301c3b",
|
|
577
|
+
4: "#3d224e",
|
|
578
|
+
5: "#48295c",
|
|
579
|
+
6: "#54346b",
|
|
580
|
+
7: "#664282",
|
|
581
|
+
8: "#8457aa",
|
|
582
|
+
9: "#8e4ec6",
|
|
583
|
+
10: "#9a5cd0",
|
|
584
|
+
11: "#d19dff",
|
|
585
|
+
12: "#ecd9fa",
|
|
586
|
+
a1: "#b412f90b",
|
|
587
|
+
a2: "#b744f714",
|
|
588
|
+
a3: "#c150ff2d",
|
|
589
|
+
a4: "#bb53fd42",
|
|
590
|
+
a5: "#be5cfd51",
|
|
591
|
+
a6: "#c16dfd61",
|
|
592
|
+
a7: "#c378fd7a",
|
|
593
|
+
a8: "#c47effa4",
|
|
594
|
+
a9: "#b661ffc2",
|
|
595
|
+
a10: "#bc6fffcd",
|
|
596
|
+
a11: "#d19dff",
|
|
597
|
+
a12: "#f1ddfffa",
|
|
598
|
+
contrast: "#ffffff",
|
|
599
|
+
surface: "#2b173580",
|
|
600
|
+
indicator: "#8e4ec6",
|
|
601
|
+
track: "#8e4ec6"
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
const violet = {
|
|
606
|
+
light: {
|
|
607
|
+
1: "#fdfcfe",
|
|
608
|
+
2: "#faf8ff",
|
|
609
|
+
3: "#f4f0fe",
|
|
610
|
+
4: "#ebe4ff",
|
|
611
|
+
5: "#e1d9ff",
|
|
612
|
+
6: "#d4cafe",
|
|
613
|
+
7: "#c2b5f5",
|
|
614
|
+
8: "#aa99ec",
|
|
615
|
+
9: "#6e56cf",
|
|
616
|
+
10: "#654dc4",
|
|
617
|
+
11: "#6550b9",
|
|
618
|
+
12: "#2f265f",
|
|
619
|
+
a1: "#5500aa03",
|
|
620
|
+
a2: "#4900ff07",
|
|
621
|
+
a3: "#4400ee0f",
|
|
622
|
+
a4: "#4300ff1b",
|
|
623
|
+
a5: "#3600ff26",
|
|
624
|
+
a6: "#3100fb35",
|
|
625
|
+
a7: "#2d01dd4a",
|
|
626
|
+
a8: "#2b00d066",
|
|
627
|
+
a9: "#2400b7a9",
|
|
628
|
+
a10: "#2300abb2",
|
|
629
|
+
a11: "#1f0099af",
|
|
630
|
+
a12: "#0b0043d9",
|
|
631
|
+
contrast: "#ffffff",
|
|
632
|
+
surface: "#f9f6ffcc",
|
|
633
|
+
indicator: "#6e56cf",
|
|
634
|
+
track: "#6e56cf"
|
|
635
|
+
},
|
|
636
|
+
dark: {
|
|
637
|
+
1: "#14121f",
|
|
638
|
+
2: "#1b1525",
|
|
639
|
+
3: "#291f43",
|
|
640
|
+
4: "#33255b",
|
|
641
|
+
5: "#3c2e69",
|
|
642
|
+
6: "#473876",
|
|
643
|
+
7: "#56468b",
|
|
644
|
+
8: "#6958ad",
|
|
645
|
+
9: "#6e56cf",
|
|
646
|
+
10: "#7d66d9",
|
|
647
|
+
11: "#baa7ff",
|
|
648
|
+
12: "#e2ddfe",
|
|
649
|
+
a1: "#4422ff0f",
|
|
650
|
+
a2: "#853ff916",
|
|
651
|
+
a3: "#8354fe36",
|
|
652
|
+
a4: "#7d51fd50",
|
|
653
|
+
a5: "#845ffd5f",
|
|
654
|
+
a6: "#8f6cfd6d",
|
|
655
|
+
a7: "#9879ff83",
|
|
656
|
+
a8: "#977dfea8",
|
|
657
|
+
a9: "#8668ffcc",
|
|
658
|
+
a10: "#9176fed7",
|
|
659
|
+
a11: "#baa7ff",
|
|
660
|
+
a12: "#e3defffe",
|
|
661
|
+
contrast: "#ffffff",
|
|
662
|
+
surface: "#25193980",
|
|
663
|
+
indicator: "#6e56cf",
|
|
664
|
+
track: "#6e56cf"
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
const iris = {
|
|
669
|
+
light: {
|
|
670
|
+
1: "#fdfdff",
|
|
671
|
+
2: "#f8f8ff",
|
|
672
|
+
3: "#f0f1fe",
|
|
673
|
+
4: "#e6e7ff",
|
|
674
|
+
5: "#dadcff",
|
|
675
|
+
6: "#cbcdff",
|
|
676
|
+
7: "#b8baf8",
|
|
677
|
+
8: "#9b9ef0",
|
|
678
|
+
9: "#5b5bd6",
|
|
679
|
+
10: "#5151cd",
|
|
680
|
+
11: "#5753c6",
|
|
681
|
+
12: "#272962",
|
|
682
|
+
a1: "#0000ff02",
|
|
683
|
+
a2: "#0000ff07",
|
|
684
|
+
a3: "#0011ee0f",
|
|
685
|
+
a4: "#000bff19",
|
|
686
|
+
a5: "#000eff25",
|
|
687
|
+
a6: "#000aff34",
|
|
688
|
+
a7: "#0008e647",
|
|
689
|
+
a8: "#0008d964",
|
|
690
|
+
a9: "#0000c0a4",
|
|
691
|
+
a10: "#0000b6ae",
|
|
692
|
+
a11: "#0600abac",
|
|
693
|
+
a12: "#000246d8",
|
|
694
|
+
contrast: "#ffffff",
|
|
695
|
+
surface: "#f6f6ffcc",
|
|
696
|
+
indicator: "#5b5bd6",
|
|
697
|
+
track: "#5b5bd6"
|
|
698
|
+
},
|
|
699
|
+
dark: {
|
|
700
|
+
1: "#13131e",
|
|
701
|
+
2: "#171625",
|
|
702
|
+
3: "#202248",
|
|
703
|
+
4: "#262a65",
|
|
704
|
+
5: "#303374",
|
|
705
|
+
6: "#3d3e82",
|
|
706
|
+
7: "#4a4a95",
|
|
707
|
+
8: "#5958b1",
|
|
708
|
+
9: "#5b5bd6",
|
|
709
|
+
10: "#6e6ade",
|
|
710
|
+
11: "#b1a9ff",
|
|
711
|
+
12: "#e0dffe",
|
|
712
|
+
a1: "#3636fe0e",
|
|
713
|
+
a2: "#564bf916",
|
|
714
|
+
a3: "#525bff3b",
|
|
715
|
+
a4: "#4d58ff5a",
|
|
716
|
+
a5: "#5b62fd6b",
|
|
717
|
+
a6: "#6d6ffd7a",
|
|
718
|
+
a7: "#7777fe8e",
|
|
719
|
+
a8: "#7b7afeac",
|
|
720
|
+
a9: "#6a6afed4",
|
|
721
|
+
a10: "#7d79ffdc",
|
|
722
|
+
a11: "#b1a9ff",
|
|
723
|
+
a12: "#e1e0fffe",
|
|
724
|
+
contrast: "#ffffff",
|
|
725
|
+
surface: "#1d1b3980",
|
|
726
|
+
indicator: "#5b5bd6",
|
|
727
|
+
track: "#5b5bd6"
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
const indigo = {
|
|
732
|
+
light: {
|
|
733
|
+
1: "#fdfdfe",
|
|
734
|
+
2: "#f7f9ff",
|
|
735
|
+
3: "#edf2fe",
|
|
736
|
+
4: "#e1e9ff",
|
|
737
|
+
5: "#d2deff",
|
|
738
|
+
6: "#c1d0ff",
|
|
739
|
+
7: "#abbdf9",
|
|
740
|
+
8: "#8da4ef",
|
|
741
|
+
9: "#3e63dd",
|
|
742
|
+
10: "#3358d4",
|
|
743
|
+
11: "#3a5bc7",
|
|
744
|
+
12: "#1f2d5c",
|
|
745
|
+
a1: "#00008002",
|
|
746
|
+
a2: "#0040ff08",
|
|
747
|
+
a3: "#0047f112",
|
|
748
|
+
a4: "#0044ff1e",
|
|
749
|
+
a5: "#0044ff2d",
|
|
750
|
+
a6: "#003eff3e",
|
|
751
|
+
a7: "#0037ed54",
|
|
752
|
+
a8: "#0034dc72",
|
|
753
|
+
a9: "#0031d2c1",
|
|
754
|
+
a10: "#002ec9cc",
|
|
755
|
+
a11: "#002bb7c5",
|
|
756
|
+
a12: "#001046e0",
|
|
757
|
+
contrast: "#ffffff",
|
|
758
|
+
surface: "#f5f8ffcc",
|
|
759
|
+
indicator: "#3e63dd",
|
|
760
|
+
track: "#3e63dd"
|
|
761
|
+
},
|
|
762
|
+
dark: {
|
|
763
|
+
1: "#11131f",
|
|
764
|
+
2: "#141726",
|
|
765
|
+
3: "#182449",
|
|
766
|
+
4: "#1d2e62",
|
|
767
|
+
5: "#253974",
|
|
768
|
+
6: "#304384",
|
|
769
|
+
7: "#3a4f97",
|
|
770
|
+
8: "#435db1",
|
|
771
|
+
9: "#3e63dd",
|
|
772
|
+
10: "#5472e4",
|
|
773
|
+
11: "#9eb1ff",
|
|
774
|
+
12: "#d6e1ff",
|
|
775
|
+
a1: "#1133ff0f",
|
|
776
|
+
a2: "#3354fa17",
|
|
777
|
+
a3: "#2f62ff3c",
|
|
778
|
+
a4: "#3566ff57",
|
|
779
|
+
a5: "#4171fd6b",
|
|
780
|
+
a6: "#5178fd7c",
|
|
781
|
+
a7: "#5a7fff90",
|
|
782
|
+
a8: "#5b81feac",
|
|
783
|
+
a9: "#4671ffdb",
|
|
784
|
+
a10: "#5c7efee3",
|
|
785
|
+
a11: "#9eb1ff",
|
|
786
|
+
a12: "#d6e1ff",
|
|
787
|
+
contrast: "#ffffff",
|
|
788
|
+
surface: "#171d3b80",
|
|
789
|
+
indicator: "#3e63dd",
|
|
790
|
+
track: "#3e63dd"
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
|
|
794
|
+
const blue = {
|
|
795
|
+
light: {
|
|
796
|
+
1: "#fbfdff",
|
|
797
|
+
2: "#f4faff",
|
|
798
|
+
3: "#e6f4fe",
|
|
799
|
+
4: "#d5efff",
|
|
800
|
+
5: "#c2e5ff",
|
|
801
|
+
6: "#acd8fc",
|
|
802
|
+
7: "#8ec8f6",
|
|
803
|
+
8: "#5eb1ef",
|
|
804
|
+
9: "#0090ff",
|
|
805
|
+
10: "#0588f0",
|
|
806
|
+
11: "#0d74ce",
|
|
807
|
+
12: "#113264",
|
|
808
|
+
a1: "#0080ff04",
|
|
809
|
+
a2: "#008cff0b",
|
|
810
|
+
a3: "#008ff519",
|
|
811
|
+
a4: "#009eff2a",
|
|
812
|
+
a5: "#0093ff3d",
|
|
813
|
+
a6: "#0088f653",
|
|
814
|
+
a7: "#0083eb71",
|
|
815
|
+
a8: "#0084e6a1",
|
|
816
|
+
a9: "#0090ff",
|
|
817
|
+
a10: "#0086f0fa",
|
|
818
|
+
a11: "#006dcbf2",
|
|
819
|
+
a12: "#002359ee",
|
|
820
|
+
contrast: "#ffffff",
|
|
821
|
+
surface: "#f1f9ffcc",
|
|
822
|
+
indicator: "#0090ff",
|
|
823
|
+
track: "#0090ff"
|
|
824
|
+
},
|
|
825
|
+
dark: {
|
|
826
|
+
1: "#0d1520",
|
|
827
|
+
2: "#111927",
|
|
828
|
+
3: "#0d2847",
|
|
829
|
+
4: "#003362",
|
|
830
|
+
5: "#004074",
|
|
831
|
+
6: "#104d87",
|
|
832
|
+
7: "#205d9e",
|
|
833
|
+
8: "#2870bd",
|
|
834
|
+
9: "#0090ff",
|
|
835
|
+
10: "#3b9eff",
|
|
836
|
+
11: "#70b8ff",
|
|
837
|
+
12: "#c2e6ff",
|
|
838
|
+
a1: "#004df211",
|
|
839
|
+
a2: "#1166fb18",
|
|
840
|
+
a3: "#0077ff3a",
|
|
841
|
+
a4: "#0075ff57",
|
|
842
|
+
a5: "#0081fd6b",
|
|
843
|
+
a6: "#0f89fd7f",
|
|
844
|
+
a7: "#2a91fe98",
|
|
845
|
+
a8: "#3094feb9",
|
|
846
|
+
a9: "#0090ff",
|
|
847
|
+
a10: "#3b9eff",
|
|
848
|
+
a11: "#70b8ff",
|
|
849
|
+
a12: "#c2e6ff",
|
|
850
|
+
contrast: "#ffffff",
|
|
851
|
+
surface: "#11213d80",
|
|
852
|
+
indicator: "#0090ff",
|
|
853
|
+
track: "#0090ff"
|
|
854
|
+
}
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
const cyan = {
|
|
858
|
+
light: {
|
|
859
|
+
1: "#fafdfe",
|
|
860
|
+
2: "#f2fafb",
|
|
861
|
+
3: "#def7f9",
|
|
862
|
+
4: "#caf1f6",
|
|
863
|
+
5: "#b5e9f0",
|
|
864
|
+
6: "#9ddde7",
|
|
865
|
+
7: "#7dcedc",
|
|
866
|
+
8: "#3db9cf",
|
|
867
|
+
9: "#00a2c7",
|
|
868
|
+
10: "#0797b9",
|
|
869
|
+
11: "#107d98",
|
|
870
|
+
12: "#0d3c48",
|
|
871
|
+
a1: "#0099cc05",
|
|
872
|
+
a2: "#009db10d",
|
|
873
|
+
a3: "#00c2d121",
|
|
874
|
+
a4: "#00bcd435",
|
|
875
|
+
a5: "#01b4cc4a",
|
|
876
|
+
a6: "#00a7c162",
|
|
877
|
+
a7: "#009fbb82",
|
|
878
|
+
a8: "#00a3c0c2",
|
|
879
|
+
a9: "#00a2c7",
|
|
880
|
+
a10: "#0094b7f8",
|
|
881
|
+
a11: "#007491ef",
|
|
882
|
+
a12: "#00323ef2",
|
|
883
|
+
contrast: "#ffffff",
|
|
884
|
+
surface: "#eff9facc",
|
|
885
|
+
indicator: "#00a2c7",
|
|
886
|
+
track: "#00a2c7"
|
|
887
|
+
},
|
|
888
|
+
dark: {
|
|
889
|
+
1: "#0b161a",
|
|
890
|
+
2: "#101b20",
|
|
891
|
+
3: "#082c36",
|
|
892
|
+
4: "#003848",
|
|
893
|
+
5: "#004558",
|
|
894
|
+
6: "#045468",
|
|
895
|
+
7: "#12677e",
|
|
896
|
+
8: "#11809c",
|
|
897
|
+
9: "#00a2c7",
|
|
898
|
+
10: "#23afd0",
|
|
899
|
+
11: "#4ccce6",
|
|
900
|
+
12: "#b6ecf7",
|
|
901
|
+
a1: "#0091f70a",
|
|
902
|
+
a2: "#02a7f211",
|
|
903
|
+
a3: "#00befd28",
|
|
904
|
+
a4: "#00baff3b",
|
|
905
|
+
a5: "#00befd4d",
|
|
906
|
+
a6: "#00c7fd5e",
|
|
907
|
+
a7: "#14cdff75",
|
|
908
|
+
a8: "#11cfff95",
|
|
909
|
+
a9: "#00cfffc3",
|
|
910
|
+
a10: "#28d6ffcd",
|
|
911
|
+
a11: "#52e1fee5",
|
|
912
|
+
a12: "#bbf3fef7",
|
|
913
|
+
contrast: "#ffffff",
|
|
914
|
+
surface: "#11252d80",
|
|
915
|
+
indicator: "#00a2c7",
|
|
916
|
+
track: "#00a2c7"
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
const teal = {
|
|
921
|
+
light: {
|
|
922
|
+
1: "#fafefd",
|
|
923
|
+
2: "#f3fbf9",
|
|
924
|
+
3: "#e0f8f3",
|
|
925
|
+
4: "#ccf3ea",
|
|
926
|
+
5: "#b8eae0",
|
|
927
|
+
6: "#a1ded2",
|
|
928
|
+
7: "#83cdc1",
|
|
929
|
+
8: "#53b9ab",
|
|
930
|
+
9: "#12a594",
|
|
931
|
+
10: "#0d9b8a",
|
|
932
|
+
11: "#008573",
|
|
933
|
+
12: "#0d3d38",
|
|
934
|
+
a1: "#00cc9905",
|
|
935
|
+
a2: "#00aa800c",
|
|
936
|
+
a3: "#00c69d1f",
|
|
937
|
+
a4: "#00c39633",
|
|
938
|
+
a5: "#00b49047",
|
|
939
|
+
a6: "#00a6855e",
|
|
940
|
+
a7: "#0099807c",
|
|
941
|
+
a8: "#009783ac",
|
|
942
|
+
a9: "#009e8ced",
|
|
943
|
+
a10: "#009684f2",
|
|
944
|
+
a11: "#008573",
|
|
945
|
+
a12: "#00332df2",
|
|
946
|
+
contrast: "#ffffff",
|
|
947
|
+
surface: "#f0faf8cc",
|
|
948
|
+
indicator: "#12a594",
|
|
949
|
+
track: "#12a594"
|
|
950
|
+
},
|
|
951
|
+
dark: {
|
|
952
|
+
1: "#0d1514",
|
|
953
|
+
2: "#111c1b",
|
|
954
|
+
3: "#0d2d2a",
|
|
955
|
+
4: "#023b37",
|
|
956
|
+
5: "#084843",
|
|
957
|
+
6: "#145750",
|
|
958
|
+
7: "#1c6961",
|
|
959
|
+
8: "#207e73",
|
|
960
|
+
9: "#12a594",
|
|
961
|
+
10: "#0eb39e",
|
|
962
|
+
11: "#0bd8b6",
|
|
963
|
+
12: "#adf0dd",
|
|
964
|
+
a1: "#00deab05",
|
|
965
|
+
a2: "#12fbe60c",
|
|
966
|
+
a3: "#00ffe61e",
|
|
967
|
+
a4: "#00ffe92d",
|
|
968
|
+
a5: "#00ffea3b",
|
|
969
|
+
a6: "#1cffe84b",
|
|
970
|
+
a7: "#2efde85f",
|
|
971
|
+
a8: "#32ffe775",
|
|
972
|
+
a9: "#13ffe49f",
|
|
973
|
+
a10: "#0dffe0ae",
|
|
974
|
+
a11: "#0afed5d6",
|
|
975
|
+
a12: "#b8ffebef",
|
|
976
|
+
contrast: "#ffffff",
|
|
977
|
+
surface: "#13272580",
|
|
978
|
+
indicator: "#12a594",
|
|
979
|
+
track: "#12a594"
|
|
980
|
+
}
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
const jade = {
|
|
984
|
+
light: {
|
|
985
|
+
1: "#fbfefd",
|
|
986
|
+
2: "#f4fbf7",
|
|
987
|
+
3: "#e6f7ed",
|
|
988
|
+
4: "#d6f1e3",
|
|
989
|
+
5: "#c3e9d7",
|
|
990
|
+
6: "#acdec8",
|
|
991
|
+
7: "#8bceb6",
|
|
992
|
+
8: "#56ba9f",
|
|
993
|
+
9: "#29a383",
|
|
994
|
+
10: "#26997b",
|
|
995
|
+
11: "#208368",
|
|
996
|
+
12: "#1d3b31",
|
|
997
|
+
a1: "#00c08004",
|
|
998
|
+
a2: "#00a3460b",
|
|
999
|
+
a3: "#00ae4819",
|
|
1000
|
+
a4: "#00a85129",
|
|
1001
|
+
a5: "#00a2553c",
|
|
1002
|
+
a6: "#009a5753",
|
|
1003
|
+
a7: "#00945f74",
|
|
1004
|
+
a8: "#00976ea9",
|
|
1005
|
+
a9: "#00916bd6",
|
|
1006
|
+
a10: "#008764d9",
|
|
1007
|
+
a11: "#007152df",
|
|
1008
|
+
a12: "#002217e2",
|
|
1009
|
+
contrast: "#ffffff",
|
|
1010
|
+
surface: "#f1faf5cc",
|
|
1011
|
+
indicator: "#29a383",
|
|
1012
|
+
track: "#29a383"
|
|
1013
|
+
},
|
|
1014
|
+
dark: {
|
|
1015
|
+
1: "#0d1512",
|
|
1016
|
+
2: "#121c18",
|
|
1017
|
+
3: "#0f2e22",
|
|
1018
|
+
4: "#0b3b2c",
|
|
1019
|
+
5: "#114837",
|
|
1020
|
+
6: "#1b5745",
|
|
1021
|
+
7: "#246854",
|
|
1022
|
+
8: "#2a7e68",
|
|
1023
|
+
9: "#29a383",
|
|
1024
|
+
10: "#27b08b",
|
|
1025
|
+
11: "#1fd8a4",
|
|
1026
|
+
12: "#adf0d4",
|
|
1027
|
+
a1: "#00de4505",
|
|
1028
|
+
a2: "#27fba60c",
|
|
1029
|
+
a3: "#02f99920",
|
|
1030
|
+
a4: "#00ffaa2d",
|
|
1031
|
+
a5: "#11ffb63b",
|
|
1032
|
+
a6: "#34ffc24b",
|
|
1033
|
+
a7: "#45fdc75e",
|
|
1034
|
+
a8: "#48ffcf75",
|
|
1035
|
+
a9: "#38feca9d",
|
|
1036
|
+
a10: "#31fec7ab",
|
|
1037
|
+
a11: "#21fec0d6",
|
|
1038
|
+
a12: "#b8ffe1ef",
|
|
1039
|
+
contrast: "#ffffff",
|
|
1040
|
+
surface: "#13271f80",
|
|
1041
|
+
indicator: "#29a383",
|
|
1042
|
+
track: "#29a383"
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
|
|
1046
|
+
const green = {
|
|
1047
|
+
light: {
|
|
1048
|
+
1: "#fbfefc",
|
|
1049
|
+
2: "#f4fbf6",
|
|
1050
|
+
3: "#e6f6eb",
|
|
1051
|
+
4: "#d6f1df",
|
|
1052
|
+
5: "#c4e8d1",
|
|
1053
|
+
6: "#adddc0",
|
|
1054
|
+
7: "#8eceaa",
|
|
1055
|
+
8: "#5bb98b",
|
|
1056
|
+
9: "#30a46c",
|
|
1057
|
+
10: "#2b9a66",
|
|
1058
|
+
11: "#218358",
|
|
1059
|
+
12: "#193b2d",
|
|
1060
|
+
a1: "#00c04004",
|
|
1061
|
+
a2: "#00a32f0b",
|
|
1062
|
+
a3: "#00a43319",
|
|
1063
|
+
a4: "#00a83829",
|
|
1064
|
+
a5: "#019c393b",
|
|
1065
|
+
a6: "#00963c52",
|
|
1066
|
+
a7: "#00914071",
|
|
1067
|
+
a8: "#00924ba4",
|
|
1068
|
+
a9: "#008f4acf",
|
|
1069
|
+
a10: "#008647d4",
|
|
1070
|
+
a11: "#00713fde",
|
|
1071
|
+
a12: "#002616e6",
|
|
1072
|
+
contrast: "#ffffff",
|
|
1073
|
+
surface: "#f1faf4cc",
|
|
1074
|
+
indicator: "#30a46c",
|
|
1075
|
+
track: "#30a46c"
|
|
1076
|
+
},
|
|
1077
|
+
dark: {
|
|
1078
|
+
1: "#0e1512",
|
|
1079
|
+
2: "#121b17",
|
|
1080
|
+
3: "#132d21",
|
|
1081
|
+
4: "#113b29",
|
|
1082
|
+
5: "#174933",
|
|
1083
|
+
6: "#20573e",
|
|
1084
|
+
7: "#28684a",
|
|
1085
|
+
8: "#2f7c57",
|
|
1086
|
+
9: "#30a46c",
|
|
1087
|
+
10: "#33b074",
|
|
1088
|
+
11: "#3dd68c",
|
|
1089
|
+
12: "#b1f1cb",
|
|
1090
|
+
a1: "#00de4505",
|
|
1091
|
+
a2: "#29f99d0b",
|
|
1092
|
+
a3: "#22ff991e",
|
|
1093
|
+
a4: "#11ff992d",
|
|
1094
|
+
a5: "#2bffa23c",
|
|
1095
|
+
a6: "#44ffaa4b",
|
|
1096
|
+
a7: "#50fdac5e",
|
|
1097
|
+
a8: "#54ffad73",
|
|
1098
|
+
a9: "#44ffa49e",
|
|
1099
|
+
a10: "#43fea4ab",
|
|
1100
|
+
a11: "#46fea5d4",
|
|
1101
|
+
a12: "#bbffd7f0",
|
|
1102
|
+
contrast: "#ffffff",
|
|
1103
|
+
surface: "#15251d80",
|
|
1104
|
+
indicator: "#30a46c",
|
|
1105
|
+
track: "#30a46c"
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
1108
|
+
|
|
1109
|
+
const grass = {
|
|
1110
|
+
light: {
|
|
1111
|
+
1: "#fbfefb",
|
|
1112
|
+
2: "#f5fbf5",
|
|
1113
|
+
3: "#e9f6e9",
|
|
1114
|
+
4: "#daf1db",
|
|
1115
|
+
5: "#c9e8ca",
|
|
1116
|
+
6: "#b2ddb5",
|
|
1117
|
+
7: "#94ce9a",
|
|
1118
|
+
8: "#65ba74",
|
|
1119
|
+
9: "#46a758",
|
|
1120
|
+
10: "#3e9b4f",
|
|
1121
|
+
11: "#2a7e3b",
|
|
1122
|
+
12: "#203c25",
|
|
1123
|
+
a1: "#00c00004",
|
|
1124
|
+
a2: "#0099000a",
|
|
1125
|
+
a3: "#00970016",
|
|
1126
|
+
a4: "#009f0725",
|
|
1127
|
+
a5: "#00930536",
|
|
1128
|
+
a6: "#008f0a4d",
|
|
1129
|
+
a7: "#018b0f6b",
|
|
1130
|
+
a8: "#008d199a",
|
|
1131
|
+
a9: "#008619b9",
|
|
1132
|
+
a10: "#007b17c1",
|
|
1133
|
+
a11: "#006514d5",
|
|
1134
|
+
a12: "#002006df",
|
|
1135
|
+
contrast: "#ffffff",
|
|
1136
|
+
surface: "#f3faf3cc",
|
|
1137
|
+
indicator: "#46a758",
|
|
1138
|
+
track: "#46a758"
|
|
1139
|
+
},
|
|
1140
|
+
dark: {
|
|
1141
|
+
1: "#0e1511",
|
|
1142
|
+
2: "#141a15",
|
|
1143
|
+
3: "#1b2a1e",
|
|
1144
|
+
4: "#1d3a24",
|
|
1145
|
+
5: "#25482d",
|
|
1146
|
+
6: "#2d5736",
|
|
1147
|
+
7: "#366740",
|
|
1148
|
+
8: "#3e7949",
|
|
1149
|
+
9: "#46a758",
|
|
1150
|
+
10: "#53b365",
|
|
1151
|
+
11: "#71d083",
|
|
1152
|
+
12: "#c2f0c2",
|
|
1153
|
+
a1: "#00de1205",
|
|
1154
|
+
a2: "#5ef7780a",
|
|
1155
|
+
a3: "#70fe8c1b",
|
|
1156
|
+
a4: "#57ff802c",
|
|
1157
|
+
a5: "#68ff8b3b",
|
|
1158
|
+
a6: "#71ff8f4b",
|
|
1159
|
+
a7: "#77fd925d",
|
|
1160
|
+
a8: "#77fd9070",
|
|
1161
|
+
a9: "#65ff82a1",
|
|
1162
|
+
a10: "#72ff8dae",
|
|
1163
|
+
a11: "#89ff9fcd",
|
|
1164
|
+
a12: "#ceffceef",
|
|
1165
|
+
contrast: "#ffffff",
|
|
1166
|
+
surface: "#19231b80",
|
|
1167
|
+
indicator: "#46a758",
|
|
1168
|
+
track: "#46a758"
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
|
|
1172
|
+
const bronze = {
|
|
1173
|
+
light: {
|
|
1174
|
+
1: "#fdfcfc",
|
|
1175
|
+
2: "#fdf7f5",
|
|
1176
|
+
3: "#f6edea",
|
|
1177
|
+
4: "#efe4df",
|
|
1178
|
+
5: "#e7d9d3",
|
|
1179
|
+
6: "#dfcdc5",
|
|
1180
|
+
7: "#d3bcb3",
|
|
1181
|
+
8: "#c2a499",
|
|
1182
|
+
9: "#a18072",
|
|
1183
|
+
10: "#957468",
|
|
1184
|
+
11: "#7d5e54",
|
|
1185
|
+
12: "#43302b",
|
|
1186
|
+
a1: "#55000003",
|
|
1187
|
+
a2: "#cc33000a",
|
|
1188
|
+
a3: "#92250015",
|
|
1189
|
+
a4: "#80280020",
|
|
1190
|
+
a5: "#7423002c",
|
|
1191
|
+
a6: "#7324003a",
|
|
1192
|
+
a7: "#6c1f004c",
|
|
1193
|
+
a8: "#671c0066",
|
|
1194
|
+
a9: "#551a008d",
|
|
1195
|
+
a10: "#4c150097",
|
|
1196
|
+
a11: "#3d0f00ab",
|
|
1197
|
+
a12: "#1d0600d4",
|
|
1198
|
+
contrast: "#ffffff",
|
|
1199
|
+
surface: "#fdf5f3cc",
|
|
1200
|
+
indicator: "#a18072",
|
|
1201
|
+
track: "#a18072"
|
|
1202
|
+
},
|
|
1203
|
+
dark: {
|
|
1204
|
+
1: "#141110",
|
|
1205
|
+
2: "#1c1917",
|
|
1206
|
+
3: "#262220",
|
|
1207
|
+
4: "#302a27",
|
|
1208
|
+
5: "#3b3330",
|
|
1209
|
+
6: "#493e3a",
|
|
1210
|
+
7: "#5a4c47",
|
|
1211
|
+
8: "#6f5f58",
|
|
1212
|
+
9: "#a18072",
|
|
1213
|
+
10: "#ae8c7e",
|
|
1214
|
+
11: "#d4b3a5",
|
|
1215
|
+
12: "#ede0d9",
|
|
1216
|
+
a1: "#d1110004",
|
|
1217
|
+
a2: "#fbbc910c",
|
|
1218
|
+
a3: "#faceb817",
|
|
1219
|
+
a4: "#facdb622",
|
|
1220
|
+
a5: "#ffd2c12d",
|
|
1221
|
+
a6: "#ffd1c03c",
|
|
1222
|
+
a7: "#fdd0c04f",
|
|
1223
|
+
a8: "#ffd6c565",
|
|
1224
|
+
a9: "#fec7b09b",
|
|
1225
|
+
a10: "#fecab5a9",
|
|
1226
|
+
a11: "#ffd7c6d1",
|
|
1227
|
+
a12: "#fff1e9ec",
|
|
1228
|
+
contrast: "#ffffff",
|
|
1229
|
+
surface: "#27211d80",
|
|
1230
|
+
indicator: "#a18072",
|
|
1231
|
+
track: "#a18072"
|
|
1232
|
+
}
|
|
1233
|
+
};
|
|
1234
|
+
|
|
1235
|
+
const gold = {
|
|
1236
|
+
light: {
|
|
1237
|
+
1: "#fdfdfc",
|
|
1238
|
+
2: "#faf9f2",
|
|
1239
|
+
3: "#f2f0e7",
|
|
1240
|
+
4: "#eae6db",
|
|
1241
|
+
5: "#e1dccf",
|
|
1242
|
+
6: "#d8d0bf",
|
|
1243
|
+
7: "#cbc0aa",
|
|
1244
|
+
8: "#b9a88d",
|
|
1245
|
+
9: "#978365",
|
|
1246
|
+
10: "#8c7a5e",
|
|
1247
|
+
11: "#71624b",
|
|
1248
|
+
12: "#3b352b",
|
|
1249
|
+
a1: "#55550003",
|
|
1250
|
+
a2: "#9d8a000d",
|
|
1251
|
+
a3: "#75600018",
|
|
1252
|
+
a4: "#6b4e0024",
|
|
1253
|
+
a5: "#60460030",
|
|
1254
|
+
a6: "#64440040",
|
|
1255
|
+
a7: "#63420055",
|
|
1256
|
+
a8: "#633d0072",
|
|
1257
|
+
a9: "#5332009a",
|
|
1258
|
+
a10: "#492d00a1",
|
|
1259
|
+
a11: "#362100b4",
|
|
1260
|
+
a12: "#130c00d4",
|
|
1261
|
+
contrast: "#ffffff",
|
|
1262
|
+
surface: "#f9f8efcc",
|
|
1263
|
+
indicator: "#978365",
|
|
1264
|
+
track: "#978365"
|
|
1265
|
+
},
|
|
1266
|
+
dark: {
|
|
1267
|
+
1: "#121211",
|
|
1268
|
+
2: "#1b1a17",
|
|
1269
|
+
3: "#24231f",
|
|
1270
|
+
4: "#2d2b26",
|
|
1271
|
+
5: "#38352e",
|
|
1272
|
+
6: "#444039",
|
|
1273
|
+
7: "#544f46",
|
|
1274
|
+
8: "#696256",
|
|
1275
|
+
9: "#978365",
|
|
1276
|
+
10: "#a39073",
|
|
1277
|
+
11: "#cbb99f",
|
|
1278
|
+
12: "#e8e2d9",
|
|
1279
|
+
a1: "#91911102",
|
|
1280
|
+
a2: "#f9e29d0b",
|
|
1281
|
+
a3: "#f8ecbb15",
|
|
1282
|
+
a4: "#ffeec41e",
|
|
1283
|
+
a5: "#feecc22a",
|
|
1284
|
+
a6: "#feebcb37",
|
|
1285
|
+
a7: "#ffedcd48",
|
|
1286
|
+
a8: "#fdeaca5f",
|
|
1287
|
+
a9: "#ffdba690",
|
|
1288
|
+
a10: "#fedfb09d",
|
|
1289
|
+
a11: "#fee7c6c8",
|
|
1290
|
+
a12: "#fef7ede7",
|
|
1291
|
+
contrast: "#ffffff",
|
|
1292
|
+
surface: "#25231d80",
|
|
1293
|
+
indicator: "#978365",
|
|
1294
|
+
track: "#978365"
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
const brown = {
|
|
1299
|
+
light: {
|
|
1300
|
+
1: "#fefdfc",
|
|
1301
|
+
2: "#fcf9f6",
|
|
1302
|
+
3: "#f6eee7",
|
|
1303
|
+
4: "#f0e4d9",
|
|
1304
|
+
5: "#ebdaca",
|
|
1305
|
+
6: "#e4cdb7",
|
|
1306
|
+
7: "#dcbc9f",
|
|
1307
|
+
8: "#cea37e",
|
|
1308
|
+
9: "#ad7f58",
|
|
1309
|
+
10: "#a07553",
|
|
1310
|
+
11: "#815e46",
|
|
1311
|
+
12: "#3e332e",
|
|
1312
|
+
a1: "#aa550003",
|
|
1313
|
+
a2: "#aa550009",
|
|
1314
|
+
a3: "#a04b0018",
|
|
1315
|
+
a4: "#9b4a0026",
|
|
1316
|
+
a5: "#9f4d0035",
|
|
1317
|
+
a6: "#a04e0048",
|
|
1318
|
+
a7: "#a34e0060",
|
|
1319
|
+
a8: "#9f4a0081",
|
|
1320
|
+
a9: "#823c00a7",
|
|
1321
|
+
a10: "#723300ac",
|
|
1322
|
+
a11: "#522100b9",
|
|
1323
|
+
a12: "#140600d1",
|
|
1324
|
+
contrast: "#ffffff",
|
|
1325
|
+
surface: "#fbf8f4cc",
|
|
1326
|
+
indicator: "#ad7f58",
|
|
1327
|
+
track: "#ad7f58"
|
|
1328
|
+
},
|
|
1329
|
+
dark: {
|
|
1330
|
+
1: "#12110f",
|
|
1331
|
+
2: "#1c1816",
|
|
1332
|
+
3: "#28211d",
|
|
1333
|
+
4: "#322922",
|
|
1334
|
+
5: "#3e3128",
|
|
1335
|
+
6: "#4d3c2f",
|
|
1336
|
+
7: "#614a39",
|
|
1337
|
+
8: "#7c5f46",
|
|
1338
|
+
9: "#ad7f58",
|
|
1339
|
+
10: "#b88c67",
|
|
1340
|
+
11: "#dbb594",
|
|
1341
|
+
12: "#f2e1ca",
|
|
1342
|
+
a1: "#91110002",
|
|
1343
|
+
a2: "#fba67c0c",
|
|
1344
|
+
a3: "#fcb58c19",
|
|
1345
|
+
a4: "#fbbb8a24",
|
|
1346
|
+
a5: "#fcb88931",
|
|
1347
|
+
a6: "#fdba8741",
|
|
1348
|
+
a7: "#ffbb8856",
|
|
1349
|
+
a8: "#ffbe8773",
|
|
1350
|
+
a9: "#feb87da8",
|
|
1351
|
+
a10: "#ffc18cb3",
|
|
1352
|
+
a11: "#fed1aad9",
|
|
1353
|
+
a12: "#feecd4f2",
|
|
1354
|
+
contrast: "#ffffff",
|
|
1355
|
+
surface: "#271f1b80",
|
|
1356
|
+
indicator: "#ad7f58",
|
|
1357
|
+
track: "#ad7f58"
|
|
1358
|
+
}
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1361
|
+
const orange = {
|
|
1362
|
+
light: {
|
|
1363
|
+
1: "#fefcfb",
|
|
1364
|
+
2: "#fff7ed",
|
|
1365
|
+
3: "#ffefd6",
|
|
1366
|
+
4: "#ffdfb5",
|
|
1367
|
+
5: "#ffd19a",
|
|
1368
|
+
6: "#ffc182",
|
|
1369
|
+
7: "#f5ae73",
|
|
1370
|
+
8: "#ec9455",
|
|
1371
|
+
9: "#f76b15",
|
|
1372
|
+
10: "#ef5f00",
|
|
1373
|
+
11: "#cc4e00",
|
|
1374
|
+
12: "#582d1d",
|
|
1375
|
+
a1: "#c0400004",
|
|
1376
|
+
a2: "#ff8e0012",
|
|
1377
|
+
a3: "#ff9c0029",
|
|
1378
|
+
a4: "#ff91014a",
|
|
1379
|
+
a5: "#ff8b0065",
|
|
1380
|
+
a6: "#ff81007d",
|
|
1381
|
+
a7: "#ed6c008c",
|
|
1382
|
+
a8: "#e35f00aa",
|
|
1383
|
+
a9: "#f65e00ea",
|
|
1384
|
+
a10: "#ef5f00",
|
|
1385
|
+
a11: "#cc4e00",
|
|
1386
|
+
a12: "#431200e2",
|
|
1387
|
+
contrast: "#ffffff",
|
|
1388
|
+
surface: "#fff5e9cc",
|
|
1389
|
+
indicator: "#f76b15",
|
|
1390
|
+
track: "#f76b15"
|
|
1391
|
+
},
|
|
1392
|
+
dark: {
|
|
1393
|
+
1: "#17120e",
|
|
1394
|
+
2: "#1e160f",
|
|
1395
|
+
3: "#331e0b",
|
|
1396
|
+
4: "#462100",
|
|
1397
|
+
5: "#562800",
|
|
1398
|
+
6: "#66350c",
|
|
1399
|
+
7: "#7e451d",
|
|
1400
|
+
8: "#a35829",
|
|
1401
|
+
9: "#f76b15",
|
|
1402
|
+
10: "#ff801f",
|
|
1403
|
+
11: "#ffa057",
|
|
1404
|
+
12: "#ffe0c2",
|
|
1405
|
+
a1: "#ec360007",
|
|
1406
|
+
a2: "#fe6d000e",
|
|
1407
|
+
a3: "#fb6a0025",
|
|
1408
|
+
a4: "#ff590039",
|
|
1409
|
+
a5: "#ff61004a",
|
|
1410
|
+
a6: "#fd75045c",
|
|
1411
|
+
a7: "#ff832c75",
|
|
1412
|
+
a8: "#fe84389d",
|
|
1413
|
+
a9: "#fe6d15f7",
|
|
1414
|
+
a10: "#ff801f",
|
|
1415
|
+
a11: "#ffa057",
|
|
1416
|
+
a12: "#ffe0c2",
|
|
1417
|
+
contrast: "#ffffff",
|
|
1418
|
+
surface: "#271d1d80",
|
|
1419
|
+
indicator: "#f76b15",
|
|
1420
|
+
track: "#f76b15"
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1423
|
+
|
|
1424
|
+
const amber = {
|
|
1425
|
+
light: {
|
|
1426
|
+
1: "#fefdfb",
|
|
1427
|
+
2: "#fefbe9",
|
|
1428
|
+
3: "#fff7c2",
|
|
1429
|
+
4: "#ffee9c",
|
|
1430
|
+
5: "#fbe577",
|
|
1431
|
+
6: "#f3d673",
|
|
1432
|
+
7: "#e9c162",
|
|
1433
|
+
8: "#e2a336",
|
|
1434
|
+
9: "#ffc53d",
|
|
1435
|
+
10: "#ffba18",
|
|
1436
|
+
11: "#ab6400",
|
|
1437
|
+
12: "#4f3422",
|
|
1438
|
+
a1: "#c0800004",
|
|
1439
|
+
a2: "#f4d10016",
|
|
1440
|
+
a3: "#ffde003d",
|
|
1441
|
+
a4: "#ffd40063",
|
|
1442
|
+
a5: "#f8cf0088",
|
|
1443
|
+
a6: "#eab5008c",
|
|
1444
|
+
a7: "#dc9b009d",
|
|
1445
|
+
a8: "#da8a00c9",
|
|
1446
|
+
a9: "#ffb300c2",
|
|
1447
|
+
a10: "#ffb300e7",
|
|
1448
|
+
a11: "#ab6400",
|
|
1449
|
+
a12: "#341500dd",
|
|
1450
|
+
contrast: "#21201c",
|
|
1451
|
+
surface: "#fefae4cc",
|
|
1452
|
+
indicator: "#ffc53d",
|
|
1453
|
+
track: "#ffc53d"
|
|
1454
|
+
},
|
|
1455
|
+
dark: {
|
|
1456
|
+
1: "#16120c",
|
|
1457
|
+
2: "#1d180f",
|
|
1458
|
+
3: "#302008",
|
|
1459
|
+
4: "#3f2700",
|
|
1460
|
+
5: "#4d3000",
|
|
1461
|
+
6: "#5c3d05",
|
|
1462
|
+
7: "#714f19",
|
|
1463
|
+
8: "#8f6424",
|
|
1464
|
+
9: "#ffc53d",
|
|
1465
|
+
10: "#ffd60a",
|
|
1466
|
+
11: "#ffca16",
|
|
1467
|
+
12: "#ffe7b3",
|
|
1468
|
+
a1: "#e63c0006",
|
|
1469
|
+
a2: "#fd9b000d",
|
|
1470
|
+
a3: "#fa820022",
|
|
1471
|
+
a4: "#fc820032",
|
|
1472
|
+
a5: "#fd8b0041",
|
|
1473
|
+
a6: "#fd9b0051",
|
|
1474
|
+
a7: "#ffab2567",
|
|
1475
|
+
a8: "#ffae3587",
|
|
1476
|
+
a9: "#ffc53d",
|
|
1477
|
+
a10: "#ffd60a",
|
|
1478
|
+
a11: "#ffca16",
|
|
1479
|
+
a12: "#ffe7b3",
|
|
1480
|
+
contrast: "#21201c",
|
|
1481
|
+
surface: "#271f1380",
|
|
1482
|
+
indicator: "#ffc53d",
|
|
1483
|
+
track: "#ffc53d"
|
|
1484
|
+
}
|
|
1485
|
+
};
|
|
1486
|
+
|
|
1487
|
+
const yellow = {
|
|
1488
|
+
light: {
|
|
1489
|
+
1: "#fdfdf9",
|
|
1490
|
+
2: "#fefce9",
|
|
1491
|
+
3: "#fffab8",
|
|
1492
|
+
4: "#fff394",
|
|
1493
|
+
5: "#ffe770",
|
|
1494
|
+
6: "#f3d768",
|
|
1495
|
+
7: "#e4c767",
|
|
1496
|
+
8: "#d5ae39",
|
|
1497
|
+
9: "#ffe629",
|
|
1498
|
+
10: "#ffdc00",
|
|
1499
|
+
11: "#9e6c00",
|
|
1500
|
+
12: "#473b1f",
|
|
1501
|
+
a1: "#aaaa0006",
|
|
1502
|
+
a2: "#f4dd0016",
|
|
1503
|
+
a3: "#ffee0047",
|
|
1504
|
+
a4: "#ffe3016b",
|
|
1505
|
+
a5: "#ffd5008f",
|
|
1506
|
+
a6: "#ebbc0097",
|
|
1507
|
+
a7: "#d2a10098",
|
|
1508
|
+
a8: "#c99700c6",
|
|
1509
|
+
a9: "#ffe100d6",
|
|
1510
|
+
a10: "#ffdc00",
|
|
1511
|
+
a11: "#9e6c00",
|
|
1512
|
+
a12: "#2e2000e0",
|
|
1513
|
+
contrast: "#21201c",
|
|
1514
|
+
surface: "#fefbe4cc",
|
|
1515
|
+
indicator: "#ffe629",
|
|
1516
|
+
track: "#ffe629"
|
|
1517
|
+
},
|
|
1518
|
+
dark: {
|
|
1519
|
+
1: "#14120b",
|
|
1520
|
+
2: "#1b180f",
|
|
1521
|
+
3: "#2d2305",
|
|
1522
|
+
4: "#362b00",
|
|
1523
|
+
5: "#433500",
|
|
1524
|
+
6: "#524202",
|
|
1525
|
+
7: "#665417",
|
|
1526
|
+
8: "#836a21",
|
|
1527
|
+
9: "#ffe629",
|
|
1528
|
+
10: "#ffff57",
|
|
1529
|
+
11: "#f5e147",
|
|
1530
|
+
12: "#f6eeb4",
|
|
1531
|
+
a1: "#d1510004",
|
|
1532
|
+
a2: "#f9b4000b",
|
|
1533
|
+
a3: "#ffaa001e",
|
|
1534
|
+
a4: "#fdb70028",
|
|
1535
|
+
a5: "#febb0036",
|
|
1536
|
+
a6: "#fec40046",
|
|
1537
|
+
a7: "#fdcb225c",
|
|
1538
|
+
a8: "#fdca327b",
|
|
1539
|
+
a9: "#ffe629",
|
|
1540
|
+
a10: "#ffff57",
|
|
1541
|
+
a11: "#fee949f5",
|
|
1542
|
+
a12: "#fef6baf6",
|
|
1543
|
+
contrast: "#21201c",
|
|
1544
|
+
surface: "#231f1380",
|
|
1545
|
+
indicator: "#ffe629",
|
|
1546
|
+
track: "#ffe629"
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
const lime = {
|
|
1551
|
+
light: {
|
|
1552
|
+
1: "#fcfdfa",
|
|
1553
|
+
2: "#f8faf3",
|
|
1554
|
+
3: "#eef6d6",
|
|
1555
|
+
4: "#e2f0bd",
|
|
1556
|
+
5: "#d3e7a6",
|
|
1557
|
+
6: "#c2da91",
|
|
1558
|
+
7: "#abc978",
|
|
1559
|
+
8: "#8db654",
|
|
1560
|
+
9: "#bdee63",
|
|
1561
|
+
10: "#b0e64c",
|
|
1562
|
+
11: "#5c7c2f",
|
|
1563
|
+
12: "#37401c",
|
|
1564
|
+
a1: "#66990005",
|
|
1565
|
+
a2: "#6b95000c",
|
|
1566
|
+
a3: "#96c80029",
|
|
1567
|
+
a4: "#8fc60042",
|
|
1568
|
+
a5: "#81bb0059",
|
|
1569
|
+
a6: "#72aa006e",
|
|
1570
|
+
a7: "#61990087",
|
|
1571
|
+
a8: "#559200ab",
|
|
1572
|
+
a9: "#93e4009c",
|
|
1573
|
+
a10: "#8fdc00b3",
|
|
1574
|
+
a11: "#375f00d0",
|
|
1575
|
+
a12: "#1e2900e3",
|
|
1576
|
+
contrast: "#21201c",
|
|
1577
|
+
surface: "#f6f9f0cc",
|
|
1578
|
+
indicator: "#bdee63",
|
|
1579
|
+
track: "#bdee63"
|
|
1580
|
+
},
|
|
1581
|
+
dark: {
|
|
1582
|
+
1: "#11130c",
|
|
1583
|
+
2: "#151a10",
|
|
1584
|
+
3: "#1f2917",
|
|
1585
|
+
4: "#29371d",
|
|
1586
|
+
5: "#334423",
|
|
1587
|
+
6: "#3d522a",
|
|
1588
|
+
7: "#496231",
|
|
1589
|
+
8: "#577538",
|
|
1590
|
+
9: "#bdee63",
|
|
1591
|
+
10: "#d4ff70",
|
|
1592
|
+
11: "#bde56c",
|
|
1593
|
+
12: "#e3f7ba",
|
|
1594
|
+
a1: "#11bb0003",
|
|
1595
|
+
a2: "#78f7000a",
|
|
1596
|
+
a3: "#9bfd4c1a",
|
|
1597
|
+
a4: "#a7fe5c29",
|
|
1598
|
+
a5: "#affe6537",
|
|
1599
|
+
a6: "#b2fe6d46",
|
|
1600
|
+
a7: "#b6ff6f57",
|
|
1601
|
+
a8: "#b6fd6d6c",
|
|
1602
|
+
a9: "#caff69ed",
|
|
1603
|
+
a10: "#d4ff70",
|
|
1604
|
+
a11: "#d1fe77e4",
|
|
1605
|
+
a12: "#e9febff7",
|
|
1606
|
+
contrast: "#21201c",
|
|
1607
|
+
surface: "#1b211580",
|
|
1608
|
+
indicator: "#bdee63",
|
|
1609
|
+
track: "#bdee63"
|
|
1610
|
+
}
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
const mint = {
|
|
1614
|
+
light: {
|
|
1615
|
+
1: "#f9fefd",
|
|
1616
|
+
2: "#f2fbf9",
|
|
1617
|
+
3: "#ddf9f2",
|
|
1618
|
+
4: "#c8f4e9",
|
|
1619
|
+
5: "#b3ecde",
|
|
1620
|
+
6: "#9ce0d0",
|
|
1621
|
+
7: "#7ecfbd",
|
|
1622
|
+
8: "#4cbba5",
|
|
1623
|
+
9: "#86ead4",
|
|
1624
|
+
10: "#7de0cb",
|
|
1625
|
+
11: "#027864",
|
|
1626
|
+
12: "#16433c",
|
|
1627
|
+
a1: "#00d5aa06",
|
|
1628
|
+
a2: "#00b18a0d",
|
|
1629
|
+
a3: "#00d29e22",
|
|
1630
|
+
a4: "#00cc9937",
|
|
1631
|
+
a5: "#00c0914c",
|
|
1632
|
+
a6: "#00b08663",
|
|
1633
|
+
a7: "#00a17d81",
|
|
1634
|
+
a8: "#009e7fb3",
|
|
1635
|
+
a9: "#00d3a579",
|
|
1636
|
+
a10: "#00c39982",
|
|
1637
|
+
a11: "#007763fd",
|
|
1638
|
+
a12: "#00312ae9",
|
|
1639
|
+
contrast: "#21201c",
|
|
1640
|
+
surface: "#effaf8cc",
|
|
1641
|
+
indicator: "#86ead4",
|
|
1642
|
+
track: "#86ead4"
|
|
1643
|
+
},
|
|
1644
|
+
dark: {
|
|
1645
|
+
1: "#0e1515",
|
|
1646
|
+
2: "#0f1b1b",
|
|
1647
|
+
3: "#092c2b",
|
|
1648
|
+
4: "#003a38",
|
|
1649
|
+
5: "#004744",
|
|
1650
|
+
6: "#105650",
|
|
1651
|
+
7: "#1e685f",
|
|
1652
|
+
8: "#277f70",
|
|
1653
|
+
9: "#86ead4",
|
|
1654
|
+
10: "#a8f5e5",
|
|
1655
|
+
11: "#58d5ba",
|
|
1656
|
+
12: "#c4f5e1",
|
|
1657
|
+
a1: "#00dede05",
|
|
1658
|
+
a2: "#00f9f90b",
|
|
1659
|
+
a3: "#00fff61d",
|
|
1660
|
+
a4: "#00fff42c",
|
|
1661
|
+
a5: "#00fff23a",
|
|
1662
|
+
a6: "#0effeb4a",
|
|
1663
|
+
a7: "#34fde55e",
|
|
1664
|
+
a8: "#41ffdf76",
|
|
1665
|
+
a9: "#92ffe7e9",
|
|
1666
|
+
a10: "#aefeedf5",
|
|
1667
|
+
a11: "#67ffded2",
|
|
1668
|
+
a12: "#cbfee9f5",
|
|
1669
|
+
contrast: "#21201c",
|
|
1670
|
+
surface: "#15272780",
|
|
1671
|
+
indicator: "#86ead4",
|
|
1672
|
+
track: "#86ead4"
|
|
1673
|
+
}
|
|
1674
|
+
};
|
|
1675
|
+
|
|
1676
|
+
const sky = {
|
|
1677
|
+
light: {
|
|
1678
|
+
1: "#f9feff",
|
|
1679
|
+
2: "#f1fafd",
|
|
1680
|
+
3: "#e1f6fd",
|
|
1681
|
+
4: "#d1f0fa",
|
|
1682
|
+
5: "#bee7f5",
|
|
1683
|
+
6: "#a9daed",
|
|
1684
|
+
7: "#8dcae3",
|
|
1685
|
+
8: "#60b3d7",
|
|
1686
|
+
9: "#7ce2fe",
|
|
1687
|
+
10: "#74daf8",
|
|
1688
|
+
11: "#00749e",
|
|
1689
|
+
12: "#1d3e56",
|
|
1690
|
+
a1: "#00d5ff06",
|
|
1691
|
+
a2: "#00a4db0e",
|
|
1692
|
+
a3: "#00b3ee1e",
|
|
1693
|
+
a4: "#00ace42e",
|
|
1694
|
+
a5: "#00a1d841",
|
|
1695
|
+
a6: "#0092ca56",
|
|
1696
|
+
a7: "#0089c172",
|
|
1697
|
+
a8: "#0085bf9f",
|
|
1698
|
+
a9: "#00c7fe83",
|
|
1699
|
+
a10: "#00bcf38b",
|
|
1700
|
+
a11: "#00749e",
|
|
1701
|
+
a12: "#002540e2",
|
|
1702
|
+
contrast: "#21201c",
|
|
1703
|
+
surface: "#eef9fdcc",
|
|
1704
|
+
indicator: "#7ce2fe",
|
|
1705
|
+
track: "#7ce2fe"
|
|
1706
|
+
},
|
|
1707
|
+
dark: {
|
|
1708
|
+
1: "#0d141f",
|
|
1709
|
+
2: "#111a27",
|
|
1710
|
+
3: "#112840",
|
|
1711
|
+
4: "#113555",
|
|
1712
|
+
5: "#154467",
|
|
1713
|
+
6: "#1b537b",
|
|
1714
|
+
7: "#1f6692",
|
|
1715
|
+
8: "#197cae",
|
|
1716
|
+
9: "#7ce2fe",
|
|
1717
|
+
10: "#a8eeff",
|
|
1718
|
+
11: "#75c7f0",
|
|
1719
|
+
12: "#c2f3ff",
|
|
1720
|
+
a1: "#0044ff0f",
|
|
1721
|
+
a2: "#1171fb18",
|
|
1722
|
+
a3: "#1184fc33",
|
|
1723
|
+
a4: "#128fff49",
|
|
1724
|
+
a5: "#1c9dfd5d",
|
|
1725
|
+
a6: "#28a5ff72",
|
|
1726
|
+
a7: "#2badfe8b",
|
|
1727
|
+
a8: "#1db2fea9",
|
|
1728
|
+
a9: "#7ce3fffe",
|
|
1729
|
+
a10: "#a8eeff",
|
|
1730
|
+
a11: "#7cd3ffef",
|
|
1731
|
+
a12: "#c2f3ff",
|
|
1732
|
+
contrast: "#21201c",
|
|
1733
|
+
surface: "#13233b80",
|
|
1734
|
+
indicator: "#7ce2fe",
|
|
1735
|
+
track: "#7ce2fe"
|
|
1736
|
+
}
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
const gray = {
|
|
1740
|
+
light: {
|
|
1741
|
+
1: "#fcfcfc",
|
|
1742
|
+
2: "#f9f9f9",
|
|
1743
|
+
3: "#f0f0f0",
|
|
1744
|
+
4: "#e8e8e8",
|
|
1745
|
+
5: "#e0e0e0",
|
|
1746
|
+
6: "#d9d9d9",
|
|
1747
|
+
7: "#cecece",
|
|
1748
|
+
8: "#bbbbbb",
|
|
1749
|
+
9: "#8d8d8d",
|
|
1750
|
+
10: "#838383",
|
|
1751
|
+
11: "#646464",
|
|
1752
|
+
12: "#202020",
|
|
1753
|
+
a1: "#00000003",
|
|
1754
|
+
a2: "#00000006",
|
|
1755
|
+
a3: "#0000000f",
|
|
1756
|
+
a4: "#00000017",
|
|
1757
|
+
a5: "#0000001f",
|
|
1758
|
+
a6: "#00000026",
|
|
1759
|
+
a7: "#00000031",
|
|
1760
|
+
a8: "#00000044",
|
|
1761
|
+
a9: "#00000072",
|
|
1762
|
+
a10: "#0000007c",
|
|
1763
|
+
a11: "#0000009b",
|
|
1764
|
+
a12: "#000000df",
|
|
1765
|
+
contrast: "#ffffff",
|
|
1766
|
+
surface: "#ffffffcc",
|
|
1767
|
+
indicator: "#8d8d8d",
|
|
1768
|
+
track: "#8d8d8d"
|
|
1769
|
+
},
|
|
1770
|
+
dark: {
|
|
1771
|
+
1: "#111111",
|
|
1772
|
+
2: "#191919",
|
|
1773
|
+
3: "#222222",
|
|
1774
|
+
4: "#2a2a2a",
|
|
1775
|
+
5: "#313131",
|
|
1776
|
+
6: "#3a3a3a",
|
|
1777
|
+
7: "#484848",
|
|
1778
|
+
8: "#606060",
|
|
1779
|
+
9: "#6e6e6e",
|
|
1780
|
+
10: "#7b7b7b",
|
|
1781
|
+
11: "#b4b4b4",
|
|
1782
|
+
12: "#eeeeee",
|
|
1783
|
+
a1: "#00000000",
|
|
1784
|
+
a2: "#ffffff09",
|
|
1785
|
+
a3: "#ffffff12",
|
|
1786
|
+
a4: "#ffffff1b",
|
|
1787
|
+
a5: "#ffffff22",
|
|
1788
|
+
a6: "#ffffff2c",
|
|
1789
|
+
a7: "#ffffff3b",
|
|
1790
|
+
a8: "#ffffff55",
|
|
1791
|
+
a9: "#ffffff64",
|
|
1792
|
+
a10: "#ffffff72",
|
|
1793
|
+
a11: "#ffffffaf",
|
|
1794
|
+
a12: "#ffffffed",
|
|
1795
|
+
contrast: "#ffffff",
|
|
1796
|
+
surface: "#21212180",
|
|
1797
|
+
indicator: "#6e6e6e",
|
|
1798
|
+
track: "#6e6e6e"
|
|
1799
|
+
}
|
|
1800
|
+
};
|
|
1801
|
+
|
|
1802
|
+
const mauve = {
|
|
1803
|
+
light: {
|
|
1804
|
+
1: "#fdfcfd",
|
|
1805
|
+
2: "#faf9fb",
|
|
1806
|
+
3: "#f2eff3",
|
|
1807
|
+
4: "#eae7ec",
|
|
1808
|
+
5: "#e3dfe6",
|
|
1809
|
+
6: "#dbd8e0",
|
|
1810
|
+
7: "#d0cdd7",
|
|
1811
|
+
8: "#bcbac7",
|
|
1812
|
+
9: "#8e8c99",
|
|
1813
|
+
10: "#84828e",
|
|
1814
|
+
11: "#65636d",
|
|
1815
|
+
12: "#211f26",
|
|
1816
|
+
a1: "#55005503",
|
|
1817
|
+
a2: "#2b005506",
|
|
1818
|
+
a3: "#30004010",
|
|
1819
|
+
a4: "#20003618",
|
|
1820
|
+
a5: "#20003820",
|
|
1821
|
+
a6: "#14003527",
|
|
1822
|
+
a7: "#10003332",
|
|
1823
|
+
a8: "#08003145",
|
|
1824
|
+
a9: "#05001d73",
|
|
1825
|
+
a10: "#0500197d",
|
|
1826
|
+
a11: "#0400119c",
|
|
1827
|
+
a12: "#020008e0",
|
|
1828
|
+
contrast: "#ffffff",
|
|
1829
|
+
surface: "#ffffffcc",
|
|
1830
|
+
indicator: "#8e8c99",
|
|
1831
|
+
track: "#8e8c99"
|
|
1832
|
+
},
|
|
1833
|
+
dark: {
|
|
1834
|
+
1: "#121113",
|
|
1835
|
+
2: "#1a191b",
|
|
1836
|
+
3: "#232225",
|
|
1837
|
+
4: "#2b292d",
|
|
1838
|
+
5: "#323035",
|
|
1839
|
+
6: "#3c393f",
|
|
1840
|
+
7: "#49474e",
|
|
1841
|
+
8: "#625f69",
|
|
1842
|
+
9: "#6f6d78",
|
|
1843
|
+
10: "#7c7a85",
|
|
1844
|
+
11: "#b5b2bc",
|
|
1845
|
+
12: "#eeeef0",
|
|
1846
|
+
a1: "#00000000",
|
|
1847
|
+
a2: "#f5f4f609",
|
|
1848
|
+
a3: "#ebeaf814",
|
|
1849
|
+
a4: "#eee5f81d",
|
|
1850
|
+
a5: "#efe6fe25",
|
|
1851
|
+
a6: "#f1e6fd30",
|
|
1852
|
+
a7: "#eee9ff40",
|
|
1853
|
+
a8: "#eee7ff5d",
|
|
1854
|
+
a9: "#eae6fd6e",
|
|
1855
|
+
a10: "#ece9fd7c",
|
|
1856
|
+
a11: "#f5f1ffb7",
|
|
1857
|
+
a12: "#fdfdffef",
|
|
1858
|
+
contrast: "#ffffff",
|
|
1859
|
+
surface: "#22212380",
|
|
1860
|
+
indicator: "#6f6d78",
|
|
1861
|
+
track: "#6f6d78"
|
|
1862
|
+
}
|
|
1863
|
+
};
|
|
1864
|
+
|
|
1865
|
+
const slate = {
|
|
1866
|
+
light: {
|
|
1867
|
+
1: "#fcfcfd",
|
|
1868
|
+
2: "#f9f9fb",
|
|
1869
|
+
3: "#f0f0f3",
|
|
1870
|
+
4: "#e8e8ec",
|
|
1871
|
+
5: "#e0e1e6",
|
|
1872
|
+
6: "#d9d9e0",
|
|
1873
|
+
7: "#cdced6",
|
|
1874
|
+
8: "#b9bbc6",
|
|
1875
|
+
9: "#8b8d98",
|
|
1876
|
+
10: "#80838d",
|
|
1877
|
+
11: "#60646c",
|
|
1878
|
+
12: "#1c2024",
|
|
1879
|
+
a1: "#00005503",
|
|
1880
|
+
a2: "#00005506",
|
|
1881
|
+
a3: "#0000330f",
|
|
1882
|
+
a4: "#00002d17",
|
|
1883
|
+
a5: "#0009321f",
|
|
1884
|
+
a6: "#00002f26",
|
|
1885
|
+
a7: "#00062e32",
|
|
1886
|
+
a8: "#00083046",
|
|
1887
|
+
a9: "#00051d74",
|
|
1888
|
+
a10: "#00071b7f",
|
|
1889
|
+
a11: "#0007149f",
|
|
1890
|
+
a12: "#000509e3",
|
|
1891
|
+
contrast: "#ffffff",
|
|
1892
|
+
surface: "#ffffffcc",
|
|
1893
|
+
indicator: "#8b8d98",
|
|
1894
|
+
track: "#8b8d98"
|
|
1895
|
+
},
|
|
1896
|
+
dark: {
|
|
1897
|
+
1: "#111113",
|
|
1898
|
+
2: "#18191b",
|
|
1899
|
+
3: "#212225",
|
|
1900
|
+
4: "#272a2d",
|
|
1901
|
+
5: "#2e3135",
|
|
1902
|
+
6: "#363a3f",
|
|
1903
|
+
7: "#43484e",
|
|
1904
|
+
8: "#5a6169",
|
|
1905
|
+
9: "#696e77",
|
|
1906
|
+
10: "#777b84",
|
|
1907
|
+
11: "#b0b4ba",
|
|
1908
|
+
12: "#edeef0",
|
|
1909
|
+
a1: "#00000000",
|
|
1910
|
+
a2: "#d8f4f609",
|
|
1911
|
+
a3: "#ddeaf814",
|
|
1912
|
+
a4: "#d3edf81d",
|
|
1913
|
+
a5: "#d9edfe25",
|
|
1914
|
+
a6: "#d6ebfd30",
|
|
1915
|
+
a7: "#d9edff40",
|
|
1916
|
+
a8: "#d9edff5d",
|
|
1917
|
+
a9: "#dfebfd6d",
|
|
1918
|
+
a10: "#e5edfd7b",
|
|
1919
|
+
a11: "#f1f7feb5",
|
|
1920
|
+
a12: "#fcfdffef",
|
|
1921
|
+
contrast: "#ffffff",
|
|
1922
|
+
surface: "#1f212380",
|
|
1923
|
+
indicator: "#696e77",
|
|
1924
|
+
track: "#696e77"
|
|
1925
|
+
}
|
|
1926
|
+
};
|
|
1927
|
+
|
|
1928
|
+
const sage = {
|
|
1929
|
+
light: {
|
|
1930
|
+
1: "#fbfdfc",
|
|
1931
|
+
2: "#f7f9f8",
|
|
1932
|
+
3: "#eef1f0",
|
|
1933
|
+
4: "#e6e9e8",
|
|
1934
|
+
5: "#dfe2e0",
|
|
1935
|
+
6: "#d7dad9",
|
|
1936
|
+
7: "#cbcfcd",
|
|
1937
|
+
8: "#b8bcba",
|
|
1938
|
+
9: "#868e8b",
|
|
1939
|
+
10: "#7c8481",
|
|
1940
|
+
11: "#5f6563",
|
|
1941
|
+
12: "#1a211e",
|
|
1942
|
+
a1: "#00804004",
|
|
1943
|
+
a2: "#00402008",
|
|
1944
|
+
a3: "#002d1e11",
|
|
1945
|
+
a4: "#001f1519",
|
|
1946
|
+
a5: "#00180820",
|
|
1947
|
+
a6: "#00140d28",
|
|
1948
|
+
a7: "#00140a34",
|
|
1949
|
+
a8: "#000f0847",
|
|
1950
|
+
a9: "#00110b79",
|
|
1951
|
+
a10: "#00100a83",
|
|
1952
|
+
a11: "#000a07a0",
|
|
1953
|
+
a12: "#000805e5",
|
|
1954
|
+
contrast: "#ffffff",
|
|
1955
|
+
surface: "#ffffffcc",
|
|
1956
|
+
indicator: "#868e8b",
|
|
1957
|
+
track: "#868e8b"
|
|
1958
|
+
},
|
|
1959
|
+
dark: {
|
|
1960
|
+
1: "#101211",
|
|
1961
|
+
2: "#171918",
|
|
1962
|
+
3: "#202221",
|
|
1963
|
+
4: "#272a29",
|
|
1964
|
+
5: "#2e3130",
|
|
1965
|
+
6: "#373b39",
|
|
1966
|
+
7: "#444947",
|
|
1967
|
+
8: "#5b625f",
|
|
1968
|
+
9: "#63706b",
|
|
1969
|
+
10: "#717d79",
|
|
1970
|
+
11: "#adb5b2",
|
|
1971
|
+
12: "#eceeed",
|
|
1972
|
+
a1: "#00000000",
|
|
1973
|
+
a2: "#f0f2f108",
|
|
1974
|
+
a3: "#f3f5f412",
|
|
1975
|
+
a4: "#f2fefd1a",
|
|
1976
|
+
a5: "#f1fbfa22",
|
|
1977
|
+
a6: "#edfbf42d",
|
|
1978
|
+
a7: "#edfcf73c",
|
|
1979
|
+
a8: "#ebfdf657",
|
|
1980
|
+
a9: "#dffdf266",
|
|
1981
|
+
a10: "#e5fdf674",
|
|
1982
|
+
a11: "#f4fefbb0",
|
|
1983
|
+
a12: "#fdfffeed",
|
|
1984
|
+
contrast: "#ffffff",
|
|
1985
|
+
surface: "#1e201f80",
|
|
1986
|
+
indicator: "#63706b",
|
|
1987
|
+
track: "#63706b"
|
|
1988
|
+
}
|
|
1989
|
+
};
|
|
1990
|
+
|
|
1991
|
+
const olive = {
|
|
1992
|
+
light: {
|
|
1993
|
+
1: "#fcfdfc",
|
|
1994
|
+
2: "#f8faf8",
|
|
1995
|
+
3: "#eff1ef",
|
|
1996
|
+
4: "#e7e9e7",
|
|
1997
|
+
5: "#dfe2df",
|
|
1998
|
+
6: "#d7dad7",
|
|
1999
|
+
7: "#cccfcc",
|
|
2000
|
+
8: "#b9bcb8",
|
|
2001
|
+
9: "#898e87",
|
|
2002
|
+
10: "#7f847d",
|
|
2003
|
+
11: "#60655f",
|
|
2004
|
+
12: "#1d211c",
|
|
2005
|
+
a1: "#00550003",
|
|
2006
|
+
a2: "#00490007",
|
|
2007
|
+
a3: "#00200010",
|
|
2008
|
+
a4: "#00160018",
|
|
2009
|
+
a5: "#00180020",
|
|
2010
|
+
a6: "#00140028",
|
|
2011
|
+
a7: "#000f0033",
|
|
2012
|
+
a8: "#040f0047",
|
|
2013
|
+
a9: "#050f0078",
|
|
2014
|
+
a10: "#040e0082",
|
|
2015
|
+
a11: "#020a00a0",
|
|
2016
|
+
a12: "#010600e3",
|
|
2017
|
+
contrast: "#ffffff",
|
|
2018
|
+
surface: "#ffffffcc",
|
|
2019
|
+
indicator: "#898e87",
|
|
2020
|
+
track: "#898e87"
|
|
2021
|
+
},
|
|
2022
|
+
dark: {
|
|
2023
|
+
1: "#111210",
|
|
2024
|
+
2: "#181917",
|
|
2025
|
+
3: "#212220",
|
|
2026
|
+
4: "#282a27",
|
|
2027
|
+
5: "#2f312e",
|
|
2028
|
+
6: "#383a36",
|
|
2029
|
+
7: "#454843",
|
|
2030
|
+
8: "#5c625b",
|
|
2031
|
+
9: "#687066",
|
|
2032
|
+
10: "#767d74",
|
|
2033
|
+
11: "#afb5ad",
|
|
2034
|
+
12: "#eceeec",
|
|
2035
|
+
a1: "#00000000",
|
|
2036
|
+
a2: "#f1f2f008",
|
|
2037
|
+
a3: "#f4f5f312",
|
|
2038
|
+
a4: "#f3fef21a",
|
|
2039
|
+
a5: "#f2fbf122",
|
|
2040
|
+
a6: "#f4faed2c",
|
|
2041
|
+
a7: "#f2fced3b",
|
|
2042
|
+
a8: "#edfdeb57",
|
|
2043
|
+
a9: "#ebfde766",
|
|
2044
|
+
a10: "#f0fdec74",
|
|
2045
|
+
a11: "#f6fef4b0",
|
|
2046
|
+
a12: "#fdfffded",
|
|
2047
|
+
contrast: "#ffffff",
|
|
2048
|
+
surface: "#1f201e80",
|
|
2049
|
+
indicator: "#687066",
|
|
2050
|
+
track: "#687066"
|
|
2051
|
+
}
|
|
2052
|
+
};
|
|
2053
|
+
|
|
2054
|
+
const sand = {
|
|
2055
|
+
light: {
|
|
2056
|
+
1: "#fdfdfc",
|
|
2057
|
+
2: "#f9f9f8",
|
|
2058
|
+
3: "#f1f0ef",
|
|
2059
|
+
4: "#e9e8e6",
|
|
2060
|
+
5: "#e2e1de",
|
|
2061
|
+
6: "#dad9d6",
|
|
2062
|
+
7: "#cfceca",
|
|
2063
|
+
8: "#bcbbb5",
|
|
2064
|
+
9: "#8d8d86",
|
|
2065
|
+
10: "#82827c",
|
|
2066
|
+
11: "#63635e",
|
|
2067
|
+
12: "#21201c",
|
|
2068
|
+
a1: "#55550003",
|
|
2069
|
+
a2: "#25250007",
|
|
2070
|
+
a3: "#20100010",
|
|
2071
|
+
a4: "#1f150019",
|
|
2072
|
+
a5: "#1f180021",
|
|
2073
|
+
a6: "#19130029",
|
|
2074
|
+
a7: "#19140035",
|
|
2075
|
+
a8: "#1915014a",
|
|
2076
|
+
a9: "#0f0f0079",
|
|
2077
|
+
a10: "#0c0c0083",
|
|
2078
|
+
a11: "#080800a1",
|
|
2079
|
+
a12: "#060500e3",
|
|
2080
|
+
contrast: "#ffffff",
|
|
2081
|
+
surface: "#ffffffcc",
|
|
2082
|
+
indicator: "#8d8d86",
|
|
2083
|
+
track: "#8d8d86"
|
|
2084
|
+
},
|
|
2085
|
+
dark: {
|
|
2086
|
+
1: "#111110",
|
|
2087
|
+
2: "#191918",
|
|
2088
|
+
3: "#222221",
|
|
2089
|
+
4: "#2a2a28",
|
|
2090
|
+
5: "#31312e",
|
|
2091
|
+
6: "#3b3a37",
|
|
2092
|
+
7: "#494844",
|
|
2093
|
+
8: "#62605b",
|
|
2094
|
+
9: "#6f6d66",
|
|
2095
|
+
10: "#7c7b74",
|
|
2096
|
+
11: "#b5b3ad",
|
|
2097
|
+
12: "#eeeeec",
|
|
2098
|
+
a1: "#00000000",
|
|
2099
|
+
a2: "#f4f4f309",
|
|
2100
|
+
a3: "#f6f6f513",
|
|
2101
|
+
a4: "#fefef31b",
|
|
2102
|
+
a5: "#fbfbeb23",
|
|
2103
|
+
a6: "#fffaed2d",
|
|
2104
|
+
a7: "#fffbed3c",
|
|
2105
|
+
a8: "#fff9eb57",
|
|
2106
|
+
a9: "#fffae965",
|
|
2107
|
+
a10: "#fffdee73",
|
|
2108
|
+
a11: "#fffcf4b0",
|
|
2109
|
+
a12: "#fffffded",
|
|
2110
|
+
contrast: "#ffffff",
|
|
2111
|
+
surface: "#21212080",
|
|
2112
|
+
indicator: "#6f6d66",
|
|
2113
|
+
track: "#6f6d66"
|
|
2114
|
+
}
|
|
2115
|
+
};
|
|
2116
|
+
|
|
2117
|
+
const colorMap = {
|
|
2118
|
+
tomato,
|
|
2119
|
+
red,
|
|
2120
|
+
ruby,
|
|
2121
|
+
crimson,
|
|
2122
|
+
pink,
|
|
2123
|
+
plum,
|
|
2124
|
+
purple,
|
|
2125
|
+
violet,
|
|
2126
|
+
iris,
|
|
2127
|
+
indigo,
|
|
2128
|
+
blue,
|
|
2129
|
+
cyan,
|
|
2130
|
+
teal,
|
|
2131
|
+
jade,
|
|
2132
|
+
green,
|
|
2133
|
+
grass,
|
|
2134
|
+
bronze,
|
|
2135
|
+
gold,
|
|
2136
|
+
brown,
|
|
2137
|
+
orange,
|
|
2138
|
+
amber,
|
|
2139
|
+
yellow,
|
|
2140
|
+
lime,
|
|
2141
|
+
mint,
|
|
2142
|
+
sky,
|
|
2143
|
+
gray,
|
|
2144
|
+
mauve,
|
|
2145
|
+
slate,
|
|
2146
|
+
sage,
|
|
2147
|
+
olive,
|
|
2148
|
+
sand
|
|
2149
|
+
};
|
|
2150
|
+
function resolveColor(color, appearance, accentColor, resolvedGrayColor, colorOverrides) {
|
|
2151
|
+
let colorName;
|
|
2152
|
+
let step;
|
|
2153
|
+
if (color.startsWith("accent-")) {
|
|
2154
|
+
colorName = accentColor;
|
|
2155
|
+
step = color.slice("accent-".length);
|
|
2156
|
+
} else if (color.startsWith("gray-")) {
|
|
2157
|
+
colorName = resolvedGrayColor;
|
|
2158
|
+
step = color.slice("gray-".length);
|
|
2159
|
+
} else {
|
|
2160
|
+
const dashIdx = color.lastIndexOf("-");
|
|
2161
|
+
if (dashIdx <= 0) return color;
|
|
2162
|
+
colorName = color.slice(0, dashIdx);
|
|
2163
|
+
step = color.slice(dashIdx + 1);
|
|
2164
|
+
}
|
|
2165
|
+
if (colorOverrides) {
|
|
2166
|
+
const scaleOverride = colorOverrides[colorName];
|
|
2167
|
+
if (scaleOverride) {
|
|
2168
|
+
const modeOverride = scaleOverride[appearance];
|
|
2169
|
+
if (modeOverride) {
|
|
2170
|
+
const value = modeOverride[step];
|
|
2171
|
+
if (value !== void 0) return value;
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
const scale = colorMap[colorName]?.[appearance];
|
|
2176
|
+
if (!scale) return color;
|
|
2177
|
+
return scale[step] ?? color;
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
function useResolveColor() {
|
|
2181
|
+
const { appearance, accentColor, resolvedGrayColor, colorOverrides } = useThemeContext();
|
|
2182
|
+
return React.useCallback(
|
|
2183
|
+
(color) => resolveColor(color, appearance, accentColor, resolvedGrayColor, colorOverrides),
|
|
2184
|
+
[appearance, accentColor, resolvedGrayColor, colorOverrides]
|
|
2185
|
+
);
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
const scalingMap = {
|
|
2189
|
+
"90%": 0.9,
|
|
2190
|
+
"95%": 0.95,
|
|
2191
|
+
"100%": 1,
|
|
2192
|
+
"105%": 1.05,
|
|
2193
|
+
"110%": 1.1
|
|
2194
|
+
};
|
|
2195
|
+
|
|
2196
|
+
function applyScaling(value, scaling) {
|
|
2197
|
+
return Math.round(value * scalingMap[scaling]);
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
const space = {
|
|
2201
|
+
0: 0,
|
|
2202
|
+
1: 4,
|
|
2203
|
+
2: 8,
|
|
2204
|
+
3: 12,
|
|
2205
|
+
4: 16,
|
|
2206
|
+
5: 24,
|
|
2207
|
+
6: 32,
|
|
2208
|
+
7: 40,
|
|
2209
|
+
8: 48,
|
|
2210
|
+
9: 64
|
|
2211
|
+
};
|
|
2212
|
+
|
|
2213
|
+
function resolveSpace(token, scaling) {
|
|
2214
|
+
if (token === 0) return 0;
|
|
2215
|
+
const sign = token < 0 ? -1 : 1;
|
|
2216
|
+
const abs = Math.abs(token);
|
|
2217
|
+
return sign * Math.round(space[abs] * scalingMap[scaling]);
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
function getClassicEffect(appearance, options) {
|
|
2221
|
+
const isLight = appearance === "light";
|
|
2222
|
+
const pressed = options?.pressed ?? false;
|
|
2223
|
+
const isDisabled = options?.disabled ?? false;
|
|
2224
|
+
if (isDisabled) return {};
|
|
2225
|
+
if (pressed) {
|
|
2226
|
+
return Platform.select({
|
|
2227
|
+
ios: {
|
|
2228
|
+
shadowColor: "transparent",
|
|
2229
|
+
shadowOffset: { width: 0, height: 0 },
|
|
2230
|
+
shadowOpacity: 0,
|
|
2231
|
+
shadowRadius: 0
|
|
2232
|
+
},
|
|
2233
|
+
default: { elevation: 0 }
|
|
2234
|
+
});
|
|
2235
|
+
}
|
|
2236
|
+
return Platform.select({
|
|
2237
|
+
ios: {
|
|
2238
|
+
shadowColor: "#000",
|
|
2239
|
+
shadowOffset: { width: 0, height: 1 },
|
|
2240
|
+
shadowOpacity: isLight ? 0.15 : 0.3,
|
|
2241
|
+
shadowRadius: 2
|
|
2242
|
+
},
|
|
2243
|
+
default: { elevation: 2 }
|
|
2244
|
+
});
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
const BASE_RADIUS = {
|
|
2248
|
+
1: 3,
|
|
2249
|
+
2: 4,
|
|
2250
|
+
3: 6,
|
|
2251
|
+
4: 8,
|
|
2252
|
+
5: 12,
|
|
2253
|
+
6: 16
|
|
2254
|
+
};
|
|
2255
|
+
const RADIUS_FACTOR = {
|
|
2256
|
+
none: 0,
|
|
2257
|
+
small: 0.75,
|
|
2258
|
+
medium: 1,
|
|
2259
|
+
large: 1.5,
|
|
2260
|
+
full: 1.5
|
|
2261
|
+
};
|
|
2262
|
+
const RADIUS_FULL = {
|
|
2263
|
+
none: 0,
|
|
2264
|
+
small: 0,
|
|
2265
|
+
medium: 0,
|
|
2266
|
+
large: 0,
|
|
2267
|
+
full: 9999
|
|
2268
|
+
};
|
|
2269
|
+
function getRadius(token, level) {
|
|
2270
|
+
return Math.round(BASE_RADIUS[level] * RADIUS_FACTOR[token]);
|
|
2271
|
+
}
|
|
2272
|
+
function getFullRadius(token) {
|
|
2273
|
+
return RADIUS_FULL[token];
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
function Box({
|
|
2277
|
+
p,
|
|
2278
|
+
px,
|
|
2279
|
+
py,
|
|
2280
|
+
pt,
|
|
2281
|
+
pr,
|
|
2282
|
+
pb,
|
|
2283
|
+
pl,
|
|
2284
|
+
m,
|
|
2285
|
+
mx,
|
|
2286
|
+
my,
|
|
2287
|
+
mt,
|
|
2288
|
+
mr,
|
|
2289
|
+
mb,
|
|
2290
|
+
ml,
|
|
2291
|
+
width,
|
|
2292
|
+
minWidth,
|
|
2293
|
+
maxWidth,
|
|
2294
|
+
height,
|
|
2295
|
+
minHeight,
|
|
2296
|
+
maxHeight,
|
|
2297
|
+
position,
|
|
2298
|
+
top,
|
|
2299
|
+
right,
|
|
2300
|
+
bottom,
|
|
2301
|
+
left,
|
|
2302
|
+
overflow,
|
|
2303
|
+
flexBasis,
|
|
2304
|
+
flexShrink,
|
|
2305
|
+
flexGrow,
|
|
2306
|
+
bg,
|
|
2307
|
+
radius,
|
|
2308
|
+
style,
|
|
2309
|
+
...rest
|
|
2310
|
+
}) {
|
|
2311
|
+
const { scaling } = useThemeContext();
|
|
2312
|
+
const rc = useResolveColor();
|
|
2313
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2314
|
+
const boxStyle = {
|
|
2315
|
+
// Padding — specific > axis > all
|
|
2316
|
+
paddingTop: sp(pt ?? py ?? p),
|
|
2317
|
+
paddingBottom: sp(pb ?? py ?? p),
|
|
2318
|
+
paddingLeft: sp(pl ?? px ?? p),
|
|
2319
|
+
paddingRight: sp(pr ?? px ?? p),
|
|
2320
|
+
// Margin — specific > axis > all
|
|
2321
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2322
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2323
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2324
|
+
marginRight: sp(mr ?? mx ?? m),
|
|
2325
|
+
// Size
|
|
2326
|
+
width,
|
|
2327
|
+
minWidth,
|
|
2328
|
+
maxWidth,
|
|
2329
|
+
height,
|
|
2330
|
+
minHeight,
|
|
2331
|
+
maxHeight,
|
|
2332
|
+
// Position
|
|
2333
|
+
position,
|
|
2334
|
+
top,
|
|
2335
|
+
right,
|
|
2336
|
+
bottom,
|
|
2337
|
+
left,
|
|
2338
|
+
// Layout
|
|
2339
|
+
overflow,
|
|
2340
|
+
flexBasis,
|
|
2341
|
+
flexShrink,
|
|
2342
|
+
flexGrow,
|
|
2343
|
+
// Theme
|
|
2344
|
+
backgroundColor: bg ? rc(bg) : void 0,
|
|
2345
|
+
borderRadius: radius ? radius === "full" ? getFullRadius(radius) : getRadius(radius, 4) : void 0
|
|
2346
|
+
};
|
|
2347
|
+
return /* @__PURE__ */ React.createElement(View, { style: [boxStyle, style], ...rest });
|
|
2348
|
+
}
|
|
2349
|
+
Box.displayName = "Box";
|
|
2350
|
+
|
|
2351
|
+
const ALIGN_MAP$1 = {
|
|
2352
|
+
start: "flex-start",
|
|
2353
|
+
center: "center",
|
|
2354
|
+
end: "flex-end",
|
|
2355
|
+
baseline: "baseline",
|
|
2356
|
+
stretch: "stretch"
|
|
2357
|
+
};
|
|
2358
|
+
const JUSTIFY_MAP$1 = {
|
|
2359
|
+
start: "flex-start",
|
|
2360
|
+
center: "center",
|
|
2361
|
+
end: "flex-end",
|
|
2362
|
+
between: "space-between"
|
|
2363
|
+
};
|
|
2364
|
+
function Flex({
|
|
2365
|
+
direction,
|
|
2366
|
+
align,
|
|
2367
|
+
justify,
|
|
2368
|
+
wrap,
|
|
2369
|
+
gap,
|
|
2370
|
+
gapX,
|
|
2371
|
+
gapY,
|
|
2372
|
+
p,
|
|
2373
|
+
px,
|
|
2374
|
+
py,
|
|
2375
|
+
pt,
|
|
2376
|
+
pr,
|
|
2377
|
+
pb,
|
|
2378
|
+
pl,
|
|
2379
|
+
m,
|
|
2380
|
+
mx,
|
|
2381
|
+
my,
|
|
2382
|
+
mt,
|
|
2383
|
+
mr,
|
|
2384
|
+
mb,
|
|
2385
|
+
ml,
|
|
2386
|
+
width,
|
|
2387
|
+
minWidth,
|
|
2388
|
+
maxWidth,
|
|
2389
|
+
height,
|
|
2390
|
+
minHeight,
|
|
2391
|
+
maxHeight,
|
|
2392
|
+
position,
|
|
2393
|
+
top,
|
|
2394
|
+
right,
|
|
2395
|
+
bottom,
|
|
2396
|
+
left,
|
|
2397
|
+
overflow,
|
|
2398
|
+
flexBasis,
|
|
2399
|
+
flexShrink,
|
|
2400
|
+
flexGrow,
|
|
2401
|
+
bg,
|
|
2402
|
+
radius,
|
|
2403
|
+
style,
|
|
2404
|
+
...rest
|
|
2405
|
+
}) {
|
|
2406
|
+
const { scaling } = useThemeContext();
|
|
2407
|
+
const rc = useResolveColor();
|
|
2408
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2409
|
+
const flexStyle = {
|
|
2410
|
+
// Flex-specific
|
|
2411
|
+
flexDirection: direction,
|
|
2412
|
+
alignItems: align ? ALIGN_MAP$1[align] : void 0,
|
|
2413
|
+
justifyContent: justify ? JUSTIFY_MAP$1[justify] : void 0,
|
|
2414
|
+
flexWrap: wrap,
|
|
2415
|
+
rowGap: sp(gapY ?? gap),
|
|
2416
|
+
columnGap: sp(gapX ?? gap),
|
|
2417
|
+
// Padding — specific > axis > all
|
|
2418
|
+
paddingTop: sp(pt ?? py ?? p),
|
|
2419
|
+
paddingBottom: sp(pb ?? py ?? p),
|
|
2420
|
+
paddingLeft: sp(pl ?? px ?? p),
|
|
2421
|
+
paddingRight: sp(pr ?? px ?? p),
|
|
2422
|
+
// Margin — specific > axis > all
|
|
2423
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2424
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2425
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2426
|
+
marginRight: sp(mr ?? mx ?? m),
|
|
2427
|
+
// Size
|
|
2428
|
+
width,
|
|
2429
|
+
minWidth,
|
|
2430
|
+
maxWidth,
|
|
2431
|
+
height,
|
|
2432
|
+
minHeight,
|
|
2433
|
+
maxHeight,
|
|
2434
|
+
// Position
|
|
2435
|
+
position,
|
|
2436
|
+
top,
|
|
2437
|
+
right,
|
|
2438
|
+
bottom,
|
|
2439
|
+
left,
|
|
2440
|
+
// Layout
|
|
2441
|
+
overflow,
|
|
2442
|
+
flexBasis,
|
|
2443
|
+
flexShrink,
|
|
2444
|
+
flexGrow,
|
|
2445
|
+
// Theme
|
|
2446
|
+
backgroundColor: bg ? rc(bg) : void 0,
|
|
2447
|
+
borderRadius: radius ? radius === "full" ? getFullRadius(radius) : getRadius(radius, 4) : void 0
|
|
2448
|
+
};
|
|
2449
|
+
return /* @__PURE__ */ React.createElement(View, { style: [flexStyle, style], ...rest });
|
|
2450
|
+
}
|
|
2451
|
+
Flex.displayName = "Flex";
|
|
2452
|
+
|
|
2453
|
+
const ALIGN_MAP = {
|
|
2454
|
+
start: "flex-start",
|
|
2455
|
+
center: "center",
|
|
2456
|
+
end: "flex-end",
|
|
2457
|
+
stretch: "stretch"
|
|
2458
|
+
};
|
|
2459
|
+
const JUSTIFY_MAP = {
|
|
2460
|
+
start: "flex-start",
|
|
2461
|
+
center: "center",
|
|
2462
|
+
end: "flex-end",
|
|
2463
|
+
between: "space-between"
|
|
2464
|
+
};
|
|
2465
|
+
function Grid({
|
|
2466
|
+
columns = 1,
|
|
2467
|
+
gap,
|
|
2468
|
+
gapX,
|
|
2469
|
+
gapY,
|
|
2470
|
+
align,
|
|
2471
|
+
justify,
|
|
2472
|
+
p,
|
|
2473
|
+
px,
|
|
2474
|
+
py,
|
|
2475
|
+
pt,
|
|
2476
|
+
pr,
|
|
2477
|
+
pb,
|
|
2478
|
+
pl,
|
|
2479
|
+
m,
|
|
2480
|
+
mx,
|
|
2481
|
+
my,
|
|
2482
|
+
mt,
|
|
2483
|
+
mr,
|
|
2484
|
+
mb,
|
|
2485
|
+
ml,
|
|
2486
|
+
width,
|
|
2487
|
+
minWidth,
|
|
2488
|
+
maxWidth,
|
|
2489
|
+
height,
|
|
2490
|
+
minHeight,
|
|
2491
|
+
maxHeight,
|
|
2492
|
+
position,
|
|
2493
|
+
top,
|
|
2494
|
+
right,
|
|
2495
|
+
bottom,
|
|
2496
|
+
left,
|
|
2497
|
+
overflow,
|
|
2498
|
+
flexBasis,
|
|
2499
|
+
flexShrink,
|
|
2500
|
+
flexGrow,
|
|
2501
|
+
bg,
|
|
2502
|
+
radius,
|
|
2503
|
+
style,
|
|
2504
|
+
children,
|
|
2505
|
+
onLayout: onLayoutProp,
|
|
2506
|
+
...rest
|
|
2507
|
+
}) {
|
|
2508
|
+
const { scaling } = useThemeContext();
|
|
2509
|
+
const rc = useResolveColor();
|
|
2510
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2511
|
+
const columnGap = sp(gapX ?? gap) ?? 0;
|
|
2512
|
+
const rowGap = sp(gapY ?? gap) ?? 0;
|
|
2513
|
+
const [containerWidth, setContainerWidth] = useState(0);
|
|
2514
|
+
const handleLayout = useCallback(
|
|
2515
|
+
(e) => {
|
|
2516
|
+
setContainerWidth(e.nativeEvent.layout.width);
|
|
2517
|
+
onLayoutProp?.(e);
|
|
2518
|
+
},
|
|
2519
|
+
[onLayoutProp]
|
|
2520
|
+
);
|
|
2521
|
+
const cols = Math.max(1, Math.round(columns));
|
|
2522
|
+
const cellWidth = containerWidth > 0 ? (containerWidth - (cols - 1) * columnGap) / cols : void 0;
|
|
2523
|
+
const containerStyle = {
|
|
2524
|
+
flexDirection: "row",
|
|
2525
|
+
flexWrap: "wrap",
|
|
2526
|
+
alignItems: ALIGN_MAP[align ?? "stretch"],
|
|
2527
|
+
justifyContent: justify ? JUSTIFY_MAP[justify] : void 0,
|
|
2528
|
+
rowGap,
|
|
2529
|
+
columnGap,
|
|
2530
|
+
// Padding
|
|
2531
|
+
paddingTop: sp(pt ?? py ?? p),
|
|
2532
|
+
paddingBottom: sp(pb ?? py ?? p),
|
|
2533
|
+
paddingLeft: sp(pl ?? px ?? p),
|
|
2534
|
+
paddingRight: sp(pr ?? px ?? p),
|
|
2535
|
+
// Margin
|
|
2536
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2537
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2538
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2539
|
+
marginRight: sp(mr ?? mx ?? m),
|
|
2540
|
+
// Size
|
|
2541
|
+
width,
|
|
2542
|
+
minWidth,
|
|
2543
|
+
maxWidth,
|
|
2544
|
+
height,
|
|
2545
|
+
minHeight,
|
|
2546
|
+
maxHeight,
|
|
2547
|
+
// Position
|
|
2548
|
+
position,
|
|
2549
|
+
top,
|
|
2550
|
+
right,
|
|
2551
|
+
bottom,
|
|
2552
|
+
left,
|
|
2553
|
+
// Layout
|
|
2554
|
+
overflow,
|
|
2555
|
+
flexBasis,
|
|
2556
|
+
flexShrink,
|
|
2557
|
+
flexGrow,
|
|
2558
|
+
// Theme
|
|
2559
|
+
backgroundColor: bg ? rc(bg) : void 0,
|
|
2560
|
+
borderRadius: radius ? radius === "full" ? getFullRadius(radius) : getRadius(radius, 4) : void 0
|
|
2561
|
+
};
|
|
2562
|
+
const items = React.Children.toArray(children);
|
|
2563
|
+
return /* @__PURE__ */ React.createElement(View, { style: [containerStyle, style], onLayout: handleLayout, ...rest }, items.map((child, i) => /* @__PURE__ */ React.createElement(View, { key: i, style: { width: cellWidth } }, child)));
|
|
2564
|
+
}
|
|
2565
|
+
Grid.displayName = "Grid";
|
|
2566
|
+
|
|
2567
|
+
const fontSize = {
|
|
2568
|
+
1: 12,
|
|
2569
|
+
2: 14,
|
|
2570
|
+
3: 16,
|
|
2571
|
+
4: 18,
|
|
2572
|
+
5: 20,
|
|
2573
|
+
6: 24,
|
|
2574
|
+
7: 28,
|
|
2575
|
+
8: 35,
|
|
2576
|
+
9: 60
|
|
2577
|
+
};
|
|
2578
|
+
const lineHeight = {
|
|
2579
|
+
1: 16,
|
|
2580
|
+
2: 20,
|
|
2581
|
+
3: 24,
|
|
2582
|
+
4: 26,
|
|
2583
|
+
5: 28,
|
|
2584
|
+
6: 30,
|
|
2585
|
+
7: 36,
|
|
2586
|
+
8: 40,
|
|
2587
|
+
9: 60
|
|
2588
|
+
};
|
|
2589
|
+
const headingLineHeight = {
|
|
2590
|
+
1: 16,
|
|
2591
|
+
2: 18,
|
|
2592
|
+
3: 22,
|
|
2593
|
+
4: 24,
|
|
2594
|
+
5: 26,
|
|
2595
|
+
6: 30,
|
|
2596
|
+
7: 36,
|
|
2597
|
+
8: 40,
|
|
2598
|
+
9: 60
|
|
2599
|
+
};
|
|
2600
|
+
const letterSpacingEm = {
|
|
2601
|
+
1: 25e-4,
|
|
2602
|
+
2: 0,
|
|
2603
|
+
3: 0,
|
|
2604
|
+
4: -25e-4,
|
|
2605
|
+
5: -5e-3,
|
|
2606
|
+
6: -625e-5,
|
|
2607
|
+
7: -75e-4,
|
|
2608
|
+
8: -0.01,
|
|
2609
|
+
9: -0.025
|
|
2610
|
+
};
|
|
2611
|
+
|
|
2612
|
+
const FONT_WEIGHT$4 = {
|
|
2613
|
+
light: "300",
|
|
2614
|
+
regular: "400",
|
|
2615
|
+
medium: "500",
|
|
2616
|
+
bold: "700"
|
|
2617
|
+
};
|
|
2618
|
+
function Text({
|
|
2619
|
+
size = 3,
|
|
2620
|
+
weight,
|
|
2621
|
+
align,
|
|
2622
|
+
truncate,
|
|
2623
|
+
wrap,
|
|
2624
|
+
color,
|
|
2625
|
+
highContrast,
|
|
2626
|
+
m,
|
|
2627
|
+
mx,
|
|
2628
|
+
my,
|
|
2629
|
+
mt,
|
|
2630
|
+
mr,
|
|
2631
|
+
mb,
|
|
2632
|
+
ml,
|
|
2633
|
+
style,
|
|
2634
|
+
...rest
|
|
2635
|
+
}) {
|
|
2636
|
+
const { scaling, fonts } = useThemeContext();
|
|
2637
|
+
const rc = useResolveColor();
|
|
2638
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2639
|
+
const scalingFactor = scalingMap[scaling];
|
|
2640
|
+
const resolvedSize = Math.round(fontSize[size] * scalingFactor);
|
|
2641
|
+
const resolvedLineHeight = Math.round(lineHeight[size] * scalingFactor);
|
|
2642
|
+
const resolvedLetterSpacing = letterSpacingEm[size] * resolvedSize;
|
|
2643
|
+
const textColor = color ? rc(highContrast ? `${color}-12` : `${color}-a11`) : rc("gray-12");
|
|
2644
|
+
const effectiveWeight = weight ?? "regular";
|
|
2645
|
+
const fontFamily = fonts[effectiveWeight] ?? fonts.regular;
|
|
2646
|
+
const numberOfLines = truncate ? 1 : wrap === "nowrap" ? 1 : void 0;
|
|
2647
|
+
const ellipsizeMode = truncate ? "tail" : wrap === "nowrap" ? "clip" : void 0;
|
|
2648
|
+
const textStyle = {
|
|
2649
|
+
fontSize: resolvedSize,
|
|
2650
|
+
lineHeight: resolvedLineHeight,
|
|
2651
|
+
letterSpacing: resolvedLetterSpacing,
|
|
2652
|
+
color: textColor,
|
|
2653
|
+
textAlign: align,
|
|
2654
|
+
fontWeight: weight ? FONT_WEIGHT$4[weight] : void 0,
|
|
2655
|
+
fontFamily,
|
|
2656
|
+
// RN defaults flexShrink to 0; CSS defaults to 1. Without this, text
|
|
2657
|
+
// inside a Flex row overflows instead of wrapping to the available width.
|
|
2658
|
+
flexShrink: 1,
|
|
2659
|
+
// Margins
|
|
2660
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2661
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2662
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2663
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
2664
|
+
};
|
|
2665
|
+
return /* @__PURE__ */ React.createElement(
|
|
2666
|
+
Text$1,
|
|
2667
|
+
{
|
|
2668
|
+
numberOfLines,
|
|
2669
|
+
ellipsizeMode,
|
|
2670
|
+
style: [textStyle, style],
|
|
2671
|
+
...rest
|
|
2672
|
+
}
|
|
2673
|
+
);
|
|
2674
|
+
}
|
|
2675
|
+
Text.displayName = "Text";
|
|
2676
|
+
|
|
2677
|
+
const FONT_WEIGHT$3 = {
|
|
2678
|
+
light: "300",
|
|
2679
|
+
regular: "400",
|
|
2680
|
+
medium: "500",
|
|
2681
|
+
bold: "700"
|
|
2682
|
+
};
|
|
2683
|
+
function Heading({
|
|
2684
|
+
size = 6,
|
|
2685
|
+
weight = "bold",
|
|
2686
|
+
align,
|
|
2687
|
+
truncate,
|
|
2688
|
+
wrap,
|
|
2689
|
+
color,
|
|
2690
|
+
highContrast,
|
|
2691
|
+
m,
|
|
2692
|
+
mx,
|
|
2693
|
+
my,
|
|
2694
|
+
mt,
|
|
2695
|
+
mr,
|
|
2696
|
+
mb,
|
|
2697
|
+
ml,
|
|
2698
|
+
style,
|
|
2699
|
+
children,
|
|
2700
|
+
...rest
|
|
2701
|
+
}) {
|
|
2702
|
+
const { scaling, fonts } = useThemeContext();
|
|
2703
|
+
const rc = useResolveColor();
|
|
2704
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2705
|
+
const scalingFactor = scalingMap[scaling];
|
|
2706
|
+
const resolvedSize = Math.round(fontSize[size] * scalingFactor);
|
|
2707
|
+
const resolvedLineHeight = Math.round(headingLineHeight[size] * scalingFactor);
|
|
2708
|
+
const resolvedLetterSpacing = letterSpacingEm[size] * resolvedSize;
|
|
2709
|
+
const textColor = color ? rc(highContrast ? `${color}-12` : `${color}-a11`) : rc("gray-12");
|
|
2710
|
+
const effectiveWeight = weight ?? "bold";
|
|
2711
|
+
const fontFamily = fonts.heading ?? fonts[effectiveWeight] ?? fonts.bold ?? fonts.regular;
|
|
2712
|
+
const numberOfLines = truncate ? 1 : wrap === "nowrap" ? 1 : void 0;
|
|
2713
|
+
const ellipsizeMode = truncate ? "tail" : wrap === "nowrap" ? "clip" : void 0;
|
|
2714
|
+
const headingStyle = {
|
|
2715
|
+
fontSize: resolvedSize,
|
|
2716
|
+
lineHeight: resolvedLineHeight,
|
|
2717
|
+
letterSpacing: resolvedLetterSpacing,
|
|
2718
|
+
color: textColor,
|
|
2719
|
+
textAlign: align,
|
|
2720
|
+
fontWeight: FONT_WEIGHT$3[weight],
|
|
2721
|
+
fontFamily,
|
|
2722
|
+
// RN defaults flexShrink to 0; CSS defaults to 1. Without this, text
|
|
2723
|
+
// inside a Flex row overflows instead of wrapping to the available width.
|
|
2724
|
+
flexShrink: 1,
|
|
2725
|
+
// Margins
|
|
2726
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2727
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2728
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2729
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
2730
|
+
};
|
|
2731
|
+
return /* @__PURE__ */ React.createElement(
|
|
2732
|
+
Text$1,
|
|
2733
|
+
{
|
|
2734
|
+
accessibilityRole: "header",
|
|
2735
|
+
numberOfLines,
|
|
2736
|
+
ellipsizeMode,
|
|
2737
|
+
style: [headingStyle, style],
|
|
2738
|
+
...rest
|
|
2739
|
+
},
|
|
2740
|
+
children
|
|
2741
|
+
);
|
|
2742
|
+
}
|
|
2743
|
+
Heading.displayName = "Heading";
|
|
2744
|
+
|
|
2745
|
+
const FONT_WEIGHT$2 = {
|
|
2746
|
+
light: "300",
|
|
2747
|
+
regular: "400",
|
|
2748
|
+
medium: "500",
|
|
2749
|
+
bold: "700"
|
|
2750
|
+
};
|
|
2751
|
+
function Link({
|
|
2752
|
+
size = 3,
|
|
2753
|
+
weight,
|
|
2754
|
+
truncate,
|
|
2755
|
+
wrap,
|
|
2756
|
+
underline = "auto",
|
|
2757
|
+
color,
|
|
2758
|
+
highContrast,
|
|
2759
|
+
href,
|
|
2760
|
+
onPress,
|
|
2761
|
+
m,
|
|
2762
|
+
mx,
|
|
2763
|
+
my,
|
|
2764
|
+
mt,
|
|
2765
|
+
mr,
|
|
2766
|
+
mb,
|
|
2767
|
+
ml,
|
|
2768
|
+
style,
|
|
2769
|
+
...rest
|
|
2770
|
+
}) {
|
|
2771
|
+
const { scaling, fonts } = useThemeContext();
|
|
2772
|
+
const rc = useResolveColor();
|
|
2773
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2774
|
+
const scalingFactor = scalingMap[scaling];
|
|
2775
|
+
const resolvedSize = Math.round(fontSize[size] * scalingFactor);
|
|
2776
|
+
const resolvedLineHeight = Math.round(lineHeight[size] * scalingFactor);
|
|
2777
|
+
const resolvedLetterSpacing = letterSpacingEm[size] * resolvedSize;
|
|
2778
|
+
const prefix = color ?? "accent";
|
|
2779
|
+
const isGray = color === "gray";
|
|
2780
|
+
const linkColor = rc(
|
|
2781
|
+
isGray || highContrast ? `${prefix}-12` : `${prefix}-a11`
|
|
2782
|
+
);
|
|
2783
|
+
const effectiveWeight = weight ?? "regular";
|
|
2784
|
+
const fontFamily = fonts[effectiveWeight] ?? fonts.regular;
|
|
2785
|
+
const showUnderline = underline === "always" || underline === "auto" && !!highContrast;
|
|
2786
|
+
const textDecorationLine = showUnderline ? "underline" : "none";
|
|
2787
|
+
const textDecorationColor = showUnderline ? rc(highContrast ? `${prefix}-a6` : `${prefix}-a5`) : void 0;
|
|
2788
|
+
const numberOfLines = truncate ? 1 : wrap === "nowrap" ? 1 : void 0;
|
|
2789
|
+
const ellipsizeMode = truncate ? "tail" : wrap === "nowrap" ? "clip" : void 0;
|
|
2790
|
+
const handlePress = React.useCallback(
|
|
2791
|
+
(e) => {
|
|
2792
|
+
if (onPress) {
|
|
2793
|
+
onPress(e);
|
|
2794
|
+
} else if (href) {
|
|
2795
|
+
void Linking.openURL(href);
|
|
2796
|
+
}
|
|
2797
|
+
},
|
|
2798
|
+
[onPress, href]
|
|
2799
|
+
);
|
|
2800
|
+
const linkStyle = {
|
|
2801
|
+
fontSize: resolvedSize,
|
|
2802
|
+
lineHeight: resolvedLineHeight,
|
|
2803
|
+
letterSpacing: resolvedLetterSpacing,
|
|
2804
|
+
color: linkColor,
|
|
2805
|
+
fontWeight: weight ? FONT_WEIGHT$2[weight] : void 0,
|
|
2806
|
+
fontFamily,
|
|
2807
|
+
textDecorationLine,
|
|
2808
|
+
textDecorationColor,
|
|
2809
|
+
// RN defaults flexShrink to 0; CSS defaults to 1. Without this, text
|
|
2810
|
+
// inside a Flex row overflows instead of wrapping to the available width.
|
|
2811
|
+
flexShrink: 1,
|
|
2812
|
+
// Margins
|
|
2813
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2814
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2815
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2816
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
2817
|
+
};
|
|
2818
|
+
return /* @__PURE__ */ React.createElement(
|
|
2819
|
+
Text$1,
|
|
2820
|
+
{
|
|
2821
|
+
accessibilityRole: "link",
|
|
2822
|
+
numberOfLines,
|
|
2823
|
+
ellipsizeMode,
|
|
2824
|
+
onPress: handlePress,
|
|
2825
|
+
style: [linkStyle, style],
|
|
2826
|
+
...rest
|
|
2827
|
+
}
|
|
2828
|
+
);
|
|
2829
|
+
}
|
|
2830
|
+
Link.displayName = "Link";
|
|
2831
|
+
|
|
2832
|
+
const FONT_WEIGHT$1 = {
|
|
2833
|
+
light: "300",
|
|
2834
|
+
regular: "400",
|
|
2835
|
+
medium: "500",
|
|
2836
|
+
bold: "700"
|
|
2837
|
+
};
|
|
2838
|
+
function Blockquote({
|
|
2839
|
+
size = 3,
|
|
2840
|
+
weight = "regular",
|
|
2841
|
+
color,
|
|
2842
|
+
highContrast,
|
|
2843
|
+
truncate,
|
|
2844
|
+
wrap,
|
|
2845
|
+
m,
|
|
2846
|
+
mx,
|
|
2847
|
+
my,
|
|
2848
|
+
mt,
|
|
2849
|
+
mr,
|
|
2850
|
+
mb,
|
|
2851
|
+
ml,
|
|
2852
|
+
style,
|
|
2853
|
+
children
|
|
2854
|
+
}) {
|
|
2855
|
+
const { scaling, fonts } = useThemeContext();
|
|
2856
|
+
const rc = useResolveColor();
|
|
2857
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2858
|
+
const scalingFactor = scalingMap[scaling];
|
|
2859
|
+
const resolvedSize = Math.round(fontSize[size] * scalingFactor);
|
|
2860
|
+
const resolvedLineHeight = Math.round(lineHeight[size] * scalingFactor);
|
|
2861
|
+
const resolvedLetterSpacing = letterSpacingEm[size] * resolvedSize;
|
|
2862
|
+
const borderColor = rc(color ? `${color}-a6` : "accent-a6");
|
|
2863
|
+
const textColor = color ? rc(highContrast ? `${color}-12` : `${color}-a11`) : rc("gray-12");
|
|
2864
|
+
const fontFamily = fonts[weight] ?? fonts.regular;
|
|
2865
|
+
const numberOfLines = truncate ? 1 : wrap === "nowrap" ? 1 : void 0;
|
|
2866
|
+
const ellipsizeMode = truncate ? "tail" : wrap === "nowrap" ? "clip" : void 0;
|
|
2867
|
+
const s1 = space[1] * scalingFactor;
|
|
2868
|
+
const s3 = space[3] * scalingFactor;
|
|
2869
|
+
const s5 = space[5] * scalingFactor;
|
|
2870
|
+
const borderWidth = Math.max(s1, resolvedSize * 0.25);
|
|
2871
|
+
const paddingLeft = Math.min(s5, Math.max(s3, resolvedSize * 0.5));
|
|
2872
|
+
const containerStyle = {
|
|
2873
|
+
borderLeftWidth: borderWidth,
|
|
2874
|
+
borderLeftColor: borderColor,
|
|
2875
|
+
paddingLeft,
|
|
2876
|
+
// RN defaults flexShrink to 0; CSS defaults to 1. Without this, text
|
|
2877
|
+
// inside a Flex row overflows instead of wrapping to the available width.
|
|
2878
|
+
flexShrink: 1,
|
|
2879
|
+
// Margins
|
|
2880
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2881
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2882
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2883
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
2884
|
+
};
|
|
2885
|
+
const textStyle = {
|
|
2886
|
+
fontSize: resolvedSize,
|
|
2887
|
+
lineHeight: resolvedLineHeight,
|
|
2888
|
+
letterSpacing: resolvedLetterSpacing,
|
|
2889
|
+
fontWeight: FONT_WEIGHT$1[weight],
|
|
2890
|
+
fontFamily,
|
|
2891
|
+
color: textColor
|
|
2892
|
+
};
|
|
2893
|
+
return /* @__PURE__ */ React.createElement(View, { style: [containerStyle, style] }, /* @__PURE__ */ React.createElement(
|
|
2894
|
+
Text$1,
|
|
2895
|
+
{
|
|
2896
|
+
numberOfLines,
|
|
2897
|
+
ellipsizeMode,
|
|
2898
|
+
style: textStyle
|
|
2899
|
+
},
|
|
2900
|
+
children
|
|
2901
|
+
));
|
|
2902
|
+
}
|
|
2903
|
+
Blockquote.displayName = "Blockquote";
|
|
2904
|
+
|
|
2905
|
+
function Em({
|
|
2906
|
+
truncate,
|
|
2907
|
+
wrap,
|
|
2908
|
+
m,
|
|
2909
|
+
mx,
|
|
2910
|
+
my,
|
|
2911
|
+
mt,
|
|
2912
|
+
mr,
|
|
2913
|
+
mb,
|
|
2914
|
+
ml,
|
|
2915
|
+
style,
|
|
2916
|
+
...rest
|
|
2917
|
+
}) {
|
|
2918
|
+
const { scaling } = useThemeContext();
|
|
2919
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2920
|
+
const numberOfLines = truncate ? 1 : wrap === "nowrap" ? 1 : void 0;
|
|
2921
|
+
const ellipsizeMode = truncate ? "tail" : wrap === "nowrap" ? "clip" : void 0;
|
|
2922
|
+
const emStyle = {
|
|
2923
|
+
fontStyle: "italic",
|
|
2924
|
+
// RN defaults flexShrink to 0; CSS defaults to 1. Without this, text
|
|
2925
|
+
// inside a Flex row overflows instead of wrapping to the available width.
|
|
2926
|
+
flexShrink: 1,
|
|
2927
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2928
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2929
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2930
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
2931
|
+
};
|
|
2932
|
+
return /* @__PURE__ */ React.createElement(
|
|
2933
|
+
Text$1,
|
|
2934
|
+
{
|
|
2935
|
+
numberOfLines,
|
|
2936
|
+
ellipsizeMode,
|
|
2937
|
+
style: [emStyle, style],
|
|
2938
|
+
...rest
|
|
2939
|
+
}
|
|
2940
|
+
);
|
|
2941
|
+
}
|
|
2942
|
+
Em.displayName = "Em";
|
|
2943
|
+
|
|
2944
|
+
function Strong({
|
|
2945
|
+
truncate,
|
|
2946
|
+
wrap,
|
|
2947
|
+
m,
|
|
2948
|
+
mx,
|
|
2949
|
+
my,
|
|
2950
|
+
mt,
|
|
2951
|
+
mr,
|
|
2952
|
+
mb,
|
|
2953
|
+
ml,
|
|
2954
|
+
style,
|
|
2955
|
+
...rest
|
|
2956
|
+
}) {
|
|
2957
|
+
const { scaling, fonts } = useThemeContext();
|
|
2958
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
2959
|
+
const numberOfLines = truncate ? 1 : wrap === "nowrap" ? 1 : void 0;
|
|
2960
|
+
const ellipsizeMode = truncate ? "tail" : wrap === "nowrap" ? "clip" : void 0;
|
|
2961
|
+
const strongStyle = {
|
|
2962
|
+
fontWeight: "700",
|
|
2963
|
+
fontFamily: fonts.bold ?? fonts.regular,
|
|
2964
|
+
// RN defaults flexShrink to 0; CSS defaults to 1. Without this, text
|
|
2965
|
+
// inside a Flex row overflows instead of wrapping to the available width.
|
|
2966
|
+
flexShrink: 1,
|
|
2967
|
+
marginTop: sp(mt ?? my ?? m),
|
|
2968
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
2969
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
2970
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
2971
|
+
};
|
|
2972
|
+
return /* @__PURE__ */ React.createElement(
|
|
2973
|
+
Text$1,
|
|
2974
|
+
{
|
|
2975
|
+
numberOfLines,
|
|
2976
|
+
ellipsizeMode,
|
|
2977
|
+
style: [strongStyle, style],
|
|
2978
|
+
...rest
|
|
2979
|
+
}
|
|
2980
|
+
);
|
|
2981
|
+
}
|
|
2982
|
+
Strong.displayName = "Strong";
|
|
2983
|
+
|
|
2984
|
+
const FONT_WEIGHT = {
|
|
2985
|
+
light: "300",
|
|
2986
|
+
regular: "400",
|
|
2987
|
+
medium: "500",
|
|
2988
|
+
bold: "700"
|
|
2989
|
+
};
|
|
2990
|
+
function Code({
|
|
2991
|
+
size = 3,
|
|
2992
|
+
variant = "soft",
|
|
2993
|
+
weight,
|
|
2994
|
+
color,
|
|
2995
|
+
highContrast,
|
|
2996
|
+
truncate,
|
|
2997
|
+
wrap,
|
|
2998
|
+
m,
|
|
2999
|
+
mx,
|
|
3000
|
+
my,
|
|
3001
|
+
mt,
|
|
3002
|
+
mr,
|
|
3003
|
+
mb,
|
|
3004
|
+
ml,
|
|
3005
|
+
style,
|
|
3006
|
+
...rest
|
|
3007
|
+
}) {
|
|
3008
|
+
const { scaling, fonts, radius } = useThemeContext();
|
|
3009
|
+
const rc = useResolveColor();
|
|
3010
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
3011
|
+
const scalingFactor = scalingMap[scaling];
|
|
3012
|
+
const resolvedSize = Math.round(fontSize[size] * scalingFactor * 0.85);
|
|
3013
|
+
const resolvedLetterSpacing = letterSpacingEm[size] * resolvedSize;
|
|
3014
|
+
const prefix = color ?? "accent";
|
|
3015
|
+
const textColor = (() => {
|
|
3016
|
+
switch (variant) {
|
|
3017
|
+
case "solid":
|
|
3018
|
+
return rc(`${prefix}-contrast`);
|
|
3019
|
+
case "soft":
|
|
3020
|
+
case "outline":
|
|
3021
|
+
case "ghost":
|
|
3022
|
+
default:
|
|
3023
|
+
return rc(highContrast ? `${prefix}-12` : `${prefix}-a11`);
|
|
3024
|
+
}
|
|
3025
|
+
})();
|
|
3026
|
+
const backgroundColor = (() => {
|
|
3027
|
+
switch (variant) {
|
|
3028
|
+
case "solid":
|
|
3029
|
+
return rc(`${prefix}-9`);
|
|
3030
|
+
case "soft":
|
|
3031
|
+
return rc(`${prefix}-a3`);
|
|
3032
|
+
default:
|
|
3033
|
+
return void 0;
|
|
3034
|
+
}
|
|
3035
|
+
})();
|
|
3036
|
+
const borderColor = variant === "outline" ? rc(`${prefix}-a7`) : void 0;
|
|
3037
|
+
const effectiveWeight = weight ?? "regular";
|
|
3038
|
+
const fontFamily = fonts.code ?? fonts[effectiveWeight] ?? fonts.regular;
|
|
3039
|
+
const numberOfLines = truncate ? 1 : wrap === "nowrap" ? 1 : void 0;
|
|
3040
|
+
const ellipsizeMode = truncate ? "tail" : wrap === "nowrap" ? "clip" : void 0;
|
|
3041
|
+
const paddingVertical = Math.round(resolvedSize * 0.1);
|
|
3042
|
+
const paddingHorizontal = Math.round(resolvedSize * 0.35);
|
|
3043
|
+
const codeStyle = {
|
|
3044
|
+
fontSize: resolvedSize,
|
|
3045
|
+
letterSpacing: resolvedLetterSpacing,
|
|
3046
|
+
fontWeight: weight ? FONT_WEIGHT[weight] : void 0,
|
|
3047
|
+
fontFamily,
|
|
3048
|
+
color: textColor,
|
|
3049
|
+
backgroundColor,
|
|
3050
|
+
borderRadius: getRadius(radius, 1),
|
|
3051
|
+
borderWidth: borderColor ? 1 : void 0,
|
|
3052
|
+
borderColor,
|
|
3053
|
+
paddingVertical,
|
|
3054
|
+
paddingHorizontal,
|
|
3055
|
+
// Shrink to content width when used standalone (no-op when nested inline in Text).
|
|
3056
|
+
alignSelf: variant !== "ghost" ? "flex-start" : void 0,
|
|
3057
|
+
// Margins
|
|
3058
|
+
marginTop: sp(mt ?? my ?? m),
|
|
3059
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
3060
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
3061
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
3062
|
+
};
|
|
3063
|
+
return /* @__PURE__ */ React.createElement(
|
|
3064
|
+
Text$1,
|
|
3065
|
+
{
|
|
3066
|
+
numberOfLines,
|
|
3067
|
+
ellipsizeMode,
|
|
3068
|
+
style: [codeStyle, style],
|
|
3069
|
+
...rest
|
|
3070
|
+
}
|
|
3071
|
+
);
|
|
3072
|
+
}
|
|
3073
|
+
Code.displayName = "Code";
|
|
3074
|
+
|
|
3075
|
+
function Kbd({
|
|
3076
|
+
size = 2,
|
|
3077
|
+
variant = "classic",
|
|
3078
|
+
m,
|
|
3079
|
+
mx,
|
|
3080
|
+
my,
|
|
3081
|
+
mt,
|
|
3082
|
+
mr,
|
|
3083
|
+
mb,
|
|
3084
|
+
ml,
|
|
3085
|
+
style,
|
|
3086
|
+
children
|
|
3087
|
+
}) {
|
|
3088
|
+
const { scaling, fonts, radius } = useThemeContext();
|
|
3089
|
+
const rc = useResolveColor();
|
|
3090
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
3091
|
+
const sf = scalingMap[scaling];
|
|
3092
|
+
const kbdFontSize = Math.round(fontSize[size] * sf * 0.8);
|
|
3093
|
+
const borderR = Math.max(2, Math.round(getRadius(radius, 2) * 0.35 * (kbdFontSize / 14)));
|
|
3094
|
+
const minW = Math.round(kbdFontSize * 1.75);
|
|
3095
|
+
const kbdHeight = Math.round(kbdFontSize * 1.7);
|
|
3096
|
+
const ph = Math.round(kbdFontSize * 0.5);
|
|
3097
|
+
const pb = Math.round(kbdFontSize * 0.05);
|
|
3098
|
+
const parentFontSize = Math.round(fontSize[size] * sf);
|
|
3099
|
+
const ascender = Math.round(parentFontSize * 0.82);
|
|
3100
|
+
const translateY = Math.round((kbdHeight - ascender) * 0.5);
|
|
3101
|
+
const isClassic = variant === "classic";
|
|
3102
|
+
const containerStyle = {
|
|
3103
|
+
alignSelf: "flex-start",
|
|
3104
|
+
flexDirection: "row",
|
|
3105
|
+
alignItems: "center",
|
|
3106
|
+
justifyContent: "center",
|
|
3107
|
+
height: kbdHeight,
|
|
3108
|
+
minWidth: minW,
|
|
3109
|
+
paddingHorizontal: ph,
|
|
3110
|
+
paddingBottom: pb,
|
|
3111
|
+
borderRadius: borderR,
|
|
3112
|
+
backgroundColor: isClassic ? rc("gray-1") : rc("gray-a3"),
|
|
3113
|
+
// Classic uses border to approximate box-shadow outline + bottom shadow
|
|
3114
|
+
...isClassic ? {
|
|
3115
|
+
borderWidth: 1,
|
|
3116
|
+
borderColor: rc("gray-a5"),
|
|
3117
|
+
borderBottomWidth: 2,
|
|
3118
|
+
borderBottomColor: rc("gray-a7")
|
|
3119
|
+
} : {},
|
|
3120
|
+
transform: [{ translateY }],
|
|
3121
|
+
// iOS shadow approximates the outer drop shadow from Radix box-shadow
|
|
3122
|
+
...isClassic ? Platform.select({
|
|
3123
|
+
ios: {
|
|
3124
|
+
shadowColor: rc("gray-12"),
|
|
3125
|
+
shadowOffset: { width: 0, height: 1 },
|
|
3126
|
+
shadowOpacity: 0.12,
|
|
3127
|
+
shadowRadius: 1
|
|
3128
|
+
},
|
|
3129
|
+
android: {
|
|
3130
|
+
elevation: 1
|
|
3131
|
+
}
|
|
3132
|
+
}) : {},
|
|
3133
|
+
// Margins
|
|
3134
|
+
marginTop: sp(mt ?? my ?? m),
|
|
3135
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
3136
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
3137
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
3138
|
+
};
|
|
3139
|
+
const textStyle = {
|
|
3140
|
+
fontSize: kbdFontSize,
|
|
3141
|
+
// Radix uses the default (body) font, NOT monospace
|
|
3142
|
+
fontFamily: fonts.regular,
|
|
3143
|
+
fontWeight: "normal",
|
|
3144
|
+
color: rc("gray-12"),
|
|
3145
|
+
letterSpacing: letterSpacingEm[size] * kbdFontSize
|
|
3146
|
+
};
|
|
3147
|
+
const highlightStyle = isClassic ? {
|
|
3148
|
+
position: "absolute",
|
|
3149
|
+
top: 0,
|
|
3150
|
+
left: 1,
|
|
3151
|
+
right: 1,
|
|
3152
|
+
height: 1,
|
|
3153
|
+
backgroundColor: rc("gray-a3"),
|
|
3154
|
+
borderTopLeftRadius: Math.max(0, borderR - 1),
|
|
3155
|
+
borderTopRightRadius: Math.max(0, borderR - 1)
|
|
3156
|
+
} : null;
|
|
3157
|
+
return /* @__PURE__ */ React.createElement(View, { style: [containerStyle, style] }, highlightStyle && /* @__PURE__ */ React.createElement(View, { style: highlightStyle }), /* @__PURE__ */ React.createElement(Text$1, { style: textStyle }, children));
|
|
3158
|
+
}
|
|
3159
|
+
Kbd.displayName = "Kbd";
|
|
3160
|
+
|
|
3161
|
+
function Quote({
|
|
3162
|
+
truncate,
|
|
3163
|
+
wrap,
|
|
3164
|
+
m,
|
|
3165
|
+
mx,
|
|
3166
|
+
my,
|
|
3167
|
+
mt,
|
|
3168
|
+
mr,
|
|
3169
|
+
mb,
|
|
3170
|
+
ml,
|
|
3171
|
+
style,
|
|
3172
|
+
children,
|
|
3173
|
+
...rest
|
|
3174
|
+
}) {
|
|
3175
|
+
const { scaling } = useThemeContext();
|
|
3176
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
3177
|
+
const numberOfLines = truncate ? 1 : wrap === "nowrap" ? 1 : void 0;
|
|
3178
|
+
const ellipsizeMode = truncate ? "tail" : wrap === "nowrap" ? "clip" : void 0;
|
|
3179
|
+
const quoteStyle = {
|
|
3180
|
+
fontStyle: "italic",
|
|
3181
|
+
// RN defaults flexShrink to 0; CSS defaults to 1. Without this, text
|
|
3182
|
+
// inside a Flex row overflows instead of wrapping to the available width.
|
|
3183
|
+
flexShrink: 1,
|
|
3184
|
+
marginTop: sp(mt ?? my ?? m),
|
|
3185
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
3186
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
3187
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
3188
|
+
};
|
|
3189
|
+
return /* @__PURE__ */ React.createElement(
|
|
3190
|
+
Text$1,
|
|
3191
|
+
{
|
|
3192
|
+
numberOfLines,
|
|
3193
|
+
ellipsizeMode,
|
|
3194
|
+
style: [quoteStyle, style],
|
|
3195
|
+
...rest
|
|
3196
|
+
},
|
|
3197
|
+
"\u201C",
|
|
3198
|
+
children,
|
|
3199
|
+
"\u201D"
|
|
3200
|
+
);
|
|
3201
|
+
}
|
|
3202
|
+
Quote.displayName = "Quote";
|
|
3203
|
+
|
|
3204
|
+
const SIZE_HEIGHT = { 1: 24, 2: 32, 3: 40, 4: 48 };
|
|
3205
|
+
const SIZE_PADDING_X = { 1: 8, 2: 12, 3: 16, 4: 24 };
|
|
3206
|
+
const GHOST_PADDING_X = { 1: 8, 2: 8, 3: 12, 4: 16 };
|
|
3207
|
+
const GHOST_PADDING_Y = { 1: 4, 2: 4, 3: 6, 4: 8 };
|
|
3208
|
+
const SIZE_GAP = { 1: 4, 2: 8, 3: 12, 4: 12 };
|
|
3209
|
+
const GHOST_GAP = { 1: 4, 2: 4, 3: 8, 4: 8 };
|
|
3210
|
+
const SIZE_FONT = { 1: 1, 2: 2, 3: 3, 4: 4 };
|
|
3211
|
+
const SIZE_RADIUS_LEVEL = { 1: 1, 2: 2, 3: 3, 4: 4 };
|
|
3212
|
+
function Button({
|
|
3213
|
+
size = 2,
|
|
3214
|
+
variant = "solid",
|
|
3215
|
+
color,
|
|
3216
|
+
highContrast,
|
|
3217
|
+
radius: radiusProp,
|
|
3218
|
+
loading = false,
|
|
3219
|
+
disabled = false,
|
|
3220
|
+
children,
|
|
3221
|
+
m,
|
|
3222
|
+
mx,
|
|
3223
|
+
my,
|
|
3224
|
+
mt,
|
|
3225
|
+
mr,
|
|
3226
|
+
mb,
|
|
3227
|
+
ml,
|
|
3228
|
+
style,
|
|
3229
|
+
onPress,
|
|
3230
|
+
...rest
|
|
3231
|
+
}) {
|
|
3232
|
+
const { appearance, scaling, fonts, radius: themeRadius } = useThemeContext();
|
|
3233
|
+
const rc = useResolveColor();
|
|
3234
|
+
const effectiveRadius = radiusProp ?? themeRadius;
|
|
3235
|
+
const isDisabled = disabled || loading;
|
|
3236
|
+
const prefix = color ?? "accent";
|
|
3237
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
3238
|
+
const scalingFactor = scalingMap[scaling];
|
|
3239
|
+
const fontIdx = SIZE_FONT[size];
|
|
3240
|
+
const resolvedFontSize = Math.round(fontSize[fontIdx] * scalingFactor);
|
|
3241
|
+
const resolvedLineHeight = Math.round(lineHeight[fontIdx] * scalingFactor);
|
|
3242
|
+
const resolvedLetterSpacing = letterSpacingEm[fontIdx] * resolvedFontSize;
|
|
3243
|
+
const isGhost = variant === "ghost";
|
|
3244
|
+
const resolvedHeight = Math.round(SIZE_HEIGHT[size] * scalingFactor);
|
|
3245
|
+
const resolvedPaddingX = Math.round(
|
|
3246
|
+
(isGhost ? GHOST_PADDING_X[size] : SIZE_PADDING_X[size]) * scalingFactor
|
|
3247
|
+
);
|
|
3248
|
+
const resolvedPaddingY = isGhost ? Math.round(GHOST_PADDING_Y[size] * scalingFactor) : 0;
|
|
3249
|
+
const resolvedGap = Math.round(
|
|
3250
|
+
(isGhost ? GHOST_GAP[size] : SIZE_GAP[size]) * scalingFactor
|
|
3251
|
+
);
|
|
3252
|
+
const level = SIZE_RADIUS_LEVEL[size];
|
|
3253
|
+
const borderRadius = Math.max(getRadius(effectiveRadius, level), getFullRadius(effectiveRadius));
|
|
3254
|
+
const colors = useMemo(() => {
|
|
3255
|
+
if (isDisabled) {
|
|
3256
|
+
const disabledText = rc("gray-a8");
|
|
3257
|
+
switch (variant) {
|
|
3258
|
+
case "classic":
|
|
3259
|
+
return {
|
|
3260
|
+
bg: rc("gray-2"),
|
|
3261
|
+
text: disabledText,
|
|
3262
|
+
border: void 0,
|
|
3263
|
+
pressedBg: rc("gray-2")
|
|
3264
|
+
};
|
|
3265
|
+
case "solid":
|
|
3266
|
+
case "soft":
|
|
3267
|
+
return {
|
|
3268
|
+
bg: rc("gray-a3"),
|
|
3269
|
+
text: disabledText,
|
|
3270
|
+
border: void 0,
|
|
3271
|
+
pressedBg: rc("gray-a3")
|
|
3272
|
+
};
|
|
3273
|
+
case "surface":
|
|
3274
|
+
return {
|
|
3275
|
+
bg: rc("gray-a2"),
|
|
3276
|
+
text: disabledText,
|
|
3277
|
+
border: rc("gray-a6"),
|
|
3278
|
+
pressedBg: rc("gray-a2")
|
|
3279
|
+
};
|
|
3280
|
+
case "outline":
|
|
3281
|
+
return {
|
|
3282
|
+
bg: "transparent",
|
|
3283
|
+
text: disabledText,
|
|
3284
|
+
border: rc("gray-a7"),
|
|
3285
|
+
pressedBg: "transparent"
|
|
3286
|
+
};
|
|
3287
|
+
case "ghost":
|
|
3288
|
+
return {
|
|
3289
|
+
bg: "transparent",
|
|
3290
|
+
text: disabledText,
|
|
3291
|
+
border: void 0,
|
|
3292
|
+
pressedBg: "transparent"
|
|
3293
|
+
};
|
|
3294
|
+
}
|
|
3295
|
+
}
|
|
3296
|
+
const hc = highContrast;
|
|
3297
|
+
switch (variant) {
|
|
3298
|
+
case "classic":
|
|
3299
|
+
case "solid": {
|
|
3300
|
+
const bg = hc ? rc(`${prefix}-12`) : rc(`${prefix}-9`);
|
|
3301
|
+
const text = hc ? rc("gray-1") : rc(`${prefix}-contrast`);
|
|
3302
|
+
const pressedBg = hc ? rc(`${prefix}-12`) : rc(`${prefix}-10`);
|
|
3303
|
+
const pressedOpacity = hc ? 0.88 : void 0;
|
|
3304
|
+
return { bg, text, border: void 0, pressedBg, pressedOpacity };
|
|
3305
|
+
}
|
|
3306
|
+
case "soft": {
|
|
3307
|
+
const bg = rc(`${prefix}-a3`);
|
|
3308
|
+
const text = hc ? rc(`${prefix}-12`) : rc(`${prefix}-a11`);
|
|
3309
|
+
const pressedBg = rc(`${prefix}-a5`);
|
|
3310
|
+
return { bg, text, border: void 0, pressedBg };
|
|
3311
|
+
}
|
|
3312
|
+
case "surface": {
|
|
3313
|
+
const bg = rc(`${prefix}-surface`);
|
|
3314
|
+
const text = hc ? rc(`${prefix}-12`) : rc(`${prefix}-a11`);
|
|
3315
|
+
const border = rc(`${prefix}-a7`);
|
|
3316
|
+
const pressedBg = rc(`${prefix}-a3`);
|
|
3317
|
+
return { bg, text, border, pressedBg };
|
|
3318
|
+
}
|
|
3319
|
+
case "outline": {
|
|
3320
|
+
const text = hc ? rc(`${prefix}-12`) : rc(`${prefix}-a11`);
|
|
3321
|
+
const border = hc ? rc("gray-a11") : rc(`${prefix}-a8`);
|
|
3322
|
+
const pressedBg = hc ? rc(`${prefix}-a3`) : rc(`${prefix}-a2`);
|
|
3323
|
+
return { bg: "transparent", text, border, pressedBg };
|
|
3324
|
+
}
|
|
3325
|
+
case "ghost": {
|
|
3326
|
+
const text = hc ? rc(`${prefix}-12`) : rc(`${prefix}-a11`);
|
|
3327
|
+
const pressedBg = rc(`${prefix}-a4`);
|
|
3328
|
+
return { bg: "transparent", text, border: void 0, pressedBg };
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
}, [variant, prefix, highContrast, isDisabled, loading, rc]);
|
|
3332
|
+
const fontFamily = isGhost ? fonts.regular : fonts.medium ?? fonts.regular;
|
|
3333
|
+
const handlePress = useCallback(
|
|
3334
|
+
(e) => {
|
|
3335
|
+
if (!isDisabled && onPress) onPress(e);
|
|
3336
|
+
},
|
|
3337
|
+
[isDisabled, onPress]
|
|
3338
|
+
);
|
|
3339
|
+
const isClassic = variant === "classic";
|
|
3340
|
+
return /* @__PURE__ */ React.createElement(
|
|
3341
|
+
Pressable,
|
|
3342
|
+
{
|
|
3343
|
+
onPress: handlePress,
|
|
3344
|
+
disabled: isDisabled,
|
|
3345
|
+
accessibilityRole: "button",
|
|
3346
|
+
accessibilityState: { disabled: isDisabled, busy: loading },
|
|
3347
|
+
style: ({ pressed }) => {
|
|
3348
|
+
const bg = pressed && !isDisabled ? colors.pressedBg : colors.bg;
|
|
3349
|
+
const opacity = pressed && !isDisabled && colors.pressedOpacity != null ? colors.pressedOpacity : isDisabled && !loading ? 1 : void 0;
|
|
3350
|
+
const containerStyle = {
|
|
3351
|
+
flexDirection: "row",
|
|
3352
|
+
alignItems: "center",
|
|
3353
|
+
justifyContent: "center",
|
|
3354
|
+
alignSelf: "flex-start",
|
|
3355
|
+
overflow: "hidden",
|
|
3356
|
+
height: isGhost ? void 0 : resolvedHeight,
|
|
3357
|
+
paddingHorizontal: resolvedPaddingX,
|
|
3358
|
+
paddingVertical: isGhost ? resolvedPaddingY : void 0,
|
|
3359
|
+
gap: resolvedGap,
|
|
3360
|
+
backgroundColor: bg,
|
|
3361
|
+
borderRadius,
|
|
3362
|
+
borderWidth: colors.border ? 1 : void 0,
|
|
3363
|
+
borderColor: colors.border,
|
|
3364
|
+
opacity,
|
|
3365
|
+
// Margins
|
|
3366
|
+
marginTop: sp(mt ?? my ?? m),
|
|
3367
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
3368
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
3369
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
3370
|
+
};
|
|
3371
|
+
const classicStyle = isClassic ? getClassicEffect(appearance, { pressed, disabled: isDisabled && !loading }) : void 0;
|
|
3372
|
+
return [containerStyle, classicStyle, style];
|
|
3373
|
+
},
|
|
3374
|
+
...rest
|
|
3375
|
+
},
|
|
3376
|
+
isClassic && !isDisabled && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
3377
|
+
View,
|
|
3378
|
+
{
|
|
3379
|
+
pointerEvents: "none",
|
|
3380
|
+
style: {
|
|
3381
|
+
position: "absolute",
|
|
3382
|
+
top: 0,
|
|
3383
|
+
left: 0,
|
|
3384
|
+
right: 0,
|
|
3385
|
+
height: "50%",
|
|
3386
|
+
backgroundColor: "rgba(255,255,255,0.12)"
|
|
3387
|
+
}
|
|
3388
|
+
}
|
|
3389
|
+
), /* @__PURE__ */ React.createElement(
|
|
3390
|
+
View,
|
|
3391
|
+
{
|
|
3392
|
+
pointerEvents: "none",
|
|
3393
|
+
style: {
|
|
3394
|
+
position: "absolute",
|
|
3395
|
+
bottom: 0,
|
|
3396
|
+
left: 0,
|
|
3397
|
+
right: 0,
|
|
3398
|
+
height: "50%",
|
|
3399
|
+
backgroundColor: "rgba(0,0,0,0.08)"
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
)),
|
|
3403
|
+
loading ? /* @__PURE__ */ React.createElement(View, { style: { position: "relative", flexDirection: "row", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React.createElement(View, { style: { opacity: 0, flexDirection: "row", alignItems: "center", gap: resolvedGap } }, renderContent(children, {
|
|
3404
|
+
fontSize: resolvedFontSize,
|
|
3405
|
+
lineHeight: resolvedLineHeight,
|
|
3406
|
+
letterSpacing: resolvedLetterSpacing,
|
|
3407
|
+
color: colors.text,
|
|
3408
|
+
fontWeight: isGhost ? "400" : "500",
|
|
3409
|
+
fontFamily
|
|
3410
|
+
})), /* @__PURE__ */ React.createElement(View, { style: { position: "absolute", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React.createElement(ActivityIndicator, { size: "small", color: colors.text }))) : renderContent(children, {
|
|
3411
|
+
fontSize: resolvedFontSize,
|
|
3412
|
+
lineHeight: resolvedLineHeight,
|
|
3413
|
+
letterSpacing: resolvedLetterSpacing,
|
|
3414
|
+
color: colors.text,
|
|
3415
|
+
fontWeight: isGhost ? "400" : "500",
|
|
3416
|
+
fontFamily
|
|
3417
|
+
})
|
|
3418
|
+
);
|
|
3419
|
+
}
|
|
3420
|
+
Button.displayName = "Button";
|
|
3421
|
+
function renderContent(children, textStyle) {
|
|
3422
|
+
if (typeof children === "string" || typeof children === "number") {
|
|
3423
|
+
return /* @__PURE__ */ React.createElement(Text$1, { style: textStyle }, children);
|
|
3424
|
+
}
|
|
3425
|
+
return children;
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
const SIZE_PX = { 1: 14, 2: 16, 3: 20 };
|
|
3429
|
+
const INDICATOR_SIZE = { 1: 9, 2: 10, 3: 12 };
|
|
3430
|
+
const RADIUS_MULT = { 1: 0.875, 2: 1, 3: 1.25 };
|
|
3431
|
+
function Checkbox({
|
|
3432
|
+
size = 2,
|
|
3433
|
+
variant = "surface",
|
|
3434
|
+
color,
|
|
3435
|
+
highContrast,
|
|
3436
|
+
checked: checkedProp,
|
|
3437
|
+
defaultChecked = false,
|
|
3438
|
+
onCheckedChange,
|
|
3439
|
+
disabled = false,
|
|
3440
|
+
m,
|
|
3441
|
+
mx,
|
|
3442
|
+
my,
|
|
3443
|
+
mt,
|
|
3444
|
+
mr,
|
|
3445
|
+
mb,
|
|
3446
|
+
ml,
|
|
3447
|
+
style,
|
|
3448
|
+
...rest
|
|
3449
|
+
}) {
|
|
3450
|
+
const { appearance, scaling, radius } = useThemeContext();
|
|
3451
|
+
const rc = useResolveColor();
|
|
3452
|
+
const [internal, setInternal] = React.useState(defaultChecked);
|
|
3453
|
+
const isControlled = checkedProp !== void 0;
|
|
3454
|
+
const checkedState = isControlled ? checkedProp : internal;
|
|
3455
|
+
const isChecked = checkedState === true;
|
|
3456
|
+
const isIndeterminate = checkedState === "indeterminate";
|
|
3457
|
+
const isActive = isChecked || isIndeterminate;
|
|
3458
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
3459
|
+
const scalingFactor = scalingMap[scaling];
|
|
3460
|
+
const boxSize = Math.round(SIZE_PX[size] * scalingFactor);
|
|
3461
|
+
const indicatorSize = Math.round(INDICATOR_SIZE[size] * scalingFactor);
|
|
3462
|
+
const borderRadius = Math.round(getRadius(radius, 1) * RADIUS_MULT[size]);
|
|
3463
|
+
const prefix = color ?? "accent";
|
|
3464
|
+
const colors = useMemo(() => {
|
|
3465
|
+
if (disabled) {
|
|
3466
|
+
const indicator = isActive ? rc("gray-a8") : void 0;
|
|
3467
|
+
switch (variant) {
|
|
3468
|
+
case "classic":
|
|
3469
|
+
case "surface":
|
|
3470
|
+
return {
|
|
3471
|
+
bg: rc("gray-a3"),
|
|
3472
|
+
border: rc("gray-a6"),
|
|
3473
|
+
indicator,
|
|
3474
|
+
showBorder: true
|
|
3475
|
+
};
|
|
3476
|
+
case "soft":
|
|
3477
|
+
return {
|
|
3478
|
+
bg: rc("gray-a3"),
|
|
3479
|
+
border: void 0,
|
|
3480
|
+
indicator,
|
|
3481
|
+
showBorder: false
|
|
3482
|
+
};
|
|
3483
|
+
}
|
|
3484
|
+
}
|
|
3485
|
+
const hc = highContrast;
|
|
3486
|
+
switch (variant) {
|
|
3487
|
+
case "classic":
|
|
3488
|
+
case "surface": {
|
|
3489
|
+
if (isActive) {
|
|
3490
|
+
const bg = hc ? rc(`${prefix}-12`) : rc(`${prefix}-9`);
|
|
3491
|
+
const indicator = hc ? rc(`${prefix}-1`) : rc(`${prefix}-contrast`);
|
|
3492
|
+
return { bg, border: void 0, indicator, showBorder: false };
|
|
3493
|
+
}
|
|
3494
|
+
return {
|
|
3495
|
+
bg: rc("gray-surface"),
|
|
3496
|
+
border: rc("gray-a7"),
|
|
3497
|
+
indicator: void 0,
|
|
3498
|
+
showBorder: true
|
|
3499
|
+
};
|
|
3500
|
+
}
|
|
3501
|
+
case "soft": {
|
|
3502
|
+
const bg = rc(`${prefix}-a5`);
|
|
3503
|
+
const indicator = isActive ? hc ? rc(`${prefix}-12`) : rc(`${prefix}-a11`) : void 0;
|
|
3504
|
+
return { bg, border: void 0, indicator, showBorder: false };
|
|
3505
|
+
}
|
|
3506
|
+
}
|
|
3507
|
+
}, [variant, prefix, highContrast, isActive, disabled, rc]);
|
|
3508
|
+
const handlePress = useCallback(() => {
|
|
3509
|
+
if (disabled) return;
|
|
3510
|
+
const next = isChecked ? false : true;
|
|
3511
|
+
if (!isControlled) setInternal(next);
|
|
3512
|
+
onCheckedChange?.(next);
|
|
3513
|
+
}, [disabled, isChecked, isControlled, onCheckedChange]);
|
|
3514
|
+
const isClassic = variant === "classic";
|
|
3515
|
+
const classicStyle = isClassic ? getClassicEffect(appearance, { disabled }) : void 0;
|
|
3516
|
+
const boxStyle = {
|
|
3517
|
+
width: boxSize,
|
|
3518
|
+
height: boxSize,
|
|
3519
|
+
borderRadius,
|
|
3520
|
+
backgroundColor: colors.bg,
|
|
3521
|
+
borderWidth: colors.showBorder ? 1 : void 0,
|
|
3522
|
+
borderColor: colors.border,
|
|
3523
|
+
alignItems: "center",
|
|
3524
|
+
justifyContent: "center",
|
|
3525
|
+
// Margins
|
|
3526
|
+
marginTop: sp(mt ?? my ?? m),
|
|
3527
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
3528
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
3529
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
3530
|
+
};
|
|
3531
|
+
const indicatorStyle = {
|
|
3532
|
+
fontSize: indicatorSize,
|
|
3533
|
+
lineHeight: indicatorSize + 2,
|
|
3534
|
+
color: colors.indicator,
|
|
3535
|
+
fontWeight: "700"
|
|
3536
|
+
};
|
|
3537
|
+
return /* @__PURE__ */ React.createElement(
|
|
3538
|
+
Pressable,
|
|
3539
|
+
{
|
|
3540
|
+
onPress: handlePress,
|
|
3541
|
+
disabled,
|
|
3542
|
+
accessibilityRole: "checkbox",
|
|
3543
|
+
accessibilityState: {
|
|
3544
|
+
checked: isIndeterminate ? "mixed" : isChecked,
|
|
3545
|
+
disabled
|
|
3546
|
+
},
|
|
3547
|
+
style: [boxStyle, classicStyle, style],
|
|
3548
|
+
...rest
|
|
3549
|
+
},
|
|
3550
|
+
isClassic && isActive && !disabled && /* @__PURE__ */ React.createElement(View, { pointerEvents: "none", style: { position: "absolute", inset: 0, overflow: "hidden", borderRadius } }, /* @__PURE__ */ React.createElement(View, { style: { position: "absolute", top: 0, left: 0, right: 0, height: "50%", backgroundColor: "rgba(255,255,255,0.12)" } }), /* @__PURE__ */ React.createElement(View, { style: { position: "absolute", bottom: 0, left: 0, right: 0, height: "50%", backgroundColor: "rgba(0,0,0,0.08)" } })),
|
|
3551
|
+
isActive && /* @__PURE__ */ React.createElement(Text$1, { style: indicatorStyle }, isIndeterminate ? "\u2013" : "\u2713")
|
|
3552
|
+
);
|
|
3553
|
+
}
|
|
3554
|
+
Checkbox.displayName = "Checkbox";
|
|
3555
|
+
|
|
3556
|
+
const CheckboxGroupContext = createContext(null);
|
|
3557
|
+
const LABEL_FONT_SIZE = { 1: 1, 2: 2, 3: 3 };
|
|
3558
|
+
const LABEL_GAP = { 1: 4, 2: 6, 3: 8 };
|
|
3559
|
+
function CheckboxGroupRoot({
|
|
3560
|
+
size = 2,
|
|
3561
|
+
variant = "surface",
|
|
3562
|
+
color,
|
|
3563
|
+
highContrast,
|
|
3564
|
+
value: valueProp,
|
|
3565
|
+
defaultValue = [],
|
|
3566
|
+
onValueChange,
|
|
3567
|
+
disabled = false,
|
|
3568
|
+
children,
|
|
3569
|
+
m,
|
|
3570
|
+
mx,
|
|
3571
|
+
my,
|
|
3572
|
+
mt,
|
|
3573
|
+
mr,
|
|
3574
|
+
mb,
|
|
3575
|
+
ml,
|
|
3576
|
+
style
|
|
3577
|
+
}) {
|
|
3578
|
+
const { scaling } = useThemeContext();
|
|
3579
|
+
const [internal, setInternal] = React.useState(defaultValue);
|
|
3580
|
+
const isControlled = valueProp !== void 0;
|
|
3581
|
+
const value = isControlled ? valueProp : internal;
|
|
3582
|
+
const onItemToggle = useCallback((itemValue) => {
|
|
3583
|
+
const next = value.includes(itemValue) ? value.filter((v) => v !== itemValue) : [...value, itemValue];
|
|
3584
|
+
if (!isControlled) setInternal(next);
|
|
3585
|
+
onValueChange?.(next);
|
|
3586
|
+
}, [value, isControlled, onValueChange]);
|
|
3587
|
+
const ctx = useMemo(() => ({
|
|
3588
|
+
size,
|
|
3589
|
+
variant,
|
|
3590
|
+
color,
|
|
3591
|
+
highContrast,
|
|
3592
|
+
disabled,
|
|
3593
|
+
value,
|
|
3594
|
+
onItemToggle
|
|
3595
|
+
}), [size, variant, color, highContrast, disabled, value, onItemToggle]);
|
|
3596
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
3597
|
+
return /* @__PURE__ */ React.createElement(CheckboxGroupContext.Provider, { value: ctx }, /* @__PURE__ */ React.createElement(
|
|
3598
|
+
View,
|
|
3599
|
+
{
|
|
3600
|
+
accessibilityRole: "none",
|
|
3601
|
+
style: [
|
|
3602
|
+
{ flexDirection: "column", gap: resolveSpace(2, scaling) },
|
|
3603
|
+
{
|
|
3604
|
+
marginTop: sp(mt ?? my ?? m),
|
|
3605
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
3606
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
3607
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
3608
|
+
},
|
|
3609
|
+
style
|
|
3610
|
+
]
|
|
3611
|
+
},
|
|
3612
|
+
children
|
|
3613
|
+
));
|
|
3614
|
+
}
|
|
3615
|
+
CheckboxGroupRoot.displayName = "CheckboxGroup.Root";
|
|
3616
|
+
function CheckboxGroupItem({
|
|
3617
|
+
value: itemValue,
|
|
3618
|
+
disabled: disabledProp,
|
|
3619
|
+
children,
|
|
3620
|
+
m,
|
|
3621
|
+
mx,
|
|
3622
|
+
my,
|
|
3623
|
+
mt,
|
|
3624
|
+
mr,
|
|
3625
|
+
mb,
|
|
3626
|
+
ml,
|
|
3627
|
+
style
|
|
3628
|
+
}) {
|
|
3629
|
+
const ctx = useContext(CheckboxGroupContext);
|
|
3630
|
+
if (!ctx) throw new Error("CheckboxGroup.Item must be used within CheckboxGroup.Root");
|
|
3631
|
+
const { size, variant, color, highContrast, disabled: groupDisabled, value, onItemToggle } = ctx;
|
|
3632
|
+
const { scaling, fonts } = useThemeContext();
|
|
3633
|
+
const rc = useResolveColor();
|
|
3634
|
+
const isDisabled = disabledProp ?? groupDisabled;
|
|
3635
|
+
const isChecked = value.includes(itemValue);
|
|
3636
|
+
const handlePress = useCallback(() => {
|
|
3637
|
+
if (!isDisabled) onItemToggle(itemValue);
|
|
3638
|
+
}, [isDisabled, onItemToggle, itemValue]);
|
|
3639
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
3640
|
+
const scalingFactor = scalingMap[scaling];
|
|
3641
|
+
const fontIdx = LABEL_FONT_SIZE[size];
|
|
3642
|
+
const resolvedFontSize = Math.round(fontSize[fontIdx] * scalingFactor);
|
|
3643
|
+
const resolvedLineHeight = Math.round(lineHeight[fontIdx] * scalingFactor);
|
|
3644
|
+
const resolvedLetterSpacing = letterSpacingEm[fontIdx] * resolvedFontSize;
|
|
3645
|
+
const gap = Math.round(LABEL_GAP[size] * scalingFactor);
|
|
3646
|
+
const textColor = rc("gray-12");
|
|
3647
|
+
const fontFamily = fonts.regular;
|
|
3648
|
+
const hasLabel = children != null;
|
|
3649
|
+
if (!hasLabel) {
|
|
3650
|
+
return /* @__PURE__ */ React.createElement(
|
|
3651
|
+
Checkbox,
|
|
3652
|
+
{
|
|
3653
|
+
size,
|
|
3654
|
+
variant,
|
|
3655
|
+
color,
|
|
3656
|
+
highContrast,
|
|
3657
|
+
checked: isChecked,
|
|
3658
|
+
onCheckedChange: () => onItemToggle(itemValue),
|
|
3659
|
+
disabled: isDisabled,
|
|
3660
|
+
m,
|
|
3661
|
+
mx,
|
|
3662
|
+
my,
|
|
3663
|
+
mt,
|
|
3664
|
+
mr,
|
|
3665
|
+
mb,
|
|
3666
|
+
ml,
|
|
3667
|
+
style
|
|
3668
|
+
}
|
|
3669
|
+
);
|
|
3670
|
+
}
|
|
3671
|
+
const labelStyle = {
|
|
3672
|
+
fontSize: resolvedFontSize,
|
|
3673
|
+
lineHeight: resolvedLineHeight,
|
|
3674
|
+
letterSpacing: resolvedLetterSpacing,
|
|
3675
|
+
color: isDisabled ? rc("gray-a8") : textColor,
|
|
3676
|
+
fontFamily
|
|
3677
|
+
};
|
|
3678
|
+
return /* @__PURE__ */ React.createElement(
|
|
3679
|
+
Pressable,
|
|
3680
|
+
{
|
|
3681
|
+
onPress: handlePress,
|
|
3682
|
+
disabled: isDisabled,
|
|
3683
|
+
accessibilityRole: "checkbox",
|
|
3684
|
+
accessibilityState: { checked: isChecked, disabled: isDisabled },
|
|
3685
|
+
style: [
|
|
3686
|
+
{
|
|
3687
|
+
flexDirection: "row",
|
|
3688
|
+
alignItems: "center",
|
|
3689
|
+
gap,
|
|
3690
|
+
marginTop: sp(mt ?? my ?? m),
|
|
3691
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
3692
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
3693
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
3694
|
+
},
|
|
3695
|
+
style
|
|
3696
|
+
]
|
|
3697
|
+
},
|
|
3698
|
+
/* @__PURE__ */ React.createElement(
|
|
3699
|
+
Checkbox,
|
|
3700
|
+
{
|
|
3701
|
+
size,
|
|
3702
|
+
variant,
|
|
3703
|
+
color,
|
|
3704
|
+
highContrast,
|
|
3705
|
+
checked: isChecked,
|
|
3706
|
+
onCheckedChange: () => onItemToggle(itemValue),
|
|
3707
|
+
disabled: isDisabled
|
|
3708
|
+
}
|
|
3709
|
+
),
|
|
3710
|
+
typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ React.createElement(Text$1, { style: labelStyle }, children) : children
|
|
3711
|
+
);
|
|
3712
|
+
}
|
|
3713
|
+
CheckboxGroupItem.displayName = "CheckboxGroup.Item";
|
|
3714
|
+
const CheckboxGroup = Object.assign(CheckboxGroupRoot, {
|
|
3715
|
+
Root: CheckboxGroupRoot,
|
|
3716
|
+
Item: CheckboxGroupItem
|
|
3717
|
+
});
|
|
3718
|
+
|
|
3719
|
+
const CheckboxCardsContext = createContext(null);
|
|
3720
|
+
const SIZE_CONFIG = {
|
|
3721
|
+
1: { paddingLeft: 12, paddingY: 10, checkboxSize: 14, radiusLevel: 3 },
|
|
3722
|
+
2: { paddingLeft: 16, paddingY: 14, checkboxSize: 16, radiusLevel: 3 },
|
|
3723
|
+
3: { paddingLeft: 24, paddingY: 20, checkboxSize: 20, radiusLevel: 4 }
|
|
3724
|
+
};
|
|
3725
|
+
function CheckboxCardsRoot({
|
|
3726
|
+
size = 2,
|
|
3727
|
+
variant = "surface",
|
|
3728
|
+
color,
|
|
3729
|
+
highContrast,
|
|
3730
|
+
columns = 1,
|
|
3731
|
+
gap: gapProp = 4,
|
|
3732
|
+
value: valueProp,
|
|
3733
|
+
defaultValue = [],
|
|
3734
|
+
onValueChange,
|
|
3735
|
+
disabled = false,
|
|
3736
|
+
children,
|
|
3737
|
+
m,
|
|
3738
|
+
mx,
|
|
3739
|
+
my,
|
|
3740
|
+
mt,
|
|
3741
|
+
mr,
|
|
3742
|
+
mb,
|
|
3743
|
+
ml,
|
|
3744
|
+
style
|
|
3745
|
+
}) {
|
|
3746
|
+
const { scaling } = useThemeContext();
|
|
3747
|
+
const [internal, setInternal] = React.useState(defaultValue);
|
|
3748
|
+
const isControlled = valueProp !== void 0;
|
|
3749
|
+
const value = isControlled ? valueProp : internal;
|
|
3750
|
+
const onItemToggle = useCallback((itemValue) => {
|
|
3751
|
+
const next = value.includes(itemValue) ? value.filter((v) => v !== itemValue) : [...value, itemValue];
|
|
3752
|
+
if (!isControlled) setInternal(next);
|
|
3753
|
+
onValueChange?.(next);
|
|
3754
|
+
}, [value, isControlled, onValueChange]);
|
|
3755
|
+
const ctx = useMemo(() => ({
|
|
3756
|
+
size,
|
|
3757
|
+
variant,
|
|
3758
|
+
color,
|
|
3759
|
+
highContrast,
|
|
3760
|
+
disabled,
|
|
3761
|
+
value,
|
|
3762
|
+
onItemToggle
|
|
3763
|
+
}), [size, variant, color, highContrast, disabled, value, onItemToggle]);
|
|
3764
|
+
const sp = (token) => token !== void 0 ? resolveSpace(token, scaling) : void 0;
|
|
3765
|
+
const resolvedGap = resolveSpace(gapProp, scaling);
|
|
3766
|
+
return /* @__PURE__ */ React.createElement(CheckboxCardsContext.Provider, { value: ctx }, /* @__PURE__ */ React.createElement(
|
|
3767
|
+
View,
|
|
3768
|
+
{
|
|
3769
|
+
style: [
|
|
3770
|
+
{
|
|
3771
|
+
flexDirection: "row",
|
|
3772
|
+
flexWrap: "wrap",
|
|
3773
|
+
gap: resolvedGap,
|
|
3774
|
+
marginTop: sp(mt ?? my ?? m),
|
|
3775
|
+
marginBottom: sp(mb ?? my ?? m),
|
|
3776
|
+
marginLeft: sp(ml ?? mx ?? m),
|
|
3777
|
+
marginRight: sp(mr ?? mx ?? m)
|
|
3778
|
+
},
|
|
3779
|
+
style
|
|
3780
|
+
]
|
|
3781
|
+
},
|
|
3782
|
+
React.Children.map(children, (child) => /* @__PURE__ */ React.createElement(View, { style: {
|
|
3783
|
+
flexBasis: columns > 1 ? `${100 / columns}%` : void 0,
|
|
3784
|
+
flexGrow: 1,
|
|
3785
|
+
flexShrink: 1,
|
|
3786
|
+
minWidth: 0
|
|
3787
|
+
} }, child))
|
|
3788
|
+
));
|
|
3789
|
+
}
|
|
3790
|
+
CheckboxCardsRoot.displayName = "CheckboxCards.Root";
|
|
3791
|
+
function CheckboxCardsItem({
|
|
3792
|
+
value: itemValue,
|
|
3793
|
+
disabled: disabledProp,
|
|
3794
|
+
children,
|
|
3795
|
+
style
|
|
3796
|
+
}) {
|
|
3797
|
+
const ctx = useContext(CheckboxCardsContext);
|
|
3798
|
+
if (!ctx) throw new Error("CheckboxCards.Item must be used within CheckboxCards.Root");
|
|
3799
|
+
const { size, variant, color, highContrast, disabled: groupDisabled, value, onItemToggle } = ctx;
|
|
3800
|
+
const { scaling, radius } = useThemeContext();
|
|
3801
|
+
const rc = useResolveColor();
|
|
3802
|
+
const isDisabled = disabledProp ?? groupDisabled;
|
|
3803
|
+
const isChecked = value.includes(itemValue);
|
|
3804
|
+
const handlePress = useCallback(() => {
|
|
3805
|
+
if (!isDisabled) onItemToggle(itemValue);
|
|
3806
|
+
}, [isDisabled, onItemToggle, itemValue]);
|
|
3807
|
+
const scalingFactor = scalingMap[scaling];
|
|
3808
|
+
const cfg = SIZE_CONFIG[size];
|
|
3809
|
+
const paddingLeft = Math.round(cfg.paddingLeft * scalingFactor);
|
|
3810
|
+
const paddingY = Math.round(cfg.paddingY * scalingFactor);
|
|
3811
|
+
const checkboxSize = Math.round(cfg.checkboxSize * scalingFactor);
|
|
3812
|
+
const paddingRight = paddingLeft * 2 + checkboxSize;
|
|
3813
|
+
const borderRadius = getRadius(radius, cfg.radiusLevel);
|
|
3814
|
+
const borderColor = rc("gray-a5");
|
|
3815
|
+
const bgColor = rc("gray-surface");
|
|
3816
|
+
const cardStyle = {
|
|
3817
|
+
position: "relative",
|
|
3818
|
+
overflow: "hidden",
|
|
3819
|
+
paddingLeft,
|
|
3820
|
+
paddingRight,
|
|
3821
|
+
paddingTop: paddingY,
|
|
3822
|
+
paddingBottom: paddingY,
|
|
3823
|
+
borderRadius,
|
|
3824
|
+
borderWidth: 1,
|
|
3825
|
+
borderColor,
|
|
3826
|
+
backgroundColor: bgColor,
|
|
3827
|
+
opacity: isDisabled ? 0.5 : void 0
|
|
3828
|
+
};
|
|
3829
|
+
return /* @__PURE__ */ React.createElement(
|
|
3830
|
+
Pressable,
|
|
3831
|
+
{
|
|
3832
|
+
onPress: handlePress,
|
|
3833
|
+
disabled: isDisabled,
|
|
3834
|
+
accessibilityRole: "checkbox",
|
|
3835
|
+
accessibilityState: { checked: isChecked, disabled: isDisabled },
|
|
3836
|
+
style: [cardStyle, style]
|
|
3837
|
+
},
|
|
3838
|
+
children,
|
|
3839
|
+
/* @__PURE__ */ React.createElement(View, { style: {
|
|
3840
|
+
position: "absolute",
|
|
3841
|
+
right: paddingLeft,
|
|
3842
|
+
top: 0,
|
|
3843
|
+
bottom: 0,
|
|
3844
|
+
justifyContent: "center"
|
|
3845
|
+
} }, /* @__PURE__ */ React.createElement(
|
|
3846
|
+
Checkbox,
|
|
3847
|
+
{
|
|
3848
|
+
size,
|
|
3849
|
+
variant: "surface",
|
|
3850
|
+
color,
|
|
3851
|
+
highContrast,
|
|
3852
|
+
checked: isChecked,
|
|
3853
|
+
onCheckedChange: () => onItemToggle(itemValue),
|
|
3854
|
+
disabled: isDisabled
|
|
3855
|
+
}
|
|
3856
|
+
))
|
|
3857
|
+
);
|
|
3858
|
+
}
|
|
3859
|
+
CheckboxCardsItem.displayName = "CheckboxCards.Item";
|
|
3860
|
+
const CheckboxCards = Object.assign(CheckboxCardsRoot, {
|
|
3861
|
+
Root: CheckboxCardsRoot,
|
|
3862
|
+
Item: CheckboxCardsItem
|
|
3863
|
+
});
|
|
3864
|
+
|
|
3865
|
+
const ACCENT_COLORS = [
|
|
3866
|
+
"gray",
|
|
3867
|
+
"gold",
|
|
3868
|
+
"bronze",
|
|
3869
|
+
"brown",
|
|
3870
|
+
"yellow",
|
|
3871
|
+
"amber",
|
|
3872
|
+
"orange",
|
|
3873
|
+
"tomato",
|
|
3874
|
+
"red",
|
|
3875
|
+
"ruby",
|
|
3876
|
+
"crimson",
|
|
3877
|
+
"pink",
|
|
3878
|
+
"plum",
|
|
3879
|
+
"purple",
|
|
3880
|
+
"violet",
|
|
3881
|
+
"iris",
|
|
3882
|
+
"indigo",
|
|
3883
|
+
"blue",
|
|
3884
|
+
"cyan",
|
|
3885
|
+
"teal",
|
|
3886
|
+
"jade",
|
|
3887
|
+
"green",
|
|
3888
|
+
"grass",
|
|
3889
|
+
"lime",
|
|
3890
|
+
"mint",
|
|
3891
|
+
"sky"
|
|
3892
|
+
];
|
|
3893
|
+
const GRAY_OPTIONS = ["auto", "gray", "mauve", "slate", "sage", "olive", "sand"];
|
|
3894
|
+
const RADIUS_OPTIONS = ["none", "small", "medium", "large", "full"];
|
|
3895
|
+
const SCALING_OPTIONS = ["90%", "95%", "100%", "105%", "110%"];
|
|
3896
|
+
const PANEL_WIDTH = 280;
|
|
3897
|
+
function ThemeControls({ showCopyTheme, onCopyTheme, defaultOpen = false } = {}) {
|
|
3898
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
3899
|
+
const slideAnim = React.useRef(new Animated.Value(defaultOpen ? 0 : PANEL_WIDTH + 20)).current;
|
|
3900
|
+
const { height: windowHeight } = useWindowDimensions();
|
|
3901
|
+
const {
|
|
3902
|
+
appearance,
|
|
3903
|
+
accentColor,
|
|
3904
|
+
grayColor,
|
|
3905
|
+
resolvedGrayColor,
|
|
3906
|
+
radius,
|
|
3907
|
+
scaling,
|
|
3908
|
+
onAppearanceChange,
|
|
3909
|
+
onAccentColorChange,
|
|
3910
|
+
onGrayColorChange,
|
|
3911
|
+
onRadiusChange,
|
|
3912
|
+
onScalingChange
|
|
3913
|
+
} = useThemeContext();
|
|
3914
|
+
const rc = useResolveColor();
|
|
3915
|
+
const toggle = () => {
|
|
3916
|
+
const toValue = open ? PANEL_WIDTH + 20 : 0;
|
|
3917
|
+
Animated.spring(slideAnim, {
|
|
3918
|
+
toValue,
|
|
3919
|
+
useNativeDriver: true,
|
|
3920
|
+
damping: 20,
|
|
3921
|
+
stiffness: 200
|
|
3922
|
+
}).start();
|
|
3923
|
+
setOpen(!open);
|
|
3924
|
+
};
|
|
3925
|
+
const handleCopyTheme = () => {
|
|
3926
|
+
const config = `<Theme accentColor="${accentColor}" grayColor="${grayColor}" appearance="${appearance}" radius="${radius}" scaling="${scaling}">`;
|
|
3927
|
+
onCopyTheme?.(config);
|
|
3928
|
+
};
|
|
3929
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles.container, pointerEvents: "box-none" }, /* @__PURE__ */ React.createElement(
|
|
3930
|
+
Pressable,
|
|
3931
|
+
{
|
|
3932
|
+
onPress: toggle,
|
|
3933
|
+
accessibilityRole: "button",
|
|
3934
|
+
accessibilityLabel: "Toggle theme panel",
|
|
3935
|
+
style: [
|
|
3936
|
+
styles.toggleButton,
|
|
3937
|
+
{
|
|
3938
|
+
backgroundColor: rc("gray-2"),
|
|
3939
|
+
borderColor: rc("gray-6")
|
|
3940
|
+
}
|
|
3941
|
+
]
|
|
3942
|
+
},
|
|
3943
|
+
/* @__PURE__ */ React.createElement(Text, { size: 2, weight: "bold", style: { color: rc("gray-12") } }, "T")
|
|
3944
|
+
), /* @__PURE__ */ React.createElement(
|
|
3945
|
+
Animated.View,
|
|
3946
|
+
{
|
|
3947
|
+
style: [
|
|
3948
|
+
styles.panelWrapper,
|
|
3949
|
+
{ maxHeight: windowHeight - 120, transform: [{ translateX: slideAnim }] }
|
|
3950
|
+
]
|
|
3951
|
+
},
|
|
3952
|
+
/* @__PURE__ */ React.createElement(
|
|
3953
|
+
ScrollView,
|
|
3954
|
+
{
|
|
3955
|
+
style: [styles.panel, { backgroundColor: rc("gray-2"), borderColor: rc("gray-6") }],
|
|
3956
|
+
contentContainerStyle: styles.panelContent,
|
|
3957
|
+
showsVerticalScrollIndicator: false
|
|
3958
|
+
},
|
|
3959
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.headerRow }, /* @__PURE__ */ React.createElement(Heading, { size: 5, style: { color: rc("gray-12") } }, "Theme"), /* @__PURE__ */ React.createElement(
|
|
3960
|
+
Pressable,
|
|
3961
|
+
{
|
|
3962
|
+
onPress: toggle,
|
|
3963
|
+
accessibilityRole: "button",
|
|
3964
|
+
accessibilityLabel: "Close theme panel",
|
|
3965
|
+
style: [styles.closeButton, { borderColor: rc("gray-6") }]
|
|
3966
|
+
},
|
|
3967
|
+
/* @__PURE__ */ React.createElement(Text, { size: 2, weight: "bold", style: { color: rc("gray-12") } }, "T")
|
|
3968
|
+
)),
|
|
3969
|
+
/* @__PURE__ */ React.createElement(SectionLabel, { rc }, "Accent color"),
|
|
3970
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.dotGrid }, ACCENT_COLORS.map((c) => /* @__PURE__ */ React.createElement(
|
|
3971
|
+
ColorDot,
|
|
3972
|
+
{
|
|
3973
|
+
key: c,
|
|
3974
|
+
color: `${c}-9`,
|
|
3975
|
+
selected: accentColor === c,
|
|
3976
|
+
onPress: () => onAccentColorChange(c),
|
|
3977
|
+
rc,
|
|
3978
|
+
label: c
|
|
3979
|
+
}
|
|
3980
|
+
))),
|
|
3981
|
+
/* @__PURE__ */ React.createElement(SectionLabel, { rc }, "Gray color"),
|
|
3982
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.dotGrid }, GRAY_OPTIONS.map((g) => {
|
|
3983
|
+
const dotColor = g === "auto" ? `${resolvedGrayColor}-9` : `${g}-9`;
|
|
3984
|
+
return /* @__PURE__ */ React.createElement(
|
|
3985
|
+
ColorDot,
|
|
3986
|
+
{
|
|
3987
|
+
key: g,
|
|
3988
|
+
color: dotColor,
|
|
3989
|
+
selected: grayColor === g,
|
|
3990
|
+
onPress: () => onGrayColorChange(g),
|
|
3991
|
+
rc,
|
|
3992
|
+
label: g
|
|
3993
|
+
}
|
|
3994
|
+
);
|
|
3995
|
+
})),
|
|
3996
|
+
/* @__PURE__ */ React.createElement(SectionLabel, { rc }, "Appearance"),
|
|
3997
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.segmentedRow }, /* @__PURE__ */ React.createElement(
|
|
3998
|
+
SegmentedButton,
|
|
3999
|
+
{
|
|
4000
|
+
label: "Light",
|
|
4001
|
+
icon: "\u2600\uFE0E",
|
|
4002
|
+
selected: appearance === "light",
|
|
4003
|
+
onPress: () => onAppearanceChange("light"),
|
|
4004
|
+
rc
|
|
4005
|
+
}
|
|
4006
|
+
), /* @__PURE__ */ React.createElement(
|
|
4007
|
+
SegmentedButton,
|
|
4008
|
+
{
|
|
4009
|
+
label: "Dark",
|
|
4010
|
+
icon: "\u263E",
|
|
4011
|
+
selected: appearance === "dark",
|
|
4012
|
+
onPress: () => onAppearanceChange("dark"),
|
|
4013
|
+
rc
|
|
4014
|
+
}
|
|
4015
|
+
)),
|
|
4016
|
+
/* @__PURE__ */ React.createElement(SectionLabel, { rc }, "Radius"),
|
|
4017
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.radiusRow }, RADIUS_OPTIONS.map((r) => /* @__PURE__ */ React.createElement(
|
|
4018
|
+
RadiusPreview,
|
|
4019
|
+
{
|
|
4020
|
+
key: r,
|
|
4021
|
+
token: r,
|
|
4022
|
+
selected: radius === r,
|
|
4023
|
+
onPress: () => onRadiusChange(r),
|
|
4024
|
+
rc
|
|
4025
|
+
}
|
|
4026
|
+
))),
|
|
4027
|
+
/* @__PURE__ */ React.createElement(SectionLabel, { rc }, "Scaling"),
|
|
4028
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.chipRow }, SCALING_OPTIONS.map((s) => /* @__PURE__ */ React.createElement(
|
|
4029
|
+
Chip,
|
|
4030
|
+
{
|
|
4031
|
+
key: s,
|
|
4032
|
+
label: s,
|
|
4033
|
+
selected: scaling === s,
|
|
4034
|
+
onPress: () => onScalingChange(s),
|
|
4035
|
+
rc
|
|
4036
|
+
}
|
|
4037
|
+
))),
|
|
4038
|
+
showCopyTheme && /* @__PURE__ */ React.createElement(
|
|
4039
|
+
Pressable,
|
|
4040
|
+
{
|
|
4041
|
+
style: [styles.copyButton, { backgroundColor: rc("accent-9") }],
|
|
4042
|
+
onPress: handleCopyTheme
|
|
4043
|
+
},
|
|
4044
|
+
/* @__PURE__ */ React.createElement(Text, { size: 2, weight: "bold", style: { color: rc("accent-contrast") } }, "Copy Theme")
|
|
4045
|
+
)
|
|
4046
|
+
)
|
|
4047
|
+
));
|
|
4048
|
+
}
|
|
4049
|
+
ThemeControls.displayName = "ThemeControls";
|
|
4050
|
+
function SectionLabel({ children, rc }) {
|
|
4051
|
+
return /* @__PURE__ */ React.createElement(Text, { size: 2, weight: "medium", style: { color: rc("accent-11"), marginTop: 4 } }, children);
|
|
4052
|
+
}
|
|
4053
|
+
function ColorDot({
|
|
4054
|
+
color,
|
|
4055
|
+
selected,
|
|
4056
|
+
onPress,
|
|
4057
|
+
rc,
|
|
4058
|
+
label
|
|
4059
|
+
}) {
|
|
4060
|
+
const bg = rc(color);
|
|
4061
|
+
return /* @__PURE__ */ React.createElement(
|
|
4062
|
+
Pressable,
|
|
4063
|
+
{
|
|
4064
|
+
onPress,
|
|
4065
|
+
accessibilityLabel: label,
|
|
4066
|
+
accessibilityRole: "button",
|
|
4067
|
+
style: [
|
|
4068
|
+
styles.dotOuter,
|
|
4069
|
+
selected && { borderColor: rc("gray-12") }
|
|
4070
|
+
]
|
|
4071
|
+
},
|
|
4072
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles.dotInner, { backgroundColor: bg }] })
|
|
4073
|
+
);
|
|
4074
|
+
}
|
|
4075
|
+
function SegmentedButton({
|
|
4076
|
+
label,
|
|
4077
|
+
icon,
|
|
4078
|
+
selected,
|
|
4079
|
+
onPress,
|
|
4080
|
+
rc
|
|
4081
|
+
}) {
|
|
4082
|
+
return /* @__PURE__ */ React.createElement(
|
|
4083
|
+
Pressable,
|
|
4084
|
+
{
|
|
4085
|
+
onPress,
|
|
4086
|
+
accessibilityRole: "button",
|
|
4087
|
+
style: [
|
|
4088
|
+
styles.segmentedButton,
|
|
4089
|
+
{
|
|
4090
|
+
borderColor: selected ? rc("gray-12") : rc("gray-6"),
|
|
4091
|
+
backgroundColor: selected ? rc("gray-3") : "transparent"
|
|
4092
|
+
}
|
|
4093
|
+
]
|
|
4094
|
+
},
|
|
4095
|
+
/* @__PURE__ */ React.createElement(Text, { size: 2, style: { color: rc("gray-12") } }, icon),
|
|
4096
|
+
/* @__PURE__ */ React.createElement(Text, { size: 2, weight: "medium", style: { color: rc("gray-12") } }, label)
|
|
4097
|
+
);
|
|
4098
|
+
}
|
|
4099
|
+
function RadiusPreview({
|
|
4100
|
+
token,
|
|
4101
|
+
selected,
|
|
4102
|
+
onPress,
|
|
4103
|
+
rc
|
|
4104
|
+
}) {
|
|
4105
|
+
const previewRadius = token === "full" ? 26 : getRadius(token, 5);
|
|
4106
|
+
const label = token.charAt(0).toUpperCase() + token.slice(1);
|
|
4107
|
+
const borderAccent = rc("accent-a8");
|
|
4108
|
+
return /* @__PURE__ */ React.createElement(Pressable, { onPress, accessibilityRole: "button", style: styles.radiusItem }, /* @__PURE__ */ React.createElement(
|
|
4109
|
+
View,
|
|
4110
|
+
{
|
|
4111
|
+
style: [
|
|
4112
|
+
styles.radiusCard,
|
|
4113
|
+
{
|
|
4114
|
+
borderColor: selected ? rc("gray-12") : rc("gray-6"),
|
|
4115
|
+
backgroundColor: selected ? rc("gray-3") : "transparent"
|
|
4116
|
+
}
|
|
4117
|
+
]
|
|
4118
|
+
},
|
|
4119
|
+
/* @__PURE__ */ React.createElement(
|
|
4120
|
+
View,
|
|
4121
|
+
{
|
|
4122
|
+
style: [
|
|
4123
|
+
styles.radiusPreviewShape,
|
|
4124
|
+
{
|
|
4125
|
+
backgroundColor: rc("accent-4"),
|
|
4126
|
+
borderTopLeftRadius: previewRadius,
|
|
4127
|
+
borderTopWidth: 2,
|
|
4128
|
+
borderLeftWidth: 2,
|
|
4129
|
+
borderTopColor: borderAccent,
|
|
4130
|
+
borderLeftColor: borderAccent
|
|
4131
|
+
}
|
|
4132
|
+
]
|
|
4133
|
+
}
|
|
4134
|
+
)
|
|
4135
|
+
), /* @__PURE__ */ React.createElement(Text, { size: 1, style: { color: rc("gray-11"), textAlign: "center" } }, label));
|
|
4136
|
+
}
|
|
4137
|
+
function Chip({
|
|
4138
|
+
label,
|
|
4139
|
+
selected,
|
|
4140
|
+
onPress,
|
|
4141
|
+
rc
|
|
4142
|
+
}) {
|
|
4143
|
+
return /* @__PURE__ */ React.createElement(
|
|
4144
|
+
Pressable,
|
|
4145
|
+
{
|
|
4146
|
+
onPress,
|
|
4147
|
+
accessibilityRole: "button",
|
|
4148
|
+
style: [
|
|
4149
|
+
styles.chip,
|
|
4150
|
+
{
|
|
4151
|
+
borderColor: selected ? rc("gray-12") : rc("gray-6"),
|
|
4152
|
+
backgroundColor: selected ? rc("gray-3") : "transparent"
|
|
4153
|
+
}
|
|
4154
|
+
]
|
|
4155
|
+
},
|
|
4156
|
+
/* @__PURE__ */ React.createElement(
|
|
4157
|
+
Text,
|
|
4158
|
+
{
|
|
4159
|
+
size: 2,
|
|
4160
|
+
weight: selected ? "bold" : "regular",
|
|
4161
|
+
style: { color: rc("gray-12") }
|
|
4162
|
+
},
|
|
4163
|
+
label
|
|
4164
|
+
)
|
|
4165
|
+
);
|
|
4166
|
+
}
|
|
4167
|
+
const styles = StyleSheet.create({
|
|
4168
|
+
container: {
|
|
4169
|
+
position: "absolute",
|
|
4170
|
+
top: 54,
|
|
4171
|
+
right: 12,
|
|
4172
|
+
zIndex: 1e3,
|
|
4173
|
+
alignItems: "flex-end"
|
|
4174
|
+
},
|
|
4175
|
+
toggleButton: {
|
|
4176
|
+
width: 36,
|
|
4177
|
+
height: 36,
|
|
4178
|
+
borderRadius: 8,
|
|
4179
|
+
borderWidth: 1,
|
|
4180
|
+
alignItems: "center",
|
|
4181
|
+
justifyContent: "center"
|
|
4182
|
+
},
|
|
4183
|
+
panelWrapper: {
|
|
4184
|
+
position: "absolute",
|
|
4185
|
+
top: 0,
|
|
4186
|
+
right: 0,
|
|
4187
|
+
width: PANEL_WIDTH,
|
|
4188
|
+
marginTop: 44
|
|
4189
|
+
},
|
|
4190
|
+
panel: {
|
|
4191
|
+
borderRadius: 12,
|
|
4192
|
+
borderWidth: 1
|
|
4193
|
+
},
|
|
4194
|
+
panelContent: {
|
|
4195
|
+
padding: 20,
|
|
4196
|
+
rowGap: 10
|
|
4197
|
+
},
|
|
4198
|
+
headerRow: {
|
|
4199
|
+
flexDirection: "row",
|
|
4200
|
+
alignItems: "center",
|
|
4201
|
+
justifyContent: "space-between"
|
|
4202
|
+
},
|
|
4203
|
+
closeButton: {
|
|
4204
|
+
width: 32,
|
|
4205
|
+
height: 32,
|
|
4206
|
+
borderRadius: 6,
|
|
4207
|
+
borderWidth: 1,
|
|
4208
|
+
alignItems: "center",
|
|
4209
|
+
justifyContent: "center"
|
|
4210
|
+
},
|
|
4211
|
+
dotGrid: {
|
|
4212
|
+
flexDirection: "row",
|
|
4213
|
+
flexWrap: "wrap",
|
|
4214
|
+
gap: 4
|
|
4215
|
+
},
|
|
4216
|
+
dotOuter: {
|
|
4217
|
+
width: 28,
|
|
4218
|
+
height: 28,
|
|
4219
|
+
borderRadius: 14,
|
|
4220
|
+
borderWidth: 2,
|
|
4221
|
+
borderColor: "transparent",
|
|
4222
|
+
alignItems: "center",
|
|
4223
|
+
justifyContent: "center"
|
|
4224
|
+
},
|
|
4225
|
+
dotInner: {
|
|
4226
|
+
width: 20,
|
|
4227
|
+
height: 20,
|
|
4228
|
+
borderRadius: 10
|
|
4229
|
+
},
|
|
4230
|
+
segmentedRow: {
|
|
4231
|
+
flexDirection: "row",
|
|
4232
|
+
gap: 8
|
|
4233
|
+
},
|
|
4234
|
+
segmentedButton: {
|
|
4235
|
+
flex: 1,
|
|
4236
|
+
flexDirection: "row",
|
|
4237
|
+
alignItems: "center",
|
|
4238
|
+
justifyContent: "center",
|
|
4239
|
+
gap: 6,
|
|
4240
|
+
paddingVertical: 10,
|
|
4241
|
+
borderRadius: 8,
|
|
4242
|
+
borderWidth: 1
|
|
4243
|
+
},
|
|
4244
|
+
chipRow: {
|
|
4245
|
+
flexDirection: "row",
|
|
4246
|
+
flexWrap: "wrap",
|
|
4247
|
+
gap: 6
|
|
4248
|
+
},
|
|
4249
|
+
chip: {
|
|
4250
|
+
paddingHorizontal: 12,
|
|
4251
|
+
paddingVertical: 6,
|
|
4252
|
+
borderRadius: 6,
|
|
4253
|
+
borderWidth: 1
|
|
4254
|
+
},
|
|
4255
|
+
radiusRow: {
|
|
4256
|
+
flexDirection: "row",
|
|
4257
|
+
gap: 6
|
|
4258
|
+
},
|
|
4259
|
+
radiusItem: {
|
|
4260
|
+
flex: 1,
|
|
4261
|
+
alignItems: "center",
|
|
4262
|
+
gap: 6
|
|
4263
|
+
},
|
|
4264
|
+
radiusCard: {
|
|
4265
|
+
width: "100%",
|
|
4266
|
+
aspectRatio: 1,
|
|
4267
|
+
borderRadius: 8,
|
|
4268
|
+
borderWidth: 1,
|
|
4269
|
+
alignItems: "center",
|
|
4270
|
+
justifyContent: "center"
|
|
4271
|
+
},
|
|
4272
|
+
radiusPreviewShape: {
|
|
4273
|
+
width: 32,
|
|
4274
|
+
height: 32
|
|
4275
|
+
},
|
|
4276
|
+
copyButton: {
|
|
4277
|
+
marginTop: 6,
|
|
4278
|
+
paddingVertical: 10,
|
|
4279
|
+
borderRadius: 8,
|
|
4280
|
+
alignItems: "center",
|
|
4281
|
+
justifyContent: "center"
|
|
4282
|
+
}
|
|
4283
|
+
});
|
|
4284
|
+
|
|
4285
|
+
export { Blockquote, Box, Button, Checkbox, CheckboxCards, CheckboxGroup, Code, Em, Flex, Grid, Heading, Kbd, Link, Quote, Strong, Text, Theme, ThemeControls, applyScaling, createTheme, fontSize, getClassicEffect, getFullRadius, getRadius, headingLineHeight, letterSpacingEm, lineHeight, resolveColor, resolveSpace, scalingMap, space, useResolveColor, useThemeContext };
|