drawui-react 0.3.6 → 0.4.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/dist/styles.css CHANGED
@@ -292,6 +292,11 @@
292
292
  white-space: nowrap;
293
293
  justify-content: flex-start;
294
294
  }
295
+ .drawui-toolbar-export-divider {
296
+ height: 1px;
297
+ margin: 4px 8px;
298
+ background: var(--dw-panel-border);
299
+ }
295
300
  .drawui-toolbar-color-chip {
296
301
  position: absolute;
297
302
  right: 4px;
@@ -324,6 +329,241 @@
324
329
  .drawui-highlighter-swatch.active {
325
330
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--dw-primary);
326
331
  }
332
+ .drawui-sticky-panel {
333
+ grid-template-columns: 1fr;
334
+ gap: 10px;
335
+ padding: 12px;
336
+ }
337
+ .drawui-sticky-panel-head {
338
+ display: flex;
339
+ align-items: center;
340
+ gap: 6px;
341
+ user-select: none;
342
+ }
343
+ .drawui-sticky-panel-title {
344
+ font-size: 13px;
345
+ font-weight: 500;
346
+ line-height: 1;
347
+ color: var(--dw-text-strong);
348
+ }
349
+ .drawui-sticky-panel-key {
350
+ display: inline-flex;
351
+ align-items: center;
352
+ justify-content: center;
353
+ min-width: 16px;
354
+ height: 16px;
355
+ padding: 0 3px;
356
+ border-radius: 6px;
357
+ background: var(--dw-hover-bg);
358
+ color: var(--dw-text-muted);
359
+ font-size: 10px;
360
+ line-height: 1;
361
+ }
362
+ .drawui-sticky-panel-grid {
363
+ display: grid;
364
+ grid-template-columns: repeat(3, 54px);
365
+ gap: 8px;
366
+ }
367
+ .drawui-sticky-swatch {
368
+ box-sizing: border-box;
369
+ width: 54px;
370
+ height: 54px;
371
+ padding: 0;
372
+ border: 1px solid var(--dw-swatch-border);
373
+ border-radius: 10px;
374
+ cursor: pointer;
375
+ transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.12s cubic-bezier(0.4, 0, 0.2, 1);
376
+ }
377
+ .drawui-sticky-swatch:hover {
378
+ transform: translateY(-1px);
379
+ box-shadow: var(--dw-shadow-sm);
380
+ }
381
+ .drawui-sticky-swatch.active {
382
+ box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--dw-primary);
383
+ }
384
+ .drawui-icon-panel {
385
+ position: absolute;
386
+ top: calc(100% + 14px);
387
+ left: 50%;
388
+ transform: translateX(-50%);
389
+ display: flex;
390
+ flex-direction: column;
391
+ gap: 10px;
392
+ width: 348px;
393
+ padding: 12px;
394
+ background: var(--dw-panel-bg);
395
+ backdrop-filter: blur(16px);
396
+ -webkit-backdrop-filter: blur(16px);
397
+ border-radius: 14px;
398
+ box-shadow: var(--dw-shadow-lg);
399
+ border: 1px solid var(--dw-panel-border);
400
+ background: var(--dw-panel-bg-deep);
401
+ animation: dropdownFadeIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
402
+ z-index: 500;
403
+ }
404
+ .drawui-icon-search {
405
+ display: flex;
406
+ align-items: center;
407
+ gap: 8px;
408
+ height: 34px;
409
+ padding: 0 10px;
410
+ border: 1px solid var(--dw-border-strong);
411
+ border-radius: 10px;
412
+ background: var(--dw-panel-bg-solid);
413
+ color: var(--dw-text-faint);
414
+ transition: border-color 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.12s cubic-bezier(0.4, 0, 0.2, 1);
415
+ }
416
+ .drawui-icon-search:focus-within {
417
+ border-color: var(--dw-primary);
418
+ box-shadow: 0 0 0 2px var(--dw-primary-weak);
419
+ }
420
+ .drawui-icon-search input {
421
+ flex: 1;
422
+ min-width: 0;
423
+ border: none;
424
+ outline: none;
425
+ background: transparent;
426
+ color: var(--dw-text-strong);
427
+ font-size: 13px;
428
+ font-family: inherit;
429
+ }
430
+ .drawui-icon-search input::placeholder {
431
+ color: var(--dw-text-faint);
432
+ }
433
+ .drawui-icon-count {
434
+ flex: none;
435
+ min-width: 22px;
436
+ height: 20px;
437
+ padding: 0 6px;
438
+ border-radius: 10px;
439
+ background: var(--dw-hover-bg);
440
+ color: var(--dw-text-muted);
441
+ font-size: 11px;
442
+ line-height: 20px;
443
+ text-align: center;
444
+ font-variant-numeric: tabular-nums;
445
+ }
446
+ .drawui-icon-cats {
447
+ display: flex;
448
+ flex-wrap: wrap;
449
+ gap: 4px;
450
+ }
451
+ .drawui-icon-cat {
452
+ display: inline-flex;
453
+ align-items: center;
454
+ gap: 5px;
455
+ height: 25px;
456
+ padding: 0 9px;
457
+ border: none;
458
+ border-radius: 13px;
459
+ background: transparent;
460
+ color: var(--dw-text-muted);
461
+ font-size: 12px;
462
+ font-family: inherit;
463
+ line-height: 1;
464
+ cursor: pointer;
465
+ transition: background 0.12s cubic-bezier(0.4, 0, 0.2, 1), color 0.12s cubic-bezier(0.4, 0, 0.2, 1);
466
+ }
467
+ .drawui-icon-cat .drawui-icon-dot {
468
+ width: 6px;
469
+ height: 6px;
470
+ border-radius: 50%;
471
+ background: var(--dw-icon-cat, var(--dw-text-faint));
472
+ opacity: 0.5;
473
+ transition: opacity 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.12s cubic-bezier(0.4, 0, 0.2, 1);
474
+ }
475
+ .drawui-icon-cat:hover {
476
+ background: var(--dw-hover-bg);
477
+ color: var(--dw-text-strong);
478
+ }
479
+ .drawui-icon-cat:hover .drawui-icon-dot {
480
+ opacity: 0.9;
481
+ }
482
+ .drawui-icon-cat.active {
483
+ color: var(--dw-icon-cat, var(--dw-primary));
484
+ background: var(--dw-icon-cat-soft, var(--dw-primary-weak));
485
+ font-weight: 500;
486
+ }
487
+ .drawui-icon-cat.active .drawui-icon-dot {
488
+ opacity: 1;
489
+ box-shadow: 0 0 0 3px var(--dw-icon-cat-soft, transparent);
490
+ }
491
+ .drawui-icon-card {
492
+ border: 1px solid var(--dw-border-strong);
493
+ border-radius: 10px;
494
+ background: var(--dw-panel-bg-solid);
495
+ overflow: hidden;
496
+ }
497
+ .drawui-icon-card-head {
498
+ display: flex;
499
+ align-items: center;
500
+ justify-content: space-between;
501
+ gap: 8px;
502
+ padding: 8px 10px 6px;
503
+ border-bottom: 1px solid var(--dw-border-strong);
504
+ }
505
+ .drawui-icon-card-head .drawui-icon-card-title {
506
+ font-size: 12px;
507
+ font-weight: 600;
508
+ color: var(--dw-text-strong);
509
+ }
510
+ .drawui-icon-card-head .drawui-icon-card-count {
511
+ font-size: 11px;
512
+ color: var(--dw-text-faint);
513
+ font-variant-numeric: tabular-nums;
514
+ }
515
+ .drawui-icon-grid {
516
+ display: grid;
517
+ grid-template-columns: repeat(6, 44px);
518
+ gap: 8px;
519
+ max-height: 248px;
520
+ padding: 10px;
521
+ overflow-y: auto;
522
+ overflow-x: hidden;
523
+ scrollbar-width: thin;
524
+ }
525
+ .drawui-icon-grid::-webkit-scrollbar {
526
+ width: 6px;
527
+ }
528
+ .drawui-icon-grid::-webkit-scrollbar-thumb {
529
+ border-radius: 3px;
530
+ background: var(--dw-border-strong);
531
+ }
532
+ .drawui-icon-grid::-webkit-scrollbar-track {
533
+ background: transparent;
534
+ }
535
+ .drawui-icon-item {
536
+ display: flex;
537
+ align-items: center;
538
+ justify-content: center;
539
+ width: 44px;
540
+ height: 44px;
541
+ padding: 0;
542
+ box-sizing: border-box;
543
+ border: 1px solid var(--dw-border-strong);
544
+ border-radius: 10px;
545
+ background: var(--dw-panel-bg-solid);
546
+ color: var(--dw-text-strong);
547
+ cursor: pointer;
548
+ transition: background 0.12s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.12s cubic-bezier(0.4, 0, 0.2, 1), transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
549
+ }
550
+ .drawui-icon-item:hover {
551
+ border-color: var(--dw-icon-accent, var(--dw-primary));
552
+ background: var(--dw-icon-soft, var(--dw-hover-bg));
553
+ box-shadow: 0 2px 6px var(--dw-icon-ring, rgba(59, 130, 246, 0.2));
554
+ transform: translateY(-1px);
555
+ }
556
+ .drawui-icon-item:active {
557
+ transform: translateY(0);
558
+ box-shadow: none;
559
+ }
560
+ .drawui-icon-empty {
561
+ grid-column: 1 / -1;
562
+ padding: 18px 0;
563
+ text-align: center;
564
+ font-size: 12px;
565
+ color: var(--dw-text-faint);
566
+ }
327
567
  .drawui-zoom-control {
328
568
  position: fixed;
329
569
  top: 5px;
@@ -490,6 +730,9 @@
490
730
  color: var(--dw-success-strong);
491
731
  flex-shrink: 0;
492
732
  }
733
+ .drawui-toast-icon-error {
734
+ color: var(--dw-danger);
735
+ }
493
736
  @keyframes drawui-toast-in {
494
737
  from {
495
738
  opacity: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drawui-react",
3
- "version": "0.3.6",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "React wrapper for drawui-core canvas drawing (PNG / SVG / PDF export, UML, mind map)",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "drawui-core": "0.3.6"
33
+ "drawui-core": "0.4.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "^18.3.1"