@womp/kookie-ui 0.34.1 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/components.css +20 -7
- package/dist/cjs/components/_internal/pane-chrome.d.ts +1 -2
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +2 -2
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
- package/dist/cjs/components/_internal/shell-handles.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-handles.js +1 -1
- package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
- package/dist/cjs/components/_internal/shell-resizable.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resizable.js +1 -1
- package/dist/cjs/components/_internal/shell-resizable.js.map +3 -3
- package/dist/cjs/components/_internal/shell-resize.d.ts +2 -0
- package/dist/cjs/components/_internal/shell-resize.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-resize.js.map +2 -2
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
- package/dist/cjs/components/avatar.d.ts.map +1 -1
- package/dist/cjs/components/avatar.js +1 -1
- package/dist/cjs/components/avatar.js.map +2 -2
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/chatbar.d.ts.map +1 -1
- package/dist/cjs/components/chatbar.js +1 -1
- package/dist/cjs/components/chatbar.js.map +3 -3
- package/dist/cjs/components/combobox.d.ts +16 -0
- 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 +2 -2
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/message-scroller.js +1 -1
- package/dist/cjs/components/message-scroller.js.map +3 -3
- package/dist/cjs/components/navbar.d.ts.map +1 -1
- package/dist/cjs/components/navbar.js +1 -1
- package/dist/cjs/components/navbar.js.map +3 -3
- package/dist/cjs/components/navigator.js +1 -1
- package/dist/cjs/components/navigator.js.map +3 -3
- package/dist/cjs/components/notice.js +1 -1
- package/dist/cjs/components/notice.js.map +3 -3
- package/dist/cjs/components/schemas/base-button.schema.d.ts +7 -0
- package/dist/cjs/components/schemas/base-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/base-button.schema.js +1 -1
- package/dist/cjs/components/schemas/base-button.schema.js.map +2 -2
- package/dist/cjs/components/schemas/button.schema.d.ts +14 -0
- package/dist/cjs/components/schemas/button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/button.schema.js +1 -1
- package/dist/cjs/components/schemas/button.schema.js.map +2 -2
- 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 +7 -6
- 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.schema.d.ts +83 -77
- package/dist/cjs/components/schemas/toggle.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/toggle.schema.js +1 -1
- package/dist/cjs/components/schemas/toggle.schema.js.map +2 -2
- package/dist/cjs/components/segmented-control.d.ts.map +1 -1
- package/dist/cjs/components/segmented-control.js +1 -1
- package/dist/cjs/components/segmented-control.js.map +3 -3
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +2 -2
- package/dist/cjs/components/sheet.d.ts +2 -2
- package/dist/cjs/components/sheet.js.map +1 -1
- package/dist/cjs/components/shell.context.js.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +3 -3
- package/dist/cjs/components/sidebar.d.ts +1 -1
- package/dist/cjs/components/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/components/table.d.ts.map +1 -1
- package/dist/cjs/components/table.js +1 -1
- package/dist/cjs/components/table.js.map +3 -3
- package/dist/cjs/components/toggle.js +1 -1
- package/dist/cjs/components/toggle.js.map +3 -3
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +3 -3
- 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 +3 -3
- package/dist/cjs/helpers/index.d.ts +0 -1
- package/dist/cjs/helpers/index.d.ts.map +1 -1
- package/dist/cjs/helpers/index.js +2 -2
- package/dist/cjs/helpers/index.js.map +4 -4
- package/dist/cjs/hooks/index.d.ts +0 -2
- package/dist/cjs/hooks/index.d.ts.map +1 -1
- package/dist/cjs/hooks/index.js +3 -11
- package/dist/cjs/hooks/index.js.map +4 -4
- package/dist/cjs/index.js +3 -11
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/index.d.ts +6 -1
- package/dist/cjs/props/index.d.ts.map +1 -1
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +4 -4
- package/dist/esm/chunk-25FNCKUM.js +2 -0
- package/dist/esm/chunk-25FNCKUM.js.map +7 -0
- package/dist/esm/{chunk-KDJM4NQQ.js → chunk-2WFN4D52.js} +2 -2
- package/dist/esm/chunk-4OJRLS5N.js +3 -0
- package/dist/esm/chunk-4OJRLS5N.js.map +7 -0
- package/dist/esm/chunk-4TTRPCGG.js +3 -0
- package/dist/esm/{chunk-QKCNGEX4.js.map → chunk-4TTRPCGG.js.map} +3 -3
- package/dist/esm/chunk-4X64QOAR.js +3 -0
- package/dist/esm/chunk-4X64QOAR.js.map +7 -0
- package/dist/esm/{chunk-L7PRLW6A.js → chunk-5APRBJRR.js} +2 -2
- package/dist/esm/{chunk-L7PRLW6A.js.map → chunk-5APRBJRR.js.map} +2 -2
- package/dist/esm/chunk-7HD5LS3M.js +3 -0
- package/dist/esm/chunk-7HD5LS3M.js.map +7 -0
- package/dist/esm/chunk-7ZOGH5NT.js +2 -0
- package/dist/esm/chunk-7ZOGH5NT.js.map +7 -0
- package/dist/esm/chunk-BJA75XKG.js +2 -0
- package/dist/esm/chunk-BJA75XKG.js.map +7 -0
- package/dist/esm/{chunk-NO2JCJWI.js → chunk-BJVXB3PN.js} +2 -2
- package/dist/esm/{chunk-BR6Z2CAE.js → chunk-C6VGCYFQ.js} +2 -2
- package/dist/esm/chunk-EZYXYLR2.js +2 -0
- package/dist/esm/chunk-EZYXYLR2.js.map +7 -0
- package/dist/esm/chunk-FTNZWAPB.js +3 -0
- package/dist/esm/{chunk-7QBNXNEN.js.map → chunk-FTNZWAPB.js.map} +3 -3
- package/dist/esm/{chunk-ZLGOZKB3.js → chunk-FYZXC7AL.js} +2 -2
- package/dist/esm/{chunk-XD676L6S.js → chunk-HQT32HQ6.js} +2 -2
- package/dist/esm/{chunk-XKYPJTRN.js → chunk-I5TPDYJO.js} +2 -2
- package/dist/esm/chunk-I77CYEBT.js +2 -0
- package/dist/esm/chunk-I77CYEBT.js.map +7 -0
- package/dist/esm/{chunk-API4DAPY.js → chunk-J7MIXG6M.js} +1 -1
- package/dist/esm/chunk-J7MIXG6M.js.map +7 -0
- package/dist/esm/{chunk-UMQOTGJC.js → chunk-M26LLCQC.js} +2 -2
- package/dist/esm/{chunk-WN3WMFAM.js → chunk-MLHS2GWL.js} +2 -2
- package/dist/esm/chunk-MPLBIPJ6.js +3 -0
- package/dist/esm/chunk-MPLBIPJ6.js.map +7 -0
- package/dist/esm/{chunk-WEBNIUEX.js → chunk-MXEOE4LA.js} +1 -1
- package/dist/esm/chunk-MXEOE4LA.js.map +7 -0
- package/dist/esm/chunk-OGVKMDO7.js +3 -0
- package/dist/esm/chunk-OGVKMDO7.js.map +7 -0
- package/dist/esm/{chunk-ODHCDJ3Y.js → chunk-PMXIQ5B4.js} +1 -1
- package/dist/esm/chunk-PMXIQ5B4.js.map +7 -0
- package/dist/esm/{chunk-LG5DPQ46.js → chunk-R4DMVTM3.js} +2 -2
- package/dist/esm/{chunk-LG5DPQ46.js.map → chunk-R4DMVTM3.js.map} +3 -3
- package/dist/esm/chunk-S6SEWECR.js +3 -0
- package/dist/esm/{chunk-5VYQDA5S.js.map → chunk-S6SEWECR.js.map} +3 -3
- package/dist/esm/{chunk-7YXHLU4C.js → chunk-TANYRHGP.js} +2 -2
- package/dist/esm/{chunk-INGT6DB6.js → chunk-TS4QCDSI.js} +1 -1
- package/dist/esm/chunk-TS4QCDSI.js.map +7 -0
- package/dist/esm/chunk-VRWZLGR7.js +2 -0
- package/dist/esm/chunk-X4PWBFOT.js +3 -0
- package/dist/esm/chunk-X4PWBFOT.js.map +7 -0
- package/dist/esm/chunk-XFMAA4MD.js +3 -0
- package/dist/esm/chunk-XFMAA4MD.js.map +7 -0
- package/dist/esm/chunk-XGV7KNSE.js +3 -0
- package/dist/esm/chunk-XGV7KNSE.js.map +7 -0
- package/dist/esm/chunk-XOAOSRTH.js +3 -0
- package/dist/esm/chunk-XOAOSRTH.js.map +7 -0
- package/dist/esm/{chunk-YOTTLPJ3.js → chunk-Y5ITMKC6.js} +2 -2
- package/dist/esm/chunk-YLPCYCYA.js +3 -0
- package/dist/esm/chunk-YLPCYCYA.js.map +7 -0
- package/dist/esm/components/_internal/pane-chrome.d.ts +1 -2
- package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/esm/components/_internal/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-handles.d.ts.map +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-resizable.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-resizable.js +1 -1
- package/dist/esm/components/_internal/shell-resize.d.ts +2 -0
- package/dist/esm/components/_internal/shell-resize.d.ts.map +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/accordion.props.js +1 -1
- package/dist/esm/components/accordion.props.js.map +4 -4
- package/dist/esm/components/avatar.d.ts.map +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/chatbar.d.ts.map +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/combobox.d.ts +16 -0
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.props.js +1 -1
- package/dist/esm/components/combobox.props.js.map +4 -4
- package/dist/esm/components/image.props.js +1 -1
- package/dist/esm/components/image.props.js.map +4 -4
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/navbar.d.ts.map +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/navbar.props.js +1 -1
- package/dist/esm/components/navbar.props.js.map +4 -4
- package/dist/esm/components/navigator.js +1 -1
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/schemas/base-button.schema.d.ts +7 -0
- 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 +14 -0
- 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/index.js +1 -1
- package/dist/esm/components/schemas/shell.schema.d.ts +7 -6
- 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.schema.d.ts +83 -77
- package/dist/esm/components/schemas/toggle.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/toggle.schema.js +1 -1
- package/dist/esm/components/segmented-control.d.ts.map +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/sheet.d.ts +2 -2
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.context.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.d.ts +1 -1
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/table.d.ts.map +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/toolbar.props.js +1 -1
- package/dist/esm/components/toolbar.props.js.map +4 -4
- package/dist/esm/components/virtual-menu.d.ts.map +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/index.d.ts +0 -1
- package/dist/esm/helpers/index.d.ts.map +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/index.js.map +2 -2
- package/dist/esm/hooks/index.d.ts +0 -2
- package/dist/esm/hooks/index.d.ts.map +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.d.ts +6 -1
- package/dist/esm/props/index.d.ts.map +1 -1
- package/dist/esm/props/index.js +1 -1
- package/layout/utilities.css +810 -0
- package/layout.css +810 -0
- package/package.json +3 -4
- package/schemas/base-button.json +13 -0
- package/schemas/button.json +13 -0
- package/schemas/index.json +51 -12
- package/schemas/shell-bottom.json +2 -2
- package/schemas/shell-content.json +2 -2
- package/schemas/shell-header.json +4 -0
- package/schemas/shell-inspector.json +2 -2
- package/schemas/shell-panel.json +2 -2
- package/schemas/shell-rail.json +2 -2
- package/schemas/shell-sidebar.json +2 -2
- package/schemas/toggle.json +9 -0
- package/src/components/_internal/base-checkbox.css +0 -2
- package/src/components/_internal/base-dialog.css +1 -1
- package/src/components/_internal/base-sidebar-menu.css +0 -3
- package/src/components/_internal/base-sidebar.css +0 -2
- package/src/components/_internal/base-tab-list.css +0 -1
- package/src/components/_internal/pane-chrome.tsx +2 -3
- package/src/components/_internal/shell-handles.tsx +3 -0
- package/src/components/_internal/shell-resizable.tsx +9 -0
- package/src/components/_internal/shell-resize.tsx +2 -0
- package/src/components/accordion.css +0 -1
- package/src/components/avatar.tsx +3 -1
- package/src/components/button.tsx +1 -1
- package/src/components/chatbar.css +0 -2
- package/src/components/chatbar.tsx +2 -1
- package/src/components/combobox.tsx +2 -3
- package/src/components/navbar.tsx +3 -4
- package/src/components/navigator.css +4 -4
- package/src/components/notice.css +1 -1
- package/src/components/schemas/base-button.schema.ts +7 -0
- package/src/components/schemas/shell.schema.ts +3 -2
- package/src/components/schemas/toggle.schema.ts +2 -1
- package/src/components/segmented-control.css +13 -3
- package/src/components/segmented-control.tsx +10 -2
- package/src/components/select.tsx +2 -2
- package/src/components/sheet.tsx +2 -2
- package/src/components/shell.context.tsx +1 -1
- package/src/components/sidebar.css +2 -7
- package/src/components/sidebar.tsx +1 -1
- package/src/components/table.tsx +4 -1
- package/src/components/text-area.css +0 -1
- package/src/components/text-field.css +2 -2
- package/src/components/virtual-menu.css +0 -1
- package/src/components/virtual-menu.tsx +8 -1
- package/src/helpers/index.ts +0 -1
- package/src/hooks/index.ts +0 -2
- package/src/props/index.ts +6 -1
- package/src/styles/utilities/inset.css +135 -0
- package/styles.css +830 -7
- package/utilities.css +810 -0
- package/dist/cjs/helpers/map-prop-values.d.ts +0 -4
- package/dist/cjs/helpers/map-prop-values.d.ts.map +0 -1
- package/dist/cjs/helpers/map-prop-values.js +0 -2
- package/dist/cjs/helpers/map-prop-values.js.map +0 -7
- package/dist/cjs/hooks/use-live-announcer.d.ts +0 -6
- package/dist/cjs/hooks/use-live-announcer.d.ts.map +0 -1
- package/dist/cjs/hooks/use-live-announcer.js +0 -11
- package/dist/cjs/hooks/use-live-announcer.js.map +0 -7
- package/dist/cjs/hooks/use-toggle-state.d.ts +0 -37
- package/dist/cjs/hooks/use-toggle-state.d.ts.map +0 -1
- package/dist/cjs/hooks/use-toggle-state.js +0 -11
- package/dist/cjs/hooks/use-toggle-state.js.map +0 -7
- package/dist/cjs/props/shadow.props.d.ts +0 -24
- package/dist/cjs/props/shadow.props.d.ts.map +0 -1
- package/dist/cjs/props/shadow.props.js +0 -2
- package/dist/cjs/props/shadow.props.js.map +0 -7
- package/dist/esm/chunk-3QWGSRYC.js +0 -3
- package/dist/esm/chunk-3QWGSRYC.js.map +0 -7
- package/dist/esm/chunk-5KQCG7AV.js +0 -3
- package/dist/esm/chunk-5KQCG7AV.js.map +0 -7
- package/dist/esm/chunk-5VYQDA5S.js +0 -3
- package/dist/esm/chunk-677CX2QF.js +0 -2
- package/dist/esm/chunk-677CX2QF.js.map +0 -7
- package/dist/esm/chunk-7QBNXNEN.js +0 -3
- package/dist/esm/chunk-API4DAPY.js.map +0 -7
- package/dist/esm/chunk-AYKOOEZR.js +0 -2
- package/dist/esm/chunk-BQOFHLDP.js +0 -3
- package/dist/esm/chunk-BQOFHLDP.js.map +0 -7
- package/dist/esm/chunk-CZ24FOFS.js +0 -3
- package/dist/esm/chunk-CZ24FOFS.js.map +0 -7
- package/dist/esm/chunk-EERKYRYI.js +0 -3
- package/dist/esm/chunk-EERKYRYI.js.map +0 -7
- package/dist/esm/chunk-HZYE46V2.js +0 -2
- package/dist/esm/chunk-HZYE46V2.js.map +0 -7
- package/dist/esm/chunk-IN2WND4B.js +0 -3
- package/dist/esm/chunk-IN2WND4B.js.map +0 -7
- package/dist/esm/chunk-INGT6DB6.js.map +0 -7
- package/dist/esm/chunk-J6B7UCZN.js +0 -3
- package/dist/esm/chunk-J6B7UCZN.js.map +0 -7
- package/dist/esm/chunk-JQMWNI62.js +0 -3
- package/dist/esm/chunk-JQMWNI62.js.map +0 -7
- package/dist/esm/chunk-ODHCDJ3Y.js.map +0 -7
- package/dist/esm/chunk-QKCNGEX4.js +0 -3
- package/dist/esm/chunk-RIHTVZVJ.js +0 -3
- package/dist/esm/chunk-RIHTVZVJ.js.map +0 -7
- package/dist/esm/chunk-TMINGBSQ.js +0 -3
- package/dist/esm/chunk-TMINGBSQ.js.map +0 -7
- package/dist/esm/chunk-WEBNIUEX.js.map +0 -7
- package/dist/esm/chunk-WTP2KIK3.js +0 -11
- package/dist/esm/chunk-WTP2KIK3.js.map +0 -7
- package/dist/esm/chunk-XF6Z5NKE.js +0 -3
- package/dist/esm/chunk-XF6Z5NKE.js.map +0 -7
- package/dist/esm/helpers/map-prop-values.d.ts +0 -4
- package/dist/esm/helpers/map-prop-values.d.ts.map +0 -1
- package/dist/esm/helpers/map-prop-values.js +0 -2
- package/dist/esm/helpers/map-prop-values.js.map +0 -7
- package/dist/esm/hooks/use-live-announcer.d.ts +0 -6
- package/dist/esm/hooks/use-live-announcer.d.ts.map +0 -1
- package/dist/esm/hooks/use-live-announcer.js +0 -3
- package/dist/esm/hooks/use-live-announcer.js.map +0 -7
- package/dist/esm/hooks/use-toggle-state.d.ts +0 -37
- package/dist/esm/hooks/use-toggle-state.d.ts.map +0 -1
- package/dist/esm/hooks/use-toggle-state.js +0 -3
- package/dist/esm/hooks/use-toggle-state.js.map +0 -7
- package/dist/esm/props/shadow.props.d.ts +0 -24
- package/dist/esm/props/shadow.props.d.ts.map +0 -1
- package/dist/esm/props/shadow.props.js +0 -2
- package/dist/esm/props/shadow.props.js.map +0 -7
- package/src/helpers/map-prop-values.ts +0 -17
- package/src/hooks/use-live-announcer.ts +0 -79
- package/src/hooks/use-toggle-state.ts +0 -72
- package/src/props/shadow.props.ts +0 -30
- /package/dist/esm/{chunk-KDJM4NQQ.js.map → chunk-2WFN4D52.js.map} +0 -0
- /package/dist/esm/{chunk-NO2JCJWI.js.map → chunk-BJVXB3PN.js.map} +0 -0
- /package/dist/esm/{chunk-BR6Z2CAE.js.map → chunk-C6VGCYFQ.js.map} +0 -0
- /package/dist/esm/{chunk-ZLGOZKB3.js.map → chunk-FYZXC7AL.js.map} +0 -0
- /package/dist/esm/{chunk-XD676L6S.js.map → chunk-HQT32HQ6.js.map} +0 -0
- /package/dist/esm/{chunk-XKYPJTRN.js.map → chunk-I5TPDYJO.js.map} +0 -0
- /package/dist/esm/{chunk-UMQOTGJC.js.map → chunk-M26LLCQC.js.map} +0 -0
- /package/dist/esm/{chunk-WN3WMFAM.js.map → chunk-MLHS2GWL.js.map} +0 -0
- /package/dist/esm/{chunk-7YXHLU4C.js.map → chunk-TANYRHGP.js.map} +0 -0
- /package/dist/esm/{chunk-AYKOOEZR.js.map → chunk-VRWZLGR7.js.map} +0 -0
- /package/dist/esm/{chunk-YOTTLPJ3.js.map → chunk-Y5ITMKC6.js.map} +0 -0
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Responsive } from '../props/prop-def.js';
|
|
2
|
-
declare function mapResponsiveProp<Input extends string, Output>(propValue: Responsive<Input> | undefined, mapValue: (value: Input) => Output): Responsive<Output> | undefined;
|
|
3
|
-
export { mapResponsiveProp };
|
|
4
|
-
//# sourceMappingURL=map-prop-values.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-prop-values.d.ts","sourceRoot":"","sources":["../../../src/helpers/map-prop-values.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvD,iBAAS,iBAAiB,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,EACrD,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,SAAS,EACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,GACjC,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,CAQhC;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var f=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of o(t))!u.call(e,p)&&p!==n&&r(e,p,{get:()=>t[p],enumerable:!(s=i(t,p))||s.enumerable});return e};var m=e=>d(r({},"__esModule",{value:!0}),e);var O={};f(O,{mapResponsiveProp:()=>v});module.exports=m(O);function v(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,s])=>[n,t(s)]))}
|
|
2
|
-
//# sourceMappingURL=map-prop-values.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/map-prop-values.ts"],
|
|
4
|
-
"sourcesContent": ["import type { textPropDefs } from '../components/text.props.js';\nimport type { Responsive } from '../props/prop-def.js';\n\nfunction mapResponsiveProp<Input extends string, Output>(\n propValue: Responsive<Input> | undefined,\n mapValue: (value: Input) => Output\n): Responsive<Output> | undefined {\n if (propValue === undefined) return undefined;\n if (typeof propValue === 'string') {\n return mapValue(propValue);\n }\n return Object.fromEntries(\n Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])\n );\n}\n\nexport { mapResponsiveProp };\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAGA,SAASE,EACPE,EACAC,EACgC,CAChC,GAAID,IAAc,OAClB,OAAI,OAAOA,GAAc,SAChBC,EAASD,CAAS,EAEpB,OAAO,YACZ,OAAO,QAAQA,CAAS,EAAE,IAAI,CAAC,CAACE,EAAKC,CAAK,IAAM,CAACD,EAAKD,EAASE,CAAK,CAAC,CAAC,CACxE,CACF",
|
|
6
|
-
"names": ["map_prop_values_exports", "__export", "mapResponsiveProp", "__toCommonJS", "propValue", "mapValue", "key", "value"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-live-announcer.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-live-announcer.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,gBAAgB,cA+Ce,MAAM,UAmBpD"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var l=Object.create;var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var p=(e,n)=>{for(var t in n)r(e,t,{get:n[t],enumerable:!0})},a=(e,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let u of s(n))!m.call(e,u)&&u!==t&&r(e,u,{get:()=>n[u],enumerable:!(i=d(n,u))||i.enumerable});return e};var v=(e,n,t)=>(t=e!=null?l(f(e)):{},a(n||!e||!e.__esModule?r(t,"default",{value:e,enumerable:!0}):t,e)),R=e=>a(r({},"__esModule",{value:!0}),e);var x={};p(x,{useLiveAnnouncer:()=>g});module.exports=R(x);var o=v(require("react")),c=0;function g(){let e=o.useRef(void 0);return o.useEffect(()=>{let t=document.getElementById("kui-live-announcer");return t||(t=document.createElement("div"),t.id="kui-live-announcer",t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.cssText=`
|
|
3
|
-
position: absolute;
|
|
4
|
-
left: -10000px;
|
|
5
|
-
width: 1px;
|
|
6
|
-
height: 1px;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
clip: rect(0, 0, 0, 0);
|
|
9
|
-
white-space: nowrap;
|
|
10
|
-
`,document.body.appendChild(t)),c++,()=>{if(c--,e.current&&clearTimeout(e.current),c===0){let i=document.getElementById("kui-live-announcer");i&&i.remove()}}},[]),o.useCallback(t=>{let i=document.getElementById("kui-live-announcer");i&&(e.current&&clearTimeout(e.current),i.textContent="",e.current=setTimeout(()=>{i.textContent=t},100))},[])}
|
|
11
|
-
//# sourceMappingURL=use-live-announcer.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/use-live-announcer.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\n\n/**\n * Reference counter to track how many components are using the live region.\n * Only remove the live region when no components are using it.\n */\nlet liveRegionRefCount = 0;\n\n/**\n * Hook for making live announcements to screen readers\n * Creates a hidden aria-live region for announcing dynamic content changes\n */\nexport function useLiveAnnouncer() {\n // Track the timeout so we can clean it up on unmount\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n // Create aria-live region if it doesn't exist\n React.useEffect(() => {\n let liveRegion = document.getElementById('kui-live-announcer');\n\n if (!liveRegion) {\n liveRegion = document.createElement('div');\n liveRegion.id = 'kui-live-announcer';\n liveRegion.setAttribute('aria-live', 'polite');\n liveRegion.setAttribute('aria-atomic', 'true');\n liveRegion.style.cssText = `\n position: absolute;\n left: -10000px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n `;\n document.body.appendChild(liveRegion);\n }\n\n // Increment ref count when component mounts\n liveRegionRefCount++;\n\n return () => {\n // Decrement ref count when component unmounts\n liveRegionRefCount--;\n\n // Clean up timeout on unmount\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n // Only remove the live region if no components are using it\n if (liveRegionRefCount === 0) {\n const region = document.getElementById('kui-live-announcer');\n if (region) {\n region.remove();\n }\n }\n };\n }, []);\n\n const announce = React.useCallback((message: string) => {\n const liveRegion = document.getElementById('kui-live-announcer');\n if (liveRegion) {\n // Clear any pending timeout\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n // Clear previous announcements\n liveRegion.textContent = '';\n\n // Add new announcement with a small delay to ensure it's announced\n timeoutRef.current = setTimeout(() => {\n liveRegion.textContent = message;\n }, 100);\n }\n }, []);\n\n return announce;\n}\n"],
|
|
5
|
-
"mappings": ";0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBAMnBC,EAAqB,EAMlB,SAASH,GAAmB,CAEjC,IAAMI,EAAmB,SAAkD,MAAS,EAGpF,OAAM,YAAU,IAAM,CACpB,IAAIC,EAAa,SAAS,eAAe,oBAAoB,EAE7D,OAAKA,IACHA,EAAa,SAAS,cAAc,KAAK,EACzCA,EAAW,GAAK,qBAChBA,EAAW,aAAa,YAAa,QAAQ,EAC7CA,EAAW,aAAa,cAAe,MAAM,EAC7CA,EAAW,MAAM,QAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAS3B,SAAS,KAAK,YAAYA,CAAU,GAItCF,IAEO,IAAM,CAUX,GARAA,IAGIC,EAAW,SACb,aAAaA,EAAW,OAAO,EAI7BD,IAAuB,EAAG,CAC5B,IAAMG,EAAS,SAAS,eAAe,oBAAoB,EACvDA,GACFA,EAAO,OAAO,CAElB,CACF,CACF,EAAG,CAAC,CAAC,EAEkB,cAAaC,GAAoB,CACtD,IAAMF,EAAa,SAAS,eAAe,oBAAoB,EAC3DA,IAEED,EAAW,SACb,aAAaA,EAAW,OAAO,EAIjCC,EAAW,YAAc,GAGzBD,EAAW,QAAU,WAAW,IAAM,CACpCC,EAAW,YAAcE,CAC3B,EAAG,GAAG,EAEV,EAAG,CAAC,CAAC,CAGP",
|
|
6
|
-
"names": ["use_live_announcer_exports", "__export", "useLiveAnnouncer", "__toCommonJS", "React", "liveRegionRefCount", "timeoutRef", "liveRegion", "region", "message"]
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options for the useToggleState hook
|
|
3
|
-
*/
|
|
4
|
-
interface UseToggleStateOptions {
|
|
5
|
-
/** Controlled pressed state */
|
|
6
|
-
pressed?: boolean;
|
|
7
|
-
/** Callback when pressed state changes */
|
|
8
|
-
onPressedChange?: (pressed: boolean) => void;
|
|
9
|
-
/** Function to get the accessible name for announcements */
|
|
10
|
-
getAccessibleName: () => string;
|
|
11
|
-
/** Component name for warning messages */
|
|
12
|
-
componentName: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Hook for shared toggle button state management.
|
|
16
|
-
* Provides accessibility announcements and controlled/uncontrolled warnings.
|
|
17
|
-
*
|
|
18
|
-
* @param options - Configuration options for the toggle state
|
|
19
|
-
* @returns Object containing the handlePressedChange callback
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* const getAccessibleName = React.useCallback(() => 'Toggle button', []);
|
|
24
|
-
*
|
|
25
|
-
* const { handlePressedChange } = useToggleState({
|
|
26
|
-
* pressed,
|
|
27
|
-
* onPressedChange,
|
|
28
|
-
* getAccessibleName,
|
|
29
|
-
* componentName: 'Toggle',
|
|
30
|
-
* });
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare function useToggleState({ pressed, onPressedChange, getAccessibleName, componentName }: UseToggleStateOptions): {
|
|
34
|
-
handlePressedChange: (newPressed: boolean) => void;
|
|
35
|
-
};
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=use-toggle-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-toggle-state.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-toggle-state.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,UAAU,qBAAqB;IAC7B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,4DAA4D;IAC5D,iBAAiB,EAAE,MAAM,MAAM,CAAC;IAChC,0CAA0C;IAC1C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,EAAE,qBAAqB;sCAWnG,OAAO;EAwBvB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var g=Object.create;var a=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var w=(e,n)=>{for(var t in n)a(e,t,{get:n[t],enumerable:!0})},l=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of R(n))!b.call(e,r)&&r!==t&&a(e,r,{get:()=>n[r],enumerable:!(o=v(n,r))||o.enumerable});return e};var d=(e,n,t)=>(t=e!=null?g(h(e)):{},l(n||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),y=e=>l(a({},"__esModule",{value:!0}),e);var C={};w(C,{useToggleState:()=>T});module.exports=y(C);var u=d(require("react"));var i=d(require("react")),s=0;function f(){let e=i.useRef(void 0);return i.useEffect(()=>{let t=document.getElementById("kui-live-announcer");return t||(t=document.createElement("div"),t.id="kui-live-announcer",t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.cssText=`
|
|
3
|
-
position: absolute;
|
|
4
|
-
left: -10000px;
|
|
5
|
-
width: 1px;
|
|
6
|
-
height: 1px;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
clip: rect(0, 0, 0, 0);
|
|
9
|
-
white-space: nowrap;
|
|
10
|
-
`,document.body.appendChild(t)),s++,()=>{if(s--,e.current&&clearTimeout(e.current),s===0){let o=document.getElementById("kui-live-announcer");o&&o.remove()}}},[]),i.useCallback(t=>{let o=document.getElementById("kui-live-announcer");o&&(e.current&&clearTimeout(e.current),o.textContent="",e.current=setTimeout(()=>{o.textContent=t},100))},[])}function T({pressed:e,onPressedChange:n,getAccessibleName:t,componentName:o}){let r=f(),x=u.useRef(!1),p=u.useCallback(c=>{let m=t();r(`${m} ${c?"pressed":"unpressed"}`),n?.(c)},[r,n,t]);return u.useEffect(()=>{},[e,n,o]),{handlePressedChange:p}}
|
|
11
|
-
//# sourceMappingURL=use-toggle-state.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/hooks/use-toggle-state.ts", "../../../src/hooks/use-live-announcer.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport { useLiveAnnouncer } from './use-live-announcer.js';\n\n/**\n * Options for the useToggleState hook\n */\ninterface UseToggleStateOptions {\n /** Controlled pressed state */\n pressed?: boolean;\n /** Callback when pressed state changes */\n onPressedChange?: (pressed: boolean) => void;\n /** Function to get the accessible name for announcements */\n getAccessibleName: () => string;\n /** Component name for warning messages */\n componentName: string;\n}\n\n/**\n * Hook for shared toggle button state management.\n * Provides accessibility announcements and controlled/uncontrolled warnings.\n *\n * @param options - Configuration options for the toggle state\n * @returns Object containing the handlePressedChange callback\n *\n * @example\n * ```tsx\n * const getAccessibleName = React.useCallback(() => 'Toggle button', []);\n *\n * const { handlePressedChange } = useToggleState({\n * pressed,\n * onPressedChange,\n * getAccessibleName,\n * componentName: 'Toggle',\n * });\n * ```\n */\nexport function useToggleState({ pressed, onPressedChange, getAccessibleName, componentName }: UseToggleStateOptions) {\n const announce = useLiveAnnouncer();\n\n // Track if we've already warned about controlled without handler\n const warnedRef = React.useRef(false);\n\n /**\n * Memoized handler for state changes with accessibility announcements.\n * Announces the new state immediately for screen readers.\n */\n const handlePressedChange = React.useCallback(\n (newPressed: boolean) => {\n const accessibleName = getAccessibleName();\n // Announce the state change for screen readers\n announce(`${accessibleName} ${newPressed ? 'pressed' : 'unpressed'}`);\n // Call the user's change handler\n onPressedChange?.(newPressed);\n },\n [announce, onPressedChange, getAccessibleName],\n );\n\n // Development-only warning for controlled/uncontrolled pattern\n // Only warns once to avoid console spam\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'development' && pressed !== undefined && onPressedChange === undefined && !warnedRef.current) {\n warnedRef.current = true;\n console.warn(\n `${componentName}: You provided a \\`pressed\\` prop without an \\`onPressedChange\\` handler. ` +\n 'This will result in a read-only toggle button. If you want the button to be interactive, ' +\n 'you should provide an `onPressedChange` handler.',\n );\n }\n }, [pressed, onPressedChange, componentName]);\n\n return { handlePressedChange };\n}\n", "import * as React from 'react';\n\n/**\n * Reference counter to track how many components are using the live region.\n * Only remove the live region when no components are using it.\n */\nlet liveRegionRefCount = 0;\n\n/**\n * Hook for making live announcements to screen readers\n * Creates a hidden aria-live region for announcing dynamic content changes\n */\nexport function useLiveAnnouncer() {\n // Track the timeout so we can clean it up on unmount\n const timeoutRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n // Create aria-live region if it doesn't exist\n React.useEffect(() => {\n let liveRegion = document.getElementById('kui-live-announcer');\n\n if (!liveRegion) {\n liveRegion = document.createElement('div');\n liveRegion.id = 'kui-live-announcer';\n liveRegion.setAttribute('aria-live', 'polite');\n liveRegion.setAttribute('aria-atomic', 'true');\n liveRegion.style.cssText = `\n position: absolute;\n left: -10000px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n `;\n document.body.appendChild(liveRegion);\n }\n\n // Increment ref count when component mounts\n liveRegionRefCount++;\n\n return () => {\n // Decrement ref count when component unmounts\n liveRegionRefCount--;\n\n // Clean up timeout on unmount\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n // Only remove the live region if no components are using it\n if (liveRegionRefCount === 0) {\n const region = document.getElementById('kui-live-announcer');\n if (region) {\n region.remove();\n }\n }\n };\n }, []);\n\n const announce = React.useCallback((message: string) => {\n const liveRegion = document.getElementById('kui-live-announcer');\n if (liveRegion) {\n // Clear any pending timeout\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n\n // Clear previous announcements\n liveRegion.textContent = '';\n\n // Add new announcement with a small delay to ensure it's announced\n timeoutRef.current = setTimeout(() => {\n liveRegion.textContent = message;\n }, 100);\n }\n }, []);\n\n return announce;\n}\n"],
|
|
5
|
-
"mappings": ";0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAuB,oBCAvB,IAAAC,EAAuB,oBAMnBC,EAAqB,EAMlB,SAASC,GAAmB,CAEjC,IAAMC,EAAmB,SAAkD,MAAS,EAGpF,OAAM,YAAU,IAAM,CACpB,IAAIC,EAAa,SAAS,eAAe,oBAAoB,EAE7D,OAAKA,IACHA,EAAa,SAAS,cAAc,KAAK,EACzCA,EAAW,GAAK,qBAChBA,EAAW,aAAa,YAAa,QAAQ,EAC7CA,EAAW,aAAa,cAAe,MAAM,EAC7CA,EAAW,MAAM,QAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAS3B,SAAS,KAAK,YAAYA,CAAU,GAItCH,IAEO,IAAM,CAUX,GARAA,IAGIE,EAAW,SACb,aAAaA,EAAW,OAAO,EAI7BF,IAAuB,EAAG,CAC5B,IAAMI,EAAS,SAAS,eAAe,oBAAoB,EACvDA,GACFA,EAAO,OAAO,CAElB,CACF,CACF,EAAG,CAAC,CAAC,EAEkB,cAAaC,GAAoB,CACtD,IAAMF,EAAa,SAAS,eAAe,oBAAoB,EAC3DA,IAEED,EAAW,SACb,aAAaA,EAAW,OAAO,EAIjCC,EAAW,YAAc,GAGzBD,EAAW,QAAU,WAAW,IAAM,CACpCC,EAAW,YAAcE,CAC3B,EAAG,GAAG,EAEV,EAAG,CAAC,CAAC,CAGP,CD1CO,SAASC,EAAe,CAAE,QAAAC,EAAS,gBAAAC,EAAiB,kBAAAC,EAAmB,cAAAC,CAAc,EAA0B,CACpH,IAAMC,EAAWC,EAAiB,EAG5BC,EAAkB,SAAO,EAAK,EAM9BC,EAA4B,cAC/BC,GAAwB,CACvB,IAAMC,EAAiBP,EAAkB,EAEzCE,EAAS,GAAGK,CAAc,IAAID,EAAa,UAAY,WAAW,EAAE,EAEpEP,IAAkBO,CAAU,CAC9B,EACA,CAACJ,EAAUH,EAAiBC,CAAiB,CAC/C,EAIA,OAAM,YAAU,IAAM,CAStB,EAAG,CAACF,EAASC,EAAiBE,CAAa,CAAC,EAErC,CAAE,oBAAAI,CAAoB,CAC/B",
|
|
6
|
-
"names": ["use_toggle_state_exports", "__export", "useToggleState", "__toCommonJS", "React", "React", "liveRegionRefCount", "useLiveAnnouncer", "timeoutRef", "liveRegion", "region", "message", "useToggleState", "pressed", "onPressedChange", "getAccessibleName", "componentName", "announce", "useLiveAnnouncer", "warnedRef", "handlePressedChange", "newPressed", "accessibleName"]
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { GetPropDefTypes } from './prop-def.js';
|
|
2
|
-
declare const shadowPropDefs: {
|
|
3
|
-
/**
|
|
4
|
-
* Sets the CSS **box-shadow** property using design system shadow tokens.
|
|
5
|
-
* Supports shadow scale values and responsive objects.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* shadow="3"
|
|
9
|
-
* shadow={{ sm: '2', lg: '4' }}
|
|
10
|
-
*
|
|
11
|
-
* @link
|
|
12
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow
|
|
13
|
-
*/
|
|
14
|
-
shadow: {
|
|
15
|
-
type: "enum";
|
|
16
|
-
className: string;
|
|
17
|
-
values: readonly ["1", "2", "3", "4", "5", "6"];
|
|
18
|
-
responsive: true;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
type ShadowProps = GetPropDefTypes<typeof shadowPropDefs>;
|
|
22
|
-
export { shadowPropDefs };
|
|
23
|
-
export type { ShadowProps };
|
|
24
|
-
//# sourceMappingURL=shadow.props.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shadow.props.d.ts","sourceRoot":"","sources":["../../../src/props/shadow.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,eAAe,CAAC;AAI9D,QAAA,MAAM,cAAc;IAClB;;;;;;;;;;OAUG;;;;;;;CASJ,CAAC;AAEF,KAAK,WAAW,GAAG,eAAe,CAAC,OAAO,cAAc,CAAC,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var h=(o,e)=>{for(var p in e)r(o,p,{get:e[p],enumerable:!0})},w=(o,e,p,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of f(e))!d.call(o,s)&&s!==p&&r(o,s,{get:()=>e[s],enumerable:!(a=t(e,s))||a.enumerable});return o};var y=o=>w(r({},"__esModule",{value:!0}),o);var n={};h(n,{shadowPropDefs:()=>u});module.exports=y(n);var P=["1","2","3","4","5","6"],u={shadow:{type:"enum",className:"kui-r-shadow",values:P,responsive:!0}};
|
|
2
|
-
//# sourceMappingURL=shadow.props.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/props/shadow.props.ts"],
|
|
4
|
-
"sourcesContent": ["import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst shadowValues = ['1', '2', '3', '4', '5', '6'] as const;\n\nconst shadowPropDefs = {\n /**\n * Sets the CSS **box-shadow** property using design system shadow tokens.\n * Supports shadow scale values and responsive objects.\n *\n * @example\n * shadow=\"3\"\n * shadow={{ sm: '2', lg: '4' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow\n */\n shadow: {\n type: 'enum',\n className: 'kui-r-shadow',\n values: shadowValues,\n responsive: true,\n },\n} satisfies {\n shadow: PropDef<(typeof shadowValues)[number]>;\n};\n\ntype ShadowProps = GetPropDefTypes<typeof shadowPropDefs>;\n\nexport { shadowPropDefs };\nexport type { ShadowProps };\n"],
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAMI,EAAe,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAE5CF,EAAiB,CAYrB,OAAQ,CACN,KAAM,OACN,UAAW,eACX,OAAQE,EACR,WAAY,EACd,CACF",
|
|
6
|
-
"names": ["shadow_props_exports", "__export", "shadowPropDefs", "__toCommonJS", "shadowValues"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{b as _}from"./chunk-WEBNIUEX.js";import*as n from"react";import{useLayoutEffect as de}from"radix-ui/internal";import me from"classnames";var x=n.forwardRef(({className:d,children:m,...R},g)=>{let{containerRef:E,controls:ee,cssVarName:D,minSize:L,maxSize:b,defaultSize:k,orientation:v,edge:te,growth:A,onResize:y,onResizeStart:q,onResizeEnd:z,snapPoints:T,snapTolerance:ne,collapseThreshold:V,collapsible:F,target:j,requestCollapse:re,requestToggle:B}=_(),S=n.useRef(null),oe=n.useCallback(e=>{S.current=e,typeof g=="function"?g(e):g&&(g.current=e)},[g]),C=n.useRef(null);n.useEffect(()=>()=>{C.current?.(),C.current=null},[]);let I=n.useCallback(()=>{let e=E.current;if(!e)return k;let t=Number.parseFloat(getComputedStyle(e).getPropertyValue(D));return Number.isFinite(t)?t:k},[E,D,k]),K=n.useCallback(()=>{let e=E.current,t=S.current,r=e?.closest(".kui-ShellRoot")?.getBoundingClientRect();if(!e||!r||!t)return b;let c=e.getBoundingClientRect(),p=t.getBoundingClientRect(),s=A(getComputedStyle(e).direction==="rtl"),o;v==="vertical"?o=s>0?r.right-c.left:c.right-r.left:o=s>0?r.bottom-c.top:c.bottom-r.top;let H=v==="vertical"?p.width:p.height;return!(r.width>0&&r.height>0)||!Number.isFinite(o)?b:Math.max(L,Math.min(b,Math.round(o-H)))},[E,A,b,L,v]),ie=()=>{S.current?.setAttribute("aria-valuemax",String(K()))};de(()=>{S.current?.setAttribute("aria-valuenow",String(Math.round(I())))},[I]);let M=(e,t)=>{e.style.setProperty(D,`${t}px`),S.current?.setAttribute("aria-valuenow",String(Math.round(t)))},ae=j.charAt(0).toUpperCase()+j.slice(1);return n.createElement("div",{ref:oe,className:me("kui-ShellResizer",d),"data-orientation":v,"data-edge":te,role:"separator",tabIndex:0,"aria-label":`Resize ${ae} pane`,"aria-controls":ee,"aria-orientation":v,"aria-valuemin":L,"aria-valuemax":b,...R,onPointerDown:e=>{R.onPointerDown?.(e);let t=E.current;if(!t||e.defaultPrevented||e.button!==0)return;e.preventDefault();let r=e.currentTarget,c=e.pointerId;C.current?.();try{r.setPointerCapture(c)}catch{}let p=getComputedStyle(t),s=Number.parseFloat(p.getPropertyValue(D)),o=Number.isFinite(s)?s:k,H=v==="vertical"?e.clientX:e.clientY,se=A(p.direction==="rtl"),X=K();r.setAttribute("aria-valuemax",String(X));let Y=i=>Math.min(Math.max(i,L),X);t.setAttribute("data-resizing",""),r.setAttribute("data-dragging","");let h=document.body,le=h.style.cursor,ce=h.style.userSelect;h.style.cursor=v==="vertical"?"col-resize":"row-resize",h.style.userSelect="none",q?.(o);let f=o,W=o,l=0,P=null,$=()=>{if(l=0,P===null)return;let i=P;P=null,y?.(i)},O=null,G=!1,ue=(i,w)=>{if(i.type===w)G=!0;else if(G)return!1;return!0},u=i=>{if(!ue(i,"pointermove")||i===O)return;O=i;let w=v==="vertical"?i.clientX:i.clientY;W=o+(w-H)*se,f=Y(W),M(t,f),P=f,l||(l=requestAnimationFrame($))},N=()=>{l&&cancelAnimationFrame(l),l=0;try{r.releasePointerCapture(c)}catch{}window.removeEventListener("pointermove",u),document.removeEventListener("pointermove",u),window.removeEventListener("mousemove",u),document.removeEventListener("mousemove",u),r.removeEventListener("pointermove",u),window.removeEventListener("pointerup",a),document.removeEventListener("pointerup",a),window.removeEventListener("mouseup",a),document.removeEventListener("mouseup",a),window.removeEventListener("pointercancel",a),document.removeEventListener("pointercancel",a),window.removeEventListener("keydown",J),r.removeEventListener("lostpointercapture",a),t.removeAttribute("data-resizing"),r.removeAttribute("data-dragging"),h.style.cursor=le,h.style.userSelect=ce,C.current=null},U=!1,a=()=>{if(U)return;if(U=!0,l&&cancelAnimationFrame(l),$(),F&&typeof V=="number"&&W<=V){M(t,o),y?.(o),N(),re?.(),z?.(o);return}let i=f;if(T&&T.length){let w=T.reduce((Q,Z)=>Math.abs(Z-f)<Math.abs(Q-f)?Z:Q,T[0]);Math.abs(w-f)<=ne&&(i=Y(w),M(t,i),y?.(i))}z?.(i),N()},J=i=>{i.key==="Escape"&&(l&&cancelAnimationFrame(l),l=0,P=null,M(t,o),y?.(o),U=!0,z?.(o),N())};window.addEventListener("pointermove",u),document.addEventListener("pointermove",u),window.addEventListener("mousemove",u),document.addEventListener("mousemove",u),r.addEventListener("pointermove",u),window.addEventListener("pointerup",a),document.addEventListener("pointerup",a),window.addEventListener("mouseup",a),document.addEventListener("mouseup",a),window.addEventListener("pointercancel",a),document.addEventListener("pointercancel",a),window.addEventListener("keydown",J),r.addEventListener("lostpointercapture",a),C.current=N},onDoubleClick:e=>{R.onDoubleClick?.(e),!e.defaultPrevented&&F&&B?.()},onFocus:e=>{R.onFocus?.(e),ie()},onKeyDown:e=>{R.onKeyDown?.(e);let t=E.current;if(!t||e.defaultPrevented)return;if(e.key==="Enter"){F&&B&&(e.preventDefault(),B());return}let r=I(),c=K(),p=o=>Math.min(Math.max(o,L),c),s;if(e.key==="Home")s=p(L);else if(e.key==="End")s=p(c);else{let o=v==="vertical"?e.key==="ArrowRight"?1:e.key==="ArrowLeft"?-1:0:e.key==="ArrowDown"?1:e.key==="ArrowUp"?-1:0;if(o===0)return;let H=e.shiftKey?32:8;s=p(r+o*H*A(getComputedStyle(t).direction==="rtl"))}e.preventDefault(),q?.(r),M(t,s),y?.(s),z?.(s)}},m)});x.displayName="Shell.Handle";var ve=n.forwardRef((d,m)=>n.createElement(x,{...d,ref:m}));ve.displayName="Shell.Panel.Handle";var pe=n.forwardRef((d,m)=>n.createElement(x,{...d,ref:m}));pe.displayName="Shell.Sidebar.Handle";var fe=n.forwardRef((d,m)=>n.createElement(x,{...d,ref:m}));fe.displayName="Shell.Inspector.Handle";var Ee=n.forwardRef((d,m)=>n.createElement(x,{...d,ref:m}));Ee.displayName="Shell.Bottom.Handle";export{x as a,ve as b,pe as c,fe as d,Ee as e};
|
|
3
|
-
//# sourceMappingURL=chunk-3QWGSRYC.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/_internal/shell-handles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport { useLayoutEffect } from 'radix-ui/internal';\nimport classNames from 'classnames';\nimport { usePaneResize } from './shell-resize.js';\n\n/**\n * The resize handle: the WAI-ARIA window splitter. `role=\"separator\"` with a\n * value, focusable because it is operable, `aria-controls` naming its pane.\n *\n * A drag writes the size variable directly on the pane and sets no React\n * state, so nothing re-renders per move. `onResize` is called at most once per\n * animation frame, and once more with the final size when the drag ends. The\n * direction and the ceiling are read once, when the drag starts.\n */\nexport const PaneHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>(({ className, children, ...props }, ref) => {\n const {\n containerRef,\n controls,\n cssVarName,\n minSize,\n maxSize,\n defaultSize,\n orientation,\n edge,\n growth,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n collapsible,\n target,\n requestCollapse,\n requestToggle,\n } = usePaneResize();\n\n const handleRef = React.useRef<HTMLDivElement | null>(null);\n const setRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n handleRef.current = node;\n if (typeof ref === 'function') ref(node);\n else if (ref) (ref as React.MutableRefObject<HTMLDivElement | null>).current = node;\n },\n [ref],\n );\n\n const activeCleanupRef = React.useRef<(() => void) | null>(null);\n React.useEffect(\n () => () => {\n activeCleanupRef.current?.();\n activeCleanupRef.current = null;\n },\n [],\n );\n\n /** The pane's size as the stylesheet sees it. Read at the edges of a gesture, never during one. */\n const readSize = React.useCallback(() => {\n const container = containerRef.current;\n if (!container) return defaultSize;\n const parsed = Number.parseFloat(getComputedStyle(container).getPropertyValue(cssVarName));\n return Number.isFinite(parsed) ? parsed : defaultSize;\n }, [containerRef, cssVarName, defaultSize]);\n\n /**\n * The largest size a resize may reach: the stated maximum, and never so\n * large that the handle leaves the frame. The room is measured from the\n * pane's anchored edge, which does not move, to the far edge of the frame,\n * so a pane that starts after a Rail has less room than the frame's width.\n * Without the cap a pane with a generous `maxSize` could be resized until\n * its own handle was off screen.\n */\n const ceiling = React.useCallback(() => {\n const container = containerRef.current;\n const handle = handleRef.current;\n const frame = container?.closest('.kui-ShellRoot')?.getBoundingClientRect();\n if (!container || !frame || !handle) return maxSize;\n const pane = container.getBoundingClientRect();\n const hitBox = handle.getBoundingClientRect();\n const sign = growth(getComputedStyle(container).direction === 'rtl');\n let room: number;\n if (orientation === 'vertical') room = sign > 0 ? frame.right - pane.left : pane.right - frame.left;\n else room = sign > 0 ? frame.bottom - pane.top : pane.bottom - frame.top;\n const hit = orientation === 'vertical' ? hitBox.width : hitBox.height;\n if (!(frame.width > 0 && frame.height > 0) || !Number.isFinite(room)) return maxSize;\n return Math.max(minSize, Math.min(maxSize, Math.round(room - hit)));\n }, [containerRef, growth, maxSize, minSize, orientation]);\n\n // The announced maximum is what a resize can reach now, not only the prop.\n const announceCeiling = () => {\n handleRef.current?.setAttribute('aria-valuemax', String(ceiling()));\n };\n\n // The announced value is seeded from the real size once the pane has a box.\n useLayoutEffect(() => {\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(readSize())));\n }, [readSize]);\n\n const write = (container: HTMLElement, size: number) => {\n container.style.setProperty(cssVarName, `${size}px`);\n handleRef.current?.setAttribute('aria-valuenow', String(Math.round(size)));\n };\n\n const targetLabel = target.charAt(0).toUpperCase() + target.slice(1);\n\n return (\n // A focusable separator with a value is the WAI-ARIA window splitter, an\n // interactive widget; jsx-a11y classes every separator as static.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <div\n ref={setRef}\n className={classNames('kui-ShellResizer', className)}\n data-orientation={orientation}\n data-edge={edge}\n role=\"separator\"\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n aria-label={`Resize ${targetLabel} pane`}\n aria-controls={controls}\n aria-orientation={orientation}\n aria-valuemin={minSize}\n aria-valuemax={maxSize}\n {...props}\n onPointerDown={(e) => {\n props.onPointerDown?.(e);\n const container = containerRef.current;\n if (!container || e.defaultPrevented || e.button !== 0) return;\n e.preventDefault();\n const handleEl = e.currentTarget as HTMLElement;\n const pointerId = e.pointerId;\n activeCleanupRef.current?.();\n try {\n handleEl.setPointerCapture(pointerId);\n } catch {\n // Capture can fail for a pointer that is already gone; the window listeners below still carry the drag.\n }\n\n // Everything a move needs is read here, once.\n const startStyle = getComputedStyle(container);\n const parsedStart = Number.parseFloat(startStyle.getPropertyValue(cssVarName));\n const startSize = Number.isFinite(parsedStart) ? parsedStart : defaultSize;\n const startClient = orientation === 'vertical' ? e.clientX : e.clientY;\n const sign = growth(startStyle.direction === 'rtl');\n const cap = ceiling();\n handleEl.setAttribute('aria-valuemax', String(cap));\n const clamp = (v: number) => Math.min(Math.max(v, minSize), cap);\n\n container.setAttribute('data-resizing', '');\n handleEl.setAttribute('data-dragging', '');\n const body = document.body;\n const prevCursor = body.style.cursor;\n const prevUserSelect = body.style.userSelect;\n body.style.cursor = orientation === 'vertical' ? 'col-resize' : 'row-resize';\n body.style.userSelect = 'none';\n onResizeStart?.(startSize);\n\n let current = startSize;\n // The unclamped size, so `collapseThreshold` is compared before the\n // clamp: a threshold below `minSize` can then still collapse the pane.\n let raw = startSize;\n let frame = 0;\n let pending: number | null = null;\n const flush = () => {\n frame = 0;\n if (pending === null) return;\n const size = pending;\n pending = null;\n onResize?.(size);\n };\n\n // The move handler listens on the handle, the document and the window,\n // so a drag survives environments where pointer events do not reach\n // all three. One movement can therefore arrive several times: once per\n // node it propagates through, and again as the compatibility mouse\n // event. Only the first copy does any work.\n let lastHandledMove: Event | null = null;\n let seenPointerEvent = false;\n const shouldHandle = (ev: Event, pointerType: string) => {\n if (ev.type === pointerType) seenPointerEvent = true;\n else if (seenPointerEvent) return false;\n return true;\n };\n\n const handleMove = (ev: PointerEvent) => {\n if (!shouldHandle(ev, 'pointermove')) return;\n if (ev === lastHandledMove) return;\n lastHandledMove = ev;\n const client = orientation === 'vertical' ? ev.clientX : ev.clientY;\n raw = startSize + (client - startClient) * sign;\n current = clamp(raw);\n write(container, current);\n pending = current;\n if (!frame) frame = requestAnimationFrame(flush);\n };\n\n const cleanup = () => {\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n try {\n handleEl.releasePointerCapture(pointerId);\n } catch {\n // Already released.\n }\n window.removeEventListener('pointermove', handleMove as EventListener);\n document.removeEventListener('pointermove', handleMove as EventListener);\n window.removeEventListener('mousemove', handleMove as EventListener);\n document.removeEventListener('mousemove', handleMove as EventListener);\n handleEl.removeEventListener('pointermove', handleMove as EventListener);\n window.removeEventListener('pointerup', handleUp as EventListener);\n document.removeEventListener('pointerup', handleUp as EventListener);\n window.removeEventListener('mouseup', handleUp as EventListener);\n document.removeEventListener('mouseup', handleUp as EventListener);\n window.removeEventListener('pointercancel', handleUp as EventListener);\n document.removeEventListener('pointercancel', handleUp as EventListener);\n window.removeEventListener('keydown', handleKey as EventListener);\n handleEl.removeEventListener('lostpointercapture', handleUp as EventListener);\n container.removeAttribute('data-resizing');\n handleEl.removeAttribute('data-dragging');\n body.style.cursor = prevCursor;\n body.style.userSelect = prevUserSelect;\n activeCleanupRef.current = null;\n };\n\n let finished = false;\n const handleUp = () => {\n if (finished) return;\n finished = true;\n // The last move's size is delivered now rather than on the next frame.\n if (frame) cancelAnimationFrame(frame);\n flush();\n\n if (collapsible && typeof collapseThreshold === 'number' && raw <= collapseThreshold) {\n // A drag past the threshold closes the pane and keeps no size: the\n // pane opens again at the size it had before the drag. The drag\n // still ends, at that size, so a consumer that started something\n // in onResizeStart can stop it.\n write(container, startSize);\n onResize?.(startSize);\n cleanup();\n requestCollapse?.();\n onResizeEnd?.(startSize);\n return;\n }\n\n let settled = current;\n if (snapPoints && snapPoints.length) {\n const nearest = snapPoints.reduce((acc, p) => (Math.abs(p - current) < Math.abs(acc - current) ? p : acc), snapPoints[0]);\n if (Math.abs(nearest - current) <= snapTolerance) {\n settled = clamp(nearest);\n write(container, settled);\n onResize?.(settled);\n }\n }\n onResizeEnd?.(settled);\n cleanup();\n };\n\n const handleKey = (kev: KeyboardEvent) => {\n if (kev.key !== 'Escape') return;\n if (frame) cancelAnimationFrame(frame);\n frame = 0;\n pending = null;\n write(container, startSize);\n onResize?.(startSize);\n finished = true;\n onResizeEnd?.(startSize);\n cleanup();\n };\n\n window.addEventListener('pointermove', handleMove as EventListener);\n document.addEventListener('pointermove', handleMove as EventListener);\n window.addEventListener('mousemove', handleMove as EventListener);\n document.addEventListener('mousemove', handleMove as EventListener);\n handleEl.addEventListener('pointermove', handleMove as EventListener);\n window.addEventListener('pointerup', handleUp as EventListener);\n document.addEventListener('pointerup', handleUp as EventListener);\n window.addEventListener('mouseup', handleUp as EventListener);\n document.addEventListener('mouseup', handleUp as EventListener);\n window.addEventListener('pointercancel', handleUp as EventListener);\n document.addEventListener('pointercancel', handleUp as EventListener);\n window.addEventListener('keydown', handleKey as EventListener);\n handleEl.addEventListener('lostpointercapture', handleUp as EventListener);\n activeCleanupRef.current = cleanup;\n }}\n onDoubleClick={(e) => {\n props.onDoubleClick?.(e);\n if (!e.defaultPrevented && collapsible) requestToggle?.();\n }}\n onFocus={(e) => {\n props.onFocus?.(e);\n announceCeiling();\n }}\n onKeyDown={(e) => {\n props.onKeyDown?.(e);\n const container = containerRef.current;\n if (!container || e.defaultPrevented) return;\n // Enter collapses and restores the pane, as a double-click does (WAI-ARIA window splitter).\n if (e.key === 'Enter') {\n if (collapsible && requestToggle) {\n e.preventDefault();\n requestToggle();\n }\n return;\n }\n const current = readSize();\n // The keys reach as far as a drag does: the frame caps both.\n const cap = ceiling();\n const clamp = (v: number) => Math.min(Math.max(v, minSize), cap);\n let next: number | undefined;\n if (e.key === 'Home') next = clamp(minSize);\n else if (e.key === 'End') next = clamp(cap);\n else {\n // The key moves the boundary along its axis; the pane grows or\n // shrinks the way a drag in that direction would, so Bottom's\n // ArrowUp grows it and an end-anchored pane mirrors in RTL.\n const along = orientation === 'vertical' ? (e.key === 'ArrowRight' ? 1 : e.key === 'ArrowLeft' ? -1 : 0) : e.key === 'ArrowDown' ? 1 : e.key === 'ArrowUp' ? -1 : 0;\n if (along === 0) return;\n const step = e.shiftKey ? 32 : 8;\n next = clamp(current + along * step * growth(getComputedStyle(container).direction === 'rtl'));\n }\n e.preventDefault();\n onResizeStart?.(current);\n write(container, next);\n onResize?.(next);\n onResizeEnd?.(next);\n }}\n >\n {children}\n </div>\n );\n});\nPaneHandle.displayName = 'Shell.Handle';\n\nexport const PanelHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nPanelHandle.displayName = 'Shell.Panel.Handle';\n\nexport const SidebarHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nSidebarHandle.displayName = 'Shell.Sidebar.Handle';\n\nexport const InspectorHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nInspectorHandle.displayName = 'Shell.Inspector.Handle';\n\nexport const BottomHandle = React.forwardRef<HTMLDivElement, React.ComponentPropsWithoutRef<'div'>>((props, ref) => <PaneHandle {...props} ref={ref} />);\nBottomHandle.displayName = 'Shell.Bottom.Handle';\n"],
|
|
5
|
-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ACJ,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAK,CAAE,EACxJ8E,GAAc,YAAc,uBAErB,IAAMC,GAAwB,aAAkE,CAAChF,EAAOC,IAAQ,gBAACJ,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAK,CAAE,EAC1J+E,GAAgB,YAAc,yBAEvB,IAAMC,GAAqB,aAAkE,CAACjF,EAAOC,IAAQ,gBAACJ,EAAA,CAAY,GAAGG,EAAO,IAAKC,EAAK,CAAE,EACvJgF,GAAa,YAAc",
|
|
6
|
-
"names": ["React", "useLayoutEffect", "classNames", "PaneHandle", "className", "children", "props", "ref", "containerRef", "controls", "cssVarName", "minSize", "maxSize", "defaultSize", "orientation", "edge", "growth", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "collapsible", "target", "requestCollapse", "requestToggle", "usePaneResize", "handleRef", "setRef", "node", "activeCleanupRef", "readSize", "container", "parsed", "ceiling", "handle", "frame", "pane", "hitBox", "sign", "room", "hit", "announceCeiling", "useLayoutEffect", "write", "size", "targetLabel", "classNames", "handleEl", "pointerId", "startStyle", "parsedStart", "startSize", "startClient", "cap", "clamp", "v", "body", "prevCursor", "prevUserSelect", "current", "raw", "pending", "flush", "lastHandledMove", "seenPointerEvent", "shouldHandle", "ev", "pointerType", "handleMove", "client", "cleanup", "handleUp", "handleKey", "finished", "settled", "nearest", "acc", "p", "kev", "next", "along", "step", "PanelHandle", "SidebarHandle", "InspectorHandle", "BottomHandle"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{z as e}from"zod";var t=e.object({as:e.string().optional().describe("HTML element type to render as"),asChild:e.boolean().optional().describe("Merge props with child element instead of rendering wrapper"),size:e.union([e.enum(["1","2","3","4"]),e.object({initial:e.enum(["1","2","3","4"]).optional(),sm:e.enum(["1","2","3","4"]).optional(),md:e.enum(["1","2","3","4"]).optional(),lg:e.enum(["1","2","3","4"]).optional(),xl:e.enum(["1","2","3","4"]).optional()})]).default("2").describe("Button size for responsive design and interface density"),variant:e.enum(["raised","solid","soft","surface","outline","ghost"]).default("solid").describe("Visual variant that determines the button's appearance and context"),color:e.enum(["tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","gold","bronze","gray"]).optional().describe("Accent color for the button"),radius:e.enum(["none","small","medium","large","full"]).optional().describe("Border radius for the button"),loading:e.boolean().optional().default(!1).describe("Loading state that shows a spinner and disables interaction"),disabled:e.boolean().optional().default(!1).describe("Disabled state"),type:e.enum(["button","submit","reset"]).optional().describe("Type attribute for form buttons"),className:e.string().optional().describe("Additional CSS class name"),style:e.record(e.string(),e.union([e.string(),e.number()])).optional().describe("Inline styles"),onClick:e.function().optional().describe("Click handler"),onFocus:e.function().optional().describe("Focus handler"),onBlur:e.function().optional().describe("Blur handler"),onMouseEnter:e.function().optional().describe("Mouse enter handler"),onMouseLeave:e.function().optional().describe("Mouse leave handler"),onKeyDown:e.function().optional().describe("Key down handler"),onKeyUp:e.function().optional().describe("Key up handler"),onSubmit:e.function().optional().describe("Form submission handler"),tabIndex:e.number().optional().describe("Tab index for keyboard navigation"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),"aria-describedby":e.string().optional().describe("ARIA described by reference"),"aria-expanded":e.boolean().optional().describe("ARIA expanded state"),"aria-pressed":e.boolean().optional().describe("ARIA pressed state"),"aria-current":e.union([e.boolean(),e.enum(["page","step","location","date","time"])]).optional().describe("ARIA current state"),"aria-controls":e.string().optional().describe("ARIA controls reference"),"aria-owns":e.string().optional().describe("ARIA owns reference"),"data-*":e.record(e.string(),e.string()).optional().describe("Data attributes"),id:e.string().optional().describe("ID attribute"),title:e.string().optional().describe("Title attribute for tooltip"),role:e.string().optional().describe("Role attribute"),children:e.any().optional().describe("Children elements")}).strict();function i(n){return n}export{t as a,i as b};
|
|
3
|
-
//# sourceMappingURL=chunk-5KQCG7AV.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/schemas/base-button.schema.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod';\n\n/**\n * BaseButton Zod schema - Single source of truth for all button component props\n *\n * This schema defines the core button functionality used by the Button and Toggle\n * components. It ensures consistency across\n * the design system and provides machine-readable validation.\n *\n * @example\n * ```tsx\n * // Basic validation\n * const props = BaseButtonSchema.parse({ size: '2', variant: 'solid' });\n *\n * // With responsive props\n * const responsiveProps = BaseButtonSchema.parse({\n * size: { initial: '1', sm: '2', md: '3' },\n * variant: 'solid'\n * });\n * ```\n */\nexport const BaseButtonSchema = z\n .object({\n /**\n * Polymorphic rendering - render as different HTML elements\n * @default 'button'\n */\n as: z.string().optional().describe('HTML element type to render as'),\n\n /**\n * Use asChild to merge props with child element\n * @default false\n */\n asChild: z\n .boolean()\n .optional()\n .describe('Merge props with child element instead of rendering wrapper'),\n\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n * @default '2'\n */\n size: z\n .union([\n z.enum(['1', '2', '3', '4']),\n z.object({\n initial: z.enum(['1', '2', '3', '4']).optional(),\n sm: z.enum(['1', '2', '3', '4']).optional(),\n md: z.enum(['1', '2', '3', '4']).optional(),\n lg: z.enum(['1', '2', '3', '4']).optional(),\n xl: z.enum(['1', '2', '3', '4']).optional(),\n }),\n ])\n .default('2')\n .describe('Button size for responsive design and interface density'),\n\n /**\n * Visual variant that determines the button's appearance and context\n * @default 'solid'\n */\n variant: z\n .enum(['raised', 'solid', 'soft', 'surface', 'outline', 'ghost'])\n .default('solid')\n .describe(\"Visual variant that determines the button's appearance and context\"),\n\n /**\n * Accent color for the button\n */\n color: z\n .enum([\n 'tomato',\n 'red',\n 'ruby',\n 'crimson',\n 'pink',\n 'plum',\n 'purple',\n 'violet',\n 'iris',\n 'indigo',\n 'blue',\n 'cyan',\n 'teal',\n 'jade',\n 'green',\n 'grass',\n 'brown',\n 'orange',\n 'sky',\n 'mint',\n 'lime',\n 'yellow',\n 'amber',\n 'gold',\n 'bronze',\n 'gray',\n ])\n .optional()\n .describe('Accent color for the button'),\n\n /**\n * Border radius for the button\n */\n radius: z\n .enum(['none', 'small', 'medium', 'large', 'full'])\n .optional()\n .describe('Border radius for the button'),\n\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n * @default false\n */\n loading: z\n .boolean()\n .optional()\n .default(false)\n .describe('Loading state that shows a spinner and disables interaction'),\n\n /**\n * Disabled state\n * @default false\n */\n disabled: z.boolean().optional().default(false).describe('Disabled state'),\n\n /**\n * Type attribute for form buttons\n * @default 'button'\n */\n type: z\n .enum(['button', 'submit', 'reset'])\n .optional()\n .describe('Type attribute for form buttons'),\n\n /**\n * Additional CSS class name\n */\n className: z.string().optional().describe('Additional CSS class name'),\n\n /**\n * Inline styles\n */\n style: z\n .record(z.string(), z.union([z.string(), z.number()]))\n .optional()\n .describe('Inline styles'),\n\n /**\n * Click handler\n */\n onClick: z.function().optional().describe('Click handler'),\n\n /**\n * Focus handler\n */\n onFocus: z.function().optional().describe('Focus handler'),\n\n /**\n * Blur handler\n */\n onBlur: z.function().optional().describe('Blur handler'),\n\n /**\n * Mouse enter handler\n */\n onMouseEnter: z.function().optional().describe('Mouse enter handler'),\n\n /**\n * Mouse leave handler\n */\n onMouseLeave: z.function().optional().describe('Mouse leave handler'),\n\n /**\n * Key down handler\n */\n onKeyDown: z.function().optional().describe('Key down handler'),\n\n /**\n * Key up handler\n */\n onKeyUp: z.function().optional().describe('Key up handler'),\n\n /**\n * Form submission handler\n */\n onSubmit: z.function().optional().describe('Form submission handler'),\n\n /**\n * Tab index for keyboard navigation\n */\n tabIndex: z.number().optional().describe('Tab index for keyboard navigation'),\n\n /**\n * ARIA label for accessibility\n */\n 'aria-label': z.string().optional().describe('ARIA label for accessibility'),\n\n /**\n * ARIA labelled by reference\n */\n 'aria-labelledby': z.string().optional().describe('ARIA labelled by reference'),\n\n /**\n * ARIA described by reference\n */\n 'aria-describedby': z.string().optional().describe('ARIA described by reference'),\n\n /**\n * ARIA expanded state\n */\n 'aria-expanded': z.boolean().optional().describe('ARIA expanded state'),\n\n /**\n * ARIA pressed state\n */\n 'aria-pressed': z.boolean().optional().describe('ARIA pressed state'),\n\n /**\n * ARIA current state\n */\n 'aria-current': z\n .union([z.boolean(), z.enum(['page', 'step', 'location', 'date', 'time'])])\n .optional()\n .describe('ARIA current state'),\n\n /**\n * ARIA controls reference\n */\n 'aria-controls': z.string().optional().describe('ARIA controls reference'),\n\n /**\n * ARIA owns reference\n */\n 'aria-owns': z.string().optional().describe('ARIA owns reference'),\n\n /**\n * Data attributes\n */\n 'data-*': z.record(z.string(), z.string()).optional().describe('Data attributes'),\n\n /**\n * ID attribute\n */\n id: z.string().optional().describe('ID attribute'),\n\n /**\n * Title attribute for tooltip\n */\n title: z.string().optional().describe('Title attribute for tooltip'),\n\n /**\n * Role attribute\n */\n role: z.string().optional().describe('Role attribute'),\n\n /**\n * Children elements\n */\n children: z.any().optional().describe('Children elements'),\n })\n .strict();\n\n/**\n * Type derived from BaseButton Zod schema\n * This ensures type safety and consistency with the schema\n */\nexport type BaseButtonProps = z.infer<typeof BaseButtonSchema>;\n\n/**\n * Development-only helper to validate and normalize props\n * This function should only be used in development mode\n *\n * @param props - Props to validate and normalize\n * @returns Validated and normalized props\n *\n * @example\n * ```tsx\n * // In development, this will validate props and show helpful errors\n * const validatedProps = parseBaseButtonProps({ size: 'invalid', variant: 'solid' });\n * // Throws: \"Invalid enum value. Expected '1' | '2' | '3' | '4', received 'invalid'\"\n * ```\n */\nexport function parseBaseButtonProps(props: unknown): BaseButtonProps {\n if (process.env.NODE_ENV === 'development') {\n return BaseButtonSchema.parse(props);\n }\n return props as BaseButtonProps;\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,OAAS,KAAA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M,CAAC,CAAC,CAAC,EACzE,SAAS,EACT,SAAS,oBAAoB,EAKhC,gBAAiBA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,yBAAyB,EAKzE,YAAaA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,qBAAqB,EAKjE,SAAUA,EAAE,OAAOA,EAAE,OAAO,EAAGA,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,SAAS,iBAAiB,EAKhF,GAAIA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,cAAc,EAKjD,MAAOA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,6BAA6B,EAKnE,KAAMA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,gBAAgB,EAKrD,SAAUA,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,mBAAmB,CAC3D,CAAC,EACA,OAAO,EAsBH,SAASE,EAAqBC,EAAiC,CAIpE,OAAOA,CACT",
|
|
6
|
-
"names": ["z", "BaseButtonSchema", "parseBaseButtonProps", "props"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{c as R}from"./chunk-5ON3XLRD.js";import{b as v}from"./chunk-XU74PNM2.js";import{c as y}from"./chunk-OKQAVYW4.js";import{a as K}from"./chunk-VQPANPMI.js";var B={};K(B,{Item:()=>x,Root:()=>h});import*as e from"react";import S from"classnames";import{ToggleGroup as I}from"radix-ui";import{useComposedRefs as H,useControllableState as j,useLayoutEffect as W}from"radix-ui/internal";var M=["1","2","3","4"],O=["horizontal","vertical"],F=["soft","raised","outline"],u={disabled:{type:"boolean",default:!1},size:{type:"enum",className:"kui-r-size",values:M,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:F,default:"soft"},orientation:{type:"enum",className:"kui-r-orientation",values:O,default:"horizontal",responsive:!0},...v};var b=e.createContext(null),q=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"]),h=e.forwardRef((n,s)=>{let a=R(n,u.size),{className:l,children:t,radius:i,value:m,defaultValue:p,onValueChange:D,style:w,disabled:c,onKeyDown:N,onPointerDown:k,...T}=y(a,u),[f,d]=j({prop:m,onChange:D,defaultProp:p??""}),r=e.useRef(!1),A=e.useMemo(()=>({selectFromKeyboard(o){r.current&&(r.current=!1,d(o))}}),[d]),g=e.useRef(null),V=H(s,g),P=e.Children.toArray(t).filter(e.isValidElement),z=P.length,G=Math.max(0,P.findIndex(o=>o.props.value===f));return W(()=>{let o=g.current;if(!o)return;let C=Array.from(o.querySelectorAll(":scope > .kui-SegmentedControlItem")),L=C.findIndex(E=>E.getAttribute("data-state")==="on");o.style.setProperty("--segmented-control-count",String(C.length||1)),o.style.setProperty("--segmented-control-index",String(Math.max(0,L)))}),e.createElement(b.Provider,{value:A},e.createElement(I.Root,{"data-disabled":c||void 0,"data-radius":i,ref:V,style:{"--segmented-control-count":z||1,"--segmented-control-index":G,...w},className:S("kui-SegmentedControlRoot",l),onValueChange:o=>{o&&d(o)},onKeyDown:o=>{N?.(o),r.current=q.has(o.key)},onPointerDown:o=>{k?.(o),r.current=!1},...T,type:"single",value:f,asChild:!1,disabled:!!c},t,e.createElement("div",{className:"kui-SegmentedControlIndicator"})))});h.displayName="SegmentedControl.Root";var x=e.forwardRef(({children:n,className:s,iconOnly:a,onFocus:l,...t},i)=>{let m=e.useContext(b);return e.createElement(I.Item,{ref:i,className:S("kui-reset","kui-SegmentedControlItem",s),"data-icon-only":a||void 0,onFocus:p=>{l?.(p),m?.selectFromKeyboard(t.value)},...t,asChild:!1},e.createElement("span",{className:"kui-SegmentedControlItemSeparator"}),e.createElement("span",{className:"kui-SegmentedControlItemLabel"},e.createElement("span",{className:"kui-SegmentedControlItemLabelActive"},n),e.createElement("span",{className:"kui-SegmentedControlItemLabelInactive","aria-hidden":!0},n)))});x.displayName="SegmentedControl.Item";export{h as a,x as b,B as c};
|
|
3
|
-
//# sourceMappingURL=chunk-5VYQDA5S.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/props/shadow.props.ts"],
|
|
4
|
-
"sourcesContent": ["import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst shadowValues = ['1', '2', '3', '4', '5', '6'] as const;\n\nconst shadowPropDefs = {\n /**\n * Sets the CSS **box-shadow** property using design system shadow tokens.\n * Supports shadow scale values and responsive objects.\n *\n * @example\n * shadow=\"3\"\n * shadow={{ sm: '2', lg: '4' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow\n */\n shadow: {\n type: 'enum',\n className: 'kui-r-shadow',\n values: shadowValues,\n responsive: true,\n },\n} satisfies {\n shadow: PropDef<(typeof shadowValues)[number]>;\n};\n\ntype ShadowProps = GetPropDefTypes<typeof shadowPropDefs>;\n\nexport { shadowPropDefs };\nexport type { ShadowProps };\n"],
|
|
5
|
-
"mappings": "AAEA,IAAMA,EAAe,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAE5CC,EAAiB,CAYrB,OAAQ,CACN,KAAM,OACN,UAAW,eACX,OAAQD,EACR,WAAY,EACd,CACF",
|
|
6
|
-
"names": ["shadowValues", "shadowPropDefs"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{b as P,d as $,f as A}from"./chunk-ISCZ57VL.js";import*as t from"react";import L from"classnames";import{useVirtualizer as oe}from"@tanstack/react-virtual";import{useLayoutEffect as B}from"radix-ui/internal";function q(r,a){if(r.style?.height!==a.style?.height||r.style?.transform!==a.style?.transform)return!1;let c=Object.keys(r);return c.length!==Object.keys(a).length?!1:c.every(s=>s==="style"||Object.is(r[s],a[s]))}var ce=t.memo(function({label:a,isHighlighted:c,id:s,style:f,tabIndex:h,"data-highlighted":o,"data-index":R,"aria-setsize":I,"aria-posinset":y,onMouseEnter:E,onMouseLeave:H,onClick:d,onKeyDown:T}){return t.createElement("div",{id:s,role:"menuitem",className:L("kui-reset","kui-BaseMenuItem","kui-VirtualMenuItem"),style:f,tabIndex:h,"data-highlighted":o,"data-index":R,"aria-setsize":I,"aria-posinset":y,onMouseEnter:E,onMouseLeave:H,onClick:d,onKeyDown:T},a)},q);function le(r,a,c){let[s,f]=t.useState(void 0);return B(()=>{let h=r.current;if(!a||!h)return;let o=document.createElement("div");o.className="kui-reset kui-BaseMenuItem kui-VirtualMenuItem",o.setAttribute("aria-hidden","true"),o.style.visibility="hidden",o.textContent="\xA0",h.appendChild(o);let R=o.getBoundingClientRect().height;o.remove(),f(R>0?R:void 0)},[r,a,c]),a?s:void 0}function de({items:r,itemLabel:a,renderItem:c,size:s,estimatedItemSize:f,overscan:h=5,onSelect:o,className:R,style:I,onKeyDown:y,onFocus:E,...H},d){let T=t.useId(),x=t.useRef(null),[S,m]=t.useState(-1),{isInsideMenu:l,size:C,itemHeight:U}=$(),D=A(),Y=t.useCallback(e=>{x.current=e,typeof d=="function"?d(e):d&&(d.current=e)},[d]),G=le(x,l&&s==null&&f==null,C),p=f??(s?P(s):G??U??P(C??"2"));if(!a&&!c)throw new Error("VirtualMenu requires either itemLabel or renderItem prop");let J=t.useMemo(()=>a?typeof a=="function"?a:e=>e[a]:null,[a]),v=t.useMemo(()=>r.length===0||S<0?-1:Math.min(S,r.length-1),[S,r.length]),Q=t.useMemo(()=>typeof p=="function"?p:()=>p,[p]),M=oe({count:r.length,getScrollElement:()=>x.current,estimateSize:Q,overscan:h}),X=M.getVirtualItems();B(()=>{M.measure()},[M,p]),t.useEffect(()=>{let e=x.current;if(!l||!e)return;let n=e.closest("[data-radix-menu-content]");if(!n)return;let i=u=>{u.target===n&&e.focus({preventScroll:!0})};return n.addEventListener("focusin",i),document.activeElement===n&&e.focus({preventScroll:!0}),()=>n.removeEventListener("focusin",i)},[l]);let z=t.useRef(y),w=t.useRef(E);z.current=y,w.current=E;let k=t.useRef(r),N=t.useRef(o),K=t.useRef(D);k.current=r,N.current=o,K.current=D;let g=t.useCallback(e=>{let n=k.current;e<0||e>=n.length||(N.current?.(n[e],e),K.current?.())},[]),b=t.useRef(M.scrollToIndex);b.current=M.scrollToIndex;let V=t.useRef(v);V.current=v;let Z=t.useCallback(e=>{let n=e.currentTarget.dataset.index;n!=null&&m(Number(n))},[]),ee=t.useCallback(e=>{let n=e.currentTarget.dataset.index;n!=null&&g(Number(n))},[g]),te=t.useCallback(e=>{let n=Number(e.currentTarget.dataset.index);m(i=>i===n?-1:i)},[]),ne=t.useCallback(e=>{if(e.key==="Enter"||e.key===" "){e.preventDefault(),e.stopPropagation();let n=e.currentTarget.dataset.index;n!=null&&g(Number(n))}},[g]),re=t.useCallback(e=>{if(z.current?.(e),e.defaultPrevented)return;let n=k.current,i=V.current;switch(e.key){case"ArrowDown":{e.preventDefault();let u=i<n.length-1?i+1:0;m(u),b.current(u,{align:"auto"});break}case"ArrowUp":{e.preventDefault();let u=i>0?i-1:n.length-1;m(u),b.current(u,{align:"auto"});break}case"Home":{e.preventDefault(),m(0),b.current(0,{align:"start"});break}case"End":{e.preventDefault();let u=n.length-1;m(u),b.current(u,{align:"end"});break}case"Enter":case" ":{e.preventDefault(),g(i);break}case"Tab":{l&&e.preventDefault();break}case"Escape":{l||e.currentTarget.blur();break}default:l&&e.key.length===1&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.stopPropagation()}},[g,l]),ae=t.useCallback(e=>{w.current?.(e),e.target===e.currentTarget&&V.current<0&&k.current.length>0&&m(0)},[]),O=t.useCallback(e=>`${T}-item-${e}`,[T]),ie=t.useMemo(()=>({overflow:"auto",position:"relative",...I}),[I]),j=M.getTotalSize(),se=t.useMemo(()=>({height:`${j}px`,width:"100%",position:"relative"}),[j]);return t.createElement("div",{...H,ref:Y,role:l?"group":"menu","aria-activedescendant":v>=0?O(v):void 0,tabIndex:0,onKeyDown:re,onFocus:ae,className:L("kui-VirtualMenuRoot",!l&&`kui-r-size-${s??"2"}`,R),style:ie},t.createElement("div",{className:"kui-VirtualMenuViewport",style:se},X.map(e=>{let n=r[e.index],i=e.index,u=v===i,ue={height:e.size,transform:`translateY(${e.start}px)`},F={id:O(i),isHighlighted:u,style:ue,tabIndex:-1,"data-highlighted":u?!0:void 0,"data-index":i,"aria-setsize":r.length,"aria-posinset":i+1,onMouseEnter:Z,onMouseLeave:te,onClick:ee,onKeyDown:ne};return c?t.createElement(c,{key:e.key,item:n,index:i,...F}):t.createElement(ce,{key:e.key,label:J(n),...F})})))}var W=t.forwardRef(de);W.displayName="VirtualMenu";var _=t.forwardRef(({className:r,children:a,...c},s)=>t.createElement("div",{ref:s,role:"menuitem",className:L("kui-reset","kui-BaseMenuItem","kui-VirtualMenuItem",r),...c},a));_.displayName="VirtualMenu.Item";var me=t.memo(_,q),ge=Object.assign(W,{Item:me});export{ge as a};
|
|
3
|
-
//# sourceMappingURL=chunk-7QBNXNEN.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/sheet.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\n/**\n * Sheet\n *\n * A side-placed overlay built on top of Radix Dialog. It inherits accessibility,\n * focus management, overlay behavior, and sizing scales from the base dialog, and\n * adds side placement and slide motion suited for navigation panels and drawers.\n *\n * Structure mirrors Dialog:\n * - Root, Trigger, Content, Title, Description, Close\n *\n * Notes\n * - Side: set with `side` on `Sheet.Content`. Aliases: `left` \u2192 `start`, `right` \u2192 `end`.\n * - Sizing: reuses Dialog content prop defs (width/min/max/height/size). Size follows the\n * Theme size; start/end sheets cap at the size's overlay width unless maxWidth is set.\n * - A11y: provide an accessible name via `Sheet.Title` or `aria-label` on `Sheet.Content`.\n * Radix owns the focus trap, initial focus and the return of focus to the trigger.\n *\n * Example\n * <Sheet.Root>\n * <Sheet.Trigger>\n * <Button>Open</Button>\n * </Sheet.Trigger>\n * <Sheet.Content side=\"end\" width={{ initial: '280px', md: '360px' }}>\n * <Sheet.Title>Details</Sheet.Title>\n * ...\n * <Sheet.Close>\n * <Button>Close</Button>\n * </Sheet.Close>\n * </Sheet.Content>\n * </Sheet.Root>\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\n\nimport { dialogContentPropDefs } from './dialog.props.js';\nimport type { DialogContentOwnProps } from './dialog.props.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { NavigatorHostContext, type NavigatorHost } from './_internal/navigator-host.js';\nimport { Heading } from './heading.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSizeProps } from '../hooks/theme-size.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { useBodyPointerEventsCleanup } from '../hooks/use-body-pointer-events-cleanup.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { HeadingProps } from './heading.js';\n\n/**\n * Supported sides for the Sheet.\n * Aliases are normalized RTL-aware: `left` \u2192 `start`, `right` \u2192 `end`.\n */\ntype SheetSide = 'start' | 'end' | 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Sheet is a side-placed overlay built on the Dialog primitive.\n * It reuses Dialog's accessibility, focus, overlay, and size scales, while adding side placement and slide motion.\n */\n\n// Root\n/**\n * Props for `Sheet.Root` (Radix Dialog root with `modal` forced on).\n */\ninterface SheetRootProps extends ComponentPropsWithout<typeof DialogPrimitive.Root, 'modal'> {}\nconst Root: React.FC<SheetRootProps> = (props) => <DialogPrimitive.Root {...props} modal />;\nRoot.displayName = 'Sheet.Root';\n\n// Trigger\n/** Element type for `Sheet.Trigger`. */\ntype SheetTriggerElement = React.ElementRef<typeof DialogPrimitive.Trigger>;\n/** Props for `Sheet.Trigger` (expects a single element child). */\ninterface SheetTriggerProps extends ComponentPropsWithout<typeof DialogPrimitive.Trigger, RemovedProps> {}\nconst Trigger = React.forwardRef<SheetTriggerElement, SheetTriggerProps>(({ children, ...props }, ref) => (\n <DialogPrimitive.Trigger {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Trigger>\n));\nTrigger.displayName = 'Sheet.Trigger';\n\n// Content\n/** Element type for `Sheet.Content`. */\n// Reuse dialog content prop defs for size/width/height tokens.\n// Built once at module scope: `extractProps` memoises on the identity of the\n// prop def objects it is handed, so rebuilding these per render would recompile\n// them every time a sheet renders.\nconst { align: _alignPropDef, ...dialogPropDefsForSheet } = dialogContentPropDefs;\nconst sheetPropDefs = dialogPropDefsForSheet;\n\n/** What a Navigator screen in this panel uses: its title names the sheet, its close closes it. */\nconst sheetNavigatorHost: NavigatorHost = {\n Title: ({ children }) => <DialogPrimitive.Title asChild>{children}</DialogPrimitive.Title>,\n Close: ({ children }) => <DialogPrimitive.Close asChild>{children}</DialogPrimitive.Close>,\n};\n\n/** Counts the Sheet.Title elements mounted inside a Sheet.Content, for the dev-only name check. */\nconst SheetTitleCountContext = React.createContext<React.MutableRefObject<number> | null>(null);\n\ntype SheetContentElement = React.ElementRef<typeof DialogPrimitive.Content>;\ninterface SheetContentProps\n extends ComponentPropsWithout<typeof DialogPrimitive.Content, RemovedProps>,\n Omit<DialogContentOwnProps, 'align'> {\n /** Side where the Sheet should appear. `left`/`right` alias to `start`/`end`. */\n side?: SheetSide;\n /** Optional DOM container to portal into. Defaults to `document.body`. */\n container?: React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>['container'];\n}\n\n/**\n * Renders the Sheet panel. Normalizes left/right to logical start/end and\n * forwards dialog sizing props. Provide an accessible name via `Sheet.Title`\n * or `aria-label`.\n */\nconst Content = React.forwardRef<SheetContentElement, SheetContentProps>((allProps, forwardedRef) => {\n const { side = 'start', forceMount, container, className, ...ownProps } = allProps;\n const restProps = useThemeSizeProps(ownProps, sheetPropDefs.size);\n const normalizedSideMap: Record<SheetSide, 'start' | 'end' | 'top' | 'bottom'> = {\n left: 'start',\n right: 'end',\n start: 'start',\n end: 'end',\n top: 'top',\n bottom: 'bottom',\n };\n const normalizedSide = normalizedSideMap[side];\n // Size/width/height class names come from the dialog defs \u2014 see `sheetPropDefs`.\n const { className: extractedClassName, ...contentProps } = extractProps(restProps, sheetPropDefs);\n\n // Dev-only a11y guard: the panel needs a name. A Sheet.Title anywhere inside counts it\n // in a layout effect, which runs before this ref is attached, so nesting doesn't matter.\n const titleCountRef = React.useRef(0);\n const combinedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n if (process.env.NODE_ENV !== 'production' && node) {\n const hasName = titleCountRef.current > 0 || Boolean(node.getAttribute('aria-label')) || Boolean(node.getAttribute('aria-labelledby'));\n if (!hasName) {\n console.warn('Sheet.Content: Missing accessible name. Include Sheet.Title inside it or provide aria-label.');\n }\n }\n },\n [forwardedRef],\n );\n\n useBodyPointerEventsCleanup();\n\n return (\n <DialogPrimitive.Portal container={container} forceMount={forceMount}>\n <SheetTitleCountContext.Provider value={titleCountRef}>\n <PortalTheme asChild>\n <DialogPrimitive.Overlay className=\"kui-BaseDialogOverlay kui-DialogOverlay kui-SheetOverlay\">\n <DialogPrimitive.Content\n {...contentProps}\n ref={combinedRef}\n className={classNames('kui-BaseDialogContent', 'kui-SheetContent', className, extractedClassName)}\n data-side={normalizedSide}\n aria-modal=\"true\"\n children={<NavigatorHostContext.Provider value={sheetNavigatorHost}>{contentProps.children}</NavigatorHostContext.Provider>}\n />\n </DialogPrimitive.Overlay>\n </PortalTheme>\n </SheetTitleCountContext.Provider>\n </DialogPrimitive.Portal>\n );\n});\nContent.displayName = 'Sheet.Content';\n\n// Title - renders as Heading with sensible defaults\ntype SheetTitleElement = React.ElementRef<typeof Heading>;\ntype SheetTitleProps = HeadingProps;\n/** Accessible title for the Sheet. Renders as Heading with sensible defaults. */\nconst Title = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ size = '4', weight = 'medium', ...props }, ref) => {\n const titleCountRef = React.useContext(SheetTitleCountContext);\n React.useLayoutEffect(() => {\n if (!titleCountRef) return;\n titleCountRef.current += 1;\n return () => {\n titleCountRef.current -= 1;\n };\n }, [titleCountRef]);\n return (\n <DialogPrimitive.Title asChild>\n <Heading ref={ref} size={size} weight={weight} {...props} />\n </DialogPrimitive.Title>\n );\n});\nTitle.displayName = 'Sheet.Title';\n\n// Description - renders as Text with sensible defaults\ntype SheetDescriptionElement = React.ElementRef<typeof Text>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof Text>;\n/** Supplementary description text for Sheet content. Renders as Text with sensible defaults. */\nconst Description = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(({ size = '2', emphasis = 'medium', ...rest }, ref) => (\n <DialogPrimitive.Description asChild>\n <Text ref={ref} size={size} emphasis={emphasis} {...rest} />\n </DialogPrimitive.Description>\n));\nDescription.displayName = 'Sheet.Description';\n\ntype SheetCloseElement = React.ElementRef<typeof DialogPrimitive.Close>;\ninterface SheetCloseProps extends ComponentPropsWithout<typeof DialogPrimitive.Close, RemovedProps> {}\n/** Close button for the Sheet. Expects a single element child rendered via `asChild`. */\nconst Close = React.forwardRef<SheetCloseElement, SheetCloseProps>(({ children, ...props }, ref) => (\n <DialogPrimitive.Close {...props} ref={ref} asChild>\n {requireReactElement(children)}\n </DialogPrimitive.Close>\n));\nClose.displayName = 'Sheet.Close';\n\nexport { Root, Trigger, Content, Title, Description, Close };\nexport type {\n SheetRootProps as RootProps,\n SheetTriggerProps as TriggerProps,\n SheetContentProps as ContentProps,\n SheetTitleProps as TitleProps,\n SheetDescriptionProps as DescriptionProps,\n SheetCloseProps as CloseProps,\n};\n"],
|
|
5
|
-
"mappings": ";sYAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,EAAA,YAAAC,EAAA,gBAAAC,EAAA,SAAAC,EAAA,UAAAC,EAAA,YAAAC,IAkCA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,UAAUC,MAAuB,WAgC1C,IAAMC,EAAkCC,GAAU,gBAACC,EAAgB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", "Content", "Description", "Root", "Title", "Trigger", "React", "classNames", "DialogPrimitive", "Root", "props", "DialogPrimitive", "Trigger", "children", "ref", "requireReactElement", "_alignPropDef", "dialogPropDefsForSheet", "dialogContentPropDefs", "sheetPropDefs", "sheetNavigatorHost", "SheetTitleCountContext", "Content", "allProps", "forwardedRef", "side", "forceMount", "container", "className", "ownProps", "restProps", "useThemeSizeProps", "normalizedSide", "extractedClassName", "contentProps", "extractProps", "titleCountRef", "combinedRef", "node", "useBodyPointerEventsCleanup", "PortalTheme", "classNames", "NavigatorHostContext", "Title", "size", "weight", "Heading", "Description", "emphasis", "rest", "Text", "Close"]
|
|
7
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as se,b as ie}from"./chunk-TUZ665BA.js";import{a as ne}from"./chunk-WUCBFB25.js";import{a as ae}from"./chunk-TGRHRMQI.js";import{a as re}from"./chunk-HGF4CKRY.js";import{b as te}from"./chunk-FVRVBB6O.js";import{a as Y}from"./chunk-BUXK5VGR.js";import{c as X}from"./chunk-5KMEUZWN.js";import{b as Z,c as ee}from"./chunk-GKDGNPBD.js";import{b as oe}from"./chunk-5ON3XLRD.js";import{c as W}from"./chunk-HBWBPBSA.js";import{a as Q}from"./chunk-LPLW7OWA.js";import{a as I}from"./chunk-L54FWKJE.js";import{b as J}from"./chunk-XU74PNM2.js";import{c as O}from"./chunk-OKQAVYW4.js";import{a as Le}from"./chunk-VQPANPMI.js";var je={};Le(je,{Content:()=>ye,Empty:()=>Se,Group:()=>Ve,Input:()=>Re,Item:()=>Te,Label:()=>Ee,List:()=>ve,Root:()=>Pe,Separator:()=>ke,Trigger:()=>ge,Value:()=>he});import*as e from"react";import d from"classnames";import{Popover as me}from"radix-ui";import{useCallbackRef as H,useComposedRefs as pe,useControllableState as A,useLayoutEffect as K}from"radix-ui/internal";import{Command as T,useCommandState as ce}from"cmdk";var Oe=["1","2","3","4"],G={size:{type:"enum",className:"kui-r-size",values:Oe,default:"2",responsive:!0}},ze=["raised","surface","soft","outline","ghost"],le={variant:{type:"enum",className:"kui-variant",values:ze,default:"raised"},error:{type:"boolean"},loading:{type:"boolean"},disabled:{type:"boolean"},readOnly:{type:"boolean"},...W,...J,width:I.width,placeholder:{type:"string"}},Me=["1","2","3","4"],z={size:{type:"enum",className:"kui-r-size",values:Me,default:"2",responsive:!0},...W,width:I.width,minWidth:I.minWidth,maxWidth:{...I.maxWidth,default:"480px"},...Q};var Fe={size:G.size},Be={size:z.size},be=new Set;function We(o){be.has(o)||(be.add(o),console.warn(o))}function Ge(o){let r=o,t=new Set;return{get:()=>r,set:a=>{Object.is(a,r)||(r=a,t.forEach(n=>n()))},subscribe:a=>(t.add(a),()=>{t.delete(a)})}}var ue=e.createContext(null),M=o=>{let r=e.useContext(ue);if(!r)throw new Error(`Combobox.${o} must be used within Combobox.Root`);return r},de=e.createContext(null),fe=e.createContext(null),Ce=e.createContext(null),xe=()=>e.useContext(Ce);function Ae(o){let r=o.getAttribute("aria-label")?.trim();if(r)return r;let t=o.getAttribute("aria-labelledby");if(t){let n=t.split(/\s+/).map(s=>o.ownerDocument.getElementById(s)?.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}let a=o.labels;if(a&&a.length>0){let n=Array.from(a).map(s=>s.textContent?.trim()).filter(Boolean).join(" ");if(n)return n}}var Pe=o=>{let{children:r,size:t,value:a,defaultValue:n=null,onValueChange:s,open:m,defaultOpen:f=!1,onOpenChange:l,placeholder:c="Select an option",searchPlaceholder:P="Search...",searchValue:g,defaultSearchValue:h="",onSearchValueChange:y,filter:C,shouldFilter:i=!0,loop:b=!0,disabled:R,resetSearchOnSelect:x=!0,resetSearchOnClose:S=!0,color:V,displayValue:v,...k}=o,u=oe(t,G.size),[E,w]=A({prop:m,defaultProp:f,onChange:l}),[p,we]=A({prop:a,defaultProp:n,onChange:s}),[q,N]=A({prop:g,defaultProp:h,onChange:y}),$=typeof v=="function"?v(p):v,[D]=e.useState(()=>Ge(p));K(()=>{D.set(p)},[D,p]);let F=H(L=>{w(L),!L&&S&&N("")}),_=H(L=>{we(L),w(!1),x&&N("")}),B=e.useRef(null),U=e.useCallback(()=>B.current?Ae(B.current):void 0,[]),Ie=e.useMemo(()=>({value:p,displayValue:$,setOpen:F,size:u,placeholder:c,searchPlaceholder:P,disabled:R,color:V,loop:b,shouldFilter:i,filter:C,triggerRef:B,getTriggerLabel:U}),[p,$,F,u,c,P,R,V,b,i,C,U]),Ne=e.useMemo(()=>({value:q,setValue:N}),[q,N]),De=e.useMemo(()=>({store:D,onSelect:_,disabled:R}),[D,_,R]);return e.createElement(ue.Provider,{value:Ie},e.createElement(de.Provider,{value:Ne},e.createElement(fe.Provider,{value:De},e.createElement(se,{open:E,onOpenChange:F,...k},r))))};Pe.displayName="Combobox.Root";var ge=e.forwardRef((o,r)=>{let t=M("Trigger"),{children:a,className:n,placeholder:s,disabled:m,readOnly:f,error:l,loading:c,color:P,radius:g,onClick:h,onKeyDown:y,type:C,...i}=O({size:t.size,...o},Fe,le),b=m??t.disabled,R=P??t.color,x=!!(f||c),S=t.value==null&&t.displayValue==null,V=pe(r,t.triggerRef),{getTriggerLabel:v}=t;e.useEffect(()=>{},[v]);let k=p=>{h?.(p),x&&p.preventDefault()},u=p=>{y?.(p),!(p.defaultPrevented||x||b)&&(p.key==="ArrowDown"||p.key==="ArrowUp")&&(p.preventDefault(),t.setOpen(!0))},E=e.createElement("span",{className:"kui-SelectIcon kui-SelectLoadingIcon","aria-hidden":"true"},e.createElement(Y,null)),w=e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-SelectTriggerInner"},e.createElement("span",{className:"kui-ComboboxValue"},t.displayValue??t.value??s??t.placeholder)),c?E:e.createElement(ee,{className:"kui-SelectIcon"}));return e.createElement(ie,{disabled:b},e.createElement("button",{"data-accent-color":R,"data-radius":g,"data-error":l,"data-loading":c,"data-disabled":b||void 0,"data-read-only":f||void 0,"data-placeholder":S?"":void 0,...i,role:"combobox","aria-disabled":b||i["aria-disabled"],"aria-readonly":f||i["aria-readonly"],"aria-invalid":l||i["aria-invalid"],"aria-busy":c||i["aria-busy"],type:C??"button",disabled:b,onClick:k,onKeyDown:u,ref:V,className:d("kui-reset","kui-SelectTrigger","kui-ComboboxTrigger",n)},a?e.createElement(e.Fragment,null,ae(a),c?E:null):w))});ge.displayName="Combobox.Trigger";var he=e.forwardRef(({placeholder:o,children:r,className:t,...a},n)=>{let s=M("Value"),m=s.displayValue??s.value??void 0;return e.createElement("span",{...a,ref:n,className:d("kui-ComboboxValue",t)},m??r??o??s.placeholder)});he.displayName="Combobox.Value";function He(){let o=ce(n=>n.filtered.count),r=ce(n=>n.search),[t,a]=e.useState("");return e.useEffect(()=>{let n=r?o===0?"No results":`${o} result${o===1?"":"s"}`:"",s=window.setTimeout(()=>a(n),r?400:0);return()=>window.clearTimeout(s)},[o,r]),e.createElement(ne,{role:"status","aria-live":"polite","aria-atomic":"true"},t)}var ye=e.forwardRef((o,r)=>{let t=M("Content"),a=te(),n=o.size??t.size??z.size.default,{className:s,children:m,color:f,forceMount:l,container:c,onOpenAutoFocus:P,"aria-label":g,"aria-labelledby":h,...y}=O({...o,size:n},z),C=f||t.color||a.accentColor,{getTriggerLabel:i}=t,[b,R]=e.useState(i);K(()=>{if(b!==void 0)return;let u=i();u!==void 0&&R(u)},[i,b]);let x=o["aria-label"]??b,S=e.useMemo(()=>({sizeClassName:O({size:n},Be).className||void 0,color:C,label:x}),[n,C,x]),V=e.useRef(null),v=u=>{if(P?.(u),u.defaultPrevented)return;let E=V.current;if(!E||E.querySelector("[cmdk-input]"))return;u.preventDefault(),(E.querySelector("[cmdk-list]")??E).focus({preventScroll:!0})},k=t.value?.trim()||void 0;return e.createElement(me.Portal,{container:c,forceMount:l?!0:void 0},e.createElement(re,{asChild:!0},e.createElement(me.Content,{"data-accent-color":C,align:"start",sideOffset:4,collisionPadding:10,"aria-label":h?void 0:x,"aria-labelledby":h,...y,forceMount:l?!0:void 0,onOpenAutoFocus:v,ref:r,className:d("kui-PopperContent","kui-BaseMenuContent","kui-variant-soft","kui-ComboboxContent",s)},e.createElement(Ce.Provider,{value:S},e.createElement(T,{ref:V,loop:t.loop,shouldFilter:t.shouldFilter,filter:t.filter,label:x,defaultValue:k,className:"kui-ComboboxCommand"},m,e.createElement(He,null))))))});ye.displayName="Combobox.Content";var Re=e.forwardRef(({className:o,startAdornment:r,endAdornment:t,placeholder:a,variant:n,value:s,onValueChange:m,...f},l)=>{let c=M("Input"),P=e.useContext(de),g=xe(),h=n??"soft",y=s??P?.value??"",C=m??P?.setValue,i=e.createElement("div",{className:d("kui-TextFieldRoot","kui-ComboboxInputRoot",g?.sizeClassName,`kui-variant-${h}`),"data-accent-color":g?.color},r?e.createElement("div",{className:"kui-TextFieldSlot"},r):null,e.createElement(T.Input,{...f,ref:l,value:y,onValueChange:C,placeholder:a??c.searchPlaceholder,className:d("kui-reset","kui-TextFieldInput",o)}),t?e.createElement("div",{className:"kui-TextFieldSlot","data-side":"right"},t):null);return g?e.createElement("div",{className:"kui-ComboboxSearch"},i):i});Re.displayName="Combobox.Input";var ve=e.forwardRef(({className:o,children:r,label:t,...a},n)=>{let s=xe();return e.createElement("div",{className:"kui-ComboboxScrollArea"},e.createElement("div",{className:d("kui-BaseMenuViewport","kui-ComboboxViewport")},e.createElement(T.List,{...a,label:t??s?.label,ref:n,className:d("kui-ComboboxList",o)},r)))});ve.displayName="Combobox.List";var Se=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Empty,{...r,ref:t,className:d("kui-ComboboxEmpty",o)}));Se.displayName="Combobox.Empty";var Ve=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Group,{...r,ref:t,className:d("kui-BaseMenuGroup","kui-ComboboxGroup",o)}));Ve.displayName="Combobox.Group";var Ee=e.forwardRef(({className:o,id:r,...t},a)=>{let n=e.useId(),s=r??n,m=e.useRef(null),f=pe(a,m);return K(()=>{let l=m.current?.closest("[cmdk-group-items]");if(!(!l||l.hasAttribute("aria-labelledby")))return l.setAttribute("aria-labelledby",s),()=>{l.getAttribute("aria-labelledby")===s&&l.removeAttribute("aria-labelledby")}},[s]),e.createElement("div",{...t,id:s,ref:f,className:d("kui-BaseMenuLabel","kui-ComboboxLabel",o)})});Ee.displayName="Combobox.Label";var ke=e.forwardRef(({className:o,...r},t)=>e.createElement(T.Separator,{...r,ref:t,className:d("kui-BaseMenuSeparator","kui-ComboboxSeparator",o)}));ke.displayName="Combobox.Separator";function j(o){return o==null||typeof o=="boolean"?"":typeof o=="string"||typeof o=="number"?String(o):Array.isArray(o)?o.map(j).join(""):e.isValidElement(o)?j(o.props.children):""}var Te=e.forwardRef(({className:o,children:r,label:t,value:a,disabled:n,onSelect:s,keywords:m,...f},l)=>{let c=e.useContext(fe);if(!c)throw new Error("Combobox.Item must be used within Combobox.Root");let{store:P,onSelect:g,disabled:h}=c,y=a??(typeof r=="string"?r.trim():void 0),C=()=>y!==void 0&&P.get()===y,i=e.useSyncExternalStore(P.subscribe,C,C),b=H(s),R=e.useCallback(k=>{let u=a??k;g(u),b(u)},[a,g,b]),x=(t??j(r)).replace(/\s+/g," ").trim(),S=x?m?[x,...m]:[x]:m,V=S?S.join("\0"):"",v=n??h??!1;return e.createElement(T.Item,{key:V,...f,value:a,keywords:S,"aria-checked":i,disabled:v||void 0,ref:l,onSelect:R,className:d("kui-reset","kui-BaseMenuItem","kui-ComboboxItem",o)},i?e.createElement("span",{className:d("kui-BaseMenuItemIndicator","kui-ComboboxItemIndicator")},e.createElement(Z,{className:d("kui-BaseMenuItemIndicatorIcon","kui-ComboboxItemIndicatorIcon")})):null,e.createElement(X,null,r))});Te.displayName="Combobox.Item";export{Pe as a,ge as b,he as c,ye as d,Re as e,ve as f,Se as g,Ve as h,Ee as i,ke as j,Te as k,je as l};
|
|
3
|
-
//# sourceMappingURL=chunk-BQOFHLDP.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/combobox.tsx", "../../src/components/combobox.props.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\n/**\n * Combobox: Radix Popover for positioning, dismissal and focus; cmdk for search,\n * filtering and keyboard navigation.\n *\n * Render path. State is split so an interaction re-renders only what reads it:\n * - `ComboboxContext` (Trigger, Value, Content): config and the selected value.\n * Open state is not in it, so opening and closing re-render no consumer.\n * - `ComboboxSearchContext` (Input only): the search text.\n * - `ComboboxItemContext` (Items): stable values only. Items read \"am I selected\"\n * from a store through `useSyncExternalStore`, so a selection re-renders the old\n * and the new selected item, not all N.\n *\n * Highlight. cmdk's `data-selected` is the single highlight source, driven by both\n * the pointer and the keyboard. There is no separate CSS `:hover` highlight, so two\n * items are never lit at once and Enter always picks the lit item.\n */\n\nimport { warnDeprecated } from '../helpers/warn-deprecated.js';\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { useCallbackRef, useComposedRefs, useControllableState, useLayoutEffect } from 'radix-ui/internal';\nimport { Command as CommandPrimitive, useCommandState } from 'cmdk';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { useThemeSize } from '../hooks/theme-size.js';\nimport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs } from './combobox.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Spinner } from './spinner.js';\nimport { useThemeContext } from './theme.js';\nimport { PortalTheme } from './_internal/portal-theme.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport * as Popover from './popover.js';\nimport { Slottable } from './slot.js';\nimport { VisuallyHidden } from './visually-hidden.js';\n\nimport type { textFieldRootPropDefs } from './text-field.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldVariant = (typeof textFieldRootPropDefs.variant.values)[number];\ntype ComboboxValue = string | null;\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\n\n// Hoisted so extractProps' compiled prop-def cache (keyed by object identity) hits.\nconst triggerSizingPropDefs = { size: comboboxRootPropDefs.size };\nconst contentSizePropDefs = { size: comboboxContentPropDefs.size };\n\nconst warned = new Set<string>();\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n// ============================================================================\n// Selection store\n// ============================================================================\n\ninterface SelectionStore {\n get: () => ComboboxValue;\n set: (value: ComboboxValue) => void;\n subscribe: (listener: () => void) => () => void;\n}\n\nfunction createSelectionStore(initial: ComboboxValue): SelectionStore {\n let current = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => current,\n set: (next) => {\n if (Object.is(next, current)) return;\n current = next;\n listeners.forEach((listener) => listener());\n },\n subscribe: (listener) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n}\n\n// ============================================================================\n// Contexts\n// ============================================================================\n\ninterface ComboboxContextValue {\n value: ComboboxValue;\n displayValue?: string;\n setOpen: (open: boolean) => void;\n size?: ComboboxRootOwnProps['size'];\n placeholder?: string;\n searchPlaceholder?: string;\n disabled?: boolean;\n color?: string;\n loop: boolean;\n shouldFilter: boolean;\n filter?: CommandFilter;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n /** Reads the trigger's accessible name from the DOM (aria-label, aria-labelledby or <label>). */\n getTriggerLabel: () => string | undefined;\n}\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | null>(null);\n\nconst useComboboxContext = (componentName: string) => {\n const ctx = React.useContext(ComboboxContext);\n if (!ctx) {\n throw new Error(`Combobox.${componentName} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\ninterface ComboboxSearchContextValue {\n value: string;\n setValue: (value: string) => void;\n}\n\nconst ComboboxSearchContext = React.createContext<ComboboxSearchContextValue | null>(null);\n\ninterface ComboboxItemContextValue {\n store: SelectionStore;\n onSelect: (value: string) => void;\n disabled?: boolean;\n}\n\nconst ComboboxItemContext = React.createContext<ComboboxItemContextValue | null>(null);\n\n/** Values resolved by Content and read by Input and List. */\ninterface ComboboxContentContextValue {\n sizeClassName?: string;\n color?: string;\n label?: string;\n}\n\nconst ComboboxContentContext = React.createContext<ComboboxContentContextValue | null>(null);\n\nconst useComboboxContentContext = () => React.useContext(ComboboxContentContext);\n\n// ============================================================================\n// Root\n// ============================================================================\n\ntype ComboboxRootOwnProps = GetPropDefTypes<typeof comboboxRootPropDefs> & {\n value?: ComboboxValue;\n defaultValue?: ComboboxValue;\n onValueChange?: (value: ComboboxValue) => void;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n filter?: CommandFilter;\n shouldFilter?: boolean;\n loop?: boolean;\n disabled?: boolean;\n /** Clear the search text when an option is selected. Defaults to true. */\n resetSearchOnSelect?: boolean;\n /** Clear the search text when the popup is dismissed without a selection. Defaults to true. */\n resetSearchOnClose?: boolean;\n color?: (typeof comboboxTriggerPropDefs.color.values)[number];\n /**\n * Text shown in the trigger for the selected value. Without it the raw value is shown.\n * Can be a string or a function that receives the current value. Pass a stable\n * function (module scope or `useCallback`): an inline function runs on every render.\n * @example displayValue={(v) => items.find(i => i.value === v)?.label}\n */\n displayValue?: string | ((value: ComboboxValue) => string | undefined);\n};\n\ntype PopoverRootProps = React.ComponentPropsWithoutRef<typeof Popover.Root>;\ninterface ComboboxRootProps extends PopoverRootProps, ComboboxRootOwnProps {}\n\nfunction readElementLabel(el: HTMLElement): string | undefined {\n const ariaLabel = el.getAttribute('aria-label')?.trim();\n if (ariaLabel) return ariaLabel;\n\n const labelledBy = el.getAttribute('aria-labelledby');\n if (labelledBy) {\n const text = labelledBy\n .split(/\\s+/)\n .map((id) => el.ownerDocument.getElementById(id)?.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n const labels = (el as HTMLButtonElement).labels;\n if (labels && labels.length > 0) {\n const text = Array.from(labels)\n .map((label) => label.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n return undefined;\n}\n\nconst ComboboxRoot: React.FC<ComboboxRootProps> = (props) => {\n const {\n children,\n size: sizeProp,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n placeholder = 'Select an option',\n searchPlaceholder = 'Search...',\n searchValue: searchValueProp,\n defaultSearchValue = '',\n onSearchValueChange,\n filter,\n shouldFilter = true,\n loop = true,\n disabled,\n resetSearchOnSelect = true,\n resetSearchOnClose = true,\n color,\n displayValue: displayValueProp,\n ...rootProps\n } = props;\n const size = useThemeSize(sizeProp, comboboxRootPropDefs.size);\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const [value, setValue] = useControllableState<ComboboxValue>({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const [searchValue, setSearchValue] = useControllableState<string>({\n prop: searchValueProp,\n defaultProp: defaultSearchValue,\n onChange: onSearchValueChange,\n });\n\n const resolvedDisplayValue = typeof displayValueProp === 'function' ? displayValueProp(value) : displayValueProp;\n\n // Items subscribe to this store instead of the context, so a selection\n // re-renders only the items whose selected state flips.\n const [store] = React.useState(() => createSelectionStore(value));\n useLayoutEffect(() => {\n store.set(value);\n }, [store, value]);\n\n // The radix setters change identity whenever their controlled prop changes.\n // Reading them through callback refs keeps these handlers stable, so the\n // contexts below do not change on every keystroke or selection.\n const handleOpenChange = useCallbackRef((nextOpen: boolean) => {\n setOpen(nextOpen);\n if (!nextOpen && resetSearchOnClose) setSearchValue('');\n });\n\n const onSelect = useCallbackRef((nextValue: string) => {\n setValue(nextValue);\n setOpen(false);\n if (resetSearchOnSelect) setSearchValue('');\n });\n\n const triggerRef = React.useRef<HTMLButtonElement | null>(null);\n const getTriggerLabel = React.useCallback(() => (triggerRef.current ? readElementLabel(triggerRef.current) : undefined), []);\n\n const contextValue = React.useMemo<ComboboxContextValue>(\n () => ({\n value,\n displayValue: resolvedDisplayValue,\n setOpen: handleOpenChange,\n size,\n placeholder,\n searchPlaceholder,\n disabled,\n color,\n loop,\n shouldFilter,\n filter,\n triggerRef,\n getTriggerLabel,\n }),\n [value, resolvedDisplayValue, handleOpenChange, size, placeholder, searchPlaceholder, disabled, color, loop, shouldFilter, filter, getTriggerLabel],\n );\n\n const searchContextValue = React.useMemo<ComboboxSearchContextValue>(() => ({ value: searchValue, setValue: setSearchValue }), [searchValue, setSearchValue]);\n\n const itemContextValue = React.useMemo<ComboboxItemContextValue>(() => ({ store, onSelect, disabled }), [store, onSelect, disabled]);\n\n return (\n <ComboboxContext.Provider value={contextValue}>\n <ComboboxSearchContext.Provider value={searchContextValue}>\n <ComboboxItemContext.Provider value={itemContextValue}>\n <Popover.Root open={open} onOpenChange={handleOpenChange} {...rootProps}>\n {children}\n </Popover.Root>\n </ComboboxItemContext.Provider>\n </ComboboxSearchContext.Provider>\n </ComboboxContext.Provider>\n );\n};\nComboboxRoot.displayName = 'Combobox.Root';\n\n// ============================================================================\n// Trigger\n// ============================================================================\n\ntype ComboboxTriggerElement = HTMLButtonElement;\ntype ComboboxTriggerOwnProps = GetPropDefTypes<typeof comboboxTriggerPropDefs>;\ntype NativeTriggerProps = Omit<React.ComponentPropsWithoutRef<'button'>, 'color'>;\ninterface ComboboxTriggerProps extends NativeTriggerProps, ComboboxTriggerOwnProps {}\n\nconst ComboboxTrigger = React.forwardRef<ComboboxTriggerElement, ComboboxTriggerProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Trigger');\n\n const {\n children,\n className,\n placeholder,\n disabled,\n readOnly,\n error,\n loading,\n color,\n radius,\n onClick,\n onKeyDown,\n type: buttonType,\n ...triggerProps\n } = extractProps({ size: ctx.size, ...props }, triggerSizingPropDefs, comboboxTriggerPropDefs);\n\n const isDisabled = disabled ?? ctx.disabled;\n const resolvedColor = color ?? ctx.color;\n // Read-only and loading triggers stay focusable but do not open.\n const isBlocked = Boolean(readOnly || loading);\n const isPlaceholder = ctx.value == null && ctx.displayValue == null;\n\n const composedRef = useComposedRefs(forwardedRef, ctx.triggerRef);\n\n const { getTriggerLabel } = ctx;\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (!getTriggerLabel()) {\n warnOnce(\n 'Combobox.Trigger has no accessible name. The combobox role does not take its name from its content. Add `aria-label`, `aria-labelledby`, or a `<label htmlFor>` that points at the trigger.',\n );\n }\n }, [getTriggerLabel]);\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n // Radix skips its open toggle when the event is default-prevented.\n if (isBlocked) event.preventDefault();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isBlocked || isDisabled) return;\n // Both arrows open the list, as on Select (APG select-only combobox).\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {\n event.preventDefault();\n ctx.setOpen(true);\n }\n };\n\n const loadingIcon = (\n <span className=\"kui-SelectIcon kui-SelectLoadingIcon\" aria-hidden=\"true\">\n <Spinner />\n </span>\n );\n\n const defaultContent = (\n <>\n <span className=\"kui-SelectTriggerInner\">\n <span className=\"kui-ComboboxValue\">{ctx.displayValue ?? ctx.value ?? placeholder ?? ctx.placeholder}</span>\n </span>\n {loading ? loadingIcon : <ChevronDownIcon className=\"kui-SelectIcon\" />}\n </>\n );\n\n // Radix Popover.Trigger supplies aria-expanded, aria-controls (the popup id) and\n // aria-haspopup=\"dialog\", which matches the Popover dialog this opens.\n return (\n <Popover.Trigger disabled={isDisabled}>\n <button\n data-accent-color={resolvedColor}\n data-radius={radius}\n data-error={error}\n data-loading={loading}\n data-disabled={isDisabled || undefined}\n data-read-only={readOnly || undefined}\n data-placeholder={isPlaceholder ? '' : undefined}\n {...triggerProps}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props -- Popover.Trigger (Slot) adds aria-expanded and aria-controls\n role=\"combobox\"\n // The props win when set; otherwise a caller's own aria-* (a form library's aria-invalid) stays, as on Select.\n aria-disabled={isDisabled || triggerProps['aria-disabled']}\n aria-readonly={readOnly || triggerProps['aria-readonly']}\n aria-invalid={error || triggerProps['aria-invalid']}\n aria-busy={loading || triggerProps['aria-busy']}\n type={buttonType ?? 'button'}\n disabled={isDisabled}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n ref={composedRef}\n className={classNames('kui-reset', 'kui-SelectTrigger', 'kui-ComboboxTrigger', className)}\n >\n {/* Custom children replace the value and chevron; the spinner still shows while loading. */}\n {children ? (\n <>\n {requireReactElement(children)}\n {loading ? loadingIcon : null}\n </>\n ) : (\n defaultContent\n )}\n </button>\n </Popover.Trigger>\n );\n});\nComboboxTrigger.displayName = 'Combobox.Trigger';\n\n// ============================================================================\n// Value (standalone, for custom trigger layouts)\n// ============================================================================\n\ntype ComboboxValueElement = HTMLSpanElement;\ninterface ComboboxValueProps extends React.ComponentPropsWithoutRef<'span'> {\n placeholder?: string;\n}\n\nconst ComboboxValue = React.forwardRef<ComboboxValueElement, ComboboxValueProps>(({ placeholder, children, className, ...valueProps }, forwardedRef) => {\n const ctx = useComboboxContext('Value');\n const display = ctx.displayValue ?? ctx.value ?? undefined;\n return (\n <span {...valueProps} ref={forwardedRef} className={classNames('kui-ComboboxValue', className)}>\n {display ?? children ?? placeholder ?? ctx.placeholder}\n </span>\n );\n});\nComboboxValue.displayName = 'Combobox.Value';\n\n// ============================================================================\n// Content\n// ============================================================================\n\ntype ComboboxContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ntype ComboboxContentOwnProps = GetPropDefTypes<typeof comboboxContentPropDefs> & {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n};\ninterface ComboboxContentProps extends Omit<ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>, 'size'>, ComboboxContentOwnProps {}\n\n/** Announces the filtered result count to screen readers after typing settles. */\nfunction ComboboxAnnouncer() {\n const count = useCommandState((state) => state.filtered.count);\n const search = useCommandState((state) => state.search);\n const [message, setMessage] = React.useState('');\n\n React.useEffect(() => {\n const next = !search ? '' : count === 0 ? 'No results' : `${count} result${count === 1 ? '' : 's'}`;\n const timeout = window.setTimeout(() => setMessage(next), search ? 400 : 0);\n return () => window.clearTimeout(timeout);\n }, [count, search]);\n\n return (\n <VisuallyHidden role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {message}\n </VisuallyHidden>\n );\n}\n\nconst ComboboxContent = React.forwardRef<ComboboxContentElement, ComboboxContentProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Content');\n const themeContext = useThemeContext();\n\n // The list takes the field's size.\n const size = props.size ?? ctx.size ?? comboboxContentPropDefs.size.default;\n\n const {\n className,\n children,\n color,\n forceMount,\n container,\n onOpenAutoFocus,\n 'aria-label': _ariaLabel,\n 'aria-labelledby': ariaLabelledByProp,\n ...contentProps\n } = extractProps({ ...props, size }, comboboxContentPropDefs);\n\n const resolvedColor = color || ctx.color || themeContext.accentColor;\n\n\n // The trigger's name labels the popup, the search field and the listbox.\n // Read once per mount (the content remounts on every open); fall back to a\n // layout effect when the trigger was not attached yet (defaultOpen, forceMount).\n const { getTriggerLabel } = ctx;\n const [triggerLabel, setTriggerLabel] = React.useState(getTriggerLabel);\n useLayoutEffect(() => {\n if (triggerLabel !== undefined) return;\n const label = getTriggerLabel();\n if (label !== undefined) setTriggerLabel(label);\n }, [getTriggerLabel, triggerLabel]);\n\n const label = props['aria-label'] ?? triggerLabel;\n\n const contentContextValue = React.useMemo<ComboboxContentContextValue>(\n () => ({\n // Responsive-aware size class for the search field (never String() a responsive object).\n sizeClassName: extractProps({ size }, contentSizePropDefs).className || undefined,\n color: resolvedColor,\n label,\n }),\n [size, resolvedColor, label],\n );\n\n const commandRef = React.useRef<HTMLDivElement>(null);\n\n // Without a search field, focus would land on the popup itself, outside cmdk's\n // keydown handler. Focus the listbox instead so arrow keys and Enter work.\n const handleOpenAutoFocus = (event: Event) => {\n onOpenAutoFocus?.(event);\n if (event.defaultPrevented) return;\n const command = commandRef.current;\n if (!command || command.querySelector('[cmdk-input]')) return;\n event.preventDefault();\n const list = command.querySelector<HTMLElement>('[cmdk-list]');\n (list ?? command).focus({ preventScroll: true });\n };\n\n // Start the highlight on the selected option (cmdk trims item values).\n const initialHighlight = ctx.value?.trim() || undefined;\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount ? true : undefined}>\n <PortalTheme asChild>\n <PopoverPrimitive.Content\n data-accent-color={resolvedColor}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n aria-label={ariaLabelledByProp ? undefined : label}\n aria-labelledby={ariaLabelledByProp}\n {...contentProps}\n forceMount={forceMount ? true : undefined}\n onOpenAutoFocus={handleOpenAutoFocus}\n ref={forwardedRef}\n className={classNames('kui-PopperContent', 'kui-BaseMenuContent',\n 'kui-variant-soft', 'kui-ComboboxContent', className)}\n >\n <ComboboxContentContext.Provider value={contentContextValue}>\n <CommandPrimitive\n ref={commandRef}\n loop={ctx.loop}\n shouldFilter={ctx.shouldFilter}\n filter={ctx.filter}\n label={label}\n defaultValue={initialHighlight}\n className=\"kui-ComboboxCommand\"\n >\n {children}\n <ComboboxAnnouncer />\n </CommandPrimitive>\n </ComboboxContentContext.Provider>\n </PopoverPrimitive.Content>\n </PortalTheme>\n </PopoverPrimitive.Portal>\n );\n});\nComboboxContent.displayName = 'Combobox.Content';\n\n// ============================================================================\n// Input\n// ============================================================================\n\ntype ComboboxInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ninterface ComboboxInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange'> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n variant?: TextFieldVariant;\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst ComboboxInput = React.forwardRef<ComboboxInputElement, ComboboxInputProps>(\n ({ className, startAdornment, endAdornment, placeholder, variant: inputVariant, value, onValueChange, ...inputProps }, forwardedRef) => {\n const ctx = useComboboxContext('Input');\n const search = React.useContext(ComboboxSearchContext);\n const contentContext = useComboboxContentContext();\n\n const textFieldVariant = inputVariant ?? 'soft';\n\n // The search text lives in Root; only this component subscribes to it.\n const searchValue = value ?? search?.value ?? '';\n const handleSearchChange = onValueChange ?? search?.setValue;\n\n const inputField = (\n <div\n className={classNames('kui-TextFieldRoot', 'kui-ComboboxInputRoot', contentContext?.sizeClassName, `kui-variant-${textFieldVariant}`)}\n data-accent-color={contentContext?.color}\n >\n {startAdornment ? <div className=\"kui-TextFieldSlot\">{startAdornment}</div> : null}\n <CommandPrimitive.Input\n {...inputProps}\n ref={forwardedRef}\n value={searchValue}\n onValueChange={handleSearchChange}\n placeholder={placeholder ?? ctx.searchPlaceholder}\n className={classNames('kui-reset', 'kui-TextFieldInput', className)}\n />\n {endAdornment ? (\n <div className=\"kui-TextFieldSlot\" data-side=\"right\">\n {endAdornment}\n </div>\n ) : null}\n </div>\n );\n\n return contentContext ? <div className=\"kui-ComboboxSearch\">{inputField}</div> : inputField;\n },\n);\nComboboxInput.displayName = 'Combobox.Input';\n\n// ============================================================================\n// List\n// ============================================================================\n\ntype ComboboxListElement = React.ElementRef<typeof CommandPrimitive.List>;\ninterface ComboboxListProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> {}\n\n// cmdk's List owns its id (referenced by the input's aria-controls), role and\n// aria-label (set from `label`), so none of them are overridden here.\nconst ComboboxList = React.forwardRef<ComboboxListElement, ComboboxListProps>(({ className, children, label, ...listProps }, forwardedRef) => {\n const contentContext = useComboboxContentContext();\n return (\n <div className=\"kui-ComboboxScrollArea\">\n <div className={classNames('kui-BaseMenuViewport', 'kui-ComboboxViewport')}>\n <CommandPrimitive.List {...listProps} label={label ?? contentContext?.label} ref={forwardedRef} className={classNames('kui-ComboboxList', className)}>\n {children}\n </CommandPrimitive.List>\n </div>\n </div>\n );\n});\nComboboxList.displayName = 'Combobox.List';\n\n// ============================================================================\n// Empty\n// ============================================================================\n\ntype ComboboxEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ninterface ComboboxEmptyProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> {}\n\nconst ComboboxEmpty = React.forwardRef<ComboboxEmptyElement, ComboboxEmptyProps>(({ className, ...emptyProps }, forwardedRef) => (\n <CommandPrimitive.Empty {...emptyProps} ref={forwardedRef} className={classNames('kui-ComboboxEmpty', className)} />\n));\nComboboxEmpty.displayName = 'Combobox.Empty';\n\n// ============================================================================\n// Group\n// ============================================================================\n\ntype ComboboxGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ninterface ComboboxGroupProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> {}\n\nconst ComboboxGroup = React.forwardRef<ComboboxGroupElement, ComboboxGroupProps>(({ className, ...groupProps }, forwardedRef) => (\n <CommandPrimitive.Group {...groupProps} ref={forwardedRef} className={classNames('kui-BaseMenuGroup', 'kui-ComboboxGroup', className)} />\n));\nComboboxGroup.displayName = 'Combobox.Group';\n\n// ============================================================================\n// Label\n// ============================================================================\n\ntype ComboboxLabelElement = React.ElementRef<'div'>;\ninterface ComboboxLabelProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst ComboboxLabel = React.forwardRef<ComboboxLabelElement, ComboboxLabelProps>(({ className, id: idProp, ...labelProps }, forwardedRef) => {\n const generatedId = React.useId();\n const id = idProp ?? generatedId;\n const localRef = React.useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs(forwardedRef, localRef);\n\n // cmdk renders the group's role=\"group\" element itself and gives no way to\n // label it from a child, so name it after this label when inside a Group.\n useLayoutEffect(() => {\n const group = localRef.current?.closest('[cmdk-group-items]');\n if (!group || group.hasAttribute('aria-labelledby')) return;\n group.setAttribute('aria-labelledby', id);\n return () => {\n if (group.getAttribute('aria-labelledby') === id) group.removeAttribute('aria-labelledby');\n };\n }, [id]);\n\n return <div {...labelProps} id={id} ref={composedRef} className={classNames('kui-BaseMenuLabel', 'kui-ComboboxLabel', className)} />;\n});\nComboboxLabel.displayName = 'Combobox.Label';\n\n// ============================================================================\n// Separator\n// ============================================================================\n\ntype ComboboxSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ninterface ComboboxSeparatorProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> {}\n\nconst ComboboxSeparator = React.forwardRef<ComboboxSeparatorElement, ComboboxSeparatorProps>(({ className, ...separatorProps }, forwardedRef) => (\n <CommandPrimitive.Separator {...separatorProps} ref={forwardedRef} className={classNames('kui-BaseMenuSeparator', 'kui-ComboboxSeparator', className)} />\n));\nComboboxSeparator.displayName = 'Combobox.Separator';\n\n// ============================================================================\n// Item\n// ============================================================================\n\n/** Plain text of a React node tree, used as the item's search text. */\nfunction getNodeText(node: React.ReactNode): string {\n if (node == null || typeof node === 'boolean') return '';\n if (typeof node === 'string' || typeof node === 'number') return String(node);\n if (Array.isArray(node)) return node.map(getNodeText).join('');\n if (React.isValidElement<{ children?: React.ReactNode }>(node)) return getNodeText(node.props.children);\n return '';\n}\n\ntype ComboboxItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ninterface ComboboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'keywords' | 'onSelect'> {\n /**\n * Text matched by search. Defaults to the text of `children`. Set it when the\n * children are components whose text is not in the JSX (it cannot be read).\n */\n label?: string;\n /** Additional keywords for search filtering. */\n keywords?: string[];\n /** Called when the item is selected. */\n onSelect?: (value: string) => void;\n}\n\nconst ComboboxItem = React.forwardRef<ComboboxItemElement, ComboboxItemProps>(\n ({ className, children, label, value, disabled, onSelect, keywords, ...itemProps }, forwardedRef) => {\n const itemContext = React.useContext(ComboboxItemContext);\n if (!itemContext) {\n throw new Error('Combobox.Item must be used within Combobox.Root');\n }\n const { store, onSelect: onSelectFromRoot, disabled: rootDisabled } = itemContext;\n\n // Without `value`, cmdk uses the trimmed text of string children.\n const itemValue = value ?? (typeof children === 'string' ? children.trim() : undefined);\n const getIsSelected = () => itemValue !== undefined && store.get() === itemValue;\n const isSelected = React.useSyncExternalStore(store.subscribe, getIsSelected, getIsSelected);\n\n const onSelectProp = useCallbackRef(onSelect);\n // cmdk passes its resolved value (the `value` prop, or the text when `value` is omitted).\n const handleSelect = React.useCallback(\n (resolvedValue: string) => {\n const nextValue = value ?? resolvedValue;\n onSelectFromRoot(nextValue);\n onSelectProp(nextValue);\n },\n [value, onSelectFromRoot, onSelectProp],\n );\n\n // cmdk matches only `value` and `keywords`, so add the visible text as a keyword.\n const text = (label ?? getNodeText(children)).replace(/\\s+/g, ' ').trim();\n const searchKeywords = text ? (keywords ? [text, ...keywords] : [text]) : keywords;\n // cmdk stores keywords only when `value` changes. Remount the cmdk item when\n // they change so a new label or keyword list is picked up.\n const keywordsKey = searchKeywords ? searchKeywords.join('\\u0000') : '';\n\n const isDisabled = disabled ?? rootDisabled ?? false;\n\n return (\n <CommandPrimitive.Item\n key={keywordsKey}\n {...itemProps}\n value={value}\n keywords={searchKeywords}\n // cmdk owns aria-selected (the highlighted option); the chosen option is aria-checked.\n aria-checked={isSelected}\n disabled={isDisabled || undefined}\n ref={forwardedRef}\n onSelect={handleSelect}\n className={classNames('kui-reset', 'kui-BaseMenuItem', 'kui-ComboboxItem', className)}\n >\n {isSelected ? (\n <span className={classNames('kui-BaseMenuItemIndicator', 'kui-ComboboxItemIndicator')}>\n <ThickCheckIcon className={classNames('kui-BaseMenuItemIndicatorIcon', 'kui-ComboboxItemIndicatorIcon')} />\n </span>\n ) : null}\n <Slottable>{children}</Slottable>\n </CommandPrimitive.Item>\n );\n },\n);\nComboboxItem.displayName = 'Combobox.Item';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n ComboboxRoot as Root,\n ComboboxTrigger as Trigger,\n ComboboxValue as Value,\n ComboboxContent as Content,\n ComboboxInput as Input,\n ComboboxList as List,\n ComboboxEmpty as Empty,\n ComboboxGroup as Group,\n ComboboxLabel as Label,\n ComboboxSeparator as Separator,\n ComboboxItem as Item,\n};\n\nexport type {\n ComboboxRootProps as RootProps,\n ComboboxTriggerProps as TriggerProps,\n ComboboxValueProps as ValueProps,\n ComboboxContentProps as ContentProps,\n ComboboxInputProps as InputProps,\n ComboboxListProps as ListProps,\n ComboboxEmptyProps as EmptyProps,\n ComboboxGroupProps as GroupProps,\n ComboboxLabelProps as LabelProps,\n ComboboxSeparatorProps as SeparatorProps,\n ComboboxItemProps as ItemProps,\n};\n", "import { colorPropDef } from '../props/color.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\nimport { widthPropDefs } from '../props/width.props.js';\nimport { heightPropDefs } from '../props/height.props.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Shared responsive sizing inherited by Combobox.Root.\n */\nconst comboboxRootPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nconst triggerVariants = ['raised', 'surface', 'soft', 'outline', 'ghost'] as const;\n\n/**\n * Token-aware props specific to Combobox.Trigger.\n */\nconst comboboxTriggerPropDefs = {\n variant: { type: 'enum', className: 'kui-variant', values: triggerVariants, default: 'raised' },\n error: { type: 'boolean' },\n loading: { type: 'boolean' },\n disabled: { type: 'boolean' },\n readOnly: { type: 'boolean' },\n ...colorPropDef,\n ...radiusPropDef,\n width: widthPropDefs.width,\n placeholder: { type: 'string' },\n} satisfies {\n variant: PropDef<(typeof triggerVariants)[number]>;\n error: PropDef<boolean>;\n loading: PropDef<boolean>;\n disabled: PropDef<boolean>;\n readOnly: PropDef<boolean>;\n width: PropDef<string>;\n placeholder: PropDef<string>;\n};\n\n// The list takes sizes 1 to 4, like every menu.\nconst contentSizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Styling props for the dropdown surface rendered by Combobox.Content.\n */\nconst comboboxContentPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: contentSizes, default: '2', responsive: true },\n ...colorPropDef,\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\nexport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs };\n"],
|
|
5
|
-
"mappings": ";+mBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,UAAAC,GAAA,UAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,cAAAC,GAAA,YAAAC,GAAA,UAAAC,KAoBA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,OAAwB,WAC5C,OAAS,kBAAAC,EAAgB,mBAAAC,GAAiB,wBAAAC,EAAsB,mBAAAC,MAAuB,oBACvF,OAAS,WAAWC,EAAkB,mBAAAC,OAAuB,OCjB7D,IAAMC,GAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAK3BC,EAAuB,CAC3B,KAAM,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQD,GAAO,QAAS,IAAK,WAAY,EAAK,CAC/F,EAIME,GAAkB,CAAC,SAAU,UAAW,OAAQ,UAAW,OAAO,EAKlEC,GAA0B,CAC9B,QAAS,CAAE,KAAM,OAAQ,UAAW,cAAe,OAAQD,GAAiB,QAAS,QAAS,EAC9F,MAAO,CAAE,KAAM,SAAU,EACzB,QAAS,CAAE,KAAM,SAAU,EAC3B,SAAU,CAAE,KAAM,SAAU,EAC5B,SAAU,CAAE,KAAM,SAAU,EAC5B,GAAGE,EACH,GAAGC,EACH,MAAOC,EAAc,MACrB,YAAa,CAAE,KAAM,QAAS,CAChC,EAWMC,GAAe,CAAC,IAAK,IAAK,IAAK,GAAG,EAKlCC,EAA0B,CAC9B,KAAM,CAA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AAM,iDAAiD,EAEnE,GAAM,CAAE,MAAApG,EAAO,SAAUqG,EAAkB,SAAUC,CAAa,EAAIF,EAGhEG,EAAY5G,IAAU,OAAO3B,GAAa,SAAWA,EAAS,KAAK,EAAI,QACvEwI,EAAgB,IAAMD,IAAc,QAAavG,EAAM,IAAI,IAAMuG,EACjEE,EAAmB,uBAAqBzG,EAAM,UAAWwG,EAAeA,CAAa,EAErFE,EAAevG,EAAeE,CAAQ,EAEtCsG,EAAqB,cACxBC,GAA0B,CACzB,IAAMtG,EAAYX,GAASiH,EAC3BP,EAAiB/F,CAAS,EAC1BoG,EAAapG,CAAS,CACxB,EACA,CAACX,EAAO0G,EAAkBK,CAAY,CACxC,EAGMhJ,GAAQG,GAASkI,EAAY/H,CAAQ,GAAG,QAAQ,OAAQ,GAAG,EAAE,KAAK,EAClE6I,EAAiBnJ,EAAQwI,EAAW,CAACxI,EAAM,GAAGwI,CAAQ,EAAI,CAACxI,CAAI,EAAKwI,EAGpEY,EAAcD,EAAiBA,EAAe,KAAK,IAAQ,EAAI,GAE/DnF,EAAa1C,GAAYsH,GAAgB,GAE/C,OACE,gBAAC/B,EAAiB,KAAjB,CACC,IAAKuC,EACJ,GAAGX,EACJ,MAAOxG,EACP,SAAUkH,EAEV,eAAcJ,EACd,SAAU/E,GAAc,OACxB,IAAKZ,EACL,SAAU6F,EACV,UAAWnE,EAAW,YAAa,mBAAoB,mBAAoBzB,CAAS,GAEnF0F,EACC,gBAAC,QAAK,UAAWjE,EAAW,4BAA6B,2BAA2B,GAClF,gBAACuE,EAAA,CAAe,UAAWvE,EAAW,gCAAiC,+BAA+B,EAAG,CAC3G,EACE,KACJ,gBAACwE,EAAA,KAAWhJ,CAAS,CACvB,CAEJ,CACF,EACAiI,GAAa,YAAc",
|
|
6
|
-
"names": ["combobox_exports", "__export", "ComboboxContent", "ComboboxEmpty", "ComboboxGroup", "ComboboxInput", "ComboboxItem", "ComboboxLabel", "ComboboxList", "ComboboxRoot", "ComboboxSeparator", "ComboboxTrigger", "ComboboxValue", "React", "classNames", "PopoverPrimitive", "useCallbackRef", "useComposedRefs", "useControllableState", "useLayoutEffect", "CommandPrimitive", "useCommandState", "sizes", "comboboxRootPropDefs", "triggerVariants", "comboboxTriggerPropDefs", "colorPropDef", "radiusPropDef", "widthPropDefs", "contentSizes", "comboboxContentPropDefs", "heightPropDefs", "triggerSizingPropDefs", "comboboxRootPropDefs", "contentSizePropDefs", "comboboxContentPropDefs", "warned", "warnOnce", "message", "createSelectionStore", "initial", "current", "listeners", "next", "listener", "ComboboxContext", "useComboboxContext", "componentName", "ctx", "ComboboxSearchContext", "ComboboxItemContext", "ComboboxContentContext", "useComboboxContentContext", "readElementLabel", "el", "ariaLabel", "labelledBy", "text", "id", "labels", "label", "ComboboxRoot", "props", "children", "sizeProp", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "placeholder", "searchPlaceholder", "searchValueProp", "defaultSearchValue", "onSearchValueChange", "filter", "shouldFilter", "loop", "disabled", "resetSearchOnSelect", "resetSearchOnClose", "color", "displayValueProp", "rootProps", "size", "useThemeSize", "open", "setOpen", "useControllableState", "value", "setValue", "searchValue", "setSearchValue", "resolvedDisplayValue", "store", "useLayoutEffect", "handleOpenChange", "useCallbackRef", "nextOpen", "onSelect", "nextValue", "triggerRef", "getTriggerLabel", "contextValue", "searchContextValue", "itemContextValue", "PopoverRoot", "ComboboxTrigger", "forwardedRef", "className", "readOnly", "error", "loading", "radius", "onClick", "onKeyDown", "buttonType", "triggerProps", "extractProps", "comboboxTriggerPropDefs", "isDisabled", "resolvedColor", "isBlocked", "isPlaceholder", "composedRef", "useComposedRefs", "handleClick", "event", "handleKeyDown", "loadingIcon", "Spinner", "defaultContent", "ChevronDownIcon", "PopoverTrigger", "classNames", "requireReactElement", "ComboboxValue", "valueProps", "display", "ComboboxAnnouncer", "count", "useCommandState", "state", "search", "setMessage", "timeout", "VisuallyHidden", "ComboboxContent", "themeContext", "useThemeContext", "forceMount", "container", "onOpenAutoFocus", "_ariaLabel", "ariaLabelledByProp", "contentProps", "triggerLabel", "setTriggerLabel", "contentContextValue", "commandRef", "handleOpenAutoFocus", "command", "initialHighlight", "PopoverPrimitive", "PortalTheme", "CommandPrimitive", "ComboboxInput", "startAdornment", "endAdornment", "inputVariant", "inputProps", "contentContext", "textFieldVariant", "handleSearchChange", "inputField", "ComboboxList", "listProps", "ComboboxEmpty", "emptyProps", "ComboboxGroup", "groupProps", "ComboboxLabel", "idProp", "labelProps", "generatedId", "localRef", "group", "ComboboxSeparator", "separatorProps", "getNodeText", "node", "ComboboxItem", "keywords", "itemProps", "itemContext", "onSelectFromRoot", "rootDisabled", "itemValue", "getIsSelected", "isSelected", "onSelectProp", "handleSelect", "resolvedValue", "searchKeywords", "keywordsKey", "ThickCheckIcon", "Slottable"]
|
|
7
|
-
}
|