@lolmath/ui 9.4.0 → 9.5.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/index.css CHANGED
@@ -2412,12 +2412,14 @@
2412
2412
  }
2413
2413
  }
2414
2414
  @layer lol {
2415
- ._resizableContainer_1iv6r_2 {
2415
+ ._resizableContainer_1ftu2_2 {
2416
2416
  overflow: auto;
2417
2417
  position: relative;
2418
2418
  }
2419
2419
 
2420
- ._table_1iv6r_7 {
2420
+ ._table_1ftu2_7 {
2421
+ --lol-table-indent: 1.125rem;
2422
+
2421
2423
  border-collapse: collapse;
2422
2424
  border-spacing: 0;
2423
2425
  width: 100%;
@@ -2433,9 +2435,38 @@
2433
2435
  outline: 1px solid var(--lol-color-gold-400);
2434
2436
  outline-offset: 0.25rem;
2435
2437
  }
2438
+
2439
+ /* The whole table is the drop target when a drag is dropped on it rather
2440
+ than between two of its rows. */
2441
+ &[data-drop-target] {
2442
+ outline: 1px solid var(--lol-color-gold-400);
2443
+ outline-offset: 0.25rem;
2444
+ }
2445
+ }
2446
+
2447
+ /* Inside a `Virtualizer` the table is a <div> whose rows are placed by the
2448
+ layout, and it scrolls them itself — which is what the virtualizer measures
2449
+ against, so it is the one table that needs a height of its own. */
2450
+ div._table_1ftu2_7 {
2451
+ overflow: auto;
2452
+ position: relative;
2453
+
2454
+ /* That also makes the header stick over the rows as they scroll past. The
2455
+ header cells tile the full width of the row, so frosting each one covers
2456
+ the strip; without it the rows read straight through the labels. The
2457
+ tint is the client's page black, which is what any surface the table
2458
+ sits on is a shade of. */
2459
+ & ._column_1ftu2_46 {
2460
+ background-color: color-mix(
2461
+ in srgb,
2462
+ var(--lol-color-hextech-black),
2463
+ transparent 4%
2464
+ );
2465
+ backdrop-filter: blur(12px);
2466
+ }
2436
2467
  }
2437
2468
 
2438
- ._row_1iv6r_25 {
2469
+ ._row_1ftu2_56 {
2439
2470
  color: var(--lol-color-grey-100);
2440
2471
  outline: none;
2441
2472
  transition: color 0.3s ease;
@@ -2488,13 +2519,28 @@
2488
2519
  cursor: default;
2489
2520
  }
2490
2521
 
2522
+ &[data-dragging] {
2523
+ opacity: 0.4;
2524
+ }
2525
+
2491
2526
  &[data-focus-visible] {
2492
2527
  outline: 1px solid var(--lol-color-gold-400);
2493
2528
  outline-offset: -1px;
2494
2529
  }
2530
+
2531
+ /* A row is only its own drop target when the table takes drops onto rows;
2532
+ reordering draws the `.dropIndicator` between them instead. */
2533
+ &[data-drop-target] {
2534
+ color: var(--lol-color-gold-100);
2535
+ --lol-table-row-highlight: linear-gradient(
2536
+ 90deg,
2537
+ rgb(from var(--lol-color-gold-400) r g b / 0.35),
2538
+ rgb(from var(--lol-color-gold-400) r g b / 0.1)
2539
+ );
2540
+ }
2495
2541
  }
2496
2542
 
2497
- ._cell_1iv6r_84 {
2543
+ ._cell_1ftu2_130 {
2498
2544
  /*
2499
2545
  * Collapsed borders are resolved between neighbours, and Chrome paints the
2500
2546
  * winning hairline once per edge when the losing side is styled `none`. The
@@ -2512,7 +2558,7 @@
2512
2558
  }
2513
2559
  }
2514
2560
 
2515
- ._resizer_1iv6r_102 {
2561
+ ._resizer_1ftu2_148 {
2516
2562
  position: absolute;
2517
2563
  inset-block: 0;
2518
2564
  inset-inline-end: 0;
@@ -2544,7 +2590,7 @@
2544
2590
  }
2545
2591
 
2546
2592
  /* Fixed footprint so toggling the sort direction never shifts the header. */
2547
- ._sortIndicator_1iv6r_134 {
2593
+ ._sortIndicator_1ftu2_180 {
2548
2594
  display: inline-block;
2549
2595
  vertical-align: middle;
2550
2596
  width: 0.5rem;
@@ -2568,7 +2614,7 @@
2568
2614
  }
2569
2615
  }
2570
2616
 
2571
- ._column_1iv6r_158 {
2617
+ ._column_1ftu2_46 {
2572
2618
  position: relative;
2573
2619
  font-family: var(--lol-font-family-beaufort);
2574
2620
  color: var(--lol-color-gold-100);
@@ -2604,15 +2650,15 @@
2604
2650
  color: var(--lol-color-gold-500);
2605
2651
  }
2606
2652
 
2607
- &[data-hovered] ._sortIndicator_1iv6r_134 {
2653
+ &[data-hovered] ._sortIndicator_1ftu2_180 {
2608
2654
  opacity: 0.5;
2609
2655
  }
2610
2656
 
2611
- &[data-sort-direction] ._sortIndicator_1iv6r_134 {
2657
+ &[data-sort-direction] ._sortIndicator_1ftu2_180 {
2612
2658
  opacity: 1;
2613
2659
  }
2614
2660
 
2615
- &[data-sort-direction="descending"] ._sortIndicator_1iv6r_134::after {
2661
+ &[data-sort-direction="descending"] ._sortIndicator_1ftu2_180::after {
2616
2662
  border-width: 0.375rem 0.25rem 0;
2617
2663
  border-top-color: currentColor;
2618
2664
  border-bottom-color: transparent;
@@ -2624,34 +2670,170 @@
2624
2670
  }
2625
2671
  }
2626
2672
 
2627
- ._footer_1iv6r_214 {
2673
+ /* The checkbox and the drag handle sit in columns of their own, added by
2674
+ `TableHeader` and `TableRow`. Both shrink to their content: a percentage
2675
+ width smaller than the content is the table layout's way of saying "as
2676
+ narrow as this can go". */
2677
+ ._selectionColumn_1ftu2_264,
2678
+ ._selectionCell_1ftu2_265,
2679
+ ._gripColumn_1ftu2_266,
2680
+ ._gripCell_1ftu2_267 {
2681
+ width: 1%;
2682
+ white-space: nowrap;
2683
+ }
2684
+
2685
+ ._selectionCell_1ftu2_265,
2686
+ ._gripCell_1ftu2_267 {
2687
+ padding-inline-end: 0;
2688
+ }
2689
+
2690
+ ._grip_1ftu2_266 {
2691
+ /* A <button> we never paint: without this it falls back to the UA's
2692
+ `buttonface` slab, which is grey under `color-scheme: dark`. */
2693
+ appearance: none;
2694
+ border: 0;
2695
+ margin: 0;
2696
+ padding: 0;
2697
+ font: inherit;
2698
+ color: inherit;
2699
+
2700
+ display: block;
2701
+ width: 0.625rem;
2702
+ height: 0.75rem;
2703
+ outline: none;
2704
+ /* Three hairlines, the client's drag affordance. */
2705
+ background: repeating-linear-gradient(
2706
+ to bottom,
2707
+ currentColor 0 1px,
2708
+ transparent 1px 0.25rem
2709
+ );
2710
+ }
2711
+
2712
+ /* React aria drags the row itself and leaves the handle inert, so the cursor
2713
+ has to come from the row. */
2714
+ ._table_1ftu2_7[data-allows-dragging] ._row_1ftu2_56 {
2715
+ cursor: grab;
2716
+ }
2717
+
2718
+ /* The indicator is a row of its own with a single full-width cell, so the
2719
+ line is drawn by a pseudo element that takes up no space of its own. */
2720
+ ._dropIndicator_1ftu2_119 {
2721
+ & > td,
2722
+ & > th {
2723
+ position: relative;
2724
+ }
2725
+
2726
+ &[data-drop-target] > td::after,
2727
+ &[data-drop-target] > th::after {
2728
+ content: "";
2729
+ position: absolute;
2730
+ inset-inline: 0;
2731
+ top: -1px;
2732
+ height: 2px;
2733
+ background-color: var(--lol-color-gold-400);
2734
+ }
2735
+ }
2736
+
2737
+ /* The expand chevron of a `treeColumn` cell, and the indent that puts a
2738
+ nested row under its parent. React aria sets `--table-row-level` on every
2739
+ row, starting at 1. */
2740
+ ._treeContent_1ftu2_327 {
2741
+ display: flex;
2742
+ align-items: center;
2743
+ gap: 0.375rem;
2744
+ padding-inline-start: calc(
2745
+ (var(--table-row-level, 1) - 1) *
2746
+ var(--lol-table-indent)
2747
+ );
2748
+ }
2749
+
2750
+ ._chevron_1ftu2_337 {
2751
+ appearance: none;
2752
+ border: 0;
2753
+ margin: 0;
2754
+ padding: 0;
2755
+ font: inherit;
2756
+ letter-spacing: inherit;
2757
+ color: inherit;
2758
+
2759
+ flex: none;
2760
+ width: 0.5rem;
2761
+ height: 0.75rem;
2762
+ outline: none;
2763
+ cursor: pointer;
2764
+
2765
+ --lol-table-chevron: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAoCAYAAADg+OpoAAABF0lEQVR42r3WMY7CQAxA0R8r2oobUMBB9hTLPegguQJUNHuJLbZb7RU4BvQIiZaKJiNFo0wy8dhYiiJNLD+N5RmlOv9sGYgtsAQajKJOICeg6p69BSQjCMAOOFpDMYIlJhOIGSbAqitSTeQWYQJcgQ3wzMhXY6F1f8CXJ9YfBlcsHm83TAbWXDBJrJtjMvLNFJOJAmaYZBQwwSRzaIoxmXEUijCZecDVmCiuLRVWKy/jgP0CHxmYakchHpm7ArhpoU/gH1hk5DbAUd6BaFqnQuZCamQOVITkQsVIDmSCTEFmyBhkiqQgc2QIckFiyA3pQ65IgNbeSIAuwLcn0m9dCxy8kHgYUlgxMjTeMWaCpP4Z2u59t0IAXn+VXtMKZ5riAAAAAElFTkSuQmCC");
2766
+ background: var(--lol-table-chevron) no-repeat center / contain;
2767
+ transition: rotate 0.15s ease;
2768
+
2769
+ @media (prefers-reduced-motion: reduce) {
2770
+ transition: none;
2771
+ }
2772
+
2773
+ &[data-focus-visible] {
2774
+ outline: 1px solid var(--lol-color-gold-400);
2775
+ outline-offset: 0.125rem;
2776
+ }
2777
+ }
2778
+
2779
+ ._chevronSpacer_1ftu2_366 {
2780
+ flex: none;
2781
+ width: 0.5rem;
2782
+ }
2783
+
2784
+ ._row_1ftu2_56[data-expanded] ._chevron_1ftu2_337 {
2785
+ rotate: 90deg;
2786
+ }
2787
+
2788
+ ._row_1ftu2_56[data-hovered] ._chevron_1ftu2_337,
2789
+ ._chevron_1ftu2_337[data-hovered],
2790
+ ._chevron_1ftu2_337[data-focus-visible] {
2791
+ --lol-table-chevron: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAoCAYAAADg+OpoAAABGElEQVR42r3WO47CMBCA4T+jaCtuQLEcZE+x3IOOxxVIRcM1tlvtPTgBNFQIQUu1TSxFVpw44xlGiiI5o/nk0dhK9bie6IkVMAe2GEWdQA5A1T4bC0gGEIA10FhDMYIlJiOIGSbAZ1ukGsktwgS4AEvglZGvxkLrfoFvT6w7DK5YPN5umPSsuWCSWDfHZOCbKSYjBcwwyShggknm0BRjMuEoFGEy8YCrMVFcWyqsVl7GAfsBPjIw1Y5CPDN3BXDTQl/AHzDLyN0CjbwD0bROhUyF1MgUqAjJhYqRHMgEGYPMkCHIFElB5kgf5ILEkBvShVyRAC28kQCdgaMn0m3dDth7IfEwpLBipG+8Y8wESf0z7Nr33QoB+AdPzF+bRdCP8QAAAABJRU5ErkJggg==");
2792
+ }
2793
+
2794
+ ._row_1ftu2_56[data-disabled] ._chevron_1ftu2_337 {
2795
+ cursor: default;
2796
+ filter: grayscale(100%);
2797
+ }
2798
+
2799
+ ._loadMore_1ftu2_386 > td,
2800
+ ._loadMore_1ftu2_386 > th {
2801
+ padding: 0.5rem;
2802
+ }
2803
+
2804
+ ._spinner_1ftu2_391 {
2805
+ width: 1.5rem;
2806
+ margin-inline: auto;
2807
+ }
2808
+
2809
+ ._footer_1ftu2_396 {
2628
2810
  color: var(--lol-color-gold-300);
2629
2811
 
2630
- & ._cell_1iv6r_84 {
2812
+ & ._cell_1ftu2_130 {
2631
2813
  border-top: 1px solid rgb(from var(--lol-color-grey-100) r g b / 0.25);
2632
2814
  }
2633
2815
  }
2634
2816
 
2635
- ._empty_1iv6r_222 {
2817
+ ._empty_1ftu2_404 {
2636
2818
  padding: 1rem 0.75rem;
2637
2819
  text-align: center;
2638
2820
  }
2639
2821
 
2640
2822
  /* React aria renders the empty state in a row it builds itself, so that cell
2641
2823
  never gets `.cell` and keeps the UA's 1px padding. */
2642
- ._table_1iv6r_7 [data-empty] > tr > td {
2824
+ ._table_1ftu2_7 [data-empty] > tr > td {
2643
2825
  padding: 0;
2644
2826
  }
2645
2827
 
2646
- ._start_1iv6r_233 {
2828
+ ._start_1ftu2_415 {
2647
2829
  text-align: start;
2648
2830
  }
2649
2831
 
2650
- ._center_1iv6r_237 {
2832
+ ._center_1ftu2_419 {
2651
2833
  text-align: center;
2652
2834
  }
2653
2835
 
2654
- ._end_1iv6r_241 {
2836
+ ._end_1ftu2_423 {
2655
2837
  text-align: end;
2656
2838
  }
2657
2839
  }
@@ -3119,3 +3301,90 @@
3119
3301
  width: 1.5rem;
3120
3302
  }
3121
3303
  }
3304
+ @layer lol {
3305
+ ._table_v9mcp_2 {
3306
+ border-collapse: collapse;
3307
+ border-spacing: 0;
3308
+ width: 100%;
3309
+
3310
+ font-family: var(--lol-font-family-spiegel);
3311
+ font-size: var(--lol-font-size-sm);
3312
+ line-height: var(--lol-line-height-sm);
3313
+ letter-spacing: var(--lol-letter-spacing-sm);
3314
+ font-weight: var(--lol-font-weight-sm);
3315
+ color: var(--lol-color-grey-100);
3316
+ }
3317
+
3318
+ /*
3319
+ * Both headings are set the same way — the client's heading face, in gold
3320
+ * over the grey of the data. What tells them apart is only which edge of the
3321
+ * table they run along.
3322
+ *
3323
+ * The zero-width `solid` on the edges each one leaves alone is the guard the
3324
+ * table's own cells carry: collapsed borders are resolved between
3325
+ * neighbours, and Chrome paints the winning hairline once per edge when the
3326
+ * losing side is styled `none`, so a 25%-opacity line blends twice and comes
3327
+ * out twice as bright.
3328
+ */
3329
+ ._fieldHeader_v9mcp_26,
3330
+ ._recordHeader_v9mcp_27,
3331
+ ._corner_v9mcp_28 {
3332
+ border: 0 solid;
3333
+ }
3334
+
3335
+ ._fieldHeader_v9mcp_26,
3336
+ ._recordHeader_v9mcp_27 {
3337
+ font-family: var(--lol-font-family-beaufort);
3338
+ color: var(--lol-color-gold-100);
3339
+ font-size: 0.75rem;
3340
+ font-weight: 700;
3341
+ letter-spacing: 0.075em;
3342
+ line-height: 1rem;
3343
+ text-transform: uppercase;
3344
+ white-space: nowrap;
3345
+ padding: 0.375rem 0.75rem;
3346
+ }
3347
+
3348
+ /* The field names head their rows, so the hairline that separates the
3349
+ heading from the data runs down the table rather than across it. */
3350
+ ._fieldHeader_v9mcp_26 {
3351
+ text-align: start;
3352
+ border-inline-end: 1px solid
3353
+ rgb(from var(--lol-color-grey-100) r g b / 0.25);
3354
+ /* Shrink to the names: a percentage under the content width is the table
3355
+ layout's way of saying "as narrow as this can go". */
3356
+ width: 1%;
3357
+ }
3358
+
3359
+ ._recordHeader_v9mcp_27 {
3360
+ border-bottom: 1px solid rgb(from var(--lol-color-grey-100) r g b / 0.25);
3361
+ }
3362
+
3363
+ /* The blank corner over the field names carries both hairlines, so the one
3364
+ under the record names and the one beside the field names meet instead of
3365
+ stopping short of each other. */
3366
+ ._corner_v9mcp_28 {
3367
+ padding: 0;
3368
+ border-bottom: 1px solid rgb(from var(--lol-color-grey-100) r g b / 0.25);
3369
+ border-inline-end: 1px solid
3370
+ rgb(from var(--lol-color-grey-100) r g b / 0.25);
3371
+ }
3372
+
3373
+ ._cell_v9mcp_70 {
3374
+ border: 0 solid;
3375
+ padding: 0.375rem 0.75rem;
3376
+ vertical-align: middle;
3377
+ }
3378
+
3379
+ ._start_v9mcp_76 {
3380
+ text-align: start;
3381
+ }
3382
+
3383
+ ._center_v9mcp_80 {
3384
+ text-align: center;
3385
+ }
3386
+
3387
+ ._end_v9mcp_84 {
3388
+ text-align: end;
3389
+ }
3390
+ }
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Autocomplete, AutocompleteContext, AutocompleteStateContext, BreadcrumbProps, BreadcrumbsProps, ButtonProps, CalendarCellProps, CalendarGridHeaderProps, CalendarGridProps, CalendarHeaderCellProps, CalendarProps as CalendarProps$1, CellProps, CheckboxButtonProps, CheckboxFieldProps, Collection, ColumnProps, ColumnResizerProps, DateFieldProps, DateInput as DateInput$1, DateInputProps, DatePickerProps, DateRangePickerProps, DateSegmentProps, DateValue, DateValue as DateValue$1, Dialog, DialogProps, DialogTrigger, DisclosurePanelProps, DisclosureProps, FieldError, Focusable, GridLayout, Group as Group$1, GroupProps as GroupProps$1, Header, HeadingProps, Input, InputProps, Key, Key as Key$1, LabelProps, LinkProps, ListBoxItem, ListBoxItemProps, ListBoxProps, ListLayout, MenuItemProps, MenuItemProps as MenuItemProps$1, MenuProps, MenuProps as MenuProps$1, MenuSectionProps, MenuTrigger as MenuTrigger$1, ModalOverlayProps, NumberFieldProps, Popover as UnstyledPopover, PopoverProps, Pressable, PreviewTrigger, PreviewTriggerProps, ProgressBarProps, RadioButtonProps, RadioFieldProps, RadioGroupProps, RangeCalendarProps as RangeCalendarProps$1, ResizableTableContainer, RouterProvider, RowProps, SearchFieldProps, Select, SelectProps, SelectValue, Selection, SeparatorProps, Size, SliderFillRenderProps, SliderOutputProps, SliderProps, SliderThumbProps, SliderTrackProps, SliderTrackRenderProps, SortDescriptor, SortDirection, SwitchButtonProps, SwitchFieldProps, TabListProps, TabPanelProps, TabProps, TableBodyProps as TableBodyProps$1, TableFooterProps as TableFooterProps$1, TableHeader, TableLayout, TableProps as TableProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TagProps as TagProps$1, TextAreaProps, TextFieldProps, TextProps, TimeFieldProps, TimeValue, TimeValue as TimeValue$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, ToggleButtonProps, TokenFieldProps, TokenFieldValue, TokenFieldValue as TokenFieldValue$1, TokenInputProps as TokenInputProps$1, TokenProps as TokenProps$1, ToolbarProps as ToolbarProps$1, TreeItemContentProps as TreeItemContentProps$1, TreeItemProps as TreeItemProps$1, TreeLoadMoreItemProps as TreeLoadMoreItemProps$1, TreeProps as TreeProps$1, Virtualizer, VirtualizerProps, WaterfallLayout, useFilter } from "react-aria-components";
2
- import React$1, { ComponentProps, JSX, Ref } from "react";
1
+ import { AsyncListData, AsyncListOptions, Autocomplete, AutocompleteContext, AutocompleteStateContext, BreadcrumbProps, BreadcrumbsProps, ButtonProps, CalendarCellProps, CalendarGridHeaderProps, CalendarGridProps, CalendarHeaderCellProps, CalendarProps as CalendarProps$1, CellProps, CheckboxButtonProps, CheckboxFieldProps, Collection, ColumnProps, ColumnResizerProps, DateFieldProps, DateInput as DateInput$1, DateInputProps, DatePickerProps, DateRangePickerProps, DateSegmentProps, DateValue, DateValue as DateValue$1, Dialog, DialogProps, DialogTrigger, DisclosurePanelProps, DisclosureProps, DragAndDropHooks, DragAndDropHooks as DragAndDropHooks$1, DragAndDropOptions, DragAndDropOptions as DragAndDropOptions$1, DropIndicatorProps, DropItem, DropTarget, FieldError, Focusable, GridLayout, Group as Group$1, GroupProps as GroupProps$1, Header, HeadingProps, Input, InputProps, Key, Key as Key$1, LabelProps, LinkProps, ListBoxItem, ListBoxItemProps, ListBoxProps, ListData, ListLayout, MenuItemProps, MenuItemProps as MenuItemProps$1, MenuProps, MenuProps as MenuProps$1, MenuSectionProps, MenuTrigger as MenuTrigger$1, ModalOverlayProps, NumberFieldProps, Popover as UnstyledPopover, PopoverProps, Pressable, PreviewTrigger, PreviewTriggerProps, ProgressBarProps, RadioButtonProps, RadioFieldProps, RadioGroupProps, RangeCalendarProps as RangeCalendarProps$1, ResizableTableContainerProps as ResizableTableContainerProps$1, RouterProvider, RowProps, SearchFieldProps, Select, SelectProps, SelectValue, Selection, SeparatorProps, Size, SliderFillRenderProps, SliderOutputProps, SliderProps, SliderThumbProps, SliderTrackProps, SliderTrackRenderProps, SortDescriptor, SortDirection, SwitchButtonProps, SwitchFieldProps, TabListProps, TabPanelProps, TabProps, TableBodyProps as TableBodyProps$1, TableFooterProps as TableFooterProps$1, TableHeaderProps as TableHeaderProps$1, TableLayout, TableLoadMoreItemProps as TableLoadMoreItemProps$1, TableProps as TableProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TagProps as TagProps$1, TextAreaProps, TextDropItem, TextFieldProps, TextProps, TimeFieldProps, TimeValue, TimeValue as TimeValue$1, ToggleButtonGroupProps as ToggleButtonGroupProps$1, ToggleButtonProps, TokenFieldProps, TokenFieldValue, TokenFieldValue as TokenFieldValue$1, TokenInputProps as TokenInputProps$1, TokenProps as TokenProps$1, ToolbarProps as ToolbarProps$1, TreeItemContentProps as TreeItemContentProps$1, TreeItemProps as TreeItemProps$1, TreeLoadMoreItemProps as TreeLoadMoreItemProps$1, TreeProps as TreeProps$1, Virtualizer, VirtualizerProps, WaterfallLayout, isTextDropItem, useAsyncList, useDragAndDrop, useFilter, useListData } from "react-aria-components";
2
+ import React$1, { ComponentProps, JSX, Key as Key$2, ReactNode, Ref, TableHTMLAttributes } from "react";
3
3
  import { ExternalToast, ToasterProps } from "sonner";
4
4
  //#region src/components/breadcrumbs/breadcrumbs.d.ts
5
5
  declare function Breadcrumbs<T extends object>({ className, ...props }: BreadcrumbsProps<T>): import("react").JSX.Element;
@@ -18,7 +18,7 @@ interface ButtonProps$1 extends ButtonProps {
18
18
  size?: ButtonSize;
19
19
  }
20
20
  declare const button: (props?: ({
21
- preset?: "primary" | "secondary" | "text" | "hextech" | "dimmed" | undefined;
21
+ preset?: "hextech" | "primary" | "secondary" | "text" | "dimmed" | undefined;
22
22
  shape?: "round" | "square" | "normal" | undefined;
23
23
  thin?: boolean | undefined;
24
24
  size?: "small" | "medium" | "large" | undefined;
@@ -397,7 +397,7 @@ declare function SwitchButton({ className, children, ...props }: SwitchButtonPro
397
397
  declare function SwitchField({ className, ...props }: SwitchFieldProps): import("react").JSX.Element;
398
398
  declare function Switch({ children, className, ...props }: Omit<SwitchFieldProps, "children" | "className"> & Pick<SwitchButtonProps, "children" | "className">): import("react").JSX.Element;
399
399
  //#endregion
400
- //#region src/components/table.d.ts
400
+ //#region src/components/table/table.d.ts
401
401
  /** Horizontal alignment shared by `TableColumn` and `TableCell`. */
402
402
  type TableAlign = "start" | "center" | "end";
403
403
  declare const table: (props?: ({
@@ -409,6 +409,21 @@ declare const table: (props?: ({
409
409
  }) | undefined) => string;
410
410
  interface TableProps extends TableProps$1 {}
411
411
  declare function Table({ className, ...props }: TableProps): import("react").JSX.Element;
412
+ interface ResizableTableContainerProps extends ResizableTableContainerProps$1 {}
413
+ /**
414
+ * The scroll container a `Table` needs for `allowsResizing` columns: it is the
415
+ * element the column widths are measured against.
416
+ */
417
+ declare function ResizableTableContainer({ className, ...props }: ResizableTableContainerProps): import("react").JSX.Element;
418
+ interface TableHeaderProps<T extends object> extends TableHeaderProps$1<T> {}
419
+ /**
420
+ * The header row of a `Table`.
421
+ *
422
+ * The select-all checkbox is added for tables with `selectionMode="multiple"`,
423
+ * and a blank column ahead of it for tables that allow dragging, so that the
424
+ * header keeps a column for every cell `TableRow` adds.
425
+ */
426
+ declare function TableHeader<T extends object>({ children, className, columns, dependencies, ...props }: TableHeaderProps<T>): import("react").JSX.Element;
412
427
  declare const tableColumn: (props?: ({
413
428
  align?: "start" | "center" | "end" | undefined;
414
429
  } & ({
@@ -437,7 +452,16 @@ declare const tableRow: (props?: ({
437
452
  className?: import("cva").ClassValue;
438
453
  }) | undefined) => string;
439
454
  interface TableRowProps<T extends object> extends RowProps<T> {}
440
- declare function TableRow<T extends object>({ className, ...props }: TableRowProps<T>): import("react").JSX.Element;
455
+ /**
456
+ * A row of a `Table`.
457
+ *
458
+ * A selection checkbox is added for tables with a `selectionMode`, and a drag
459
+ * handle for tables that allow dragging — both ahead of the row's own cells,
460
+ * matching the columns `TableHeader` adds. `selectionBehavior="replace"` drops
461
+ * the checkbox in favour of highlighting the row, like the ladder in the
462
+ * League client.
463
+ */
464
+ declare function TableRow<T extends object>({ children, className, columns, dependencies, ...props }: TableRowProps<T>): import("react").JSX.Element;
441
465
  declare const tableCell: (props?: ({
442
466
  align?: "start" | "center" | "end" | undefined;
443
467
  } & ({
@@ -450,9 +474,36 @@ declare const tableCell: (props?: ({
450
474
  interface TableCellProps extends CellProps {
451
475
  align?: TableAlign;
452
476
  }
453
- declare function TableCell({ align, className, ...props }: TableCellProps): import("react").JSX.Element;
477
+ /**
478
+ * A cell of a `TableRow`.
479
+ *
480
+ * The cell in the table's `treeColumn` grows an expand chevron for rows that
481
+ * have child rows, and is indented by the row's depth; the indent is read from
482
+ * the `--table-row-level` react aria sets on every row.
483
+ */
484
+ declare function TableCell({ align, children, className, ...props }: TableCellProps): import("react").JSX.Element;
454
485
  interface TableFooterProps<T extends object> extends TableFooterProps$1<T> {}
455
486
  declare function TableFooter<T extends object>({ className, ...props }: TableFooterProps<T>): import("react").JSX.Element;
487
+ interface TableLoadMoreItemProps extends TableLoadMoreItemProps$1 {}
488
+ /**
489
+ * A sentinel row at the end of a `TableBody`. It calls `onLoadMore` once it
490
+ * scrolls into view, and shows the spinner while `isLoading` is set.
491
+ */
492
+ declare function TableLoadMoreItem({ children, className, ...props }: TableLoadMoreItemProps): import("react").JSX.Element;
493
+ interface TableDropIndicatorProps extends DropIndicatorProps {}
494
+ /**
495
+ * The line drawn between two rows while a drop is hovered over the gap. It is
496
+ * rendered by `useTableDragAndDrop` — pass it to `useDragAndDrop`'s
497
+ * `renderDropIndicator` when using that hook directly.
498
+ */
499
+ declare function TableDropIndicator({ className, ...props }: TableDropIndicatorProps): import("react").JSX.Element;
500
+ /**
501
+ * `useDragAndDrop` with the table's own drop indicator, for the
502
+ * `dragAndDropHooks` prop of a `Table`.
503
+ */
504
+ declare function useTableDragAndDrop<T = object>(options: DragAndDropOptions$1<T>): {
505
+ dragAndDropHooks: DragAndDropHooks$1<T>;
506
+ };
456
507
  //#endregion
457
508
  //#region src/components/tabs.d.ts
458
509
  declare const Tabs: (props: import("react-aria-components").TabsProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
@@ -565,7 +616,7 @@ interface TokenInputProps<T extends TokenFieldValue$1 = TokenFieldValue$1> exten
565
616
  /** The editable area of a `TokenField`, rendering a `Token` per token segment. */
566
617
  declare function TokenInput<T extends TokenFieldValue$1 = TokenFieldValue$1>({ className, placeholder, size, ...props }: TokenInputProps<T>): import("react").JSX.Element;
567
618
  declare const token: (props?: ({
568
- variant?: "hextech" | "gold" | "grey" | undefined;
619
+ variant?: "gold" | "hextech" | "grey" | undefined;
569
620
  } & ({
570
621
  class?: import("cva").ClassValue;
571
622
  className?: never;
@@ -634,7 +685,7 @@ interface HeadingProps$1 extends React.DetailedHTMLProps<React.HTMLAttributes<HT
634
685
  as?: HeadingElement | "span";
635
686
  }
636
687
  declare const heading: (props?: ({
637
- color?: "grey100" | "gold100" | "gold200" | "gold400" | undefined;
688
+ color?: "gold100" | "gold200" | "gold400" | "grey100" | undefined;
638
689
  preset?: "h1" | "h2" | "h3" | "h4" | "h5" | undefined;
639
690
  } & ({
640
691
  class?: import("cva").ClassValue;
@@ -650,7 +701,7 @@ type TextColor = "grey100" | "grey150" | "gold100";
650
701
  type TextElement = "p" | "span" | "div";
651
702
  type TextPreset = "sm" | "base" | "md" | "lg" | "largeNumber" | "stat";
652
703
  declare const text: (props?: ({
653
- color?: "grey100" | "grey150" | "gold100" | undefined;
704
+ color?: "gold100" | "grey100" | "grey150" | undefined;
654
705
  preset?: "sm" | "base" | "md" | "lg" | "label" | "largeNumber" | "stat" | undefined;
655
706
  } & ({
656
707
  class?: import("cva").ClassValue;
@@ -670,5 +721,79 @@ interface LabelProps$1 extends LabelProps {
670
721
  }
671
722
  declare function Label({ preset, color, className, ...rest }: LabelProps$1): JSX.Element;
672
723
  //#endregion
673
- export { Autocomplete, AutocompleteContext, AutocompleteStateContext, Breadcrumb, Breadcrumbs, Button, ButtonLink, ButtonPreset, ButtonShape, ButtonSize, Calendar, CalendarCell, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarIcon, CalendarProps, Checkbox, CheckboxButton, CheckboxField, Collection, DateField, DateInput, DatePicker, DatePickerButton, DatePickerPopover, DateRangePicker, DateSegment, type DateValue, Dialog, DialogButtons, DialogHeading, DialogTrigger, Disclosure, DisclosureButton, DisclosureGroup, DisclosurePanel, Divider, FieldError, Focusable, GridLayout, Group, GroupInput, GroupProps, GroupSeparator, Heading, HeadingColor, HeadingElement, type Key, Label, ListBoxItem, ListLayout, Menu, MenuHeader, MenuItem, type MenuItemProps, MenuPopover, type MenuProps, MenuSection, MenuSeparator, MenuTrigger, MenuVirtualizer, Modal, MultipleSelect, MultipleSelectProps, NumberField, PickerDateInput, Popover, PopoverBody, Pressable, PreviewTrigger, type PreviewTriggerProps, ProgressBar, Radio, RadioButton, RadioField, RadioGroup, RangeCalendar, RangeCalendarProps, ResizableTableContainer, RouterProvider, SearchField, Select, SelectButton, SelectListBox, SelectListBoxItem, SelectPopover, SelectValue, SelectVirtualizer, type Selection, Size, Slider, SliderOutput, Sonner, SonnerProps, type SortDescriptor, type SortDirection, Spinner, SubmenuTrigger, Switch, SwitchButton, SwitchField, Tab, TabList, TabPanel, Table, TableAlign, TableBody, TableBodyProps, TableCell, TableCellProps, TableColumn, TableColumnProps, TableColumnResizer, TableColumnResizerProps, TableFooter, TableFooterProps, TableHeader, TableLayout, TableProps, TableRow, TableRowProps, Tabs, Tag, TagGroup, TagGroupProps, TagList, TagListProps, TagProps, Text, TextArea, TextColor, TextElement, TextField, TextPreset, TimeField, type TimeValue, ToastVariant, ToggleButton, ToggleButtonGroup, ToggleButtonGroupProps, ToggleButtonPreset, Token, TokenField, type TokenFieldValue, TokenInput, TokenInputProps, TokenProps, Toolbar, ToolbarProps, ToolbarSeparator, ToolbarSeparatorProps, Tree, TreeItem, TreeItemContent, TreeItemContentProps, TreeItemProps, TreeLoadMoreItem, TreeLoadMoreItemProps, TreeProps, UnstyledPopover, Virtualizer, WaterfallLayout, button, dateGroup, dateInput, group, heading, select, sonner, table, tableCell, tableColumn, tableRow, tagGroup, tagList, text, textField, token, tokenInput, tree, treeItem, useFilter };
724
+ //#region src/components/vertical-table/vertical-table.d.ts
725
+ /** Horizontal alignment of a `VerticalTable`'s value cells. */
726
+ type VerticalTableAlign = "start" | "center" | "end";
727
+ /** One field of a `VerticalTable`: a row, read across every record. */
728
+ interface VerticalTableField<T> {
729
+ /** The name of the field, which heads its row. */
730
+ name: ReactNode;
731
+ /** What this field is for one record, for every column of the row. */
732
+ value: (record: T, index: number) => ReactNode;
733
+ /** Overrides the table's `align` for this row. */
734
+ align?: VerticalTableAlign;
735
+ /** Distinguishes the row between renders. Defaults to the field's index. */
736
+ id?: Key$2;
737
+ }
738
+ declare const verticalTable: (props?: ({
739
+ class?: import("cva").ClassValue;
740
+ className?: never;
741
+ } | {
742
+ class?: never;
743
+ className?: import("cva").ClassValue;
744
+ }) | undefined) => string;
745
+ declare const verticalTableCell: (props?: ({
746
+ align?: "start" | "center" | "end" | undefined;
747
+ } & ({
748
+ class?: import("cva").ClassValue;
749
+ className?: never;
750
+ } | {
751
+ class?: never;
752
+ className?: import("cva").ClassValue;
753
+ })) | undefined) => string;
754
+ declare const verticalTableRecordHeader: (props?: ({
755
+ align?: "start" | "center" | "end" | undefined;
756
+ } & ({
757
+ class?: import("cva").ClassValue;
758
+ className?: never;
759
+ } | {
760
+ class?: never;
761
+ className?: import("cva").ClassValue;
762
+ })) | undefined) => string;
763
+ interface VerticalTableProps<T> extends Omit<TableHTMLAttributes<HTMLTableElement>, "align" | "children"> {
764
+ /** The records, one per column. */
765
+ records: readonly T[];
766
+ /** The fields, one per row. */
767
+ fields: readonly VerticalTableField<T>[];
768
+ /**
769
+ * The heading over a record's column. Leave it out and the table has no
770
+ * header row at all, which is the stat card of a single record: the field
771
+ * names head their own rows, so nothing is left unnamed by dropping it.
772
+ */
773
+ recordHeader?: (record: T, index: number) => ReactNode;
774
+ /** Distinguishes a column between renders. Defaults to the record's index. */
775
+ recordKey?: (record: T, index: number) => Key$2;
776
+ /** Where the values sit in their cells. Defaults to `"start"`. */
777
+ align?: VerticalTableAlign;
778
+ }
779
+ /**
780
+ * A table read down rather than across: a row per field, a column per record,
781
+ * and the field names heading the rows from the leading column.
782
+ *
783
+ * It is the table for comparing a handful of records field by field — two
784
+ * builds, the champions of a lane — and, with a single record and no
785
+ * `recordHeader`, for the stat card that is a table underneath.
786
+ *
787
+ * Where `Table` is React Aria's grid, with everything that comes with it, this
788
+ * is markup and no more: a `<table>` whose field names are real
789
+ * `<th scope="row">`s and whose record headings are real `<th scope="col">`s.
790
+ * Nothing here is selectable, sortable, resizable or focusable. React Aria's
791
+ * table cannot be transposed — its collection is row major, and the flip is in
792
+ * the data rather than in the structure — so rather than dress one up as the
793
+ * other, a table that only has to be read is only what a table needs to be
794
+ * read. Reach for `Table` the moment the rows have to be interacted with.
795
+ */
796
+ declare function VerticalTable<T>({ align, className, fields, recordHeader, recordKey, records, ...props }: VerticalTableProps<T>): import("react").JSX.Element;
797
+ //#endregion
798
+ export { type AsyncListData, type AsyncListOptions, Autocomplete, AutocompleteContext, AutocompleteStateContext, Breadcrumb, Breadcrumbs, Button, ButtonLink, ButtonPreset, ButtonShape, ButtonSize, Calendar, CalendarCell, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarIcon, CalendarProps, Checkbox, CheckboxButton, CheckboxField, Collection, DateField, DateInput, DatePicker, DatePickerButton, DatePickerPopover, DateRangePicker, DateSegment, type DateValue, Dialog, DialogButtons, DialogHeading, DialogTrigger, Disclosure, DisclosureButton, DisclosureGroup, DisclosurePanel, Divider, type DragAndDropHooks, type DragAndDropOptions, type DropItem, type DropTarget, FieldError, Focusable, GridLayout, Group, GroupInput, GroupProps, GroupSeparator, Heading, HeadingColor, HeadingElement, type Key, Label, ListBoxItem, type ListData, ListLayout, Menu, MenuHeader, MenuItem, type MenuItemProps, MenuPopover, type MenuProps, MenuSection, MenuSeparator, MenuTrigger, MenuVirtualizer, Modal, MultipleSelect, MultipleSelectProps, NumberField, PickerDateInput, Popover, PopoverBody, Pressable, PreviewTrigger, type PreviewTriggerProps, ProgressBar, Radio, RadioButton, RadioField, RadioGroup, RangeCalendar, RangeCalendarProps, ResizableTableContainer, ResizableTableContainerProps, RouterProvider, SearchField, Select, SelectButton, SelectListBox, SelectListBoxItem, SelectPopover, SelectValue, SelectVirtualizer, type Selection, Size, Slider, SliderOutput, Sonner, SonnerProps, type SortDescriptor, type SortDirection, Spinner, SubmenuTrigger, Switch, SwitchButton, SwitchField, Tab, TabList, TabPanel, Table, TableAlign, TableBody, TableBodyProps, TableCell, TableCellProps, TableColumn, TableColumnProps, TableColumnResizer, TableColumnResizerProps, TableDropIndicator, TableDropIndicatorProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableLayout, TableLoadMoreItem, TableLoadMoreItemProps, TableProps, TableRow, TableRowProps, Tabs, Tag, TagGroup, TagGroupProps, TagList, TagListProps, TagProps, Text, TextArea, TextColor, type TextDropItem, TextElement, TextField, TextPreset, TimeField, type TimeValue, ToastVariant, ToggleButton, ToggleButtonGroup, ToggleButtonGroupProps, ToggleButtonPreset, Token, TokenField, type TokenFieldValue, TokenInput, TokenInputProps, TokenProps, Toolbar, ToolbarProps, ToolbarSeparator, ToolbarSeparatorProps, Tree, TreeItem, TreeItemContent, TreeItemContentProps, TreeItemProps, TreeLoadMoreItem, TreeLoadMoreItemProps, TreeProps, UnstyledPopover, VerticalTable, VerticalTableAlign, VerticalTableField, VerticalTableProps, Virtualizer, WaterfallLayout, button, dateGroup, dateInput, group, heading, isTextDropItem, select, sonner, table, tableCell, tableColumn, tableRow, tagGroup, tagList, text, textField, token, tokenInput, tree, treeItem, useAsyncList, useDragAndDrop, useFilter, useListData, useTableDragAndDrop, verticalTable, verticalTableCell, verticalTableRecordHeader };
674
799
  //# sourceMappingURL=index.d.mts.map