@keepkit/ui 0.21.0 → 0.22.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 +10 -5
- package/dist/index.d.ts +21 -7
- package/dist/index.js +305 -69
- package/dist/index.js.map +1 -1
- package/dist/styles/base.css +19 -1
- package/dist/styles/collection.css +105 -0
- package/package.json +2 -2
package/dist/styles/base.css
CHANGED
|
@@ -49,6 +49,8 @@
|
|
|
49
49
|
--keep-icon-upload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17V5m0 0 4 4m-4-4L8 9M5 21h14'/%3E%3C/svg%3E");
|
|
50
50
|
--keep-icon-undo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 14-5-5 5-5M4 9h9a7 7 0 0 1 7 7v4'/%3E%3C/svg%3E");
|
|
51
51
|
--keep-icon-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.6 2.4 18a2 2 0 0 0 1.7 3h15.8a2 2 0 0 0 1.7-3L13.7 3.6a2 2 0 0 0-3.4 0ZM12 9v4M12 17h.01'/%3E%3C/svg%3E");
|
|
52
|
+
--keep-icon-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m14 4 6 6-3 1-4 4-1 4-7-7 4-1 4-4Z'/%3E%3Cpath d='m9 15-5 5'/%3E%3C/svg%3E");
|
|
53
|
+
--keep-icon-archive: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M5 6v14h14V6M9 10h6'/%3E%3Cpath d='M4 3h16v3H4z'/%3E%3C/svg%3E");
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
:where(.keep-theme, [data-keep-theme]) {
|
|
@@ -426,7 +428,11 @@
|
|
|
426
428
|
[data-keep-action="close-dialog"],
|
|
427
429
|
[data-keep-action="keep-local"],
|
|
428
430
|
[data-keep-action="use-server"],
|
|
429
|
-
[data-keep-action="manual-merge"]
|
|
431
|
+
[data-keep-action="manual-merge"],
|
|
432
|
+
[data-keep-action="toggle-pin"],
|
|
433
|
+
[data-keep-action="toggle-archive"],
|
|
434
|
+
[data-keep-action="save-quick-edit"],
|
|
435
|
+
[data-keep-action="close-save-popover"]
|
|
430
436
|
)::before {
|
|
431
437
|
content: "";
|
|
432
438
|
display: inline-block;
|
|
@@ -480,6 +486,18 @@
|
|
|
480
486
|
:where(.keep-theme, [data-keep-theme]) [data-keep-action="undo"] {
|
|
481
487
|
--keep-action-icon: var(--keep-icon-undo);
|
|
482
488
|
}
|
|
489
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-action="toggle-pin"] {
|
|
490
|
+
--keep-action-icon: var(--keep-icon-pin);
|
|
491
|
+
}
|
|
492
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-action="toggle-archive"] {
|
|
493
|
+
--keep-action-icon: var(--keep-icon-archive);
|
|
494
|
+
}
|
|
495
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-action="save-quick-edit"] {
|
|
496
|
+
--keep-action-icon: var(--keep-icon-check);
|
|
497
|
+
}
|
|
498
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-action="close-save-popover"] {
|
|
499
|
+
--keep-action-icon: var(--keep-icon-close);
|
|
500
|
+
}
|
|
483
501
|
|
|
484
502
|
:where(.keep-theme, [data-keep-theme]) [data-has-custom-icon="true"]::before {
|
|
485
503
|
content: none;
|
|
@@ -22,6 +22,15 @@
|
|
|
22
22
|
flex: 1 1 12rem;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
:where(.keep-theme, [data-keep-theme]) [data-keepkit="collection-filter"] {
|
|
26
|
+
display: grid;
|
|
27
|
+
flex: 1 1 12rem;
|
|
28
|
+
gap: 0.375rem;
|
|
29
|
+
color: var(--keep-muted-foreground);
|
|
30
|
+
font-size: var(--keep-tag-size);
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
}
|
|
33
|
+
|
|
25
34
|
:where(.keep-theme, [data-keep-theme]) [data-keepkit="active-filters"] {
|
|
26
35
|
display: flex;
|
|
27
36
|
flex-wrap: wrap;
|
|
@@ -198,6 +207,88 @@
|
|
|
198
207
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), max-content));
|
|
199
208
|
}
|
|
200
209
|
|
|
210
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-card-part="collection-badge"] {
|
|
211
|
+
display: inline-flex;
|
|
212
|
+
width: fit-content;
|
|
213
|
+
align-items: center;
|
|
214
|
+
min-height: 1.75rem;
|
|
215
|
+
border: 1px solid color-mix(in srgb, var(--keep-primary) 24%, var(--keep-border));
|
|
216
|
+
border-radius: 999px;
|
|
217
|
+
padding: 0.2rem 0.625rem;
|
|
218
|
+
background: color-mix(in srgb, var(--keep-primary) 7%, var(--keep-card));
|
|
219
|
+
color: var(--keep-primary);
|
|
220
|
+
font-size: var(--keep-tag-size);
|
|
221
|
+
font-weight: 650;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:where(.keep-theme, [data-keep-theme]) [data-keepkit="save-popover"] {
|
|
225
|
+
position: relative;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-popover-panel="true"] {
|
|
229
|
+
position: absolute;
|
|
230
|
+
z-index: 30;
|
|
231
|
+
inset-block-start: calc(100% + 0.5rem);
|
|
232
|
+
inset-inline: 0;
|
|
233
|
+
display: grid;
|
|
234
|
+
gap: var(--keep-card-gap);
|
|
235
|
+
width: 100%;
|
|
236
|
+
border: 1px solid var(--keep-border);
|
|
237
|
+
border-radius: calc(var(--keep-radius) + 0.25rem);
|
|
238
|
+
padding: var(--keep-card-padding);
|
|
239
|
+
background: var(--keep-card);
|
|
240
|
+
color: var(--keep-card-foreground);
|
|
241
|
+
box-shadow:
|
|
242
|
+
0 4px 10px color-mix(in srgb, var(--keep-foreground) 10%, transparent),
|
|
243
|
+
0 20px 44px color-mix(in srgb, var(--keep-foreground) 14%, transparent);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-popover-title="true"] {
|
|
247
|
+
margin: 0;
|
|
248
|
+
font-size: var(--keep-title-size);
|
|
249
|
+
line-height: 1.35;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
:where(.keep-theme, [data-keep-theme]) [data-keepkit="quick-editor"] {
|
|
253
|
+
display: grid;
|
|
254
|
+
gap: var(--keep-card-gap);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
:where(.keep-theme, [data-keep-theme]) [data-keepkit="quick-editor"] label {
|
|
258
|
+
display: grid;
|
|
259
|
+
gap: 0.375rem;
|
|
260
|
+
color: var(--keep-muted-foreground);
|
|
261
|
+
font-size: var(--keep-tag-size);
|
|
262
|
+
font-weight: 600;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
:where(.keep-theme, [data-keep-theme]) [data-keepkit="quick-editor"] :is(input, select, textarea) {
|
|
266
|
+
width: 100%;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
:where(.keep-theme, [data-keep-theme]) [data-keepkit="quick-editor"] textarea {
|
|
270
|
+
min-height: 5.5rem;
|
|
271
|
+
resize: vertical;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-editor-status="true"] {
|
|
275
|
+
margin: 0;
|
|
276
|
+
color: var(--keep-muted-foreground);
|
|
277
|
+
font-size: var(--keep-tag-size);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-editor-status="true"][data-state="saved"] {
|
|
281
|
+
color: var(--keep-success);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-editor-status="true"][data-state="error"] {
|
|
285
|
+
color: var(--keep-destructive);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-action="close-save-popover"] {
|
|
289
|
+
justify-self: end;
|
|
290
|
+
}
|
|
291
|
+
|
|
201
292
|
:where(.keep-theme, [data-keep-theme]) [data-keepkit="card"]:hover {
|
|
202
293
|
border-color: color-mix(in srgb, var(--keep-primary) 32%, var(--keep-border));
|
|
203
294
|
box-shadow:
|
|
@@ -732,6 +823,20 @@
|
|
|
732
823
|
flex-direction: column;
|
|
733
824
|
}
|
|
734
825
|
:where(.keep-theme, [data-keep-theme]) [data-keepkit="collection"] > :first-child > :is(input, select) {
|
|
826
|
+
flex: 0 0 auto;
|
|
827
|
+
width: 100%;
|
|
828
|
+
}
|
|
829
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-popover-panel="true"] {
|
|
830
|
+
position: fixed;
|
|
831
|
+
inset-block: auto 0;
|
|
832
|
+
inset-inline: 0;
|
|
735
833
|
width: 100%;
|
|
834
|
+
max-height: min(85vh, 40rem);
|
|
835
|
+
overflow-y: auto;
|
|
836
|
+
border-radius: calc(var(--keep-radius) + 0.5rem) calc(var(--keep-radius) + 0.5rem) 0 0;
|
|
837
|
+
padding: calc(var(--keep-card-padding) * 1.25);
|
|
838
|
+
}
|
|
839
|
+
:where(.keep-theme, [data-keep-theme]) [data-keep-card-part="actions"] {
|
|
840
|
+
grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
|
|
736
841
|
}
|
|
737
842
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keepkit/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Headless, accessible React UI components for KeepKit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react": ">=18"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@keepkit/core": "0.
|
|
60
|
+
"@keepkit/core": "0.22.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@testing-library/react": "^16.3.3",
|