@box-kite/react 2.2.14 → 2.2.16

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.
Files changed (136) hide show
  1. package/.claude/rules/box-kite-rules.md +1 -1
  2. package/.claude/skills/box-kite/SKILL.md +1 -1
  3. package/.claude/skills/box-kite/references/styling.md +1 -1
  4. package/.cursor/rules/box-kite.mdc +1 -1
  5. package/AGENTS.md +1 -1
  6. package/BOX_AI_CONTEXT.md +16 -0
  7. package/BOX_KITE_AI_CONTEXT.md +16 -0
  8. package/behavior.cjs +1 -1
  9. package/behavior.mjs +16 -16
  10. package/catalog.cjs +1 -1
  11. package/catalog.mjs +1 -1
  12. package/client.cjs +1 -1
  13. package/client.mjs +10 -10
  14. package/components/accordion.cjs +1 -1
  15. package/components/accordion.mjs +95 -91
  16. package/components/calendar.cjs +1 -1
  17. package/components/calendar.mjs +212 -210
  18. package/components/chart.cjs +1 -1
  19. package/components/chart.d.ts +8 -3
  20. package/components/chart.mjs +70 -65
  21. package/components/combobox.cjs +1 -1
  22. package/components/combobox.mjs +187 -186
  23. package/components/dashboard.cjs +1 -1
  24. package/components/dashboard.d.ts +1 -44
  25. package/components/dashboard.mjs +202 -201
  26. package/components/dataGrid/components/dataGridListLayout.d.ts +1 -1
  27. package/components/dataGrid/contracts/dataGridContract.d.ts +1 -1
  28. package/components/dataGrid/models/gridModel.d.ts +1 -1
  29. package/components/dataGrid.cjs +2 -2
  30. package/components/dataGrid.mjs +10 -10
  31. package/components/dateField.cjs +1 -1
  32. package/components/dateField.mjs +96 -96
  33. package/components/datePicker.cjs +1 -1
  34. package/components/datePicker.mjs +177 -179
  35. package/components/dialog.cjs +1 -1
  36. package/components/dialog.d.ts +2 -64
  37. package/components/dialog.mjs +130 -126
  38. package/components/form.cjs +1 -1
  39. package/components/form.d.ts +4 -3
  40. package/components/form.mjs +25 -22
  41. package/components/menu.cjs +1 -1
  42. package/components/menu.d.ts +2 -73
  43. package/components/menu.mjs +222 -218
  44. package/components/overlay.cjs +1 -1
  45. package/components/overlay.mjs +43 -43
  46. package/components/popover.cjs +1 -1
  47. package/components/popover.d.ts +1 -41
  48. package/components/popover.mjs +55 -51
  49. package/components/radioGroup.cjs +1 -1
  50. package/components/radioGroup.mjs +59 -55
  51. package/components/slider.cjs +1 -1
  52. package/components/slider.d.ts +1 -55
  53. package/components/slider.mjs +92 -90
  54. package/components/sortableList.cjs +1 -1
  55. package/components/sortableList.mjs +149 -148
  56. package/components/swipeItem.cjs +1 -1
  57. package/components/swipeItem.mjs +100 -100
  58. package/components/tabs.cjs +1 -1
  59. package/components/tabs.mjs +135 -132
  60. package/components/toaster.cjs +1 -1
  61. package/components/toaster.d.ts +1 -37
  62. package/components/toaster.mjs +130 -128
  63. package/components/tooltip.cjs +1 -1
  64. package/components/tooltip.d.ts +1 -34
  65. package/components/tooltip.mjs +73 -69
  66. package/components/virtualList.cjs +1 -1
  67. package/components/virtualList.mjs +88 -87
  68. package/interactionListening.cjs +1 -1
  69. package/interactionListening.mjs +3 -3
  70. package/layer.cjs +1 -1
  71. package/layer.mjs +1 -1
  72. package/package.json +31 -30
  73. package/placement.cjs +1 -1
  74. package/placement.mjs +1 -1
  75. package/platform.cjs +1 -1
  76. package/platform.mjs +17 -14
  77. package/react/componentsContext.d.ts +1 -1
  78. package/react-shared.cjs +1 -1
  79. package/react-shared.mjs +1 -1
  80. package/scrolling.cjs +1 -1
  81. package/scrolling.mjs +1 -1
  82. package/utils/chart/chartUtils.d.ts +3 -2
  83. package/utils/dashboard/dashboardUtils.d.ts +1 -1
  84. package/utils/dom/domUtils.d.ts +6 -0
  85. package/create/src/agents.d.ts +0 -22
  86. package/create/src/agents.test.d.ts +0 -1
  87. package/create/src/index.d.ts +0 -1
  88. package/create/src/options.d.ts +0 -31
  89. package/create/src/options.test.d.ts +0 -1
  90. package/create/src/packageManager.d.ts +0 -5
  91. package/create/src/project.d.ts +0 -27
  92. package/create/src/project.test.d.ts +0 -1
  93. package/create/templates/ts/designs/azure.d.ts +0 -5
  94. package/create/templates/ts/designs/ember.d.ts +0 -5
  95. package/create/templates/ts/designs/mono.d.ts +0 -5
  96. package/create/templates/ts/src/App.d.ts +0 -2
  97. package/create/templates/ts/src/design.d.ts +0 -5
  98. package/create/templates/ts/src/main.d.ts +0 -0
  99. package/mcp/src/data.d.ts +0 -90
  100. package/mcp/src/data.test.d.ts +0 -1
  101. package/mcp/src/engine.d.ts +0 -23
  102. package/mcp/src/index.d.ts +0 -1
  103. package/mcp/src/search.d.ts +0 -26
  104. package/mcp/src/search.test.d.ts +0 -1
  105. package/mcp/src/server.d.ts +0 -18
  106. package/mcp/src/server.test.d.ts +0 -1
  107. package/mcp/src/styles.d.ts +0 -27
  108. package/mcp/src/styles.test.d.ts +0 -1
  109. package/mcp/src/tools.d.ts +0 -18
  110. package/mcp/src/vocabulary.d.ts +0 -41
  111. package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +0 -24
  112. package/registry/blocks/dashboard-shell/dashboard-stats.d.ts +0 -13
  113. package/registry/blocks/data-grid/invoice-rows.d.ts +0 -15
  114. package/registry/blocks/data-grid/invoices-grid.d.ts +0 -1
  115. package/registry/blocks/settings-form/settings-form.d.ts +0 -17
  116. package/registry/designs/store/address-form.d.ts +0 -11
  117. package/registry/designs/store/cart-items.d.ts +0 -10
  118. package/registry/designs/store/cart-page.d.ts +0 -4
  119. package/registry/designs/store/checkout-page.d.ts +0 -7
  120. package/registry/designs/store/credit-card-form.d.ts +0 -10
  121. package/registry/designs/store/form-field.d.ts +0 -19
  122. package/registry/designs/store/order-summary.d.ts +0 -18
  123. package/registry/designs/store/product-art.d.ts +0 -26
  124. package/registry/designs/store/product-card.d.ts +0 -11
  125. package/registry/designs/store/product-gallery.d.ts +0 -11
  126. package/registry/designs/store/product-grid.d.ts +0 -10
  127. package/registry/designs/store/product-page.d.ts +0 -5
  128. package/registry/designs/store/quantity-stepper.d.ts +0 -13
  129. package/registry/designs/store/shipping-method.d.ts +0 -14
  130. package/registry/designs/store/store-data.d.ts +0 -53
  131. package/registry/designs/store/store-design.d.ts +0 -63
  132. package/registry/designs/store/store-shell.d.ts +0 -12
  133. package/registry/designs/store/storefront-page.d.ts +0 -4
  134. package/registry/designs/store/variant-picker.d.ts +0 -15
  135. package/supabase/functions/collect/index.d.ts +0 -30
  136. package/supabase/functions/collect/index.test.d.ts +0 -1
@@ -138,77 +138,6 @@ export interface MenuSubProps<TKey extends keyof ComponentsAndVariants = 'menu'>
138
138
  /** Attributes for the item that opens it — the submenu's own go in `props`. */
139
139
  itemProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;
140
140
  }
141
- /**
142
- * A menu button and its menu, on the platform's own Popover API: `<Menu>` is the button's menu, and every
143
- * `Menu.Sub` inside it is another popover nested in that one.
144
- *
145
- * ```tsx
146
- * <Menu trigger={(t) => <Button {...t}>Actions</Button>}>
147
- * <Menu.Item onSelect={duplicate}>Duplicate</Menu.Item>
148
- * <Menu.Item disabled>Move</Menu.Item>
149
- * <Menu.Separator />
150
- * <Menu.CheckboxItem checked={compact} onCheckedChange={setCompact}>Compact rows</Menu.CheckboxItem>
151
- * <Menu.Sub label="Share">
152
- * <Menu.Item onSelect={copyLink}>Copy link</Menu.Item>
153
- * </Menu.Sub>
154
- * </Menu>
155
- * ```
156
- *
157
- * **What the platform owns**, measured in Chrome 152: the top layer, so the menu paints over every
158
- * stacking context and outside every clipped ancestor with no portal and no `z-index`; light dismiss, so
159
- * Escape and a press outside close it — Escape closing the innermost submenu first, one layer per press;
160
- * the toggle from the trigger, including the press that closes an open menu from its own button; and
161
- * focus return to whatever had focus before the menu opened. A submenu is a popover nested inside its
162
- * menu, so opening one leaves its parent open, and closing the menu closes every submenu with it.
163
- *
164
- * **What is written here** is the ARIA, the arrow keys, typeahead, and the focus the platform does not
165
- * move: into the first item on open, and back onto a submenu's own item when that submenu closes — the
166
- * platform returns focus for the outermost layer only.
167
- *
168
- * **The menu is always rendered**, and closed means `display: none`, which is what lets the browser own
169
- * show and hide; the exit is therefore a CSS transition rather than a `<Presence>`. A menu whose items are
170
- * expensive should be gated by the consumer: `{open && <Items />}`.
171
- *
172
- * **The menu keeps the side it chose when it opened**, since Chrome never re-evaluates
173
- * `position-try-fallbacks` for an element in the top layer (measured in 152) — so a menu left open while
174
- * the page scrolls does not flip. Every open picks the right side.
175
- *
176
- * Where the browser has no Popover API each layer is an `Overlay` — a portal — with `useDismiss` and
177
- * `useFocusReturn` supplying what the platform otherwise would.
178
- *
179
- * @a11y `role="menu"` on the panel, named by `label`, `labelledBy` or its trigger; `menuitem`,
180
- * `menuitemcheckbox` and `menuitemradio` on the items, with `aria-checked` on the last two, `role="group"`
181
- * around a titled section and `role="separator"` between them.
182
- * @a11y The trigger carries `aria-haspopup="menu"`, `aria-expanded` and `aria-controls`; a submenu's item
183
- * carries the same three, which is what says it opens another menu.
184
- * @a11y A disabled item is `aria-disabled` and stays focusable, as APG asks — the `disabled` attribute
185
- * would take it out of the keyboard's reach and silence it.
186
- * @keyboard Enter / Space — On the trigger, opens the menu with the first item focused. On an item,
187
- * chooses it. On a submenu's item, opens the submenu.
188
- * @keyboard Down / Up — On the trigger, opens the menu at its first or last item. Inside, moves between
189
- * items and wraps at the ends.
190
- * @keyboard Home / End — The first or the last item.
191
- * @keyboard Right / Left — Opens the submenu of the item that has focus, and closes the submenu focus is
192
- * in — the other way round in a right-to-left menu, which is APG's rule and the reading order's.
193
- * @keyboard Escape — Closes the innermost menu and puts focus back on what opened it.
194
- * @keyboard Tab — Closes the menu and moves focus on, as APG asks.
195
- * @keyboard A printable character — Typeahead: jumps to the item whose text starts with what was typed,
196
- * and the same letter again cycles through the items starting with it.
197
- * @pattern https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/
198
- */
199
- declare function MenuImpl<TKey extends keyof ComponentsAndVariants = 'menu'>(props: MenuProps<TKey>): import("react").JSX.Element;
200
- /**
201
- * A submenu: an item that opens a menu of its own. The panel is declared beside its item, *inside* the
202
- * menu it belongs to, which is what makes it a nested popover — so opening it leaves the parent menu open
203
- * and a press inside it is a press inside the parent (measured in Chrome 152).
204
- *
205
- * @a11y The item carries `role="menuitem"`, `aria-haspopup="menu"` and `aria-expanded`, and the submenu is
206
- * named after it.
207
- * @keyboard Right / Enter / Space — Opens it and focuses its first item. Left in a right-to-left menu,
208
- * which is the reading order rather than the key.
209
- * @keyboard Left / Escape — Closes it and puts focus back on the item that opened it.
210
- */
211
- declare function MenuSub<TKey extends keyof ComponentsAndVariants = 'menu'>(props: MenuSubProps<TKey>): import("react").JSX.Element;
212
141
  /** One command in the menu. A `<button>`, so Enter and Space are the browser's. */
213
142
  declare function MenuItem<TKey extends keyof ComponentsAndVariants = 'menu.item'>(props: MenuItemProps<TKey>): import("react").JSX.Element;
214
143
  /** An item that carries a state of its own: `role="menuitemcheckbox"` and a tick. */
@@ -224,13 +153,13 @@ declare function MenuRadioItem<TKey extends keyof ComponentsAndVariants = 'menu.
224
153
  declare function MenuGroup<TKey extends keyof ComponentsAndVariants = 'menu.group'>(props: MenuGroupProps<TKey>): import("react").JSX.Element;
225
154
  /** The line between two sections. `role="separator"`, which a menu is allowed to own. */
226
155
  declare function MenuSeparator<TKey extends keyof ComponentsAndVariants = 'menu.separator'>(props: MenuSeparatorProps<TKey>): import("react").JSX.Element;
227
- declare const Menu: typeof MenuImpl & {
156
+ declare const Menu: (<TKey extends keyof ComponentsAndVariants = "menu">(props: MenuProps<TKey>) => React.ReactNode) & {
228
157
  Item: typeof MenuItem;
229
158
  CheckboxItem: typeof MenuCheckboxItem;
230
159
  RadioGroup: typeof MenuRadioGroup;
231
160
  RadioItem: typeof MenuRadioItem;
232
161
  Group: typeof MenuGroup;
233
162
  Separator: typeof MenuSeparator;
234
- Sub: typeof MenuSub;
163
+ Sub: <TKey extends keyof ComponentsAndVariants = "menu">(props: MenuSubProps<TKey>) => React.ReactNode;
235
164
  };
236
165
  export default Menu;