@keepkit/ui 0.26.4 → 0.27.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.
@@ -59,6 +59,7 @@
59
59
  --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");
60
60
  --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");
61
61
  --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");
62
+ --keep-icon-collection: 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='M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.7-.9L9.2 3.9A2 2 0 0 0 7.5 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E");
62
63
  }
63
64
 
64
65
  :where(.keep-theme, [data-keep-theme]) {
@@ -427,6 +428,7 @@
427
428
  [data-keep-action="filter-tag"],
428
429
  [data-keep-action="apply-tags"],
429
430
  [data-keep-action="save-note"],
431
+ [data-keep-action="edit"],
430
432
  [data-keep-action="retry-item"],
431
433
  [data-keep-action="retry-sync"],
432
434
  [data-keep-action="resolve-conflicts"],
@@ -455,6 +457,9 @@
455
457
  :where(.keep-theme, [data-keep-theme]) [data-keep-action="toggle-save"] {
456
458
  --keep-action-icon: var(--keep-icon-bookmark);
457
459
  }
460
+ :where(.keep-theme, [data-keep-theme]) [data-keep-action="edit"] {
461
+ --keep-action-icon: var(--keep-icon-edit);
462
+ }
458
463
  :where(.keep-theme, [data-keep-theme]) :is([data-keep-action="previous-page"], [data-keep-action="close-dialog"]) {
459
464
  --keep-action-icon: var(--keep-icon-chevron-left);
460
465
  }
@@ -507,6 +512,36 @@
507
512
  --keep-action-icon: var(--keep-icon-close);
508
513
  }
509
514
 
515
+ :where(.keep-theme, [data-keep-theme])
516
+ :is([data-keep-field="note"], [data-keep-field="tags"], [data-keep-field="collection"])
517
+ > [data-keep-field-icon]::before {
518
+ content: "";
519
+ display: inline-block;
520
+ flex: 0 0 auto;
521
+ width: var(--keep-icon-size);
522
+ height: var(--keep-icon-size);
523
+ background: currentColor;
524
+ mask: var(--keep-field-icon) center / contain no-repeat;
525
+ -webkit-mask: var(--keep-field-icon) center / contain no-repeat;
526
+ }
527
+ :where(.keep-theme, [data-keep-theme])
528
+ :is([data-keep-field="note"], [data-keep-field="tags"], [data-keep-field="collection"])
529
+ > [data-keep-field-icon] {
530
+ display: inline-flex;
531
+ align-items: center;
532
+ gap: 0.375rem;
533
+ margin-block-end: 0.25rem;
534
+ }
535
+ :where(.keep-theme, [data-keep-theme]) [data-keep-field="note"] {
536
+ --keep-field-icon: var(--keep-icon-edit);
537
+ }
538
+ :where(.keep-theme, [data-keep-theme]) [data-keep-field="tags"] {
539
+ --keep-field-icon: var(--keep-icon-tag);
540
+ }
541
+ :where(.keep-theme, [data-keep-theme]) [data-keep-field="collection"] {
542
+ --keep-field-icon: var(--keep-icon-collection);
543
+ }
544
+
510
545
  :where(.keep-theme, [data-keep-theme]) [data-has-custom-icon="true"]::before {
511
546
  content: none;
512
547
  }
@@ -258,7 +258,25 @@
258
258
 
259
259
  :where(.keep-theme, [data-keep-theme]) [data-keep-card-part="actions"] {
260
260
  align-items: center;
261
- grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), max-content));
261
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
262
+ }
263
+
264
+ :where(.keep-theme, [data-keep-theme]) [data-keep-card-part="actions"] > [data-keepkit="item-edit-dialog"] {
265
+ grid-column: 1 / -1;
266
+ width: 100%;
267
+ }
268
+
269
+ :where(.keep-theme, [data-keep-theme]) [data-keep-card-part="actions"]:has(> [data-keepkit="item-edit-dialog"]) {
270
+ justify-content: stretch;
271
+ }
272
+
273
+ :where(.keep-theme, [data-keep-theme]) [data-keep-card-part="actions-secondary"] {
274
+ display: flex;
275
+ flex-wrap: wrap;
276
+ gap: var(--keep-control-gap);
277
+ grid-column: 1 / -1;
278
+ justify-content: flex-end;
279
+ width: 100%;
262
280
  }
263
281
 
264
282
  :where(.keep-theme, [data-keep-theme]) [data-keep-card-part="collection-badge"] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keepkit/ui",
3
- "version": "0.26.4",
3
+ "version": "0.27.0",
4
4
  "description": "Headless, accessible React UI components for KeepKit.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -60,7 +60,7 @@
60
60
  "react": ">=18"
61
61
  },
62
62
  "dependencies": {
63
- "@keepkit/core": "0.26.4"
63
+ "@keepkit/core": "0.27.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@testing-library/react": "^16.3.3",