@box-kite/react 2.2.15 → 2.2.17
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 +1 -1
- package/.claude/skills/box-kite/SKILL.md +1 -1
- package/.claude/skills/box-kite/references/styling.md +1 -1
- package/.cursor/rules/box-kite.mdc +1 -1
- package/AGENTS.md +1 -1
- package/BOX_AI_CONTEXT.md +16 -0
- package/BOX_KITE_AI_CONTEXT.md +16 -0
- package/behavior.cjs +1 -1
- package/behavior.mjs +16 -16
- package/catalog.cjs +1 -1
- package/catalog.mjs +1 -1
- package/client.cjs +1 -1
- package/client.mjs +10 -10
- package/components/accordion.cjs +1 -1
- package/components/accordion.mjs +95 -91
- package/components/calendar.cjs +1 -1
- package/components/calendar.mjs +212 -210
- package/components/chart.cjs +1 -1
- package/components/chart.d.ts +8 -3
- package/components/chart.mjs +70 -65
- package/components/combobox.cjs +1 -1
- package/components/combobox.mjs +187 -186
- package/components/dashboard.cjs +1 -1
- package/components/dashboard.d.ts +1 -44
- package/components/dashboard.mjs +202 -201
- package/components/dataGrid/components/dataGridListLayout.d.ts +1 -1
- package/components/dataGrid/contracts/dataGridContract.d.ts +1 -1
- package/components/dataGrid/models/gridModel.d.ts +1 -1
- package/components/dataGrid.cjs +2 -2
- package/components/dataGrid.mjs +10 -10
- package/components/dateField.cjs +1 -1
- package/components/dateField.mjs +96 -96
- package/components/datePicker.cjs +1 -1
- package/components/datePicker.mjs +286 -285
- package/components/dialog.cjs +1 -1
- package/components/dialog.d.ts +2 -64
- package/components/dialog.mjs +131 -126
- package/components/form.cjs +1 -1
- package/components/form.d.ts +4 -3
- package/components/form.mjs +25 -22
- package/components/menu.cjs +1 -1
- package/components/menu.d.ts +2 -73
- package/components/menu.mjs +220 -215
- package/components/overlay.cjs +1 -1
- package/components/overlay.mjs +44 -43
- package/components/popover.cjs +1 -1
- package/components/popover.d.ts +1 -41
- package/components/popover.mjs +56 -51
- package/components/presence.cjs +1 -1
- package/components/presence.mjs +1 -1
- package/components/radioGroup.cjs +1 -1
- package/components/radioGroup.mjs +59 -55
- package/components/semantics.d.ts +29 -29
- package/components/slider.cjs +1 -1
- package/components/slider.d.ts +1 -55
- package/components/slider.mjs +92 -90
- package/components/sortableList.cjs +1 -1
- package/components/sortableList.mjs +149 -148
- package/components/swipeItem.cjs +1 -1
- package/components/swipeItem.mjs +100 -100
- package/components/tabs.cjs +1 -1
- package/components/tabs.mjs +135 -132
- package/components/toaster.cjs +1 -1
- package/components/toaster.d.ts +1 -37
- package/components/toaster.mjs +130 -128
- package/components/tooltip.cjs +1 -1
- package/components/tooltip.d.ts +1 -34
- package/components/tooltip.mjs +73 -69
- package/components/virtualList.cjs +1 -1
- package/components/virtualList.mjs +88 -87
- package/docs/props.md +2 -2
- package/interactionListening.cjs +1 -1
- package/interactionListening.mjs +3 -3
- package/layer.cjs +1 -1
- package/layer.mjs +1 -1
- package/motion.cjs +1 -1
- package/motion.mjs +30 -20
- package/package.json +41 -40
- package/placement.cjs +1 -1
- package/placement.mjs +1 -1
- package/platform.cjs +1 -1
- package/platform.mjs +17 -14
- package/react/animation/useHeldContent.d.ts +6 -0
- package/react/animation/usePresence.d.ts +4 -0
- package/react/componentsContext.d.ts +1 -1
- package/react-shared.cjs +1 -1
- package/react-shared.mjs +1 -1
- package/scrolling.cjs +1 -1
- package/scrolling.mjs +1 -1
- package/utils/chart/chartUtils.d.ts +3 -2
- package/utils/dashboard/dashboardUtils.d.ts +1 -1
- package/utils/dom/domUtils.d.ts +6 -0
- package/create/src/agents.d.ts +0 -22
- package/create/src/agents.test.d.ts +0 -1
- package/create/src/index.d.ts +0 -1
- package/create/src/options.d.ts +0 -31
- package/create/src/options.test.d.ts +0 -1
- package/create/src/packageManager.d.ts +0 -5
- package/create/src/project.d.ts +0 -27
- package/create/src/project.test.d.ts +0 -1
- package/create/templates/ts/designs/azure.d.ts +0 -5
- package/create/templates/ts/designs/ember.d.ts +0 -5
- package/create/templates/ts/designs/mono.d.ts +0 -5
- package/create/templates/ts/src/App.d.ts +0 -2
- package/create/templates/ts/src/design.d.ts +0 -5
- package/create/templates/ts/src/main.d.ts +0 -0
- package/mcp/src/data.d.ts +0 -90
- package/mcp/src/data.test.d.ts +0 -1
- package/mcp/src/engine.d.ts +0 -23
- package/mcp/src/index.d.ts +0 -1
- package/mcp/src/search.d.ts +0 -38
- package/mcp/src/search.test.d.ts +0 -1
- package/mcp/src/server.d.ts +0 -18
- package/mcp/src/server.test.d.ts +0 -1
- package/mcp/src/styles.d.ts +0 -27
- package/mcp/src/styles.test.d.ts +0 -1
- package/mcp/src/tools.d.ts +0 -18
- package/mcp/src/vocabulary.d.ts +0 -41
- package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +0 -24
- package/registry/blocks/dashboard-shell/dashboard-stats.d.ts +0 -13
- package/registry/blocks/data-grid/invoice-rows.d.ts +0 -15
- package/registry/blocks/data-grid/invoices-grid.d.ts +0 -1
- package/registry/blocks/settings-form/settings-form.d.ts +0 -17
- package/registry/designs/store/address-form.d.ts +0 -11
- package/registry/designs/store/cart-items.d.ts +0 -10
- package/registry/designs/store/cart-page.d.ts +0 -4
- package/registry/designs/store/checkout-page.d.ts +0 -7
- package/registry/designs/store/credit-card-form.d.ts +0 -10
- package/registry/designs/store/form-field.d.ts +0 -19
- package/registry/designs/store/order-summary.d.ts +0 -18
- package/registry/designs/store/product-art.d.ts +0 -26
- package/registry/designs/store/product-card.d.ts +0 -11
- package/registry/designs/store/product-gallery.d.ts +0 -11
- package/registry/designs/store/product-grid.d.ts +0 -10
- package/registry/designs/store/product-page.d.ts +0 -5
- package/registry/designs/store/quantity-stepper.d.ts +0 -13
- package/registry/designs/store/shipping-method.d.ts +0 -14
- package/registry/designs/store/store-data.d.ts +0 -53
- package/registry/designs/store/store-design.d.ts +0 -63
- package/registry/designs/store/store-shell.d.ts +0 -12
- package/registry/designs/store/storefront-page.d.ts +0 -4
- package/registry/designs/store/variant-picker.d.ts +0 -15
- package/supabase/functions/collect/index.d.ts +0 -30
- package/supabase/functions/collect/index.test.d.ts +0 -1
package/components/menu.d.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
163
|
+
Sub: <TKey extends keyof ComponentsAndVariants = "menu">(props: MenuSubProps<TKey>) => React.ReactNode;
|
|
235
164
|
};
|
|
236
165
|
export default Menu;
|