@womp/kookie-ui 0.5.0 → 0.6.2
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/components.css +306 -508
- package/dist/cjs/components/_internal/base-menu.utils.d.ts +48 -0
- package/dist/cjs/components/_internal/base-menu.utils.d.ts.map +1 -0
- package/dist/cjs/components/_internal/base-menu.utils.js +2 -0
- package/dist/cjs/components/_internal/base-menu.utils.js.map +7 -0
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.d.ts +77 -59
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.d.ts.map +1 -1
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.js +1 -1
- package/dist/cjs/components/_internal/dropdown-menu-drill-down.js.map +4 -4
- package/dist/cjs/components/_internal/menu-context.d.ts +7 -3
- package/dist/cjs/components/_internal/menu-context.d.ts.map +1 -1
- package/dist/cjs/components/_internal/menu-context.js +1 -1
- package/dist/cjs/components/_internal/menu-context.js.map +4 -4
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +2 -2
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +2 -2
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +2 -2
- package/dist/cjs/components/accordion.js +1 -1
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +2 -2
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +2 -2
- package/dist/cjs/components/blockquote.js +1 -1
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +2 -2
- package/dist/cjs/components/callout.js +1 -1
- package/dist/cjs/components/callout.js.map +2 -2
- package/dist/cjs/components/card.js +1 -1
- package/dist/cjs/components/card.js.map +2 -2
- package/dist/cjs/components/chatbar.d.ts +46 -44
- package/dist/cjs/components/chatbar.d.ts.map +1 -1
- package/dist/cjs/components/chatbar.js +2 -2
- package/dist/cjs/components/chatbar.js.map +3 -3
- package/dist/cjs/components/checkbox-cards.js +1 -1
- package/dist/cjs/components/checkbox-cards.js.map +2 -2
- package/dist/cjs/components/checkbox-group.js +1 -1
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/combobox.d.ts +28 -15
- package/dist/cjs/components/combobox.d.ts.map +1 -1
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +4 -4
- package/dist/cjs/components/combobox.props.d.ts +48 -0
- package/dist/cjs/components/combobox.props.d.ts.map +1 -1
- package/dist/cjs/components/combobox.props.js +1 -1
- package/dist/cjs/components/combobox.props.js.map +4 -4
- package/dist/cjs/components/context-menu.d.ts +18 -5
- package/dist/cjs/components/context-menu.d.ts.map +1 -1
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +4 -4
- package/dist/cjs/components/context-menu.props.d.ts +1 -1
- package/dist/cjs/components/context-menu.props.d.ts.map +1 -1
- package/dist/cjs/components/context-menu.props.js +1 -1
- package/dist/cjs/components/context-menu.props.js.map +3 -3
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +2 -2
- package/dist/cjs/components/dropdown-menu.d.ts +11 -18
- package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +4 -4
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/hover-card.js +1 -1
- package/dist/cjs/components/hover-card.js.map +2 -2
- package/dist/cjs/components/icon-button.js +1 -1
- package/dist/cjs/components/icon-button.js.map +2 -2
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +2 -2
- package/dist/cjs/components/radio-cards.js +1 -1
- package/dist/cjs/components/radio-cards.js.map +2 -2
- package/dist/cjs/components/radio.js +1 -1
- package/dist/cjs/components/radio.js.map +2 -2
- package/dist/cjs/components/schemas/base-button.schema.d.ts +111 -256
- package/dist/cjs/components/schemas/base-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/button.schema.d.ts +136 -557
- package/dist/cjs/components/schemas/button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/icon-button.schema.d.ts +123 -240
- package/dist/cjs/components/schemas/icon-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +2 -2
- package/dist/cjs/components/schemas/shell.schema.d.ts +592 -851
- package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/shell.schema.js +1 -1
- package/dist/cjs/components/schemas/shell.schema.js.map +2 -2
- package/dist/cjs/components/schemas/toggle-button.schema.d.ts +138 -1026
- package/dist/cjs/components/schemas/toggle-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts +124 -465
- package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/scroll-area.js +1 -1
- package/dist/cjs/components/segmented-control.js +1 -1
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +2 -2
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +2 -2
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +3 -3
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/slider.js +1 -1
- package/dist/cjs/components/slot.d.ts +6 -2
- package/dist/cjs/components/slot.d.ts.map +1 -1
- package/dist/cjs/components/switch.js +1 -1
- package/dist/cjs/components/tab-nav.js +1 -1
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/theme-panel.js +3 -3
- package/dist/cjs/components/theme-panel.js.map +2 -2
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +2 -2
- package/dist/cjs/components/theme.props.d.ts +1 -1
- package/dist/cjs/components/theme.props.js +1 -1
- package/dist/cjs/components/theme.props.js.map +2 -2
- package/dist/cjs/components/toggle-button.js +1 -1
- package/dist/cjs/components/toggle-button.js.map +2 -2
- package/dist/cjs/components/toggle-icon-button.js +1 -1
- package/dist/cjs/components/toggle-icon-button.js.map +2 -2
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +2 -2
- package/dist/cjs/components/user-card.js +1 -1
- package/dist/cjs/components/user-card.js.map +2 -2
- package/dist/cjs/components/virtual-menu.d.ts.map +1 -1
- package/dist/cjs/components/virtual-menu.js +1 -1
- package/dist/cjs/components/virtual-menu.js.map +4 -4
- package/dist/cjs/helpers/extract-props.js +1 -1
- package/dist/cjs/helpers/extract-props.js.map +2 -2
- package/dist/cjs/helpers/get-margin-styles.js +1 -1
- package/dist/cjs/helpers/get-margin-styles.js.map +2 -2
- package/dist/cjs/hooks/use-breakpoint.d.ts +4 -1
- package/dist/cjs/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/cjs/hooks/use-breakpoint.js +1 -1
- package/dist/cjs/hooks/use-breakpoint.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +3 -3
- package/dist/esm/{chunk-P7HYVJSU.js → chunk-2TIADHPD.js} +2 -2
- package/dist/esm/chunk-37OGSEQR.js +2 -0
- package/dist/esm/chunk-37OGSEQR.js.map +7 -0
- package/dist/esm/{chunk-RMKXWYOV.js → chunk-3OBXZUFJ.js} +2 -2
- package/dist/esm/{chunk-S2HA3W3V.js → chunk-3R7XMRV5.js} +2 -2
- package/dist/esm/chunk-4SMJ7D4S.js +2 -0
- package/dist/esm/chunk-4SMJ7D4S.js.map +7 -0
- package/dist/esm/{chunk-S56YSRHP.js → chunk-56TS6OKQ.js} +2 -2
- package/dist/esm/{chunk-2FYJTSOP.js → chunk-5BYHEYO6.js} +2 -2
- package/dist/esm/{chunk-B24BDVG2.js → chunk-5MNBQROW.js} +2 -2
- package/dist/esm/{chunk-W7N7V5YD.js → chunk-7ESHXHHO.js} +2 -2
- package/dist/esm/{chunk-CRWYCLTE.js → chunk-ABSKRHVM.js} +2 -2
- package/dist/esm/chunk-ADBLURLJ.js +2 -0
- package/dist/esm/chunk-ADBLURLJ.js.map +7 -0
- package/dist/esm/{chunk-3MWWP4MW.js → chunk-BBJUB52V.js} +2 -2
- package/dist/esm/{chunk-PTLFMWCN.js → chunk-CQNPBTM5.js} +2 -2
- package/dist/esm/{chunk-GJSGKE7B.js → chunk-CTA5ODAO.js} +2 -2
- package/dist/esm/{chunk-GWXVETMF.js → chunk-DCAZPMOB.js} +2 -2
- package/dist/esm/{chunk-PLWXTEVE.js → chunk-DMJJM5IS.js} +2 -2
- package/dist/esm/{chunk-A2RZGGMY.js → chunk-DQAUX5ZL.js} +2 -2
- package/dist/esm/{chunk-6XGZPIUT.js → chunk-DX5JJYMZ.js} +2 -2
- package/dist/esm/{chunk-6XGZPIUT.js.map → chunk-DX5JJYMZ.js.map} +2 -2
- package/dist/esm/{chunk-YUP6EICB.js → chunk-DXL6V2A5.js} +2 -2
- package/dist/esm/{chunk-XMRIRFM7.js → chunk-FG7XM7KJ.js} +2 -2
- package/dist/esm/{chunk-IKSN4RNB.js → chunk-FIB3XATL.js} +3 -3
- package/dist/esm/chunk-FMBECDL4.js +2 -0
- package/dist/esm/{chunk-4XJY6FIK.js.map → chunk-FMBECDL4.js.map} +3 -3
- package/dist/esm/{chunk-374ZYJUP.js → chunk-HBR42MIX.js} +2 -2
- package/dist/esm/{chunk-2UPAYDKR.js → chunk-HIKVMKYQ.js} +2 -2
- package/dist/esm/{chunk-VX6ARMWP.js → chunk-HSAG7C53.js} +2 -2
- package/dist/esm/{chunk-OSRJRBKP.js → chunk-HW324FK3.js} +2 -2
- package/dist/esm/{chunk-DNHUQLXO.js → chunk-JBO5YOUM.js} +2 -2
- package/dist/esm/{chunk-HF5WY5YE.js → chunk-JGLAE5G7.js} +2 -2
- package/dist/esm/{chunk-4YFJWXL2.js → chunk-JJKQ7CGI.js} +2 -2
- package/dist/esm/chunk-JSW6J6RS.js +2 -0
- package/dist/esm/chunk-JSW6J6RS.js.map +7 -0
- package/dist/esm/chunk-KRDP5SQ7.js +2 -0
- package/dist/esm/chunk-KRDP5SQ7.js.map +7 -0
- package/dist/esm/{chunk-CWRNW44F.js → chunk-L6PVH3RM.js} +2 -2
- package/dist/esm/{chunk-MK2R6DAU.js → chunk-LAOMR7SE.js} +2 -2
- package/dist/esm/{chunk-FHOCUZDR.js → chunk-NIQT45PJ.js} +2 -2
- package/dist/esm/chunk-NKEJTTIL.js +2 -0
- package/dist/esm/chunk-NKEJTTIL.js.map +7 -0
- package/dist/esm/chunk-NVDXXGVW.js +2 -0
- package/dist/esm/chunk-NVDXXGVW.js.map +7 -0
- package/dist/esm/chunk-OS3FCYZY.js +2 -0
- package/dist/esm/{chunk-7QDTSBJF.js → chunk-OYF6YXH7.js} +2 -2
- package/dist/esm/{chunk-WFMYNZXZ.js → chunk-P5OSU4NX.js} +2 -2
- package/dist/esm/{chunk-QEOAXJLN.js → chunk-PTS6QYQW.js} +2 -2
- package/dist/esm/{chunk-CVWCKOHO.js → chunk-RLPKKCBL.js} +2 -2
- package/dist/esm/{chunk-LKAK5GXF.js → chunk-SPIU5JYC.js} +2 -2
- package/dist/esm/chunk-SZTZ2XLI.js +2 -0
- package/dist/esm/chunk-SZTZ2XLI.js.map +7 -0
- package/dist/esm/chunk-T2FZN7G3.js +2 -0
- package/dist/esm/chunk-T2FZN7G3.js.map +7 -0
- package/dist/esm/{chunk-4AQTUBVP.js → chunk-T4UHUQFJ.js} +2 -2
- package/dist/esm/{chunk-K6QZMNCD.js → chunk-TS623UPD.js} +2 -2
- package/dist/esm/{chunk-YV2KYHGR.js → chunk-UBOOUDS4.js} +2 -2
- package/dist/esm/{chunk-D6B7IMZU.js → chunk-UFI53QUC.js} +2 -2
- package/dist/esm/{chunk-AU3D6F42.js → chunk-UIRSGVJG.js} +2 -2
- package/dist/esm/{chunk-FXUUI6Z2.js → chunk-UUUZXUIP.js} +2 -2
- package/dist/esm/{chunk-25WZA7ZU.js → chunk-VA4CTVQL.js} +2 -2
- package/dist/esm/{chunk-TOLLPRMM.js → chunk-VNPNEJI6.js} +2 -2
- package/dist/esm/{chunk-6IGTK4JE.js → chunk-YMUGKYGW.js} +2 -2
- package/dist/esm/chunk-ZWYYPFZW.js +2 -0
- package/dist/esm/chunk-ZWYYPFZW.js.map +7 -0
- package/dist/esm/{chunk-M24UXMOQ.js → chunk-ZXZOH63L.js} +2 -2
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.props.js +1 -1
- package/dist/esm/components/_internal/base-checkbox.props.js +1 -1
- package/dist/esm/components/_internal/base-menu.props.js +1 -1
- package/dist/esm/components/_internal/base-menu.utils.d.ts +48 -0
- package/dist/esm/components/_internal/base-menu.utils.d.ts.map +1 -0
- package/dist/esm/components/_internal/base-menu.utils.js +2 -0
- package/dist/esm/components/_internal/base-menu.utils.js.map +7 -0
- package/dist/esm/components/_internal/base-radio.props.js +1 -1
- package/dist/esm/components/_internal/base-tab-list.props.js +1 -1
- package/dist/esm/components/_internal/dropdown-menu-drill-down.d.ts +77 -59
- package/dist/esm/components/_internal/dropdown-menu-drill-down.d.ts.map +1 -1
- package/dist/esm/components/_internal/dropdown-menu-drill-down.js +1 -1
- package/dist/esm/components/_internal/menu-context.d.ts +7 -3
- package/dist/esm/components/_internal/menu-context.d.ts.map +1 -1
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-handles.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-prop-helpers.js +1 -1
- package/dist/esm/components/_internal/shell-resize.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accessible-icon.js +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/accordion.props.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/alert-dialog.props.js +1 -1
- package/dist/esm/components/aspect-ratio.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/avatar.props.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/badge.props.js +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/blockquote.props.js +1 -1
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/box.props.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.props.js +1 -1
- package/dist/esm/components/callout.js +1 -1
- package/dist/esm/components/callout.props.js +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/card.props.js +1 -1
- package/dist/esm/components/chatbar.d.ts +46 -44
- package/dist/esm/components/chatbar.d.ts.map +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/checkbox-cards.props.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox-group.primitive.js +1 -1
- package/dist/esm/components/checkbox-group.props.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.props.js +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/code.props.js +1 -1
- package/dist/esm/components/combobox.d.ts +28 -15
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.props.d.ts +48 -0
- package/dist/esm/components/combobox.props.d.ts.map +1 -1
- package/dist/esm/components/combobox.props.js +1 -1
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.props.js +1 -1
- package/dist/esm/components/context-menu.d.ts +18 -5
- package/dist/esm/components/context-menu.d.ts.map +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/context-menu.props.d.ts +1 -1
- package/dist/esm/components/context-menu.props.d.ts.map +1 -1
- package/dist/esm/components/context-menu.props.js +1 -1
- package/dist/esm/components/data-list.js +1 -1
- package/dist/esm/components/data-list.props.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.props.js +1 -1
- package/dist/esm/components/dropdown-menu.d.ts +11 -18
- package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/dropdown-menu.props.js +1 -1
- package/dist/esm/components/em.js +1 -1
- package/dist/esm/components/em.props.js +1 -1
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/flex.props.js +1 -1
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/grid.props.js +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/heading.props.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/hover-card.props.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/icon-button.props.js +1 -1
- package/dist/esm/components/icons.js +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/image.props.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/inset.js +1 -1
- package/dist/esm/components/inset.props.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/kbd.props.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/link.props.js +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/navbar.props.js +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.props.js +1 -1
- package/dist/esm/components/portal.js +1 -1
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/progress.props.js +1 -1
- package/dist/esm/components/quote.js +1 -1
- package/dist/esm/components/quote.props.js +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/radio-cards.props.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio-group.props.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/radio.props.js +1 -1
- package/dist/esm/components/reset.js +1 -1
- package/dist/esm/components/schemas/base-button.schema.d.ts +111 -256
- package/dist/esm/components/schemas/base-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/base-button.schema.js +1 -1
- package/dist/esm/components/schemas/button.schema.d.ts +136 -557
- package/dist/esm/components/schemas/button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/button.schema.js +1 -1
- package/dist/esm/components/schemas/icon-button.schema.d.ts +123 -240
- package/dist/esm/components/schemas/icon-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/icon-button.schema.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/shell.schema.d.ts +592 -851
- package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/shell.schema.js +1 -1
- package/dist/esm/components/schemas/toggle-button.schema.d.ts +138 -1026
- package/dist/esm/components/schemas/toggle-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/toggle-button.schema.js +1 -1
- package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts +124 -465
- package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/toggle-icon-button.schema.js +1 -1
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/scroll-area.props.js +1 -1
- package/dist/esm/components/section.js +1 -1
- package/dist/esm/components/section.props.js +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/segmented-control.props.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/select.props.js +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/separator.props.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.hooks.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/shell.types.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/sidebar.props.js +1 -1
- package/dist/esm/components/skeleton.js +1 -1
- package/dist/esm/components/skeleton.props.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/slider.props.js +1 -1
- package/dist/esm/components/slot.d.ts +6 -2
- package/dist/esm/components/slot.d.ts.map +1 -1
- package/dist/esm/components/slot.js +1 -1
- package/dist/esm/components/spinner.js +1 -1
- package/dist/esm/components/spinner.props.js +1 -1
- package/dist/esm/components/strong.js +1 -1
- package/dist/esm/components/strong.props.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/switch.props.js +1 -1
- package/dist/esm/components/tab-nav.js +1 -1
- package/dist/esm/components/tab-nav.props.js +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/table.props.js +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.props.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-area.props.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text-field.props.js +1 -1
- package/dist/esm/components/text.js +1 -1
- package/dist/esm/components/text.props.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.props.d.ts +1 -1
- package/dist/esm/components/theme.props.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/tooltip.props.js +1 -1
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/components/user-card.props.js +1 -1
- package/dist/esm/components/virtual-menu.d.ts.map +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/components/visually-hidden.js +1 -1
- package/dist/esm/helpers/compile-prop-defs.js +1 -1
- package/dist/esm/helpers/extract-margin-props.js +1 -1
- package/dist/esm/helpers/extract-props.js +1 -1
- package/dist/esm/helpers/font-config.js +1 -1
- package/dist/esm/helpers/get-margin-styles.js +1 -1
- package/dist/esm/helpers/get-matching-gray-color.js +1 -1
- package/dist/esm/helpers/get-responsive-styles.js +1 -1
- package/dist/esm/helpers/get-subtree.js +1 -1
- package/dist/esm/helpers/has-own-property.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/inert.js +1 -1
- package/dist/esm/helpers/is-responsive-object.js +1 -1
- package/dist/esm/helpers/map-prop-values.js +1 -1
- package/dist/esm/helpers/merge-styles.js +1 -1
- package/dist/esm/helpers/normalize-to-px.js +1 -1
- package/dist/esm/helpers/require-react-element.js +1 -1
- package/dist/esm/helpers/use-deprecation-warning.js +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/hooks/use-body-pointer-events-cleanup.js +1 -1
- package/dist/esm/hooks/use-breakpoint.d.ts +4 -1
- package/dist/esm/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/esm/hooks/use-breakpoint.js +1 -1
- package/dist/esm/hooks/use-live-announcer.js +1 -1
- package/dist/esm/hooks/use-prop-synced-state.js +1 -1
- package/dist/esm/hooks/use-toggle-state.js +1 -1
- package/dist/esm/hooks/use-tooltip-wrapper.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/as-child.prop.js +1 -1
- package/dist/esm/props/color.prop.js +1 -1
- package/dist/esm/props/font-family.prop.js +1 -1
- package/dist/esm/props/gap.props.js +1 -1
- package/dist/esm/props/height.props.js +1 -1
- package/dist/esm/props/high-contrast.prop.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/dist/esm/props/layout.props.js +1 -1
- package/dist/esm/props/leading-trim.prop.js +1 -1
- package/dist/esm/props/margin.props.js +1 -1
- package/dist/esm/props/padding.props.js +1 -1
- package/dist/esm/props/prop-def.js +1 -1
- package/dist/esm/props/radius.prop.js +1 -1
- package/dist/esm/props/shadow.props.js +1 -1
- package/dist/esm/props/text-align.prop.js +1 -1
- package/dist/esm/props/text-wrap.prop.js +1 -1
- package/dist/esm/props/truncate.prop.js +1 -1
- package/dist/esm/props/weight.prop.js +1 -1
- package/dist/esm/props/width.props.js +1 -1
- package/fonts.css +2 -0
- package/package.json +36 -36
- package/schemas/base-button.json +66 -60
- package/schemas/button.json +80 -74
- package/schemas/icon-button.json +78 -72
- package/schemas/index.json +390 -360
- package/schemas/toggle-button.json +84 -78
- package/schemas/toggle-icon-button.json +82 -76
- package/src/components/_internal/base-menu.css +65 -140
- package/src/components/_internal/base-menu.utils.tsx +144 -0
- package/src/components/_internal/dropdown-menu-drill-down.tsx +281 -183
- package/src/components/_internal/menu-context.tsx +24 -15
- package/src/components/chatbar.css +94 -26
- package/src/components/chatbar.tsx +739 -735
- package/src/components/combobox.css +62 -115
- package/src/components/combobox.props.tsx +14 -0
- package/src/components/combobox.tsx +440 -212
- package/src/components/context-menu.props.tsx +4 -1
- package/src/components/context-menu.tsx +108 -62
- package/src/components/dropdown-menu.css +41 -121
- package/src/components/dropdown-menu.tsx +430 -275
- package/src/components/schemas/shell.schema.ts +11 -18
- package/src/components/scroll-area.css +2 -3
- package/src/components/theme.props.tsx +1 -1
- package/src/components/virtual-menu.tsx +12 -8
- package/src/hooks/use-breakpoint.ts +19 -3
- package/src/styles/fonts.css +6 -1
- package/src/styles/tokens/font-family.css +13 -5
- package/styles.css +307 -509
- package/tokens/base.css +1 -1
- package/tokens.css +1 -1
- package/dist/esm/chunk-3XT5P2HO.js +0 -2
- package/dist/esm/chunk-4XJY6FIK.js +0 -2
- package/dist/esm/chunk-4Z33XHOK.js +0 -2
- package/dist/esm/chunk-4Z33XHOK.js.map +0 -7
- package/dist/esm/chunk-E2Z5IA2P.js +0 -2
- package/dist/esm/chunk-E2Z5IA2P.js.map +0 -7
- package/dist/esm/chunk-HVWEPVBH.js +0 -2
- package/dist/esm/chunk-HVWEPVBH.js.map +0 -7
- package/dist/esm/chunk-KKBP2CRH.js +0 -2
- package/dist/esm/chunk-KKBP2CRH.js.map +0 -7
- package/dist/esm/chunk-MOR3NSXQ.js +0 -2
- package/dist/esm/chunk-MOR3NSXQ.js.map +0 -7
- package/dist/esm/chunk-QCNUTT4R.js +0 -2
- package/dist/esm/chunk-QCNUTT4R.js.map +0 -7
- package/dist/esm/chunk-UGD7Z3L4.js +0 -2
- package/dist/esm/chunk-UGD7Z3L4.js.map +0 -7
- package/dist/esm/chunk-YEB3H7QN.js +0 -2
- package/dist/esm/chunk-YEB3H7QN.js.map +0 -7
- package/dist/esm/chunk-ZY6SQWHT.js +0 -2
- package/dist/esm/chunk-ZY6SQWHT.js.map +0 -7
- /package/dist/esm/{chunk-P7HYVJSU.js.map → chunk-2TIADHPD.js.map} +0 -0
- /package/dist/esm/{chunk-RMKXWYOV.js.map → chunk-3OBXZUFJ.js.map} +0 -0
- /package/dist/esm/{chunk-S2HA3W3V.js.map → chunk-3R7XMRV5.js.map} +0 -0
- /package/dist/esm/{chunk-S56YSRHP.js.map → chunk-56TS6OKQ.js.map} +0 -0
- /package/dist/esm/{chunk-2FYJTSOP.js.map → chunk-5BYHEYO6.js.map} +0 -0
- /package/dist/esm/{chunk-B24BDVG2.js.map → chunk-5MNBQROW.js.map} +0 -0
- /package/dist/esm/{chunk-W7N7V5YD.js.map → chunk-7ESHXHHO.js.map} +0 -0
- /package/dist/esm/{chunk-CRWYCLTE.js.map → chunk-ABSKRHVM.js.map} +0 -0
- /package/dist/esm/{chunk-3MWWP4MW.js.map → chunk-BBJUB52V.js.map} +0 -0
- /package/dist/esm/{chunk-PTLFMWCN.js.map → chunk-CQNPBTM5.js.map} +0 -0
- /package/dist/esm/{chunk-GJSGKE7B.js.map → chunk-CTA5ODAO.js.map} +0 -0
- /package/dist/esm/{chunk-GWXVETMF.js.map → chunk-DCAZPMOB.js.map} +0 -0
- /package/dist/esm/{chunk-PLWXTEVE.js.map → chunk-DMJJM5IS.js.map} +0 -0
- /package/dist/esm/{chunk-A2RZGGMY.js.map → chunk-DQAUX5ZL.js.map} +0 -0
- /package/dist/esm/{chunk-YUP6EICB.js.map → chunk-DXL6V2A5.js.map} +0 -0
- /package/dist/esm/{chunk-XMRIRFM7.js.map → chunk-FG7XM7KJ.js.map} +0 -0
- /package/dist/esm/{chunk-IKSN4RNB.js.map → chunk-FIB3XATL.js.map} +0 -0
- /package/dist/esm/{chunk-374ZYJUP.js.map → chunk-HBR42MIX.js.map} +0 -0
- /package/dist/esm/{chunk-2UPAYDKR.js.map → chunk-HIKVMKYQ.js.map} +0 -0
- /package/dist/esm/{chunk-VX6ARMWP.js.map → chunk-HSAG7C53.js.map} +0 -0
- /package/dist/esm/{chunk-OSRJRBKP.js.map → chunk-HW324FK3.js.map} +0 -0
- /package/dist/esm/{chunk-DNHUQLXO.js.map → chunk-JBO5YOUM.js.map} +0 -0
- /package/dist/esm/{chunk-HF5WY5YE.js.map → chunk-JGLAE5G7.js.map} +0 -0
- /package/dist/esm/{chunk-4YFJWXL2.js.map → chunk-JJKQ7CGI.js.map} +0 -0
- /package/dist/esm/{chunk-CWRNW44F.js.map → chunk-L6PVH3RM.js.map} +0 -0
- /package/dist/esm/{chunk-MK2R6DAU.js.map → chunk-LAOMR7SE.js.map} +0 -0
- /package/dist/esm/{chunk-FHOCUZDR.js.map → chunk-NIQT45PJ.js.map} +0 -0
- /package/dist/esm/{chunk-3XT5P2HO.js.map → chunk-OS3FCYZY.js.map} +0 -0
- /package/dist/esm/{chunk-7QDTSBJF.js.map → chunk-OYF6YXH7.js.map} +0 -0
- /package/dist/esm/{chunk-WFMYNZXZ.js.map → chunk-P5OSU4NX.js.map} +0 -0
- /package/dist/esm/{chunk-QEOAXJLN.js.map → chunk-PTS6QYQW.js.map} +0 -0
- /package/dist/esm/{chunk-CVWCKOHO.js.map → chunk-RLPKKCBL.js.map} +0 -0
- /package/dist/esm/{chunk-LKAK5GXF.js.map → chunk-SPIU5JYC.js.map} +0 -0
- /package/dist/esm/{chunk-4AQTUBVP.js.map → chunk-T4UHUQFJ.js.map} +0 -0
- /package/dist/esm/{chunk-K6QZMNCD.js.map → chunk-TS623UPD.js.map} +0 -0
- /package/dist/esm/{chunk-YV2KYHGR.js.map → chunk-UBOOUDS4.js.map} +0 -0
- /package/dist/esm/{chunk-D6B7IMZU.js.map → chunk-UFI53QUC.js.map} +0 -0
- /package/dist/esm/{chunk-AU3D6F42.js.map → chunk-UIRSGVJG.js.map} +0 -0
- /package/dist/esm/{chunk-FXUUI6Z2.js.map → chunk-UUUZXUIP.js.map} +0 -0
- /package/dist/esm/{chunk-25WZA7ZU.js.map → chunk-VA4CTVQL.js.map} +0 -0
- /package/dist/esm/{chunk-TOLLPRMM.js.map → chunk-VNPNEJI6.js.map} +0 -0
- /package/dist/esm/{chunk-6IGTK4JE.js.map → chunk-YMUGKYGW.js.map} +0 -0
- /package/dist/esm/{chunk-M24UXMOQ.js.map → chunk-ZXZOH63L.js.map} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export {
|
|
2
|
-
|
|
2
|
+
// ContextMenu has no drill-down mode, so its content uses the shared
|
|
3
|
+
// surface props without `submenuBehavior`.
|
|
4
|
+
baseMenuSubContentPropDefs as contextMenuContentPropDefs,
|
|
5
|
+
baseMenuSubContentPropDefs as contextMenuSubContentPropDefs,
|
|
3
6
|
baseMenuItemPropDefs as contextMenuItemPropDefs,
|
|
4
7
|
baseMenuCheckboxItemPropDefs as contextMenuCheckboxItemPropDefs,
|
|
5
8
|
baseMenuRadioItemPropDefs as contextMenuRadioItemPropDefs,
|
|
@@ -11,19 +11,27 @@ import { ContextMenu as ContextMenuPrimitive, Slot } from 'radix-ui';
|
|
|
11
11
|
import { ScrollArea } from './scroll-area.js';
|
|
12
12
|
import {
|
|
13
13
|
contextMenuContentPropDefs,
|
|
14
|
+
contextMenuSubContentPropDefs,
|
|
14
15
|
contextMenuItemPropDefs,
|
|
15
16
|
contextMenuCheckboxItemPropDefs,
|
|
16
17
|
contextMenuRadioItemPropDefs,
|
|
17
18
|
} from './context-menu.props.js';
|
|
18
19
|
import { Theme, useThemeContext } from './theme.js';
|
|
19
|
-
import { ThickCheckIcon, ThickChevronRightIcon } from './icons.js';
|
|
20
|
+
import { ThickCheckIcon, ThickChevronRightIcon, ThickDotIcon } from './icons.js';
|
|
20
21
|
import { extractProps } from '../helpers/extract-props.js';
|
|
21
22
|
import { requireReactElement } from '../helpers/require-react-element.js';
|
|
22
|
-
import {
|
|
23
|
+
import { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';
|
|
24
|
+
import { MenuProvider } from './_internal/menu-context.js';
|
|
25
|
+
import {
|
|
26
|
+
MenuShortcut,
|
|
27
|
+
getMenuAlignOffset,
|
|
28
|
+
resolveMenuMaterial,
|
|
29
|
+
toAriaKeyShortcuts,
|
|
30
|
+
useResolvedResponsiveValue,
|
|
31
|
+
} from './_internal/base-menu.utils.js';
|
|
23
32
|
|
|
24
33
|
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
25
|
-
import type { GetPropDefTypes } from '../props/prop-def.js';
|
|
26
|
-
import { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';
|
|
34
|
+
import type { GetPropDefTypes, Responsive } from '../props/prop-def.js';
|
|
27
35
|
|
|
28
36
|
interface ContextMenuRootProps
|
|
29
37
|
extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Root> {}
|
|
@@ -44,14 +52,31 @@ const ContextMenuTrigger = React.forwardRef<ContextMenuTriggerElement, ContextMe
|
|
|
44
52
|
);
|
|
45
53
|
ContextMenuTrigger.displayName = 'ContextMenu.Trigger';
|
|
46
54
|
|
|
47
|
-
|
|
48
|
-
type
|
|
55
|
+
/** Visual props shared by Content and SubContent. */
|
|
56
|
+
type ContextMenuSurfaceProps = GetPropDefTypes<typeof contextMenuContentPropDefs>;
|
|
57
|
+
|
|
58
|
+
type ContextMenuContentContextValue = {
|
|
59
|
+
size?: ContextMenuSurfaceProps['size'];
|
|
60
|
+
variant?: ContextMenuSurfaceProps['variant'];
|
|
61
|
+
color?: ContextMenuSurfaceProps['color'];
|
|
62
|
+
highContrast?: ContextMenuSurfaceProps['highContrast'];
|
|
63
|
+
material?: ContextMenuSurfaceProps['material'];
|
|
64
|
+
};
|
|
49
65
|
const ContextMenuContentContext = React.createContext<ContextMenuContentContextValue>({});
|
|
50
66
|
type ContextMenuContentElement = React.ElementRef<typeof ContextMenuPrimitive.Content>;
|
|
51
67
|
interface ContextMenuContentProps
|
|
52
68
|
extends ComponentPropsWithout<typeof ContextMenuPrimitive.Content, RemovedProps>,
|
|
53
|
-
|
|
69
|
+
ContextMenuSurfaceProps {
|
|
54
70
|
container?: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Portal>['container'];
|
|
71
|
+
/**
|
|
72
|
+
* When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.
|
|
73
|
+
* Use this when rendering virtualized lists inside the context menu.
|
|
74
|
+
*/
|
|
75
|
+
virtualized?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated Has no effect. ContextMenu submenus always cascade.
|
|
78
|
+
*/
|
|
79
|
+
submenuBehavior?: Responsive<'cascade' | 'drill-down'>;
|
|
55
80
|
}
|
|
56
81
|
const ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(
|
|
57
82
|
(props, forwardedRef) => {
|
|
@@ -59,24 +84,11 @@ const ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMe
|
|
|
59
84
|
|
|
60
85
|
useDeprecatedPanelBackgroundWarning(props.panelBackground);
|
|
61
86
|
|
|
62
|
-
|
|
63
|
-
const effectiveMaterial =
|
|
64
|
-
props.material ?? props.panelBackground ?? themeContext.panelBackground;
|
|
65
|
-
|
|
66
|
-
// Memoize theme context values to prevent unnecessary re-renders
|
|
67
|
-
const memoizedThemeContext = React.useMemo(
|
|
68
|
-
() => ({
|
|
69
|
-
material: effectiveMaterial,
|
|
70
|
-
accentColor: themeContext.accentColor,
|
|
71
|
-
}),
|
|
72
|
-
[effectiveMaterial, themeContext.accentColor],
|
|
73
|
-
);
|
|
74
|
-
|
|
87
|
+
const material = resolveMenuMaterial(props.material, props.panelBackground, themeContext);
|
|
75
88
|
const {
|
|
76
89
|
size = contextMenuContentPropDefs.size.default,
|
|
77
90
|
variant = contextMenuContentPropDefs.variant.default,
|
|
78
91
|
highContrast = contextMenuContentPropDefs.highContrast.default,
|
|
79
|
-
material = memoizedThemeContext.material,
|
|
80
92
|
} = props;
|
|
81
93
|
const {
|
|
82
94
|
className,
|
|
@@ -84,16 +96,27 @@ const ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMe
|
|
|
84
96
|
color,
|
|
85
97
|
container,
|
|
86
98
|
forceMount,
|
|
87
|
-
material:
|
|
88
|
-
panelBackground:
|
|
99
|
+
material: _material,
|
|
100
|
+
panelBackground: _panelBackground,
|
|
101
|
+
submenuBehavior: _submenuBehavior,
|
|
102
|
+
virtualized = false,
|
|
89
103
|
...contentProps
|
|
90
104
|
} = extractProps(props, contextMenuContentPropDefs);
|
|
91
105
|
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
106
|
+
const resolvedColor = color || themeContext.accentColor;
|
|
107
|
+
const scalarSize = useResolvedResponsiveValue(size, contextMenuContentPropDefs.size.default);
|
|
108
|
+
|
|
109
|
+
const contextValue = React.useMemo(
|
|
110
|
+
() => ({ size, variant, color: resolvedColor, highContrast, material }),
|
|
111
|
+
[size, variant, resolvedColor, highContrast, material],
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
const body = (
|
|
115
|
+
<MenuProvider size={size}>
|
|
116
|
+
<ContextMenuContentContext.Provider value={contextValue}>{children}</ContextMenuContentContext.Provider>
|
|
117
|
+
</MenuProvider>
|
|
96
118
|
);
|
|
119
|
+
|
|
97
120
|
return (
|
|
98
121
|
<ContextMenuPrimitive.Portal container={container} forceMount={forceMount}>
|
|
99
122
|
<Theme asChild>
|
|
@@ -101,7 +124,7 @@ const ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMe
|
|
|
101
124
|
data-accent-color={resolvedColor}
|
|
102
125
|
data-material={material}
|
|
103
126
|
data-panel-background={material}
|
|
104
|
-
alignOffset={
|
|
127
|
+
alignOffset={getMenuAlignOffset(scalarSize, themeContext.scaling)}
|
|
105
128
|
collisionPadding={10}
|
|
106
129
|
{...contentProps}
|
|
107
130
|
asChild={false}
|
|
@@ -113,18 +136,15 @@ const ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMe
|
|
|
113
136
|
className,
|
|
114
137
|
)}
|
|
115
138
|
>
|
|
116
|
-
|
|
117
|
-
<div className={classNames('rt-BaseMenuViewport', 'rt-ContextMenuViewport')}>
|
|
118
|
-
|
|
119
|
-
value={React.useMemo(
|
|
120
|
-
() => ({ size, variant, color: resolvedColor, highContrast, material }),
|
|
121
|
-
[size, variant, resolvedColor, highContrast, material],
|
|
122
|
-
)}
|
|
123
|
-
>
|
|
124
|
-
{children}
|
|
125
|
-
</ContextMenuContentContext.Provider>
|
|
139
|
+
{virtualized ? (
|
|
140
|
+
<div className={classNames('rt-BaseMenuViewport', 'rt-ContextMenuViewport', 'rt-virtualized')}>
|
|
141
|
+
{body}
|
|
126
142
|
</div>
|
|
127
|
-
|
|
143
|
+
) : (
|
|
144
|
+
<ScrollArea type="auto" scrollbars="vertical">
|
|
145
|
+
<div className={classNames('rt-BaseMenuViewport', 'rt-ContextMenuViewport')}>{body}</div>
|
|
146
|
+
</ScrollArea>
|
|
147
|
+
)}
|
|
128
148
|
</ContextMenuPrimitive.Content>
|
|
129
149
|
</Theme>
|
|
130
150
|
</ContextMenuPrimitive.Portal>
|
|
@@ -165,16 +185,13 @@ const ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItem
|
|
|
165
185
|
return (
|
|
166
186
|
<ContextMenuPrimitive.Item
|
|
167
187
|
data-accent-color={color}
|
|
188
|
+
aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}
|
|
168
189
|
{...itemProps}
|
|
169
190
|
ref={forwardedRef}
|
|
170
191
|
className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-ContextMenuItem', className)}
|
|
171
192
|
>
|
|
172
193
|
<Slot.Slottable>{children}</Slot.Slottable>
|
|
173
|
-
{shortcut &&
|
|
174
|
-
<div className="rt-BaseMenuShortcut rt-ContextMenuShortcut">
|
|
175
|
-
<Kbd size="1">{shortcut}</Kbd>
|
|
176
|
-
</div>
|
|
177
|
-
)}
|
|
194
|
+
{shortcut && <MenuShortcut shortcut={shortcut} className="rt-ContextMenuShortcut" />}
|
|
178
195
|
</ContextMenuPrimitive.Item>
|
|
179
196
|
);
|
|
180
197
|
},
|
|
@@ -243,7 +260,7 @@ const ContextMenuRadioItem = React.forwardRef<
|
|
|
243
260
|
>
|
|
244
261
|
<Slot.Slottable>{children}</Slot.Slottable>
|
|
245
262
|
<ContextMenuPrimitive.ItemIndicator className="rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator">
|
|
246
|
-
<
|
|
263
|
+
<ThickDotIcon className="rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon" />
|
|
247
264
|
</ContextMenuPrimitive.ItemIndicator>
|
|
248
265
|
</ContextMenuPrimitive.RadioItem>
|
|
249
266
|
);
|
|
@@ -268,6 +285,7 @@ const ContextMenuCheckboxItem = React.forwardRef<
|
|
|
268
285
|
} = props;
|
|
269
286
|
return (
|
|
270
287
|
<ContextMenuPrimitive.CheckboxItem
|
|
288
|
+
aria-keyshortcuts={shortcut ? toAriaKeyShortcuts(shortcut) : undefined}
|
|
271
289
|
{...itemProps}
|
|
272
290
|
asChild={false}
|
|
273
291
|
ref={forwardedRef}
|
|
@@ -284,11 +302,7 @@ const ContextMenuCheckboxItem = React.forwardRef<
|
|
|
284
302
|
<ContextMenuPrimitive.ItemIndicator className="rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator">
|
|
285
303
|
<ThickCheckIcon className="rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon" />
|
|
286
304
|
</ContextMenuPrimitive.ItemIndicator>
|
|
287
|
-
{shortcut &&
|
|
288
|
-
<div className="rt-BaseMenuShortcut rt-ContextMenuShortcut">
|
|
289
|
-
<Kbd size="1">{shortcut}</Kbd>
|
|
290
|
-
</div>
|
|
291
|
-
)}
|
|
305
|
+
{shortcut && <MenuShortcut shortcut={shortcut} className="rt-ContextMenuShortcut" />}
|
|
292
306
|
</ContextMenuPrimitive.CheckboxItem>
|
|
293
307
|
);
|
|
294
308
|
});
|
|
@@ -334,27 +348,55 @@ ContextMenuSubTrigger.displayName = 'ContextMenu.SubTrigger';
|
|
|
334
348
|
type ContextMenuSubContentElement = React.ElementRef<typeof ContextMenuPrimitive.SubContent>;
|
|
335
349
|
interface ContextMenuSubContentProps
|
|
336
350
|
extends ComponentPropsWithout<typeof ContextMenuPrimitive.SubContent, RemovedProps>,
|
|
337
|
-
|
|
351
|
+
ContextMenuSurfaceProps {
|
|
338
352
|
container?: React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Portal>['container'];
|
|
353
|
+
/**
|
|
354
|
+
* When true, skips the ScrollArea wrapper to allow VirtualMenu to handle its own scrolling.
|
|
355
|
+
*/
|
|
356
|
+
virtualized?: boolean;
|
|
339
357
|
}
|
|
340
358
|
const ContextMenuSubContent = React.forwardRef<
|
|
341
359
|
ContextMenuSubContentElement,
|
|
342
360
|
ContextMenuSubContentProps
|
|
343
361
|
>((props, forwardedRef) => {
|
|
344
|
-
const
|
|
362
|
+
const parent = React.useContext(ContextMenuContentContext);
|
|
363
|
+
const themeContext = useThemeContext();
|
|
364
|
+
|
|
365
|
+
useDeprecatedPanelBackgroundWarning(props.panelBackground);
|
|
366
|
+
|
|
367
|
+
// A submenu inherits the parent surface, and its own props win.
|
|
368
|
+
const size = props.size ?? parent.size;
|
|
369
|
+
const variant = props.variant ?? parent.variant;
|
|
370
|
+
const color = props.color ?? parent.color;
|
|
371
|
+
const highContrast = props.highContrast ?? parent.highContrast;
|
|
372
|
+
const material =
|
|
373
|
+
props.material ?? props.panelBackground ?? parent.material ?? resolveMenuMaterial(undefined, undefined, themeContext);
|
|
345
374
|
|
|
346
375
|
const {
|
|
347
376
|
className,
|
|
348
377
|
children,
|
|
349
378
|
container,
|
|
350
379
|
forceMount,
|
|
351
|
-
|
|
352
|
-
|
|
380
|
+
color: _color,
|
|
381
|
+
material: _material,
|
|
382
|
+
panelBackground: _panelBackground,
|
|
383
|
+
virtualized = false,
|
|
353
384
|
...subContentProps
|
|
354
|
-
} = extractProps(
|
|
355
|
-
|
|
356
|
-
|
|
385
|
+
} = extractProps({ ...props, size, variant, highContrast }, contextMenuSubContentPropDefs);
|
|
386
|
+
|
|
387
|
+
const scalarSize = useResolvedResponsiveValue(size, contextMenuSubContentPropDefs.size.default);
|
|
388
|
+
|
|
389
|
+
const contextValue = React.useMemo(
|
|
390
|
+
() => ({ size, variant, color, highContrast, material }),
|
|
391
|
+
[size, variant, color, highContrast, material],
|
|
392
|
+
);
|
|
393
|
+
|
|
394
|
+
const body = (
|
|
395
|
+
<MenuProvider size={size}>
|
|
396
|
+
<ContextMenuContentContext.Provider value={contextValue}>{children}</ContextMenuContentContext.Provider>
|
|
397
|
+
</MenuProvider>
|
|
357
398
|
);
|
|
399
|
+
|
|
358
400
|
return (
|
|
359
401
|
<ContextMenuPrimitive.Portal container={container} forceMount={forceMount}>
|
|
360
402
|
<Theme asChild>
|
|
@@ -362,7 +404,7 @@ const ContextMenuSubContent = React.forwardRef<
|
|
|
362
404
|
data-accent-color={color}
|
|
363
405
|
data-material={material}
|
|
364
406
|
data-panel-background={material}
|
|
365
|
-
alignOffset={
|
|
407
|
+
alignOffset={getMenuAlignOffset(scalarSize, themeContext.scaling)}
|
|
366
408
|
// Side offset accounts for the outer solid box-shadow
|
|
367
409
|
sideOffset={1}
|
|
368
410
|
collisionPadding={10}
|
|
@@ -378,11 +420,15 @@ const ContextMenuSubContent = React.forwardRef<
|
|
|
378
420
|
className,
|
|
379
421
|
)}
|
|
380
422
|
>
|
|
381
|
-
|
|
382
|
-
<div className={classNames('rt-BaseMenuViewport', 'rt-ContextMenuViewport')}>
|
|
383
|
-
{
|
|
423
|
+
{virtualized ? (
|
|
424
|
+
<div className={classNames('rt-BaseMenuViewport', 'rt-ContextMenuViewport', 'rt-virtualized')}>
|
|
425
|
+
{body}
|
|
384
426
|
</div>
|
|
385
|
-
|
|
427
|
+
) : (
|
|
428
|
+
<ScrollArea type="auto" scrollbars="vertical">
|
|
429
|
+
<div className={classNames('rt-BaseMenuViewport', 'rt-ContextMenuViewport')}>{body}</div>
|
|
430
|
+
</ScrollArea>
|
|
431
|
+
)}
|
|
386
432
|
</ContextMenuPrimitive.SubContent>
|
|
387
433
|
</Theme>
|
|
388
434
|
</ContextMenuPrimitive.Portal>
|
|
@@ -47,141 +47,56 @@
|
|
|
47
47
|
|
|
48
48
|
/***************************************************************************************************
|
|
49
49
|
* *
|
|
50
|
-
* DRILL-DOWN MODE
|
|
50
|
+
* DRILL-DOWN MODE *
|
|
51
51
|
* *
|
|
52
52
|
***************************************************************************************************/
|
|
53
53
|
|
|
54
|
-
/*
|
|
54
|
+
/*
|
|
55
|
+
* Only the levels on the navigation stack are mounted, and only the top level
|
|
56
|
+
* mounts its items, so no display rules are needed to hide inactive levels.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/* The root wrapper does not affect layout in cascade mode */
|
|
55
60
|
.rt-DropdownMenuDrillDownRoot {
|
|
56
61
|
display: contents;
|
|
57
62
|
}
|
|
58
63
|
|
|
59
|
-
/*
|
|
60
|
-
.rt-DropdownMenuDrillDownRoot:where([data-drill-down-active])
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/* Keep nested panels visible (they use display: contents) - uses descendant selector to work with groups */
|
|
65
|
-
.rt-DropdownMenuDrillDownRoot:where([data-drill-down-active]) :where(.rt-DropdownMenuDrillDownPanel) {
|
|
66
|
-
display: contents !important;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/* Keep root-level groups visible so their children (panels) can be shown */
|
|
70
|
-
.rt-DropdownMenuDrillDownRoot:where([data-drill-down-active]) > :where(.rt-BaseMenuGroup) {
|
|
71
|
-
display: contents !important;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* When the root is hidden, groups must also hide their non-panel children */
|
|
75
|
-
.rt-DropdownMenuDrillDownRoot:where([data-drill-down-active]) > :where(.rt-BaseMenuGroup) > :where(*:not(.rt-DropdownMenuDrillDownPanel)) {
|
|
76
|
-
display: none !important;
|
|
64
|
+
/* The top level is one box, so a navigation step animates a single element */
|
|
65
|
+
.rt-DropdownMenuDrillDownRoot:where([data-submenu-behavior='drill-down']:not([data-drill-down-active])),
|
|
66
|
+
.rt-DropdownMenuDrillDownPanel:where([data-drill-down-active]) {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
77
69
|
}
|
|
78
70
|
|
|
79
|
-
/*
|
|
80
|
-
.rt-DropdownMenuDrillDownPanel {
|
|
71
|
+
/* A level below the top only holds the path to the active panel */
|
|
72
|
+
.rt-DropdownMenuDrillDownPanel:where(:not([data-drill-down-active])) {
|
|
81
73
|
display: contents;
|
|
82
74
|
}
|
|
83
75
|
|
|
84
|
-
/*
|
|
85
|
-
.rt-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/* But keep nested panels visible (they use display: contents) - uses descendant selector to work with groups */
|
|
90
|
-
.rt-DropdownMenuDrillDownPanel:where(:not([data-drill-down-active])) :where(.rt-DropdownMenuDrillDownPanel) {
|
|
91
|
-
display: contents !important;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/* Keep groups visible so their children (panels) can be shown */
|
|
95
|
-
.rt-DropdownMenuDrillDownPanel:where(:not([data-drill-down-active])) > :where(.rt-BaseMenuGroup) {
|
|
96
|
-
display: contents !important;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/* When a panel is inactive, groups must also hide their non-panel children */
|
|
100
|
-
.rt-DropdownMenuDrillDownPanel:where(:not([data-drill-down-active])) > :where(.rt-BaseMenuGroup) > :where(*:not(.rt-DropdownMenuDrillDownPanel)) {
|
|
101
|
-
display: none !important;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* Back button item */
|
|
105
|
-
.rt-DropdownMenuDrillDownBackItem {
|
|
106
|
-
display: flex;
|
|
107
|
-
align-items: center;
|
|
108
|
-
gap: var(--space-2);
|
|
109
|
-
min-height: var(--base-menu-item-height);
|
|
110
|
-
padding-top: var(--base-menu-item-padding-y);
|
|
111
|
-
padding-bottom: var(--base-menu-item-padding-y);
|
|
112
|
-
padding-inline-start: var(--base-menu-item-padding-left);
|
|
113
|
-
padding-inline-end: var(--base-menu-item-padding-right);
|
|
114
|
-
box-sizing: border-box;
|
|
115
|
-
outline: none;
|
|
116
|
-
cursor: var(--cursor-menu-item);
|
|
117
|
-
user-select: none;
|
|
118
|
-
transition: var(--transition-menu);
|
|
119
|
-
font-weight: 500;
|
|
120
|
-
|
|
121
|
-
&:where(:focus-visible) {
|
|
122
|
-
outline: 2px solid var(--focus-8);
|
|
123
|
-
outline-offset: -2px;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/* Enhanced reduced motion support */
|
|
127
|
-
@media (prefers-reduced-motion: reduce) {
|
|
128
|
-
transition: none;
|
|
76
|
+
/* Custom content (not menu parts) of a level below the top stays hidden */
|
|
77
|
+
.rt-DropdownMenuDrillDownRoot:where([data-drill-down-active]),
|
|
78
|
+
.rt-DropdownMenuDrillDownPanel:where(:not([data-drill-down-active])) {
|
|
79
|
+
& > :where(:not(.rt-DropdownMenuDrillDownPanel, .rt-BaseMenuGroup, .rt-BaseMenuRadioGroup)) {
|
|
80
|
+
display: none;
|
|
129
81
|
}
|
|
130
82
|
}
|
|
131
83
|
|
|
132
|
-
/*
|
|
133
|
-
.rt-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
color: var(--gray-12);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/* Back label */
|
|
141
|
-
.rt-DropdownMenuDrillDownBackLabel {
|
|
142
|
-
color: var(--gray-12);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* Solid variant - drill-down items hover (matches menu item [data-highlighted]) */
|
|
146
|
-
.rt-BaseMenuContent:where(.rt-variant-solid) {
|
|
147
|
-
& :where(.rt-DropdownMenuDrillDownBackItem:hover),
|
|
148
|
-
& :where(.rt-DropdownMenuDrillDownBackItem:focus-visible),
|
|
149
|
-
& :where(.rt-DropdownMenuDrillDownSubTrigger:hover),
|
|
150
|
-
& :where(.rt-DropdownMenuDrillDownSubTrigger:focus-visible) {
|
|
151
|
-
background-color: var(--accent-9);
|
|
152
|
-
color: var(--accent-contrast);
|
|
153
|
-
|
|
154
|
-
& :where(.rt-DropdownMenuDrillDownBackIcon),
|
|
155
|
-
& :where(.rt-DropdownMenuDrillDownBackLabel),
|
|
156
|
-
& :where(.rt-BaseMenuSubTriggerIcon) {
|
|
157
|
-
color: var(--accent-contrast);
|
|
158
|
-
}
|
|
84
|
+
/* Groups on the path to the active panel lay out like the level they belong to */
|
|
85
|
+
.rt-DropdownMenuDrillDownRoot:where([data-drill-down-active]),
|
|
86
|
+
.rt-DropdownMenuDrillDownPanel:where(:not([data-drill-down-active])) {
|
|
87
|
+
& > :where(.rt-BaseMenuGroup, .rt-BaseMenuRadioGroup) {
|
|
88
|
+
display: contents;
|
|
159
89
|
}
|
|
160
90
|
}
|
|
161
91
|
|
|
162
|
-
/*
|
|
163
|
-
.rt-
|
|
164
|
-
|
|
165
|
-
& :where(.rt-DropdownMenuDrillDownBackItem:focus-visible),
|
|
166
|
-
& :where(.rt-DropdownMenuDrillDownSubTrigger:hover),
|
|
167
|
-
& :where(.rt-DropdownMenuDrillDownSubTrigger:focus-visible) {
|
|
168
|
-
background-color: var(--accent-4);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
:where([data-panel-background='translucent']) & :where(.rt-DropdownMenuDrillDownBackItem:hover),
|
|
172
|
-
:where([data-panel-background='translucent']) & :where(.rt-DropdownMenuDrillDownBackItem:focus-visible),
|
|
173
|
-
:where([data-panel-background='translucent']) & :where(.rt-DropdownMenuDrillDownSubTrigger:hover),
|
|
174
|
-
:where([data-panel-background='translucent']) & :where(.rt-DropdownMenuDrillDownSubTrigger:focus-visible) {
|
|
175
|
-
background-color: var(--accent-a4);
|
|
176
|
-
}
|
|
92
|
+
/* Back row: a regular menu item with a medium-weight label */
|
|
93
|
+
.rt-DropdownMenuDrillDownBackItem {
|
|
94
|
+
font-weight: var(--font-weight-medium);
|
|
177
95
|
}
|
|
178
96
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
outline: 2px solid Highlight;
|
|
183
|
-
outline-offset: 2px;
|
|
184
|
-
}
|
|
97
|
+
.rt-DropdownMenuDrillDownBackIcon {
|
|
98
|
+
margin-inline-start: calc(-2px * var(--scaling));
|
|
99
|
+
margin-inline-end: 0;
|
|
185
100
|
}
|
|
186
101
|
|
|
187
102
|
/***************************************************************************************************
|
|
@@ -191,17 +106,22 @@
|
|
|
191
106
|
***************************************************************************************************/
|
|
192
107
|
|
|
193
108
|
@media (prefers-reduced-motion: no-preference) {
|
|
194
|
-
|
|
195
|
-
.rt-DropdownMenuDrillDownPanel:where([data-drill-down-active][data-animation-direction='forward']) > :where(*:not(.rt-DropdownMenuDrillDownPanel)) {
|
|
109
|
+
.rt-DropdownMenuDrillDownPanel:where([data-drill-down-active][data-animation-direction='forward']) {
|
|
196
110
|
animation: rt-drill-down-enter-from-right var(--motion-duration-small) var(--motion-ease-smooth);
|
|
197
111
|
}
|
|
198
112
|
|
|
199
|
-
.rt-DropdownMenuDrillDownPanel:where([data-drill-down-active][data-animation-direction='backward'])
|
|
113
|
+
.rt-DropdownMenuDrillDownPanel:where([data-drill-down-active][data-animation-direction='backward']),
|
|
114
|
+
.rt-DropdownMenuDrillDownRoot:where([data-submenu-behavior='drill-down']:not([data-drill-down-active])[data-animation-direction='backward']) {
|
|
200
115
|
animation: rt-drill-down-enter-from-left var(--motion-duration-small) var(--motion-ease-smooth);
|
|
201
116
|
}
|
|
202
117
|
|
|
203
|
-
/*
|
|
204
|
-
.rt-
|
|
205
|
-
animation: rt-drill-down-enter-from-left
|
|
118
|
+
/* Mirror the slide direction in right-to-left layouts */
|
|
119
|
+
:where([dir='rtl']) .rt-DropdownMenuDrillDownPanel:where([data-drill-down-active][data-animation-direction='forward']) {
|
|
120
|
+
animation-name: rt-drill-down-enter-from-left;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:where([dir='rtl']) .rt-DropdownMenuDrillDownPanel:where([data-drill-down-active][data-animation-direction='backward']),
|
|
124
|
+
:where([dir='rtl']) .rt-DropdownMenuDrillDownRoot:where([data-submenu-behavior='drill-down']:not([data-drill-down-active])[data-animation-direction='backward']) {
|
|
125
|
+
animation-name: rt-drill-down-enter-from-right;
|
|
206
126
|
}
|
|
207
127
|
}
|