@inkbar/theme 0.6.0 → 0.8.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/package.json +1 -1
- package/theme.css +177 -3
package/package.json
CHANGED
package/theme.css
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
[data-ink-thread-popover],
|
|
18
18
|
[data-ink-popover],
|
|
19
19
|
[data-ink-select-content],
|
|
20
|
-
[data-ink-signature-dialog]
|
|
20
|
+
[data-ink-signature-dialog],
|
|
21
|
+
[data-ink-form-alert]
|
|
21
22
|
) {
|
|
22
23
|
--ink-highlight: #f2c230;
|
|
23
24
|
--ink-underline: #2b5a9e;
|
|
@@ -29,6 +30,9 @@
|
|
|
29
30
|
--ink-ink: #151820;
|
|
30
31
|
--ink-redact: #c0392b;
|
|
31
32
|
--ink-redact-fill: #000000;
|
|
33
|
+
/* Pages stay white in dark mode and the search layer multiplies, so these serve both. */
|
|
34
|
+
--ink-search-hit: #f1ffa0;
|
|
35
|
+
--ink-search-current: #e4ff4a;
|
|
32
36
|
|
|
33
37
|
--ink-bg: var(--muted, #f1f2f5);
|
|
34
38
|
--ink-fg: var(--foreground, #151820);
|
|
@@ -41,6 +45,10 @@
|
|
|
41
45
|
--ink-radius: var(--radius, 0.5rem);
|
|
42
46
|
--ink-page-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
|
|
43
47
|
--ink-text-selection: color-mix(in srgb, AccentColor, transparent 50%);
|
|
48
|
+
/* Form fields sit on the white page, in light and dark alike. */
|
|
49
|
+
--ink-form-field-bg: rgb(43 90 158 / 0.12);
|
|
50
|
+
--ink-form-field-focus: #2b5a9e;
|
|
51
|
+
--ink-form-field-invalid: #c0392b;
|
|
44
52
|
|
|
45
53
|
color: var(--ink-fg);
|
|
46
54
|
}
|
|
@@ -51,7 +59,8 @@
|
|
|
51
59
|
[data-ink-thread-popover]:not(.light *),
|
|
52
60
|
[data-ink-popover]:not(.light *),
|
|
53
61
|
[data-ink-select-content]:not(.light *),
|
|
54
|
-
[data-ink-signature-dialog]:not(.light *)
|
|
62
|
+
[data-ink-signature-dialog]:not(.light *),
|
|
63
|
+
[data-ink-form-alert]:not(.light *)
|
|
55
64
|
) {
|
|
56
65
|
--ink-bg: var(--muted, #0f1217);
|
|
57
66
|
--ink-fg: var(--foreground, #e6e9ef);
|
|
@@ -62,6 +71,9 @@
|
|
|
62
71
|
--ink-accent-fg: var(--primary-foreground, #151820);
|
|
63
72
|
--ink-ring: var(--ring, #7aa5e6);
|
|
64
73
|
--ink-page-shadow: 0 1px 3px rgb(0 0 0 / 0.6);
|
|
74
|
+
--ink-form-field-bg: rgb(43 90 158 / 0.16);
|
|
75
|
+
--ink-form-field-focus: #3d73c4;
|
|
76
|
+
--ink-form-field-invalid: #c0392b;
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
79
|
|
|
@@ -72,7 +84,8 @@
|
|
|
72
84
|
.dark [data-ink-thread-popover]:not(.dark .light *),
|
|
73
85
|
.dark [data-ink-popover]:not(.dark .light *),
|
|
74
86
|
.dark [data-ink-select-content]:not(.dark .light *),
|
|
75
|
-
.dark [data-ink-signature-dialog]:not(.dark .light *)
|
|
87
|
+
.dark [data-ink-signature-dialog]:not(.dark .light *),
|
|
88
|
+
.dark [data-ink-form-alert]:not(.dark .light *)
|
|
76
89
|
) {
|
|
77
90
|
--ink-bg: var(--muted, #0f1217);
|
|
78
91
|
--ink-fg: var(--foreground, #e6e9ef);
|
|
@@ -83,6 +96,9 @@
|
|
|
83
96
|
--ink-accent-fg: var(--primary-foreground, #151820);
|
|
84
97
|
--ink-ring: var(--ring, #7aa5e6);
|
|
85
98
|
--ink-page-shadow: 0 1px 3px rgb(0 0 0 / 0.6);
|
|
99
|
+
--ink-form-field-bg: rgb(43 90 158 / 0.16);
|
|
100
|
+
--ink-form-field-focus: #3d73c4;
|
|
101
|
+
--ink-form-field-invalid: #c0392b;
|
|
86
102
|
}
|
|
87
103
|
|
|
88
104
|
/* Layout: root and viewport fill their parent; the scroll area takes the space left over. */
|
|
@@ -318,6 +334,23 @@
|
|
|
318
334
|
border-radius: 50%;
|
|
319
335
|
}
|
|
320
336
|
|
|
337
|
+
/* Search matches sit under the annotations: before the overlay in the page, same level. The
|
|
338
|
+
layer multiplies with the page, so dark text shows through as if the page were marked. */
|
|
339
|
+
:where(.ink-search-layer) {
|
|
340
|
+
z-index: 1;
|
|
341
|
+
pointer-events: none;
|
|
342
|
+
mix-blend-mode: multiply;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
:where([data-search-hit]) {
|
|
346
|
+
background: var(--ink-search-hit);
|
|
347
|
+
border-radius: 2px;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
:where([data-search-hit][data-current]) {
|
|
351
|
+
background: var(--ink-search-current);
|
|
352
|
+
}
|
|
353
|
+
|
|
321
354
|
/* Annotations */
|
|
322
355
|
:where(.ink-overlay) {
|
|
323
356
|
z-index: 1;
|
|
@@ -334,6 +367,49 @@
|
|
|
334
367
|
pointer-events: auto;
|
|
335
368
|
}
|
|
336
369
|
|
|
370
|
+
/* Form fields: over the text layer, under the annotations (after the overlay in the page, at
|
|
371
|
+
the same level), so a press on an annotation's shape is the annotation's. A field is
|
|
372
|
+
tinted, except while it is read-only or signed or highlighting is off. It is ringed while
|
|
373
|
+
focused and marked when a value was refused. */
|
|
374
|
+
:where(.ink-form-layer) {
|
|
375
|
+
z-index: 1;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
:where(.ink-form-control) {
|
|
379
|
+
outline: none;
|
|
380
|
+
box-shadow: inset 0 0 0 100vmax var(--ink-form-field-bg);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
:where(
|
|
384
|
+
[data-ink-form-highlight='off'] .ink-form-control,
|
|
385
|
+
.ink-form-widget[data-ink-readonly] .ink-form-control
|
|
386
|
+
) {
|
|
387
|
+
box-shadow: none;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/* An empty signature field's "Sign"; a signed one shows its signature, drawn above it. */
|
|
391
|
+
:where(.ink-form-sign) {
|
|
392
|
+
color: var(--ink-form-field-focus);
|
|
393
|
+
font-family: system-ui, sans-serif;
|
|
394
|
+
font-weight: 600;
|
|
395
|
+
cursor: pointer;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
:where(.ink-form-sign[data-ink-signed]) {
|
|
399
|
+
box-shadow: none;
|
|
400
|
+
cursor: default;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
:where(.ink-form-widget[data-ink-focused] .ink-form-control) {
|
|
404
|
+
outline: 2px solid var(--ink-form-field-focus);
|
|
405
|
+
outline-offset: 0;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
:where(.ink-form-widget[data-ink-invalid] .ink-form-control) {
|
|
409
|
+
outline: 2px solid var(--ink-form-field-invalid);
|
|
410
|
+
outline-offset: 0;
|
|
411
|
+
}
|
|
412
|
+
|
|
337
413
|
:where(.ink-annotation) {
|
|
338
414
|
border-radius: 2px;
|
|
339
415
|
outline: 1px solid transparent;
|
|
@@ -648,6 +724,97 @@
|
|
|
648
724
|
font-size: 0.875rem;
|
|
649
725
|
}
|
|
650
726
|
|
|
727
|
+
/*
|
|
728
|
+
* The find bar (createFindBar): floats over the top-right of the viewport root, which is
|
|
729
|
+
* what it positions against, so the pages do not move. Hidden while the search is closed.
|
|
730
|
+
*/
|
|
731
|
+
:where(.ink-find-bar) {
|
|
732
|
+
position: absolute;
|
|
733
|
+
top: 0.5rem;
|
|
734
|
+
right: 1.5rem;
|
|
735
|
+
z-index: 3;
|
|
736
|
+
box-sizing: border-box;
|
|
737
|
+
max-width: calc(100% - 2rem);
|
|
738
|
+
display: flex;
|
|
739
|
+
align-items: center;
|
|
740
|
+
gap: 0.25rem;
|
|
741
|
+
padding: 0.25rem;
|
|
742
|
+
border: 1px solid var(--ink-border);
|
|
743
|
+
border-radius: var(--ink-radius);
|
|
744
|
+
background: var(--ink-surface);
|
|
745
|
+
color: var(--ink-fg);
|
|
746
|
+
box-shadow: 0 4px 16px rgb(0 0 0 / 0.18);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
:where(.ink-find-bar[hidden]) {
|
|
750
|
+
display: none;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
:where(.ink-find-bar input) {
|
|
754
|
+
box-sizing: border-box;
|
|
755
|
+
flex: 1;
|
|
756
|
+
width: 14rem;
|
|
757
|
+
min-width: 0;
|
|
758
|
+
height: var(--ink-control-size, 2.25rem);
|
|
759
|
+
padding: 0 0.5rem;
|
|
760
|
+
border: 1px solid var(--ink-border);
|
|
761
|
+
border-radius: calc(var(--ink-radius) - 2px);
|
|
762
|
+
background: var(--ink-surface);
|
|
763
|
+
color: inherit;
|
|
764
|
+
font: inherit;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
:where(.ink-find-count) {
|
|
768
|
+
min-width: 4.5rem;
|
|
769
|
+
padding: 0 0.25rem;
|
|
770
|
+
color: var(--ink-muted-fg);
|
|
771
|
+
font-size: 0.875rem;
|
|
772
|
+
font-variant-numeric: tabular-nums;
|
|
773
|
+
white-space: nowrap;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
:where(.ink-find-bar button) {
|
|
777
|
+
display: inline-flex;
|
|
778
|
+
align-items: center;
|
|
779
|
+
justify-content: center;
|
|
780
|
+
min-width: var(--ink-control-size, 2.25rem);
|
|
781
|
+
height: var(--ink-control-size, 2.25rem);
|
|
782
|
+
padding: 0 0.5rem;
|
|
783
|
+
border: 1px solid transparent;
|
|
784
|
+
border-radius: calc(var(--ink-radius) - 2px);
|
|
785
|
+
background: transparent;
|
|
786
|
+
color: inherit;
|
|
787
|
+
font: inherit;
|
|
788
|
+
cursor: pointer;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
:where(.ink-find-bar button:hover) {
|
|
792
|
+
background: color-mix(in srgb, var(--ink-fg) 8%, transparent);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
:where(.ink-find-bar button[aria-pressed='true']) {
|
|
796
|
+
background: var(--ink-accent);
|
|
797
|
+
color: var(--ink-accent-fg);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
:where(.ink-find-bar input:focus-visible, .ink-find-bar button:focus-visible) {
|
|
801
|
+
outline: 2px solid var(--ink-ring);
|
|
802
|
+
outline-offset: 2px;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/* Text for assistive technology only, such as the find bar's live region. */
|
|
806
|
+
:where(.ink-visually-hidden) {
|
|
807
|
+
position: absolute;
|
|
808
|
+
width: 1px;
|
|
809
|
+
height: 1px;
|
|
810
|
+
margin: -1px;
|
|
811
|
+
padding: 0;
|
|
812
|
+
overflow: hidden;
|
|
813
|
+
clip-path: inset(50%);
|
|
814
|
+
white-space: nowrap;
|
|
815
|
+
border: 0;
|
|
816
|
+
}
|
|
817
|
+
|
|
651
818
|
:where(.ink-toolbar input) {
|
|
652
819
|
box-sizing: border-box;
|
|
653
820
|
height: var(--ink-control-size, 2.25rem);
|
|
@@ -1191,6 +1358,13 @@
|
|
|
1191
1358
|
outline: none;
|
|
1192
1359
|
}
|
|
1193
1360
|
|
|
1361
|
+
/* A form script's message: non-modal, so no overlay dims the page behind it. */
|
|
1362
|
+
:where(.ink-form-alert-message) {
|
|
1363
|
+
margin: 0;
|
|
1364
|
+
white-space: pre-wrap;
|
|
1365
|
+
overflow-wrap: anywhere;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1194
1368
|
:where(.ink-dialog-title) {
|
|
1195
1369
|
margin: 0 0 0.75rem;
|
|
1196
1370
|
font-size: 1rem;
|