@kushagradhawan/kookie-ui 0.1.8 → 0.1.10
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/components.css +156 -97
- package/dist/cjs/components/image.d.ts +2 -2
- package/dist/cjs/components/image.d.ts.map +1 -1
- package/dist/cjs/components/image.js +1 -1
- package/dist/cjs/components/image.js.map +3 -3
- package/dist/cjs/components/image.props.d.ts +16 -0
- package/dist/cjs/components/image.props.d.ts.map +1 -1
- package/dist/cjs/components/image.props.js +1 -1
- package/dist/cjs/components/image.props.js.map +3 -3
- package/dist/esm/components/image.d.ts +2 -2
- package/dist/esm/components/image.d.ts.map +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/image.js.map +3 -3
- package/dist/esm/components/image.props.d.ts +16 -0
- package/dist/esm/components/image.props.d.ts.map +1 -1
- package/dist/esm/components/image.props.js +1 -1
- package/dist/esm/components/image.props.js.map +3 -3
- package/package.json +1 -1
- package/src/components/button.css +8 -8
- package/src/components/icon-button.css +8 -8
- package/src/components/image.css +89 -1
- package/src/components/image.props.ts +17 -0
- package/src/components/image.tsx +133 -4
- package/styles.css +156 -97
package/components.css
CHANGED
|
@@ -2337,8 +2337,8 @@
|
|
|
2337
2337
|
letter-spacing: var(--letter-spacing-1);
|
|
2338
2338
|
}
|
|
2339
2339
|
.rt-Button:where(.rt-r-size-1) :where(svg) {
|
|
2340
|
-
width:
|
|
2341
|
-
height:
|
|
2340
|
+
width: 16px;
|
|
2341
|
+
height: 16px;
|
|
2342
2342
|
}
|
|
2343
2343
|
.rt-Button:where(.rt-r-size-1):where(:not(.rt-variant-ghost)) {
|
|
2344
2344
|
padding-left: var(--space-2);
|
|
@@ -2356,8 +2356,8 @@
|
|
|
2356
2356
|
letter-spacing: var(--letter-spacing-2);
|
|
2357
2357
|
}
|
|
2358
2358
|
.rt-Button:where(.rt-r-size-2) :where(svg) {
|
|
2359
|
-
width:
|
|
2360
|
-
height:
|
|
2359
|
+
width: 18px;
|
|
2360
|
+
height: 18px;
|
|
2361
2361
|
}
|
|
2362
2362
|
.rt-Button:where(.rt-r-size-2):where(:not(.rt-variant-ghost)) {
|
|
2363
2363
|
padding-left: var(--space-3);
|
|
@@ -2375,8 +2375,8 @@
|
|
|
2375
2375
|
letter-spacing: var(--letter-spacing-3);
|
|
2376
2376
|
}
|
|
2377
2377
|
.rt-Button:where(.rt-r-size-3) :where(svg) {
|
|
2378
|
-
width:
|
|
2379
|
-
height:
|
|
2378
|
+
width: 20px;
|
|
2379
|
+
height: 20px;
|
|
2380
2380
|
}
|
|
2381
2381
|
.rt-Button:where(.rt-r-size-3):where(:not(.rt-variant-ghost)) {
|
|
2382
2382
|
padding-left: var(--space-4);
|
|
@@ -2394,8 +2394,8 @@
|
|
|
2394
2394
|
letter-spacing: var(--letter-spacing-4);
|
|
2395
2395
|
}
|
|
2396
2396
|
.rt-Button:where(.rt-r-size-4) :where(svg) {
|
|
2397
|
-
width:
|
|
2398
|
-
height:
|
|
2397
|
+
width: 22px;
|
|
2398
|
+
height: 22px;
|
|
2399
2399
|
}
|
|
2400
2400
|
.rt-Button:where(.rt-r-size-4):where(:not(.rt-variant-ghost)) {
|
|
2401
2401
|
padding-left: var(--space-5);
|
|
@@ -2414,8 +2414,8 @@
|
|
|
2414
2414
|
letter-spacing: var(--letter-spacing-1);
|
|
2415
2415
|
}
|
|
2416
2416
|
.rt-Button:where(.xs\:rt-r-size-1) :where(svg) {
|
|
2417
|
-
width:
|
|
2418
|
-
height:
|
|
2417
|
+
width: 16px;
|
|
2418
|
+
height: 16px;
|
|
2419
2419
|
}
|
|
2420
2420
|
.rt-Button:where(.xs\:rt-r-size-1):where(:not(.rt-variant-ghost)) {
|
|
2421
2421
|
padding-left: var(--space-2);
|
|
@@ -2433,8 +2433,8 @@
|
|
|
2433
2433
|
letter-spacing: var(--letter-spacing-2);
|
|
2434
2434
|
}
|
|
2435
2435
|
.rt-Button:where(.xs\:rt-r-size-2) :where(svg) {
|
|
2436
|
-
width:
|
|
2437
|
-
height:
|
|
2436
|
+
width: 18px;
|
|
2437
|
+
height: 18px;
|
|
2438
2438
|
}
|
|
2439
2439
|
.rt-Button:where(.xs\:rt-r-size-2):where(:not(.rt-variant-ghost)) {
|
|
2440
2440
|
padding-left: var(--space-3);
|
|
@@ -2452,8 +2452,8 @@
|
|
|
2452
2452
|
letter-spacing: var(--letter-spacing-3);
|
|
2453
2453
|
}
|
|
2454
2454
|
.rt-Button:where(.xs\:rt-r-size-3) :where(svg) {
|
|
2455
|
-
width:
|
|
2456
|
-
height:
|
|
2455
|
+
width: 20px;
|
|
2456
|
+
height: 20px;
|
|
2457
2457
|
}
|
|
2458
2458
|
.rt-Button:where(.xs\:rt-r-size-3):where(:not(.rt-variant-ghost)) {
|
|
2459
2459
|
padding-left: var(--space-4);
|
|
@@ -2471,8 +2471,8 @@
|
|
|
2471
2471
|
letter-spacing: var(--letter-spacing-4);
|
|
2472
2472
|
}
|
|
2473
2473
|
.rt-Button:where(.xs\:rt-r-size-4) :where(svg) {
|
|
2474
|
-
width:
|
|
2475
|
-
height:
|
|
2474
|
+
width: 22px;
|
|
2475
|
+
height: 22px;
|
|
2476
2476
|
}
|
|
2477
2477
|
.rt-Button:where(.xs\:rt-r-size-4):where(:not(.rt-variant-ghost)) {
|
|
2478
2478
|
padding-left: var(--space-5);
|
|
@@ -2492,8 +2492,8 @@
|
|
|
2492
2492
|
letter-spacing: var(--letter-spacing-1);
|
|
2493
2493
|
}
|
|
2494
2494
|
.rt-Button:where(.sm\:rt-r-size-1) :where(svg) {
|
|
2495
|
-
width:
|
|
2496
|
-
height:
|
|
2495
|
+
width: 16px;
|
|
2496
|
+
height: 16px;
|
|
2497
2497
|
}
|
|
2498
2498
|
.rt-Button:where(.sm\:rt-r-size-1):where(:not(.rt-variant-ghost)) {
|
|
2499
2499
|
padding-left: var(--space-2);
|
|
@@ -2511,8 +2511,8 @@
|
|
|
2511
2511
|
letter-spacing: var(--letter-spacing-2);
|
|
2512
2512
|
}
|
|
2513
2513
|
.rt-Button:where(.sm\:rt-r-size-2) :where(svg) {
|
|
2514
|
-
width:
|
|
2515
|
-
height:
|
|
2514
|
+
width: 18px;
|
|
2515
|
+
height: 18px;
|
|
2516
2516
|
}
|
|
2517
2517
|
.rt-Button:where(.sm\:rt-r-size-2):where(:not(.rt-variant-ghost)) {
|
|
2518
2518
|
padding-left: var(--space-3);
|
|
@@ -2530,8 +2530,8 @@
|
|
|
2530
2530
|
letter-spacing: var(--letter-spacing-3);
|
|
2531
2531
|
}
|
|
2532
2532
|
.rt-Button:where(.sm\:rt-r-size-3) :where(svg) {
|
|
2533
|
-
width:
|
|
2534
|
-
height:
|
|
2533
|
+
width: 20px;
|
|
2534
|
+
height: 20px;
|
|
2535
2535
|
}
|
|
2536
2536
|
.rt-Button:where(.sm\:rt-r-size-3):where(:not(.rt-variant-ghost)) {
|
|
2537
2537
|
padding-left: var(--space-4);
|
|
@@ -2549,8 +2549,8 @@
|
|
|
2549
2549
|
letter-spacing: var(--letter-spacing-4);
|
|
2550
2550
|
}
|
|
2551
2551
|
.rt-Button:where(.sm\:rt-r-size-4) :where(svg) {
|
|
2552
|
-
width:
|
|
2553
|
-
height:
|
|
2552
|
+
width: 22px;
|
|
2553
|
+
height: 22px;
|
|
2554
2554
|
}
|
|
2555
2555
|
.rt-Button:where(.sm\:rt-r-size-4):where(:not(.rt-variant-ghost)) {
|
|
2556
2556
|
padding-left: var(--space-5);
|
|
@@ -2570,8 +2570,8 @@
|
|
|
2570
2570
|
letter-spacing: var(--letter-spacing-1);
|
|
2571
2571
|
}
|
|
2572
2572
|
.rt-Button:where(.md\:rt-r-size-1) :where(svg) {
|
|
2573
|
-
width:
|
|
2574
|
-
height:
|
|
2573
|
+
width: 16px;
|
|
2574
|
+
height: 16px;
|
|
2575
2575
|
}
|
|
2576
2576
|
.rt-Button:where(.md\:rt-r-size-1):where(:not(.rt-variant-ghost)) {
|
|
2577
2577
|
padding-left: var(--space-2);
|
|
@@ -2589,8 +2589,8 @@
|
|
|
2589
2589
|
letter-spacing: var(--letter-spacing-2);
|
|
2590
2590
|
}
|
|
2591
2591
|
.rt-Button:where(.md\:rt-r-size-2) :where(svg) {
|
|
2592
|
-
width:
|
|
2593
|
-
height:
|
|
2592
|
+
width: 18px;
|
|
2593
|
+
height: 18px;
|
|
2594
2594
|
}
|
|
2595
2595
|
.rt-Button:where(.md\:rt-r-size-2):where(:not(.rt-variant-ghost)) {
|
|
2596
2596
|
padding-left: var(--space-3);
|
|
@@ -2608,8 +2608,8 @@
|
|
|
2608
2608
|
letter-spacing: var(--letter-spacing-3);
|
|
2609
2609
|
}
|
|
2610
2610
|
.rt-Button:where(.md\:rt-r-size-3) :where(svg) {
|
|
2611
|
-
width:
|
|
2612
|
-
height:
|
|
2611
|
+
width: 20px;
|
|
2612
|
+
height: 20px;
|
|
2613
2613
|
}
|
|
2614
2614
|
.rt-Button:where(.md\:rt-r-size-3):where(:not(.rt-variant-ghost)) {
|
|
2615
2615
|
padding-left: var(--space-4);
|
|
@@ -2627,8 +2627,8 @@
|
|
|
2627
2627
|
letter-spacing: var(--letter-spacing-4);
|
|
2628
2628
|
}
|
|
2629
2629
|
.rt-Button:where(.md\:rt-r-size-4) :where(svg) {
|
|
2630
|
-
width:
|
|
2631
|
-
height:
|
|
2630
|
+
width: 22px;
|
|
2631
|
+
height: 22px;
|
|
2632
2632
|
}
|
|
2633
2633
|
.rt-Button:where(.md\:rt-r-size-4):where(:not(.rt-variant-ghost)) {
|
|
2634
2634
|
padding-left: var(--space-5);
|
|
@@ -2648,8 +2648,8 @@
|
|
|
2648
2648
|
letter-spacing: var(--letter-spacing-1);
|
|
2649
2649
|
}
|
|
2650
2650
|
.rt-Button:where(.lg\:rt-r-size-1) :where(svg) {
|
|
2651
|
-
width:
|
|
2652
|
-
height:
|
|
2651
|
+
width: 16px;
|
|
2652
|
+
height: 16px;
|
|
2653
2653
|
}
|
|
2654
2654
|
.rt-Button:where(.lg\:rt-r-size-1):where(:not(.rt-variant-ghost)) {
|
|
2655
2655
|
padding-left: var(--space-2);
|
|
@@ -2667,8 +2667,8 @@
|
|
|
2667
2667
|
letter-spacing: var(--letter-spacing-2);
|
|
2668
2668
|
}
|
|
2669
2669
|
.rt-Button:where(.lg\:rt-r-size-2) :where(svg) {
|
|
2670
|
-
width:
|
|
2671
|
-
height:
|
|
2670
|
+
width: 18px;
|
|
2671
|
+
height: 18px;
|
|
2672
2672
|
}
|
|
2673
2673
|
.rt-Button:where(.lg\:rt-r-size-2):where(:not(.rt-variant-ghost)) {
|
|
2674
2674
|
padding-left: var(--space-3);
|
|
@@ -2686,8 +2686,8 @@
|
|
|
2686
2686
|
letter-spacing: var(--letter-spacing-3);
|
|
2687
2687
|
}
|
|
2688
2688
|
.rt-Button:where(.lg\:rt-r-size-3) :where(svg) {
|
|
2689
|
-
width:
|
|
2690
|
-
height:
|
|
2689
|
+
width: 20px;
|
|
2690
|
+
height: 20px;
|
|
2691
2691
|
}
|
|
2692
2692
|
.rt-Button:where(.lg\:rt-r-size-3):where(:not(.rt-variant-ghost)) {
|
|
2693
2693
|
padding-left: var(--space-4);
|
|
@@ -2705,8 +2705,8 @@
|
|
|
2705
2705
|
letter-spacing: var(--letter-spacing-4);
|
|
2706
2706
|
}
|
|
2707
2707
|
.rt-Button:where(.lg\:rt-r-size-4) :where(svg) {
|
|
2708
|
-
width:
|
|
2709
|
-
height:
|
|
2708
|
+
width: 22px;
|
|
2709
|
+
height: 22px;
|
|
2710
2710
|
}
|
|
2711
2711
|
.rt-Button:where(.lg\:rt-r-size-4):where(:not(.rt-variant-ghost)) {
|
|
2712
2712
|
padding-left: var(--space-5);
|
|
@@ -2726,8 +2726,8 @@
|
|
|
2726
2726
|
letter-spacing: var(--letter-spacing-1);
|
|
2727
2727
|
}
|
|
2728
2728
|
.rt-Button:where(.xl\:rt-r-size-1) :where(svg) {
|
|
2729
|
-
width:
|
|
2730
|
-
height:
|
|
2729
|
+
width: 16px;
|
|
2730
|
+
height: 16px;
|
|
2731
2731
|
}
|
|
2732
2732
|
.rt-Button:where(.xl\:rt-r-size-1):where(:not(.rt-variant-ghost)) {
|
|
2733
2733
|
padding-left: var(--space-2);
|
|
@@ -2745,8 +2745,8 @@
|
|
|
2745
2745
|
letter-spacing: var(--letter-spacing-2);
|
|
2746
2746
|
}
|
|
2747
2747
|
.rt-Button:where(.xl\:rt-r-size-2) :where(svg) {
|
|
2748
|
-
width:
|
|
2749
|
-
height:
|
|
2748
|
+
width: 18px;
|
|
2749
|
+
height: 18px;
|
|
2750
2750
|
}
|
|
2751
2751
|
.rt-Button:where(.xl\:rt-r-size-2):where(:not(.rt-variant-ghost)) {
|
|
2752
2752
|
padding-left: var(--space-3);
|
|
@@ -2764,8 +2764,8 @@
|
|
|
2764
2764
|
letter-spacing: var(--letter-spacing-3);
|
|
2765
2765
|
}
|
|
2766
2766
|
.rt-Button:where(.xl\:rt-r-size-3) :where(svg) {
|
|
2767
|
-
width:
|
|
2768
|
-
height:
|
|
2767
|
+
width: 20px;
|
|
2768
|
+
height: 20px;
|
|
2769
2769
|
}
|
|
2770
2770
|
.rt-Button:where(.xl\:rt-r-size-3):where(:not(.rt-variant-ghost)) {
|
|
2771
2771
|
padding-left: var(--space-4);
|
|
@@ -2783,8 +2783,8 @@
|
|
|
2783
2783
|
letter-spacing: var(--letter-spacing-4);
|
|
2784
2784
|
}
|
|
2785
2785
|
.rt-Button:where(.xl\:rt-r-size-4) :where(svg) {
|
|
2786
|
-
width:
|
|
2787
|
-
height:
|
|
2786
|
+
width: 22px;
|
|
2787
|
+
height: 22px;
|
|
2788
2788
|
}
|
|
2789
2789
|
.rt-Button:where(.xl\:rt-r-size-4):where(:not(.rt-variant-ghost)) {
|
|
2790
2790
|
padding-left: var(--space-5);
|
|
@@ -5794,20 +5794,20 @@
|
|
|
5794
5794
|
width: var(--base-button-height);
|
|
5795
5795
|
}
|
|
5796
5796
|
.rt-IconButton:where(.rt-r-size-1) :where(svg) {
|
|
5797
|
-
width:
|
|
5798
|
-
height:
|
|
5797
|
+
width: 16px;
|
|
5798
|
+
height: 16px;
|
|
5799
5799
|
}
|
|
5800
5800
|
.rt-IconButton:where(.rt-r-size-2) :where(svg) {
|
|
5801
|
-
width:
|
|
5802
|
-
height:
|
|
5801
|
+
width: 18px;
|
|
5802
|
+
height: 18px;
|
|
5803
5803
|
}
|
|
5804
5804
|
.rt-IconButton:where(.rt-r-size-3) :where(svg) {
|
|
5805
|
-
width:
|
|
5806
|
-
height:
|
|
5805
|
+
width: 20px;
|
|
5806
|
+
height: 20px;
|
|
5807
5807
|
}
|
|
5808
5808
|
.rt-IconButton:where(.rt-r-size-4) :where(svg) {
|
|
5809
|
-
width:
|
|
5810
|
-
height:
|
|
5809
|
+
width: 22px;
|
|
5810
|
+
height: 22px;
|
|
5811
5811
|
}
|
|
5812
5812
|
.rt-IconButton:where(.rt-variant-ghost):where(.rt-r-size-1) {
|
|
5813
5813
|
--icon-button-ghost-padding: var(--space-1);
|
|
@@ -5823,20 +5823,20 @@
|
|
|
5823
5823
|
}
|
|
5824
5824
|
@media (min-width: 520px) {
|
|
5825
5825
|
.rt-IconButton:where(.xs\:rt-r-size-1) :where(svg) {
|
|
5826
|
-
width:
|
|
5827
|
-
height:
|
|
5826
|
+
width: 16px;
|
|
5827
|
+
height: 16px;
|
|
5828
5828
|
}
|
|
5829
5829
|
.rt-IconButton:where(.xs\:rt-r-size-2) :where(svg) {
|
|
5830
|
-
width:
|
|
5831
|
-
height:
|
|
5830
|
+
width: 18px;
|
|
5831
|
+
height: 18px;
|
|
5832
5832
|
}
|
|
5833
5833
|
.rt-IconButton:where(.xs\:rt-r-size-3) :where(svg) {
|
|
5834
|
-
width:
|
|
5835
|
-
height:
|
|
5834
|
+
width: 20px;
|
|
5835
|
+
height: 20px;
|
|
5836
5836
|
}
|
|
5837
5837
|
.rt-IconButton:where(.xs\:rt-r-size-4) :where(svg) {
|
|
5838
|
-
width:
|
|
5839
|
-
height:
|
|
5838
|
+
width: 22px;
|
|
5839
|
+
height: 22px;
|
|
5840
5840
|
}
|
|
5841
5841
|
.rt-IconButton:where(.rt-variant-ghost):where(.xs\:rt-r-size-1) {
|
|
5842
5842
|
--icon-button-ghost-padding: var(--space-1);
|
|
@@ -5853,20 +5853,20 @@
|
|
|
5853
5853
|
}
|
|
5854
5854
|
@media (min-width: 768px) {
|
|
5855
5855
|
.rt-IconButton:where(.sm\:rt-r-size-1) :where(svg) {
|
|
5856
|
-
width:
|
|
5857
|
-
height:
|
|
5856
|
+
width: 16px;
|
|
5857
|
+
height: 16px;
|
|
5858
5858
|
}
|
|
5859
5859
|
.rt-IconButton:where(.sm\:rt-r-size-2) :where(svg) {
|
|
5860
|
-
width:
|
|
5861
|
-
height:
|
|
5860
|
+
width: 18px;
|
|
5861
|
+
height: 18px;
|
|
5862
5862
|
}
|
|
5863
5863
|
.rt-IconButton:where(.sm\:rt-r-size-3) :where(svg) {
|
|
5864
|
-
width:
|
|
5865
|
-
height:
|
|
5864
|
+
width: 20px;
|
|
5865
|
+
height: 20px;
|
|
5866
5866
|
}
|
|
5867
5867
|
.rt-IconButton:where(.sm\:rt-r-size-4) :where(svg) {
|
|
5868
|
-
width:
|
|
5869
|
-
height:
|
|
5868
|
+
width: 22px;
|
|
5869
|
+
height: 22px;
|
|
5870
5870
|
}
|
|
5871
5871
|
.rt-IconButton:where(.rt-variant-ghost):where(.sm\:rt-r-size-1) {
|
|
5872
5872
|
--icon-button-ghost-padding: var(--space-1);
|
|
@@ -5883,20 +5883,20 @@
|
|
|
5883
5883
|
}
|
|
5884
5884
|
@media (min-width: 1024px) {
|
|
5885
5885
|
.rt-IconButton:where(.md\:rt-r-size-1) :where(svg) {
|
|
5886
|
-
width:
|
|
5887
|
-
height:
|
|
5886
|
+
width: 16px;
|
|
5887
|
+
height: 16px;
|
|
5888
5888
|
}
|
|
5889
5889
|
.rt-IconButton:where(.md\:rt-r-size-2) :where(svg) {
|
|
5890
|
-
width:
|
|
5891
|
-
height:
|
|
5890
|
+
width: 18px;
|
|
5891
|
+
height: 18px;
|
|
5892
5892
|
}
|
|
5893
5893
|
.rt-IconButton:where(.md\:rt-r-size-3) :where(svg) {
|
|
5894
|
-
width:
|
|
5895
|
-
height:
|
|
5894
|
+
width: 20px;
|
|
5895
|
+
height: 20px;
|
|
5896
5896
|
}
|
|
5897
5897
|
.rt-IconButton:where(.md\:rt-r-size-4) :where(svg) {
|
|
5898
|
-
width:
|
|
5899
|
-
height:
|
|
5898
|
+
width: 22px;
|
|
5899
|
+
height: 22px;
|
|
5900
5900
|
}
|
|
5901
5901
|
.rt-IconButton:where(.rt-variant-ghost):where(.md\:rt-r-size-1) {
|
|
5902
5902
|
--icon-button-ghost-padding: var(--space-1);
|
|
@@ -5913,20 +5913,20 @@
|
|
|
5913
5913
|
}
|
|
5914
5914
|
@media (min-width: 1280px) {
|
|
5915
5915
|
.rt-IconButton:where(.lg\:rt-r-size-1) :where(svg) {
|
|
5916
|
-
width:
|
|
5917
|
-
height:
|
|
5916
|
+
width: 16px;
|
|
5917
|
+
height: 16px;
|
|
5918
5918
|
}
|
|
5919
5919
|
.rt-IconButton:where(.lg\:rt-r-size-2) :where(svg) {
|
|
5920
|
-
width:
|
|
5921
|
-
height:
|
|
5920
|
+
width: 18px;
|
|
5921
|
+
height: 18px;
|
|
5922
5922
|
}
|
|
5923
5923
|
.rt-IconButton:where(.lg\:rt-r-size-3) :where(svg) {
|
|
5924
|
-
width:
|
|
5925
|
-
height:
|
|
5924
|
+
width: 20px;
|
|
5925
|
+
height: 20px;
|
|
5926
5926
|
}
|
|
5927
5927
|
.rt-IconButton:where(.lg\:rt-r-size-4) :where(svg) {
|
|
5928
|
-
width:
|
|
5929
|
-
height:
|
|
5928
|
+
width: 22px;
|
|
5929
|
+
height: 22px;
|
|
5930
5930
|
}
|
|
5931
5931
|
.rt-IconButton:where(.rt-variant-ghost):where(.lg\:rt-r-size-1) {
|
|
5932
5932
|
--icon-button-ghost-padding: var(--space-1);
|
|
@@ -5943,20 +5943,20 @@
|
|
|
5943
5943
|
}
|
|
5944
5944
|
@media (min-width: 1640px) {
|
|
5945
5945
|
.rt-IconButton:where(.xl\:rt-r-size-1) :where(svg) {
|
|
5946
|
-
width:
|
|
5947
|
-
height:
|
|
5946
|
+
width: 16px;
|
|
5947
|
+
height: 16px;
|
|
5948
5948
|
}
|
|
5949
5949
|
.rt-IconButton:where(.xl\:rt-r-size-2) :where(svg) {
|
|
5950
|
-
width:
|
|
5951
|
-
height:
|
|
5950
|
+
width: 18px;
|
|
5951
|
+
height: 18px;
|
|
5952
5952
|
}
|
|
5953
5953
|
.rt-IconButton:where(.xl\:rt-r-size-3) :where(svg) {
|
|
5954
|
-
width:
|
|
5955
|
-
height:
|
|
5954
|
+
width: 20px;
|
|
5955
|
+
height: 20px;
|
|
5956
5956
|
}
|
|
5957
5957
|
.rt-IconButton:where(.xl\:rt-r-size-4) :where(svg) {
|
|
5958
|
-
width:
|
|
5959
|
-
height:
|
|
5958
|
+
width: 22px;
|
|
5959
|
+
height: 22px;
|
|
5960
5960
|
}
|
|
5961
5961
|
.rt-IconButton:where(.rt-variant-ghost):where(.xl\:rt-r-size-1) {
|
|
5962
5962
|
--icon-button-ghost-padding: var(--space-1);
|
|
@@ -5975,7 +5975,66 @@
|
|
|
5975
5975
|
display: block;
|
|
5976
5976
|
object-fit: var(--object-fit);
|
|
5977
5977
|
box-shadow: var(--box-shadow);
|
|
5978
|
-
border-radius: max(var(--radius-
|
|
5978
|
+
border-radius: max(var(--radius-4), var(--radius-full));
|
|
5979
|
+
transition: var(--transition-button);
|
|
5980
|
+
}
|
|
5981
|
+
.rt-Image:where(:any-link, button, label) {
|
|
5982
|
+
cursor: pointer;
|
|
5983
|
+
}
|
|
5984
|
+
@media (hover: hover) {
|
|
5985
|
+
.rt-Image:where(:any-link, button, label):where(:hover) {
|
|
5986
|
+
transform: scale(1.02);
|
|
5987
|
+
box-shadow: var(--box-shadow, var(--shadow-2)), 0 0 0 1px var(--gray-a4);
|
|
5988
|
+
}
|
|
5989
|
+
}
|
|
5990
|
+
.rt-Image:where(:any-link, button, label):where(:focus-visible) {
|
|
5991
|
+
outline: 2px solid var(--focus-8);
|
|
5992
|
+
outline-offset: 2px;
|
|
5993
|
+
}
|
|
5994
|
+
.rt-Image:where(:any-link, button, label):where(:active) {
|
|
5995
|
+
transform: scale(0.98);
|
|
5996
|
+
}
|
|
5997
|
+
.rt-variant-blur {
|
|
5998
|
+
position: relative;
|
|
5999
|
+
display: inline-block;
|
|
6000
|
+
--blur-filter: blur(16px) saturate(1.5);
|
|
6001
|
+
--blur-opacity: 0.5;
|
|
6002
|
+
--blur-offset-y: 8px;
|
|
6003
|
+
--blur-offset-x: 0;
|
|
6004
|
+
}
|
|
6005
|
+
.rt-variant-blur:where(:any-link, button, label) {
|
|
6006
|
+
cursor: pointer;
|
|
6007
|
+
transition: var(--transition-button);
|
|
6008
|
+
}
|
|
6009
|
+
@media (hover: hover) {
|
|
6010
|
+
.rt-variant-blur:where(:any-link, button, label):where(:hover) {
|
|
6011
|
+
transform: scale(1.02);
|
|
6012
|
+
}
|
|
6013
|
+
}
|
|
6014
|
+
.rt-variant-blur:where(:any-link, button, label):where(:focus-visible) {
|
|
6015
|
+
outline: 2px solid var(--focus-8);
|
|
6016
|
+
outline-offset: 2px;
|
|
6017
|
+
}
|
|
6018
|
+
.rt-variant-blur:where(:any-link, button, label):where(:active) {
|
|
6019
|
+
transform: scale(0.98);
|
|
6020
|
+
}
|
|
6021
|
+
.rt-variant-blur:where(:any-link, button, label) .rt-Image {
|
|
6022
|
+
cursor: inherit;
|
|
6023
|
+
transform: none !important;
|
|
6024
|
+
outline: none !important;
|
|
6025
|
+
box-shadow: var(--box-shadow) !important;
|
|
6026
|
+
}
|
|
6027
|
+
.rt-Image--blur-bg {
|
|
6028
|
+
position: absolute;
|
|
6029
|
+
top: var(--blur-offset-y, 8px);
|
|
6030
|
+
left: var(--blur-offset-x, 0);
|
|
6031
|
+
filter: var(--blur-filter);
|
|
6032
|
+
opacity: var(--blur-opacity);
|
|
6033
|
+
z-index: -1;
|
|
6034
|
+
}
|
|
6035
|
+
.rt-Image--blur {
|
|
6036
|
+
position: relative;
|
|
6037
|
+
z-index: 1;
|
|
5979
6038
|
}
|
|
5980
6039
|
.rt-r-fit-cover {
|
|
5981
6040
|
--object-fit: cover;
|
|
@@ -11,9 +11,9 @@ type ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {
|
|
|
11
11
|
interface ImageProps extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>, MarginProps, WidthProps, HeightProps, ImageOwnProps {
|
|
12
12
|
/**
|
|
13
13
|
* The alt attribute provides alternative information for an image if a user for some reason cannot view it.
|
|
14
|
-
* Required for accessibility.
|
|
14
|
+
* Required for accessibility when not using asChild.
|
|
15
15
|
*/
|
|
16
|
-
alt
|
|
16
|
+
alt?: string;
|
|
17
17
|
}
|
|
18
18
|
declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLImageElement>>;
|
|
19
19
|
export { Image };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/image.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D,KAAK,aAAa,GAAG,eAAe,CAAC,OAAO,aAAa,CAAC,GAAG;IAC3D,OAA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+
"use strict";"use client";var j=Object.create;var c=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var W=(e,r)=>{for(var t in r)c(e,t,{get:r[t],enumerable:!0})},I=(e,r,t,f)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of w(r))!C.call(e,s)&&s!==t&&c(e,s,{get:()=>r[s],enumerable:!(f=k(r,s))||f.enumerable});return e};var P=(e,r,t)=>(t=e!=null?j(z(e)):{},I(r||!e||!e.__esModule?c(t,"default",{value:e,enumerable:!0}):t,e)),G=e=>I(c({},"__esModule",{value:!0}),e);var H={};W(H,{Image:()=>y});module.exports=G(H);var o=P(require("react")),a=P(require("classnames")),b=require("./image.props.js"),N=require("../helpers/extract-props.js"),v=require("../props/margin.props.js"),x=require("../props/width.props.js"),D=require("../props/height.props.js");const y=o.forwardRef((e,r)=>{const{variant:t="surface",fit:f="cover",children:s}=e,{asChild:E,className:p,radius:l,style:n,loading:m="lazy",alt:u,src:g,children:M,...d}=(0,N.extractProps)(e,b.imagePropDefs,v.marginPropDefs,x.widthPropDefs,D.heightPropDefs),h=o.createElement("img",{"data-radius":l,loading:m,style:n,className:(0,a.default)("rt-reset","rt-Image",t==="blur"&&"rt-Image--blur",p),alt:u,src:g,...d,ref:r});if(E&&s){const i=o.Children.only(s);return t==="blur"?o.cloneElement(i,{className:(0,a.default)(i.props?.className,"rt-variant-blur"),style:{position:"relative",display:"inline-block",textDecoration:"none",color:"inherit",border:"none",background:"none",padding:0,font:"inherit",cursor:"pointer",...i.props?.style},children:o.createElement(o.Fragment,null,o.createElement("img",{"data-radius":l,loading:m,style:{...n,position:"absolute",top:"8px",left:"0"},className:(0,a.default)("rt-reset","rt-Image","rt-Image--blur","rt-Image--blur-bg",p),alt:"",src:g,...d}),o.createElement("img",{"data-radius":l,loading:m,style:{...n,position:"relative",zIndex:1},className:(0,a.default)("rt-reset","rt-Image","rt-Image--blur",p),alt:u,src:g,...d,ref:r}))}):o.cloneElement(i,{className:(0,a.default)(i.props?.className,"rt-Image"),style:{textDecoration:"none",color:"inherit",border:"none",background:"none",padding:0,font:"inherit",cursor:"pointer",...i.props?.style},children:h})}return t==="blur"?o.createElement("div",{className:"rt-variant-blur",style:{position:"relative",display:"inline-block"}},o.createElement("img",{"data-radius":l,loading:m,style:{...n,position:"absolute",top:"8px",left:"0"},className:(0,a.default)("rt-reset","rt-Image","rt-Image--blur","rt-Image--blur-bg",p),alt:"",src:g,...d}),o.createElement("img",{"data-radius":l,loading:m,style:{...n,position:"relative",zIndex:1},className:(0,a.default)("rt-reset","rt-Image","rt-Image--blur",p),alt:u,src:g,...d,ref:r})):h});y.displayName="Image";
|
|
2
2
|
//# sourceMappingURL=image.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/image.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { imagePropDefs } from './image.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { WidthProps } from '../props/width.props.js';\nimport type { HeightProps } from '../props/height.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ImageElement = React.ElementRef<'img'>;\ntype ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {\n loading?: 'eager' | 'lazy';\n};\n\ninterface ImageProps\n extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>,\n MarginProps,\n WidthProps,\n HeightProps,\n ImageOwnProps {\n /**\n * The alt attribute provides alternative information for an image if a user for some reason cannot view it.\n * Required for accessibility.\n */\n alt
|
|
5
|
-
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAAuB,oBACvBC,EAAuB,yBAEvBC,EAA8B,4BAC9BC,EAA6B,uCAC7BC,EAA+B,oCAC/BC,EAA8B,mCAC9BC,EAA+B,oCA0B/B,MAAMR,EAAQE,EAAM,WAAqC,CAACO,EAAOC,IAAiB,CAChF,KAAM,CACJ,UAAAC,EACA,OAAAC,EACA,MAAAC,EACA,QAAAC,EAAU,OACV,IAAAC,EACA,GAAGC,CACL,KAAI,
|
|
6
|
-
"names": ["image_exports", "__export", "Image", "__toCommonJS", "React", "import_classnames", "import_image_props", "import_extract_props", "import_margin_props", "import_width_props", "import_height_props", "props", "forwardedRef", "className", "radius", "style", "loading", "alt", "imgProps", "classNames"]
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { imagePropDefs } from './image.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { WidthProps } from '../props/width.props.js';\nimport type { HeightProps } from '../props/height.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ImageElement = React.ElementRef<'img'>;\ntype ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {\n loading?: 'eager' | 'lazy';\n};\n\ninterface ImageProps\n extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>,\n MarginProps,\n WidthProps,\n HeightProps,\n ImageOwnProps {\n /**\n * The alt attribute provides alternative information for an image if a user for some reason cannot view it.\n * Required for accessibility when not using asChild.\n */\n alt?: string;\n}\n\nconst Image = React.forwardRef<ImageElement, ImageProps>((props, forwardedRef) => {\n const { variant = 'surface', fit = 'cover', children } = props;\n const {\n asChild,\n className,\n radius,\n style,\n loading = 'lazy',\n alt,\n src,\n children: _children, // Extract children to exclude from imgProps\n ...imgProps\n } = extractProps(props, imagePropDefs, marginPropDefs, widthPropDefs, heightPropDefs);\n\n // Create the standard img element\n const imgElement = (\n <img\n data-radius={radius}\n loading={loading}\n style={style}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n variant === 'blur' && 'rt-Image--blur',\n className,\n )}\n alt={alt}\n src={src}\n {...imgProps}\n ref={forwardedRef}\n />\n );\n\n // Handle asChild - inject img into the child element\n if (asChild && children) {\n const child = React.Children.only(children) as React.ReactElement<any>;\n\n if (variant === 'blur') {\n // For blur variant with asChild\n return React.cloneElement(child, {\n className: classNames(child.props?.className, 'rt-variant-blur'),\n style: {\n position: 'relative',\n display: 'inline-block',\n textDecoration: 'none', // Reset link underlines\n color: 'inherit', // Reset link colors\n border: 'none', // Reset button borders\n background: 'none', // Reset button backgrounds\n padding: 0, // Reset button padding\n font: 'inherit', // Reset button fonts\n cursor: 'pointer', // Ensure interactive cursor\n ...child.props?.style,\n },\n children: (\n <>\n {/* Background blurred image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n position: 'absolute',\n top: '8px',\n left: '0',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n 'rt-Image--blur',\n 'rt-Image--blur-bg',\n className,\n )}\n alt=\"\"\n src={src}\n {...imgProps}\n />\n {/* Foreground image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{ ...style, position: 'relative', zIndex: 1 }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur', className)}\n alt={alt}\n src={src}\n {...imgProps}\n ref={forwardedRef}\n />\n </>\n ),\n });\n } else {\n // For surface variant with asChild\n return React.cloneElement(child, {\n className: classNames(child.props?.className, 'rt-Image'),\n style: {\n textDecoration: 'none', // Reset link underlines\n color: 'inherit', // Reset link colors\n border: 'none', // Reset button borders\n background: 'none', // Reset button backgrounds\n padding: 0, // Reset button padding\n font: 'inherit', // Reset button fonts\n cursor: 'pointer', // Ensure interactive cursor\n ...child.props?.style, // Allow user overrides\n },\n children: imgElement,\n });\n }\n }\n\n // Regular rendering without asChild\n if (variant === 'blur') {\n return (\n <div className=\"rt-variant-blur\" style={{ position: 'relative', display: 'inline-block' }}>\n {/* Background blurred image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{\n ...style,\n position: 'absolute',\n top: '8px',\n left: '0',\n }}\n className={classNames(\n 'rt-reset',\n 'rt-Image',\n 'rt-Image--blur',\n 'rt-Image--blur-bg',\n className,\n )}\n alt=\"\"\n src={src}\n {...imgProps}\n />\n {/* Foreground image */}\n <img\n data-radius={radius}\n loading={loading}\n style={{ ...style, position: 'relative', zIndex: 1 }}\n className={classNames('rt-reset', 'rt-Image', 'rt-Image--blur', className)}\n alt={alt}\n src={src}\n {...imgProps}\n ref={forwardedRef}\n />\n </div>\n );\n }\n\n return imgElement;\n});\n\nImage.displayName = 'Image';\n\nexport { Image };\nexport type { ImageProps };\n"],
|
|
5
|
+
"mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAAuB,oBACvBC,EAAuB,yBAEvBC,EAA8B,4BAC9BC,EAA6B,uCAC7BC,EAA+B,oCAC/BC,EAA8B,mCAC9BC,EAA+B,oCA0B/B,MAAMR,EAAQE,EAAM,WAAqC,CAACO,EAAOC,IAAiB,CAChF,KAAM,CAAE,QAAAC,EAAU,UAAW,IAAAC,EAAM,QAAS,SAAAC,CAAS,EAAIJ,EACnD,CACJ,QAAAK,EACA,UAAAC,EACA,OAAAC,EACA,MAAAC,EACA,QAAAC,EAAU,OACV,IAAAC,EACA,IAAAC,EACA,SAAUC,EACV,GAAGC,CACL,KAAI,gBAAab,EAAO,gBAAe,iBAAgB,gBAAe,gBAAc,EAG9Ec,EACJrB,EAAA,cAAC,OACC,cAAac,EACb,QAASE,EACT,MAA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,cAAC,OACC,cAAac,EACb,QAASE,EACT,MAAO,CACL,GAAGD,EACH,SAAU,WACV,IAAK,MACL,KAAM,GACR,EACA,aAAW,EAAAO,SACT,WACA,WACA,iBACA,oBACAT,CACF,EACA,IAAI,GACJ,IAAKK,EACJ,GAAGE,EACN,EAEApB,EAAA,cAAC,OACC,cAAac,EACb,QAASE,EACT,MAAO,CAAE,GAAGD,EAAO,SAAU,WAAY,OAAQ,CAAE,EACnD,aAAW,EAAAO,SAAW,WAAY,WAAY,iBAAkBT,CAAS,EACzE,IAAKI,EACL,IAAKC,EACJ,GAAGE,EACJ,IAAKZ,EACP,CACF,EAIGa,CACT,CAAC,EAEDvB,EAAM,YAAc",
|
|
6
|
+
"names": ["image_exports", "__export", "Image", "__toCommonJS", "React", "import_classnames", "import_image_props", "import_extract_props", "import_margin_props", "import_width_props", "import_height_props", "props", "forwardedRef", "variant", "fit", "children", "asChild", "className", "radius", "style", "loading", "alt", "src", "_children", "imgProps", "imgElement", "classNames", "child"]
|
|
7
7
|
}
|
|
@@ -28,6 +28,22 @@ declare const imagePropDefs: {
|
|
|
28
28
|
default: "cover";
|
|
29
29
|
responsive: true;
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Sets the visual variant of the image.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* variant="surface"
|
|
36
|
+
* variant="blur"
|
|
37
|
+
*/
|
|
38
|
+
variant: {
|
|
39
|
+
type: "enum";
|
|
40
|
+
className: string;
|
|
41
|
+
values: readonly ["surface", "blur"];
|
|
42
|
+
default: "surface";
|
|
43
|
+
};
|
|
44
|
+
asChild: {
|
|
45
|
+
type: "boolean";
|
|
46
|
+
};
|
|
31
47
|
};
|
|
32
48
|
export { imagePropDefs };
|
|
33
49
|
//# sourceMappingURL=image.props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.props.d.ts","sourceRoot":"","sources":["../../../src/components/image.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.props.d.ts","sourceRoot":"","sources":["../../../src/components/image.props.ts"],"names":[],"mappings":"AASA,QAAA,MAAM,aAAa;;;;;;;;;;;;IAEjB;;;;;;;;;;OAUG;;;;;;;;IAQH;;;;;;OAMG;;;;;;;;;;CAYJ,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var l=(r,e)=>{for(var t in e)s(r,t,{get:e[t],enumerable:!0})},v=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of m(e))!u.call(r,o)&&o!==t&&s(r,o,{get:()=>e[o],enumerable:!(a=c(e,o))||a.enumerable});return r};var d=r=>v(s({},"__esModule",{value:!0}),r);var b={};l(b,{imagePropDefs:()=>n});module.exports=d(b);var f=require("../props/as-child.prop.js"),i=require("../props/radius.prop.js"),p=require("../props/shadow.props.js");const D=["cover","contain","fill","scale-down","none"],P=["surface","blur"],n={...f.asChildPropDef,fit:{type:"enum",className:"rt-r-fit",values:D,default:"cover",responsive:!0},variant:{type:"enum",className:"rt-variant",values:P,default:"surface"},...i.radiusPropDef,...p.shadowPropDefs};
|
|
2
2
|
//# sourceMappingURL=image.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/image.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { radiusPropDef } from '../props/radius.prop.js';\nimport { shadowPropDefs } from '../props/shadow.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst objectFitValues = ['cover', 'contain', 'fill', 'scale-down', 'none'] as const;\n\nconst imagePropDefs = {\n /**\n * Sets the CSS **object-fit** property.\n * Controls how the image should be resized to fit its container.\n *\n * @example\n * fit=\"cover\"\n * fit=\"contain\"\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit\n */\n fit: {\n type: 'enum',\n className: 'rt-r-fit',\n values: objectFitValues,\n default: 'cover',\n responsive: true,\n },\n ...radiusPropDef,\n ...shadowPropDefs,\n} satisfies {\n fit: PropDef<(typeof objectFitValues)[number]>;\n};\n\nexport { imagePropDefs };\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA8B,mCAC9BC,EAA+B,oCAI/B,MAAMC,EAAkB,CAAC,QAAS,UAAW,OAAQ,aAAc,MAAM,
|
|
6
|
-
"names": ["image_props_exports", "__export", "imagePropDefs", "__toCommonJS", "import_radius_prop", "import_shadow_props", "objectFitValues"]
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { shadowPropDefs } from '../props/shadow.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst objectFitValues = ['cover', 'contain', 'fill', 'scale-down', 'none'] as const;\nconst variants = ['surface', 'blur'] as const;\n\nconst imagePropDefs = {\n ...asChildPropDef,\n /**\n * Sets the CSS **object-fit** property.\n * Controls how the image should be resized to fit its container.\n *\n * @example\n * fit=\"cover\"\n * fit=\"contain\"\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit\n */\n fit: {\n type: 'enum',\n className: 'rt-r-fit',\n values: objectFitValues,\n default: 'cover',\n responsive: true,\n },\n /**\n * Sets the visual variant of the image.\n *\n * @example\n * variant=\"surface\"\n * variant=\"blur\"\n */\n variant: {\n type: 'enum',\n className: 'rt-variant',\n values: variants,\n default: 'surface',\n },\n ...radiusPropDef,\n ...shadowPropDefs,\n} satisfies {\n fit: PropDef<(typeof objectFitValues)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { imagePropDefs };\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA+B,qCAC/BC,EAA8B,mCAC9BC,EAA+B,oCAI/B,MAAMC,EAAkB,CAAC,QAAS,UAAW,OAAQ,aAAc,MAAM,EACnEC,EAAW,CAAC,UAAW,MAAM,EAE7BN,EAAgB,CACpB,GAAG,iBAYH,IAAK,CACH,KAAM,OACN,UAAW,WACX,OAAQK,EACR,QAAS,QACT,WAAY,EACd,EAQA,QAAS,CACP,KAAM,OACN,UAAW,aACX,OAAQC,EACR,QAAS,SACX,EACA,GAAG,gBACH,GAAG,gBACL",
|
|
6
|
+
"names": ["image_props_exports", "__export", "imagePropDefs", "__toCommonJS", "import_as_child_prop", "import_radius_prop", "import_shadow_props", "objectFitValues", "variants"]
|
|
7
7
|
}
|
|
@@ -11,9 +11,9 @@ type ImageOwnProps = GetPropDefTypes<typeof imagePropDefs> & {
|
|
|
11
11
|
interface ImageProps extends ComponentPropsWithout<'img', RemovedProps | 'color' | 'width' | 'height' | 'alt'>, MarginProps, WidthProps, HeightProps, ImageOwnProps {
|
|
12
12
|
/**
|
|
13
13
|
* The alt attribute provides alternative information for an image if a user for some reason cannot view it.
|
|
14
|
-
* Required for accessibility.
|
|
14
|
+
* Required for accessibility when not using asChild.
|
|
15
15
|
*/
|
|
16
|
-
alt
|
|
16
|
+
alt?: string;
|
|
17
17
|
}
|
|
18
18
|
declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLImageElement>>;
|
|
19
19
|
export { Image };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/components/image.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,OAAO,KAAK,EAAE,qBAAqB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