@rolster/react-components 18.26.17 → 18.26.19
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/cjs/assets/{index-Dzi7TziB.css → index-DltP6XO9.css} +363 -0
- package/dist/cjs/index.js +26 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-Dzi7TziB.css → index-DltP6XO9.css} +363 -0
- package/dist/es/index.js +26 -25
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/organisms/Datatable/DataTable.css +362 -0
- package/dist/esm/components/organisms/Datatable/DataTable.css.map +1 -0
- package/dist/esm/components/organisms/Datatable/Datatable.d.ts +3 -3
- package/dist/esm/components/organisms/Datatable/Datatable.js +5 -2
- package/dist/esm/components/organisms/Datatable/Datatable.js.map +1 -1
- package/dist/esm/controllers/DatatableController.d.ts +2 -2
- package/dist/esm/controllers/DatatableController.js +5 -5
- package/dist/esm/controllers/DatatableController.js.map +1 -1
- package/package.json +2 -2
|
@@ -2485,6 +2485,369 @@
|
|
|
2485
2485
|
}
|
|
2486
2486
|
} /*# sourceMappingURL=Confirmation.css.map */
|
|
2487
2487
|
|
|
2488
|
+
.rls-datatable {
|
|
2489
|
+
--pvt-datatable-font-size: var(
|
|
2490
|
+
--rlc-datatable-font-size,
|
|
2491
|
+
var(--rls-label-font-size)
|
|
2492
|
+
);
|
|
2493
|
+
--pvt-datatable-letter-spacing: var(
|
|
2494
|
+
--rlc-datatable-letter-spacing,
|
|
2495
|
+
var(--rls-label-letter-spacing)
|
|
2496
|
+
);
|
|
2497
|
+
--pvt-datatable-font-color: var(
|
|
2498
|
+
--rlc-datatable-font-color,
|
|
2499
|
+
var(--rls-app-color-900)
|
|
2500
|
+
);
|
|
2501
|
+
--pvt-datatable-header-background: var(
|
|
2502
|
+
--rlc-datatable-header-background,
|
|
2503
|
+
var(--rls-app-color-100)
|
|
2504
|
+
);
|
|
2505
|
+
--pvt-datatable-record-background: var(
|
|
2506
|
+
--rlc-datatable-record-background,
|
|
2507
|
+
transparent
|
|
2508
|
+
);
|
|
2509
|
+
--pvt-datatable-padding-component: 0rem;
|
|
2510
|
+
--pvt-datatable-padding-scroll: var(--rlc-datatable-padding-scroll, 0rem);
|
|
2511
|
+
--pvt-datatable-header-padding-right: var(--pvt-datatable-padding-scroll);
|
|
2512
|
+
--pvt-datatable-floating-background: var(--rls-app-color-100);
|
|
2513
|
+
--rlc-amount-font-size: var(--pvt-datatable-font-size);
|
|
2514
|
+
--rlc-amount-width: 100%;
|
|
2515
|
+
--rlc-badge-padding: 0.5rem 1.5rem;
|
|
2516
|
+
--rlc-ballot-padding: 0rem;
|
|
2517
|
+
--rlc-ballot-component-row-gap: var(--rls-sizing-x1);
|
|
2518
|
+
--rlc-ballot-title-letter-spacing: var(--rls-smalltext-letter-spacing);
|
|
2519
|
+
--rlc-ballot-title-font-size: var(--rls-smalltext-font-size);
|
|
2520
|
+
--rlc-ballot-title-height: var(--rls-smalltext-line-height);
|
|
2521
|
+
--rlc-ballot-subtitle-letter-spacing: var(--rls-overline-letter-spacing);
|
|
2522
|
+
--rlc-ballot-subtitle-font-size: var(--rls-overline-font-size);
|
|
2523
|
+
--rlc-ballot-subtitle-height: var(--rls-overline-line-height);
|
|
2524
|
+
--rlc-field-box-body-background: transparent;
|
|
2525
|
+
--rlc-field-box-padding: 0rem;
|
|
2526
|
+
--rlc-field-box-width: 100%;
|
|
2527
|
+
--rlc-field-box-error-display: none;
|
|
2528
|
+
--rlc-field-box-label-display: none;
|
|
2529
|
+
--rlc-input-font-size: var(--pvt-datatable-font-size);
|
|
2530
|
+
--rlc-input-letter-spacing: var(--pvt-datatable-letter-spacing);
|
|
2531
|
+
--rlc-skeleton-text-column-gap: var(--rls-sizing-x2);
|
|
2532
|
+
position: relative;
|
|
2533
|
+
display: flex;
|
|
2534
|
+
width: 100%;
|
|
2535
|
+
height: var(--rlc-datatable-height, auto);
|
|
2536
|
+
flex-direction: column;
|
|
2537
|
+
row-gap: var(--rls-sizing-x6);
|
|
2538
|
+
border-radius: var(--rls-sizing-x4);
|
|
2539
|
+
box-sizing: border-box;
|
|
2540
|
+
}
|
|
2541
|
+
.rls-datatable--scrolleable {
|
|
2542
|
+
--pvt-datatable-padding-scroll: var(--rls-sizing-x4);
|
|
2543
|
+
--pvt-datatable-header-padding-right: calc(
|
|
2544
|
+
var(--pvt-datatable-padding-scroll) +
|
|
2545
|
+
var(--rlc-datatable-width-scroll, var(--rls-sizing-x4))
|
|
2546
|
+
);
|
|
2547
|
+
--pvt-datatable-padding-component: 0rem
|
|
2548
|
+
calc(var(--pvt-datatable-padding-scroll) + 5rem) 0rem 0rem;
|
|
2549
|
+
}
|
|
2550
|
+
.rls-datatable__toolbar {
|
|
2551
|
+
display: flex;
|
|
2552
|
+
flex: 0 0 auto;
|
|
2553
|
+
column-gap: var(--rls-sizing-x6);
|
|
2554
|
+
padding: var(--pvt-datatable-padding-component);
|
|
2555
|
+
box-sizing: border-box;
|
|
2556
|
+
background: var(--pvt-datatable-header-background);
|
|
2557
|
+
border-radius: var(--rls-sizing-x4);
|
|
2558
|
+
}
|
|
2559
|
+
.rls-datatable__table {
|
|
2560
|
+
display: flex;
|
|
2561
|
+
flex: 1 1 auto;
|
|
2562
|
+
overflow: hidden;
|
|
2563
|
+
}
|
|
2564
|
+
.rls-datatable__table > table {
|
|
2565
|
+
display: flex;
|
|
2566
|
+
width: 100%;
|
|
2567
|
+
flex-direction: column;
|
|
2568
|
+
row-gap: var(--rls-sizing-x4);
|
|
2569
|
+
border-spacing: 0;
|
|
2570
|
+
border-collapse: collapse;
|
|
2571
|
+
}
|
|
2572
|
+
.rls-datatable__head {
|
|
2573
|
+
flex: 0 0 auto;
|
|
2574
|
+
width: 100%;
|
|
2575
|
+
padding-right: var(--pvt-datatable-header-padding-right);
|
|
2576
|
+
box-sizing: border-box;
|
|
2577
|
+
}
|
|
2578
|
+
.rls-datatable__header {
|
|
2579
|
+
display: flex;
|
|
2580
|
+
column-gap: var(--rls-sizing-x6);
|
|
2581
|
+
padding: 0rem var(--rls-sizing-x6);
|
|
2582
|
+
box-sizing: border-box;
|
|
2583
|
+
background: var(--pvt-datatable-header-background);
|
|
2584
|
+
border: var(--rls-app-border-1-200);
|
|
2585
|
+
border-radius: var(--rls-sizing-x4);
|
|
2586
|
+
}
|
|
2587
|
+
.rls-datatable__header .rls-poster {
|
|
2588
|
+
width: calc(100% - var(--rls-sizing-x2));
|
|
2589
|
+
margin: auto 0rem;
|
|
2590
|
+
overflow: hidden;
|
|
2591
|
+
text-overflow: ellipsis;
|
|
2592
|
+
white-space: nowrap;
|
|
2593
|
+
}
|
|
2594
|
+
.rls-datatable__title {
|
|
2595
|
+
position: relative;
|
|
2596
|
+
display: flex;
|
|
2597
|
+
flex: 0 0 auto;
|
|
2598
|
+
height: var(--rls-sizing-x20);
|
|
2599
|
+
line-height: var(--rls-sizing-x20);
|
|
2600
|
+
color: var(--rls-app-color-700);
|
|
2601
|
+
font-weight: var(
|
|
2602
|
+
--rlc-datatable-header-font-weight,
|
|
2603
|
+
var(--rls-font-weight-semibold)
|
|
2604
|
+
);
|
|
2605
|
+
font-size: var(--pvt-datatable-font-size);
|
|
2606
|
+
letter-spacing: var(--pvt-datatable-letter-spacing);
|
|
2607
|
+
text-align: left;
|
|
2608
|
+
overflow: hidden;
|
|
2609
|
+
white-space: nowrap;
|
|
2610
|
+
}
|
|
2611
|
+
.rls-datatable__title--control {
|
|
2612
|
+
--rlc-action-ripple-dimension: var(--rls-sizing-x16);
|
|
2613
|
+
--rlc-action-ripple-position: -8rem;
|
|
2614
|
+
--rlc-avatar-radius: var(--rls-sizing-x3);
|
|
2615
|
+
--rlc-avatar-width: var(--rls-sizing-x16);
|
|
2616
|
+
--rlc-avatar-height: var(--rls-sizing-x16);
|
|
2617
|
+
--rlc-avatar-font-size: var(--pvt-datatable-font-size);
|
|
2618
|
+
--rlc-image-width: var(--rls-sizing-x12);
|
|
2619
|
+
--rlc-image-height: var(--rls-sizing-x12);
|
|
2620
|
+
--rlc-switch-max-width: var(--rls-sizing-x16);
|
|
2621
|
+
--rlc-switch-component-height: var(--rls-sizing-x8);
|
|
2622
|
+
--rlc-switch-element-width: var(--rls-sizing-x6);
|
|
2623
|
+
--rlc-switch-element-height: var(--rls-sizing-x4);
|
|
2624
|
+
--rlc-switch-element-radius: var(--rls-sizing-x4);
|
|
2625
|
+
display: flex;
|
|
2626
|
+
justify-content: center;
|
|
2627
|
+
align-items: center;
|
|
2628
|
+
width: var(--rls-sizing-x24);
|
|
2629
|
+
padding: 0rem;
|
|
2630
|
+
}
|
|
2631
|
+
.rls-datatable__title--control > img {
|
|
2632
|
+
width: var(--rls-sizing-x12);
|
|
2633
|
+
}
|
|
2634
|
+
.rls-datatable__title > span {
|
|
2635
|
+
display: block;
|
|
2636
|
+
width: 100%;
|
|
2637
|
+
text-overflow: ellipsis;
|
|
2638
|
+
overflow: hidden;
|
|
2639
|
+
}
|
|
2640
|
+
.rls-datatable__body {
|
|
2641
|
+
display: flex;
|
|
2642
|
+
flex: 1 1 auto;
|
|
2643
|
+
flex-direction: column;
|
|
2644
|
+
row-gap: var(--rls-sizing-x6);
|
|
2645
|
+
padding-right: var(--pvt-datatable-padding-scroll);
|
|
2646
|
+
box-sizing: border-box;
|
|
2647
|
+
overflow-y: auto;
|
|
2648
|
+
}
|
|
2649
|
+
.rls-datatable__subheader,
|
|
2650
|
+
.rls-datatable__record,
|
|
2651
|
+
.rls-datatable__totals {
|
|
2652
|
+
position: relative;
|
|
2653
|
+
display: flex;
|
|
2654
|
+
column-gap: var(--rls-sizing-x6);
|
|
2655
|
+
padding: 0rem var(--rls-sizing-x6);
|
|
2656
|
+
box-sizing: border-box;
|
|
2657
|
+
background: var(--pvt-datatable-record-background);
|
|
2658
|
+
border: var(--rls-app-border-1-200);
|
|
2659
|
+
border-radius: var(--rls-sizing-x4);
|
|
2660
|
+
}
|
|
2661
|
+
.rls-datatable__subheader--success,
|
|
2662
|
+
.rls-datatable__record--success,
|
|
2663
|
+
.rls-datatable__totals--success {
|
|
2664
|
+
--pvt-datatable-floating-background: var(--rls-success-color-100);
|
|
2665
|
+
background: var(--rls-success-color-050);
|
|
2666
|
+
border: var(--rls-success-border-1-200);
|
|
2667
|
+
}
|
|
2668
|
+
.rls-datatable__subheader--info,
|
|
2669
|
+
.rls-datatable__record--info,
|
|
2670
|
+
.rls-datatable__totals--info {
|
|
2671
|
+
--pvt-datatable-floating-background: var(--rls-info-color-100);
|
|
2672
|
+
background: var(--rls-info-color-050);
|
|
2673
|
+
border: var(--rls-info-border-1-200);
|
|
2674
|
+
}
|
|
2675
|
+
.rls-datatable__subheader--warning,
|
|
2676
|
+
.rls-datatable__record--warning,
|
|
2677
|
+
.rls-datatable__totals--warning {
|
|
2678
|
+
--pvt-datatable-floating-background: var(--rls-warning-color-100);
|
|
2679
|
+
background: var(--rls-warning-color-050);
|
|
2680
|
+
border: var(--rls-warning-border-1-200);
|
|
2681
|
+
}
|
|
2682
|
+
.rls-datatable__subheader--error,
|
|
2683
|
+
.rls-datatable__record--error,
|
|
2684
|
+
.rls-datatable__totals--error {
|
|
2685
|
+
--pvt-datatable-floating-background: var(--rls-danger-color-100);
|
|
2686
|
+
background: var(--rls-danger-color-050);
|
|
2687
|
+
border: var(--rls-danger-border-1-200);
|
|
2688
|
+
}
|
|
2689
|
+
.rls-datatable__subheader--contained,
|
|
2690
|
+
.rls-datatable__record--contained,
|
|
2691
|
+
.rls-datatable__totals--contained {
|
|
2692
|
+
overflow: hidden;
|
|
2693
|
+
}
|
|
2694
|
+
.rls-datatable__subheader {
|
|
2695
|
+
position: sticky;
|
|
2696
|
+
top: 0px;
|
|
2697
|
+
z-index: var(--rls-z-index-4);
|
|
2698
|
+
background: rgba(241, 238, 247, 0.8);
|
|
2699
|
+
backdrop-filter: blur(2px);
|
|
2700
|
+
}
|
|
2701
|
+
.rls-datatable__cell,
|
|
2702
|
+
.rls-datatable__data {
|
|
2703
|
+
--rlc-field-box-body-background: transparent;
|
|
2704
|
+
--rlc-field-box-body-background-focused: transparent;
|
|
2705
|
+
--rlc-field-box-body-background-disabled: transparent;
|
|
2706
|
+
--rlc-field-box-body-padding: 0rem;
|
|
2707
|
+
--rlc-field-box-body-border: none;
|
|
2708
|
+
--rlc-field-box-body-border-focused: none;
|
|
2709
|
+
--rlc-field-box-body-border-error: none;
|
|
2710
|
+
--rlc-field-box-body-border-disabled: none;
|
|
2711
|
+
--rlc-field-box-body-shadow: none;
|
|
2712
|
+
--rlc-field-box-body-shadow-error: none;
|
|
2713
|
+
--rlc-field-box-action-background: transparent;
|
|
2714
|
+
--rlc-field-list-control-font-size: var(--pvt-datatable-font-size);
|
|
2715
|
+
--rlc-field-list-control-font-weight: var(--rls-font-weight-medium);
|
|
2716
|
+
--rlc-field-list-control-letter-spacing: var(--rls-body-letter-spacing);
|
|
2717
|
+
--rlc-field-list-element-padding: var(--rls-sizing-x4);
|
|
2718
|
+
--rlc-field-list-suggestions-bottom: var(--rls-sizing-x24);
|
|
2719
|
+
--rlc-field-list-suggestions-top: var(--rls-sizing-x24);
|
|
2720
|
+
--rlc-poster-font-size: var(--pvt-datatable-font-size);
|
|
2721
|
+
--rlc-poster-width: calc(100% - var(--rls-sizing-x2));
|
|
2722
|
+
--rlc-poster-height: var(--rls-sizing-x8);
|
|
2723
|
+
--rlc-poster-padding: var(--rls-sizing-x2);
|
|
2724
|
+
position: relative;
|
|
2725
|
+
display: flex;
|
|
2726
|
+
align-items: center;
|
|
2727
|
+
cursor: default;
|
|
2728
|
+
text-align: left;
|
|
2729
|
+
min-height: var(--rls-sizing-x20);
|
|
2730
|
+
font-weight: var(--rls-font-weight-regular);
|
|
2731
|
+
color: var(--pvt-datatable-font-color);
|
|
2732
|
+
font-size: var(--pvt-datatable-font-size);
|
|
2733
|
+
letter-spacing: var(--pvt-datatable-letter-spacing);
|
|
2734
|
+
}
|
|
2735
|
+
.rls-datatable__cell--contained,
|
|
2736
|
+
.rls-datatable__data--contained {
|
|
2737
|
+
overflow: hidden;
|
|
2738
|
+
}
|
|
2739
|
+
.rls-datatable__cell--control,
|
|
2740
|
+
.rls-datatable__data--control {
|
|
2741
|
+
--rlc-action-ripple-dimension: var(--rls-sizing-x16);
|
|
2742
|
+
--rlc-action-ripple-position: -8rem;
|
|
2743
|
+
--rlc-avatar-radius: var(--rls-sizing-x3);
|
|
2744
|
+
--rlc-avatar-width: var(--rls-sizing-x16);
|
|
2745
|
+
--rlc-avatar-height: var(--rls-sizing-x16);
|
|
2746
|
+
--rlc-avatar-font-size: var(--pvt-datatable-font-size);
|
|
2747
|
+
--rlc-image-width: var(--rls-sizing-x12);
|
|
2748
|
+
--rlc-image-height: var(--rls-sizing-x12);
|
|
2749
|
+
--rlc-switch-max-width: var(--rls-sizing-x16);
|
|
2750
|
+
--rlc-switch-component-height: var(--rls-sizing-x8);
|
|
2751
|
+
--rlc-switch-element-width: var(--rls-sizing-x6);
|
|
2752
|
+
--rlc-switch-element-height: var(--rls-sizing-x4);
|
|
2753
|
+
--rlc-switch-element-radius: var(--rls-sizing-x4);
|
|
2754
|
+
display: flex;
|
|
2755
|
+
justify-content: center;
|
|
2756
|
+
align-items: center;
|
|
2757
|
+
width: var(--rls-sizing-x24);
|
|
2758
|
+
padding: 0rem;
|
|
2759
|
+
}
|
|
2760
|
+
.rls-datatable__cell--control > img,
|
|
2761
|
+
.rls-datatable__data--control > img {
|
|
2762
|
+
width: var(--rls-sizing-x12);
|
|
2763
|
+
}
|
|
2764
|
+
.rls-datatable__cell.rls-align-center,
|
|
2765
|
+
.rls-datatable__data.rls-align-center {
|
|
2766
|
+
justify-content: center;
|
|
2767
|
+
}
|
|
2768
|
+
.rls-datatable__cell > span,
|
|
2769
|
+
.rls-datatable__data > span {
|
|
2770
|
+
display: block;
|
|
2771
|
+
width: 100%;
|
|
2772
|
+
white-space: nowrap;
|
|
2773
|
+
text-overflow: ellipsis;
|
|
2774
|
+
overflow: hidden;
|
|
2775
|
+
}
|
|
2776
|
+
.rls-datatable__cell > p,
|
|
2777
|
+
.rls-datatable__data > p {
|
|
2778
|
+
padding: var(--rls-sizing-x2) 0rem;
|
|
2779
|
+
}
|
|
2780
|
+
.rls-datatable__cell .rls-field-list,
|
|
2781
|
+
.rls-datatable__data .rls-field-list {
|
|
2782
|
+
--rlc-field-box-body-padding: var(--rls-sizing-x4) 0rem;
|
|
2783
|
+
--rlc-field-box-action-dimension: var(--rls-sizing-x10);
|
|
2784
|
+
}
|
|
2785
|
+
.rls-datatable__cell .rls-poster,
|
|
2786
|
+
.rls-datatable__data .rls-poster {
|
|
2787
|
+
overflow: hidden;
|
|
2788
|
+
text-overflow: ellipsis;
|
|
2789
|
+
white-space: nowrap;
|
|
2790
|
+
}
|
|
2791
|
+
.rls-datatable__cell > a:hover,
|
|
2792
|
+
.rls-datatable__data > a:hover {
|
|
2793
|
+
color: var(--rls-app-color-700);
|
|
2794
|
+
text-decoration: underline;
|
|
2795
|
+
}
|
|
2796
|
+
.rls-datatable__floating {
|
|
2797
|
+
--pvt-action-tooltip-left: 0;
|
|
2798
|
+
--pvt-action-tooltip-right: initial;
|
|
2799
|
+
--pvt-action-tooltip-transform: translate(calc(-100% - var(--rls-sizing-x4)));
|
|
2800
|
+
position: absolute;
|
|
2801
|
+
display: flex;
|
|
2802
|
+
left: initial;
|
|
2803
|
+
right: 0;
|
|
2804
|
+
height: 100%;
|
|
2805
|
+
column-gap: 4rem;
|
|
2806
|
+
align-items: center;
|
|
2807
|
+
z-index: var(--rls-z-index-2);
|
|
2808
|
+
padding: 0rem var(--rls-sizing-x6);
|
|
2809
|
+
background: var(--pvt-datatable-floating-background);
|
|
2810
|
+
border-right: none;
|
|
2811
|
+
transform: translateX(calc(100% - var(--rls-sizing-x4)));
|
|
2812
|
+
transition: transform 240ms var(--rls-standard-curve);
|
|
2813
|
+
}
|
|
2814
|
+
.rls-datatable__floating:hover {
|
|
2815
|
+
transform: translateX(0);
|
|
2816
|
+
}
|
|
2817
|
+
.rls-datatable__floating--invested {
|
|
2818
|
+
--pvt-action-tooltip-left: initial;
|
|
2819
|
+
--pvt-action-tooltip-right: 0;
|
|
2820
|
+
--pvt-action-tooltip-transform: translate(calc(100% + var(--rls-sizing-x4)));
|
|
2821
|
+
right: initial;
|
|
2822
|
+
left: 0;
|
|
2823
|
+
transform: translateX(calc(-100% + var(--rls-sizing-x4)));
|
|
2824
|
+
}
|
|
2825
|
+
.rls-datatable__floating[rls-theme] {
|
|
2826
|
+
background: var(--rls-theme-color-050);
|
|
2827
|
+
}
|
|
2828
|
+
.rls-datatable__floating .rls-button-action__tooltip {
|
|
2829
|
+
top: 0;
|
|
2830
|
+
left: var(--pvt-action-tooltip-left);
|
|
2831
|
+
right: var(--pvt-action-tooltip-right);
|
|
2832
|
+
transform: var(--pvt-action-tooltip-transform);
|
|
2833
|
+
z-index: var(--rls-z-index-2);
|
|
2834
|
+
}
|
|
2835
|
+
.rls-datatable__summary {
|
|
2836
|
+
--pvt-datatable-record-background: var(--rls-app-color-100);
|
|
2837
|
+
flex: 0 0 auto;
|
|
2838
|
+
padding-right: var(--pvt-datatable-header-padding-right);
|
|
2839
|
+
box-sizing: border-box;
|
|
2840
|
+
}
|
|
2841
|
+
.rls-datatable__footer {
|
|
2842
|
+
--pvt-datatable-record-background: var(--rls-app-color-100);
|
|
2843
|
+
position: relative;
|
|
2844
|
+
flex: 0 0 auto;
|
|
2845
|
+
width: 100%;
|
|
2846
|
+
padding: var(--pvt-datatable-padding-component);
|
|
2847
|
+
box-sizing: border-box;
|
|
2848
|
+
overflow: hidden;
|
|
2849
|
+
} /*# sourceMappingURL=DataTable.css.map */
|
|
2850
|
+
|
|
2488
2851
|
.rls-field-autocomplete {
|
|
2489
2852
|
--pvt-control-width: 100%;
|
|
2490
2853
|
--pvt-control-opacity: 1;
|
package/dist/es/index.js
CHANGED
|
@@ -2594,13 +2594,37 @@ function useConfirmation() {
|
|
|
2594
2594
|
};
|
|
2595
2595
|
}
|
|
2596
2596
|
|
|
2597
|
-
function
|
|
2597
|
+
function createObserver(options) {
|
|
2598
|
+
const { setScrolleable, table } = options;
|
|
2599
|
+
const observer = new ResizeObserver(() => {
|
|
2600
|
+
const scrollHeight = table.scrollHeight || 0;
|
|
2601
|
+
const clientHeight = table.clientHeight || 0;
|
|
2602
|
+
setScrolleable(scrollHeight > clientHeight);
|
|
2603
|
+
});
|
|
2604
|
+
observer.observe(table);
|
|
2605
|
+
return observer;
|
|
2606
|
+
}
|
|
2607
|
+
function useDatatable(table) {
|
|
2608
|
+
const [scrolleable, setScrolleable] = useState(false);
|
|
2609
|
+
const refTable = useRef(table ? table : null);
|
|
2610
|
+
useEffect(() => {
|
|
2611
|
+
const observer = refTable.current &&
|
|
2612
|
+
createObserver({ setScrolleable, table: refTable.current });
|
|
2613
|
+
return () => {
|
|
2614
|
+
observer?.disconnect();
|
|
2615
|
+
};
|
|
2616
|
+
}, []);
|
|
2617
|
+
return { refTable, scrolleable };
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
function RlsDatatable({ children, footer, header, identifier, rlsTheme, summary, table, toolbar }) {
|
|
2621
|
+
const datatable = useDatatable(table);
|
|
2598
2622
|
const className = useMemo(() => {
|
|
2599
2623
|
return renderClassStatus('rls-datatable', {
|
|
2600
2624
|
scrolleable: datatable?.scrolleable
|
|
2601
2625
|
});
|
|
2602
2626
|
}, [datatable]);
|
|
2603
|
-
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [toolbar && jsxRuntimeExports.jsx("div", { className: "rls-datatable__toolbar", children: toolbar }), jsxRuntimeExports.jsxs("table", { id: identifier, children: [header && jsxRuntimeExports.jsx("thead", { className: "rls-datatable__head", children: header }), jsxRuntimeExports.jsx("tbody", { ref: datatable?.
|
|
2627
|
+
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [toolbar && jsxRuntimeExports.jsx("div", { className: "rls-datatable__toolbar", children: toolbar }), jsxRuntimeExports.jsx("div", { className: "rls-datatable__table", children: jsxRuntimeExports.jsxs("table", { id: identifier, children: [header && jsxRuntimeExports.jsx("thead", { className: "rls-datatable__head", children: header }), jsxRuntimeExports.jsx("tbody", { ref: datatable?.refTable, className: "rls-datatable__body", children: children })] }) }), summary && jsxRuntimeExports.jsx("div", { className: "rls-datatable__summary", children: summary }), footer && jsxRuntimeExports.jsx("div", { className: "rls-datatable__footer", children: footer })] }));
|
|
2604
2628
|
}
|
|
2605
2629
|
function RlsDatatableHeader({ children, identifier, rlsTheme }) {
|
|
2606
2630
|
return (jsxRuntimeExports.jsx("tr", { id: identifier, className: "rls-datatable__header", "rls-theme": rlsTheme, children: children }));
|
|
@@ -3924,28 +3948,5 @@ function RlsApplication({ children }) {
|
|
|
3924
3948
|
}, children: [jsxRuntimeExports.jsxs("div", { className: className, children: [children, RlsSnackbar] }), RlsConfirmation] }));
|
|
3925
3949
|
}
|
|
3926
3950
|
|
|
3927
|
-
function createObserver(options) {
|
|
3928
|
-
const { setScrolleable, table } = options;
|
|
3929
|
-
const observer = new ResizeObserver(() => {
|
|
3930
|
-
const scrollHeight = table.scrollHeight || 0;
|
|
3931
|
-
const clientHeight = table.clientHeight || 0;
|
|
3932
|
-
setScrolleable(scrollHeight > clientHeight);
|
|
3933
|
-
});
|
|
3934
|
-
observer.observe(table);
|
|
3935
|
-
return observer;
|
|
3936
|
-
}
|
|
3937
|
-
function useDatatable() {
|
|
3938
|
-
const [scrolleable, setScrolleable] = useState(false);
|
|
3939
|
-
const tableRef = useRef(null);
|
|
3940
|
-
useEffect(() => {
|
|
3941
|
-
const observer = tableRef?.current &&
|
|
3942
|
-
createObserver({ setScrolleable, table: tableRef?.current });
|
|
3943
|
-
return () => {
|
|
3944
|
-
observer?.disconnect();
|
|
3945
|
-
};
|
|
3946
|
-
}, []);
|
|
3947
|
-
return { scrolleable, tableRef };
|
|
3948
|
-
}
|
|
3949
|
-
|
|
3950
3951
|
export { ConfirmationResult, RlsAlert, RlsAmount, RlsApplication, RlsAvatar, RlsBadge, RlsBallot, RlsBottomSheet, RlsBreadcrumb, RlsButton, RlsButtonAction, RlsButtonOption, RlsButtonProgress, RlsButtonToggle, RlsCard, RlsCheckBox, RlsCheckBoxControl, RlsConfirmation, RlsContent, RlsContext, RlsDatatable, RlsDatatableCell, RlsDatatableData, RlsDatatableFloating, RlsDatatableHeader, RlsDatatableRecord, RlsDatatableSubheader, RlsDatatableTitle, RlsDatatableTotals, RlsFieldAutocomplete, RlsFieldAutocompleteTemplate, RlsFieldDate, RlsFieldDateRange, RlsFieldDecimal, RlsFieldMoney, RlsFieldNumber, RlsFieldPassword, RlsFieldPercentage, RlsFieldReadonly, RlsFieldSelect, RlsFieldSelectTemplate, RlsFieldText, RlsFormNavigation, RlsIcon, RlsImage, RlsImageChooser, RlsImageEditor, RlsInput, RlsInputDecimal, RlsInputMoney, RlsInputNumber, RlsInputPassword, RlsInputPercentage, RlsInputSearch, RlsInputText, RlsLabel, RlsLabelCheckBox, RlsLabelRadioButton, RlsLabelSwitch, RlsMessageFormError, RlsMessageIcon, RlsModal, RlsModalSheet, RlsNavbar, RlsPagination, RlsPickerDate, RlsPickerDateRange, RlsPickerDay, RlsPickerDayRange, RlsPickerMonth, RlsPickerSelectorTitle, RlsPickerYear, RlsPoster, RlsProgressBar, RlsProgressCircular, RlsRadioButton, RlsSkeleton, RlsSkeletonText, RlsSlider, RlsSnackbar, RlsSpinner, RlsSwitch, RlsSwitchControl, RlsTabs, RlsTabularText, RlsToolbar, calculateImgDimension, rangeFormatTemplate, renderClassStatus, setErrorsI18n, useConfirmation, useDatatable, useFieldAutocomplete, useFieldSelect, useFormNavigationController, useFormSingleSelectionController, useFormToggleController, useImageEditorController, useListController, useRelocationOnComponent, useResize, useSnackbar };
|
|
3951
3952
|
//# sourceMappingURL=index.js.map
|