@anyknown/ui 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/brand.css +100 -0
- package/dist/components/badge/Badge.d.ts +11 -3
- package/dist/components/badge/Badge.js +21 -3
- package/dist/components/data-table/DataTable.d.ts +7 -1
- package/dist/components/data-table/DataTable.js +34 -34
- package/dist/components/dialog/Dialog.d.ts +6 -1
- package/dist/components/dialog/Dialog.js +10 -2
- package/dist/components/live-dot/LiveDot.d.ts +7 -0
- package/dist/components/live-dot/LiveDot.js +35 -0
- package/dist/components/message/Message.d.ts +3 -1
- package/dist/components/message/Message.js +2 -2
- package/dist/components/slider/Slider.d.ts +19 -0
- package/dist/components/slider/Slider.js +103 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/lib/layers.d.ts +7 -0
- package/dist/lib/layers.js +12 -0
- package/dist/themes.stylex.d.ts +311 -0
- package/dist/themes.stylex.js +126 -0
- package/dist/tokens.css +90 -0
- package/dist/tokens.stylex.d.ts +5 -0
- package/dist/tokens.stylex.js +7 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { Checkbox, type CheckboxProps } from "./components/checkbox/Checkbox.js"
|
|
|
9
9
|
export { Radio, type RadioProps } from "./components/radio/Radio.js";
|
|
10
10
|
export { RadioGroup, type RadioGroupProps } from "./components/radio/RadioGroup.js";
|
|
11
11
|
export { Switch, type SwitchProps } from "./components/switch/Switch.js";
|
|
12
|
+
export { Slider, type SliderProps } from "./components/slider/Slider.js";
|
|
12
13
|
export { Select, SelectGroup, SelectItem, type SelectProps, type SelectGroupProps, type SelectItemProps, } from "./components/select/Select.js";
|
|
13
14
|
export { DropdownMenu, DropdownItem, DropdownCheckboxItem, DropdownGroup, DropdownSeparator, DropdownSub, type DropdownMenuProps, type DropdownItemProps, type DropdownCheckboxItemProps, type DropdownGroupProps, type DropdownSubProps, } from "./components/dropdown/DropdownMenu.js";
|
|
14
15
|
export { Dialog, DialogTrigger, DialogContent, DialogActions, DialogClose, ConfirmDialog, } from "./components/dialog/Dialog.js";
|
|
@@ -42,7 +43,9 @@ export type { HandoffReceiptProps, HandoffReason } from "./components/handoff-re
|
|
|
42
43
|
export { Composer } from "./components/composer/Composer.js";
|
|
43
44
|
export type { ComposerProps, SourceRef, SlashCommand } from "./components/composer/Composer.js";
|
|
44
45
|
export { VoiceIndicator, type VoiceIndicatorProps } from "./components/voice-indicator/VoiceIndicator.js";
|
|
46
|
+
export { LiveDot, type LiveDotProps } from "./components/live-dot/LiveDot.js";
|
|
45
47
|
export type { VoiceState } from "./lib/voice.js";
|
|
48
|
+
export { layerUp, type LayerName } from "./lib/layers.js";
|
|
46
49
|
export { PasswordInput, defaultScorer } from "./components/password-input/PasswordInput.js";
|
|
47
50
|
export type { PasswordInputProps } from "./components/password-input/PasswordInput.js";
|
|
48
51
|
export { RecoveryKey, type RecoveryKeyProps } from "./components/recovery-key/RecoveryKey.js";
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { Checkbox } from "./components/checkbox/Checkbox.js";
|
|
|
9
9
|
export { Radio } from "./components/radio/Radio.js";
|
|
10
10
|
export { RadioGroup } from "./components/radio/RadioGroup.js";
|
|
11
11
|
export { Switch } from "./components/switch/Switch.js";
|
|
12
|
+
export { Slider } from "./components/slider/Slider.js";
|
|
12
13
|
export { Select, SelectGroup, SelectItem, } from "./components/select/Select.js";
|
|
13
14
|
export { DropdownMenu, DropdownItem, DropdownCheckboxItem, DropdownGroup, DropdownSeparator, DropdownSub, } from "./components/dropdown/DropdownMenu.js";
|
|
14
15
|
export { Dialog, DialogTrigger, DialogContent, DialogActions, DialogClose, ConfirmDialog, } from "./components/dialog/Dialog.js";
|
|
@@ -30,6 +31,8 @@ export { PermissionCard, DecisionCard } from "./components/interaction-card/Inte
|
|
|
30
31
|
export { HandoffReceipt } from "./components/handoff-receipt/HandoffReceipt.js";
|
|
31
32
|
export { Composer } from "./components/composer/Composer.js";
|
|
32
33
|
export { VoiceIndicator } from "./components/voice-indicator/VoiceIndicator.js";
|
|
34
|
+
export { LiveDot } from "./components/live-dot/LiveDot.js";
|
|
35
|
+
export { layerUp } from "./lib/layers.js";
|
|
33
36
|
export { PasswordInput, defaultScorer } from "./components/password-input/PasswordInput.js";
|
|
34
37
|
export { RecoveryKey } from "./components/recovery-key/RecoveryKey.js";
|
|
35
38
|
export { Dropzone, UploadList } from "./components/dropzone/Dropzone.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** rail → main → 訊息 → fold → 列。數字越大越深,面與面靠深淺分,不靠邊框。 */
|
|
2
|
+
export type LayerName = "layer1" | "layer2" | "layer3" | "layer4" | "layer5";
|
|
3
|
+
/**
|
|
4
|
+
* hover 升一階:一塊面的 hover 底色就是下一階。
|
|
5
|
+
* layer5 已經是最深的一階,再深的那一階沒有名字,用 borderStrong。
|
|
6
|
+
*/
|
|
7
|
+
export declare const layerUp: Record<LayerName, string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { color } from "../tokens.stylex.js";
|
|
2
|
+
/**
|
|
3
|
+
* hover 升一階:一塊面的 hover 底色就是下一階。
|
|
4
|
+
* layer5 已經是最深的一階,再深的那一階沒有名字,用 borderStrong。
|
|
5
|
+
*/
|
|
6
|
+
export const layerUp = {
|
|
7
|
+
layer1: color.layer2,
|
|
8
|
+
layer2: color.layer3,
|
|
9
|
+
layer3: color.layer4,
|
|
10
|
+
layer4: color.layer5,
|
|
11
|
+
layer5: color.borderStrong,
|
|
12
|
+
};
|
package/dist/themes.stylex.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ export declare const lightColor: stylex.Theme<stylex.VarGroup<Readonly<{
|
|
|
24
24
|
sheen: string;
|
|
25
25
|
successHl: string;
|
|
26
26
|
dangerHl: string;
|
|
27
|
+
layer1: string;
|
|
28
|
+
layer2: string;
|
|
29
|
+
layer3: string;
|
|
30
|
+
layer4: string;
|
|
31
|
+
layer5: string;
|
|
27
32
|
}>, symbol>, symbol>;
|
|
28
33
|
export declare const lightYarn: stylex.Theme<stylex.VarGroup<Readonly<{
|
|
29
34
|
un: string;
|
|
@@ -108,6 +113,11 @@ export declare const darkColor: stylex.Theme<stylex.VarGroup<Readonly<{
|
|
|
108
113
|
sheen: string;
|
|
109
114
|
successHl: string;
|
|
110
115
|
dangerHl: string;
|
|
116
|
+
layer1: string;
|
|
117
|
+
layer2: string;
|
|
118
|
+
layer3: string;
|
|
119
|
+
layer4: string;
|
|
120
|
+
layer5: string;
|
|
111
121
|
}>, symbol>, symbol>;
|
|
112
122
|
export declare const darkYarn: stylex.Theme<stylex.VarGroup<Readonly<{
|
|
113
123
|
un: string;
|
|
@@ -167,6 +177,99 @@ export declare const darkShadow: stylex.Theme<stylex.VarGroup<Readonly<{
|
|
|
167
177
|
popover: string;
|
|
168
178
|
raised: string;
|
|
169
179
|
}>, symbol>, symbol>;
|
|
180
|
+
export declare const neutralColor: stylex.Theme<stylex.VarGroup<Readonly<{
|
|
181
|
+
bg: string;
|
|
182
|
+
surface: string;
|
|
183
|
+
surfaceRaised: string;
|
|
184
|
+
border: string;
|
|
185
|
+
borderStrong: string;
|
|
186
|
+
text: string;
|
|
187
|
+
textMuted: string;
|
|
188
|
+
textFaint: string;
|
|
189
|
+
accent: string;
|
|
190
|
+
accentText: string;
|
|
191
|
+
accentSubtle: string;
|
|
192
|
+
danger: string;
|
|
193
|
+
dangerSubtle: string;
|
|
194
|
+
success: string;
|
|
195
|
+
successSubtle: string;
|
|
196
|
+
warning: string;
|
|
197
|
+
warningSubtle: string;
|
|
198
|
+
info: string;
|
|
199
|
+
infoSubtle: string;
|
|
200
|
+
focusRing: string;
|
|
201
|
+
bone: string;
|
|
202
|
+
sheen: string;
|
|
203
|
+
successHl: string;
|
|
204
|
+
dangerHl: string;
|
|
205
|
+
layer1: string;
|
|
206
|
+
layer2: string;
|
|
207
|
+
layer3: string;
|
|
208
|
+
layer4: string;
|
|
209
|
+
layer5: string;
|
|
210
|
+
}>, symbol>, symbol>;
|
|
211
|
+
export declare const neutralLightColor: stylex.Theme<stylex.VarGroup<Readonly<{
|
|
212
|
+
bg: string;
|
|
213
|
+
surface: string;
|
|
214
|
+
surfaceRaised: string;
|
|
215
|
+
border: string;
|
|
216
|
+
borderStrong: string;
|
|
217
|
+
text: string;
|
|
218
|
+
textMuted: string;
|
|
219
|
+
textFaint: string;
|
|
220
|
+
accent: string;
|
|
221
|
+
accentText: string;
|
|
222
|
+
accentSubtle: string;
|
|
223
|
+
danger: string;
|
|
224
|
+
dangerSubtle: string;
|
|
225
|
+
success: string;
|
|
226
|
+
successSubtle: string;
|
|
227
|
+
warning: string;
|
|
228
|
+
warningSubtle: string;
|
|
229
|
+
info: string;
|
|
230
|
+
infoSubtle: string;
|
|
231
|
+
focusRing: string;
|
|
232
|
+
bone: string;
|
|
233
|
+
sheen: string;
|
|
234
|
+
successHl: string;
|
|
235
|
+
dangerHl: string;
|
|
236
|
+
layer1: string;
|
|
237
|
+
layer2: string;
|
|
238
|
+
layer3: string;
|
|
239
|
+
layer4: string;
|
|
240
|
+
layer5: string;
|
|
241
|
+
}>, symbol>, symbol>;
|
|
242
|
+
export declare const neutralDarkColor: stylex.Theme<stylex.VarGroup<Readonly<{
|
|
243
|
+
bg: string;
|
|
244
|
+
surface: string;
|
|
245
|
+
surfaceRaised: string;
|
|
246
|
+
border: string;
|
|
247
|
+
borderStrong: string;
|
|
248
|
+
text: string;
|
|
249
|
+
textMuted: string;
|
|
250
|
+
textFaint: string;
|
|
251
|
+
accent: string;
|
|
252
|
+
accentText: string;
|
|
253
|
+
accentSubtle: string;
|
|
254
|
+
danger: string;
|
|
255
|
+
dangerSubtle: string;
|
|
256
|
+
success: string;
|
|
257
|
+
successSubtle: string;
|
|
258
|
+
warning: string;
|
|
259
|
+
warningSubtle: string;
|
|
260
|
+
info: string;
|
|
261
|
+
infoSubtle: string;
|
|
262
|
+
focusRing: string;
|
|
263
|
+
bone: string;
|
|
264
|
+
sheen: string;
|
|
265
|
+
successHl: string;
|
|
266
|
+
dangerHl: string;
|
|
267
|
+
layer1: string;
|
|
268
|
+
layer2: string;
|
|
269
|
+
layer3: string;
|
|
270
|
+
layer4: string;
|
|
271
|
+
layer5: string;
|
|
272
|
+
}>, symbol>, symbol>;
|
|
170
273
|
/** 套在 root element 上:`<div {...stylex.props(...light)}>` */
|
|
171
274
|
export declare const light: readonly [stylex.Theme<stylex.VarGroup<Readonly<{
|
|
172
275
|
bg: string;
|
|
@@ -193,6 +296,11 @@ export declare const light: readonly [stylex.Theme<stylex.VarGroup<Readonly<{
|
|
|
193
296
|
sheen: string;
|
|
194
297
|
successHl: string;
|
|
195
298
|
dangerHl: string;
|
|
299
|
+
layer1: string;
|
|
300
|
+
layer2: string;
|
|
301
|
+
layer3: string;
|
|
302
|
+
layer4: string;
|
|
303
|
+
layer5: string;
|
|
196
304
|
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
197
305
|
un: string;
|
|
198
306
|
sh: string;
|
|
@@ -271,6 +379,209 @@ export declare const dark: readonly [stylex.Theme<stylex.VarGroup<Readonly<{
|
|
|
271
379
|
sheen: string;
|
|
272
380
|
successHl: string;
|
|
273
381
|
dangerHl: string;
|
|
382
|
+
layer1: string;
|
|
383
|
+
layer2: string;
|
|
384
|
+
layer3: string;
|
|
385
|
+
layer4: string;
|
|
386
|
+
layer5: string;
|
|
387
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
388
|
+
un: string;
|
|
389
|
+
sh: string;
|
|
390
|
+
y0: string;
|
|
391
|
+
y1: string;
|
|
392
|
+
y2: string;
|
|
393
|
+
y3: string;
|
|
394
|
+
y4: string;
|
|
395
|
+
hi: string;
|
|
396
|
+
shadow: string;
|
|
397
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
398
|
+
un: string;
|
|
399
|
+
sh: string;
|
|
400
|
+
y0: string;
|
|
401
|
+
y1: string;
|
|
402
|
+
y2: string;
|
|
403
|
+
y3: string;
|
|
404
|
+
y4: string;
|
|
405
|
+
hi: string;
|
|
406
|
+
shadow: string;
|
|
407
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
408
|
+
un: string;
|
|
409
|
+
sh: string;
|
|
410
|
+
y0: string;
|
|
411
|
+
y1: string;
|
|
412
|
+
y2: string;
|
|
413
|
+
y3: string;
|
|
414
|
+
y4: string;
|
|
415
|
+
hi: string;
|
|
416
|
+
shadow: string;
|
|
417
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
418
|
+
un: string;
|
|
419
|
+
sh: string;
|
|
420
|
+
y0: string;
|
|
421
|
+
y1: string;
|
|
422
|
+
y2: string;
|
|
423
|
+
y3: string;
|
|
424
|
+
y4: string;
|
|
425
|
+
hi: string;
|
|
426
|
+
shadow: string;
|
|
427
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
428
|
+
un: string;
|
|
429
|
+
sh: string;
|
|
430
|
+
y0: string;
|
|
431
|
+
y1: string;
|
|
432
|
+
y2: string;
|
|
433
|
+
y3: string;
|
|
434
|
+
y4: string;
|
|
435
|
+
hi: string;
|
|
436
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
437
|
+
popover: string;
|
|
438
|
+
raised: string;
|
|
439
|
+
}>, symbol>, symbol>];
|
|
440
|
+
/** neutral palette。`neutral` 跟隨系統 scheme,另外兩個鎖定。 */
|
|
441
|
+
export declare const neutral: readonly [stylex.Theme<stylex.VarGroup<Readonly<{
|
|
442
|
+
bg: string;
|
|
443
|
+
surface: string;
|
|
444
|
+
surfaceRaised: string;
|
|
445
|
+
border: string;
|
|
446
|
+
borderStrong: string;
|
|
447
|
+
text: string;
|
|
448
|
+
textMuted: string;
|
|
449
|
+
textFaint: string;
|
|
450
|
+
accent: string;
|
|
451
|
+
accentText: string;
|
|
452
|
+
accentSubtle: string;
|
|
453
|
+
danger: string;
|
|
454
|
+
dangerSubtle: string;
|
|
455
|
+
success: string;
|
|
456
|
+
successSubtle: string;
|
|
457
|
+
warning: string;
|
|
458
|
+
warningSubtle: string;
|
|
459
|
+
info: string;
|
|
460
|
+
infoSubtle: string;
|
|
461
|
+
focusRing: string;
|
|
462
|
+
bone: string;
|
|
463
|
+
sheen: string;
|
|
464
|
+
successHl: string;
|
|
465
|
+
dangerHl: string;
|
|
466
|
+
layer1: string;
|
|
467
|
+
layer2: string;
|
|
468
|
+
layer3: string;
|
|
469
|
+
layer4: string;
|
|
470
|
+
layer5: string;
|
|
471
|
+
}>, symbol>, symbol>];
|
|
472
|
+
export declare const neutralLight: readonly [stylex.Theme<stylex.VarGroup<Readonly<{
|
|
473
|
+
bg: string;
|
|
474
|
+
surface: string;
|
|
475
|
+
surfaceRaised: string;
|
|
476
|
+
border: string;
|
|
477
|
+
borderStrong: string;
|
|
478
|
+
text: string;
|
|
479
|
+
textMuted: string;
|
|
480
|
+
textFaint: string;
|
|
481
|
+
accent: string;
|
|
482
|
+
accentText: string;
|
|
483
|
+
accentSubtle: string;
|
|
484
|
+
danger: string;
|
|
485
|
+
dangerSubtle: string;
|
|
486
|
+
success: string;
|
|
487
|
+
successSubtle: string;
|
|
488
|
+
warning: string;
|
|
489
|
+
warningSubtle: string;
|
|
490
|
+
info: string;
|
|
491
|
+
infoSubtle: string;
|
|
492
|
+
focusRing: string;
|
|
493
|
+
bone: string;
|
|
494
|
+
sheen: string;
|
|
495
|
+
successHl: string;
|
|
496
|
+
dangerHl: string;
|
|
497
|
+
layer1: string;
|
|
498
|
+
layer2: string;
|
|
499
|
+
layer3: string;
|
|
500
|
+
layer4: string;
|
|
501
|
+
layer5: string;
|
|
502
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
503
|
+
un: string;
|
|
504
|
+
sh: string;
|
|
505
|
+
y0: string;
|
|
506
|
+
y1: string;
|
|
507
|
+
y2: string;
|
|
508
|
+
y3: string;
|
|
509
|
+
y4: string;
|
|
510
|
+
hi: string;
|
|
511
|
+
shadow: string;
|
|
512
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
513
|
+
un: string;
|
|
514
|
+
sh: string;
|
|
515
|
+
y0: string;
|
|
516
|
+
y1: string;
|
|
517
|
+
y2: string;
|
|
518
|
+
y3: string;
|
|
519
|
+
y4: string;
|
|
520
|
+
hi: string;
|
|
521
|
+
shadow: string;
|
|
522
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
523
|
+
un: string;
|
|
524
|
+
sh: string;
|
|
525
|
+
y0: string;
|
|
526
|
+
y1: string;
|
|
527
|
+
y2: string;
|
|
528
|
+
y3: string;
|
|
529
|
+
y4: string;
|
|
530
|
+
hi: string;
|
|
531
|
+
shadow: string;
|
|
532
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
533
|
+
un: string;
|
|
534
|
+
sh: string;
|
|
535
|
+
y0: string;
|
|
536
|
+
y1: string;
|
|
537
|
+
y2: string;
|
|
538
|
+
y3: string;
|
|
539
|
+
y4: string;
|
|
540
|
+
hi: string;
|
|
541
|
+
shadow: string;
|
|
542
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
543
|
+
un: string;
|
|
544
|
+
sh: string;
|
|
545
|
+
y0: string;
|
|
546
|
+
y1: string;
|
|
547
|
+
y2: string;
|
|
548
|
+
y3: string;
|
|
549
|
+
y4: string;
|
|
550
|
+
hi: string;
|
|
551
|
+
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
552
|
+
popover: string;
|
|
553
|
+
raised: string;
|
|
554
|
+
}>, symbol>, symbol>];
|
|
555
|
+
export declare const neutralDark: readonly [stylex.Theme<stylex.VarGroup<Readonly<{
|
|
556
|
+
bg: string;
|
|
557
|
+
surface: string;
|
|
558
|
+
surfaceRaised: string;
|
|
559
|
+
border: string;
|
|
560
|
+
borderStrong: string;
|
|
561
|
+
text: string;
|
|
562
|
+
textMuted: string;
|
|
563
|
+
textFaint: string;
|
|
564
|
+
accent: string;
|
|
565
|
+
accentText: string;
|
|
566
|
+
accentSubtle: string;
|
|
567
|
+
danger: string;
|
|
568
|
+
dangerSubtle: string;
|
|
569
|
+
success: string;
|
|
570
|
+
successSubtle: string;
|
|
571
|
+
warning: string;
|
|
572
|
+
warningSubtle: string;
|
|
573
|
+
info: string;
|
|
574
|
+
infoSubtle: string;
|
|
575
|
+
focusRing: string;
|
|
576
|
+
bone: string;
|
|
577
|
+
sheen: string;
|
|
578
|
+
successHl: string;
|
|
579
|
+
dangerHl: string;
|
|
580
|
+
layer1: string;
|
|
581
|
+
layer2: string;
|
|
582
|
+
layer3: string;
|
|
583
|
+
layer4: string;
|
|
584
|
+
layer5: string;
|
|
274
585
|
}>, symbol>, symbol>, stylex.Theme<stylex.VarGroup<Readonly<{
|
|
275
586
|
un: string;
|
|
276
587
|
sh: string;
|
package/dist/themes.stylex.js
CHANGED
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
//
|
|
4
4
|
// 給有使用者切換主題的 app(例如 next-themes)。tokens 本身跟隨 OS,套上 theme 才會鎖定。
|
|
5
5
|
// **要套就整組套**:只套 color 會讓布停在另一個主題,深色布配深色字。
|
|
6
|
+
//
|
|
7
|
+
// palette 是另一個維度:neutral 只換 color(紙與墨),布跟著亮暗走。
|
|
6
8
|
import * as stylex from "@stylexjs/stylex";
|
|
7
9
|
import { color, yarn, yarnSecondary, yarnGhost, yarnDanger, yarnSubtle, shadow } from "./tokens.stylex.js";
|
|
10
|
+
const DARK = "@media (prefers-color-scheme: dark)";
|
|
8
11
|
export const lightColor = stylex.createTheme(color, {
|
|
9
12
|
bg: "#FAFAF6",
|
|
10
13
|
surface: "#FFFFFF",
|
|
@@ -30,6 +33,11 @@ export const lightColor = stylex.createTheme(color, {
|
|
|
30
33
|
sheen: "#F6F4EC",
|
|
31
34
|
successHl: "#C6E0C6",
|
|
32
35
|
dangerHl: "#EFCEC3",
|
|
36
|
+
layer1: "#EFECE3",
|
|
37
|
+
layer2: "#FAFAF6",
|
|
38
|
+
layer3: "#F1EFE7",
|
|
39
|
+
layer4: "#E8E5DA",
|
|
40
|
+
layer5: "#DEDACD",
|
|
33
41
|
});
|
|
34
42
|
export const lightYarn = stylex.createTheme(yarn, {
|
|
35
43
|
un: "#11362C",
|
|
@@ -114,6 +122,11 @@ export const darkColor = stylex.createTheme(color, {
|
|
|
114
122
|
sheen: "#35302A",
|
|
115
123
|
successHl: "#2F4A2E",
|
|
116
124
|
dangerHl: "#573328",
|
|
125
|
+
layer1: "#0E0C09",
|
|
126
|
+
layer2: "#181613",
|
|
127
|
+
layer3: "#211E19",
|
|
128
|
+
layer4: "#2B2721",
|
|
129
|
+
layer5: "#35302A",
|
|
117
130
|
});
|
|
118
131
|
export const darkYarn = stylex.createTheme(yarn, {
|
|
119
132
|
un: "#173629",
|
|
@@ -173,6 +186,99 @@ export const darkShadow = stylex.createTheme(shadow, {
|
|
|
173
186
|
popover: "0 8px 24px rgba(0, 0, 0, 0.4)",
|
|
174
187
|
raised: "0 1px 2px rgba(0, 0, 0, 0.3)",
|
|
175
188
|
});
|
|
189
|
+
export const neutralColor = stylex.createTheme(color, {
|
|
190
|
+
bg: { default: "#FFFFFF", [DARK]: "#000000" },
|
|
191
|
+
surface: { default: "#F5F5F7", [DARK]: "#1C1C1E" },
|
|
192
|
+
surfaceRaised: { default: "#FFFFFF", [DARK]: "#2C2C2E" },
|
|
193
|
+
border: { default: "#E5E5EA", [DARK]: "#38383A" },
|
|
194
|
+
borderStrong: { default: "#C7C7CC", [DARK]: "#48484A" },
|
|
195
|
+
text: { default: "#1D1D1F", [DARK]: "#F5F5F7" },
|
|
196
|
+
textMuted: { default: "#6E6E73", [DARK]: "#98989D" },
|
|
197
|
+
textFaint: { default: "#86868B", [DARK]: "#8E8E93" },
|
|
198
|
+
accent: { default: "#1D1D1F", [DARK]: "#F5F5F7" },
|
|
199
|
+
accentText: { default: "#FFFFFF", [DARK]: "#000000" },
|
|
200
|
+
accentSubtle: { default: "#E8E8ED", [DARK]: "#2C2C2E" },
|
|
201
|
+
danger: { default: "#B3402E", [DARK]: "#DD7059" },
|
|
202
|
+
dangerSubtle: { default: "#F7E7E3", [DARK]: "#3D231E" },
|
|
203
|
+
success: { default: "#23705A", [DARK]: "#4FA184" },
|
|
204
|
+
successSubtle: { default: "#E7F0EB", [DARK]: "#22352E" },
|
|
205
|
+
warning: { default: "#B25000", [DARK]: "#FFB340" },
|
|
206
|
+
warningSubtle: { default: "#F5EBD9", [DARK]: "#3A2F1D" },
|
|
207
|
+
info: { default: "#2C5C86", [DARK]: "#6FA3CE" },
|
|
208
|
+
infoSubtle: { default: "#E4EDF5", [DARK]: "#1E2C38" },
|
|
209
|
+
focusRing: { default: "#1D1D1F", [DARK]: "#F5F5F7" },
|
|
210
|
+
bone: { default: "#E6E6EA", [DARK]: "#2C2C2E" },
|
|
211
|
+
sheen: { default: "#F2F2F5", [DARK]: "#3F3F42" },
|
|
212
|
+
successHl: { default: "#C6E0C6", [DARK]: "#2F4A2E" },
|
|
213
|
+
dangerHl: { default: "#EFCEC3", [DARK]: "#573328" },
|
|
214
|
+
layer1: { default: "#EFEFF2", [DARK]: "#000000" },
|
|
215
|
+
layer2: { default: "#FFFFFF", [DARK]: "#161618" },
|
|
216
|
+
layer3: { default: "#F2F2F5", [DARK]: "#242426" },
|
|
217
|
+
layer4: { default: "#E6E6EA", [DARK]: "#323234" },
|
|
218
|
+
layer5: { default: "#D9D9DE", [DARK]: "#3F3F42" },
|
|
219
|
+
});
|
|
220
|
+
export const neutralLightColor = stylex.createTheme(color, {
|
|
221
|
+
bg: "#FFFFFF",
|
|
222
|
+
surface: "#F5F5F7",
|
|
223
|
+
surfaceRaised: "#FFFFFF",
|
|
224
|
+
border: "#E5E5EA",
|
|
225
|
+
borderStrong: "#C7C7CC",
|
|
226
|
+
text: "#1D1D1F",
|
|
227
|
+
textMuted: "#6E6E73",
|
|
228
|
+
textFaint: "#86868B",
|
|
229
|
+
accent: "#1D1D1F",
|
|
230
|
+
accentText: "#FFFFFF",
|
|
231
|
+
accentSubtle: "#E8E8ED",
|
|
232
|
+
danger: "#B3402E",
|
|
233
|
+
dangerSubtle: "#F7E7E3",
|
|
234
|
+
success: "#23705A",
|
|
235
|
+
successSubtle: "#E7F0EB",
|
|
236
|
+
warning: "#B25000",
|
|
237
|
+
warningSubtle: "#F5EBD9",
|
|
238
|
+
info: "#2C5C86",
|
|
239
|
+
infoSubtle: "#E4EDF5",
|
|
240
|
+
focusRing: "#1D1D1F",
|
|
241
|
+
bone: "#E6E6EA",
|
|
242
|
+
sheen: "#F2F2F5",
|
|
243
|
+
successHl: "#C6E0C6",
|
|
244
|
+
dangerHl: "#EFCEC3",
|
|
245
|
+
layer1: "#EFEFF2",
|
|
246
|
+
layer2: "#FFFFFF",
|
|
247
|
+
layer3: "#F2F2F5",
|
|
248
|
+
layer4: "#E6E6EA",
|
|
249
|
+
layer5: "#D9D9DE",
|
|
250
|
+
});
|
|
251
|
+
export const neutralDarkColor = stylex.createTheme(color, {
|
|
252
|
+
bg: "#000000",
|
|
253
|
+
surface: "#1C1C1E",
|
|
254
|
+
surfaceRaised: "#2C2C2E",
|
|
255
|
+
border: "#38383A",
|
|
256
|
+
borderStrong: "#48484A",
|
|
257
|
+
text: "#F5F5F7",
|
|
258
|
+
textMuted: "#98989D",
|
|
259
|
+
textFaint: "#8E8E93",
|
|
260
|
+
accent: "#F5F5F7",
|
|
261
|
+
accentText: "#000000",
|
|
262
|
+
accentSubtle: "#2C2C2E",
|
|
263
|
+
danger: "#DD7059",
|
|
264
|
+
dangerSubtle: "#3D231E",
|
|
265
|
+
success: "#4FA184",
|
|
266
|
+
successSubtle: "#22352E",
|
|
267
|
+
warning: "#FFB340",
|
|
268
|
+
warningSubtle: "#3A2F1D",
|
|
269
|
+
info: "#6FA3CE",
|
|
270
|
+
infoSubtle: "#1E2C38",
|
|
271
|
+
focusRing: "#F5F5F7",
|
|
272
|
+
bone: "#2C2C2E",
|
|
273
|
+
sheen: "#3F3F42",
|
|
274
|
+
successHl: "#2F4A2E",
|
|
275
|
+
dangerHl: "#573328",
|
|
276
|
+
layer1: "#000000",
|
|
277
|
+
layer2: "#161618",
|
|
278
|
+
layer3: "#242426",
|
|
279
|
+
layer4: "#323234",
|
|
280
|
+
layer5: "#3F3F42",
|
|
281
|
+
});
|
|
176
282
|
/** 套在 root element 上:`<div {...stylex.props(...light)}>` */
|
|
177
283
|
export const light = [
|
|
178
284
|
lightColor,
|
|
@@ -192,3 +298,23 @@ export const dark = [
|
|
|
192
298
|
darkYarnSubtle,
|
|
193
299
|
darkShadow,
|
|
194
300
|
];
|
|
301
|
+
/** neutral palette。`neutral` 跟隨系統 scheme,另外兩個鎖定。 */
|
|
302
|
+
export const neutral = [neutralColor];
|
|
303
|
+
export const neutralLight = [
|
|
304
|
+
neutralLightColor,
|
|
305
|
+
lightYarn,
|
|
306
|
+
lightYarnSecondary,
|
|
307
|
+
lightYarnGhost,
|
|
308
|
+
lightYarnDanger,
|
|
309
|
+
lightYarnSubtle,
|
|
310
|
+
lightShadow,
|
|
311
|
+
];
|
|
312
|
+
export const neutralDark = [
|
|
313
|
+
neutralDarkColor,
|
|
314
|
+
darkYarn,
|
|
315
|
+
darkYarnSecondary,
|
|
316
|
+
darkYarnGhost,
|
|
317
|
+
darkYarnDanger,
|
|
318
|
+
darkYarnSubtle,
|
|
319
|
+
darkShadow,
|
|
320
|
+
];
|
package/dist/tokens.css
CHANGED
|
@@ -33,6 +33,12 @@ html {
|
|
|
33
33
|
--ak-success-hl: #c6e0c6;
|
|
34
34
|
--ak-danger-hl: #efcec3;
|
|
35
35
|
|
|
36
|
+
--ak-layer1: #efece3;
|
|
37
|
+
--ak-layer2: #fafaf6;
|
|
38
|
+
--ak-layer3: #f1efe7;
|
|
39
|
+
--ak-layer4: #e8e5da;
|
|
40
|
+
--ak-layer5: #dedacd;
|
|
41
|
+
|
|
36
42
|
--ak-shadow-popover: 0 8px 24px rgba(35, 33, 29, 0.1);
|
|
37
43
|
--ak-shadow-raised: 0 1px 2px rgba(35, 33, 29, 0.08);
|
|
38
44
|
|
|
@@ -81,12 +87,23 @@ html {
|
|
|
81
87
|
--ak-success-hl: #2f4a2e;
|
|
82
88
|
--ak-danger-hl: #573328;
|
|
83
89
|
|
|
90
|
+
--ak-layer1: #0e0c09;
|
|
91
|
+
--ak-layer2: #181613;
|
|
92
|
+
--ak-layer3: #211e19;
|
|
93
|
+
--ak-layer4: #2b2721;
|
|
94
|
+
--ak-layer5: #35302a;
|
|
95
|
+
|
|
84
96
|
--ak-shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.4);
|
|
85
97
|
--ak-shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
86
98
|
}
|
|
87
99
|
}
|
|
88
100
|
|
|
89
101
|
[data-theme="dark"] {
|
|
102
|
+
--ak-layer1: #0e0c09;
|
|
103
|
+
--ak-layer2: #181613;
|
|
104
|
+
--ak-layer3: #211e19;
|
|
105
|
+
--ak-layer4: #2b2721;
|
|
106
|
+
--ak-layer5: #35302a;
|
|
90
107
|
--ak-bone: #2a2620;
|
|
91
108
|
--ak-sheen: #35302a;
|
|
92
109
|
--ak-success-hl: #2f4a2e;
|
|
@@ -114,3 +131,76 @@ html {
|
|
|
114
131
|
--ak-info-subtle: #1e2c38;
|
|
115
132
|
--ak-focus-ring: #4fa184;
|
|
116
133
|
}
|
|
134
|
+
|
|
135
|
+
/* neutral palette:紙與墨換一套,語意色(danger / success / info)不換。
|
|
136
|
+
* 掛在 <html> 上:data-palette="neutral";亮暗照樣跟系統,data-theme 才鎖。 */
|
|
137
|
+
[data-palette="neutral"] {
|
|
138
|
+
--ak-bg: #ffffff;
|
|
139
|
+
--ak-surface: #f5f5f7;
|
|
140
|
+
--ak-surface-raised: #ffffff;
|
|
141
|
+
--ak-border: #e5e5ea;
|
|
142
|
+
--ak-border-strong: #c7c7cc;
|
|
143
|
+
--ak-text: #1d1d1f;
|
|
144
|
+
--ak-text-muted: #6e6e73;
|
|
145
|
+
--ak-text-faint: #86868b;
|
|
146
|
+
--ak-accent: #1d1d1f;
|
|
147
|
+
--ak-accent-text: #ffffff;
|
|
148
|
+
--ak-accent-subtle: #e8e8ed;
|
|
149
|
+
--ak-warning: #b25000;
|
|
150
|
+
--ak-focus-ring: #1d1d1f;
|
|
151
|
+
--ak-bone: #e6e6ea;
|
|
152
|
+
--ak-sheen: #f2f2f5;
|
|
153
|
+
--ak-layer1: #efeff2;
|
|
154
|
+
--ak-layer2: #ffffff;
|
|
155
|
+
--ak-layer3: #f2f2f5;
|
|
156
|
+
--ak-layer4: #e6e6ea;
|
|
157
|
+
--ak-layer5: #d9d9de;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@media (prefers-color-scheme: dark) {
|
|
161
|
+
[data-palette="neutral"]:not([data-theme="light"]) {
|
|
162
|
+
--ak-bg: #000000;
|
|
163
|
+
--ak-surface: #1c1c1e;
|
|
164
|
+
--ak-surface-raised: #2c2c2e;
|
|
165
|
+
--ak-border: #38383a;
|
|
166
|
+
--ak-border-strong: #48484a;
|
|
167
|
+
--ak-text: #f5f5f7;
|
|
168
|
+
--ak-text-muted: #98989d;
|
|
169
|
+
--ak-text-faint: #8e8e93;
|
|
170
|
+
--ak-accent: #f5f5f7;
|
|
171
|
+
--ak-accent-text: #000000;
|
|
172
|
+
--ak-accent-subtle: #2c2c2e;
|
|
173
|
+
--ak-warning: #ffb340;
|
|
174
|
+
--ak-focus-ring: #f5f5f7;
|
|
175
|
+
--ak-bone: #2c2c2e;
|
|
176
|
+
--ak-sheen: #3f3f42;
|
|
177
|
+
--ak-layer1: #000000;
|
|
178
|
+
--ak-layer2: #161618;
|
|
179
|
+
--ak-layer3: #242426;
|
|
180
|
+
--ak-layer4: #323234;
|
|
181
|
+
--ak-layer5: #3f3f42;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
[data-palette="neutral"][data-theme="dark"] {
|
|
186
|
+
--ak-bg: #000000;
|
|
187
|
+
--ak-surface: #1c1c1e;
|
|
188
|
+
--ak-surface-raised: #2c2c2e;
|
|
189
|
+
--ak-border: #38383a;
|
|
190
|
+
--ak-border-strong: #48484a;
|
|
191
|
+
--ak-text: #f5f5f7;
|
|
192
|
+
--ak-text-muted: #98989d;
|
|
193
|
+
--ak-text-faint: #8e8e93;
|
|
194
|
+
--ak-accent: #f5f5f7;
|
|
195
|
+
--ak-accent-text: #000000;
|
|
196
|
+
--ak-accent-subtle: #2c2c2e;
|
|
197
|
+
--ak-warning: #ffb340;
|
|
198
|
+
--ak-focus-ring: #f5f5f7;
|
|
199
|
+
--ak-bone: #2c2c2e;
|
|
200
|
+
--ak-sheen: #3f3f42;
|
|
201
|
+
--ak-layer1: #000000;
|
|
202
|
+
--ak-layer2: #161618;
|
|
203
|
+
--ak-layer3: #242426;
|
|
204
|
+
--ak-layer4: #323234;
|
|
205
|
+
--ak-layer5: #3f3f42;
|
|
206
|
+
}
|
package/dist/tokens.stylex.d.ts
CHANGED
|
@@ -24,6 +24,11 @@ export declare const color: stylex.VarGroup<Readonly<{
|
|
|
24
24
|
sheen: string;
|
|
25
25
|
successHl: string;
|
|
26
26
|
dangerHl: string;
|
|
27
|
+
layer1: string;
|
|
28
|
+
layer2: string;
|
|
29
|
+
layer3: string;
|
|
30
|
+
layer4: string;
|
|
31
|
+
layer5: string;
|
|
27
32
|
}>, symbol>;
|
|
28
33
|
export declare const yarn: stylex.VarGroup<Readonly<{
|
|
29
34
|
un: string;
|
package/dist/tokens.stylex.js
CHANGED
|
@@ -28,6 +28,13 @@ export const color = stylex.defineVars({
|
|
|
28
28
|
sheen: { default: "#F6F4EC", [DARK]: "#35302A" },
|
|
29
29
|
successHl: { default: "#C6E0C6", [DARK]: "#2F4A2E" },
|
|
30
30
|
dangerHl: { default: "#EFCEC3", [DARK]: "#573328" },
|
|
31
|
+
// 分層底色:rail → main → 訊息 → fold → 列,越深的一階數字越大。
|
|
32
|
+
// 面與面靠深淺分,不靠邊框;hover 升一階,對應表在 lib/layers.ts。
|
|
33
|
+
layer1: { default: "#EFECE3", [DARK]: "#0E0C09" },
|
|
34
|
+
layer2: { default: "#FAFAF6", [DARK]: "#181613" },
|
|
35
|
+
layer3: { default: "#F1EFE7", [DARK]: "#211E19" },
|
|
36
|
+
layer4: { default: "#E8E5DA", [DARK]: "#2B2721" },
|
|
37
|
+
layer5: { default: "#DEDACD", [DARK]: "#35302A" },
|
|
31
38
|
});
|
|
32
39
|
// 織體紗線階(TEXTURE-GUIDE §3.4):un 底紗、sh 縫隙陰影、y0–y4 面紗(深→淺)、hi 挑面亮紗、
|
|
33
40
|
// shadow 是整塊布的落影(§3.3「實心感落地」,掛在元件的 CSS filter 上)
|