@box-kite/react 2.2.4 → 2.2.5
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/.claude/rules/box-kite-rules.md +8 -0
- package/.claude/skills/box-kite/SKILL.md +8 -0
- package/.claude/skills/box-kite/references/components.md +49 -3
- package/.cursor/rules/box-kite.mdc +8 -0
- package/AGENTS.md +8 -0
- package/BOX_AI_CONTEXT.md +276 -20
- package/BOX_KITE_AI_CONTEXT.md +276 -20
- package/behavior.cjs +1 -1
- package/behavior.mjs +57 -57
- package/box.cjs +1 -1
- package/box.d.ts +5 -0
- package/box.mjs +17 -17
- package/catalog.cjs +1 -1
- package/catalog.mjs +385 -0
- package/client.cjs +1 -1
- package/client.mjs +113 -87
- package/components/dashboard.cjs +1 -1
- package/components/dashboard.mjs +1 -1
- package/components/dataGrid/components/dataGridList.d.ts +12 -0
- package/components/dataGrid/components/dataGridListAggregate.d.ts +7 -0
- package/components/dataGrid/components/dataGridListFilter.d.ts +7 -0
- package/components/dataGrid/components/dataGridListFilterSheet.d.ts +11 -0
- package/components/dataGrid/components/dataGridListFooter.d.ts +13 -0
- package/components/dataGrid/components/dataGridListGroup.d.ts +13 -0
- package/components/dataGrid/components/dataGridListItem.d.ts +21 -0
- package/components/dataGrid/components/dataGridListLayout.d.ts +20 -0
- package/components/dataGrid/components/dataGridListRecord.d.ts +11 -0
- package/components/dataGrid/components/dataGridListSelectionBar.d.ts +11 -0
- package/components/dataGrid/components/dataGridListSheet.d.ts +30 -0
- package/components/dataGrid/components/dataGridListSortSheet.d.ts +10 -0
- package/components/dataGrid/components/dataGridListToolbar.d.ts +10 -0
- package/components/dataGrid/components/dataGridListValue.d.ts +12 -0
- package/components/dataGrid/contracts/dataGridContract.d.ts +32 -0
- package/components/dataGrid/models/gridModel.d.ts +3 -0
- package/components/dataGrid/models/listModel.d.ts +129 -0
- package/components/dataGrid/models/localeText.d.ts +32 -0
- package/components/dataGrid/models/viewportModel.d.ts +0 -2
- package/components/dataGrid/useListLayout.d.ts +13 -0
- package/components/dataGrid.cjs +3 -3
- package/components/dataGrid.mjs +1052 -788
- package/components/dialog.cjs +1 -1
- package/components/dialog.mjs +85 -97
- package/components/list/listItemParts.d.ts +9 -0
- package/components/list.cjs +1 -0
- package/components/list.d.ts +118 -0
- package/components/list.mjs +391 -0
- package/components/menu.cjs +1 -1
- package/components/menu.mjs +25 -25
- package/components/overlay.cjs +1 -1
- package/components/overlay.mjs +12 -12
- package/components/semantics.d.ts +29 -29
- package/components/slider.cjs +1 -1
- package/components/slider.mjs +1 -1
- package/components/sortableList.cjs +1 -0
- package/components/sortableList.d.ts +49 -0
- package/components/sortableList.mjs +384 -0
- package/components/swipeItem.cjs +1 -0
- package/components/swipeItem.d.ts +52 -0
- package/components/swipeItem.mjs +321 -0
- package/components/tabs.cjs +1 -1
- package/components/tabs.mjs +1 -1
- package/components/toaster.cjs +1 -1
- package/components/toaster.mjs +24 -24
- package/components/virtualList.cjs +1 -0
- package/components/virtualList.d.ts +32 -0
- package/components/virtualList.mjs +188 -0
- package/dataGridList.cjs +1 -0
- package/dataGridList.mjs +1351 -0
- package/docs/components.md +5 -1
- package/icons/closeIcon.d.ts +2 -0
- package/icons/filterIcon.d.ts +2 -0
- package/layer.cjs +1 -1
- package/layer.mjs +1 -1
- package/mcp/src/data.d.ts +2 -0
- package/package.json +86 -22
- package/placement.cjs +1 -1
- package/placement.mjs +10 -10
- package/platform.cjs +1 -1
- package/platform.mjs +4 -1
- package/react/a11y/useControllableState.d.ts +2 -1
- package/react/componentsContext.d.ts +4 -0
- package/react/componentsProvider.d.ts +10 -0
- package/react/resolveStyles.d.ts +2 -1
- package/react/theme/theme.d.ts +6 -1
- package/react-shared.cjs +1 -1
- package/react-shared.mjs +5 -5
- package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +3 -1
- package/registry/designs/store/address-form.d.ts +11 -0
- package/registry/designs/store/cart-items.d.ts +10 -0
- package/registry/designs/store/cart-page.d.ts +4 -0
- package/registry/designs/store/checkout-page.d.ts +7 -0
- package/registry/designs/store/credit-card-form.d.ts +10 -0
- package/registry/designs/store/form-field.d.ts +19 -0
- package/registry/designs/store/order-summary.d.ts +18 -0
- package/registry/designs/store/product-art.d.ts +26 -0
- package/registry/designs/store/product-card.d.ts +11 -0
- package/registry/designs/store/product-gallery.d.ts +11 -0
- package/registry/designs/store/product-grid.d.ts +10 -0
- package/registry/designs/store/product-page.d.ts +5 -0
- package/registry/designs/store/quantity-stepper.d.ts +13 -0
- package/registry/designs/store/shipping-method.d.ts +14 -0
- package/registry/designs/store/store-data.d.ts +53 -0
- package/registry/designs/store/store-design.d.ts +63 -0
- package/registry/designs/store/store-shell.d.ts +12 -0
- package/registry/designs/store/storefront-page.d.ts +4 -0
- package/registry/designs/store/variant-picker.d.ts +15 -0
- package/rsc.cjs +1 -1
- package/rsc.d.ts +2 -0
- package/rsc.mjs +1 -1
- package/scrolling.cjs +1 -0
- package/scrolling.mjs +22 -0
- package/ssg.cjs +1 -1
- package/ssg.mjs +1 -1
- package/utils/scroll/scrollUtils.d.ts +6 -0
- package/utils/sortable/sortableUtils.d.ts +25 -0
- package/utils/swipe/swipeUtils.d.ts +53 -0
- package/utils/virtual/measuredWindow.d.ts +28 -0
- package/utils/virtual/rowSearch.d.ts +11 -0
package/catalog.mjs
CHANGED
|
@@ -1615,6 +1615,391 @@ var a = i, o = {
|
|
|
1615
1615
|
required: [],
|
|
1616
1616
|
styled: !0
|
|
1617
1617
|
},
|
|
1618
|
+
List: {
|
|
1619
|
+
description: "A list of things to read and pick from — messages, orders, people, settings.",
|
|
1620
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1621
|
+
slots: ["default"],
|
|
1622
|
+
events: [],
|
|
1623
|
+
props: { tag: {
|
|
1624
|
+
type: "string",
|
|
1625
|
+
enum: ["ul", "ol"],
|
|
1626
|
+
description: "`ol` when the order means something — steps, a ranking."
|
|
1627
|
+
} },
|
|
1628
|
+
required: [],
|
|
1629
|
+
styled: !0
|
|
1630
|
+
},
|
|
1631
|
+
"List.Item": {
|
|
1632
|
+
description: "One thing in the list: a flex row of its parts.",
|
|
1633
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1634
|
+
slots: ["default"],
|
|
1635
|
+
events: [],
|
|
1636
|
+
props: {
|
|
1637
|
+
size: {
|
|
1638
|
+
type: "string",
|
|
1639
|
+
enum: [
|
|
1640
|
+
"sm",
|
|
1641
|
+
"md",
|
|
1642
|
+
"lg"
|
|
1643
|
+
],
|
|
1644
|
+
description: "The item's spacing."
|
|
1645
|
+
},
|
|
1646
|
+
wrap: {
|
|
1647
|
+
type: "boolean",
|
|
1648
|
+
description: "Lets the item's parts wrap onto a second line when they do not fit, instead of squeezing."
|
|
1649
|
+
},
|
|
1650
|
+
selected: {
|
|
1651
|
+
type: "boolean",
|
|
1652
|
+
description: "Tints the item as chosen."
|
|
1653
|
+
},
|
|
1654
|
+
chevron: {
|
|
1655
|
+
type: "boolean",
|
|
1656
|
+
description: "Ends the item with a chevron: pressing it goes somewhere with more."
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1659
|
+
required: [],
|
|
1660
|
+
styled: !0
|
|
1661
|
+
},
|
|
1662
|
+
"List.Media": {
|
|
1663
|
+
description: "The leading slot: an icon, an avatar, a thumbnail — `variant` is `icon`, `avatar` or `image`, or none for a bare icon.",
|
|
1664
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1665
|
+
slots: ["default"],
|
|
1666
|
+
events: [],
|
|
1667
|
+
props: {},
|
|
1668
|
+
required: [],
|
|
1669
|
+
styled: !0
|
|
1670
|
+
},
|
|
1671
|
+
"List.Content": {
|
|
1672
|
+
description: "The middle of an item, taking the room: a column of rows and text, which may shrink past its content.",
|
|
1673
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1674
|
+
slots: ["default"],
|
|
1675
|
+
events: [],
|
|
1676
|
+
props: {},
|
|
1677
|
+
required: [],
|
|
1678
|
+
styled: !0
|
|
1679
|
+
},
|
|
1680
|
+
"List.Row": {
|
|
1681
|
+
description: "A row inside `List.Content`: its parts side by side, the last at the end.",
|
|
1682
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1683
|
+
slots: ["default"],
|
|
1684
|
+
events: [],
|
|
1685
|
+
props: {
|
|
1686
|
+
wrap: {
|
|
1687
|
+
type: "boolean",
|
|
1688
|
+
description: "Lets the row's parts wrap onto a new line — a set of tags — instead of pushing the last to the end."
|
|
1689
|
+
},
|
|
1690
|
+
secondary: {
|
|
1691
|
+
type: "boolean",
|
|
1692
|
+
description: "The quieter line under the main one: smaller and muted."
|
|
1693
|
+
}
|
|
1694
|
+
},
|
|
1695
|
+
required: [],
|
|
1696
|
+
styled: !0
|
|
1697
|
+
},
|
|
1698
|
+
"List.Overline": {
|
|
1699
|
+
description: "A small line above the title: an id, a date, a category.",
|
|
1700
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1701
|
+
slots: ["default"],
|
|
1702
|
+
events: [],
|
|
1703
|
+
props: { lines: {
|
|
1704
|
+
type: "number",
|
|
1705
|
+
enum: [
|
|
1706
|
+
1,
|
|
1707
|
+
2,
|
|
1708
|
+
3
|
|
1709
|
+
],
|
|
1710
|
+
description: "How many lines it runs to before it stops: `1` ends in an ellipsis, `2` and `3` are clamped."
|
|
1711
|
+
} },
|
|
1712
|
+
required: [],
|
|
1713
|
+
styled: !0
|
|
1714
|
+
},
|
|
1715
|
+
"List.Title": {
|
|
1716
|
+
description: "The item's name, and where its `List.Action` goes.",
|
|
1717
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1718
|
+
slots: ["default"],
|
|
1719
|
+
events: [],
|
|
1720
|
+
props: { lines: {
|
|
1721
|
+
type: "number",
|
|
1722
|
+
enum: [
|
|
1723
|
+
1,
|
|
1724
|
+
2,
|
|
1725
|
+
3
|
|
1726
|
+
],
|
|
1727
|
+
description: "How many lines it runs to before it stops: `1` ends in an ellipsis, `2` and `3` are clamped."
|
|
1728
|
+
} },
|
|
1729
|
+
required: [],
|
|
1730
|
+
styled: !0
|
|
1731
|
+
},
|
|
1732
|
+
"List.Description": {
|
|
1733
|
+
description: "Muted supporting text under the title.",
|
|
1734
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1735
|
+
slots: ["default"],
|
|
1736
|
+
events: [],
|
|
1737
|
+
props: { lines: {
|
|
1738
|
+
type: "number",
|
|
1739
|
+
enum: [
|
|
1740
|
+
1,
|
|
1741
|
+
2,
|
|
1742
|
+
3
|
|
1743
|
+
],
|
|
1744
|
+
description: "How many lines it runs to before it stops: `1` ends in an ellipsis, `2` and `3` are clamped."
|
|
1745
|
+
} },
|
|
1746
|
+
required: [],
|
|
1747
|
+
styled: !0
|
|
1748
|
+
},
|
|
1749
|
+
"List.Meta": {
|
|
1750
|
+
description: "A small muted value that never wraps — a time, a count — in tabular figures.",
|
|
1751
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1752
|
+
slots: ["default"],
|
|
1753
|
+
events: [],
|
|
1754
|
+
props: {},
|
|
1755
|
+
required: [],
|
|
1756
|
+
styled: !0
|
|
1757
|
+
},
|
|
1758
|
+
"List.End": {
|
|
1759
|
+
description: "The trailing slot: a value and its label, stacked and aligned to the end so a column of them lines up.",
|
|
1760
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1761
|
+
slots: ["default"],
|
|
1762
|
+
events: [],
|
|
1763
|
+
props: {},
|
|
1764
|
+
required: [],
|
|
1765
|
+
styled: !0
|
|
1766
|
+
},
|
|
1767
|
+
"List.Actions": {
|
|
1768
|
+
description: "Controls of the item's own — a switch, a menu, a checkbox — lifted above the action that covers the item.",
|
|
1769
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1770
|
+
slots: ["default"],
|
|
1771
|
+
events: [],
|
|
1772
|
+
props: {},
|
|
1773
|
+
required: [],
|
|
1774
|
+
styled: !0
|
|
1775
|
+
},
|
|
1776
|
+
"List.Action": {
|
|
1777
|
+
description: "The item's one primary action, stretched over the whole item.",
|
|
1778
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1779
|
+
slots: ["default"],
|
|
1780
|
+
events: ["onClick"],
|
|
1781
|
+
props: { tag: {
|
|
1782
|
+
type: "string",
|
|
1783
|
+
enum: [
|
|
1784
|
+
"button",
|
|
1785
|
+
"a",
|
|
1786
|
+
"label"
|
|
1787
|
+
],
|
|
1788
|
+
description: "The element, when what `props` holds does not already say: `a` with no `href` is a placeholder link."
|
|
1789
|
+
} },
|
|
1790
|
+
required: [],
|
|
1791
|
+
styled: !0
|
|
1792
|
+
},
|
|
1793
|
+
"List.Fields": {
|
|
1794
|
+
description: "A `<dl>` of `List.Field`s, as many to a line as fit at 8rem each.",
|
|
1795
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1796
|
+
slots: ["default"],
|
|
1797
|
+
events: [],
|
|
1798
|
+
props: {},
|
|
1799
|
+
required: [],
|
|
1800
|
+
styled: !0
|
|
1801
|
+
},
|
|
1802
|
+
"List.Field": {
|
|
1803
|
+
description: "A labelled value: a `<dt>` and a `<dd>` in a `<div>`, which is the one wrapper a `<dl>` allows.",
|
|
1804
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1805
|
+
slots: ["label", "default"],
|
|
1806
|
+
events: [],
|
|
1807
|
+
props: {},
|
|
1808
|
+
required: [],
|
|
1809
|
+
styled: !0
|
|
1810
|
+
},
|
|
1811
|
+
"List.Group": {
|
|
1812
|
+
description: "A section of the list: its label, then its own `<ul>` of items.",
|
|
1813
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1814
|
+
slots: ["label", "default"],
|
|
1815
|
+
events: [],
|
|
1816
|
+
props: {
|
|
1817
|
+
level: {
|
|
1818
|
+
type: "number",
|
|
1819
|
+
enum: [
|
|
1820
|
+
1,
|
|
1821
|
+
2,
|
|
1822
|
+
3,
|
|
1823
|
+
4,
|
|
1824
|
+
5,
|
|
1825
|
+
6
|
|
1826
|
+
],
|
|
1827
|
+
description: "Makes the label a heading of this level, so a screen reader can jump between groups."
|
|
1828
|
+
},
|
|
1829
|
+
sticky: {
|
|
1830
|
+
type: "boolean",
|
|
1831
|
+
description: "Keeps the label at the top of the screen while its items scroll under it, until the next group's pushes it off."
|
|
1832
|
+
}
|
|
1833
|
+
},
|
|
1834
|
+
required: [],
|
|
1835
|
+
styled: !0
|
|
1836
|
+
},
|
|
1837
|
+
"List.Chevron": {
|
|
1838
|
+
description: "The chevron that ends a drill-in item, pointing along the reading order.",
|
|
1839
|
+
import: "import List from '@box-kite/react/components/list';",
|
|
1840
|
+
slots: ["default"],
|
|
1841
|
+
events: [],
|
|
1842
|
+
props: {},
|
|
1843
|
+
required: [],
|
|
1844
|
+
styled: !0
|
|
1845
|
+
},
|
|
1846
|
+
SwipeItem: {
|
|
1847
|
+
description: "A list item that slides aside to show the commands under it — Mail's archive and delete.",
|
|
1848
|
+
import: "import SwipeItem from '@box-kite/react/components/swipeItem';",
|
|
1849
|
+
slots: [
|
|
1850
|
+
"default",
|
|
1851
|
+
"startActions",
|
|
1852
|
+
"endActions"
|
|
1853
|
+
],
|
|
1854
|
+
events: ["onOpenChange"],
|
|
1855
|
+
props: {
|
|
1856
|
+
fullSwipe: {
|
|
1857
|
+
type: "boolean",
|
|
1858
|
+
description: "A swipe carried most of the way across performs the outermost action instead of stopping at the tray — iOS's archive."
|
|
1859
|
+
},
|
|
1860
|
+
open: {
|
|
1861
|
+
type: "string",
|
|
1862
|
+
enum: ["start", "end"],
|
|
1863
|
+
description: "Which tray is open."
|
|
1864
|
+
},
|
|
1865
|
+
defaultOpen: {
|
|
1866
|
+
type: "string",
|
|
1867
|
+
enum: ["start", "end"],
|
|
1868
|
+
description: "Which tray is open to begin with."
|
|
1869
|
+
},
|
|
1870
|
+
size: {
|
|
1871
|
+
type: "string",
|
|
1872
|
+
enum: [
|
|
1873
|
+
"sm",
|
|
1874
|
+
"md",
|
|
1875
|
+
"lg"
|
|
1876
|
+
],
|
|
1877
|
+
description: "The item's spacing, as on `List.Item`."
|
|
1878
|
+
},
|
|
1879
|
+
wrap: {
|
|
1880
|
+
type: "boolean",
|
|
1881
|
+
description: "Lets the item's parts wrap onto a second line, as on `List.Item`."
|
|
1882
|
+
},
|
|
1883
|
+
selected: {
|
|
1884
|
+
type: "boolean",
|
|
1885
|
+
description: "Tints the item as chosen, as on `List.Item`."
|
|
1886
|
+
},
|
|
1887
|
+
chevron: {
|
|
1888
|
+
type: "boolean",
|
|
1889
|
+
description: "Ends the item with a chevron, as on `List.Item`."
|
|
1890
|
+
}
|
|
1891
|
+
},
|
|
1892
|
+
required: [],
|
|
1893
|
+
styled: !0
|
|
1894
|
+
},
|
|
1895
|
+
"SwipeItem.Action": {
|
|
1896
|
+
description: "One command in a tray: a label, and an icon over it if there is one.",
|
|
1897
|
+
import: "import SwipeItem from '@box-kite/react/components/swipeItem';",
|
|
1898
|
+
slots: ["default", "icon"],
|
|
1899
|
+
events: ["onClick"],
|
|
1900
|
+
props: { closeOnSelect: {
|
|
1901
|
+
type: "boolean",
|
|
1902
|
+
description: "Whether choosing the action closes the tray."
|
|
1903
|
+
} },
|
|
1904
|
+
required: [],
|
|
1905
|
+
styled: !0
|
|
1906
|
+
},
|
|
1907
|
+
SortableList: {
|
|
1908
|
+
description: "A list put in order by hand — a playlist, the columns of a report, a set of priorities.",
|
|
1909
|
+
import: "import SortableList from '@box-kite/react/components/sortableList';",
|
|
1910
|
+
slots: ["default"],
|
|
1911
|
+
events: ["onOrderChange", "onOrderCommit"],
|
|
1912
|
+
props: { tag: {
|
|
1913
|
+
type: "string",
|
|
1914
|
+
enum: ["ul", "ol"],
|
|
1915
|
+
description: "`ol` when the order means something — steps, a ranking."
|
|
1916
|
+
} },
|
|
1917
|
+
required: [],
|
|
1918
|
+
styled: !0
|
|
1919
|
+
},
|
|
1920
|
+
"SortableList.Item": {
|
|
1921
|
+
description: "One item in the order: a `List.Item` that knows who it is.",
|
|
1922
|
+
import: "import SortableList from '@box-kite/react/components/sortableList';",
|
|
1923
|
+
slots: ["default"],
|
|
1924
|
+
events: [],
|
|
1925
|
+
props: {
|
|
1926
|
+
value: {
|
|
1927
|
+
type: "string",
|
|
1928
|
+
description: "Who the item is in the order `onOrderChange` reports."
|
|
1929
|
+
},
|
|
1930
|
+
label: {
|
|
1931
|
+
type: "string",
|
|
1932
|
+
description: "What the handle and the announcements call the item: \"Move Ada Lovelace\"."
|
|
1933
|
+
},
|
|
1934
|
+
disabled: {
|
|
1935
|
+
type: "boolean",
|
|
1936
|
+
description: "Leaves the item where it is: its handle is disabled."
|
|
1937
|
+
},
|
|
1938
|
+
size: {
|
|
1939
|
+
type: "string",
|
|
1940
|
+
enum: [
|
|
1941
|
+
"sm",
|
|
1942
|
+
"md",
|
|
1943
|
+
"lg"
|
|
1944
|
+
],
|
|
1945
|
+
description: "The item's spacing."
|
|
1946
|
+
},
|
|
1947
|
+
wrap: {
|
|
1948
|
+
type: "boolean",
|
|
1949
|
+
description: "Lets the item's parts wrap onto a second line when they do not fit, instead of squeezing."
|
|
1950
|
+
},
|
|
1951
|
+
selected: {
|
|
1952
|
+
type: "boolean",
|
|
1953
|
+
description: "Tints the item as chosen."
|
|
1954
|
+
},
|
|
1955
|
+
chevron: {
|
|
1956
|
+
type: "boolean",
|
|
1957
|
+
description: "Ends the item with a chevron: pressing it goes somewhere with more."
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
required: ["value"],
|
|
1961
|
+
styled: !0
|
|
1962
|
+
},
|
|
1963
|
+
"SortableList.Handle": {
|
|
1964
|
+
description: "",
|
|
1965
|
+
import: "import SortableList from '@box-kite/react/components/sortableList';",
|
|
1966
|
+
slots: ["default"],
|
|
1967
|
+
events: [],
|
|
1968
|
+
props: {},
|
|
1969
|
+
required: [],
|
|
1970
|
+
styled: !0
|
|
1971
|
+
},
|
|
1972
|
+
VirtualList: {
|
|
1973
|
+
description: "A list too long to render whole — a mailbox, a contact book, a log.",
|
|
1974
|
+
import: "import VirtualList from '@box-kite/react/components/virtualList';",
|
|
1975
|
+
slots: [],
|
|
1976
|
+
events: [
|
|
1977
|
+
"itemKey",
|
|
1978
|
+
"children",
|
|
1979
|
+
"onRangeChange"
|
|
1980
|
+
],
|
|
1981
|
+
props: {
|
|
1982
|
+
estimateSize: {
|
|
1983
|
+
type: "number",
|
|
1984
|
+
description: "What an item counts as until one has been drawn, in px — then the mean of those drawn."
|
|
1985
|
+
},
|
|
1986
|
+
overscan: {
|
|
1987
|
+
type: "number",
|
|
1988
|
+
description: "Items kept either side of what is on screen, so a fast scroll has something to show."
|
|
1989
|
+
},
|
|
1990
|
+
initialCount: {
|
|
1991
|
+
type: "number",
|
|
1992
|
+
description: "How many items render before anything is measured — on a server, and in the first frame."
|
|
1993
|
+
},
|
|
1994
|
+
tag: {
|
|
1995
|
+
type: "string",
|
|
1996
|
+
enum: ["ul", "ol"],
|
|
1997
|
+
description: "`ol` when the order means something — steps, a ranking."
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
required: [],
|
|
2001
|
+
styled: !0
|
|
2002
|
+
},
|
|
1618
2003
|
Slider: {
|
|
1619
2004
|
description: "A value chosen by dragging a thumb along a track.",
|
|
1620
2005
|
import: "import Slider from '@box-kite/react/components/slider';",
|
package/client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime.cjs"),t=require("./react-shared.cjs"),n=require("./platform.cjs"),r=require("./effects.cjs"),i=require("./box.cjs");let a=require("react");a=e.t(a,1);let o=require("@box-kite/core"),s=require("react-
|
|
1
|
+
const e=require("./rolldown-runtime.cjs"),t=require("./react-shared.cjs"),n=require("./platform.cjs"),r=require("./effects.cjs"),i=require("./box.cjs");let a=require("react");a=e.t(a,1);let o=require("@box-kite/core"),s=require("react/jsx-runtime"),c=require("react-dom");var l=`[box-kite] The client build was loaded into a React Server Component graph, where React has no createContext. Import '@box-kite/react' by its package name — the react-server condition resolves it to a Box that renders on the server — and import the components that hold state (Dropdown, Tooltip, DataGrid, Checkbox, Select, Form) from a 'use client' module. See https://github.com/box-kite/box-kite#react-server-components-react-19`;function u(e){if(typeof e.createContext!=`function`)throw Error(l)}u(a.default);var d=a.default.createContext(void 0);function f({value:e,children:t}){return(0,s.jsx)(d.Provider,{value:e,children:t})}function p(e){let{node:t=null,event:r=`click`,hideOnScroll:i=!1,hideOnResize:o=!1,hideOnEscape:s=!0}=e??{},[c,l]=(0,a.useState)(!1),u=(0,a.useRef)(null);return(0,a.useEffect)(()=>{function e(e){let r=t??u.current;r&&!n.u(e,[r])&&l(!1)}function a(){l(!1)}function d(e){e.key===`Escape`&&l(!1)}let f=new AbortController;return c&&(window.addEventListener(r,e,f),s&&window.addEventListener(`keydown`,d,f),o&&window.addEventListener(`resize`,a,f),i&&window.addEventListener(`scroll`,e,{signal:f.signal,capture:!0})),()=>{f.abort()}},[t,c,r,s,o,i]),[c,l,u]}var m=r.t;function h(e,n){let{classNames:r,signature:i,styleElements:s}=t.l(e,n,(0,a.useContext)(d));return m(()=>{(0,o.getDefaultEngine)().flushSync()},[i??e]),{classNames:r,styleElements:s}}function g(e,n){let r=e?(0,o.getDefaultEngine)().addGlobalStyles(e,n):void 0;return m(()=>{(0,o.getDefaultEngine)().flushSync()},[e,n]),t.u(r)}var _;(function(e){function t(){(0,o.getDefaultEngine)().flushSync()}e.flushSync=t;function n(){(0,o.getDefaultEngine)().clear()}e.clear=n;function r(){return(0,o.getDefaultEngine)().getStyles()}e.getStyles=r;function i(){return(0,o.getDefaultEngine)().getStyleTag()}e.getStyleTag=i;function a(){return(0,o.getDefaultEngine)().styleElementId}e.styleElementId=a;function s(e){(0,o.getDefaultEngine)().configure(e)}e.configure=s})(_||={}),u(a.default);var v=a.default.createContext({theme:``,setTheme:()=>{}});function y(e){let{theme:t,use:n=`local`,storageKey:l,globalStyles:u,viewTransition:d,components:p}=e,m=p?(0,s.jsx)(f,{value:p,children:e.children}):e.children,h=g(n===`global`?u:void 0,`html`),[_,y]=(0,a.useState)(t??o.defaultThemeName),[b,x]=(0,a.useState)(t!==void 0),S=(0,a.useRef)(null),C=(0,a.useRef)(_),w=(0,a.useRef)(null),T=(0,a.useRef)(void 0),E=(0,a.useCallback)(e=>{let t=()=>{e===null?(l&&(0,o.clearStoredTheme)(l),x(!1)):(l&&(0,o.writeStoredTheme)(l,e),y(e),x(!0))};if(d){let e=(0,o.transitionTheme)(()=>(0,c.flushSync)(t),d===`reveal`?`reveal`:`fade`);T.current=e.finished,e.finished.then(()=>T.current=void 0,()=>T.current=void 0)}else t()},[l,d]),D=d===`reveal`;(0,a.useEffect)(()=>D?(0,o.prepareReveal)():void 0,[D]);let[O,k]=(0,a.useState)(t);return t!==O&&(k(t),t===void 0?x(!1):(y(t),x(!0))),(0,a.useLayoutEffect)(()=>{if(b)return;let e=l?(0,o.readStoredTheme)(l):null,t=e??(0,o.getSystemTheme)();if(t!==C.current&&(S.current=t),y(t),e){x(!0);return}return(0,o.watchSystemTheme)(y)},[b,l]),r.t(()=>{_!==C.current&&(w.current??=(0,o.pauseTransitions)())},[_]),(0,a.useLayoutEffect)(()=>{if(C.current=_,S.current!==null&&S.current!==_)return;S.current=null;let e=w.current;w.current=null;let t=n===`global`?(0,o.documentRoot)():null,r=t?(0,o.applyThemeToElement)(t,_):void 0;return e?.(T.current),r},[_,n]),n===`local`?(0,s.jsxs)(v.Provider,{value:{theme:_,setTheme:E},children:[h,(0,s.jsx)(i.default,{className:_,props:{"data-theme":_},children:m})]}):(0,s.jsxs)(v.Provider,{value:{theme:_,setTheme:E},children:[h,m]})}(function(e){function t(){let{theme:e,setTheme:t}=(0,a.useContext)(v);return[e,t]}e.useTheme=t})(y||={});var b=y,x=new WeakMap;function S(e){let t=x.get(e);return t||(t=new Map,x.set(e,t)),t}function C(e=!0){let[t]=b.useTheme(),r=(0,a.useMemo)(()=>{if(!e)return null;let t=n.t();if(!t)return null;let r=`box-kite-portal`,i=t.getElementById(r);return i||(i=document.createElement(`div`),i.id=r,document.body.appendChild(i)),i},[e]);return(0,a.useLayoutEffect)(()=>{if(!t||!r)return;let e=S(r),n=e.get(t)??0;return e.set(t,n+1),n===0&&r.classList.add(t),()=>{let n=(e.get(t)??1)-1;n<=0?(e.delete(t),r.classList.remove(t)):e.set(t,n)}},[r,t]),r}var w=0;function T(e){let{classNames:t,styleElements:i}=h({overflow:`hidden`},!1),a=t.slice(1).join(` `);return r.n(()=>{let t=n.n();if(!(!e||!t||!a))return w+=1,t.classList.add(a),()=>{--w,w===0&&t.classList.remove(a)}},[e,a]),i}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return T}});
|