@lolmath/ui 9.3.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 +412 -22
- package/dist/index.d.mts +185 -9
- package/dist/index.mjs +314 -32
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Autocomplete, Autocomplete as Autocomplete$1, AutocompleteContext, AutocompleteStateContext, Breadcrumb as Breadcrumb$1, Breadcrumbs as Breadcrumbs$1, Button as Button$1, Calendar as Calendar$1, CalendarCell as CalendarCell$1, CalendarGrid as CalendarGrid$1, CalendarGridBody, CalendarGridHeader as CalendarGridHeader$1, CalendarHeaderCell as CalendarHeaderCell$1, CalendarHeading, CalendarMonthPicker, CalendarYearPicker, Cell, CheckboxButton as CheckboxButton$1, CheckboxField as CheckboxField$1, Collection, Column, ColumnResizer, DateField as DateField$1, DateInput as DateInput$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, DateSegment as DateSegment$1, Dialog, Dialog as Dialog$1, DialogTrigger, Disclosure as Disclosure$1, DisclosureGroup as DisclosureGroup$1, DisclosurePanel as DisclosurePanel$1, FieldError, GridLayout, Group as Group$1, Header, Heading as Heading$1, Input, Label as Label$1, Link, ListBox, ListBoxItem, ListBoxItem as ListBoxItem$1, ListLayout, ListLayout as ListLayout$1, Menu as Menu$1, MenuItem as MenuItem$1, MenuSection as MenuSection$1, MenuTrigger as MenuTrigger$1, Modal as Modal$1, ModalOverlay, NumberField as NumberField$1, OverlayArrow, Popover as Popover$1, Popover as UnstyledPopover, ProgressBar as ProgressBar$1, RadioButton as RadioButton$1, RadioField as RadioField$1, RadioGroup as RadioGroup$1, RangeCalendar as RangeCalendar$1, ResizableTableContainer, RouterProvider, Row, SearchField as SearchField$1, Select, Select as Select$1, SelectValue, SelectValue as SelectValue$1, SelectionIndicator, Separator, Size, Slider as Slider$1, SliderFill, SliderOutput as SliderOutput$1, SliderThumb, SliderTrack, SubmenuTrigger as SubmenuTrigger$1, SwitchButton as SwitchButton$1, SwitchField as SwitchField$1, Tab as Tab$1, TabList as TabList$1, TabPanel as TabPanel$1, Table as Table$1, TableBody as TableBody$1, TableFooter as TableFooter$1, TableHeader, TableLayout, Tabs as Tabs$1, Tag as Tag$1, TagGroup as TagGroup$1, TagList as TagList$1, Text as Text$1, TextArea as TextArea$1, TextField as TextField$1, TimeField as TimeField$1, ToggleButton as ToggleButton$1, ToggleButtonGroup as ToggleButtonGroup$1, Toolbar as Toolbar$1, Tree as Tree$1, TreeItem as TreeItem$1, TreeItemContent as TreeItemContent$1, TreeLoadMoreItem as TreeLoadMoreItem$1, Virtualizer, Virtualizer as Virtualizer$1, WaterfallLayout, composeRenderProps, useFilter, useFilter as useFilter$1 } from "react-aria-components";
|
|
1
|
+
import { Autocomplete, Autocomplete as Autocomplete$1, AutocompleteContext, AutocompleteStateContext, Breadcrumb as Breadcrumb$1, Breadcrumbs as Breadcrumbs$1, Button as Button$1, Calendar as Calendar$1, CalendarCell as CalendarCell$1, CalendarGrid as CalendarGrid$1, CalendarGridBody, CalendarGridHeader as CalendarGridHeader$1, CalendarHeaderCell as CalendarHeaderCell$1, CalendarHeading, CalendarMonthPicker, CalendarYearPicker, Cell, CheckboxButton as CheckboxButton$1, CheckboxField as CheckboxField$1, Collection, Collection as Collection$1, Column, ColumnResizer, DateField as DateField$1, DateInput as DateInput$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, DateSegment as DateSegment$1, Dialog, Dialog as Dialog$1, DialogTrigger, Disclosure as Disclosure$1, DisclosureGroup as DisclosureGroup$1, DisclosurePanel as DisclosurePanel$1, DropIndicator, FieldError, Focusable, GridLayout, Group as Group$1, Header, Heading as Heading$1, Input, Label as Label$1, Link, ListBox, ListBoxItem, ListBoxItem as ListBoxItem$1, ListLayout, ListLayout as ListLayout$1, Menu as Menu$1, MenuItem as MenuItem$1, MenuSection as MenuSection$1, MenuTrigger as MenuTrigger$1, Modal as Modal$1, ModalOverlay, NumberField as NumberField$1, OverlayArrow, Popover as Popover$1, Popover as UnstyledPopover, Pressable, PreviewTrigger, ProgressBar as ProgressBar$1, RadioButton as RadioButton$1, RadioField as RadioField$1, RadioGroup as RadioGroup$1, RangeCalendar as RangeCalendar$1, ResizableTableContainer as ResizableTableContainer$1, RouterProvider, Row, SearchField as SearchField$1, Select, Select as Select$1, SelectValue, SelectValue as SelectValue$1, SelectionIndicator, Separator, Size, Slider as Slider$1, SliderFill, SliderOutput as SliderOutput$1, SliderThumb, SliderTrack, SubmenuTrigger as SubmenuTrigger$1, SwitchButton as SwitchButton$1, SwitchField as SwitchField$1, Tab as Tab$1, TabList as TabList$1, TabPanel as TabPanel$1, Table as Table$1, TableBody as TableBody$1, TableFooter as TableFooter$1, TableHeader as TableHeader$1, TableLayout, TableLoadMoreItem as TableLoadMoreItem$1, Tabs as Tabs$1, Tag as Tag$1, TagGroup as TagGroup$1, TagList as TagList$1, Text as Text$1, TextArea as TextArea$1, TextField as TextField$1, TimeField as TimeField$1, ToggleButton as ToggleButton$1, ToggleButtonGroup as ToggleButtonGroup$1, Token as Token$1, TokenField as TokenField$1, TokenFieldValue, TokenInput as TokenInput$1, Toolbar as Toolbar$1, Tree as Tree$1, TreeItem as TreeItem$1, TreeItemContent as TreeItemContent$1, TreeLoadMoreItem as TreeLoadMoreItem$1, Virtualizer, Virtualizer as Virtualizer$1, WaterfallLayout, composeRenderProps, isTextDropItem, useAsyncList, useDragAndDrop, useDragAndDrop as useDragAndDrop$1, useFilter, useFilter as useFilter$1, useListData, useTableOptions } from "react-aria-components";
|
|
2
2
|
import { cva, cx } from "cva";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import React, { createElement, useMemo } from "react";
|
|
4
|
+
import React, { createContext, createElement, useContext, useMemo } from "react";
|
|
5
5
|
import { Toaster, toast } from "sonner";
|
|
6
6
|
//#region src/components/breadcrumbs/breadcrumbs.module.css
|
|
7
7
|
var breadcrumbs_module_default = {
|
|
@@ -438,11 +438,11 @@ function RangeCalendar({ header = "heading", className, ...props }) {
|
|
|
438
438
|
//#endregion
|
|
439
439
|
//#region src/components/calendar/date-field.module.css
|
|
440
440
|
var date_field_module_default = {
|
|
441
|
-
"dateInput": "
|
|
442
|
-
"small": "
|
|
443
|
-
"medium": "
|
|
444
|
-
"large": "
|
|
445
|
-
"segment": "
|
|
441
|
+
"dateInput": "_dateInput_xrlax_2",
|
|
442
|
+
"small": "_small_xrlax_33",
|
|
443
|
+
"medium": "_medium_xrlax_37",
|
|
444
|
+
"large": "_large_xrlax_41",
|
|
445
|
+
"segment": "_segment_xrlax_46"
|
|
446
446
|
};
|
|
447
447
|
//#endregion
|
|
448
448
|
//#region src/components/calendar/date-field.tsx
|
|
@@ -1524,28 +1524,49 @@ function Switch({ children, className, ...props }) {
|
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
1526
|
//#endregion
|
|
1527
|
-
//#region src/components/table.module.css
|
|
1527
|
+
//#region src/components/table/table.module.css
|
|
1528
1528
|
var table_module_default = {
|
|
1529
|
-
"resizableContainer": "
|
|
1530
|
-
"table": "
|
|
1531
|
-
"
|
|
1532
|
-
"
|
|
1533
|
-
"
|
|
1534
|
-
"
|
|
1535
|
-
"
|
|
1536
|
-
"
|
|
1537
|
-
"
|
|
1538
|
-
"
|
|
1539
|
-
"
|
|
1540
|
-
"
|
|
1529
|
+
"resizableContainer": "_resizableContainer_1ftu2_2",
|
|
1530
|
+
"table": "_table_1ftu2_7",
|
|
1531
|
+
"column": "_column_1ftu2_46",
|
|
1532
|
+
"row": "_row_1ftu2_56",
|
|
1533
|
+
"cell": "_cell_1ftu2_130",
|
|
1534
|
+
"resizer": "_resizer_1ftu2_148",
|
|
1535
|
+
"sortIndicator": "_sortIndicator_1ftu2_180",
|
|
1536
|
+
"selectionColumn": "_selectionColumn_1ftu2_264",
|
|
1537
|
+
"selectionCell": "_selectionCell_1ftu2_265",
|
|
1538
|
+
"gripColumn": "_gripColumn_1ftu2_266",
|
|
1539
|
+
"gripCell": "_gripCell_1ftu2_267",
|
|
1540
|
+
"grip": "_grip_1ftu2_266",
|
|
1541
|
+
"dropIndicator": "_dropIndicator_1ftu2_119",
|
|
1542
|
+
"treeContent": "_treeContent_1ftu2_327",
|
|
1543
|
+
"chevron": "_chevron_1ftu2_337",
|
|
1544
|
+
"chevronSpacer": "_chevronSpacer_1ftu2_366",
|
|
1545
|
+
"loadMore": "_loadMore_1ftu2_386",
|
|
1546
|
+
"spinner": "_spinner_1ftu2_391",
|
|
1547
|
+
"footer": "_footer_1ftu2_396",
|
|
1548
|
+
"empty": "_empty_1ftu2_404",
|
|
1549
|
+
"start": "_start_1ftu2_415",
|
|
1550
|
+
"center": "_center_1ftu2_419",
|
|
1551
|
+
"end": "_end_1ftu2_423"
|
|
1541
1552
|
};
|
|
1542
1553
|
//#endregion
|
|
1543
|
-
//#region src/components/table.tsx
|
|
1544
|
-
const alignVariants = {
|
|
1554
|
+
//#region src/components/table/table.tsx
|
|
1555
|
+
const alignVariants$1 = {
|
|
1545
1556
|
start: table_module_default.start,
|
|
1546
1557
|
center: table_module_default.center,
|
|
1547
1558
|
end: table_module_default.end
|
|
1548
1559
|
};
|
|
1560
|
+
/**
|
|
1561
|
+
* A `TableRow` inside a `TableFooter` still has to line up with the columns
|
|
1562
|
+
* above it, but it owns no selection checkbox and nothing to drag: the footer
|
|
1563
|
+
* fills those columns with empty cells instead.
|
|
1564
|
+
*
|
|
1565
|
+
* The context is read while the collection is being built — the pass in which
|
|
1566
|
+
* every wrapper in this file runs — so it reaches the rows even though react
|
|
1567
|
+
* aria renders the footer's DOM from the collection afterwards.
|
|
1568
|
+
*/
|
|
1569
|
+
const TableFooterContext = createContext(false);
|
|
1549
1570
|
const table = cva({ base: table_module_default.table });
|
|
1550
1571
|
function Table({ className, ...props }) {
|
|
1551
1572
|
return /* @__PURE__ */ jsx(Table$1, {
|
|
@@ -1553,9 +1574,45 @@ function Table({ className, ...props }) {
|
|
|
1553
1574
|
className: composeRenderProps(className, (className) => table({ className }))
|
|
1554
1575
|
});
|
|
1555
1576
|
}
|
|
1577
|
+
/**
|
|
1578
|
+
* The scroll container a `Table` needs for `allowsResizing` columns: it is the
|
|
1579
|
+
* element the column widths are measured against.
|
|
1580
|
+
*/
|
|
1581
|
+
function ResizableTableContainer({ className, ...props }) {
|
|
1582
|
+
return /* @__PURE__ */ jsx(ResizableTableContainer$1, {
|
|
1583
|
+
...props,
|
|
1584
|
+
className: cx(table_module_default.resizableContainer, className)
|
|
1585
|
+
});
|
|
1586
|
+
}
|
|
1587
|
+
/**
|
|
1588
|
+
* The header row of a `Table`.
|
|
1589
|
+
*
|
|
1590
|
+
* The select-all checkbox is added for tables with `selectionMode="multiple"`,
|
|
1591
|
+
* and a blank column ahead of it for tables that allow dragging, so that the
|
|
1592
|
+
* header keeps a column for every cell `TableRow` adds.
|
|
1593
|
+
*/
|
|
1594
|
+
function TableHeader({ children, className, columns, dependencies, ...props }) {
|
|
1595
|
+
const { allowsDragging, selectionBehavior, selectionMode } = useTableOptions();
|
|
1596
|
+
return /* @__PURE__ */ jsxs(TableHeader$1, {
|
|
1597
|
+
...props,
|
|
1598
|
+
className,
|
|
1599
|
+
children: [
|
|
1600
|
+
allowsDragging && /* @__PURE__ */ jsx(Column, { className: tableColumn({ className: table_module_default.gripColumn }) }),
|
|
1601
|
+
selectionBehavior === "toggle" && /* @__PURE__ */ jsx(Column, {
|
|
1602
|
+
className: tableColumn({ className: table_module_default.selectionColumn }),
|
|
1603
|
+
children: selectionMode === "multiple" && /* @__PURE__ */ jsx(Checkbox, { slot: "selection" })
|
|
1604
|
+
}),
|
|
1605
|
+
/* @__PURE__ */ jsx(Collection$1, {
|
|
1606
|
+
dependencies,
|
|
1607
|
+
items: columns,
|
|
1608
|
+
children
|
|
1609
|
+
})
|
|
1610
|
+
]
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1556
1613
|
const tableColumn = cva({
|
|
1557
1614
|
base: table_module_default.column,
|
|
1558
|
-
variants: { align: alignVariants },
|
|
1615
|
+
variants: { align: alignVariants$1 },
|
|
1559
1616
|
defaultVariants: { align: "start" }
|
|
1560
1617
|
});
|
|
1561
1618
|
function TableColumn({ align = "start", children, className, ...props }) {
|
|
@@ -1591,30 +1648,112 @@ function TableBody({ emptyState = "No results found", renderEmptyState, ...props
|
|
|
1591
1648
|
});
|
|
1592
1649
|
}
|
|
1593
1650
|
const tableRow = cva({ base: table_module_default.row });
|
|
1594
|
-
|
|
1595
|
-
|
|
1651
|
+
/**
|
|
1652
|
+
* A row of a `Table`.
|
|
1653
|
+
*
|
|
1654
|
+
* A selection checkbox is added for tables with a `selectionMode`, and a drag
|
|
1655
|
+
* handle for tables that allow dragging — both ahead of the row's own cells,
|
|
1656
|
+
* matching the columns `TableHeader` adds. `selectionBehavior="replace"` drops
|
|
1657
|
+
* the checkbox in favour of highlighting the row, like the ladder in the
|
|
1658
|
+
* League client.
|
|
1659
|
+
*/
|
|
1660
|
+
function TableRow({ children, className, columns, dependencies, ...props }) {
|
|
1661
|
+
const { allowsDragging, selectionBehavior } = useTableOptions();
|
|
1662
|
+
const isFooterRow = useContext(TableFooterContext);
|
|
1663
|
+
return /* @__PURE__ */ jsxs(Row, {
|
|
1596
1664
|
...props,
|
|
1597
|
-
className: composeRenderProps(className, (className) => tableRow({ className }))
|
|
1665
|
+
className: composeRenderProps(className, (className) => tableRow({ className })),
|
|
1666
|
+
children: [
|
|
1667
|
+
allowsDragging && /* @__PURE__ */ jsx(TableCell, {
|
|
1668
|
+
className: table_module_default.gripCell,
|
|
1669
|
+
children: !isFooterRow && /* @__PURE__ */ jsx(Button$1, {
|
|
1670
|
+
className: table_module_default.grip,
|
|
1671
|
+
slot: "drag"
|
|
1672
|
+
})
|
|
1673
|
+
}),
|
|
1674
|
+
selectionBehavior === "toggle" && /* @__PURE__ */ jsx(TableCell, {
|
|
1675
|
+
className: table_module_default.selectionCell,
|
|
1676
|
+
children: !isFooterRow && /* @__PURE__ */ jsx(Checkbox, { slot: "selection" })
|
|
1677
|
+
}),
|
|
1678
|
+
/* @__PURE__ */ jsx(Collection$1, {
|
|
1679
|
+
dependencies: dependencies ? [props.value, ...dependencies] : [props.value],
|
|
1680
|
+
idScope: props.id,
|
|
1681
|
+
items: columns,
|
|
1682
|
+
children
|
|
1683
|
+
})
|
|
1684
|
+
]
|
|
1598
1685
|
});
|
|
1599
1686
|
}
|
|
1600
1687
|
const tableCell = cva({
|
|
1601
1688
|
base: table_module_default.cell,
|
|
1602
|
-
variants: { align: alignVariants },
|
|
1689
|
+
variants: { align: alignVariants$1 },
|
|
1603
1690
|
defaultVariants: { align: "start" }
|
|
1604
1691
|
});
|
|
1605
|
-
|
|
1692
|
+
/**
|
|
1693
|
+
* A cell of a `TableRow`.
|
|
1694
|
+
*
|
|
1695
|
+
* The cell in the table's `treeColumn` grows an expand chevron for rows that
|
|
1696
|
+
* have child rows, and is indented by the row's depth; the indent is read from
|
|
1697
|
+
* the `--table-row-level` react aria sets on every row.
|
|
1698
|
+
*/
|
|
1699
|
+
function TableCell({ align = "start", children, className, ...props }) {
|
|
1606
1700
|
return /* @__PURE__ */ jsx(Cell, {
|
|
1607
1701
|
...props,
|
|
1608
1702
|
className: composeRenderProps(className, (className) => tableCell({
|
|
1609
1703
|
align,
|
|
1610
1704
|
className
|
|
1611
|
-
}))
|
|
1705
|
+
})),
|
|
1706
|
+
children: composeRenderProps(children, (children, { hasChildItems, isTreeColumn }) => isTreeColumn ? /* @__PURE__ */ jsxs("span", {
|
|
1707
|
+
className: table_module_default.treeContent,
|
|
1708
|
+
children: [hasChildItems ? /* @__PURE__ */ jsx(Button$1, {
|
|
1709
|
+
className: table_module_default.chevron,
|
|
1710
|
+
slot: "chevron"
|
|
1711
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
1712
|
+
"aria-hidden": "true",
|
|
1713
|
+
className: table_module_default.chevronSpacer
|
|
1714
|
+
}), children]
|
|
1715
|
+
}) : children)
|
|
1612
1716
|
});
|
|
1613
1717
|
}
|
|
1614
1718
|
function TableFooter({ className, ...props }) {
|
|
1615
|
-
return /* @__PURE__ */ jsx(
|
|
1719
|
+
return /* @__PURE__ */ jsx(TableFooterContext, {
|
|
1720
|
+
value: true,
|
|
1721
|
+
children: /* @__PURE__ */ jsx(TableFooter$1, {
|
|
1722
|
+
...props,
|
|
1723
|
+
className: cx(table_module_default.footer, className)
|
|
1724
|
+
})
|
|
1725
|
+
});
|
|
1726
|
+
}
|
|
1727
|
+
/**
|
|
1728
|
+
* A sentinel row at the end of a `TableBody`. It calls `onLoadMore` once it
|
|
1729
|
+
* scrolls into view, and shows the spinner while `isLoading` is set.
|
|
1730
|
+
*/
|
|
1731
|
+
function TableLoadMoreItem({ children, className, ...props }) {
|
|
1732
|
+
return /* @__PURE__ */ jsx(TableLoadMoreItem$1, {
|
|
1616
1733
|
...props,
|
|
1617
|
-
className: cx(table_module_default.
|
|
1734
|
+
className: cx(table_module_default.loadMore, className),
|
|
1735
|
+
children: children ?? /* @__PURE__ */ jsx(Spinner, { className: table_module_default.spinner })
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
* The line drawn between two rows while a drop is hovered over the gap. It is
|
|
1740
|
+
* rendered by `useTableDragAndDrop` — pass it to `useDragAndDrop`'s
|
|
1741
|
+
* `renderDropIndicator` when using that hook directly.
|
|
1742
|
+
*/
|
|
1743
|
+
function TableDropIndicator({ className, ...props }) {
|
|
1744
|
+
return /* @__PURE__ */ jsx(DropIndicator, {
|
|
1745
|
+
...props,
|
|
1746
|
+
className: composeRenderProps(className, (className) => cx(table_module_default.dropIndicator, className))
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* `useDragAndDrop` with the table's own drop indicator, for the
|
|
1751
|
+
* `dragAndDropHooks` prop of a `Table`.
|
|
1752
|
+
*/
|
|
1753
|
+
function useTableDragAndDrop(options) {
|
|
1754
|
+
return useDragAndDrop$1({
|
|
1755
|
+
renderDropIndicator: (target) => /* @__PURE__ */ jsx(TableDropIndicator, { target }),
|
|
1756
|
+
...options
|
|
1618
1757
|
});
|
|
1619
1758
|
}
|
|
1620
1759
|
//#endregion
|
|
@@ -1740,6 +1879,84 @@ function ToggleButtonGroup({ className, ...props }) {
|
|
|
1740
1879
|
});
|
|
1741
1880
|
}
|
|
1742
1881
|
//#endregion
|
|
1882
|
+
//#region src/components/token-field/token-field.module.css
|
|
1883
|
+
var token_field_module_default = {
|
|
1884
|
+
"tokenField": "_tokenField_isyx7_2",
|
|
1885
|
+
"input": "_input_isyx7_12",
|
|
1886
|
+
"small": "_small_isyx7_58",
|
|
1887
|
+
"medium": "_medium_isyx7_62",
|
|
1888
|
+
"large": "_large_isyx7_66",
|
|
1889
|
+
"token": "_token_isyx7_2",
|
|
1890
|
+
"hextech": "_hextech_isyx7_90",
|
|
1891
|
+
"gold": "_gold_isyx7_95",
|
|
1892
|
+
"grey": "_grey_isyx7_100"
|
|
1893
|
+
};
|
|
1894
|
+
//#endregion
|
|
1895
|
+
//#region src/components/token-field/token-field.tsx
|
|
1896
|
+
/**
|
|
1897
|
+
* A text field with inline, non-editable tokens: an `@summoner` mention, a
|
|
1898
|
+
* `#tag`, a champion picked from a menu. Text and tokens share one caret, so it
|
|
1899
|
+
* reads and edits as a single field rather than as an input with chips beside
|
|
1900
|
+
* it.
|
|
1901
|
+
*
|
|
1902
|
+
* ```tsx
|
|
1903
|
+
* <TokenField value={value} onChange={setValue}>
|
|
1904
|
+
* <Label>Prompt</Label>
|
|
1905
|
+
* <TokenInput placeholder="Mention a @summoner">
|
|
1906
|
+
* {(segment) => <Token>{segment.text}</Token>}
|
|
1907
|
+
* </TokenInput>
|
|
1908
|
+
* </TokenField>
|
|
1909
|
+
* ```
|
|
1910
|
+
*
|
|
1911
|
+
* This is React Aria's own note, and it holds here too: `TokenField` is alpha
|
|
1912
|
+
* upstream, so its API may still move under us.
|
|
1913
|
+
*/
|
|
1914
|
+
function TokenField({ className, ...props }) {
|
|
1915
|
+
return /* @__PURE__ */ jsx(TokenField$1, {
|
|
1916
|
+
...props,
|
|
1917
|
+
className: composeRenderProps(className, (className) => cx(token_field_module_default.tokenField, className))
|
|
1918
|
+
});
|
|
1919
|
+
}
|
|
1920
|
+
const tokenInput = cva({
|
|
1921
|
+
base: token_field_module_default.input,
|
|
1922
|
+
variants: { size: {
|
|
1923
|
+
small: token_field_module_default.small,
|
|
1924
|
+
medium: token_field_module_default.medium,
|
|
1925
|
+
large: token_field_module_default.large
|
|
1926
|
+
} },
|
|
1927
|
+
defaultVariants: { size: "medium" }
|
|
1928
|
+
});
|
|
1929
|
+
/** The editable area of a `TokenField`, rendering a `Token` per token segment. */
|
|
1930
|
+
function TokenInput({ className, placeholder, size = "medium", ...props }) {
|
|
1931
|
+
return /* @__PURE__ */ jsx(TokenInput$1, {
|
|
1932
|
+
"data-placeholder": placeholder,
|
|
1933
|
+
...props,
|
|
1934
|
+
className: composeRenderProps(className, (className) => tokenInput({
|
|
1935
|
+
className,
|
|
1936
|
+
size
|
|
1937
|
+
}))
|
|
1938
|
+
});
|
|
1939
|
+
}
|
|
1940
|
+
const token = cva({
|
|
1941
|
+
base: token_field_module_default.token,
|
|
1942
|
+
variants: { variant: {
|
|
1943
|
+
gold: token_field_module_default.gold,
|
|
1944
|
+
hextech: token_field_module_default.hextech,
|
|
1945
|
+
grey: token_field_module_default.grey
|
|
1946
|
+
} },
|
|
1947
|
+
defaultVariants: { variant: "hextech" }
|
|
1948
|
+
});
|
|
1949
|
+
/** One non-editable segment inside a `TokenInput`. */
|
|
1950
|
+
function Token({ className, variant = "hextech", ...props }) {
|
|
1951
|
+
return /* @__PURE__ */ jsx(Token$1, {
|
|
1952
|
+
...props,
|
|
1953
|
+
className: composeRenderProps(className, (className) => token({
|
|
1954
|
+
className,
|
|
1955
|
+
variant
|
|
1956
|
+
}))
|
|
1957
|
+
});
|
|
1958
|
+
}
|
|
1959
|
+
//#endregion
|
|
1743
1960
|
//#region src/components/toolbar.module.css
|
|
1744
1961
|
var toolbar_module_default = {
|
|
1745
1962
|
"toolbar": "_toolbar_1j7x4_2",
|
|
@@ -1833,6 +2050,71 @@ function TreeLoadMoreItem({ children, className, ...props }) {
|
|
|
1833
2050
|
});
|
|
1834
2051
|
}
|
|
1835
2052
|
//#endregion
|
|
1836
|
-
|
|
2053
|
+
//#region src/components/vertical-table/vertical-table.module.css
|
|
2054
|
+
var vertical_table_module_default = {
|
|
2055
|
+
"table": "_table_v9mcp_2",
|
|
2056
|
+
"fieldHeader": "_fieldHeader_v9mcp_26",
|
|
2057
|
+
"recordHeader": "_recordHeader_v9mcp_27",
|
|
2058
|
+
"corner": "_corner_v9mcp_28",
|
|
2059
|
+
"cell": "_cell_v9mcp_70",
|
|
2060
|
+
"start": "_start_v9mcp_76",
|
|
2061
|
+
"center": "_center_v9mcp_80",
|
|
2062
|
+
"end": "_end_v9mcp_84"
|
|
2063
|
+
};
|
|
2064
|
+
//#endregion
|
|
2065
|
+
//#region src/components/vertical-table/vertical-table.tsx
|
|
2066
|
+
const alignVariants = {
|
|
2067
|
+
start: vertical_table_module_default.start,
|
|
2068
|
+
center: vertical_table_module_default.center,
|
|
2069
|
+
end: vertical_table_module_default.end
|
|
2070
|
+
};
|
|
2071
|
+
const verticalTable = cva({ base: vertical_table_module_default.table });
|
|
2072
|
+
const verticalTableCell = cva({
|
|
2073
|
+
base: vertical_table_module_default.cell,
|
|
2074
|
+
variants: { align: alignVariants },
|
|
2075
|
+
defaultVariants: { align: "start" }
|
|
2076
|
+
});
|
|
2077
|
+
const verticalTableRecordHeader = cva({
|
|
2078
|
+
base: vertical_table_module_default.recordHeader,
|
|
2079
|
+
variants: { align: alignVariants },
|
|
2080
|
+
defaultVariants: { align: "start" }
|
|
2081
|
+
});
|
|
2082
|
+
/**
|
|
2083
|
+
* A table read down rather than across: a row per field, a column per record,
|
|
2084
|
+
* and the field names heading the rows from the leading column.
|
|
2085
|
+
*
|
|
2086
|
+
* It is the table for comparing a handful of records field by field — two
|
|
2087
|
+
* builds, the champions of a lane — and, with a single record and no
|
|
2088
|
+
* `recordHeader`, for the stat card that is a table underneath.
|
|
2089
|
+
*
|
|
2090
|
+
* Where `Table` is React Aria's grid, with everything that comes with it, this
|
|
2091
|
+
* is markup and no more: a `<table>` whose field names are real
|
|
2092
|
+
* `<th scope="row">`s and whose record headings are real `<th scope="col">`s.
|
|
2093
|
+
* Nothing here is selectable, sortable, resizable or focusable. React Aria's
|
|
2094
|
+
* table cannot be transposed — its collection is row major, and the flip is in
|
|
2095
|
+
* the data rather than in the structure — so rather than dress one up as the
|
|
2096
|
+
* other, a table that only has to be read is only what a table needs to be
|
|
2097
|
+
* read. Reach for `Table` the moment the rows have to be interacted with.
|
|
2098
|
+
*/
|
|
2099
|
+
function VerticalTable({ align = "start", className, fields, recordHeader, recordKey = (_record, index) => index, records, ...props }) {
|
|
2100
|
+
return /* @__PURE__ */ jsxs("table", {
|
|
2101
|
+
...props,
|
|
2102
|
+
className: verticalTable({ className }),
|
|
2103
|
+
children: [recordHeader && /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("td", { className: vertical_table_module_default.corner }), records.map((record, index) => /* @__PURE__ */ jsx("th", {
|
|
2104
|
+
className: verticalTableRecordHeader({ align }),
|
|
2105
|
+
scope: "col",
|
|
2106
|
+
children: recordHeader(record, index)
|
|
2107
|
+
}, recordKey(record, index)))] }) }), /* @__PURE__ */ jsx("tbody", { children: fields.map((field, fieldIndex) => /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
|
|
2108
|
+
className: vertical_table_module_default.fieldHeader,
|
|
2109
|
+
scope: "row",
|
|
2110
|
+
children: field.name
|
|
2111
|
+
}), records.map((record, index) => /* @__PURE__ */ jsx("td", {
|
|
2112
|
+
className: verticalTableCell({ align: field.align ?? align }),
|
|
2113
|
+
children: field.value(record, index)
|
|
2114
|
+
}, recordKey(record, index)))] }, field.id ?? fieldIndex)) })]
|
|
2115
|
+
});
|
|
2116
|
+
}
|
|
2117
|
+
//#endregion
|
|
2118
|
+
export { Autocomplete, AutocompleteContext, AutocompleteStateContext, Breadcrumb, Breadcrumbs, Button, ButtonLink, Calendar, CalendarCell, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarIcon, Checkbox, CheckboxButton, CheckboxField, Collection, DateField, DateInput, DatePicker, DatePickerButton, DatePickerPopover, DateRangePicker, DateSegment, Dialog, DialogButtons, DialogHeading, DialogTrigger, Disclosure, DisclosureButton, DisclosureGroup, DisclosurePanel, Divider, FieldError, Focusable, GridLayout, Group, GroupInput, GroupSeparator, Heading, Label, ListBoxItem, ListLayout, Menu, MenuHeader, MenuItem, MenuPopover, MenuSection, MenuSeparator, MenuTrigger, MenuVirtualizer, Modal, MultipleSelect, NumberField, PickerDateInput, Popover, PopoverBody, Pressable, PreviewTrigger, ProgressBar, Radio, RadioButton, RadioField, RadioGroup, RangeCalendar, ResizableTableContainer, RouterProvider, SearchField, Select, SelectButton, SelectListBox, SelectListBoxItem, SelectPopover, SelectValue, SelectVirtualizer, Size, Slider, SliderOutput, Sonner, Spinner, SubmenuTrigger, Switch, SwitchButton, SwitchField, Tab, TabList, TabPanel, Table, TableBody, TableCell, TableColumn, TableColumnResizer, TableDropIndicator, TableFooter, TableHeader, TableLayout, TableLoadMoreItem, TableRow, Tabs, Tag, TagGroup, TagList, Text, TextArea, TextField, TimeField, ToggleButton, ToggleButtonGroup, Token, TokenField, TokenFieldValue, TokenInput, Toolbar, ToolbarSeparator, Tree, TreeItem, TreeItemContent, TreeLoadMoreItem, UnstyledPopover, VerticalTable, 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 };
|
|
1837
2119
|
|
|
1838
2120
|
//# sourceMappingURL=index.mjs.map
|