@inkra/react 0.2.0 → 0.3.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 +86 -4
- package/dist/alert-dialog/index.d.ts +1 -1
- package/dist/alert-dialog/index.js +4 -2
- package/dist/command/index.d.ts +24 -2
- package/dist/command/index.js +2 -2
- package/dist/context-menu/index.d.ts +2 -2
- package/dist/context-menu/index.js +3 -2
- package/dist/drawer/index.d.ts +1 -1
- package/dist/drawer/index.js +6 -4
- package/dist/dropdown-menu/index.d.ts +1 -1
- package/dist/dropdown-menu/index.js +3 -2
- package/dist/form/EditablePencilText.js +34 -0
- package/dist/form/Input.js +1 -1
- package/dist/input-number/index.d.ts +6 -0
- package/dist/input-number/index.js +126 -15
- package/dist/input-number/model.d.ts +13 -0
- package/dist/input-number/model.js +50 -0
- package/dist/number-ticker/index.d.ts +11 -9
- package/dist/number-ticker/index.js +14 -11
- package/dist/number-ticker/model.d.ts +38 -5
- package/dist/number-ticker/model.js +139 -10
- package/dist/number-ticker/precision.d.ts +7 -0
- package/dist/number-ticker/precision.js +134 -0
- package/dist/overlay/Overlay.d.ts +1 -1
- package/dist/overlay/Overlay.js +4 -2
- package/dist/overlay/Popover.d.ts +1 -1
- package/dist/overlay/Popover.js +3 -2
- package/dist/overlay/themeBridge.d.ts +12 -1
- package/dist/overlay/themeBridge.js +27 -1
- package/dist/radar/index.d.ts +2 -0
- package/dist/radar/index.js +2 -2
- package/dist/sortable/index.js +9 -4
- package/dist/styles.css +147 -22
- package/dist/tooltip/Tooltip.d.ts +1 -1
- package/dist/tooltip/Tooltip.js +3 -2
- package/dist/virtual-list/index.js +3 -2
- package/package.json +4 -3
package/dist/styles.css
CHANGED
|
@@ -1247,6 +1247,10 @@
|
|
|
1247
1247
|
gap: 0;
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
|
+
.inkra-input-number__controls .inkra-button {
|
|
1251
|
+
touch-action: none;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1250
1254
|
.inkra-slider {
|
|
1251
1255
|
--inkra-slider-track-size: 8px;
|
|
1252
1256
|
--inkra-slider-thumb-size: 24px;
|
|
@@ -1643,7 +1647,7 @@
|
|
|
1643
1647
|
}
|
|
1644
1648
|
|
|
1645
1649
|
.inkra-overlay__backdrop {
|
|
1646
|
-
animation: inkra-overlay-backdrop-in var(--inkra-motion-normal) var(--inkra-ease);
|
|
1650
|
+
animation: inkra-overlay-backdrop-in var(--inkra-motion-normal) var(--inkra-ease) both;
|
|
1647
1651
|
background: var(--inkra-overlay);
|
|
1648
1652
|
inset: 0;
|
|
1649
1653
|
position: fixed;
|
|
@@ -1651,11 +1655,11 @@
|
|
|
1651
1655
|
}
|
|
1652
1656
|
|
|
1653
1657
|
.inkra-overlay__backdrop[data-state="closed"] {
|
|
1654
|
-
animation: inkra-overlay-backdrop-out var(--inkra-motion-normal) var(--inkra-ease);
|
|
1658
|
+
animation: inkra-overlay-backdrop-out var(--inkra-motion-normal) var(--inkra-ease) both;
|
|
1655
1659
|
}
|
|
1656
1660
|
|
|
1657
1661
|
.inkra-overlay__content {
|
|
1658
|
-
animation: inkra-overlay-content-in var(--inkra-motion-normal) var(--inkra-ease);
|
|
1662
|
+
animation: inkra-overlay-content-in var(--inkra-motion-normal) var(--inkra-ease) both;
|
|
1659
1663
|
inset-block-start: 50%;
|
|
1660
1664
|
inset-inline-start: 50%;
|
|
1661
1665
|
max-height: min(80vh, calc(100dvh - var(--inkra-space-8)));
|
|
@@ -1667,7 +1671,8 @@
|
|
|
1667
1671
|
}
|
|
1668
1672
|
|
|
1669
1673
|
.inkra-overlay__content[data-state="closed"] {
|
|
1670
|
-
animation: inkra-overlay-content-out var(--inkra-motion-normal) var(--inkra-ease);
|
|
1674
|
+
animation: inkra-overlay-content-out var(--inkra-motion-normal) var(--inkra-ease) both;
|
|
1675
|
+
pointer-events: none;
|
|
1671
1676
|
}
|
|
1672
1677
|
|
|
1673
1678
|
.inkra-overlay__content:focus-visible,
|
|
@@ -1765,7 +1770,7 @@
|
|
|
1765
1770
|
}
|
|
1766
1771
|
|
|
1767
1772
|
.inkra-popover__content {
|
|
1768
|
-
animation: inkra-popover-content-in var(--inkra-motion-normal) var(--inkra-ease);
|
|
1773
|
+
animation: inkra-popover-content-in var(--inkra-motion-normal) var(--inkra-ease) both;
|
|
1769
1774
|
max-height: min(70vh, var(--radix-popover-content-available-height, 70vh));
|
|
1770
1775
|
max-width: min(24rem, calc(100vw - var(--inkra-space-8)));
|
|
1771
1776
|
outline: 0;
|
|
@@ -1775,7 +1780,8 @@
|
|
|
1775
1780
|
}
|
|
1776
1781
|
|
|
1777
1782
|
.inkra-popover__content[data-state="closed"] {
|
|
1778
|
-
animation: inkra-popover-content-out var(--inkra-motion-normal) var(--inkra-ease);
|
|
1783
|
+
animation: inkra-popover-content-out var(--inkra-motion-normal) var(--inkra-ease) both;
|
|
1784
|
+
pointer-events: none;
|
|
1779
1785
|
}
|
|
1780
1786
|
|
|
1781
1787
|
.inkra-popover__surface {
|
|
@@ -1871,7 +1877,7 @@
|
|
|
1871
1877
|
.inkra-overlay__backdrop,
|
|
1872
1878
|
.inkra-overlay__content,
|
|
1873
1879
|
.inkra-popover__content {
|
|
1874
|
-
animation: none;
|
|
1880
|
+
animation: none !important;
|
|
1875
1881
|
}
|
|
1876
1882
|
}
|
|
1877
1883
|
|
|
@@ -1903,7 +1909,7 @@
|
|
|
1903
1909
|
|
|
1904
1910
|
.inkra-overlay__content,
|
|
1905
1911
|
.inkra-popover__content {
|
|
1906
|
-
animation: none;
|
|
1912
|
+
animation: none !important;
|
|
1907
1913
|
max-height: none;
|
|
1908
1914
|
max-width: none;
|
|
1909
1915
|
position: static;
|
|
@@ -2400,7 +2406,7 @@
|
|
|
2400
2406
|
@media print { .inkra-tabs__selection, .inkra-tabs__focus-ring { display: none !important; } }
|
|
2401
2407
|
|
|
2402
2408
|
.inkra-tooltip__content {
|
|
2403
|
-
animation: inkra-tooltip-content-in var(--inkra-motion-fast) var(--inkra-ease);
|
|
2409
|
+
animation: inkra-tooltip-content-in var(--inkra-motion-fast) var(--inkra-ease) both;
|
|
2404
2410
|
max-width: min(20rem, calc(100vw - var(--inkra-space-4)));
|
|
2405
2411
|
outline: 0;
|
|
2406
2412
|
transform-origin: var(--radix-tooltip-content-transform-origin);
|
|
@@ -2408,7 +2414,8 @@
|
|
|
2408
2414
|
}
|
|
2409
2415
|
|
|
2410
2416
|
.inkra-tooltip__content[data-state="closed"] {
|
|
2411
|
-
animation: inkra-tooltip-content-out var(--inkra-motion-fast) var(--inkra-ease);
|
|
2417
|
+
animation: inkra-tooltip-content-out var(--inkra-motion-fast) var(--inkra-ease) both;
|
|
2418
|
+
pointer-events: none;
|
|
2412
2419
|
}
|
|
2413
2420
|
|
|
2414
2421
|
.inkra-tooltip__surface {
|
|
@@ -2452,7 +2459,7 @@
|
|
|
2452
2459
|
|
|
2453
2460
|
@media (prefers-reduced-motion: reduce) {
|
|
2454
2461
|
.inkra-tooltip__content {
|
|
2455
|
-
animation: none;
|
|
2462
|
+
animation: none !important;
|
|
2456
2463
|
}
|
|
2457
2464
|
}
|
|
2458
2465
|
|
|
@@ -2593,6 +2600,25 @@
|
|
|
2593
2600
|
padding: var(--inkra-space-2) var(--inkra-space-3) var(--inkra-space-4);
|
|
2594
2601
|
}
|
|
2595
2602
|
|
|
2603
|
+
.inkra-accordion__content[data-state="open"] > .inkra-accordion__content-body {
|
|
2604
|
+
animation: inkra-accordion-body-in var(--inkra-motion-normal) var(--inkra-ease);
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
.inkra-accordion__content[data-state="closed"] > .inkra-accordion__content-body {
|
|
2608
|
+
animation: inkra-accordion-body-out var(--inkra-motion-normal) var(--inkra-ease) both;
|
|
2609
|
+
pointer-events: none;
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
@keyframes inkra-accordion-body-in {
|
|
2613
|
+
from { opacity: 0; transform: translateY(calc(-1 * var(--inkra-space-1))); }
|
|
2614
|
+
to { opacity: 1; transform: translateY(0); }
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
@keyframes inkra-accordion-body-out {
|
|
2618
|
+
from { opacity: 1; transform: translateY(0); }
|
|
2619
|
+
to { opacity: 0; transform: translateY(calc(-1 * var(--inkra-space-1))); }
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2596
2622
|
.inkra-accordion__divider {
|
|
2597
2623
|
color: var(--inkra-border);
|
|
2598
2624
|
inset-block-end: -4px;
|
|
@@ -2636,7 +2662,8 @@
|
|
|
2636
2662
|
}
|
|
2637
2663
|
|
|
2638
2664
|
@media (prefers-reduced-motion: reduce) {
|
|
2639
|
-
.inkra-accordion__content
|
|
2665
|
+
.inkra-accordion__content,
|
|
2666
|
+
.inkra-accordion__content-body {
|
|
2640
2667
|
animation: none !important;
|
|
2641
2668
|
}
|
|
2642
2669
|
|
|
@@ -2666,8 +2693,9 @@
|
|
|
2666
2693
|
}
|
|
2667
2694
|
|
|
2668
2695
|
@media print {
|
|
2669
|
-
.inkra-accordion__content
|
|
2670
|
-
|
|
2696
|
+
.inkra-accordion__content,
|
|
2697
|
+
.inkra-accordion__content-body {
|
|
2698
|
+
animation: none !important;
|
|
2671
2699
|
}
|
|
2672
2700
|
}
|
|
2673
2701
|
|
|
@@ -3034,17 +3062,49 @@
|
|
|
3034
3062
|
.inkra-table tr[data-selected] { outline: 1px solid Highlight; }
|
|
3035
3063
|
}
|
|
3036
3064
|
|
|
3037
|
-
.inkra-menu {
|
|
3065
|
+
.inkra-menu {
|
|
3066
|
+
--inkra-menu-enter-x: 0px;
|
|
3067
|
+
--inkra-menu-enter-y: var(--inkra-space-1);
|
|
3068
|
+
min-width: 180px;
|
|
3069
|
+
max-width: min(320px, calc(100vw - 16px));
|
|
3070
|
+
outline: 0;
|
|
3071
|
+
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
3072
|
+
z-index: calc(40 + var(--inkra-floating-layer-offset, 0));
|
|
3073
|
+
}
|
|
3074
|
+
.inkra-menu[data-side="top"] { --inkra-menu-enter-y: calc(-1 * var(--inkra-space-1)); }
|
|
3075
|
+
.inkra-menu[data-side="left"] { --inkra-menu-enter-x: calc(-1 * var(--inkra-space-1)); --inkra-menu-enter-y: 0px; }
|
|
3076
|
+
.inkra-menu[data-side="right"] { --inkra-menu-enter-x: var(--inkra-space-1); --inkra-menu-enter-y: 0px; }
|
|
3077
|
+
.inkra-menu[data-state="open"] { animation: inkra-menu-enter var(--inkra-motion-normal) var(--inkra-ease) both; }
|
|
3078
|
+
.inkra-menu[data-state="closed"] { animation: inkra-menu-exit var(--inkra-motion-fast) var(--inkra-ease) both; pointer-events: none; }
|
|
3038
3079
|
.inkra-menu__paper { padding: 4px; max-height: var(--radix-dropdown-menu-content-available-height); overflow-y: auto; }
|
|
3039
3080
|
.inkra-menu__item { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 44px; box-sizing: border-box; color: var(--inkra-ink); outline: 0; cursor: default; font-family: var(--inkra-font-body); font-size: var(--inkra-text-md); line-height: var(--inkra-line-ui); }
|
|
3040
3081
|
.inkra-menu__item[data-destructive] { color: var(--inkra-danger-foreground); }
|
|
3041
3082
|
.inkra-menu__item[data-disabled] { opacity: 0.5; pointer-events: none; }
|
|
3042
|
-
.inkra-menu__highlight { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
|
|
3083
|
+
.inkra-menu__highlight { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity var(--inkra-motion-fast) var(--inkra-ease); }
|
|
3043
3084
|
.inkra-menu__item[data-highlighted] > .inkra-menu__highlight { opacity: 1; }
|
|
3044
3085
|
.inkra-menu__icon { display: inline-flex; width: 16px; height: 16px; flex: none; position: relative; }
|
|
3045
3086
|
.inkra-menu__label { position: relative; min-width: 0; overflow-wrap: anywhere; }
|
|
3046
3087
|
.inkra-menu__group-label { padding: 8px 12px; color: var(--inkra-ink-muted); font-size: var(--inkra-text-sm); }
|
|
3047
3088
|
.inkra-menu__separator { height: 8px; }
|
|
3089
|
+
|
|
3090
|
+
@keyframes inkra-menu-enter {
|
|
3091
|
+
from { opacity: 0; transform: translate(var(--inkra-menu-enter-x), var(--inkra-menu-enter-y)); }
|
|
3092
|
+
to { opacity: 1; transform: translate(0, 0); }
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
@keyframes inkra-menu-exit {
|
|
3096
|
+
from { opacity: 1; transform: translate(0, 0); }
|
|
3097
|
+
to { opacity: 0; transform: translate(var(--inkra-menu-enter-x), var(--inkra-menu-enter-y)); }
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3101
|
+
.inkra-menu { animation: none !important; }
|
|
3102
|
+
.inkra-menu__highlight { transition: none; }
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
@media print {
|
|
3106
|
+
.inkra-menu { animation: none !important; }
|
|
3107
|
+
}
|
|
3048
3108
|
@media (forced-colors: active) {
|
|
3049
3109
|
.inkra-menu { border: 1px solid CanvasText; background: Canvas; }
|
|
3050
3110
|
.inkra-menu__item[data-highlighted] { outline: 2px solid Highlight; outline-offset: -2px; }
|
|
@@ -3491,7 +3551,12 @@
|
|
|
3491
3551
|
|
|
3492
3552
|
.inkra-number-ticker__prefix,
|
|
3493
3553
|
.inkra-number-ticker__suffix {
|
|
3554
|
+
align-items: center;
|
|
3555
|
+
align-self: center;
|
|
3494
3556
|
color: var(--inkra-ink-muted);
|
|
3557
|
+
display: inline-flex;
|
|
3558
|
+
flex: none;
|
|
3559
|
+
gap: var(--inkra-space-1, 4px);
|
|
3495
3560
|
min-width: 0;
|
|
3496
3561
|
}
|
|
3497
3562
|
|
|
@@ -5867,6 +5932,8 @@ div.inkra-choice-grid > .inkra-radio-group {
|
|
|
5867
5932
|
}
|
|
5868
5933
|
|
|
5869
5934
|
.inkra-sortable__item:not([data-disabled]) { cursor: grab; }
|
|
5935
|
+
.inkra-sortable__item[data-handle] { cursor: auto; }
|
|
5936
|
+
.inkra-sortable__item:not([data-disabled]):not([data-handle]) { touch-action: none; }
|
|
5870
5937
|
.inkra-sortable__item[data-dragging] { cursor: grabbing; z-index: 1; }
|
|
5871
5938
|
.inkra-sortable__item:focus { outline: none; }
|
|
5872
5939
|
|
|
@@ -6461,6 +6528,22 @@ div.inkra-choice-grid > .inkra-radio-group {
|
|
|
6461
6528
|
}
|
|
6462
6529
|
}
|
|
6463
6530
|
|
|
6531
|
+
.inkra-virtual-list__frame {
|
|
6532
|
+
min-inline-size: 0;
|
|
6533
|
+
position: relative;
|
|
6534
|
+
}
|
|
6535
|
+
|
|
6536
|
+
.inkra-virtual-list__focus {
|
|
6537
|
+
position: absolute;
|
|
6538
|
+
inset: 0;
|
|
6539
|
+
opacity: 0;
|
|
6540
|
+
pointer-events: none;
|
|
6541
|
+
}
|
|
6542
|
+
|
|
6543
|
+
.inkra-virtual-list__frame:has(> .inkra-virtual-list:focus-visible) > .inkra-virtual-list__focus {
|
|
6544
|
+
opacity: 1;
|
|
6545
|
+
}
|
|
6546
|
+
|
|
6464
6547
|
.inkra-virtual-list {
|
|
6465
6548
|
block-size: 20rem;
|
|
6466
6549
|
color: var(--inkra-ink);
|
|
@@ -6481,8 +6564,7 @@ div.inkra-choice-grid > .inkra-radio-group {
|
|
|
6481
6564
|
}
|
|
6482
6565
|
|
|
6483
6566
|
.inkra-virtual-list:focus-visible {
|
|
6484
|
-
outline:
|
|
6485
|
-
outline-offset: calc(-1 * var(--inkra-focus-width));
|
|
6567
|
+
outline: none;
|
|
6486
6568
|
}
|
|
6487
6569
|
|
|
6488
6570
|
.inkra-virtual-list__items {
|
|
@@ -6535,8 +6617,12 @@ div.inkra-choice-grid > .inkra-radio-group {
|
|
|
6535
6617
|
}
|
|
6536
6618
|
|
|
6537
6619
|
@media (forced-colors: active) {
|
|
6538
|
-
.inkra-virtual-
|
|
6539
|
-
.inkra-virtual-list:focus-visible {
|
|
6620
|
+
.inkra-virtual-list__frame { border: 1px solid CanvasText; }
|
|
6621
|
+
.inkra-virtual-list:focus-visible {
|
|
6622
|
+
outline: var(--inkra-focus-width) solid Highlight;
|
|
6623
|
+
outline-color: Highlight;
|
|
6624
|
+
outline-offset: calc(-1 * var(--inkra-focus-width));
|
|
6625
|
+
}
|
|
6540
6626
|
.inkra-virtual-list__item > .inkra-virtual-list__separator {
|
|
6541
6627
|
inset-block-start: 0;
|
|
6542
6628
|
opacity: 1;
|
|
@@ -7643,8 +7729,12 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
7643
7729
|
|
|
7644
7730
|
.inkra-alert-dialog__content[data-state="closed"] {
|
|
7645
7731
|
animation: inkra-alert-dialog-content-out var(--inkra-motion-normal) var(--inkra-ease);
|
|
7732
|
+
pointer-events: none;
|
|
7646
7733
|
}
|
|
7647
7734
|
|
|
7735
|
+
.inkra-alert-dialog__backdrop[data-state],
|
|
7736
|
+
.inkra-alert-dialog__content[data-state] { animation-fill-mode: both; }
|
|
7737
|
+
|
|
7648
7738
|
.inkra-alert-dialog__content:focus-visible {
|
|
7649
7739
|
outline: var(--inkra-focus-width) solid var(--inkra-focus);
|
|
7650
7740
|
outline-offset: var(--inkra-focus-offset);
|
|
@@ -7724,7 +7814,12 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
7724
7814
|
|
|
7725
7815
|
@media (prefers-reduced-motion: reduce) {
|
|
7726
7816
|
.inkra-alert-dialog__backdrop,
|
|
7727
|
-
.inkra-alert-dialog__content { animation: none; }
|
|
7817
|
+
.inkra-alert-dialog__content { animation: none !important; }
|
|
7818
|
+
}
|
|
7819
|
+
|
|
7820
|
+
@media print {
|
|
7821
|
+
.inkra-alert-dialog__backdrop,
|
|
7822
|
+
.inkra-alert-dialog__content { animation: none !important; }
|
|
7728
7823
|
}
|
|
7729
7824
|
|
|
7730
7825
|
@media (forced-colors: active) {
|
|
@@ -7765,6 +7860,10 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
7765
7860
|
.inkra-drawer__content[data-state="closed"][data-direction="top"] { animation: inkra-drawer-top-out var(--inkra-motion-slow) var(--inkra-ease); }
|
|
7766
7861
|
.inkra-drawer__content[data-state="closed"][data-direction="bottom"] { animation: inkra-drawer-bottom-out var(--inkra-motion-slow) var(--inkra-ease); }
|
|
7767
7862
|
|
|
7863
|
+
.inkra-drawer__backdrop[data-state],
|
|
7864
|
+
.inkra-drawer__content[data-state][data-direction] { animation-fill-mode: both; }
|
|
7865
|
+
.inkra-drawer__content[data-state="closed"] { pointer-events: none; }
|
|
7866
|
+
|
|
7768
7867
|
.inkra-drawer__surface,
|
|
7769
7868
|
.inkra-drawer__layout { block-size: 100%; display: flex; flex-direction: column; min-height: 0; inline-size: 100%; }
|
|
7770
7869
|
.inkra-drawer__surface { color: var(--inkra-ink); position: relative; }
|
|
@@ -7814,7 +7913,12 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
7814
7913
|
|
|
7815
7914
|
@media (prefers-reduced-motion: reduce) {
|
|
7816
7915
|
.inkra-drawer__backdrop,
|
|
7817
|
-
.inkra-drawer__content { animation: none; }
|
|
7916
|
+
.inkra-drawer__content { animation: none !important; }
|
|
7917
|
+
}
|
|
7918
|
+
|
|
7919
|
+
@media print {
|
|
7920
|
+
.inkra-drawer__backdrop,
|
|
7921
|
+
.inkra-drawer__content { animation: none !important; }
|
|
7818
7922
|
}
|
|
7819
7923
|
|
|
7820
7924
|
@media (forced-colors: active) {
|
|
@@ -8055,8 +8159,29 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
8055
8159
|
.inkra-tree__description { min-width: 0; color: var(--inkra-ink-muted); font-size: var(--inkra-text-sm); line-height: var(--inkra-line-body); }
|
|
8056
8160
|
.inkra-tree__item[data-disabled] .inkra-tree__item-content { opacity: .55; }
|
|
8057
8161
|
.inkra-tree__empty { min-height: 72px; display: grid; place-items: center; padding: var(--inkra-space-4); color: var(--inkra-ink-muted); text-align: center; }
|
|
8162
|
+
|
|
8163
|
+
.inkra-tree__item-content { animation: inkra-tree-row-in var(--inkra-motion-normal) var(--inkra-ease); }
|
|
8164
|
+
.inkra-tree__selection { animation: inkra-tree-selection-in var(--inkra-motion-fast) var(--inkra-ease); }
|
|
8165
|
+
|
|
8166
|
+
@keyframes inkra-tree-row-in {
|
|
8167
|
+
from { opacity: 0; transform: translateY(calc(-1 * var(--inkra-space-1))); }
|
|
8168
|
+
to { opacity: 1; transform: translateY(0); }
|
|
8169
|
+
}
|
|
8170
|
+
|
|
8171
|
+
@keyframes inkra-tree-selection-in {
|
|
8172
|
+
from { opacity: 0; }
|
|
8173
|
+
to { opacity: 1; }
|
|
8174
|
+
}
|
|
8175
|
+
|
|
8058
8176
|
@media (prefers-reduced-motion: reduce) {
|
|
8059
8177
|
.inkra-tree__chevron { transition: none; }
|
|
8178
|
+
.inkra-tree__item-content,
|
|
8179
|
+
.inkra-tree__selection { animation: none !important; }
|
|
8180
|
+
}
|
|
8181
|
+
|
|
8182
|
+
@media print {
|
|
8183
|
+
.inkra-tree__item-content,
|
|
8184
|
+
.inkra-tree__selection { animation: none !important; }
|
|
8060
8185
|
}
|
|
8061
8186
|
@media (forced-colors: active) {
|
|
8062
8187
|
.inkra-tree__item[data-selected] .inkra-tree__item-content { outline: 1px solid Highlight; color: HighlightText; background: Highlight; forced-color-adjust: none; }
|
|
@@ -7,7 +7,7 @@ export declare function TooltipRoot(props: TooltipRootProps): import("react").JS
|
|
|
7
7
|
export type TooltipTriggerProps = TooltipPrimitive.TooltipTriggerProps;
|
|
8
8
|
export declare const TooltipTrigger: import("react").ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
export type TooltipPortalProps = TooltipPrimitive.TooltipPortalProps;
|
|
10
|
-
export declare function TooltipPortal({ children, ...props }: TooltipPortalProps): import("react").
|
|
10
|
+
export declare function TooltipPortal({ children, ...props }: TooltipPortalProps): import("react").ReactNode;
|
|
11
11
|
export interface TooltipContentProps extends TooltipPrimitive.TooltipContentProps {
|
|
12
12
|
seed?: string | number;
|
|
13
13
|
surfaceClassName?: string;
|
package/dist/tooltip/Tooltip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
3
|
import { forwardRef, useId } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { mapPortalChildren, PortalThemeProvider, usePortalThemeProps, usePortalTriggerRef } from '../overlay/themeBridge.js';
|
|
5
5
|
import { PencilSurface } from '../PencilSurface.js';
|
|
6
6
|
import { PencilText } from '../PencilText.js';
|
|
7
7
|
function classes(...values) {
|
|
@@ -16,10 +16,11 @@ export const TooltipTrigger = forwardRef(function TooltipTrigger(props, forwarde
|
|
|
16
16
|
return _jsx(TooltipPrimitive.Trigger, { ...props, ref: ref });
|
|
17
17
|
});
|
|
18
18
|
export function TooltipPortal({ children, ...props }) {
|
|
19
|
-
return (_jsx(TooltipPrimitive.Portal, { ...props, children:
|
|
19
|
+
return mapPortalChildren(children, child => _jsx(TooltipPrimitive.Portal, { ...props, children: child }));
|
|
20
20
|
}
|
|
21
21
|
export const TooltipContent = forwardRef(function TooltipContent({ children, className, seed, sideOffset = 6, surfaceClassName, surfaceRadius = 6, surfaceVariant = 'paper', ...props }, ref) {
|
|
22
22
|
const generatedId = useId();
|
|
23
|
+
props = usePortalThemeProps(props);
|
|
23
24
|
const resolvedSeed = seed ?? `inkra-tooltip-${generatedId}`;
|
|
24
25
|
return (_jsx(TooltipPrimitive.Content, { ...props, className: classes('inkra-tooltip__content', className), ref: ref, sideOffset: sideOffset, children: _jsx(PencilSurface, { className: classes('inkra-tooltip__surface', surfaceClassName), radius: surfaceRadius, seed: resolvedSeed, variant: surfaceVariant, children: _jsx("div", { className: "inkra-tooltip__content-body", children: typeof children === 'string' ? (_jsx(PencilText, { seed: `${resolvedSeed}-text`, children: children })) : children }) }) }));
|
|
25
26
|
});
|
|
@@ -4,6 +4,7 @@ import { useVirtualizer } from '@tanstack/react-virtual';
|
|
|
4
4
|
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState, } from 'react';
|
|
5
5
|
import { PencilSurface } from '../PencilSurface.js';
|
|
6
6
|
import { PencilLine } from '../PencilLine.js';
|
|
7
|
+
import { PencilText } from '../PencilText.js';
|
|
7
8
|
import { clampVirtualListIndex, getVirtualListSsrIndexes, normalizeVirtualListOverscan, normalizeVirtualListSize, normalizeVirtualListSpacing, virtualListKeyAttribute, } from './model.js';
|
|
8
9
|
function classes(...values) {
|
|
9
10
|
return values.filter(Boolean).join(' ');
|
|
@@ -109,7 +110,7 @@ function VirtualListInner({ 'aria-label': ariaLabel, className, empty, emptyLabe
|
|
|
109
110
|
} },
|
|
110
111
|
row.index > 0 && _jsx(PencilLine, { className: "inkra-virtual-list__separator", seed: `virtual-list-separator-${virtualListKeyAttribute(row.key)}`, weight: 0.75 }),
|
|
111
112
|
renderItem(state));
|
|
112
|
-
}) }), items.length === 0 && _jsx("div", { className: "inkra-virtual-list__empty", role: "status", children: empty ?? emptyLabel })] });
|
|
113
|
+
}) }), items.length === 0 && _jsx("div", { className: "inkra-virtual-list__empty", role: "status", children: empty ?? _jsx(PencilText, { children: emptyLabel }) })] });
|
|
113
114
|
const rootProps = {
|
|
114
115
|
...props,
|
|
115
116
|
'aria-label': ariaLabel,
|
|
@@ -123,6 +124,6 @@ function VirtualListInner({ 'aria-label': ariaLabel, className, empty, emptyLabe
|
|
|
123
124
|
};
|
|
124
125
|
return externalScroll
|
|
125
126
|
? _jsx("div", { ...rootProps, ref: rootRef, children: content })
|
|
126
|
-
:
|
|
127
|
+
: _jsxs(PencilSurface, { as: "div", className: "inkra-virtual-list__frame", radius: 8, seed: "virtual-list", variant: "paper", children: [_jsx("div", { ...rootProps, ref: rootRef, children: content }), _jsx(PencilSurface, { "aria-hidden": "true", as: "span", className: "inkra-virtual-list__focus", radius: 8, seed: "virtual-list-focus", variant: "outline" })] });
|
|
127
128
|
}
|
|
128
129
|
export const VirtualList = forwardRef(VirtualListInner);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkra/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Hand-drawn React controls with native semantics and deterministic decoration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -101,13 +101,14 @@
|
|
|
101
101
|
"@radix-ui/react-slider": "^1.6.1",
|
|
102
102
|
"@radix-ui/react-tabs": "^1.2.1",
|
|
103
103
|
"@radix-ui/react-tooltip": "^1.4.1",
|
|
104
|
-
"@tanstack/react-virtual": "3.14.22",
|
|
105
104
|
"@tanstack/react-table": "^8.21.3",
|
|
106
|
-
"@
|
|
105
|
+
"@tanstack/react-virtual": "3.14.22",
|
|
107
106
|
"@types/geojson": "^7946.0.16",
|
|
107
|
+
"@xyflow/react": "^12.12.0",
|
|
108
108
|
"cmdk": "^1.1.1",
|
|
109
109
|
"d3-scale": "4.0.2",
|
|
110
110
|
"d3-shape": "3.2.0",
|
|
111
|
+
"decimal.js": "10.6.0",
|
|
111
112
|
"embla-carousel-autoplay": "^8.6.0",
|
|
112
113
|
"embla-carousel-react": "^8.6.0",
|
|
113
114
|
"leaflet": "^1.9.4",
|