@womp/kookie-ui 0.15.1 → 0.17.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/codemods/space-0.17.py +71 -0
- package/components.css +2253 -3088
- package/dist/cjs/components/_internal/base-button.d.ts +0 -2
- package/dist/cjs/components/_internal/base-button.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.js +1 -1
- package/dist/cjs/components/_internal/base-button.js.map +3 -3
- package/dist/cjs/components/_internal/base-button.props.d.ts +0 -17
- package/dist/cjs/components/_internal/base-button.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-button.props.js +1 -1
- package/dist/cjs/components/_internal/base-button.props.js.map +3 -3
- package/dist/cjs/components/_internal/base-menu.props.d.ts +0 -10
- package/dist/cjs/components/_internal/base-menu.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js +1 -1
- package/dist/cjs/components/_internal/base-menu.props.js.map +3 -3
- package/dist/cjs/components/_internal/base-menu.utils.d.ts +3 -9
- package/dist/cjs/components/_internal/base-menu.utils.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
- package/dist/cjs/components/_internal/base-menu.utils.js.map +3 -3
- package/dist/cjs/components/_internal/base-tab-list.props.d.ts +0 -5
- package/dist/cjs/components/_internal/base-tab-list.props.d.ts.map +1 -1
- package/dist/cjs/components/_internal/base-tab-list.props.js +1 -1
- package/dist/cjs/components/_internal/base-tab-list.props.js.map +3 -3
- package/dist/cjs/components/_internal/menu-context.d.ts +2 -3
- package/dist/cjs/components/_internal/menu-context.d.ts.map +1 -1
- package/dist/cjs/components/_internal/menu-context.js +1 -1
- package/dist/cjs/components/_internal/menu-context.js.map +4 -4
- package/dist/cjs/components/_internal/pane-chrome.d.ts +25 -2
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +3 -3
- 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/accordion.d.ts.map +1 -1
- package/dist/cjs/components/accordion.js +1 -1
- package/dist/cjs/components/accordion.js.map +3 -3
- package/dist/cjs/components/accordion.props.d.ts +0 -7
- package/dist/cjs/components/accordion.props.d.ts.map +1 -1
- package/dist/cjs/components/accordion.props.js +1 -1
- package/dist/cjs/components/accordion.props.js.map +3 -3
- package/dist/cjs/components/alert-dialog.d.ts.map +1 -1
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +3 -3
- package/dist/cjs/components/alert-dialog.props.d.ts +0 -5
- package/dist/cjs/components/alert-dialog.props.d.ts.map +1 -1
- package/dist/cjs/components/alert-dialog.props.js +1 -1
- package/dist/cjs/components/alert-dialog.props.js.map +3 -3
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +3 -3
- package/dist/cjs/components/button.js +2 -2
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/button.props.js +1 -1
- package/dist/cjs/components/button.props.js.map +3 -3
- package/dist/cjs/components/card.d.ts.map +1 -1
- package/dist/cjs/components/card.js +1 -1
- package/dist/cjs/components/card.js.map +3 -3
- package/dist/cjs/components/card.props.d.ts +0 -5
- package/dist/cjs/components/card.props.d.ts.map +1 -1
- package/dist/cjs/components/card.props.js +1 -1
- package/dist/cjs/components/card.props.js.map +3 -3
- package/dist/cjs/components/chatbar.d.ts +0 -2
- package/dist/cjs/components/chatbar.d.ts.map +1 -1
- package/dist/cjs/components/chatbar.js +2 -2
- package/dist/cjs/components/chatbar.js.map +3 -3
- package/dist/cjs/components/checkbox-cards.d.ts.map +1 -1
- package/dist/cjs/components/checkbox-cards.js +1 -1
- package/dist/cjs/components/checkbox-cards.js.map +4 -4
- package/dist/cjs/components/checkbox-cards.props.d.ts +0 -5
- package/dist/cjs/components/checkbox-cards.props.d.ts.map +1 -1
- package/dist/cjs/components/checkbox-cards.props.js +1 -1
- package/dist/cjs/components/checkbox-cards.props.js.map +3 -3
- 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 +3 -3
- package/dist/cjs/components/combobox.props.d.ts +0 -9
- package/dist/cjs/components/combobox.props.d.ts.map +1 -1
- package/dist/cjs/components/combobox.props.js +1 -1
- package/dist/cjs/components/combobox.props.js.map +3 -3
- package/dist/cjs/components/context-menu.d.ts.map +1 -1
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +4 -4
- package/dist/cjs/components/context-menu.props.js +1 -1
- package/dist/cjs/components/context-menu.props.js.map +3 -3
- package/dist/cjs/components/dialog.d.ts.map +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/dialog.props.d.ts +0 -5
- package/dist/cjs/components/dialog.props.d.ts.map +1 -1
- package/dist/cjs/components/dialog.props.js +1 -1
- package/dist/cjs/components/dialog.props.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.d.ts.map +1 -1
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +4 -4
- package/dist/cjs/components/dropdown-menu.props.js +1 -1
- package/dist/cjs/components/dropdown-menu.props.js.map +3 -3
- package/dist/cjs/components/hover-card.js +1 -1
- package/dist/cjs/components/hover-card.js.map +3 -3
- package/dist/cjs/components/icon-button.js +2 -2
- package/dist/cjs/components/icon-button.js.map +3 -3
- package/dist/cjs/components/icon-button.props.js +1 -1
- package/dist/cjs/components/icon-button.props.js.map +3 -3
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/message-scroller.js +2 -2
- package/dist/cjs/components/message-scroller.js.map +3 -3
- package/dist/cjs/components/notice.d.ts +0 -2
- package/dist/cjs/components/notice.d.ts.map +1 -1
- package/dist/cjs/components/notice.js +2 -2
- package/dist/cjs/components/notice.js.map +3 -3
- package/dist/cjs/components/popover.d.ts.map +1 -1
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +3 -3
- package/dist/cjs/components/popover.props.d.ts +0 -5
- package/dist/cjs/components/popover.props.d.ts.map +1 -1
- package/dist/cjs/components/popover.props.js +1 -1
- package/dist/cjs/components/popover.props.js.map +3 -3
- package/dist/cjs/components/radio-cards.d.ts.map +1 -1
- package/dist/cjs/components/radio-cards.js +1 -1
- package/dist/cjs/components/radio-cards.js.map +4 -4
- package/dist/cjs/components/radio-cards.props.d.ts +0 -5
- package/dist/cjs/components/radio-cards.props.d.ts.map +1 -1
- package/dist/cjs/components/radio-cards.props.js +1 -1
- package/dist/cjs/components/radio-cards.props.js.map +3 -3
- package/dist/cjs/components/schemas/base-button.schema.d.ts +0 -4
- 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 +0 -4
- 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/icon-button.schema.d.ts +0 -4
- package/dist/cjs/components/schemas/icon-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/icon-button.schema.js +1 -1
- package/dist/cjs/components/schemas/icon-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/toggle-button.schema.d.ts +0 -4
- package/dist/cjs/components/schemas/toggle-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/toggle-button.schema.js +1 -1
- package/dist/cjs/components/schemas/toggle-button.schema.js.map +2 -2
- package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts +0 -4
- package/dist/cjs/components/schemas/toggle-icon-button.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/toggle-icon-button.schema.js +1 -1
- package/dist/cjs/components/schemas/toggle-icon-button.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/segmented-control.props.d.ts +0 -4
- package/dist/cjs/components/segmented-control.props.d.ts.map +1 -1
- package/dist/cjs/components/segmented-control.props.js +1 -1
- package/dist/cjs/components/segmented-control.props.js.map +2 -2
- package/dist/cjs/components/select.d.ts.map +1 -1
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +3 -3
- package/dist/cjs/components/select.props.d.ts +0 -4
- package/dist/cjs/components/select.props.d.ts.map +1 -1
- package/dist/cjs/components/select.props.js +1 -1
- package/dist/cjs/components/select.props.js.map +2 -2
- package/dist/cjs/components/sheet.d.ts +0 -1
- package/dist/cjs/components/sheet.d.ts.map +1 -1
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +3 -3
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +3 -3
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/switch.js.map +2 -2
- package/dist/cjs/components/switch.props.d.ts.map +1 -1
- package/dist/cjs/components/switch.props.js.map +2 -2
- package/dist/cjs/components/tab-nav.d.ts.map +1 -1
- package/dist/cjs/components/tab-nav.js +1 -1
- package/dist/cjs/components/tab-nav.js.map +3 -3
- package/dist/cjs/components/tab-nav.props.js +1 -1
- package/dist/cjs/components/tab-nav.props.js.map +3 -3
- package/dist/cjs/components/tabs.d.ts.map +1 -1
- package/dist/cjs/components/tabs.js +1 -1
- package/dist/cjs/components/tabs.js.map +3 -3
- package/dist/cjs/components/tabs.props.js +1 -1
- package/dist/cjs/components/tabs.props.js.map +3 -3
- package/dist/cjs/components/text-area.d.ts.map +1 -1
- package/dist/cjs/components/text-area.js +1 -1
- package/dist/cjs/components/text-area.js.map +3 -3
- package/dist/cjs/components/text-area.props.d.ts +0 -5
- package/dist/cjs/components/text-area.props.d.ts.map +1 -1
- package/dist/cjs/components/text-area.props.js +1 -1
- package/dist/cjs/components/text-area.props.js.map +3 -3
- package/dist/cjs/components/text-field.d.ts.map +1 -1
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.js.map +3 -3
- package/dist/cjs/components/text-field.props.d.ts +0 -5
- package/dist/cjs/components/text-field.props.d.ts.map +1 -1
- package/dist/cjs/components/text-field.props.js +1 -1
- package/dist/cjs/components/text-field.props.js.map +3 -3
- package/dist/cjs/components/theme-panel.d.ts.map +1 -1
- package/dist/cjs/components/theme-panel.js +3 -3
- package/dist/cjs/components/theme-panel.js.map +4 -4
- package/dist/cjs/components/theme.d.ts +0 -6
- package/dist/cjs/components/theme.d.ts.map +1 -1
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +3 -3
- package/dist/cjs/components/theme.props.d.ts +0 -19
- package/dist/cjs/components/theme.props.d.ts.map +1 -1
- package/dist/cjs/components/theme.props.js +1 -1
- package/dist/cjs/components/theme.props.js.map +3 -3
- package/dist/cjs/components/toggle-button.js +3 -3
- package/dist/cjs/components/toggle-button.js.map +3 -3
- package/dist/cjs/components/toggle-icon-button.js +3 -3
- package/dist/cjs/components/toggle-icon-button.js.map +3 -3
- package/dist/cjs/components/toolbar.d.ts +8 -2
- package/dist/cjs/components/toolbar.d.ts.map +1 -1
- package/dist/cjs/components/toolbar.js +2 -2
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/components/toolbar.props.d.ts +2 -1
- package/dist/cjs/components/toolbar.props.d.ts.map +1 -1
- package/dist/cjs/components/toolbar.props.js.map +2 -2
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.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 +4 -4
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +3 -3
- package/dist/esm/chunk-2CNQGDY3.js +2 -0
- package/dist/esm/{chunk-MNC2O6QW.js.map → chunk-2CNQGDY3.js.map} +3 -3
- package/dist/esm/chunk-2HUAVZZL.js +2 -0
- package/dist/esm/chunk-2HUAVZZL.js.map +7 -0
- package/dist/esm/chunk-2O3WL25H.js +2 -0
- package/dist/esm/chunk-2O3WL25H.js.map +7 -0
- package/dist/esm/{chunk-MD3QCXRD.js → chunk-4STOJSJZ.js} +2 -2
- package/dist/esm/{chunk-R4CN4Q3G.js → chunk-534LGOWC.js} +2 -2
- package/dist/esm/chunk-5LGWS5QS.js +2 -0
- package/dist/esm/chunk-5LGWS5QS.js.map +7 -0
- package/dist/esm/{chunk-7UW7D77E.js → chunk-5UU2IMGX.js} +2 -2
- package/dist/esm/chunk-655TAWHX.js +2 -0
- package/dist/esm/chunk-655TAWHX.js.map +7 -0
- package/dist/esm/{chunk-MQT3YJKY.js → chunk-6HRBG5H2.js} +2 -2
- package/dist/esm/chunk-6VPYP3VN.js +2 -0
- package/dist/esm/chunk-6VPYP3VN.js.map +7 -0
- package/dist/esm/{chunk-PTEAQFHI.js → chunk-6WFEMPCF.js} +2 -2
- package/dist/esm/chunk-6XHM724Y.js +2 -0
- package/dist/esm/chunk-6XHM724Y.js.map +7 -0
- package/dist/esm/chunk-6YWJUNMB.js +2 -0
- package/dist/esm/chunk-6YWJUNMB.js.map +7 -0
- package/dist/esm/chunk-AHOUZS3V.js +2 -0
- package/dist/esm/chunk-AHOUZS3V.js.map +7 -0
- package/dist/esm/chunk-B6RH4CTY.js +2 -0
- package/dist/esm/chunk-B6RH4CTY.js.map +7 -0
- package/dist/esm/chunk-BOLRYGFQ.js +2 -0
- package/dist/esm/chunk-BOLRYGFQ.js.map +7 -0
- package/dist/esm/chunk-BUEYZEAY.js +2 -0
- package/dist/esm/chunk-BUEYZEAY.js.map +7 -0
- package/dist/esm/chunk-CC4GNSKL.js +2 -0
- package/dist/esm/chunk-CC4GNSKL.js.map +7 -0
- package/dist/esm/chunk-CG54MBMW.js +2 -0
- package/dist/esm/chunk-CG54MBMW.js.map +7 -0
- package/dist/esm/{chunk-2PO6TZ7L.js → chunk-COSHAOEK.js} +2 -2
- package/dist/esm/{chunk-F2XQYWBE.js → chunk-CRYT55SY.js} +2 -2
- package/dist/esm/chunk-DKALDTCN.js +2 -0
- package/dist/esm/chunk-DKALDTCN.js.map +7 -0
- package/dist/esm/{chunk-ELZEAEN2.js → chunk-DP3OWU5T.js} +2 -2
- package/dist/esm/{chunk-UI2EFF6F.js → chunk-E3754NJZ.js} +2 -2
- package/dist/esm/chunk-EJOVE3JH.js +2 -0
- package/dist/esm/chunk-EJOVE3JH.js.map +7 -0
- package/dist/esm/chunk-ENPQJYXZ.js +2 -0
- package/dist/esm/chunk-ENPQJYXZ.js.map +7 -0
- package/dist/esm/chunk-EO7WQYFO.js +2 -0
- package/dist/esm/chunk-EO7WQYFO.js.map +7 -0
- package/dist/esm/chunk-EUSKAXHP.js +2 -0
- package/dist/esm/chunk-EUSKAXHP.js.map +7 -0
- package/dist/esm/chunk-FPDLBLO3.js +2 -0
- package/dist/esm/chunk-FPDLBLO3.js.map +7 -0
- package/dist/esm/{chunk-6ERCPRXX.js → chunk-FSKZAL5H.js} +2 -2
- package/dist/esm/chunk-GOYI2U6F.js +2 -0
- package/dist/esm/chunk-GOYI2U6F.js.map +7 -0
- package/dist/esm/chunk-HSFQO4QM.js +2 -0
- package/dist/esm/chunk-HSFQO4QM.js.map +7 -0
- package/dist/esm/chunk-IF4PYIUV.js +2 -0
- package/dist/esm/chunk-IF4PYIUV.js.map +7 -0
- package/dist/esm/chunk-IGBEDJBC.js +2 -0
- package/dist/esm/chunk-IGBEDJBC.js.map +7 -0
- package/dist/esm/chunk-JCOALADA.js +5 -0
- package/dist/esm/chunk-JCOALADA.js.map +7 -0
- package/dist/esm/{chunk-ZUOK3KFY.js → chunk-K7VO7TND.js} +1 -1
- package/dist/esm/{chunk-ZUOK3KFY.js.map → chunk-K7VO7TND.js.map} +2 -2
- package/dist/esm/{chunk-DIGT74P3.js → chunk-KPACVWV4.js} +1 -1
- package/dist/esm/{chunk-DIGT74P3.js.map → chunk-KPACVWV4.js.map} +2 -2
- package/dist/esm/chunk-KU3LLWFU.js +2 -0
- package/dist/esm/{chunk-UPCRXJB2.js.map → chunk-KU3LLWFU.js.map} +2 -2
- package/dist/esm/chunk-M55KFXYV.js +2 -0
- package/dist/esm/chunk-M55KFXYV.js.map +7 -0
- package/dist/esm/chunk-MAI7FEU7.js +2 -0
- package/dist/esm/chunk-MAI7FEU7.js.map +7 -0
- package/dist/esm/chunk-MDHXSEGH.js +2 -0
- package/dist/esm/chunk-MDHXSEGH.js.map +7 -0
- package/dist/esm/{chunk-YKGLZEXX.js → chunk-MJC4NKYG.js} +2 -2
- package/dist/esm/chunk-MOYLXCMW.js +2 -0
- package/dist/esm/chunk-MOYLXCMW.js.map +7 -0
- package/dist/esm/{chunk-Y4IB7KDZ.js → chunk-MZQDDG5K.js} +2 -2
- package/dist/esm/chunk-NCDOMH5I.js +2 -0
- package/dist/esm/chunk-NCDOMH5I.js.map +7 -0
- package/dist/esm/{chunk-CMQMCGGC.js → chunk-NOSR2XWD.js} +2 -2
- package/dist/esm/chunk-OMUUPPJO.js +2 -0
- package/dist/esm/chunk-OMUUPPJO.js.map +7 -0
- package/dist/esm/{chunk-SEKZGBK3.js → chunk-ORMCQAPS.js} +2 -2
- package/dist/esm/chunk-PNIVUG5D.js +2 -0
- package/dist/esm/chunk-PNIVUG5D.js.map +7 -0
- package/dist/esm/chunk-PYYI64XK.js +2 -0
- package/dist/esm/chunk-PYYI64XK.js.map +7 -0
- package/dist/esm/chunk-Q7S5LQBQ.js +2 -0
- package/dist/esm/chunk-Q7S5LQBQ.js.map +7 -0
- package/dist/esm/chunk-QOPRXQGR.js +2 -0
- package/dist/esm/chunk-QOPRXQGR.js.map +7 -0
- package/dist/esm/{chunk-MLJLEOZ5.js → chunk-R2FUNQTI.js} +2 -2
- package/dist/esm/{chunk-MLJLEOZ5.js.map → chunk-R2FUNQTI.js.map} +2 -2
- package/dist/esm/chunk-RFURPE7W.js +10 -0
- package/dist/esm/chunk-RFURPE7W.js.map +7 -0
- package/dist/esm/chunk-RJ6SA7AY.js +2 -0
- package/dist/esm/chunk-RJ6SA7AY.js.map +7 -0
- package/dist/esm/chunk-RSJSVJ6A.js +2 -0
- package/dist/esm/chunk-RSJSVJ6A.js.map +7 -0
- package/dist/esm/chunk-SM27AC7E.js +2 -0
- package/dist/esm/chunk-SM27AC7E.js.map +7 -0
- package/dist/esm/chunk-WKMJIWFP.js +2 -0
- package/dist/esm/chunk-WKMJIWFP.js.map +7 -0
- package/dist/esm/{chunk-5RHODJDJ.js → chunk-X5KCVLKG.js} +2 -2
- package/dist/esm/chunk-YDRFILTX.js +2 -0
- package/dist/esm/chunk-YDRFILTX.js.map +7 -0
- package/dist/esm/chunk-YGPUKJEB.js +2 -0
- package/dist/esm/chunk-YGPUKJEB.js.map +7 -0
- package/dist/esm/{chunk-MGXXNEMQ.js → chunk-YZABQ4LS.js} +2 -2
- package/dist/esm/components/_internal/base-button.d.ts +0 -2
- package/dist/esm/components/_internal/base-button.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/base-button.props.d.ts +0 -17
- package/dist/esm/components/_internal/base-button.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-button.props.js +1 -1
- package/dist/esm/components/_internal/base-menu.props.d.ts +0 -10
- package/dist/esm/components/_internal/base-menu.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-menu.props.js +1 -1
- package/dist/esm/components/_internal/base-menu.utils.d.ts +3 -9
- package/dist/esm/components/_internal/base-menu.utils.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/base-tab-list.props.d.ts +0 -5
- package/dist/esm/components/_internal/base-tab-list.props.d.ts.map +1 -1
- package/dist/esm/components/_internal/base-tab-list.props.js +1 -1
- package/dist/esm/components/_internal/menu-context.d.ts +2 -3
- package/dist/esm/components/_internal/menu-context.d.ts.map +1 -1
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/_internal/pane-chrome.d.ts +25 -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-sidebar.js +1 -1
- package/dist/esm/components/accordion.d.ts.map +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/accordion.props.d.ts +0 -7
- package/dist/esm/components/accordion.props.d.ts.map +1 -1
- package/dist/esm/components/accordion.props.js +1 -1
- package/dist/esm/components/alert-dialog.d.ts.map +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/alert-dialog.props.d.ts +0 -5
- package/dist/esm/components/alert-dialog.props.d.ts.map +1 -1
- package/dist/esm/components/alert-dialog.props.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/button.props.js +1 -1
- package/dist/esm/components/card.d.ts.map +1 -1
- package/dist/esm/components/card.js +1 -1
- package/dist/esm/components/card.props.d.ts +0 -5
- package/dist/esm/components/card.props.d.ts.map +1 -1
- package/dist/esm/components/card.props.js +1 -1
- package/dist/esm/components/chatbar.d.ts +0 -2
- package/dist/esm/components/chatbar.d.ts.map +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.d.ts.map +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/checkbox-cards.props.d.ts +0 -5
- package/dist/esm/components/checkbox-cards.props.d.ts.map +1 -1
- package/dist/esm/components/checkbox-cards.props.js +1 -1
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.props.d.ts +0 -9
- package/dist/esm/components/combobox.props.d.ts.map +1 -1
- package/dist/esm/components/combobox.props.js +1 -1
- package/dist/esm/components/context-menu.d.ts.map +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/context-menu.props.js +1 -1
- package/dist/esm/components/dialog.d.ts.map +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.props.d.ts +0 -5
- package/dist/esm/components/dialog.props.d.ts.map +1 -1
- package/dist/esm/components/dialog.props.js +1 -1
- package/dist/esm/components/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/dropdown-menu.props.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/icon-button.props.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/notice.d.ts +0 -2
- package/dist/esm/components/notice.d.ts.map +1 -1
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/popover.d.ts.map +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/popover.props.d.ts +0 -5
- package/dist/esm/components/popover.props.d.ts.map +1 -1
- package/dist/esm/components/popover.props.js +1 -1
- package/dist/esm/components/radio-cards.d.ts.map +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/radio-cards.props.d.ts +0 -5
- package/dist/esm/components/radio-cards.props.d.ts.map +1 -1
- package/dist/esm/components/radio-cards.props.js +1 -1
- package/dist/esm/components/schemas/base-button.schema.d.ts +0 -4
- 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 +0 -4
- package/dist/esm/components/schemas/button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/button.schema.js +1 -1
- package/dist/esm/components/schemas/icon-button.schema.d.ts +0 -4
- package/dist/esm/components/schemas/icon-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/icon-button.schema.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/toggle-button.schema.d.ts +0 -4
- package/dist/esm/components/schemas/toggle-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/toggle-button.schema.js +1 -1
- package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts +0 -4
- package/dist/esm/components/schemas/toggle-icon-button.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/toggle-icon-button.schema.js +1 -1
- package/dist/esm/components/segmented-control.d.ts.map +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/segmented-control.props.d.ts +0 -4
- package/dist/esm/components/segmented-control.props.d.ts.map +1 -1
- package/dist/esm/components/segmented-control.props.js +1 -1
- package/dist/esm/components/select.d.ts.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/select.props.d.ts +0 -4
- package/dist/esm/components/select.props.d.ts.map +1 -1
- package/dist/esm/components/select.props.js +1 -1
- package/dist/esm/components/sheet.d.ts +0 -1
- package/dist/esm/components/sheet.d.ts.map +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/switch.props.d.ts.map +1 -1
- package/dist/esm/components/switch.props.js +1 -1
- package/dist/esm/components/tab-nav.d.ts.map +1 -1
- package/dist/esm/components/tab-nav.js +1 -1
- package/dist/esm/components/tab-nav.props.js +1 -1
- package/dist/esm/components/tabs.d.ts.map +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/tabs.props.js +1 -1
- package/dist/esm/components/text-area.d.ts.map +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-area.props.d.ts +0 -5
- package/dist/esm/components/text-area.props.d.ts.map +1 -1
- package/dist/esm/components/text-area.props.js +1 -1
- package/dist/esm/components/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/text-field.props.d.ts +0 -5
- package/dist/esm/components/text-field.props.d.ts.map +1 -1
- package/dist/esm/components/text-field.props.js +1 -1
- package/dist/esm/components/theme-panel.d.ts.map +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/theme.d.ts +0 -6
- package/dist/esm/components/theme.d.ts.map +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.props.d.ts +0 -19
- package/dist/esm/components/theme.props.d.ts.map +1 -1
- package/dist/esm/components/theme.props.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toolbar.d.ts +8 -2
- package/dist/esm/components/toolbar.d.ts.map +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/toolbar.props.d.ts +2 -1
- package/dist/esm/components/toolbar.props.d.ts.map +1 -1
- package/dist/esm/components/toolbar.props.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/virtual-menu.d.ts.map +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/layout/components.css +48 -48
- package/layout/tokens.css +65 -31
- package/layout.css +113 -79
- package/package.json +2 -1
- package/schemas/base-button.json +0 -8
- package/schemas/button.json +0 -8
- package/schemas/icon-button.json +0 -8
- package/schemas/index.json +0 -40
- package/schemas/toggle-button.json +0 -8
- package/schemas/toggle-icon-button.json +0 -8
- package/src/components/_internal/base-button.css +19 -100
- package/src/components/_internal/base-button.props.ts +0 -26
- package/src/components/_internal/base-button.tsx +0 -6
- package/src/components/_internal/base-card.css +32 -194
- package/src/components/_internal/base-checkbox.css +16 -53
- package/src/components/_internal/base-dialog.css +13 -45
- package/src/components/_internal/base-menu.css +24 -57
- package/src/components/_internal/base-menu.props.ts +0 -8
- package/src/components/_internal/base-menu.utils.tsx +4 -15
- package/src/components/_internal/base-radio.css +14 -51
- package/src/components/_internal/base-sidebar-menu.css +21 -19
- package/src/components/_internal/base-sidebar.css +2 -3
- package/src/components/_internal/base-tab-list.css +14 -61
- package/src/components/_internal/base-tab-list.props.ts +0 -3
- package/src/components/_internal/menu-context.tsx +6 -10
- package/src/components/_internal/pane-chrome.tsx +73 -13
- package/src/components/accordion.css +17 -263
- package/src/components/accordion.props.tsx +0 -4
- package/src/components/accordion.tsx +1 -4
- package/src/components/alert-dialog.props.tsx +0 -4
- package/src/components/alert-dialog.tsx +1 -14
- package/src/components/avatar.css +19 -57
- package/src/components/badge.css +28 -41
- package/src/components/blockquote.css +2 -2
- package/src/components/button.css +13 -13
- package/src/components/card.props.tsx +0 -3
- package/src/components/card.tsx +1 -3
- package/src/components/chatbar.css +44 -124
- package/src/components/chatbar.tsx +1 -7
- package/src/components/checkbox-cards.css +11 -11
- package/src/components/checkbox-cards.props.tsx +0 -3
- package/src/components/checkbox-cards.tsx +0 -5
- package/src/components/checkbox-group.css +1 -1
- package/src/components/combobox.css +4 -9
- package/src/components/combobox.props.tsx +0 -5
- package/src/components/combobox.tsx +1 -11
- package/src/components/context-menu.tsx +6 -19
- package/src/components/data-list.css +4 -4
- package/src/components/dialog.css +0 -12
- package/src/components/dialog.props.tsx +0 -3
- package/src/components/dialog.tsx +1 -14
- package/src/components/dropdown-menu.css +1 -1
- package/src/components/dropdown-menu.tsx +5 -19
- package/src/components/hover-card.css +3 -3
- package/src/components/icon-button.css +4 -4
- package/src/components/image.css +1 -1
- package/src/components/kbd.css +14 -14
- package/src/components/message-scroller.css +1 -1
- package/src/components/navbar.css +6 -6
- package/src/components/notice.css +9 -15
- package/src/components/notice.tsx +1 -4
- package/src/components/popover.css +15 -37
- package/src/components/popover.props.tsx +0 -3
- package/src/components/popover.tsx +0 -5
- package/src/components/progress.css +0 -69
- package/src/components/radio-cards.css +6 -6
- package/src/components/radio-cards.props.tsx +0 -3
- package/src/components/radio-cards.tsx +0 -5
- package/src/components/radio-group.css +1 -1
- package/src/components/schemas/base-button.schema.ts +0 -9
- package/src/components/scroll-area.css +14 -14
- package/src/components/section.css +8 -8
- package/src/components/segmented-control.css +25 -68
- package/src/components/segmented-control.props.tsx +0 -2
- package/src/components/segmented-control.tsx +0 -4
- package/src/components/select.css +24 -363
- package/src/components/select.props.tsx +0 -2
- package/src/components/select.tsx +0 -2
- package/src/components/separator.css +3 -3
- package/src/components/sheet.css +0 -11
- package/src/components/sheet.tsx +1 -18
- package/src/components/shell.css +135 -11
- package/src/components/sidebar.css +108 -198
- package/src/components/skeleton.css +1 -1
- package/src/components/slider.css +16 -87
- package/src/components/spinner.css +6 -6
- package/src/components/switch.css +10 -37
- package/src/components/switch.props.tsx +0 -8
- package/src/components/tab-nav.tsx +1 -3
- package/src/components/table.css +10 -18
- package/src/components/tabs.tsx +1 -3
- package/src/components/text-area.css +41 -154
- package/src/components/text-area.props.tsx +0 -3
- package/src/components/text-area.tsx +1 -3
- package/src/components/text-field.css +36 -244
- package/src/components/text-field.props.tsx +0 -3
- package/src/components/text-field.tsx +1 -3
- package/src/components/theme-panel.css +4 -4
- package/src/components/theme-panel.tsx +19 -236
- package/src/components/theme.props.tsx +0 -15
- package/src/components/theme.tsx +0 -35
- package/src/components/toolbar.css +15 -9
- package/src/components/toolbar.props.tsx +2 -1
- package/src/components/toolbar.tsx +20 -8
- package/src/components/tooltip.css +1 -1
- package/src/components/virtual-menu.tsx +2 -4
- package/src/styles/tokens/base.css +0 -2
- package/src/styles/tokens/color.css +4 -32
- package/src/styles/tokens/constants.css +23 -51
- package/src/styles/tokens/layout.css +1 -1
- package/src/styles/tokens/radius.css +24 -24
- package/src/styles/tokens/space.css +88 -21
- package/src/styles/tokens/typography.css +39 -39
- package/styles.css +2494 -3395
- package/tokens/base.css +229 -283
- package/tokens.css +252 -318
- package/dist/esm/chunk-23WDP4JG.js +0 -2
- package/dist/esm/chunk-23WDP4JG.js.map +0 -7
- package/dist/esm/chunk-2MYYU7ST.js +0 -2
- package/dist/esm/chunk-2MYYU7ST.js.map +0 -7
- package/dist/esm/chunk-2NNB4ZZ5.js +0 -2
- package/dist/esm/chunk-2NNB4ZZ5.js.map +0 -7
- package/dist/esm/chunk-2NNCZM7P.js +0 -2
- package/dist/esm/chunk-2NNCZM7P.js.map +0 -7
- package/dist/esm/chunk-3PT3AOD5.js +0 -2
- package/dist/esm/chunk-3PT3AOD5.js.map +0 -7
- package/dist/esm/chunk-4EBCFKNC.js +0 -2
- package/dist/esm/chunk-4EBCFKNC.js.map +0 -7
- package/dist/esm/chunk-5PG5YGIW.js +0 -2
- package/dist/esm/chunk-5PG5YGIW.js.map +0 -7
- package/dist/esm/chunk-BDOMLGLZ.js +0 -2
- package/dist/esm/chunk-BDOMLGLZ.js.map +0 -7
- package/dist/esm/chunk-CAUFRKTK.js +0 -2
- package/dist/esm/chunk-CAUFRKTK.js.map +0 -7
- package/dist/esm/chunk-CJ4UZDW5.js +0 -2
- package/dist/esm/chunk-CJ4UZDW5.js.map +0 -7
- package/dist/esm/chunk-DD5QHU6R.js +0 -2
- package/dist/esm/chunk-DD5QHU6R.js.map +0 -7
- package/dist/esm/chunk-DQTJMIRO.js +0 -2
- package/dist/esm/chunk-DQTJMIRO.js.map +0 -7
- package/dist/esm/chunk-E5DJILUI.js +0 -2
- package/dist/esm/chunk-E5DJILUI.js.map +0 -7
- package/dist/esm/chunk-EJG2UNTM.js +0 -2
- package/dist/esm/chunk-EJG2UNTM.js.map +0 -7
- package/dist/esm/chunk-FK6F6ROH.js +0 -2
- package/dist/esm/chunk-FK6F6ROH.js.map +0 -7
- package/dist/esm/chunk-HI3JY3DJ.js +0 -2
- package/dist/esm/chunk-HI3JY3DJ.js.map +0 -7
- package/dist/esm/chunk-IMYZP5OY.js +0 -2
- package/dist/esm/chunk-IMYZP5OY.js.map +0 -7
- package/dist/esm/chunk-IYXR46Q6.js +0 -5
- package/dist/esm/chunk-IYXR46Q6.js.map +0 -7
- package/dist/esm/chunk-JGB6LNTP.js +0 -2
- package/dist/esm/chunk-JGB6LNTP.js.map +0 -7
- package/dist/esm/chunk-JLHJHYVQ.js +0 -2
- package/dist/esm/chunk-JLHJHYVQ.js.map +0 -7
- package/dist/esm/chunk-KLIREDPE.js +0 -2
- package/dist/esm/chunk-KLIREDPE.js.map +0 -7
- package/dist/esm/chunk-LRFAOQK6.js +0 -2
- package/dist/esm/chunk-LRFAOQK6.js.map +0 -7
- package/dist/esm/chunk-LXSARUXD.js +0 -2
- package/dist/esm/chunk-LXSARUXD.js.map +0 -7
- package/dist/esm/chunk-MNC2O6QW.js +0 -2
- package/dist/esm/chunk-MOMYWKIO.js +0 -2
- package/dist/esm/chunk-MOMYWKIO.js.map +0 -7
- package/dist/esm/chunk-PRRJ4WRE.js +0 -2
- package/dist/esm/chunk-PRRJ4WRE.js.map +0 -7
- package/dist/esm/chunk-QE2EF7A7.js +0 -2
- package/dist/esm/chunk-QE2EF7A7.js.map +0 -7
- package/dist/esm/chunk-QJSSCW3B.js +0 -2
- package/dist/esm/chunk-QJSSCW3B.js.map +0 -7
- package/dist/esm/chunk-QPNYHS6A.js +0 -2
- package/dist/esm/chunk-QPNYHS6A.js.map +0 -7
- package/dist/esm/chunk-RA4U6VVZ.js +0 -2
- package/dist/esm/chunk-RA4U6VVZ.js.map +0 -7
- package/dist/esm/chunk-ULSNYQOY.js +0 -2
- package/dist/esm/chunk-ULSNYQOY.js.map +0 -7
- package/dist/esm/chunk-UPCRXJB2.js +0 -2
- package/dist/esm/chunk-URLG45A4.js +0 -2
- package/dist/esm/chunk-URLG45A4.js.map +0 -7
- package/dist/esm/chunk-VASXAV62.js +0 -2
- package/dist/esm/chunk-VASXAV62.js.map +0 -7
- package/dist/esm/chunk-W7VAP3WE.js +0 -2
- package/dist/esm/chunk-W7VAP3WE.js.map +0 -7
- package/dist/esm/chunk-WGNIFXUE.js +0 -2
- package/dist/esm/chunk-WGNIFXUE.js.map +0 -7
- package/dist/esm/chunk-WNSG5P3U.js +0 -2
- package/dist/esm/chunk-WNSG5P3U.js.map +0 -7
- package/dist/esm/chunk-X3UTLDGG.js +0 -2
- package/dist/esm/chunk-X3UTLDGG.js.map +0 -7
- package/dist/esm/chunk-XCDXQLWS.js +0 -2
- package/dist/esm/chunk-XCDXQLWS.js.map +0 -7
- package/dist/esm/chunk-XKAWVGBL.js +0 -2
- package/dist/esm/chunk-XKAWVGBL.js.map +0 -7
- package/dist/esm/chunk-Y3FVBAN2.js +0 -2
- package/dist/esm/chunk-Y3FVBAN2.js.map +0 -7
- package/dist/esm/chunk-YSHEXVBI.js +0 -10
- package/dist/esm/chunk-YSHEXVBI.js.map +0 -7
- package/dist/esm/chunk-Z2LGVLUB.js +0 -2
- package/dist/esm/chunk-Z2LGVLUB.js.map +0 -7
- package/src/styles/tokens/blur.css +0 -63
- package/src/styles/tokens/opacity.css +0 -32
- package/src/styles/tokens/scaling.css +0 -17
- /package/dist/esm/{chunk-MD3QCXRD.js.map → chunk-4STOJSJZ.js.map} +0 -0
- /package/dist/esm/{chunk-R4CN4Q3G.js.map → chunk-534LGOWC.js.map} +0 -0
- /package/dist/esm/{chunk-7UW7D77E.js.map → chunk-5UU2IMGX.js.map} +0 -0
- /package/dist/esm/{chunk-MQT3YJKY.js.map → chunk-6HRBG5H2.js.map} +0 -0
- /package/dist/esm/{chunk-PTEAQFHI.js.map → chunk-6WFEMPCF.js.map} +0 -0
- /package/dist/esm/{chunk-2PO6TZ7L.js.map → chunk-COSHAOEK.js.map} +0 -0
- /package/dist/esm/{chunk-F2XQYWBE.js.map → chunk-CRYT55SY.js.map} +0 -0
- /package/dist/esm/{chunk-ELZEAEN2.js.map → chunk-DP3OWU5T.js.map} +0 -0
- /package/dist/esm/{chunk-UI2EFF6F.js.map → chunk-E3754NJZ.js.map} +0 -0
- /package/dist/esm/{chunk-6ERCPRXX.js.map → chunk-FSKZAL5H.js.map} +0 -0
- /package/dist/esm/{chunk-YKGLZEXX.js.map → chunk-MJC4NKYG.js.map} +0 -0
- /package/dist/esm/{chunk-Y4IB7KDZ.js.map → chunk-MZQDDG5K.js.map} +0 -0
- /package/dist/esm/{chunk-CMQMCGGC.js.map → chunk-NOSR2XWD.js.map} +0 -0
- /package/dist/esm/{chunk-SEKZGBK3.js.map → chunk-ORMCQAPS.js.map} +0 -0
- /package/dist/esm/{chunk-5RHODJDJ.js.map → chunk-X5KCVLKG.js.map} +0 -0
- /package/dist/esm/{chunk-MGXXNEMQ.js.map → chunk-YZABQ4LS.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var y=(o,e)=>{for(var t in e)n(o,t,{get:e[t],enumerable:!0})},C=(o,e,t,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of D(e))!P.call(o,s)&&s!==t&&n(o,s,{get:()=>e[s],enumerable:!(p=b(e,s))||p.enumerable});return o};var h=o=>C(n({},"__esModule",{value:!0}),o);var
|
|
1
|
+
"use strict";var n=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var y=(o,e)=>{for(var t in e)n(o,t,{get:e[t],enumerable:!0})},C=(o,e,t,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of D(e))!P.call(o,s)&&s!==t&&n(o,s,{get:()=>e[s],enumerable:!(p=b(e,s))||p.enumerable});return o};var h=o=>C(n({},"__esModule",{value:!0}),o);var v={};y(v,{dropdownMenuCheckboxItemPropDefs:()=>m,dropdownMenuContentPropDefs:()=>c,dropdownMenuItemPropDefs:()=>l,dropdownMenuRadioItemPropDefs:()=>d,dropdownMenuSubContentPropDefs:()=>i,submenuBehaviors:()=>a});module.exports=h(v);var f={asChild:{type:"boolean"}};var M=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var r={color:{type:"enum",values:M,default:void 0}};var g=["1","2"],a=["cascade","drill-down"],u={size:{type:"enum",className:"rt-r-size",values:g,default:"2",responsive:!0},...r},c={...u,submenuBehavior:{type:"enum",values:a,default:"cascade",responsive:!0}},i=u,l={...f,...r,shortcut:{type:"string"}},m={...r,shortcut:{type:"string"}},d={...r};
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.props.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/dropdown-menu.props.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/components/_internal/base-menu.props.ts"],
|
|
4
|
-
"sourcesContent": ["export {\n baseMenuContentPropDefs as dropdownMenuContentPropDefs,\n baseMenuSubContentPropDefs as dropdownMenuSubContentPropDefs,\n baseMenuItemPropDefs as dropdownMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs as dropdownMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs as dropdownMenuRadioItemPropDefs,\n submenuBehaviors,\n} from './_internal/base-menu.props.js';\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Badge, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sCAAAE,EAAA,gCAAAC,EAAA,6BAAAC,EAAA,kCAAAC,EAAA,mCAAAC,EAAA,qBAAAC,IAAA,eAAAC,EAAAR,GCEA,IAAMS,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECPA,IAAMC,EAAe,CAAC,OAAQ,OAAQ,SAAU,QAAS,SAAU,QAAS,SAAU,SAAU,MAAO,OAAQ,UAAW,OAAQ,OAAQ,SAAU,SAAU,OAAQ,SAAU,OAAQ,OAAQ,OAAQ,OAAQ,QAAS,QAAS,OAAQ,OAAQ,KAAK,EAIvP,IAAMC,EAAe,CACnB,MAAO,CACL,KAAM,OACN,OAAQC,EACR,QAAS,MACX,CACF,ECRA,IAAMC,EAAe,CAAC,IAAK,GAAG,EACxBC,
|
|
6
|
-
"names": ["dropdown_menu_props_exports", "__export", "baseMenuCheckboxItemPropDefs", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuRadioItemPropDefs", "baseMenuSubContentPropDefs", "submenuBehaviors", "__toCommonJS", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "contentSizes", "
|
|
4
|
+
"sourcesContent": ["export {\n baseMenuContentPropDefs as dropdownMenuContentPropDefs,\n baseMenuSubContentPropDefs as dropdownMenuSubContentPropDefs,\n baseMenuItemPropDefs as dropdownMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs as dropdownMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs as dropdownMenuRadioItemPropDefs,\n submenuBehaviors,\n} from './_internal/base-menu.props.js';\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Badge, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { colorPropDef } from '../../props/color.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst contentSizes = ['1', '2'] as const;\nconst submenuBehaviors = ['cascade', 'drill-down'] as const;\n\n// Base props shared between Content and SubContent\nconst baseMenuSharedPropDefs = {\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n};\n\n// Content-specific props (includes submenuBehavior)\nconst baseMenuContentPropDefs = {\n ...baseMenuSharedPropDefs,\n /**\n * Controls how submenus behave.\n * - `cascade`: Default cascading behavior where submenus open to the side (portal-based)\n * - `drill-down`: Mobile-friendly behavior where submenus replace the content inline\n * Supports responsive values: `{ initial: 'drill-down', md: 'cascade' }`\n */\n submenuBehavior: {\n type: 'enum',\n values: submenuBehaviors,\n default: 'cascade',\n responsive: true,\n },\n} satisfies {\n size: PropDef<(typeof contentSizes)[number]>;\n submenuBehavior: PropDef<(typeof submenuBehaviors)[number]>;\n};\n\n// SubContent props (no submenuBehavior)\nconst baseMenuSubContentPropDefs = baseMenuSharedPropDefs;\n\nconst baseMenuItemPropDefs = {\n ...asChildPropDef,\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuCheckboxItemPropDefs = {\n ...colorPropDef,\n shortcut: { type: 'string' },\n} satisfies {\n shortcut: PropDef<string>;\n};\n\nconst baseMenuRadioItemPropDefs = {\n ...colorPropDef,\n};\n\nexport {\n baseMenuContentPropDefs,\n baseMenuSubContentPropDefs,\n baseMenuItemPropDefs,\n baseMenuCheckboxItemPropDefs,\n baseMenuRadioItemPropDefs,\n submenuBehaviors,\n};\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sCAAAE,EAAA,gCAAAC,EAAA,6BAAAC,EAAA,kCAAAC,EAAA,mCAAAC,EAAA,qBAAAC,IAAA,eAAAC,EAAAR,GCEA,IAAMS,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECPA,IAAMC,EAAe,CAAC,OAAQ,OAAQ,SAAU,QAAS,SAAU,QAAS,SAAU,SAAU,MAAO,OAAQ,UAAW,OAAQ,OAAQ,SAAU,SAAU,OAAQ,SAAU,OAAQ,OAAQ,OAAQ,OAAQ,QAAS,QAAS,OAAQ,OAAQ,KAAK,EAIvP,IAAMC,EAAe,CACnB,MAAO,CACL,KAAM,OACN,OAAQC,EACR,QAAS,MACX,CACF,ECRA,IAAMC,EAAe,CAAC,IAAK,GAAG,EACxBC,EAAmB,CAAC,UAAW,YAAY,EAG3CC,EAAyB,CAC7B,KAAM,CACJ,KAAM,OACN,UAAW,YACX,OAAQF,EACR,QAAS,IACT,WAAY,EACd,EACA,GAAGG,CACL,EAKMC,EAA0B,CAC9B,GAAGF,EAOH,gBAAiB,CACf,KAAM,OACN,OAAQD,EACR,QAAS,UACT,WAAY,EACd,CACF,EAMMI,EAA6BH,EAE7BI,EAAuB,CAC3B,GAAGC,EACH,GAAGJ,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMK,EAA+B,CACnC,GAAGL,EACH,SAAU,CAAE,KAAM,QAAS,CAC7B,EAIMM,EAA4B,CAChC,GAAGN,CACL",
|
|
6
|
+
"names": ["dropdown_menu_props_exports", "__export", "baseMenuCheckboxItemPropDefs", "baseMenuContentPropDefs", "baseMenuItemPropDefs", "baseMenuRadioItemPropDefs", "baseMenuSubContentPropDefs", "submenuBehaviors", "__toCommonJS", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "contentSizes", "submenuBehaviors", "baseMenuSharedPropDefs", "colorPropDef", "baseMenuContentPropDefs", "baseMenuSubContentPropDefs", "baseMenuItemPropDefs", "asChildPropDef", "baseMenuCheckboxItemPropDefs", "baseMenuRadioItemPropDefs"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var De=Object.create;var O=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var be=Object.getPrototypeOf,xe=Object.prototype.hasOwnProperty;var Se=(e,t)=>{for(var o in t)O(e,o,{get:t[o],enumerable:!0})},te=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Te(t))!xe.call(e,n)&&n!==o&&O(e,n,{get:()=>t[n],enumerable:!(a=Re(t,n))||a.enumerable});return e};var h=(e,t,o)=>(o=e!=null?De(be(e)):{},te(t||!e||!e.__esModule?O(o,"default",{value:e,enumerable:!0}):o,e)),Fe=e=>te(O({},"__esModule",{value:!0}),e);var Be={};Se(Be,{Content:()=>Ce,Root:()=>Pe,Trigger:()=>he});module.exports=Fe(Be);var g=h(require("react")),X=h(require("classnames")),b=require("radix-ui");var j={asChild:{type:"boolean"}};var oe={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var G={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var Ne=["1","2","3"],re={...j,size:{type:"enum",className:"rt-r-size",values:Ne,default:"2",responsive:!0},width:G.width,minWidth:G.minWidth,maxWidth:{...G.maxWidth,default:"480px"},...oe};var ie=h(require("classnames"));var we=[],He=new Set;function ke(e){let t=Object.assign({},...e),o=[],a=[],n=new Set;for(let i in t){let s=t[i],l=s.values??we,p={key:i,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:l,valueSet:l.length>0?new Set(l):He,enumValueSet:s.type==="enum"?new Set([s.default,...l]):void 0};s.className?(o.push(p),n.add(i)):(p.hasDefault||s.type==="enum")&&a.push(p)}return{styling:o,passthrough:a,stylingKeys:n}}var Ve={children:new WeakMap};function ne(e){let t=Ve;for(let o=0;o<e.length;o++){let a=e[o],n=t.children.get(a);n===void 0&&(n={children:new WeakMap},t.children.set(a,n)),t=n}return t.compiled??(t.compiled=ke(e))}var Ee=["initial","xs","sm","md","lg","xl"],z=new Set(Ee);function U(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Oe=new Set(["initial","xs","sm","md","lg","xl"]);function C(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(Oe.has(t))return!0;return!1}function A(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function se({className:e,customProperties:t,...o}){let a=q({allowArbitraryValues:!0,className:e,...o}),n=je({customProperties:t,...o});return[a,n]}function q({allowArbitraryValues:e,value:t,className:o,propValues:a,propValueSet:n,parseValue:i=s=>s}){if(t){if(typeof t=="string")return A(a,n,t)?ae(o,t,i):e?o:void 0;if(C(t)){let s=t,l=[];for(let p in s){if(!U(s,p)||!z.has(p))continue;let r=s[p];if(r!==void 0){if(A(a,n,r)){let f=ae(o,r,i),u=p==="initial"?f:`${p}:${f}`;l.push(u)}else if(e){let f=p==="initial"?o:`${p}:${o}`;l.push(f)}}}return l.length>0?l.join(" "):""}if(e)return o}}function ae(e,t,o){let a=e?"-":"",n=o(t),i=n?.startsWith("-"),s=i?"-":"",l=i?n?.substring(1):n;return`${s}${e}${a}${l}`}function je({customProperties:e,value:t,propValues:o,propValueSet:a,parseValue:n=i=>i}){if(!t||typeof t=="string"&&A(o,a,t))return;let i;if(typeof t=="string"){let s=n(t);i={};for(let l of e)i[l]=s;return i}if(C(t)){let s=t;for(let l in s){if(!U(s,l)||!z.has(l))continue;let p=s[l];if(p===void 0||A(o,a,p))continue;let r=n(p);i??(i={});for(let f of e){let u=l==="initial"?f:`${f}-${l}`;i[u]=r}}}return i??{}}function L(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Ge(e,t){let o=e.initial,a=!1;return t.hasDefault&&o===void 0&&(o=t.default,a=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,a=!0),a?{...e,initial:o}:e}function pe(e,...t){let{styling:o,passthrough:a,stylingKeys:n}=ne(t),i={};for(let p in e)n.has(p)||(i[p]=e[p]);for(let p=0;p<a.length;p++){let r=a[p],f=i[r.key];if(f===void 0){r.hasDefault&&(i[r.key]=r.default);continue}r.enumValueSet!==void 0&&!r.enumValueSet.has(f)&&!C(f)&&(i[r.key]=r.default)}let s,l=[];for(let p=0;p<o.length;p++){let r=o[p],f=e[r.key];if(f===void 0&&r.hasDefault&&(f=r.default),r.enumValueSet!==void 0&&!r.enumValueSet.has(f)&&!C(f)&&(f=r.default),!!f){if(C(f)){if(!r.responsive)continue;f=Ge(f,r)}if(r.type==="enum"){let u=q({allowArbitraryValues:!1,value:f,className:r.className,propValues:r.values,propValueSet:r.valueSet,parseValue:r.parseValue});u&&l.push(u);continue}if(r.type==="string"||r.type==="enum | string"){let[u,P]=se({className:r.className,customProperties:r.customProperties,propValues:r.type==="string"?[]:r.values,propValueSet:r.type==="string"?void 0:r.valueSet,parseValue:r.parseValue,value:f});P&&(s=L(s,P)),u&&l.push(u);continue}if(r.type==="boolean"){l.push(r.className);continue}}}return i.className=(0,ie.default)(l.length>0?l.join(" "):void 0,e.className),i.style=L(s,e.style),i}var W=h(require("react")),le=e=>{if(!W.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${W.Children.toArray(e).map(o=>typeof o=="object"&&"type"in o&&typeof o.type=="string"?o.type:typeof o).join(", ")}`);return e};var c=h(require("react")),ye=h(require("classnames")),v=require("radix-ui"),M=require("radix-ui/internal");function fe(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var Y=h(require("react"));function y(e){let[t,o]=Y.useState(e),[a,n]=Y.useState(e);return Object.is(e,a)||(n(e),o(e)),[t,o]}var me=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],ce=["auto","gray","mauve","slate","sage","olive","sand"];var de=["none","small","medium","large","full"];var Ae=["inherit","light","dark"],We=["solid","translucent"],Me=["90%","95%","100%","105%","110%"],ue=["sans","mono","serif"],m={...j,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:Ae,default:"inherit"},accentColor:{type:"enum",values:me,default:"gray"},grayColor:{type:"enum",values:ce,default:"gray"},material:{type:"enum",values:We,default:"solid"},radius:{type:"enum",values:de,default:"full"},scaling:{type:"enum",values:Me,default:"100%"},fontFamily:{type:"enum",values:ue,default:"sans"},headingFontFamily:{type:"enum",values:ue}};var d=()=>{},Rt={appearance:m.appearance.default,accentColor:m.accentColor.default,grayColor:m.grayColor.default,resolvedGrayColor:m.grayColor.default,material:m.material.default,radius:m.radius.default,scaling:m.scaling.default,fontFamily:m.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:d,onAccentColorChange:d,onGrayColorChange:d,onMaterialChange:d,onRadiusChange:d,onScalingChange:d,onFontFamilyChange:d,onHeadingFontFamilyChange:d},_=c.createContext(void 0);var J=c.forwardRef((e,t)=>{let o=c.useContext(_),a=v.Direction.useDirection();return o===void 0?c.createElement(v.Tooltip.Provider,{delayDuration:200},c.createElement(v.Direction.Provider,{dir:a},c.createElement(ge,{...e,ref:t}))):c.createElement(Q,{...e,ref:t})});J.displayName="Theme";var ge=c.forwardRef((e,t)=>{let{appearance:o=m.appearance.default,accentColor:a=m.accentColor.default,grayColor:n=m.grayColor.default,material:i=m.material.default,radius:s=m.radius.default,scaling:l=m.scaling.default,fontFamily:p=m.fontFamily.default,headingFontFamily:r,hasBackground:f=m.hasBackground.default,...u}=e,[P,D]=y(o),[x,S]=y(a),[F,N]=y(n),[w,H]=y(i),[k,V]=y(s),[R,I]=y(l),[T,B]=y(p),[$,E]=y(r);return c.createElement(Q,{...u,ref:t,isRoot:!0,hasBackground:f,appearance:P,accentColor:x,grayColor:F,material:w,radius:k,scaling:R,fontFamily:T,headingFontFamily:$,onAppearanceChange:D,onAccentColorChange:S,onGrayColorChange:N,onMaterialChange:H,onRadiusChange:V,onScalingChange:I,onFontFamilyChange:B,onHeadingFontFamilyChange:E})});ge.displayName="ThemeRoot";function Ie(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var Q=c.forwardRef((e,t)=>{let o=c.useContext(_),{asChild:a,isRoot:n,hasBackground:i,appearance:s=e.appearance??o?.appearance??m.appearance.default,accentColor:l=e.accentColor??o?.accentColor??m.accentColor.default,grayColor:p=e.grayColor??o?.resolvedGrayColor??m.grayColor.default,material:r=e.material??o?.material??m.material.default,radius:f=e.radius??o?.radius??m.radius.default,scaling:u=e.scaling??o?.scaling??m.scaling.default,fontFamily:P=e.fontFamily??o?.fontFamily??m.fontFamily.default,headingFontFamily:D=e.headingFontFamily??o?.headingFontFamily,onAppearanceChange:x=d,onAccentColorChange:S=d,onGrayColorChange:F=d,onMaterialChange:N=d,onRadiusChange:w=d,onScalingChange:H=d,onFontFamilyChange:k=d,onHeadingFontFamilyChange:V=d,...R}=e,I=a?v.Slot.Root:"div",T=p==="auto"?fe(l):p,B=e.appearance==="light"||e.appearance==="dark",$=i===void 0?n||B:i,E=c.useRef(null),ve=(0,M.useComposedRefs)(t,E),Z="data-os"in R;return(0,M.useLayoutEffect)(()=>{if(!n||Z)return;let K=E.current;if(!K)return;let ee=Ie();if(ee)return K.setAttribute("data-os",ee),()=>K.removeAttribute("data-os")},[n,Z]),c.createElement(_.Provider,{value:c.useMemo(()=>({appearance:s,accentColor:l,grayColor:p,resolvedGrayColor:T,material:r,radius:f,scaling:u,fontFamily:P,headingFontFamily:D,onAppearanceChange:x,onAccentColorChange:S,onGrayColorChange:F,onMaterialChange:N,onRadiusChange:w,onScalingChange:H,onFontFamilyChange:k,onHeadingFontFamilyChange:V}),[s,l,p,T,r,f,u,P,D,x,S,F,N,w,H,k,V])},c.createElement(I,{"data-is-root-theme":n?"true":"false","data-accent-color":l,"data-gray-color":T,"data-has-background":$?"true":"false","data-material":r,"data-radius":f,"data-scaling":u,"data-font-family":P,"data-heading-font-family":D,ref:ve,...R,className:(0,ye.default)("radix-themes",{light:s==="light",dark:s==="dark"},R.className)}))});Q.displayName="ThemeImpl";var Pe=e=>g.createElement(b.HoverCard.Root,{closeDelay:150,openDelay:200,...e});Pe.displayName="HoverCard.Root";var he=g.forwardRef(({children:e,className:t,...o},a)=>g.createElement(b.HoverCard.Trigger,{ref:a,className:(0,X.default)("rt-HoverCardTrigger",t),...o,asChild:!0},le(e)));he.displayName="HoverCard.Trigger";var Ce=g.forwardRef((e,t)=>{let{className:o,forceMount:a,container:n,...i}=pe(e,re);return g.createElement(b.HoverCard.Portal,{container:n,forceMount:a},g.createElement(J,{asChild:!0},g.createElement(b.HoverCard.Content,{align:"start",sideOffset:8,collisionPadding:10,...i,ref:t,className:(0,X.default)("rt-PopperContent","rt-HoverCardContent",o)})))});Ce.displayName="HoverCard.Content";
|
|
1
|
+
"use strict";var Pe=Object.create;var w=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var ve=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var De=(e,t)=>{for(var o in t)w(e,o,{get:t[o],enumerable:!0})},J=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ce(t))!Re.call(e,n)&&n!==o&&w(e,n,{get:()=>t[n],enumerable:!(s=he(t,n))||s.enumerable});return e};var P=(e,t,o)=>(o=e!=null?Pe(ve(e)):{},J(t||!e||!e.__esModule?w(o,"default",{value:e,enumerable:!0}):o,e)),Te=e=>J(w({},"__esModule",{value:!0}),e);var je={};De(je,{Content:()=>ue,Root:()=>ce,Trigger:()=>de});module.exports=Te(je);var y=P(require("react")),q=P(require("classnames")),T=require("radix-ui");var H={asChild:{type:"boolean"}};var Q={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var k={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var xe=["1","2","3"],X={...H,size:{type:"enum",className:"rt-r-size",values:xe,default:"2",responsive:!0},width:k.width,minWidth:k.minWidth,maxWidth:{...k.maxWidth,default:"480px"},...Q};var oe=P(require("classnames"));var be=[],Se=new Set;function Fe(e){let t=Object.assign({},...e),o=[],s=[],n=new Set;for(let i in t){let a=t[i],l=a.values??be,p={key:i,type:a.type,default:a.default,hasDefault:a.default!==void 0,responsive:"responsive"in a,className:a.className,customProperties:a.customProperties,parseValue:a.parseValue,values:l,valueSet:l.length>0?new Set(l):Se,enumValueSet:a.type==="enum"?new Set([a.default,...l]):void 0};a.className?(o.push(p),n.add(i)):(p.hasDefault||a.type==="enum")&&s.push(p)}return{styling:o,passthrough:s,stylingKeys:n}}var Ne={children:new WeakMap};function Z(e){let t=Ne;for(let o=0;o<e.length;o++){let s=e[o],n=t.children.get(s);n===void 0&&(n={children:new WeakMap},t.children.set(s,n)),t=n}return t.compiled??(t.compiled=Fe(e))}var we=["initial","xs","sm","md","lg","xl"],W=new Set(we);function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var He=new Set(["initial","xs","sm","md","lg","xl"]);function h(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(He.has(t))return!0;return!1}function V(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function te({className:e,customProperties:t,...o}){let s=B({allowArbitraryValues:!0,className:e,...o}),n=ke({customProperties:t,...o});return[s,n]}function B({allowArbitraryValues:e,value:t,className:o,propValues:s,propValueSet:n,parseValue:i=a=>a}){if(t){if(typeof t=="string")return V(s,n,t)?ee(o,t,i):e?o:void 0;if(h(t)){let a=t,l=[];for(let p in a){if(!I(a,p)||!W.has(p))continue;let r=a[p];if(r!==void 0){if(V(s,n,r)){let f=ee(o,r,i),d=p==="initial"?f:`${p}:${f}`;l.push(d)}else if(e){let f=p==="initial"?o:`${p}:${o}`;l.push(f)}}}return l.length>0?l.join(" "):""}if(e)return o}}function ee(e,t,o){let s=e?"-":"",n=o(t),i=n?.startsWith("-"),a=i?"-":"",l=i?n?.substring(1):n;return`${a}${e}${s}${l}`}function ke({customProperties:e,value:t,propValues:o,propValueSet:s,parseValue:n=i=>i}){if(!t||typeof t=="string"&&V(o,s,t))return;let i;if(typeof t=="string"){let a=n(t);i={};for(let l of e)i[l]=a;return i}if(h(t)){let a=t;for(let l in a){if(!I(a,l)||!W.has(l))continue;let p=a[l];if(p===void 0||V(o,s,p))continue;let r=n(p);i??(i={});for(let f of e){let d=l==="initial"?f:`${f}-${l}`;i[d]=r}}}return i??{}}function $(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Ve(e,t){let o=e.initial,s=!1;return t.hasDefault&&o===void 0&&(o=t.default,s=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,s=!0),s?{...e,initial:o}:e}function re(e,...t){let{styling:o,passthrough:s,stylingKeys:n}=Z(t),i={};for(let p in e)n.has(p)||(i[p]=e[p]);for(let p=0;p<s.length;p++){let r=s[p],f=i[r.key];if(f===void 0){r.hasDefault&&(i[r.key]=r.default);continue}r.enumValueSet!==void 0&&!r.enumValueSet.has(f)&&!h(f)&&(i[r.key]=r.default)}let a,l=[];for(let p=0;p<o.length;p++){let r=o[p],f=e[r.key];if(f===void 0&&r.hasDefault&&(f=r.default),r.enumValueSet!==void 0&&!r.enumValueSet.has(f)&&!h(f)&&(f=r.default),!!f){if(h(f)){if(!r.responsive)continue;f=Ve(f,r)}if(r.type==="enum"){let d=B({allowArbitraryValues:!1,value:f,className:r.className,propValues:r.values,propValueSet:r.valueSet,parseValue:r.parseValue});d&&l.push(d);continue}if(r.type==="string"||r.type==="enum | string"){let[d,g]=te({className:r.className,customProperties:r.customProperties,propValues:r.type==="string"?[]:r.values,propValueSet:r.type==="string"?void 0:r.valueSet,parseValue:r.parseValue,value:f});g&&(a=$(a,g)),d&&l.push(d);continue}if(r.type==="boolean"){l.push(r.className);continue}}}return i.className=(0,oe.default)(l.length>0?l.join(" "):void 0,e.className),i.style=$(a,e.style),i}var E=P(require("react")),ne=e=>{if(!E.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${E.Children.toArray(e).map(o=>typeof o=="object"&&"type"in o&&typeof o.type=="string"?o.type:typeof o).join(", ")}`);return e};var m=P(require("react")),fe=P(require("classnames")),v=require("radix-ui"),O=require("radix-ui/internal");function se(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var K=P(require("react"));function C(e){let[t,o]=K.useState(e),[s,n]=K.useState(e);return Object.is(e,s)||(n(e),o(e)),[t,o]}var ae=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],ie=["auto","gray","mauve","slate","sage","olive","sand"];var pe=["none","small","medium","large","full"];var Ee=["inherit","light","dark"],le=["sans","mono","serif"],c={...H,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:Ee,default:"inherit"},accentColor:{type:"enum",values:ae,default:"gray"},grayColor:{type:"enum",values:ie,default:"gray"},radius:{type:"enum",values:pe,default:"full"},fontFamily:{type:"enum",values:le,default:"sans"},headingFontFamily:{type:"enum",values:le}};var u=()=>{},gt={appearance:c.appearance.default,accentColor:c.accentColor.default,grayColor:c.grayColor.default,resolvedGrayColor:c.grayColor.default,radius:c.radius.default,fontFamily:c.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:u,onAccentColorChange:u,onGrayColorChange:u,onRadiusChange:u,onFontFamilyChange:u,onHeadingFontFamilyChange:u},M=m.createContext(void 0);var z=m.forwardRef((e,t)=>{let o=m.useContext(M),s=v.Direction.useDirection();return o===void 0?m.createElement(v.Tooltip.Provider,{delayDuration:200},m.createElement(v.Direction.Provider,{dir:s},m.createElement(me,{...e,ref:t}))):m.createElement(U,{...e,ref:t})});z.displayName="Theme";var me=m.forwardRef((e,t)=>{let{appearance:o=c.appearance.default,accentColor:s=c.accentColor.default,grayColor:n=c.grayColor.default,radius:i=c.radius.default,fontFamily:a=c.fontFamily.default,headingFontFamily:l,hasBackground:p=c.hasBackground.default,...r}=e,[f,d]=C(o),[g,x]=C(s),[b,S]=C(n),[F,N]=C(i),[R,j]=C(a),[D,G]=C(l);return m.createElement(U,{...r,ref:t,isRoot:!0,hasBackground:p,appearance:f,accentColor:g,grayColor:b,radius:F,fontFamily:R,headingFontFamily:D,onAppearanceChange:d,onAccentColorChange:x,onGrayColorChange:S,onRadiusChange:N,onFontFamilyChange:j,onHeadingFontFamilyChange:G})});me.displayName="ThemeRoot";function Oe(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var U=m.forwardRef((e,t)=>{let o=m.useContext(M),{asChild:s,isRoot:n,hasBackground:i,appearance:a=e.appearance??o?.appearance??c.appearance.default,accentColor:l=e.accentColor??o?.accentColor??c.accentColor.default,grayColor:p=e.grayColor??o?.resolvedGrayColor??c.grayColor.default,radius:r=e.radius??o?.radius??c.radius.default,fontFamily:f=e.fontFamily??o?.fontFamily??c.fontFamily.default,headingFontFamily:d=e.headingFontFamily??o?.headingFontFamily,onAppearanceChange:g=u,onAccentColorChange:x=u,onGrayColorChange:b=u,onRadiusChange:S=u,onFontFamilyChange:F=u,onHeadingFontFamilyChange:N=u,...R}=e,j=s?v.Slot.Root:"div",D=p==="auto"?se(l):p,G=e.appearance==="light"||e.appearance==="dark",ye=i===void 0?n||G:i,L=m.useRef(null),ge=(0,O.useComposedRefs)(t,L),Y="data-os"in R;return(0,O.useLayoutEffect)(()=>{if(!n||Y)return;let A=L.current;if(!A)return;let _=Oe();if(_)return A.setAttribute("data-os",_),()=>A.removeAttribute("data-os")},[n,Y]),m.createElement(M.Provider,{value:m.useMemo(()=>({appearance:a,accentColor:l,grayColor:p,resolvedGrayColor:D,radius:r,fontFamily:f,headingFontFamily:d,onAppearanceChange:g,onAccentColorChange:x,onGrayColorChange:b,onRadiusChange:S,onFontFamilyChange:F,onHeadingFontFamilyChange:N}),[a,l,p,D,r,f,d,g,x,b,S,F,N])},m.createElement(j,{"data-is-root-theme":n?"true":"false","data-accent-color":l,"data-gray-color":D,"data-has-background":ye?"true":"false","data-radius":r,"data-font-family":f,"data-heading-font-family":d,ref:ge,...R,className:(0,fe.default)("radix-themes",{light:a==="light",dark:a==="dark"},R.className)}))});U.displayName="ThemeImpl";var ce=e=>y.createElement(T.HoverCard.Root,{closeDelay:150,openDelay:200,...e});ce.displayName="HoverCard.Root";var de=y.forwardRef(({children:e,className:t,...o},s)=>y.createElement(T.HoverCard.Trigger,{ref:s,className:(0,q.default)("rt-HoverCardTrigger",t),...o,asChild:!0},ne(e)));de.displayName="HoverCard.Trigger";var ue=y.forwardRef((e,t)=>{let{className:o,forceMount:s,container:n,...i}=re(e,X);return y.createElement(T.HoverCard.Portal,{container:n,forceMount:s},y.createElement(z,{asChild:!0},y.createElement(T.HoverCard.Content,{align:"start",sideOffset:8,collisionPadding:10,...i,ref:t,className:(0,q.default)("rt-PopperContent","rt-HoverCardContent",o)})))});ue.displayName="HoverCard.Content";
|
|
2
2
|
//# sourceMappingURL=hover-card.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/hover-card.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/height.props.ts", "../../../src/props/width.props.ts", "../../../src/components/hover-card.props.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/helpers/require-react-element.ts", "../../../src/components/theme.tsx", "../../../src/helpers/get-matching-gray-color.ts", "../../../src/hooks/use-prop-synced-state.ts", "../../../src/props/color.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/components/theme.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { HoverCard as HoverCardPrimitive } from 'radix-ui';\n\nimport { hoverCardContentPropDefs } from './hover-card.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { Theme } from './theme.js';\n\nimport type { HoverCardContentOwnProps } from './hover-card.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ninterface HoverCardRootProps\n extends React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Root> {}\nconst HoverCardRoot: React.FC<HoverCardRootProps> = (props) => (\n <HoverCardPrimitive.Root closeDelay={150} openDelay={200} {...props} />\n);\nHoverCardRoot.displayName = 'HoverCard.Root';\n\ntype HoverCardTriggerElement = React.ElementRef<typeof HoverCardPrimitive.Trigger>;\ninterface HoverCardTriggerProps\n extends ComponentPropsWithout<typeof HoverCardPrimitive.Trigger, RemovedProps> {}\nconst HoverCardTrigger = React.forwardRef<HoverCardTriggerElement, HoverCardTriggerProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <HoverCardPrimitive.Trigger\n ref={forwardedRef}\n className={classNames('rt-HoverCardTrigger', className)}\n {...props}\n asChild\n >\n {requireReactElement(children)}\n </HoverCardPrimitive.Trigger>\n )\n);\nHoverCardTrigger.displayName = 'HoverCard.Trigger';\n\ntype HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;\ninterface HoverCardContentProps\n extends ComponentPropsWithout<typeof HoverCardPrimitive.Content, RemovedProps>,\n HoverCardContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Portal>['container'];\n}\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n (props, forwardedRef) => {\n const { className, forceMount, container, ...contentProps } = extractProps(\n props,\n hoverCardContentPropDefs\n );\n return (\n <HoverCardPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <HoverCardPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={forwardedRef}\n className={classNames('rt-PopperContent', 'rt-HoverCardContent', className)}\n />\n </Theme>\n </HoverCardPrimitive.Portal>\n );\n }\n);\nHoverCardContent.displayName = 'HoverCard.Content';\n\nexport { HoverCardRoot as Root, HoverCardTrigger as Trigger, HoverCardContent as Content };\nexport type {\n HoverCardRootProps as RootProps,\n HoverCardTriggerProps as TriggerProps,\n HoverCardContentProps as ContentProps,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3'] as const;\n\nconst hoverCardContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n};\n\ntype HoverCardContentOwnProps = GetPropDefTypes<\n typeof hoverCardContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { hoverCardContentPropDefs };\nexport type { HoverCardContentOwnProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import * as React from 'react';\n\n/** A function that throws an error when a value isn't a valid React Element, otherwise returns the value */\nexport const requireReactElement = <T extends React.ReactNode>(children: T): T => {\n const isReactElement = React.isValidElement(children);\n\n if (!isReactElement) {\n throw Error(\n `Expected a single React Element child, but got: ${React.Children.toArray(children)\n .map((child) =>\n typeof child === 'object' && 'type' in child && typeof child.type === 'string'\n ? child.type\n : typeof child\n )\n .join(', ')}`\n );\n }\n\n return children;\n};\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n // Direction is inherited: a Radix DirectionProvider above the Theme (for a right-to-left app)\n // wins, and left-to-right stays the default when there is none.\n const dir = Direction.useDirection();\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir={dir}>\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n\n // Each of these follows its prop but stays independently settable, so\n // `ThemePanel` can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n\n const [material, setMaterial] = usePropSyncedState(materialProp);\n\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [scaling, setScaling] = usePropSyncedState(scalingProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n // `data-os` can only be resolved on the client. Writing it straight to the\n // DOM keeps it out of the server markup \u2014 so hydration still matches \u2014 without\n // spending a render pass, and a state update here would re-render the whole\n // application on mount.\n const rootRef = React.useRef<ThemeImplElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const hasExplicitOS = 'data-os' in themeProps;\n\n useLayoutEffect(() => {\n if (!isRoot || hasExplicitOS) return;\n const node = rootRef.current;\n if (!node) return;\n\n const os = getClientOS();\n if (!os) return;\n node.setAttribute('data-os', os);\n return () => node.removeAttribute('data-os');\n }, [isRoot, hasExplicitOS]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\n ref={composedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import * as React from 'react';\n\n/**\n * State that tracks a prop but can also be set imperatively \u2014 the shape `Theme`\n * needs, where a prop sets the value and `ThemePanel` can change it at runtime.\n *\n * Adjusts state during render rather than syncing in a `useEffect`. An effect\n * would commit one render carrying the *old* value and schedule a second one,\n * which for a provider means every consumer renders twice and the browser can\n * paint the stale value in between.\n *\n * @see https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\nexport function usePropSyncedState<T>(propValue: T) {\n const [value, setValue] = React.useState(propValue);\n const [previousPropValue, setPreviousPropValue] = React.useState(propValue);\n\n if (!Object.is(propValue, previousPropValue)) {\n setPreviousPropValue(propValue);\n setValue(propValue);\n }\n\n return [value, setValue] as const;\n}\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Badge, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'gray' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'gray' },\n /**\n * What surfaces are made of: `solid`, or `translucent` with a backdrop blur.\n */\n material: { type: 'enum', values: materials, default: 'solid' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'full' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n"],
|
|
5
|
-
"mappings": "ykBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,SAAAC,GAAA,YAAAC,KAAA,eAAAC,GAAAL,IAAA,IAAAM,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAgD,oBCAhD,IAAMC,EAAiB,CAKrB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AwB,WAAY,IAAK,UAAW,IAAM,GAAGD,EAAO,EAEvED,GAAc,YAAc,iBAK5B,IAAMG,GAAyB,aAC7B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGJ,CAAM,EAAGK,IAClC,gBAAC,EAAAJ,UAAmB,QAAnB,CACC,IAAKI,EACL,aAAW,EAAAC,SAAW,sBAAuBF,CAAS,EACrD,GAAGJ,EACJ,QAAO,IAENO,GAAoBJ,CAAQ,CAC/B,CAEJ,EACAD,GAAiB,YAAc,oBAQ/B,IAAMM,GAAyB,aAC7B,CAACR,EAAOK,IAAiB,CACvB,GAAM,CAAE,UAAAD,EAAW,WAAAK,EAAY,UAAAC,EAAW,GAAGC,CAAa,EAAIC,GAC5DZ,EACAa,EACF,EACA,OACE,gBAAC,EAAAZ,UAAmB,OAAnB,CAA0B,UAAWS,EAAW,WAAYD,GAC3D,gBAACK,EAAA,CAAM,QAAO,IACZ,gBAAC,EAAAb,UAAmB,QAAnB,CACC,MAAM,QACN,WAAY,EACZ,iBAAkB,GACjB,GAAGU,EACJ,IAAKN,EACL,aAAW,EAAAC,SAAW,mBAAoB,sBAAuBF,CAAS,EAC5E,CACF,CACF,CAEJ,CACF,EACAI,GAAiB,YAAc",
|
|
6
|
-
"names": ["hover_card_exports", "__export", "HoverCardContent", "HoverCardRoot", "HoverCardTrigger", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "asChildPropDef", "heightPropDefs", "widthPropDefs", "contentSizes", "hoverCardContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "React", "requireReactElement", "children", "child", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "accentColors", "grayColors", "radii", "appearances", "
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { HoverCard as HoverCardPrimitive } from 'radix-ui';\n\nimport { hoverCardContentPropDefs } from './hover-card.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport { Theme } from './theme.js';\n\nimport type { HoverCardContentOwnProps } from './hover-card.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ninterface HoverCardRootProps\n extends React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Root> {}\nconst HoverCardRoot: React.FC<HoverCardRootProps> = (props) => (\n <HoverCardPrimitive.Root closeDelay={150} openDelay={200} {...props} />\n);\nHoverCardRoot.displayName = 'HoverCard.Root';\n\ntype HoverCardTriggerElement = React.ElementRef<typeof HoverCardPrimitive.Trigger>;\ninterface HoverCardTriggerProps\n extends ComponentPropsWithout<typeof HoverCardPrimitive.Trigger, RemovedProps> {}\nconst HoverCardTrigger = React.forwardRef<HoverCardTriggerElement, HoverCardTriggerProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <HoverCardPrimitive.Trigger\n ref={forwardedRef}\n className={classNames('rt-HoverCardTrigger', className)}\n {...props}\n asChild\n >\n {requireReactElement(children)}\n </HoverCardPrimitive.Trigger>\n )\n);\nHoverCardTrigger.displayName = 'HoverCard.Trigger';\n\ntype HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;\ninterface HoverCardContentProps\n extends ComponentPropsWithout<typeof HoverCardPrimitive.Content, RemovedProps>,\n HoverCardContentOwnProps {\n container?: React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Portal>['container'];\n}\nconst HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(\n (props, forwardedRef) => {\n const { className, forceMount, container, ...contentProps } = extractProps(\n props,\n hoverCardContentPropDefs\n );\n return (\n <HoverCardPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <HoverCardPrimitive.Content\n align=\"start\"\n sideOffset={8}\n collisionPadding={10}\n {...contentProps}\n ref={forwardedRef}\n className={classNames('rt-PopperContent', 'rt-HoverCardContent', className)}\n />\n </Theme>\n </HoverCardPrimitive.Portal>\n );\n }\n);\nHoverCardContent.displayName = 'HoverCard.Content';\n\nexport { HoverCardRoot as Root, HoverCardTrigger as Trigger, HoverCardContent as Content };\nexport type {\n HoverCardRootProps as RootProps,\n HoverCardTriggerProps as TriggerProps,\n HoverCardContentProps as ContentProps,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { heightPropDefs } from '../props/height.props.js';\nimport { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst contentSizes = ['1', '2', '3'] as const;\n\nconst hoverCardContentPropDefs = {\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: contentSizes,\n default: '2',\n responsive: true,\n },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '480px' },\n ...heightPropDefs,\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n size: PropDef<(typeof contentSizes)[number]>;\n};\n\ntype HoverCardContentOwnProps = GetPropDefTypes<\n typeof hoverCardContentPropDefs &\n typeof asChildPropDef &\n typeof widthPropDefs &\n typeof heightPropDefs\n>;\n\nexport { hoverCardContentPropDefs };\nexport type { HoverCardContentOwnProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import * as React from 'react';\n\n/** A function that throws an error when a value isn't a valid React Element, otherwise returns the value */\nexport const requireReactElement = <T extends React.ReactNode>(children: T): T => {\n const isReactElement = React.isValidElement(children);\n\n if (!isReactElement) {\n throw Error(\n `Expected a single React Element child, but got: ${React.Children.toArray(children)\n .map((child) =>\n typeof child === 'object' && 'type' in child && typeof child.type === 'string'\n ? child.type\n : typeof child\n )\n .join(', ')}`\n );\n }\n\n return children;\n};\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n radius: ThemeRadius;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n radius: themePropDefs.radius.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onRadiusChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n // Direction is inherited: a Radix DirectionProvider above the Theme (for a right-to-left app)\n // wins, and left-to-right stays the default when there is none.\n const dir = Direction.useDirection();\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir={dir}>\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n radius: radiusProp = themePropDefs.radius.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n // Each of these follows its prop but stays independently settable, so\n // `ThemePanel` can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n radius={radius}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onRadiusChange={setRadius}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onRadiusChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n // `data-os` can only be resolved on the client. Writing it straight to the\n // DOM keeps it out of the server markup \u2014 so hydration still matches \u2014 without\n // spending a render pass, and a state update here would re-render the whole\n // application on mount.\n const rootRef = React.useRef<ThemeImplElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const hasExplicitOS = 'data-os' in themeProps;\n\n useLayoutEffect(() => {\n if (!isRoot || hasExplicitOS) return;\n const node = rootRef.current;\n if (!node) return;\n\n const os = getClientOS();\n if (!os) return;\n node.setAttribute('data-os', os);\n return () => node.removeAttribute('data-os');\n }, [isRoot, hasExplicitOS]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n radius,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onRadiusChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n radius,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onRadiusChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-radius={radius}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\n ref={composedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import * as React from 'react';\n\n/**\n * State that tracks a prop but can also be set imperatively \u2014 the shape `Theme`\n * needs, where a prop sets the value and `ThemePanel` can change it at runtime.\n *\n * Adjusts state during render rather than syncing in a `useEffect`. An effect\n * would commit one render carrying the *old* value and schedule a second one,\n * which for a provider means every consumer renders twice and the browser can\n * paint the stale value in between.\n *\n * @see https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\nexport function usePropSyncedState<T>(propValue: T) {\n const [value, setValue] = React.useState(propValue);\n const [previousPropValue, setPreviousPropValue] = React.useState(propValue);\n\n if (!Object.is(propValue, previousPropValue)) {\n setPreviousPropValue(propValue);\n setValue(propValue);\n }\n\n return [value, setValue] as const;\n}\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Badge, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'gray' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'gray' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'full' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n"],
|
|
5
|
+
"mappings": "skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,SAAAC,GAAA,YAAAC,KAAA,eAAAC,GAAAL,IAAA,IAAAM,EAAuB,oBACvBC,EAAuB,yBACvBC,EAAgD,oBCAhD,IAAMC,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECRA,IAAMC,EAAiB,CAYrB,OAAQ,CACN,KAAM,SACN,UAAW,SACX,iBAAkB,CAAC,UAAU,EAC7B,WAAY,EACd,EAY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EACnB,kBAAiBwB,EAEjB,sBAAqB7B,GAAgB,OAAS,QAC9C,cAAaS,EACb,mBAAkBE,EAClB,2BAA0BE,EAC1B,IAAKoB,GACJ,GAAGN,EACJ,aAAW,GAAAU,SACT,eACA,CACE,MAAOnC,IAAe,QACtB,KAAMA,IAAe,MACvB,EACAyB,EAAW,SACb,EACF,CACF,CAEJ,CAAC,EACDnC,EAAU,YAAc,YbzPxB,IAAM8C,GAA+CC,GACnD,gBAAC,EAAAC,UAAmB,KAAnB,CAAwB,WAAY,IAAK,UAAW,IAAM,GAAGD,EAAO,EAEvED,GAAc,YAAc,iBAK5B,IAAMG,GAAyB,aAC7B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGJ,CAAM,EAAGK,IAClC,gBAAC,EAAAJ,UAAmB,QAAnB,CACC,IAAKI,EACL,aAAW,EAAAC,SAAW,sBAAuBF,CAAS,EACrD,GAAGJ,EACJ,QAAO,IAENO,GAAoBJ,CAAQ,CAC/B,CAEJ,EACAD,GAAiB,YAAc,oBAQ/B,IAAMM,GAAyB,aAC7B,CAACR,EAAOK,IAAiB,CACvB,GAAM,CAAE,UAAAD,EAAW,WAAAK,EAAY,UAAAC,EAAW,GAAGC,CAAa,EAAIC,GAC5DZ,EACAa,CACF,EACA,OACE,gBAAC,EAAAZ,UAAmB,OAAnB,CAA0B,UAAWS,EAAW,WAAYD,GAC3D,gBAACK,EAAA,CAAM,QAAO,IACZ,gBAAC,EAAAb,UAAmB,QAAnB,CACC,MAAM,QACN,WAAY,EACZ,iBAAkB,GACjB,GAAGU,EACJ,IAAKN,EACL,aAAW,EAAAC,SAAW,mBAAoB,sBAAuBF,CAAS,EAC5E,CACF,CACF,CAEJ,CACF,EACAI,GAAiB,YAAc",
|
|
6
|
+
"names": ["hover_card_exports", "__export", "HoverCardContent", "HoverCardRoot", "HoverCardTrigger", "__toCommonJS", "React", "import_classnames", "import_radix_ui", "asChildPropDef", "heightPropDefs", "widthPropDefs", "contentSizes", "hoverCardContentPropDefs", "asChildPropDef", "widthPropDefs", "heightPropDefs", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "React", "requireReactElement", "children", "child", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "accentColors", "grayColors", "radii", "appearances", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "Theme", "props", "forwardedRef", "context", "ThemeContext", "dir", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "themePropDefs", "accentColorProp", "grayColorProp", "radiusProp", "fontFamilyProp", "headingFontFamilyProp", "hasBackground", "rootProps", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "radius", "setRadius", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "getClientOS", "ua", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "noop", "onAccentColorChange", "onGrayColorChange", "onRadiusChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "hasExplicitOS", "node", "os", "classNames", "HoverCardRoot", "props", "HoverCardPrimitive", "HoverCardTrigger", "children", "className", "forwardedRef", "classNames", "requireReactElement", "HoverCardContent", "forceMount", "container", "contentProps", "extractProps", "hoverCardContentPropDefs", "Theme"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var ut=Object.create;var q=Object.defineProperty;var ct=Object.getOwnPropertyDescriptor;var dt=Object.getOwnPropertyNames;var yt=Object.getPrototypeOf,Pt=Object.prototype.hasOwnProperty;var gt=(e,t)=>{for(var o in t)q(e,o,{get:t[o],enumerable:!0})},xe=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of dt(t))!Pt.call(e,r)&&r!==o&&q(e,r,{get:()=>t[r],enumerable:!(n=ct(t,r))||n.enumerable});return e};var y=(e,t,o)=>(o=e!=null?ut(yt(e)):{},xe(t||!e||!e.__esModule?q(o,"default",{value:e,enumerable:!0}):o,e)),ht=e=>xe(q({},"__esModule",{value:!0}),e);var so={};gt(so,{IconButton:()=>mt});module.exports=ht(so);var Z=y(require("react"));var d=y(require("react")),Ke=y(require("classnames")),qe=require("radix-ui");var w={asChild:{type:"boolean"}};var U=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],Te=["auto","gray","mauve","slate","sage","olive","sand"],Ne={color:{type:"enum",values:U,default:void 0}},Se={color:{type:"enum",values:U,default:""}};var se=["none","small","medium","large","full"],we={radius:{type:"enum",values:se,default:void 0}};var vt=["1","2","3","4"],Dt=["raised","solid","soft","surface","outline","ghost"],bt=["solid","translucent"],ne={...w,size:{type:"enum",className:"rt-r-size",values:vt,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:Dt,default:"solid"},...Se,...we,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:bt,default:void 0},flush:{type:"boolean",default:!1}};var X=y(require("react")),Ae=y(require("classnames"));var je=y(require("classnames"));var Rt=[],Ct=new Set;function xt(e){let t=Object.assign({},...e),o=[],n=[],r=new Set;for(let p in t){let s=t[p],l=s.values??Rt,i={key:p,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:l,valueSet:l.length>0?new Set(l):Ct,enumValueSet:s.type==="enum"?new Set([s.default,...l]):void 0};s.className?(o.push(i),r.add(p)):(i.hasDefault||s.type==="enum")&&n.push(i)}return{styling:o,passthrough:n,stylingKeys:r}}var Tt={children:new WeakMap};function Be(e){let t=Tt;for(let o=0;o<e.length;o++){let n=e[o],r=t.children.get(n);r===void 0&&(r={children:new WeakMap},t.children.set(n,r)),t=r}return t.compiled??(t.compiled=xt(e))}var Nt=["initial","xs","sm","md","lg","xl"],ae=new Set(Nt);function pe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var St=new Set(["initial","xs","sm","md","lg","xl"]);function F(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(St.has(t))return!0;return!1}function _(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function Ve({className:e,customProperties:t,...o}){let n=ie({allowArbitraryValues:!0,className:e,...o}),r=wt({customProperties:t,...o});return[n,r]}function ie({allowArbitraryValues:e,value:t,className:o,propValues:n,propValueSet:r,parseValue:p=s=>s}){if(t){if(typeof t=="string")return _(n,r,t)?Fe(o,t,p):e?o:void 0;if(F(t)){let s=t,l=[];for(let i in s){if(!pe(s,i)||!ae.has(i))continue;let a=s[i];if(a!==void 0){if(_(n,r,a)){let m=Fe(o,a,p),u=i==="initial"?m:`${i}:${m}`;l.push(u)}else if(e){let m=i==="initial"?o:`${i}:${o}`;l.push(m)}}}return l.length>0?l.join(" "):""}if(e)return o}}function Fe(e,t,o){let n=e?"-":"",r=o(t),p=r?.startsWith("-"),s=p?"-":"",l=p?r?.substring(1):r;return`${s}${e}${n}${l}`}function wt({customProperties:e,value:t,propValues:o,propValueSet:n,parseValue:r=p=>p}){if(!t||typeof t=="string"&&_(o,n,t))return;let p;if(typeof t=="string"){let s=r(t);p={};for(let l of e)p[l]=s;return p}if(F(t)){let s=t;for(let l in s){if(!pe(s,l)||!ae.has(l))continue;let i=s[l];if(i===void 0||_(o,n,i))continue;let a=r(i);p??(p={});for(let m of e){let u=l==="initial"?m:`${m}-${l}`;p[u]=a}}}return p??{}}function le(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Bt(e,t){let o=e.initial,n=!1;return t.hasDefault&&o===void 0&&(o=t.default,n=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,n=!0),n?{...e,initial:o}:e}function D(e,...t){let{styling:o,passthrough:n,stylingKeys:r}=Be(t),p={};for(let i in e)r.has(i)||(p[i]=e[i]);for(let i=0;i<n.length;i++){let a=n[i],m=p[a.key];if(m===void 0){a.hasDefault&&(p[a.key]=a.default);continue}a.enumValueSet!==void 0&&!a.enumValueSet.has(m)&&!F(m)&&(p[a.key]=a.default)}let s,l=[];for(let i=0;i<o.length;i++){let a=o[i],m=e[a.key];if(m===void 0&&a.hasDefault&&(m=a.default),a.enumValueSet!==void 0&&!a.enumValueSet.has(m)&&!F(m)&&(m=a.default),!!m){if(F(m)){if(!a.responsive)continue;m=Bt(m,a)}if(a.type==="enum"){let u=ie({allowArbitraryValues:!1,value:m,className:a.className,propValues:a.values,propValueSet:a.valueSet,parseValue:a.parseValue});u&&l.push(u);continue}if(a.type==="string"||a.type==="enum | string"){let[u,h]=Ve({className:a.className,customProperties:a.customProperties,propValues:a.type==="string"?[]:a.values,propValueSet:a.type==="string"?void 0:a.valueSet,parseValue:a.parseValue,value:m});h&&(s=le(s,h)),u&&l.push(u);continue}if(a.type==="boolean"){l.push(a.className);continue}}}return p.className=(0,je.default)(l.length>0?l.join(" "):void 0,e.className),p.style=le(s,e.style),p}var V=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ee={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:V,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:V,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:V,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:V,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:V,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:V,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:V,responsive:!0}};var ke={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var W={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var me=["visible","hidden","clip","scroll","auto"],Ft=["static","relative","absolute","fixed","sticky"],L=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],Vt=["0","1"],jt=["0","1"],Et=["start","center","end","baseline","stretch"],kt=["start","center","end","baseline","stretch"],Oe={...Ee,...W,...ke,position:{type:"enum",className:"rt-r-position",values:Ft,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:L,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:L,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:L,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:L,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:L,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:me,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:me,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:me,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:Vt,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:jt,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"rt-r-as",values:Et,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:kt,responsive:!0}};var j=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],B={m:{type:"enum | string",values:j,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:j,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:j,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:j,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:j,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:j,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:j,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var Y=require("radix-ui"),Go=Y.Slot.Root,Ge=Y.Slot.Root,Io=Y.Slot.Slottable;var fe=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ie={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:fe,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:fe,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:fe,responsive:!0}};var Ot=["div","span"],Gt=["none","inline-flex","flex"],It=["row","column","row-reverse","column-reverse"],Wt=["start","center","end","baseline","stretch"],At=["start","center","end","between"],Mt=["nowrap","wrap","wrap-reverse"],We={as:{type:"enum",values:Ot,default:"div"},...w,display:{type:"enum",className:"rt-r-display",values:Gt,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:It,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:Wt,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:At,parseValue:Ht,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:Mt,responsive:!0},...Ie};function Ht(e){return e==="between"?"space-between":e}var A=X.forwardRef((e,t)=>{let{className:o,asChild:n,as:r="div",...p}=D(e,We,Oe,B);return X.createElement(n?Ge:r,{...p,ref:t,className:(0,Ae.default)("rt-Flex",o)})});A.displayName="Flex";var P=y(require("react")),He=y(require("classnames"));var zt=["1","2","3"],Me={size:{type:"enum",className:"rt-r-size",values:zt,default:"2",responsive:!0},loading:{type:"boolean",default:!0}};var ue=P.forwardRef((e,t)=>{let{className:o,children:n,loading:r,...p}=D(e,Me,B);if(!r)return n;let s=P.createElement("span",{...p,ref:t,className:(0,He.default)("rt-Spinner",o)},P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}));return n===void 0?s:P.createElement(A,{asChild:!0,position:"relative",align:"center",justify:"center"},P.createElement("span",null,P.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},n),P.createElement(A,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},P.createElement("span",null,s))))});ue.displayName="Spinner";var ce=require("radix-ui"),ze=ce.VisuallyHidden.Root,tr=ce.VisuallyHidden.Root;function Le(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([o,n])=>[o,t(n)]))}function $e(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}var de=d.forwardRef((e,t)=>{let{size:o=ne.size.default}=e,{className:n,children:r,asChild:p,as:s,color:l,radius:i,material:a,flush:m,disabled:u=e.loading,...h}=D(e,ne,B),v=a,x=p?qe.Slot.Root:s||"button",T=p||!s||["button","input","textarea","select"].includes(s),R=!p&&(!s||s==="button"),O="type"in h,G=d.useId(),N=e.loading?`${G}-loading`:void 0,S=d.useMemo(()=>typeof r=="string"?r:d.isValidElement(r)&&typeof r.props?.children=="string"?r.props.children:"button",[r]),I=d.useMemo(()=>e.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":N,"aria-label":`${S} (loading)`}:{},[e.loading,N,S]);return d.createElement(x,{"data-disabled":u||void 0,"data-accent-color":l,"data-radius":i,"data-material":v,"data-flush":m?"true":void 0,...h,...I,ref:t,className:(0,Ke.default)("rt-reset","rt-BaseButton",n),...T&&{disabled:u},...R&&!O?{type:"button"}:{}},e.loading?d.createElement(d.Fragment,null,d.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},r),d.createElement(ze,null,d.createElement("span",{id:N},S," is loading, please wait..."),r),d.createElement(A,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},d.createElement("span",null,d.createElement(ue,{size:Le(o,$e),"aria-hidden":"true"})))):r)});de.displayName="BaseButton";var $=y(require("react")),lt=y(require("classnames"));var b=y(require("react")),pt=y(require("classnames")),M=require("radix-ui");var E=y(require("react")),tt=require("radix-ui");var Lt=["loud","medium","quiet"],Ue={emphasis:{type:"enum",className:"rt-emphasis",values:Lt,default:void 0}};var $t=["normal","start","end","both"],_e={trim:{type:"enum",className:"rt-r-lt",values:$t,responsive:!0}};var Kt=["left","center","right"],Ye={align:{type:"enum",className:"rt-r-ta",values:Kt,responsive:!0}};var qt=["wrap","nowrap","pretty","balance"],Xe={wrap:{type:"enum",className:"rt-r-tw",values:qt,responsive:!0}};var Je={truncate:{type:"boolean",className:"rt-truncate"}};var Ut=["sans","mono","serif"],Qe={font:{type:"enum",className:"rt-r-ff",values:Ut}};var _t=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],Ze={weight:{type:"enum",className:"rt-r-weight",values:_t,responsive:!0}};var Yt=["span","div","label","p"],Xt=["0","1","2","3","4","5","6","7","8","9","10","11","12"],et={as:{type:"enum",values:Yt,default:"span"},...w,size:{type:"enum",className:"rt-r-size",values:Xt,responsive:!0},...Qe,...Ze,...Ye,..._e,...Je,...Xe,...Ne,...Ue};var Jt={...et,...B},ye=E.memo(E.forwardRef((e,t)=>{let{children:o,className:n,asChild:r,as:p="span",color:s,...l}=D(e,Jt),i=n?`rt-Text ${n}`:"rt-Text";return r?E.createElement(tt.Slot.Root,{"data-accent-color":s,...l,ref:t,className:i},o):E.createElement(p,{"data-accent-color":s,...l,ref:t,className:i},o)}));ye.displayName="Text";var c=y(require("react")),st=y(require("classnames")),k=require("radix-ui"),J=require("radix-ui/internal");function ot(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var Pe=y(require("react"));function C(e){let[t,o]=Pe.useState(e),[n,r]=Pe.useState(e);return Object.is(e,n)||(r(e),o(e)),[t,o]}var Qt=["inherit","light","dark"],Zt=["solid","translucent"],eo=["90%","95%","100%","105%","110%"],rt=["sans","mono","serif"],f={...w,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:Qt,default:"inherit"},accentColor:{type:"enum",values:U,default:"gray"},grayColor:{type:"enum",values:Te,default:"gray"},material:{type:"enum",values:Zt,default:"solid"},radius:{type:"enum",values:se,default:"full"},scaling:{type:"enum",values:eo,default:"100%"},fontFamily:{type:"enum",values:rt,default:"sans"},headingFontFamily:{type:"enum",values:rt}};var g=()=>{},zr={appearance:f.appearance.default,accentColor:f.accentColor.default,grayColor:f.grayColor.default,resolvedGrayColor:f.grayColor.default,material:f.material.default,radius:f.radius.default,scaling:f.scaling.default,fontFamily:f.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:g,onAccentColorChange:g,onGrayColorChange:g,onMaterialChange:g,onRadiusChange:g,onScalingChange:g,onFontFamilyChange:g,onHeadingFontFamilyChange:g},ge=c.createContext(void 0);var he=c.forwardRef((e,t)=>{let o=c.useContext(ge),n=k.Direction.useDirection();return o===void 0?c.createElement(k.Tooltip.Provider,{delayDuration:200},c.createElement(k.Direction.Provider,{dir:n},c.createElement(nt,{...e,ref:t}))):c.createElement(ve,{...e,ref:t})});he.displayName="Theme";var nt=c.forwardRef((e,t)=>{let{appearance:o=f.appearance.default,accentColor:n=f.accentColor.default,grayColor:r=f.grayColor.default,material:p=f.material.default,radius:s=f.radius.default,scaling:l=f.scaling.default,fontFamily:i=f.fontFamily.default,headingFontFamily:a,hasBackground:m=f.hasBackground.default,...u}=e,[h,v]=C(o),[x,T]=C(n),[R,O]=C(r),[G,N]=C(p),[S,I]=C(s),[H,ee]=C(l),[z,te]=C(i),[oe,K]=C(a);return c.createElement(ve,{...u,ref:t,isRoot:!0,hasBackground:m,appearance:h,accentColor:x,grayColor:R,material:G,radius:S,scaling:H,fontFamily:z,headingFontFamily:oe,onAppearanceChange:v,onAccentColorChange:T,onGrayColorChange:O,onMaterialChange:N,onRadiusChange:I,onScalingChange:ee,onFontFamilyChange:te,onHeadingFontFamilyChange:K})});nt.displayName="ThemeRoot";function to(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var ve=c.forwardRef((e,t)=>{let o=c.useContext(ge),{asChild:n,isRoot:r,hasBackground:p,appearance:s=e.appearance??o?.appearance??f.appearance.default,accentColor:l=e.accentColor??o?.accentColor??f.accentColor.default,grayColor:i=e.grayColor??o?.resolvedGrayColor??f.grayColor.default,material:a=e.material??o?.material??f.material.default,radius:m=e.radius??o?.radius??f.radius.default,scaling:u=e.scaling??o?.scaling??f.scaling.default,fontFamily:h=e.fontFamily??o?.fontFamily??f.fontFamily.default,headingFontFamily:v=e.headingFontFamily??o?.headingFontFamily,onAppearanceChange:x=g,onAccentColorChange:T=g,onGrayColorChange:R=g,onMaterialChange:O=g,onRadiusChange:G=g,onScalingChange:N=g,onFontFamilyChange:S=g,onHeadingFontFamilyChange:I=g,...H}=e,ee=n?k.Slot.Root:"div",z=i==="auto"?ot(l):i,te=e.appearance==="light"||e.appearance==="dark",oe=p===void 0?r||te:p,K=c.useRef(null),ft=(0,J.useComposedRefs)(t,K),Re="data-os"in H;return(0,J.useLayoutEffect)(()=>{if(!r||Re)return;let re=K.current;if(!re)return;let Ce=to();if(Ce)return re.setAttribute("data-os",Ce),()=>re.removeAttribute("data-os")},[r,Re]),c.createElement(ge.Provider,{value:c.useMemo(()=>({appearance:s,accentColor:l,grayColor:i,resolvedGrayColor:z,material:a,radius:m,scaling:u,fontFamily:h,headingFontFamily:v,onAppearanceChange:x,onAccentColorChange:T,onGrayColorChange:R,onMaterialChange:O,onRadiusChange:G,onScalingChange:N,onFontFamilyChange:S,onHeadingFontFamilyChange:I}),[s,l,i,z,a,m,u,h,v,x,T,R,O,G,N,S,I])},c.createElement(ee,{"data-is-root-theme":r?"true":"false","data-accent-color":l,"data-gray-color":z,"data-has-background":oe?"true":"false","data-material":a,"data-radius":m,"data-scaling":u,"data-font-family":h,"data-heading-font-family":v,ref:ft,...H,className:(0,st.default)("radix-themes",{light:s==="light",dark:s==="dark"},H.className)}))});ve.displayName="ThemeImpl";var at={content:{type:"ReactNode",required:!0},width:W.width,minWidth:W.minWidth,maxWidth:{...W.maxWidth,default:"360px"}};var De=b.forwardRef((e,t)=>{let{children:o,className:n,open:r,defaultOpen:p,onOpenChange:s,delayDuration:l,disableHoverableContent:i,content:a,container:m,forceMount:u,...h}=D(e,at),v={open:r,defaultOpen:p,onOpenChange:s,delayDuration:l,disableHoverableContent:i};return b.createElement(M.Tooltip.Root,{...v},b.createElement(M.Tooltip.Trigger,{asChild:!0},o),b.createElement(M.Tooltip.Portal,{container:m,forceMount:u},b.createElement(he,{asChild:!0},b.createElement(M.Tooltip.Content,{sideOffset:4,collisionPadding:10,...h,asChild:!1,ref:t,className:(0,pt.default)("rt-TooltipContent",n)},b.createElement(ye,{as:"p",className:"rt-TooltipText",size:"1"},a),b.createElement(M.Tooltip.Arrow,{className:"rt-TooltipArrow"})))))});De.displayName="Tooltip";var Q=y(require("react"));function it(e){let t=Q.useId(),o=!!e,n=Q.useMemo(()=>o?{"aria-describedby":t}:{},[o,t]);return{tooltipId:t,hasTooltip:o,accessibilityProps:n}}var oo={loud:"solid",medium:"raised",quiet:"ghost"};function ro(e){if(e["aria-label"]||e["aria-labelledby"]||e.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
|
|
1
|
+
"use strict";var it=Object.create;var z=Object.defineProperty;var lt=Object.getOwnPropertyDescriptor;var mt=Object.getOwnPropertyNames;var ft=Object.getPrototypeOf,ut=Object.prototype.hasOwnProperty;var ct=(e,t)=>{for(var o in t)z(e,o,{get:t[o],enumerable:!0})},ve=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of mt(t))!ut.call(e,r)&&r!==o&&z(e,r,{get:()=>t[r],enumerable:!(n=lt(t,r))||n.enumerable});return e};var y=(e,t,o)=>(o=e!=null?it(ft(e)):{},ve(t||!e||!e.__esModule?z(o,"default",{value:e,enumerable:!0}):o,e)),dt=e=>ve(z({},"__esModule",{value:!0}),e);var Jt={};ct(Jt,{IconButton:()=>nt});module.exports=dt(Jt);var Y=y(require("react"));var c=y(require("react")),He=y(require("classnames")),Me=require("radix-ui");var w={asChild:{type:"boolean"}};var L=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],De=["auto","gray","mauve","slate","sage","olive","sand"],be={color:{type:"enum",values:L,default:void 0}},Re={color:{type:"enum",values:L,default:""}};var Q=["none","small","medium","large","full"],xe={radius:{type:"enum",values:Q,default:void 0}};var yt=["1","2","3","4"],Pt=["raised","solid","soft","surface","outline","ghost"],Z={...w,size:{type:"enum",className:"rt-r-size",values:yt,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:Pt,default:"solid"},...Re,...xe,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},flush:{type:"boolean",default:!1}};var q=y(require("react")),ke=y(require("classnames"));var we=y(require("classnames"));var gt=[],ht=new Set;function vt(e){let t=Object.assign({},...e),o=[],n=[],r=new Set;for(let a in t){let s=t[a],l=s.values??gt,i={key:a,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:l,valueSet:l.length>0?new Set(l):ht,enumValueSet:s.type==="enum"?new Set([s.default,...l]):void 0};s.className?(o.push(i),r.add(a)):(i.hasDefault||s.type==="enum")&&n.push(i)}return{styling:o,passthrough:n,stylingKeys:r}}var Dt={children:new WeakMap};function Ce(e){let t=Dt;for(let o=0;o<e.length;o++){let n=e[o],r=t.children.get(n);r===void 0&&(r={children:new WeakMap},t.children.set(n,r)),t=r}return t.compiled??(t.compiled=vt(e))}var bt=["initial","xs","sm","md","lg","xl"],ee=new Set(bt);function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Rt=new Set(["initial","xs","sm","md","lg","xl"]);function B(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(Rt.has(t))return!0;return!1}function $(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function Ne({className:e,customProperties:t,...o}){let n=oe({allowArbitraryValues:!0,className:e,...o}),r=xt({customProperties:t,...o});return[n,r]}function oe({allowArbitraryValues:e,value:t,className:o,propValues:n,propValueSet:r,parseValue:a=s=>s}){if(t){if(typeof t=="string")return $(n,r,t)?Te(o,t,a):e?o:void 0;if(B(t)){let s=t,l=[];for(let i in s){if(!te(s,i)||!ee.has(i))continue;let p=s[i];if(p!==void 0){if($(n,r,p)){let m=Te(o,p,a),f=i==="initial"?m:`${i}:${m}`;l.push(f)}else if(e){let m=i==="initial"?o:`${i}:${o}`;l.push(m)}}}return l.length>0?l.join(" "):""}if(e)return o}}function Te(e,t,o){let n=e?"-":"",r=o(t),a=r?.startsWith("-"),s=a?"-":"",l=a?r?.substring(1):r;return`${s}${e}${n}${l}`}function xt({customProperties:e,value:t,propValues:o,propValueSet:n,parseValue:r=a=>a}){if(!t||typeof t=="string"&&$(o,n,t))return;let a;if(typeof t=="string"){let s=r(t);a={};for(let l of e)a[l]=s;return a}if(B(t)){let s=t;for(let l in s){if(!te(s,l)||!ee.has(l))continue;let i=s[l];if(i===void 0||$(o,n,i))continue;let p=r(i);a??(a={});for(let m of e){let f=l==="initial"?m:`${m}-${l}`;a[f]=p}}}return a??{}}function re(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Ct(e,t){let o=e.initial,n=!1;return t.hasDefault&&o===void 0&&(o=t.default,n=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,n=!0),n?{...e,initial:o}:e}function D(e,...t){let{styling:o,passthrough:n,stylingKeys:r}=Ce(t),a={};for(let i in e)r.has(i)||(a[i]=e[i]);for(let i=0;i<n.length;i++){let p=n[i],m=a[p.key];if(m===void 0){p.hasDefault&&(a[p.key]=p.default);continue}p.enumValueSet!==void 0&&!p.enumValueSet.has(m)&&!B(m)&&(a[p.key]=p.default)}let s,l=[];for(let i=0;i<o.length;i++){let p=o[i],m=e[p.key];if(m===void 0&&p.hasDefault&&(m=p.default),p.enumValueSet!==void 0&&!p.enumValueSet.has(m)&&!B(m)&&(m=p.default),!!m){if(B(m)){if(!p.responsive)continue;m=Ct(m,p)}if(p.type==="enum"){let f=oe({allowArbitraryValues:!1,value:m,className:p.className,propValues:p.values,propValueSet:p.valueSet,parseValue:p.parseValue});f&&l.push(f);continue}if(p.type==="string"||p.type==="enum | string"){let[f,g]=Ne({className:p.className,customProperties:p.customProperties,propValues:p.type==="string"?[]:p.values,propValueSet:p.type==="string"?void 0:p.valueSet,parseValue:p.parseValue,value:m});g&&(s=re(s,g)),f&&l.push(f);continue}if(p.type==="boolean"){l.push(p.className);continue}}}return a.className=(0,we.default)(l.length>0?l.join(" "):void 0,e.className),a.style=re(s,e.style),a}var F=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Se={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:F,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:F,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:F,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:F,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:F,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:F,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:F,responsive:!0}};var Be={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var O={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var se=["visible","hidden","clip","scroll","auto"],Tt=["static","relative","absolute","fixed","sticky"],H=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],Nt=["0","1"],wt=["0","1"],St=["start","center","end","baseline","stretch"],Bt=["start","center","end","baseline","stretch"],Fe={...Se,...O,...Be,position:{type:"enum",className:"rt-r-position",values:Tt,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:H,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:H,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:H,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:H,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:H,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:se,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:se,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:se,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:Nt,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:wt,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"rt-r-as",values:St,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:Bt,responsive:!0}};var V=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],S={m:{type:"enum | string",values:V,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:V,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:V,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:V,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:V,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:V,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:V,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var K=require("radix-ui"),Bo=K.Slot.Root,Ve=K.Slot.Root,Fo=K.Slot.Slottable;var ne=["0","1","2","3","4","5","6","7","8","9","10","11","12"],je={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:ne,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:ne,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:ne,responsive:!0}};var Ft=["div","span"],Vt=["none","inline-flex","flex"],jt=["row","column","row-reverse","column-reverse"],Et=["start","center","end","baseline","stretch"],kt=["start","center","end","between"],Ot=["nowrap","wrap","wrap-reverse"],Ee={as:{type:"enum",values:Ft,default:"div"},...w,display:{type:"enum",className:"rt-r-display",values:Vt,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:jt,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:Et,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:kt,parseValue:Gt,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:Ot,responsive:!0},...je};function Gt(e){return e==="between"?"space-between":e}var G=q.forwardRef((e,t)=>{let{className:o,asChild:n,as:r="div",...a}=D(e,Ee,Fe,S);return q.createElement(n?Ve:r,{...a,ref:t,className:(0,ke.default)("rt-Flex",o)})});G.displayName="Flex";var P=y(require("react")),Ge=y(require("classnames"));var It=["1","2","3"],Oe={size:{type:"enum",className:"rt-r-size",values:It,default:"2",responsive:!0},loading:{type:"boolean",default:!0}};var pe=P.forwardRef((e,t)=>{let{className:o,children:n,loading:r,...a}=D(e,Oe,S);if(!r)return n;let s=P.createElement("span",{...a,ref:t,className:(0,Ge.default)("rt-Spinner",o)},P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}),P.createElement("span",{className:"rt-SpinnerLeaf"}));return n===void 0?s:P.createElement(G,{asChild:!0,position:"relative",align:"center",justify:"center"},P.createElement("span",null,P.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},n),P.createElement(G,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},P.createElement("span",null,s))))});pe.displayName="Spinner";var ae=require("radix-ui"),Ie=ae.VisuallyHidden.Root,_o=ae.VisuallyHidden.Root;function We(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([o,n])=>[o,t(n)]))}function Ae(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}var ie=c.forwardRef((e,t)=>{let{size:o=Z.size.default}=e,{className:n,children:r,asChild:a,as:s,color:l,radius:i,flush:p,disabled:m=e.loading,...f}=D(e,Z,S),g=a?Me.Slot.Root:s||"button",v=a||!s||["button","input","textarea","select"].includes(s),C=!a&&(!s||s==="button"),T="type"in f,R=c.useId(),N=e.loading?`${R}-loading`:void 0,x=c.useMemo(()=>typeof r=="string"?r:c.isValidElement(r)&&typeof r.props?.children=="string"?r.props.children:"button",[r]),W=c.useMemo(()=>e.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":N,"aria-label":`${x} (loading)`}:{},[e.loading,N,x]);return c.createElement(g,{"data-disabled":m||void 0,"data-accent-color":l,"data-radius":i,"data-flush":p?"true":void 0,...f,...W,ref:t,className:(0,He.default)("rt-reset","rt-BaseButton",n),...v&&{disabled:m},...C&&!T?{type:"button"}:{}},e.loading?c.createElement(c.Fragment,null,c.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},r),c.createElement(Ie,null,c.createElement("span",{id:N},x," is loading, please wait..."),r),c.createElement(G,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},c.createElement("span",null,c.createElement(pe,{size:We(o,Ae),"aria-hidden":"true"})))):r)});ie.displayName="BaseButton";var M=y(require("react")),st=y(require("classnames"));var b=y(require("react")),ot=y(require("classnames")),I=require("radix-ui");var j=y(require("react")),Xe=require("radix-ui");var Wt=["loud","medium","quiet"],ze={emphasis:{type:"enum",className:"rt-emphasis",values:Wt,default:void 0}};var At=["normal","start","end","both"],Le={trim:{type:"enum",className:"rt-r-lt",values:At,responsive:!0}};var Ht=["left","center","right"],$e={align:{type:"enum",className:"rt-r-ta",values:Ht,responsive:!0}};var Mt=["wrap","nowrap","pretty","balance"],Ke={wrap:{type:"enum",className:"rt-r-tw",values:Mt,responsive:!0}};var qe={truncate:{type:"boolean",className:"rt-truncate"}};var zt=["sans","mono","serif"],Ue={font:{type:"enum",className:"rt-r-ff",values:zt}};var Lt=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],_e={weight:{type:"enum",className:"rt-r-weight",values:Lt,responsive:!0}};var $t=["span","div","label","p"],Kt=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ye={as:{type:"enum",values:$t,default:"span"},...w,size:{type:"enum",className:"rt-r-size",values:Kt,responsive:!0},...Ue,..._e,...$e,...Le,...qe,...Ke,...be,...ze};var qt={...Ye,...S},le=j.memo(j.forwardRef((e,t)=>{let{children:o,className:n,asChild:r,as:a="span",color:s,...l}=D(e,qt),i=n?`rt-Text ${n}`:"rt-Text";return r?j.createElement(Xe.Slot.Root,{"data-accent-color":s,...l,ref:t,className:i},o):j.createElement(a,{"data-accent-color":s,...l,ref:t,className:i},o)}));le.displayName="Text";var u=y(require("react")),Ze=y(require("classnames")),k=require("radix-ui"),U=require("radix-ui/internal");function Je(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var me=y(require("react"));function E(e){let[t,o]=me.useState(e),[n,r]=me.useState(e);return Object.is(e,n)||(r(e),o(e)),[t,o]}var Ut=["inherit","light","dark"],Qe=["sans","mono","serif"],d={...w,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:Ut,default:"inherit"},accentColor:{type:"enum",values:L,default:"gray"},grayColor:{type:"enum",values:De,default:"gray"},radius:{type:"enum",values:Q,default:"full"},fontFamily:{type:"enum",values:Qe,default:"sans"},headingFontFamily:{type:"enum",values:Qe}};var h=()=>{},Or={appearance:d.appearance.default,accentColor:d.accentColor.default,grayColor:d.grayColor.default,resolvedGrayColor:d.grayColor.default,radius:d.radius.default,fontFamily:d.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:h,onAccentColorChange:h,onGrayColorChange:h,onRadiusChange:h,onFontFamilyChange:h,onHeadingFontFamilyChange:h},fe=u.createContext(void 0);var ue=u.forwardRef((e,t)=>{let o=u.useContext(fe),n=k.Direction.useDirection();return o===void 0?u.createElement(k.Tooltip.Provider,{delayDuration:200},u.createElement(k.Direction.Provider,{dir:n},u.createElement(et,{...e,ref:t}))):u.createElement(ce,{...e,ref:t})});ue.displayName="Theme";var et=u.forwardRef((e,t)=>{let{appearance:o=d.appearance.default,accentColor:n=d.accentColor.default,grayColor:r=d.grayColor.default,radius:a=d.radius.default,fontFamily:s=d.fontFamily.default,headingFontFamily:l,hasBackground:i=d.hasBackground.default,...p}=e,[m,f]=E(o),[g,v]=E(n),[C,T]=E(r),[R,N]=E(a),[x,W]=E(s),[A,X]=E(l);return u.createElement(ce,{...p,ref:t,isRoot:!0,hasBackground:i,appearance:m,accentColor:g,grayColor:C,radius:R,fontFamily:x,headingFontFamily:A,onAppearanceChange:f,onAccentColorChange:v,onGrayColorChange:T,onRadiusChange:N,onFontFamilyChange:W,onHeadingFontFamilyChange:X})});et.displayName="ThemeRoot";function _t(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var ce=u.forwardRef((e,t)=>{let o=u.useContext(fe),{asChild:n,isRoot:r,hasBackground:a,appearance:s=e.appearance??o?.appearance??d.appearance.default,accentColor:l=e.accentColor??o?.accentColor??d.accentColor.default,grayColor:i=e.grayColor??o?.resolvedGrayColor??d.grayColor.default,radius:p=e.radius??o?.radius??d.radius.default,fontFamily:m=e.fontFamily??o?.fontFamily??d.fontFamily.default,headingFontFamily:f=e.headingFontFamily??o?.headingFontFamily,onAppearanceChange:g=h,onAccentColorChange:v=h,onGrayColorChange:C=h,onRadiusChange:T=h,onFontFamilyChange:R=h,onHeadingFontFamilyChange:N=h,...x}=e,W=n?k.Slot.Root:"div",A=i==="auto"?Je(l):i,X=e.appearance==="light"||e.appearance==="dark",pt=a===void 0?r||X:a,Pe=u.useRef(null),at=(0,U.useComposedRefs)(t,Pe),ge="data-os"in x;return(0,U.useLayoutEffect)(()=>{if(!r||ge)return;let J=Pe.current;if(!J)return;let he=_t();if(he)return J.setAttribute("data-os",he),()=>J.removeAttribute("data-os")},[r,ge]),u.createElement(fe.Provider,{value:u.useMemo(()=>({appearance:s,accentColor:l,grayColor:i,resolvedGrayColor:A,radius:p,fontFamily:m,headingFontFamily:f,onAppearanceChange:g,onAccentColorChange:v,onGrayColorChange:C,onRadiusChange:T,onFontFamilyChange:R,onHeadingFontFamilyChange:N}),[s,l,i,A,p,m,f,g,v,C,T,R,N])},u.createElement(W,{"data-is-root-theme":r?"true":"false","data-accent-color":l,"data-gray-color":A,"data-has-background":pt?"true":"false","data-radius":p,"data-font-family":m,"data-heading-font-family":f,ref:at,...x,className:(0,Ze.default)("radix-themes",{light:s==="light",dark:s==="dark"},x.className)}))});ce.displayName="ThemeImpl";var tt={content:{type:"ReactNode",required:!0},width:O.width,minWidth:O.minWidth,maxWidth:{...O.maxWidth,default:"360px"}};var de=b.forwardRef((e,t)=>{let{children:o,className:n,open:r,defaultOpen:a,onOpenChange:s,delayDuration:l,disableHoverableContent:i,content:p,container:m,forceMount:f,...g}=D(e,tt),v={open:r,defaultOpen:a,onOpenChange:s,delayDuration:l,disableHoverableContent:i};return b.createElement(I.Tooltip.Root,{...v},b.createElement(I.Tooltip.Trigger,{asChild:!0},o),b.createElement(I.Tooltip.Portal,{container:m,forceMount:f},b.createElement(ue,{asChild:!0},b.createElement(I.Tooltip.Content,{sideOffset:4,collisionPadding:10,...g,asChild:!1,ref:t,className:(0,ot.default)("rt-TooltipContent",n)},b.createElement(le,{as:"p",className:"rt-TooltipText",size:"1"},p),b.createElement(I.Tooltip.Arrow,{className:"rt-TooltipArrow"})))))});de.displayName="Tooltip";var _=y(require("react"));function rt(e){let t=_.useId(),o=!!e,n=_.useMemo(()=>o?{"aria-describedby":t}:{},[o,t]);return{tooltipId:t,hasTooltip:o,accessibilityProps:n}}var Yt={loud:"solid",medium:"raised",quiet:"ghost"};function Xt(e){if(e["aria-label"]||e["aria-labelledby"]||e.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
|
|
2
2
|
- aria-label prop with descriptive text
|
|
3
3
|
- aria-labelledby prop referencing a label element
|
|
4
|
-
- or visible text children`)}var
|
|
4
|
+
- or visible text children`)}var ye=M.forwardRef(({className:e,style:t,tooltip:o,tooltipSide:n="top",tooltipAlign:r="center",tooltipDelayDuration:a,tooltipDisableHoverableContent:s,iconOnly:l=!1,emphasis:i,variant:p,...m},f)=>{let{tooltipId:g,hasTooltip:v,accessibilityProps:C}=rt(o);if(l&&(Xt(m),m.fullWidth=!1),i!==void 0&&p!==void 0)throw new Error("Button: pass `emphasis` or `variant`, not both. They set the same thing.");let T=i!==void 0?Yt[i]:p,R=M.createElement(ie,{...m,variant:T,...C,ref:f,className:(0,st.default)(l?"rt-IconButton":"rt-Button",e),style:t});return v?M.createElement(de,{content:o,side:n,align:r,delayDuration:a,disableHoverableContent:s,id:g},R):R});ye.displayName="Button";var nt=Y.forwardRef((e,t)=>Y.createElement(ye,{...e,iconOnly:!0,ref:t}));nt.displayName="IconButton";
|
|
5
5
|
//# sourceMappingURL=icon-button.js.map
|