@womp/kookie-ui 0.17.0 → 0.19.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/components.css +2086 -4086
- 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 +4 -4
- package/dist/cjs/components/_internal/base-checkbox.props.d.ts +1 -1
- package/dist/cjs/components/_internal/base-checkbox.props.js +1 -1
- package/dist/cjs/components/_internal/base-checkbox.props.js.map +2 -2
- package/dist/cjs/components/_internal/base-menu.utils.js +1 -1
- package/dist/cjs/components/_internal/base-menu.utils.js.map +2 -2
- package/dist/cjs/components/_internal/base-radio.props.d.ts +1 -1
- package/dist/cjs/components/_internal/base-radio.props.js +1 -1
- package/dist/cjs/components/_internal/base-radio.props.js.map +2 -2
- 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 +4 -4
- 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 +4 -4
- package/dist/cjs/components/alert-dialog.props.d.ts +1 -2
- 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 +2 -2
- package/dist/cjs/components/avatar.js +1 -1
- package/dist/cjs/components/avatar.js.map +2 -2
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +4 -4
- package/dist/cjs/components/badge.props.d.ts +1 -1
- package/dist/cjs/components/badge.props.js +1 -1
- package/dist/cjs/components/badge.props.js.map +1 -1
- package/dist/cjs/components/blockquote.js +1 -1
- package/dist/cjs/components/blockquote.js.map +2 -2
- package/dist/cjs/components/box.js +1 -1
- package/dist/cjs/components/box.js.map +2 -2
- package/dist/cjs/components/button.js +2 -2
- package/dist/cjs/components/button.js.map +4 -4
- 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 +4 -4
- package/dist/cjs/components/card.props.d.ts +3 -10
- 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 +2 -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 +4 -4
- 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 +2 -1
- 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 +2 -2
- package/dist/cjs/components/checkbox-group.d.ts.map +1 -1
- package/dist/cjs/components/checkbox-group.js +1 -1
- package/dist/cjs/components/checkbox-group.js.map +4 -4
- package/dist/cjs/components/checkbox-group.props.d.ts +1 -1
- package/dist/cjs/components/checkbox-group.props.js +1 -1
- package/dist/cjs/components/checkbox-group.props.js.map +2 -2
- package/dist/cjs/components/checkbox.d.ts.map +1 -1
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +4 -4
- package/dist/cjs/components/checkbox.props.js +1 -1
- package/dist/cjs/components/checkbox.props.js.map +2 -2
- package/dist/cjs/components/code.js +1 -1
- package/dist/cjs/components/code.js.map +2 -2
- package/dist/cjs/components/combobox.d.ts.map +1 -1
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +4 -4
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +2 -2
- 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/data-list.d.ts.map +1 -1
- package/dist/cjs/components/data-list.js +1 -1
- package/dist/cjs/components/data-list.js.map +4 -4
- 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 +4 -4
- package/dist/cjs/components/dialog.props.d.ts +1 -2
- 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 +2 -2
- 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/flex.js +1 -1
- package/dist/cjs/components/flex.js.map +2 -2
- package/dist/cjs/components/grid.js +1 -1
- package/dist/cjs/components/grid.js.map +2 -2
- package/dist/cjs/components/heading.js +1 -1
- package/dist/cjs/components/heading.js.map +2 -2
- package/dist/cjs/components/hover-card.d.ts.map +1 -1
- package/dist/cjs/components/hover-card.js +1 -1
- package/dist/cjs/components/hover-card.js.map +4 -4
- package/dist/cjs/components/hover-card.props.d.ts +1 -1
- package/dist/cjs/components/hover-card.props.js +1 -1
- package/dist/cjs/components/hover-card.props.js.map +2 -2
- package/dist/cjs/components/icon-button.js +2 -2
- package/dist/cjs/components/icon-button.js.map +4 -4
- package/dist/cjs/components/image.js +1 -1
- package/dist/cjs/components/image.js.map +2 -2
- package/dist/cjs/components/index.d.ts +0 -1
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/kbd.js +1 -1
- package/dist/cjs/components/kbd.js.map +2 -2
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/components/link.js.map +2 -2
- package/dist/cjs/components/message-scroller.js +2 -2
- package/dist/cjs/components/message-scroller.js.map +4 -4
- package/dist/cjs/components/navbar.d.ts.map +1 -1
- package/dist/cjs/components/navbar.js +1 -1
- package/dist/cjs/components/navbar.js.map +4 -4
- package/dist/cjs/components/notice.d.ts +2 -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 +4 -4
- 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 +4 -4
- package/dist/cjs/components/progress.js +1 -1
- package/dist/cjs/components/progress.js.map +3 -3
- package/dist/cjs/components/progress.props.d.ts +0 -7
- package/dist/cjs/components/progress.props.d.ts.map +1 -1
- package/dist/cjs/components/progress.props.js +1 -1
- package/dist/cjs/components/progress.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 +2 -1
- 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 +2 -2
- package/dist/cjs/components/radio-group.d.ts.map +1 -1
- package/dist/cjs/components/radio-group.js +1 -1
- package/dist/cjs/components/radio-group.js.map +4 -4
- package/dist/cjs/components/radio-group.props.d.ts +1 -1
- package/dist/cjs/components/radio-group.props.js +1 -1
- package/dist/cjs/components/radio-group.props.js.map +2 -2
- package/dist/cjs/components/radio.d.ts.map +1 -1
- package/dist/cjs/components/radio.js +1 -1
- package/dist/cjs/components/radio.js.map +4 -4
- package/dist/cjs/components/radio.props.js +1 -1
- package/dist/cjs/components/radio.props.js.map +2 -2
- package/dist/cjs/components/scroll-area.d.ts.map +1 -1
- package/dist/cjs/components/scroll-area.js +1 -1
- package/dist/cjs/components/scroll-area.js.map +3 -3
- package/dist/cjs/components/scroll-area.props.d.ts +0 -7
- package/dist/cjs/components/scroll-area.props.d.ts.map +1 -1
- package/dist/cjs/components/scroll-area.props.js +1 -1
- package/dist/cjs/components/scroll-area.props.js.map +3 -3
- package/dist/cjs/components/section.js +1 -1
- package/dist/cjs/components/section.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 +4 -4
- 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 +4 -4
- package/dist/cjs/components/separator.js +1 -1
- package/dist/cjs/components/separator.js.map +3 -3
- package/dist/cjs/components/separator.props.d.ts +0 -7
- package/dist/cjs/components/separator.props.d.ts.map +1 -1
- package/dist/cjs/components/separator.props.js +1 -1
- package/dist/cjs/components/separator.props.js.map +3 -3
- package/dist/cjs/components/sheet.d.ts +2 -2
- 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 +4 -4
- package/dist/cjs/components/shell.d.ts +1 -1
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/skeleton.js +1 -1
- package/dist/cjs/components/skeleton.js.map +2 -2
- package/dist/cjs/components/slider.d.ts.map +1 -1
- package/dist/cjs/components/slider.js +1 -1
- package/dist/cjs/components/slider.js.map +4 -4
- package/dist/cjs/components/spinner.js +1 -1
- package/dist/cjs/components/spinner.js.map +3 -3
- package/dist/cjs/components/spinner.props.d.ts +0 -7
- package/dist/cjs/components/spinner.props.d.ts.map +1 -1
- package/dist/cjs/components/spinner.props.js +1 -1
- package/dist/cjs/components/spinner.props.js.map +3 -3
- package/dist/cjs/components/switch.d.ts.map +1 -1
- package/dist/cjs/components/switch.js +1 -1
- package/dist/cjs/components/switch.js.map +4 -4
- 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 +4 -4
- package/dist/cjs/components/table.d.ts.map +1 -1
- package/dist/cjs/components/table.js +1 -1
- package/dist/cjs/components/table.js.map +4 -4
- package/dist/cjs/components/table.props.d.ts +1 -1
- package/dist/cjs/components/table.props.js +1 -1
- package/dist/cjs/components/table.props.js.map +2 -2
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- package/dist/cjs/components/text.js +1 -1
- package/dist/cjs/components/text.js.map +2 -2
- 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 +3 -0
- 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 +4 -4
- package/dist/cjs/components/theme.props.d.ts +12 -0
- 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 +4 -4
- package/dist/cjs/components/toggle-icon-button.js +3 -3
- package/dist/cjs/components/toggle-icon-button.js.map +4 -4
- 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/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +4 -4
- package/dist/cjs/helpers/extract-margin-props.d.ts +7 -7
- package/dist/cjs/helpers/get-margin-styles.js +1 -1
- package/dist/cjs/helpers/get-margin-styles.js.map +2 -2
- package/dist/cjs/helpers/index.d.ts +1 -0
- package/dist/cjs/helpers/index.d.ts.map +1 -1
- package/dist/cjs/helpers/index.js +3 -3
- package/dist/cjs/helpers/index.js.map +4 -4
- package/dist/cjs/helpers/map-prop-values.d.ts +1 -4
- package/dist/cjs/helpers/map-prop-values.d.ts.map +1 -1
- package/dist/cjs/helpers/map-prop-values.js +1 -1
- package/dist/cjs/helpers/map-prop-values.js.map +3 -3
- package/dist/cjs/helpers/theme-size.d.ts +41 -0
- package/dist/cjs/helpers/theme-size.d.ts.map +1 -0
- package/dist/cjs/helpers/theme-size.js +2 -0
- package/dist/cjs/helpers/theme-size.js.map +7 -0
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/index.d.ts +0 -1
- package/dist/cjs/props/index.d.ts.map +1 -1
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +4 -4
- package/dist/cjs/props/margin.props.d.ts +7 -7
- package/dist/cjs/props/margin.props.js +1 -1
- package/dist/cjs/props/margin.props.js.map +2 -2
- package/dist/esm/chunk-2FPJ6Q2N.js +2 -0
- package/dist/esm/chunk-2FPJ6Q2N.js.map +7 -0
- package/dist/esm/{chunk-6WFEMPCF.js → chunk-2XQECQF2.js} +2 -2
- package/dist/esm/{chunk-4STOJSJZ.js → chunk-32ATKZAP.js} +2 -2
- package/dist/esm/{chunk-4STOJSJZ.js.map → chunk-32ATKZAP.js.map} +2 -2
- package/dist/esm/chunk-3YLYGKFB.js +2 -0
- package/dist/esm/chunk-3YLYGKFB.js.map +7 -0
- package/dist/esm/chunk-42LDZ7L5.js +2 -0
- package/dist/esm/chunk-42LDZ7L5.js.map +7 -0
- package/dist/esm/{chunk-AMP7O3DM.js → chunk-43A5GUSI.js} +2 -2
- package/dist/esm/{chunk-MDHXSEGH.js → chunk-4ITIXBIP.js} +2 -2
- package/dist/esm/{chunk-MDHXSEGH.js.map → chunk-4ITIXBIP.js.map} +2 -2
- package/dist/esm/chunk-4YQXYWDQ.js +2 -0
- package/dist/esm/chunk-4YQXYWDQ.js.map +7 -0
- package/dist/esm/chunk-54KMG7NX.js +2 -0
- package/dist/esm/chunk-54KMG7NX.js.map +7 -0
- package/dist/esm/{chunk-COSHAOEK.js → chunk-63ASTOS2.js} +2 -2
- package/dist/esm/chunk-6AZV4VFW.js +2 -0
- package/dist/esm/chunk-6AZV4VFW.js.map +7 -0
- package/dist/esm/{chunk-UBSLEGQZ.js → chunk-6FLLFCBU.js} +2 -2
- package/dist/esm/{chunk-SM27AC7E.js → chunk-6RZVKCNG.js} +2 -2
- package/dist/esm/{chunk-RFURPE7W.js → chunk-6XNQ5XD3.js} +2 -2
- package/dist/esm/{chunk-JLI7WHV6.js → chunk-7FC7HF76.js} +2 -2
- package/dist/esm/chunk-7KIKAEI7.js +2 -0
- package/dist/esm/chunk-7KIKAEI7.js.map +7 -0
- package/dist/esm/chunk-7SS6EIE5.js +5 -0
- package/dist/esm/chunk-7SS6EIE5.js.map +7 -0
- package/dist/esm/chunk-7UV4FYYL.js +2 -0
- package/dist/esm/chunk-7UV4FYYL.js.map +7 -0
- package/dist/esm/chunk-ABS275QZ.js +2 -0
- package/dist/esm/{chunk-TPHNDGSV.js → chunk-AI6UQ5VD.js} +2 -2
- package/dist/esm/chunk-BINUV3ME.js +2 -0
- package/dist/esm/chunk-BINUV3ME.js.map +7 -0
- package/dist/esm/chunk-BQS6XXJR.js +2 -0
- package/dist/esm/chunk-BQS6XXJR.js.map +7 -0
- package/dist/esm/{chunk-O6K6RZXY.js → chunk-BUBV3C6C.js} +2 -2
- package/dist/esm/{chunk-AO32NT75.js → chunk-CLEH57SW.js} +2 -2
- package/dist/esm/chunk-CR2BSCFM.js +2 -0
- package/dist/esm/chunk-CR2BSCFM.js.map +7 -0
- package/dist/esm/chunk-D2ZHYCTG.js +2 -0
- package/dist/esm/chunk-D2ZHYCTG.js.map +7 -0
- package/dist/esm/{chunk-XHKL4PG7.js → chunk-DIR22XIX.js} +2 -2
- package/dist/esm/{chunk-TGRRQHLQ.js → chunk-DMWLY6ZP.js} +2 -2
- package/dist/esm/chunk-E453PYTG.js +2 -0
- package/dist/esm/chunk-E453PYTG.js.map +7 -0
- package/dist/esm/chunk-E4KCVRBQ.js +2 -0
- package/dist/esm/chunk-E4KCVRBQ.js.map +7 -0
- package/dist/esm/chunk-F2UUKVBM.js +1 -0
- package/dist/esm/chunk-FNRKTMNN.js +2 -0
- package/dist/esm/chunk-FNRKTMNN.js.map +7 -0
- package/dist/esm/{chunk-WKMJIWFP.js → chunk-FTGD2SZ6.js} +2 -2
- package/dist/esm/{chunk-RSJSVJ6A.js → chunk-G3U6OHVA.js} +2 -2
- package/dist/esm/chunk-G6PO4QKW.js +2 -0
- package/dist/esm/chunk-G6PO4QKW.js.map +7 -0
- package/dist/esm/{chunk-CRYT55SY.js → chunk-GIIMBBVM.js} +2 -2
- package/dist/esm/{chunk-DSB3TEAQ.js → chunk-GLERJXVS.js} +2 -2
- package/dist/esm/chunk-GPVPXAUC.js +2 -0
- package/dist/esm/chunk-GPVPXAUC.js.map +7 -0
- package/dist/esm/chunk-GYB7PAGB.js +2 -0
- package/dist/esm/chunk-GYB7PAGB.js.map +7 -0
- package/dist/esm/{chunk-MZQDDG5K.js → chunk-GYNRAVCL.js} +2 -2
- package/dist/esm/chunk-HIEGLLY7.js +2 -0
- package/dist/esm/chunk-HIEGLLY7.js.map +7 -0
- package/dist/esm/chunk-HT5EFJA3.js +2 -0
- package/dist/esm/chunk-HT5EFJA3.js.map +7 -0
- package/dist/esm/chunk-HZYE46V2.js +2 -0
- package/dist/esm/chunk-HZYE46V2.js.map +7 -0
- package/dist/esm/{chunk-BFLO4IVZ.js → chunk-IXNJFV4O.js} +2 -2
- package/dist/esm/chunk-JBC6DT2X.js +2 -0
- package/dist/esm/chunk-JBC6DT2X.js.map +7 -0
- package/dist/esm/chunk-JRIBL4WJ.js +2 -0
- package/dist/esm/chunk-JRIBL4WJ.js.map +7 -0
- package/dist/esm/{chunk-PBFSBHBS.js → chunk-JUY7CBSL.js} +2 -2
- package/dist/esm/{chunk-V2TPYSZ2.js → chunk-JZSXHYUU.js} +2 -2
- package/dist/esm/{chunk-GVLTTTFL.js → chunk-K6Y2SM5N.js} +2 -2
- package/dist/esm/{chunk-CL6LRPCS.js → chunk-KDKL3HXD.js} +2 -2
- package/dist/esm/{chunk-XHF6RBOE.js → chunk-KRPEEM4C.js} +2 -2
- package/dist/esm/{chunk-5SQL4ZRC.js → chunk-KSZOVI57.js} +2 -2
- package/dist/esm/{chunk-5SQL4ZRC.js.map → chunk-KSZOVI57.js.map} +1 -1
- package/dist/esm/{chunk-DP3OWU5T.js → chunk-L2IIIELE.js} +2 -2
- package/dist/esm/chunk-LFUPGIPA.js +2 -0
- package/dist/esm/chunk-LFUPGIPA.js.map +7 -0
- package/dist/esm/chunk-MLXHD7YF.js +2 -0
- package/dist/esm/chunk-MLXHD7YF.js.map +7 -0
- package/dist/esm/chunk-MZR6YBE7.js +2 -0
- package/dist/esm/chunk-MZR6YBE7.js.map +7 -0
- package/dist/esm/{chunk-K5SC3CZZ.js → chunk-N5OSP3PU.js} +2 -2
- package/dist/esm/{chunk-IF4PYIUV.js → chunk-N77QJUTO.js} +2 -2
- package/dist/esm/{chunk-XZ5XZS5O.js → chunk-NETIWKIR.js} +2 -2
- package/dist/esm/{chunk-2IPVLV6B.js → chunk-OMYAVTX6.js} +2 -2
- package/dist/esm/{chunk-7CBZFHSQ.js → chunk-OXYHRNJA.js} +2 -2
- package/dist/esm/{chunk-L6M2MI7Y.js → chunk-PIMNQEDG.js} +2 -2
- package/dist/esm/chunk-PUQXBW2K.js +2 -0
- package/dist/esm/chunk-PUQXBW2K.js.map +7 -0
- package/dist/esm/chunk-PUVZFRTQ.js +2 -0
- package/dist/esm/chunk-PUVZFRTQ.js.map +7 -0
- package/dist/esm/chunk-Q5LPCJXN.js +2 -0
- package/dist/esm/chunk-Q5LPCJXN.js.map +7 -0
- package/dist/esm/chunk-QWLKMVZY.js +2 -0
- package/dist/esm/chunk-RUWKVDFT.js +2 -0
- package/dist/esm/chunk-RUWKVDFT.js.map +7 -0
- package/dist/esm/chunk-RVM4LGAU.js +2 -0
- package/dist/esm/chunk-RVM4LGAU.js.map +7 -0
- package/dist/esm/chunk-STMTXK7U.js +2 -0
- package/dist/esm/chunk-STMTXK7U.js.map +7 -0
- package/dist/esm/chunk-TLWCU336.js +2 -0
- package/dist/esm/chunk-TLWCU336.js.map +7 -0
- package/dist/esm/chunk-TQIR5LLY.js +2 -0
- package/dist/esm/chunk-TQIR5LLY.js.map +7 -0
- package/dist/esm/chunk-UFJJTUOU.js +2 -0
- package/dist/esm/chunk-UFJJTUOU.js.map +7 -0
- package/dist/esm/chunk-UONSKZQT.js +2 -0
- package/dist/esm/chunk-UONSKZQT.js.map +7 -0
- package/dist/esm/chunk-UUHTK35B.js +2 -0
- package/dist/esm/chunk-UUHTK35B.js.map +7 -0
- package/dist/esm/{chunk-YZABQ4LS.js → chunk-UUV5UNYL.js} +2 -2
- package/dist/esm/chunk-UUWGAQDT.js +2 -0
- package/dist/esm/chunk-UUWGAQDT.js.map +7 -0
- package/dist/esm/chunk-UZQO4APP.js +2 -0
- package/dist/esm/chunk-UZQO4APP.js.map +7 -0
- package/dist/esm/chunk-VLLJ7A6P.js +2 -0
- package/dist/esm/chunk-VLLJ7A6P.js.map +7 -0
- package/dist/esm/{chunk-S53ZQNHK.js → chunk-VLQ2LX5M.js} +2 -2
- package/dist/esm/chunk-VTTJFBV6.js +2 -0
- package/dist/esm/chunk-VTTJFBV6.js.map +7 -0
- package/dist/esm/{chunk-ORMCQAPS.js → chunk-WDDO73O5.js} +2 -2
- package/dist/esm/chunk-X3D3JR64.js +2 -0
- package/dist/esm/chunk-X3D3JR64.js.map +7 -0
- package/dist/esm/{chunk-3OABA7AF.js → chunk-X7HFFVFD.js} +2 -2
- package/dist/esm/chunk-XASK6LMX.js +2 -0
- package/dist/esm/chunk-XASK6LMX.js.map +7 -0
- package/dist/esm/{chunk-6HRBG5H2.js → chunk-XTE22CXV.js} +2 -2
- package/dist/esm/chunk-YS5BZRRK.js +2 -0
- package/dist/esm/chunk-YS5BZRRK.js.map +7 -0
- package/dist/esm/chunk-YVHRWMSZ.js +2 -0
- package/dist/esm/chunk-YVHRWMSZ.js.map +7 -0
- package/dist/esm/chunk-YYZBPQQ4.js +2 -0
- package/dist/esm/chunk-YYZBPQQ4.js.map +7 -0
- package/dist/esm/chunk-Z6NRR7KS.js +2 -0
- package/dist/esm/chunk-Z6NRR7KS.js.map +7 -0
- package/dist/esm/chunk-ZCAI2PRH.js +2 -0
- package/dist/esm/chunk-ZCAI2PRH.js.map +7 -0
- package/dist/esm/chunk-ZIKJ2WZN.js +2 -0
- package/dist/esm/chunk-ZIKJ2WZN.js.map +7 -0
- package/dist/esm/{chunk-35KS5AQE.js → chunk-ZMOBKT4T.js} +2 -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-checkbox.props.d.ts +1 -1
- package/dist/esm/components/_internal/base-checkbox.props.js +1 -1
- package/dist/esm/components/_internal/base-menu.utils.js +1 -1
- package/dist/esm/components/_internal/base-radio.props.d.ts +1 -1
- package/dist/esm/components/_internal/base-radio.props.js +1 -1
- package/dist/esm/components/_internal/menu-context.js +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/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 +1 -2
- 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/avatar.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/badge.props.d.ts +1 -1
- package/dist/esm/components/badge.props.js +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/box.js +1 -1
- package/dist/esm/components/button.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 +3 -10
- 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.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 +2 -1
- 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/checkbox-group.d.ts.map +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox-group.props.d.ts +1 -1
- package/dist/esm/components/checkbox-group.props.js +1 -1
- package/dist/esm/components/checkbox.d.ts.map +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/checkbox.props.js +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/container.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/data-list.d.ts.map +1 -1
- package/dist/esm/components/data-list.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 +1 -2
- 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/em.js +1 -1
- package/dist/esm/components/flex.js +1 -1
- package/dist/esm/components/grid.js +1 -1
- package/dist/esm/components/heading.js +1 -1
- package/dist/esm/components/hover-card.d.ts.map +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/hover-card.props.d.ts +1 -1
- package/dist/esm/components/hover-card.props.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/image.js +1 -1
- package/dist/esm/components/index.d.ts +0 -1
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/kbd.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/navbar.d.ts.map +1 -1
- package/dist/esm/components/navbar.js +1 -1
- package/dist/esm/components/notice.d.ts +2 -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/progress.js +1 -1
- package/dist/esm/components/progress.props.d.ts +0 -7
- package/dist/esm/components/progress.props.d.ts.map +1 -1
- package/dist/esm/components/progress.props.js +1 -1
- package/dist/esm/components/quote.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 +2 -1
- 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/radio-group.d.ts.map +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio-group.props.d.ts +1 -1
- package/dist/esm/components/radio-group.props.js +1 -1
- package/dist/esm/components/radio.d.ts.map +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/radio.props.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/scroll-area.d.ts.map +1 -1
- package/dist/esm/components/scroll-area.js +1 -1
- package/dist/esm/components/scroll-area.props.d.ts +0 -7
- package/dist/esm/components/scroll-area.props.d.ts.map +1 -1
- package/dist/esm/components/scroll-area.props.js +1 -1
- package/dist/esm/components/section.js +1 -1
- package/dist/esm/components/segmented-control.d.ts.map +1 -1
- package/dist/esm/components/segmented-control.js +1 -1
- package/dist/esm/components/select.d.ts.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/separator.props.d.ts +0 -7
- package/dist/esm/components/separator.props.d.ts.map +1 -1
- package/dist/esm/components/separator.props.js +1 -1
- package/dist/esm/components/sheet.d.ts +2 -2
- package/dist/esm/components/sheet.d.ts.map +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.d.ts +1 -1
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/skeleton.js +1 -1
- package/dist/esm/components/slider.d.ts.map +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/spinner.js +1 -1
- package/dist/esm/components/spinner.props.d.ts +0 -7
- package/dist/esm/components/spinner.props.d.ts.map +1 -1
- package/dist/esm/components/spinner.props.js +1 -1
- package/dist/esm/components/strong.js +1 -1
- package/dist/esm/components/switch.d.ts.map +1 -1
- package/dist/esm/components/switch.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/table.d.ts.map +1 -1
- package/dist/esm/components/table.js +1 -1
- package/dist/esm/components/table.props.d.ts +1 -1
- package/dist/esm/components/table.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/text-area.d.ts.map +1 -1
- package/dist/esm/components/text-area.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.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/theme.d.ts +3 -0
- 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 +12 -0
- 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.map +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/virtual-menu.js +1 -1
- package/dist/esm/helpers/extract-margin-props.d.ts +7 -7
- package/dist/esm/helpers/extract-props.js +1 -1
- package/dist/esm/helpers/get-margin-styles.js +1 -1
- package/dist/esm/helpers/get-responsive-styles.js +1 -1
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.d.ts.map +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/helpers/map-prop-values.d.ts +1 -4
- package/dist/esm/helpers/map-prop-values.d.ts.map +1 -1
- package/dist/esm/helpers/map-prop-values.js +1 -1
- package/dist/esm/helpers/theme-size.d.ts +41 -0
- package/dist/esm/helpers/theme-size.d.ts.map +1 -0
- package/dist/esm/helpers/theme-size.js +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.d.ts +0 -1
- package/dist/esm/props/index.d.ts.map +1 -1
- package/dist/esm/props/index.js +1 -1
- package/dist/esm/props/margin.props.d.ts +7 -7
- package/dist/esm/props/margin.props.js +1 -1
- package/layout/tokens.css +14 -0
- package/layout/utilities.css +240 -198
- package/layout.css +254 -198
- package/package.json +1 -1
- package/src/components/_internal/base-button.css +114 -78
- package/src/components/_internal/base-button.tsx +48 -9
- package/src/components/_internal/base-card.css +21 -73
- package/src/components/_internal/base-checkbox.css +91 -8
- package/src/components/_internal/base-checkbox.props.ts +1 -1
- package/src/components/_internal/base-dialog.css +18 -12
- package/src/components/_internal/base-menu.css +3 -3
- package/src/components/_internal/base-radio.css +68 -6
- package/src/components/_internal/base-radio.props.ts +1 -1
- package/src/components/_internal/base-tab-list.css +33 -25
- package/src/components/accordion.css +3 -3
- package/src/components/accordion.tsx +3 -1
- package/src/components/alert-dialog.css +4 -0
- package/src/components/alert-dialog.tsx +3 -1
- package/src/components/avatar.css +30 -24
- package/src/components/badge.css +17 -26
- package/src/components/badge.props.tsx +1 -1
- package/src/components/button.css +5 -175
- package/src/components/card.css +11 -2
- package/src/components/card.props.tsx +3 -6
- package/src/components/card.tsx +7 -9
- package/src/components/chatbar.css +6 -6
- package/src/components/chatbar.tsx +9 -4
- package/src/components/checkbox-cards.css +4 -48
- package/src/components/checkbox-cards.props.tsx +2 -1
- package/src/components/checkbox-cards.tsx +9 -3
- package/src/components/checkbox-group.css +6 -11
- package/src/components/checkbox-group.tsx +3 -1
- package/src/components/checkbox.css +6 -11
- package/src/components/checkbox.tsx +3 -1
- package/src/components/combobox.tsx +3 -1
- package/src/components/context-menu.tsx +3 -1
- package/src/components/data-list.tsx +3 -1
- package/src/components/dialog.css +4 -0
- package/src/components/dialog.props.tsx +3 -2
- package/src/components/dialog.tsx +3 -1
- package/src/components/dropdown-menu.tsx +3 -1
- package/src/components/hover-card.css +10 -10
- package/src/components/hover-card.props.tsx +1 -1
- package/src/components/hover-card.tsx +3 -1
- package/src/components/icon-button.css +4 -152
- package/src/components/index.css +0 -1
- package/src/components/index.tsx +0 -1
- package/src/components/kbd.css +14 -14
- package/src/components/message-scroller.tsx +1 -1
- package/src/components/navbar.tsx +3 -1
- package/src/components/notice.css +21 -11
- package/src/components/notice.tsx +8 -4
- package/src/components/popover.css +8 -12
- package/src/components/popover.tsx +3 -1
- package/src/components/progress.css +4 -37
- package/src/components/progress.props.tsx +0 -3
- package/src/components/radio-cards.css +0 -38
- package/src/components/radio-cards.props.tsx +2 -1
- package/src/components/radio-cards.tsx +13 -3
- package/src/components/radio-group.props.tsx +1 -1
- package/src/components/radio-group.tsx +3 -1
- package/src/components/radio.tsx +3 -1
- package/src/components/scroll-area.css +2 -23
- package/src/components/scroll-area.props.tsx +0 -3
- package/src/components/scroll-area.tsx +2 -18
- package/src/components/segmented-control.css +38 -31
- package/src/components/segmented-control.tsx +3 -1
- package/src/components/select.css +82 -80
- package/src/components/select.tsx +4 -2
- package/src/components/separator.css +2 -23
- package/src/components/separator.props.tsx +0 -3
- package/src/components/sheet.css +2 -1
- package/src/components/sheet.tsx +6 -10
- package/src/components/shell.css +1 -1
- package/src/components/shell.tsx +8 -2
- package/src/components/sidebar.css +6 -6
- package/src/components/slider.css +19 -11
- package/src/components/slider.tsx +3 -1
- package/src/components/spinner.css +2 -23
- package/src/components/spinner.props.tsx +0 -4
- package/src/components/switch.css +51 -17
- package/src/components/switch.tsx +3 -1
- package/src/components/tab-nav.tsx +3 -1
- package/src/components/table.css +3 -11
- package/src/components/table.props.tsx +1 -1
- package/src/components/table.tsx +3 -1
- package/src/components/tabs.css +2 -1
- package/src/components/tabs.tsx +3 -1
- package/src/components/text-area.css +55 -107
- package/src/components/text-area.tsx +8 -6
- package/src/components/text-field.css +133 -131
- package/src/components/text-field.tsx +8 -6
- package/src/components/theme.props.tsx +10 -0
- package/src/components/theme.tsx +86 -71
- package/src/components/toolbar.css +4 -4
- package/src/components/toolbar.tsx +3 -1
- package/src/helpers/index.ts +1 -0
- package/src/helpers/map-prop-values.ts +1 -18
- package/src/helpers/theme-size.ts +73 -0
- package/src/props/index.ts +0 -1
- package/src/props/margin.props.ts +1 -1
- package/src/styles/tokens/constants.css +4 -0
- package/src/styles/tokens/radius.css +97 -53
- package/src/styles/tokens/space.css +16 -0
- package/src/styles/utilities/margin.css +40 -7
- package/src/styles/utilities/padding.css +0 -26
- package/styles.css +2557 -4324
- package/tokens/base.css +215 -26
- package/tokens.css +217 -26
- package/utilities.css +240 -198
- package/dist/cjs/components/inset.d.ts +0 -12
- package/dist/cjs/components/inset.d.ts.map +0 -1
- package/dist/cjs/components/inset.js +0 -2
- package/dist/cjs/components/inset.js.map +0 -7
- package/dist/cjs/components/inset.props.d.ts +0 -71
- package/dist/cjs/components/inset.props.d.ts.map +0 -1
- package/dist/cjs/components/inset.props.js +0 -2
- package/dist/cjs/components/inset.props.js.map +0 -7
- package/dist/esm/chunk-2CNQGDY3.js +0 -2
- package/dist/esm/chunk-2CNQGDY3.js.map +0 -7
- package/dist/esm/chunk-2HUAVZZL.js +0 -2
- package/dist/esm/chunk-2HUAVZZL.js.map +0 -7
- package/dist/esm/chunk-2O3WL25H.js +0 -2
- package/dist/esm/chunk-2XSRO44Q.js +0 -2
- package/dist/esm/chunk-2XSRO44Q.js.map +0 -7
- package/dist/esm/chunk-3KB2XWBE.js +0 -2
- package/dist/esm/chunk-3KB2XWBE.js.map +0 -7
- package/dist/esm/chunk-4D7OU2UA.js +0 -2
- package/dist/esm/chunk-4D7OU2UA.js.map +0 -7
- package/dist/esm/chunk-5GYIQIPW.js +0 -2
- package/dist/esm/chunk-5GYIQIPW.js.map +0 -7
- package/dist/esm/chunk-655TAWHX.js +0 -2
- package/dist/esm/chunk-655TAWHX.js.map +0 -7
- package/dist/esm/chunk-6VPYP3VN.js +0 -2
- package/dist/esm/chunk-6VPYP3VN.js.map +0 -7
- package/dist/esm/chunk-6XHM724Y.js +0 -2
- package/dist/esm/chunk-6XHM724Y.js.map +0 -7
- package/dist/esm/chunk-6YWJUNMB.js +0 -2
- package/dist/esm/chunk-6YWJUNMB.js.map +0 -7
- package/dist/esm/chunk-7BE6N3KY.js +0 -2
- package/dist/esm/chunk-7BE6N3KY.js.map +0 -7
- package/dist/esm/chunk-AHOUZS3V.js +0 -2
- package/dist/esm/chunk-AHOUZS3V.js.map +0 -7
- package/dist/esm/chunk-BALS3AVM.js +0 -2
- package/dist/esm/chunk-BALS3AVM.js.map +0 -7
- package/dist/esm/chunk-BOLRYGFQ.js +0 -2
- package/dist/esm/chunk-BOLRYGFQ.js.map +0 -7
- package/dist/esm/chunk-BUEYZEAY.js +0 -2
- package/dist/esm/chunk-BUEYZEAY.js.map +0 -7
- package/dist/esm/chunk-CG54MBMW.js +0 -2
- package/dist/esm/chunk-CG54MBMW.js.map +0 -7
- package/dist/esm/chunk-DKALDTCN.js +0 -2
- package/dist/esm/chunk-DKALDTCN.js.map +0 -7
- package/dist/esm/chunk-EJOVE3JH.js +0 -2
- package/dist/esm/chunk-EJOVE3JH.js.map +0 -7
- package/dist/esm/chunk-EO7WQYFO.js +0 -2
- package/dist/esm/chunk-EO7WQYFO.js.map +0 -7
- package/dist/esm/chunk-FPDLBLO3.js +0 -2
- package/dist/esm/chunk-FPDLBLO3.js.map +0 -7
- package/dist/esm/chunk-GOYI2U6F.js +0 -2
- package/dist/esm/chunk-GOYI2U6F.js.map +0 -7
- package/dist/esm/chunk-GSTOGDAJ.js +0 -2
- package/dist/esm/chunk-GSTOGDAJ.js.map +0 -7
- package/dist/esm/chunk-HKRQ3E3I.js +0 -2
- package/dist/esm/chunk-HKRQ3E3I.js.map +0 -7
- package/dist/esm/chunk-HSFQO4QM.js +0 -2
- package/dist/esm/chunk-HSFQO4QM.js.map +0 -7
- package/dist/esm/chunk-HVQ3SLQC.js +0 -2
- package/dist/esm/chunk-HVQ3SLQC.js.map +0 -7
- package/dist/esm/chunk-IGBEDJBC.js +0 -2
- package/dist/esm/chunk-IGBEDJBC.js.map +0 -7
- package/dist/esm/chunk-IYFDCW7Y.js +0 -2
- package/dist/esm/chunk-IYFDCW7Y.js.map +0 -7
- package/dist/esm/chunk-JAMLW534.js +0 -2
- package/dist/esm/chunk-JAMLW534.js.map +0 -7
- package/dist/esm/chunk-JCOALADA.js +0 -5
- package/dist/esm/chunk-JCOALADA.js.map +0 -7
- package/dist/esm/chunk-K7J23OPW.js +0 -2
- package/dist/esm/chunk-K7J23OPW.js.map +0 -7
- package/dist/esm/chunk-M55KFXYV.js +0 -2
- package/dist/esm/chunk-M55KFXYV.js.map +0 -7
- package/dist/esm/chunk-MGSHX5N5.js +0 -2
- package/dist/esm/chunk-MGSHX5N5.js.map +0 -7
- package/dist/esm/chunk-MJC4NKYG.js +0 -2
- package/dist/esm/chunk-MJC4NKYG.js.map +0 -7
- package/dist/esm/chunk-MOYLXCMW.js +0 -2
- package/dist/esm/chunk-MOYLXCMW.js.map +0 -7
- package/dist/esm/chunk-MVW2SY4F.js +0 -2
- package/dist/esm/chunk-MVW2SY4F.js.map +0 -7
- package/dist/esm/chunk-NOSR2XWD.js +0 -2
- package/dist/esm/chunk-NOSR2XWD.js.map +0 -7
- package/dist/esm/chunk-OMUUPPJO.js +0 -2
- package/dist/esm/chunk-OMUUPPJO.js.map +0 -7
- package/dist/esm/chunk-PNIVUG5D.js +0 -2
- package/dist/esm/chunk-PNIVUG5D.js.map +0 -7
- package/dist/esm/chunk-PSS45RHX.js +0 -2
- package/dist/esm/chunk-PSS45RHX.js.map +0 -7
- package/dist/esm/chunk-PYYI64XK.js +0 -2
- package/dist/esm/chunk-PYYI64XK.js.map +0 -7
- package/dist/esm/chunk-QDW5ZG5E.js +0 -1
- package/dist/esm/chunk-QDW5ZG5E.js.map +0 -7
- package/dist/esm/chunk-QJFAGWBO.js +0 -2
- package/dist/esm/chunk-QJFAGWBO.js.map +0 -7
- package/dist/esm/chunk-QWFFYUFH.js +0 -2
- package/dist/esm/chunk-QWFFYUFH.js.map +0 -7
- package/dist/esm/chunk-RJ6SA7AY.js +0 -2
- package/dist/esm/chunk-RJ6SA7AY.js.map +0 -7
- package/dist/esm/chunk-RVHKSNMJ.js +0 -2
- package/dist/esm/chunk-RVHKSNMJ.js.map +0 -7
- package/dist/esm/chunk-RYURXQLJ.js +0 -2
- package/dist/esm/chunk-RYURXQLJ.js.map +0 -7
- package/dist/esm/chunk-UA6FP7HS.js +0 -2
- package/dist/esm/chunk-V7UP4SLZ.js +0 -2
- package/dist/esm/chunk-V7UP4SLZ.js.map +0 -7
- package/dist/esm/chunk-VJSZG35J.js +0 -2
- package/dist/esm/chunk-VJSZG35J.js.map +0 -7
- package/dist/esm/chunk-X5KCVLKG.js +0 -2
- package/dist/esm/chunk-X5KCVLKG.js.map +0 -7
- package/dist/esm/chunk-XPRPYCII.js +0 -2
- package/dist/esm/chunk-XPRPYCII.js.map +0 -7
- package/dist/esm/chunk-YDRFILTX.js +0 -2
- package/dist/esm/chunk-YDRFILTX.js.map +0 -7
- package/dist/esm/chunk-YGPUKJEB.js +0 -2
- package/dist/esm/chunk-YGPUKJEB.js.map +0 -7
- package/dist/esm/components/inset.d.ts +0 -12
- package/dist/esm/components/inset.d.ts.map +0 -1
- package/dist/esm/components/inset.js +0 -2
- package/dist/esm/components/inset.props.d.ts +0 -71
- package/dist/esm/components/inset.props.d.ts.map +0 -1
- package/dist/esm/components/inset.props.js +0 -2
- package/src/components/inset.css +0 -111
- package/src/components/inset.props.tsx +0 -90
- package/src/components/inset.tsx +0 -28
- /package/dist/esm/{chunk-6WFEMPCF.js.map → chunk-2XQECQF2.js.map} +0 -0
- /package/dist/esm/{chunk-AMP7O3DM.js.map → chunk-43A5GUSI.js.map} +0 -0
- /package/dist/esm/{chunk-COSHAOEK.js.map → chunk-63ASTOS2.js.map} +0 -0
- /package/dist/esm/{chunk-UBSLEGQZ.js.map → chunk-6FLLFCBU.js.map} +0 -0
- /package/dist/esm/{chunk-SM27AC7E.js.map → chunk-6RZVKCNG.js.map} +0 -0
- /package/dist/esm/{chunk-RFURPE7W.js.map → chunk-6XNQ5XD3.js.map} +0 -0
- /package/dist/esm/{chunk-JLI7WHV6.js.map → chunk-7FC7HF76.js.map} +0 -0
- /package/dist/esm/{chunk-UA6FP7HS.js.map → chunk-ABS275QZ.js.map} +0 -0
- /package/dist/esm/{chunk-TPHNDGSV.js.map → chunk-AI6UQ5VD.js.map} +0 -0
- /package/dist/esm/{chunk-O6K6RZXY.js.map → chunk-BUBV3C6C.js.map} +0 -0
- /package/dist/esm/{chunk-AO32NT75.js.map → chunk-CLEH57SW.js.map} +0 -0
- /package/dist/esm/{chunk-XHKL4PG7.js.map → chunk-DIR22XIX.js.map} +0 -0
- /package/dist/esm/{chunk-TGRRQHLQ.js.map → chunk-DMWLY6ZP.js.map} +0 -0
- /package/dist/esm/{components/inset.props.js.map → chunk-F2UUKVBM.js.map} +0 -0
- /package/dist/esm/{chunk-WKMJIWFP.js.map → chunk-FTGD2SZ6.js.map} +0 -0
- /package/dist/esm/{chunk-RSJSVJ6A.js.map → chunk-G3U6OHVA.js.map} +0 -0
- /package/dist/esm/{chunk-CRYT55SY.js.map → chunk-GIIMBBVM.js.map} +0 -0
- /package/dist/esm/{chunk-DSB3TEAQ.js.map → chunk-GLERJXVS.js.map} +0 -0
- /package/dist/esm/{chunk-MZQDDG5K.js.map → chunk-GYNRAVCL.js.map} +0 -0
- /package/dist/esm/{chunk-BFLO4IVZ.js.map → chunk-IXNJFV4O.js.map} +0 -0
- /package/dist/esm/{chunk-PBFSBHBS.js.map → chunk-JUY7CBSL.js.map} +0 -0
- /package/dist/esm/{chunk-V2TPYSZ2.js.map → chunk-JZSXHYUU.js.map} +0 -0
- /package/dist/esm/{chunk-GVLTTTFL.js.map → chunk-K6Y2SM5N.js.map} +0 -0
- /package/dist/esm/{chunk-CL6LRPCS.js.map → chunk-KDKL3HXD.js.map} +0 -0
- /package/dist/esm/{chunk-XHF6RBOE.js.map → chunk-KRPEEM4C.js.map} +0 -0
- /package/dist/esm/{chunk-DP3OWU5T.js.map → chunk-L2IIIELE.js.map} +0 -0
- /package/dist/esm/{chunk-K5SC3CZZ.js.map → chunk-N5OSP3PU.js.map} +0 -0
- /package/dist/esm/{chunk-IF4PYIUV.js.map → chunk-N77QJUTO.js.map} +0 -0
- /package/dist/esm/{chunk-XZ5XZS5O.js.map → chunk-NETIWKIR.js.map} +0 -0
- /package/dist/esm/{chunk-2IPVLV6B.js.map → chunk-OMYAVTX6.js.map} +0 -0
- /package/dist/esm/{chunk-7CBZFHSQ.js.map → chunk-OXYHRNJA.js.map} +0 -0
- /package/dist/esm/{chunk-L6M2MI7Y.js.map → chunk-PIMNQEDG.js.map} +0 -0
- /package/dist/esm/{chunk-2O3WL25H.js.map → chunk-QWLKMVZY.js.map} +0 -0
- /package/dist/esm/{chunk-YZABQ4LS.js.map → chunk-UUV5UNYL.js.map} +0 -0
- /package/dist/esm/{chunk-S53ZQNHK.js.map → chunk-VLQ2LX5M.js.map} +0 -0
- /package/dist/esm/{chunk-ORMCQAPS.js.map → chunk-WDDO73O5.js.map} +0 -0
- /package/dist/esm/{chunk-3OABA7AF.js.map → chunk-X7HFFVFD.js.map} +0 -0
- /package/dist/esm/{chunk-6HRBG5H2.js.map → chunk-XTE22CXV.js.map} +0 -0
- /package/dist/esm/{chunk-35KS5AQE.js.map → chunk-ZMOBKT4T.js.map} +0 -0
- /package/dist/esm/{components/inset.js.map → helpers/theme-size.js.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/_internal/base-button.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\nimport type { MarginProps } from '../../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../../props/prop-def.js';\n\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n/**\n * Polymorphic BaseButton props that support rendering as different HTML elements\n * Uses the proper ComponentPropsWithout pattern for type safety\n * @template C - The element type to render as (defaults to 'button')\n */\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\n/**\n * BaseButton props interface that combines all available props\n */\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\n/**\n * BaseButton component that provides the core button functionality\n *\n * This is the foundational button component that handles all the complex logic\n * including loading states, accessibility, performance optimizations, and\n * polymorphic rendering. It's used by Button, IconButton, and other button\n * variants to ensure consistent behavior across the design system.\n *\n * Key features:\n * - Loading state with spinner and accessibility announcements\n * - Comprehensive accessibility support\n * - Polymorphic rendering support\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BaseButton>Click me</BaseButton>\n *\n * // With loading state\n * <BaseButton loading>Processing...</BaseButton>\n *\n * // Polymorphic rendering\n * <BaseButton as=\"a\" href=\"/link\">Link Button</BaseButton>\n * ```\n */\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n\n // Extract button-specific props from the combined props object\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n flush,\n disabled = props.loading, // Loading state automatically disables the button\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n\n // asChild takes precedence over as prop for Radix Slot integration\n // When asChild is true, we use Slot.Root to merge props onto the child element\n // When asChild is false, we render as the specified element (or button by default)\n const Comp = asChild ? Slot.Root : (as || 'button');\n\n // Only pass disabled for elements that support it\n // This prevents invalid HTML attributes on unsupported elements\n const shouldPassDisabled = asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Determine if we are rendering a real <button> element so we can set a safe\n // default type. Native <button> defaults to type=\"submit\" which can cause\n // accidental form submissions. We default to type=\"button\" unless the user\n // explicitly provided a type or we're using asChild (unknown underlying node).\n const isNativeButtonElement = !asChild && (!as || as === 'button');\n const hasExplicitTypeAttribute = 'type' in (baseButtonProps as Record<string, unknown>);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Extract button text for accessibility announcements\n const buttonText = React.useMemo(() => {\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n return 'button';\n }, [children]);\n\n // Enhanced accessibility props for loading state\n // These ensure screen readers announce the loading state properly\n const accessibilityProps = React.useMemo(() => {\n if (props.loading) {\n return {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n 'aria-label': `${buttonText} (loading)`,\n };\n }\n return {};\n }, [props.loading, describedById, buttonText]);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n {...(isNativeButtonElement && !hasExplicitTypeAttribute ? { type: 'button' } : {})}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>{buttonText} is loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n {/* Centered spinner overlay during loading state */}\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)} aria-hidden=\"true\" />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n"],
|
|
5
|
-
"mappings": "+RAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAAC,MAAY,WA2DrB,IAAMC,EAAmB,aAA+C,CAACC,EAAOC,IAAiB,CAC/F,GAAM,CAAE,KAAAC,EAAOC,EAAmB,KAAK,OAAQ,EAAIH,EAG7C,CACJ,UAAAI,EACA,SAAAC,EACA,QAAAC,EACA,GAAAC,EACA,MAAAC,EACA,OAAAC,EACA,MAAAC,EACA,SAAAC,EAAWX,EAAM,QACjB,GAAGY,CACL,EAAIC,EAAab,EAAOG,EAAoBW,CAAc,EAMpDC,EAAOT,EAAUU,EAAK,KAAQT,GAAM,SAIpCU,EAAqBX,GAAW,CAACC,GAAM,CAAC,SAAU,QAAS,WAAY,QAAQ,EAAE,SAASA,CAAE,EAM5FW,EAAwB,CAACZ,IAAY,CAACC,GAAMA,IAAO,UACnDY,EAA2B,SAAWP,EAGtCQ,EAAkB,QAAM,EACxBC,EAAgBrB,EAAM,QAAU,GAAGoB,CAAS,WAAa,OAGzDE,EAAmB,UAAQ,IAC3B,OAAOjB,GAAa,SAAiBA,EAC/B,iBAAeA,CAAQ,GAAK,OAAQA,EAAS,OAAe,UAAa,SACzEA,EAAS,MAAc,SAE1B,SACN,CAACA,CAAQ,CAAC,EAIPkB,EAA2B,UAAQ,IACnCvB,EAAM,QACD,CACL,YAAa,GACb,gBAAiB,GACjB,mBAAoBqB,EACpB,aAAc,GAAGC,CAAU,YAC7B,EAEK,CAAC,EACP,CAACtB,EAAM,QAASqB,EAAeC,CAAU,CAAC,EAE7C,OACE,gBAACP,EAAA,CAEC,gBAAeJ,GAAY,OAC3B,oBAAmBH,EACnB,cAAaC,EACb,aAAYC,EAAQ,OAAS,OAC5B,GAAGE,EACH,GAAGW,EACJ,IAAKtB,EACL,UAAWuB,EAAW,WAAY,gBAAiBpB,CAAS,EAC3D,GAAIa,GAAsB,CAAE,SAAAN,CAAS,EACrC,GAAIO,GAAyB,CAACC,EAA2B,CAAE,KAAM,QAAS,EAAI,CAAC,GAE/EnB,EAAM,QACL,gCAQE,gBAAC,QAAK,MAAO,CAAE,QAAS,WAAY,WAAY,QAAS,EAAG,cAAW,IACpEK,CACH,EAGA,gBAACoB,EAAA,KACC,gBAAC,QAAK,GAAIJ,GAAgBC,EAAW,6BAA2B,EAC/DjB,CACH,EAGA,gBAACqB,EAAA,CAAK,QAAO,GAAC,MAAM,SAAS,QAAQ,SAAS,SAAS,WAAW,MAAM,KACtE,gBAAC,YACC,gBAACC,EAAA,CAAQ,KAAMC,EAAkB1B,EAAM2B,CAA0B,EAAG,cAAY,OAAO,CACzF,CACF,CACF,EAEAxB,CAEJ,CAEJ,CAAC,EACDN,EAAW,YAAc",
|
|
6
|
-
"names": ["React", "classNames", "Slot", "BaseButton", "props", "forwardedRef", "size", "baseButtonPropDefs", "className", "children", "asChild", "as", "color", "radius", "flush", "disabled", "baseButtonProps", "extractProps", "marginPropDefs", "Comp", "Slot", "shouldPassDisabled", "isNativeButtonElement", "hasExplicitTypeAttribute", "loadingId", "describedById", "buttonText", "accessibilityProps", "classNames", "VisuallyHidden", "Flex", "Spinner", "mapResponsiveProp", "mapButtonSizeToSpinnerSize"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./chunk-UA6FP7HS.js";import{a as u,e as f,f as l,g as R}from"./chunk-V32EP3S7.js";import{b as P}from"./chunk-IX5HIHVI.js";import{a as G}from"./chunk-O6K6RZXY.js";import{a}from"./chunk-UBSLEGQZ.js";import{a as n}from"./chunk-GSTOGDAJ.js";import{a as E}from"./chunk-OS3FCYZY.js";var T={};E(T,{Item:()=>N,Root:()=>v});import*as o from"react";import b from"classnames";import{Context as S}from"radix-ui/internal";var I="CheckboxGroup",[_]=S.createContextScope(I,[u]),d=u(),[g,y]=_(I),v=o.forwardRef(({color:s=x.color.default,size:e=x.size.default,variant:t=x.variant.default,...r},p)=>{let{__scopeCheckboxGroup:c,className:m,...C}=a(r,n),i=d(c);return o.createElement(g,{scope:c,color:s,size:e,variant:t},o.createElement(f,{...i,...C,ref:p,className:b("rt-CheckboxGroupRoot",m)}))});v.displayName="CheckboxGroup.Root";var N=o.forwardRef((s,e)=>{let{__scopeCheckboxGroup:t,children:r,className:p,style:c,...m}=s,{size:C}=y("CheckboxGroupItem",t),i=h=>typeof h=="string"&&/^[1-9]$/.test(h)?h:"3";return r?o.createElement(G,{as:"label",size:i(C),className:b("rt-CheckboxGroupItem",p),style:c},o.createElement(k,{__scopeCheckboxGroup:t,...m,ref:e}),r&&o.createElement("span",{className:"rt-CheckboxGroupItemInner"},r)):o.createElement(k,{__scopeCheckboxGroup:t,...m,ref:e,className:p,style:c})});N.displayName="CheckboxGroup.Item";var k=o.forwardRef(({__scopeCheckboxGroup:s,...e},t)=>{let r=y("CheckboxGroupItemCheckbox",s),p=d(s),{color:c,className:m}=a({...e,...r},x,n);return o.createElement(l,{...p,"data-accent-color":c,...e,ref:t,className:b("rt-reset","rt-BaseCheckboxRoot","rt-CheckboxGroupItemCheckbox",m)},o.createElement(R,{...p,asChild:!0,className:"rt-BaseCheckboxIndicator"},o.createElement(P,null)))});k.displayName="CheckboxGroup.ItemCheckbox";export{v as a,N as b,T as c};
|
|
2
|
-
//# sourceMappingURL=chunk-MVW2SY4F.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/checkbox-group.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Context } from 'radix-ui/internal';\n\nimport * as CheckboxGroupPrimitive from './checkbox-group.primitive.js';\nimport { createCheckboxGroupScope } from './checkbox-group.primitive.js';\nimport { checkboxGroupRootPropDefs } from './checkbox-group.props.js';\nimport { ThickCheckIcon } from './icons.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext] = Context.createContextScope(CHECKBOX_GROUP_NAME, [\n createCheckboxGroupScope,\n]);\nconst useCheckboxGroupScope = createCheckboxGroupScope();\n\ntype CheckboxGroupRootOwnProps = GetPropDefTypes<typeof checkboxGroupRootPropDefs>;\ntype CheckboxGroupContextValue = CheckboxGroupRootOwnProps;\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupRootElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ninterface CheckboxGroupRootProps\n extends ComponentPropsWithout<\n typeof CheckboxGroupPrimitive.Root,\n 'asChild' | 'color' | 'defaultChecked'\n >,\n MarginProps,\n CheckboxGroupRootOwnProps {}\nconst CheckboxGroupRoot = React.forwardRef<CheckboxGroupRootElement, CheckboxGroupRootProps>(\n (\n {\n color = checkboxGroupRootPropDefs.color.default,\n size = checkboxGroupRootPropDefs.size.default,\n variant = checkboxGroupRootPropDefs.variant.default,\n ...props\n }: ScopedProps<CheckboxGroupRootProps>,\n forwardedRef,\n ) => {\n const { __scopeCheckboxGroup, className, ...rootProps } = extractProps(props, marginPropDefs);\n const checkboxGroupScope = useCheckboxGroupScope(__scopeCheckboxGroup);\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n color={color}\n size={size}\n variant={variant}\n >\n <CheckboxGroupPrimitive.Root\n {...checkboxGroupScope}\n {...rootProps}\n ref={forwardedRef}\n className={classNames('rt-CheckboxGroupRoot', className)}\n />\n </CheckboxGroupProvider>\n );\n },\n);\nCheckboxGroupRoot.displayName = 'CheckboxGroup.Root';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ninterface CheckboxGroupItemProps\n extends ComponentPropsWithout<typeof CheckboxGroupPrimitive.Item, RemovedProps>,\n MarginProps {}\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (_props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, children, className, style, ...props } = _props;\n const { size } = useCheckboxGroupContext('CheckboxGroupItem', __scopeCheckboxGroup);\n\n // Helper to safely convert size to Text-compatible size\n const getTextSize = (sizeValue: any): '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' => {\n if (typeof sizeValue === 'string' && /^[1-9]$/.test(sizeValue)) {\n return sizeValue as any;\n }\n return '3';\n };\n\n // Render `<Text as=\"label\">` if children\u00A0are provided, otherwise render\n // the solo checkbox to allow building out your custom layouts with it.\n if (children) {\n return (\n <Text\n as=\"label\"\n size={getTextSize(size)}\n className={classNames('rt-CheckboxGroupItem', className)}\n style={style}\n >\n <CheckboxGroupItemCheckbox\n __scopeCheckboxGroup={__scopeCheckboxGroup}\n {...props}\n ref={forwardedRef}\n />\n {children && <span className=\"rt-CheckboxGroupItemInner\">{children}</span>}\n </Text>\n );\n }\n\n return (\n <CheckboxGroupItemCheckbox\n __scopeCheckboxGroup={__scopeCheckboxGroup}\n {...props}\n ref={forwardedRef}\n className={className}\n style={style}\n />\n );\n },\n);\nCheckboxGroupItem.displayName = 'CheckboxGroup.Item';\n\ntype CheckboxGroupItemCheckboxElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ninterface CheckboxGroupItemCheckboxProps\n extends ComponentPropsWithout<typeof CheckboxGroupPrimitive.Item, RemovedProps> {}\nconst CheckboxGroupItemCheckbox = React.forwardRef<\n CheckboxGroupItemCheckboxElement,\n ScopedProps<CheckboxGroupItemCheckboxProps>\n>(({ __scopeCheckboxGroup, ...props }, forwardedRef) => {\n const context = useCheckboxGroupContext('CheckboxGroupItemCheckbox', __scopeCheckboxGroup);\n const checkboxGroupScope = useCheckboxGroupScope(__scopeCheckboxGroup);\n const { color, className } = extractProps(\n { ...props, ...context },\n checkboxGroupRootPropDefs,\n marginPropDefs,\n );\n return (\n <CheckboxGroupPrimitive.Item\n {...checkboxGroupScope}\n data-accent-color={color}\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'rt-reset',\n 'rt-BaseCheckboxRoot',\n 'rt-CheckboxGroupItemCheckbox',\n className,\n )}\n >\n <CheckboxGroupPrimitive.Indicator\n {...checkboxGroupScope}\n asChild\n className=\"rt-BaseCheckboxIndicator\"\n >\n <ThickCheckIcon />\n </CheckboxGroupPrimitive.Indicator>\n </CheckboxGroupPrimitive.Item>\n );\n});\nCheckboxGroupItemCheckbox.displayName = 'CheckboxGroup.ItemCheckbox';\n\nexport { CheckboxGroupRoot as Root, CheckboxGroupItem as Item };\nexport type { CheckboxGroupRootProps as RootProps, CheckboxGroupItemProps as ItemProps };\n"],
|
|
5
|
-
"mappings": "wSAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,SAAAC,IAEA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAAC,MAAe,oBAcxB,IAAMC,EAAsB,gBAGtB,CAACC,CAA0B,EAAIC,EAAQ,mBAAmBF,EAAqB,CACnFG,CACF,CAAC,EACKC,EAAwBD,EAAyB,EAKjD,CAACE,EAAuBC,CAAuB,EACnDL,EAAsDD,CAAmB,EAUrEO,EAA0B,aAC9B,CACE,CACE,MAAAC,EAAQC,EAA0B,MAAM,QACxC,KAAAC,EAAOD,EAA0B,KAAK,QACtC,QAAAE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E,GAAGL,EAAO,GAAGkB,CAAQ,EACvBrB,EACAS,CACF,EACA,OACE,gBAAwBa,EAAvB,CACE,GAAGZ,EACJ,oBAAmBX,EAClB,GAAGI,EACJ,IAAKC,EACL,UAAWQ,EACT,WACA,sBACA,+BACAN,CACF,GAEA,gBAAwBiB,EAAvB,CACE,GAAGb,EACJ,QAAO,GACP,UAAU,4BAEV,gBAACc,EAAA,IAAe,CAClB,CACF,CAEJ,CAAC,EACDJ,EAA0B,YAAc",
|
|
6
|
-
"names": ["checkbox_group_exports", "__export", "CheckboxGroupItem", "CheckboxGroupRoot", "React", "classNames", "Context", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "Context", "createCheckboxGroupScope", "useCheckboxGroupScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "CheckboxGroupRoot", "color", "checkboxGroupRootPropDefs", "size", "variant", "props", "forwardedRef", "__scopeCheckboxGroup", "className", "rootProps", "extractProps", "marginPropDefs", "checkboxGroupScope", "Root", "classNames", "CheckboxGroupItem", "_props", "children", "style", "getTextSize", "sizeValue", "Text", "CheckboxGroupItemCheckbox", "context", "Item", "Indicator", "ThickCheckIcon"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as Oe,b as Ae}from"./chunk-I53SGTKV.js";import{a as De}from"./chunk-MGQ4A2FI.js";import{a as Ie}from"./chunk-ORMCQAPS.js";import{c as ne,d as oe,g as Re,h as ve,i as ge}from"./chunk-SM27AC7E.js";import{a as Ne}from"./chunk-672FI4OH.js";import{a as ke}from"./chunk-A2NG5NRN.js";import{a as q,b as ze,c as xe,d as He,g as we}from"./chunk-3J6AUDID.js";import{a as be,b as le}from"./chunk-HCNO7PX6.js";import{a as ie,b as ce,c as de}from"./chunk-5ROQAZ7J.js";import{e as ae,f as Ce,h as Ee,i as Z,j as ye,k as re,l as se,n as Me,o as ee}from"./chunk-3PTKPDSA.js";import{a as Le,b as Te}from"./chunk-BZZXXZ3O.js";import{a as Se}from"./chunk-HWQ3NTJP.js";import{a as Pe}from"./chunk-TBZO22XK.js";import{a as qe}from"./chunk-OS3FCYZY.js";var Qe={};qe(Qe,{Bottom:()=>Ne,Content:()=>Ke,Header:()=>Ue,Inspector:()=>ke,Left:()=>We,PaneFooter:()=>ve,PaneHeader:()=>Re,Panel:()=>me,Rail:()=>_e,Root:()=>Ve,Scroll:()=>ge,Sidebar:()=>Ie,Trigger:()=>$e,useResponsivePresentation:()=>De,useShell:()=>Ae,useSidebarMode:()=>Oe});import*as e from"react";import V from"classnames";import{useComposedRefs as fe}from"radix-ui/internal";var ue=0;function Fe(a){ue=Math.max(0,ue+a);let r=document.documentElement;ue>0?r.setAttribute("data-rt-shell-lock",""):r.removeAttribute("data-rt-shell-lock")}var pe="data-rt-shell-inert",je=30;function j(a,r){return r===null||r===a||r===a.body||r===a.documentElement}function Be(a,r,i){for(let d of a.querySelectorAll("[data-shell-trigger][aria-controls]"))if(!(d.getAttribute("aria-controls")!==r||d.closest("[inert]"))&&!(i&&!i.some(P=>P.contains(d))))return d;return null}var Ve=e.forwardRef(({className:a,children:r,height:i="full",size:d="2",style:P,onKeyDown:A,onFocus:H,...w},N)=>{let[s]=e.useState(Ce),R=e.useCallback(t=>Ee(s,t),[s]);e.useSyncExternalStore(R,()=>s.version,()=>0);let p=e.useRef(null),y=fe(N,p),[S,M]=e.useState(()=>new Set),b=e.useCallback(t=>{M(o=>o.has(t)?o:new Set(o).add(t))},[]),h=e.useCallback(t=>{M(o=>{if(!o.has(t))return o;let n=new Set(o);return n.delete(t),n})},[]),f=e.useMemo(()=>({registerInset:b,unregisterInset:h}),[b,h]),v=e.useCallback(()=>{for(let t of s.entries.values())t.overlayLive&&t.setValue("closed","dismiss")},[s]),C=e.useCallback(()=>[...s.entries.values()].filter(t=>t.overlayLive&&t.el).map(t=>({name:t.name,id:t.id,el:t.el})),[s]),g=[...s.entries.values()].filter(t=>t.overlayLive&&t.el).length,k=i!=="full"&&i!=="auto",I=e.useCallback(()=>{let t=p.current;if(!t)return;let o=C().map(n=>n.el);for(let n of t.children){if(!(n instanceof HTMLElement)||n.classList.contains("rt-ShellScrim"))continue;let c=o.some(z=>n===z||n.contains(z));o.length===0||c?n.hasAttribute(pe)&&(n.removeAttribute(pe),n.inert=!1):n.inert||(n.setAttribute(pe,""),n.inert=!0)}},[C]),O=e.useRef(null),G=e.useRef([]),X=e.useRef(null),D=e.useRef(!1),L=e.useRef(0),F=e.useCallback(()=>{L.current&&cancelAnimationFrame(L.current),L.current=0},[]),U=e.useCallback((t,o)=>{F();let n=0,c=()=>{if(L.current=0,!!t.isConnected){if(o(t.ownerDocument.activeElement)){t.focus({preventScroll:!0});return}n+=1,n<je&&(L.current=requestAnimationFrame(c))}};L.current=requestAnimationFrame(c)},[F]);e.useEffect(()=>()=>{F(),D.current&&(D.current=!1,Fe(-1))},[F]),e.useEffect(()=>{let t=p.current;if(!t)return;let o=t.ownerDocument,n=C(),c=n.map(l=>l.el),z=!k&&n.length>0;z!==D.current&&(D.current=z,Fe(z?1:-1));let _=G.current;G.current=n;let x=_.filter(l=>{if(c.includes(l.el))return!1;let u=s.entries.get(l.name);return!l.el.isConnected||!u||u.el!==l.el||u.value==="closed"}),K=l=>l!==null&&x.some(u=>u.el.contains(l));if(_.length===0&&n.length>0){let l=o.activeElement,u=l instanceof HTMLElement&&!j(o,l)&&!c.some(m=>m.contains(l))?l:null;if(u&&!t.contains(u)){let m=X.current;m&&m.isConnected&&!c.some(Y=>Y.contains(m))&&(u=m)}O.current=u}if(I(),n.length===0){let l=O.current;if(O.current=null,x.length===0)return;let m=(E=>E!==null&&E.isConnected&&!E.closest("[inert]")&&!K(E))(l)?l:null;for(let E of x)m??(m=Be(o,E.id));if(!m)return;let Y=E=>j(o,E)||K(E);Y(o.activeElement)?m.focus({preventScroll:!0}):U(m,Y);return}if(x.length>0){let l=o.activeElement;if(j(o,l)||K(l)){let u=null;for(let m of x)u??(u=Be(o,m.id,c));(u??c[c.length-1]).focus({preventScroll:!0})}}let $=c.filter(l=>!_.some(u=>u.el===l)),Q=o.activeElement;$.length>0&&!c.some(l=>l.contains(Q))&&($[0].focus({preventScroll:!0}),U($[0],l=>j(o,l)||l instanceof Element&&l.closest("[inert]")!==null))}),e.useEffect(()=>{let t=p.current;if(!t||g===0||typeof MutationObserver>"u")return;let o=new MutationObserver(I);return o.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["inert"]}),()=>o.disconnect()},[g,I]);let te=t=>{A?.(t),!(t.key!=="Escape"||t.defaultPrevented||g===0)&&(v(),t.stopPropagation())};e.useEffect(()=>{let t=p.current;if(!t||g===0)return;let o=t.ownerDocument,n=c=>{c.key!=="Escape"||c.defaultPrevented||!j(o,c.target)||v()};return o.addEventListener("keydown",n),()=>o.removeEventListener("keydown",n)},[g,v]);let J=t=>{H?.(t),t.target instanceof HTMLElement&&p.current?.contains(t.target)&&(X.current=t.target)},T=s.entries.get("rail"),B=T!==void 0&&T.value!==void 0&&T.value!=="closed"?S.has("rail")?`calc(${T.size}px + 2 * var(--shell-inset-gap))`:`${T.size}px`:void 0,W=i==="full"?{}:i==="auto"?{height:"auto"}:typeof i=="number"?{height:`${i}px`}:{height:i};return e.createElement(ye.Provider,{value:s},e.createElement(ne.Provider,{value:d},e.createElement(Me.Provider,{value:f},e.createElement("div",{...w,ref:y,className:V("rt-ShellRoot",a),"data-height":i==="auto"?"auto":void 0,"data-has-inset":S.size>0||void 0,"data-overlay-live":g>0||void 0,onKeyDown:te,onFocus:J,style:{...W,...B?{"--shell-rail-offset":B}:{},...P}},r,e.createElement("div",{className:"rt-ShellScrim","aria-hidden":!0,onClick:v})))))});Ve.displayName="Shell.Root";var Ue=e.forwardRef(({className:a,height:r=64,style:i,...d},P)=>e.createElement("header",{...d,ref:P,className:V("rt-ShellHeader",a),style:{...i,"--shell-header-height":`${r}px`}}));Ue.displayName="Shell.Header";var We=e.forwardRef(({children:a},r)=>(e.useEffect(()=>{},[]),e.createElement(e.Fragment,null,a)));We.displayName="Shell.Left";var Ge={controlled:"open",default:"defaultOpen"},_e=e.forwardRef((a,r)=>{let{className:i,presentation:d,expandedSize:P=64,collapsible:A,onExpand:H,onCollapse:w,children:N,style:s,open:R,defaultOpen:p,onOpenChange:y,inset:S,id:M,...b}=a,{table:h,attributes:f}=de(d,"fixed"),v=ie({name:"rail",label:"Rail",propNames:Ge,id:M,controlled:q(R),defaultValue:q(p),presentationTable:h,builtIn:ze,onChange:(g,k)=>y?.(g!=="closed",{reason:k}),onExpand:H,onCollapse:w,size:P});ee("rail",S);let C=fe(r,v.setElement);return e.createElement("div",{...b,id:v.id,ref:C,className:V("rt-ShellPane","rt-ShellRail",i),...ce(v,f),"data-inset":S||void 0,tabIndex:v.overlaying?-1:b.tabIndex,style:{...s,"--rail-size":`${P}px`}},e.createElement(Xe,null,N))});_e.displayName="Shell.Rail";function Xe({children:a}){let r=e.useContext(ne);return e.createElement("div",{className:V("rt-ShellRailContent",`rt-r-size-${r}`)},e.createElement(oe,{presentation:"thin"},a))}var Je={controlled:"open",default:"defaultOpen"},me=e.forwardRef((a,r)=>{let{className:i,presentation:d,defaultOpen:P,open:A,onOpenChange:H,size:w,defaultSize:N,expandedSize:s=288,minSize:R=100,maxSize:p=800,resizable:y=!1,collapsible:S=!0,onExpand:M,onCollapse:b,onResize:h,onResizeStart:f,onResizeEnd:v,snapPoints:C,snapTolerance:g,collapseThreshold:k,paneId:I,persistence:O,children:G,style:X,onSizeChange:D,sizeUpdate:L,sizeUpdateMs:F=50,inset:U,id:te,...J}=a,T=re("Shell.Panel"),he=se(T,"rail"),B=de(d,"fixed"),W=d===void 0,t=W?he?.presentationTable??ae:B.table,o=W?{"data-presentation-follows":""}:B.attributes,n=ie({name:"panel",label:"Panel",propNames:Je,id:te,controlled:q(A),defaultValue:q(P),presentationTable:t,builtIn:xe,onChange:(Q,l)=>H?.(Q!=="closed",{reason:l}),onExpand:M,onCollapse:b,size:s});ee("panel",U),e.useEffect(()=>{(C!==void 0||k!==void 0||I!==void 0||O!==void 0)&&void 0},[C,k,I,O]);let c=e.useRef(null),z=fe(r,n.setElement,c),_=Le({name:"panel",elementId:n.id,elementRef:c,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:He,expandedSize:s,minSize:R,maxSize:p,resizable:y,collapsible:S,size:w,defaultSize:N,onSizeChange:D,sizeUpdate:L,sizeUpdateMs:F,onResize:h,onResizeStart:f,onResizeEnd:v,snapPoints:C,snapTolerance:g,collapseThreshold:k,paneId:I,persistence:O,overlaying:n.overlaying,overlayingNow:()=>(W?T.entries.get("rail")?.presentationTable??ae:B.table)[Pe()]==="overlay",requestCollapse:()=>n.setValue("closed","toggle"),requestToggle:()=>n.toggle("toggle")}),{handles:x,content:K}=Te(G,le),$=y&&n.shown!==!1&&!n.overlaying?e.createElement(Se.Provider,{value:_},x.length>0?x:e.createElement(be,null)):null;return e.createElement("div",{...we(J),id:n.id,ref:z,className:V("rt-ShellPane","rt-ShellPanel",i),...ce(n,o),"data-inset":U||void 0,tabIndex:n.overlaying?-1:J.tabIndex,style:{...X,"--panel-expanded-size":`${s}px`}},e.createElement("div",{className:"rt-ShellPanelContent"},e.createElement(oe,null,K)),$)});me.displayName="Shell.Panel";me.Handle=le;var Ke=e.forwardRef(({className:a,inset:r,...i},d)=>(ee("content",r),e.createElement("main",{...i,ref:d,className:V("rt-ShellContent",a),"data-inset":r||void 0})));Ke.displayName="Shell.Content";var $e=e.forwardRef(({target:a,action:r="toggle",peekOnHover:i,onClick:d,onMouseEnter:P,onMouseLeave:A,children:H,...w},N)=>{let s=re("Shell.Trigger");e.useEffect(()=>{a==="left"&&void 0,i&&void 0},[a,i]);let R=a==="left"?"rail":a,p=se(s,R),y=p?.value===void 0?void 0:p.value!=="closed",S=h=>{if(d?.(h),h.defaultPrevented)return;let f=s.entries.get(R);f&&(s.peek===R&&Z(s,null),r==="toggle"?f.toggle("toggle"):r==="expand"?f.setValue("open","toggle"):f.setValue("closed","toggle"))},M=h=>{if(P?.(h),!i)return;let f=s.entries.get(R);f&&f.value==="closed"&&f.presentation!=="overlay"&&Z(s,R)},b=h=>{A?.(h),i&&s.peek===R&&Z(s,null)};return e.createElement("button",{type:"button","aria-controls":p?.id,"aria-expanded":y,...w,ref:N,onClick:S,onMouseEnter:M,onMouseLeave:b,"data-shell-trigger":a,"data-shell-action":r},H)});$e.displayName="Shell.Trigger";export{Ve as a,Ue as b,We as c,_e as d,me as e,Ke as f,$e as g,Qe as h};
|
|
2
|
-
//# sourceMappingURL=chunk-NOSR2XWD.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/shell.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * Shell: the app frame.\n *\n * Since 0.8.0 the Shell is built on kookie-ui-v2's model, behind v1's API:\n *\n * - The Root is a CSS grid and renders its children as given, in JSX order.\n * Each pane claims its own grid area, so the Root never scans or reorders\n * children, any child renders, and a pane mounted after the Root works.\n * - State lives on each pane: `auto` (untouched), `open` or `closed`. An\n * untouched pane follows the window, resolved by the\n * stylesheet, so first paint needs no script and no open-state callback\n * fires on mount or on a resize.\n * - A pane is one element at every width. `overlay` is a posture of that\n * element, not a Sheet swapped in: crossing a breakpoint keeps its scroll\n * position, its focus and its children's state.\n * - The Root owns what an overlay needs: one scrim, `inert` on everything\n * else, focus moved in and returned, Escape, and a scroll lock.\n * - Nothing links panes to each other. A Rail closing no longer closes the\n * Panel; an app that wants that writes it in `onOpenChange`.\n */\n'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { PaneResizeContext } from './_internal/shell-resize.js';\nimport { PaneHandle, PanelHandle } from './_internal/shell-handles.js';\nimport { Sidebar } from './_internal/shell-sidebar.js';\nimport { Bottom } from './_internal/shell-bottom.js';\nimport { Inspector } from './_internal/shell-inspector.js';\nimport { usePane, paneAttributes, usePresentationTable } from './_internal/shell-pane.js';\nimport { splitHandles, useResizablePane } from './_internal/shell-resizable.js';\nimport {\n FIXED_TABLE,\n ShellInsetContext,\n ShellStoreContext,\n createShellStore,\n setShellPeek,\n subscribeShellStore,\n useInsetRegistration,\n usePaneEntry,\n useShellStore,\n warnOnce,\n type InsetPaneId,\n} from './_internal/shell-store.js';\nimport { navigationRest, detailRest, toPaneValue, startAnchoredGrowth, withoutRemovedPaneProps } from './_internal/shell-rest.js';\nimport { useShell, useSidebarMode } from './shell.context.js';\nimport { useResponsivePresentation } from './shell.hooks.js';\nimport { readBreakpoint } from '../hooks/use-breakpoint.js';\nimport { PaneChromeScope, PaneFooter, PaneHeader, Scroll, ShellSizeContext } from './_internal/pane-chrome.js';\nimport type { PaneSize } from './_internal/pane-chrome.js';\nimport type { Breakpoint, CSSPropertiesWithVars, PaneBaseProps, PaneMode, PaneName, PaneTarget, ResponsivePresentation, SidebarMode } from './shell.types.js';\n\n/* \u2500\u2500 Root \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nexport interface ShellRootProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n height?: 'full' | 'auto' | string | number;\n /** The index the panes' chrome takes: `Shell.PaneHeader`, `Shell.Scroll`, `Shell.PaneFooter` and the Sidebar rows in them. Default `2`. */\n size?: PaneSize;\n}\n\n/**\n * Every Shell with a live overlay holds the page still, counted across Shells,\n * through an attribute the stylesheet reads. Saving and restoring the\n * document's inline `overflow` would fight any other scroll lock on the page.\n */\nlet pageLockHolders = 0;\nfunction updatePageLock(delta: 1 | -1) {\n pageLockHolders = Math.max(0, pageLockHolders + delta);\n const doc = document.documentElement;\n if (pageLockHolders > 0) doc.setAttribute('data-rt-shell-lock', '');\n else doc.removeAttribute('data-rt-shell-lock');\n}\n\n/** Marks a child the Root made inert, so closing removes only what the Root added. */\nconst INERT_MARK = 'data-rt-shell-inert';\n\n/** How many frames a focus rescue watches after an overlay opens or closes. */\nconst RESCUE_FRAMES = 30;\n\n/** Focus that is nowhere useful: the document, or nothing at all. */\nfunction isNowhere(doc: Document, el: Element | EventTarget | null): boolean {\n return el === null || el === doc || el === doc.body || el === doc.documentElement;\n}\n\n/** A Trigger that drives the pane with this id and can take focus, optionally only inside `within`. */\nfunction triggerFor(doc: Document, id: string, within?: HTMLElement[]): HTMLElement | null {\n for (const el of doc.querySelectorAll<HTMLElement>('[data-shell-trigger][aria-controls]')) {\n if (el.getAttribute('aria-controls') !== id || el.closest('[inert]')) continue;\n if (within && !within.some((pane) => pane.contains(el))) continue;\n return el;\n }\n return null;\n}\n\ntype LivePane = { name: PaneName; id: string; el: HTMLElement };\n\nconst Root = React.forwardRef<HTMLDivElement, ShellRootProps>(({ className, children, height = 'full', size = '2', style, onKeyDown, onFocus, ...props }, ref) => {\n const [store] = React.useState(createShellStore);\n const subscribe = React.useCallback((listener: () => void) => subscribeShellStore(store, listener), [store]);\n // Subscribed for the re-render, not for a value: a pane opening or closing\n // must bring the Root back so containment and the scrim follow it.\n React.useSyncExternalStore(\n subscribe,\n () => store.version,\n () => 0,\n );\n\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const composedRef = useComposedRefs(ref, rootRef);\n\n // Inset: the Root paints the backdrop while any pane is inset.\n const [insetPanes, setInsetPanes] = React.useState<ReadonlySet<InsetPaneId>>(() => new Set());\n const registerInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => (prev.has(id) ? prev : new Set(prev).add(id)));\n }, []);\n const unregisterInset = React.useCallback((id: InsetPaneId) => {\n setInsetPanes((prev) => {\n if (!prev.has(id)) return prev;\n const next = new Set(prev);\n next.delete(id);\n return next;\n });\n }, []);\n const insetContext = React.useMemo(() => ({ registerInset, unregisterInset }), [registerInset, unregisterInset]);\n\n const closeOverlays = React.useCallback(() => {\n for (const entry of store.entries.values()) {\n if (entry.overlayLive) entry.setValue('closed', 'dismiss');\n }\n }, [store]);\n\n const livePanes = React.useCallback(\n (): LivePane[] => [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).map((entry) => ({ name: entry.name, id: entry.id, el: entry.el as HTMLElement })),\n [store],\n );\n const liveCount = [...store.entries.values()].filter((entry) => entry.overlayLive && entry.el).length;\n\n // A Shell given a height of its own sits inside a page, and its overlays\n // cover only its box: it holds no page lock. `full` is the page, and\n // `auto` grows with its content, so its overlays are placed on the window.\n const contained = height !== 'full' && height !== 'auto';\n\n /*\n * Containment is the Root's, not the pane's. Only the Root can see every live\n * overlay and every child at once. A per-pane effect, given two overlays,\n * inerts the other live overlay and restores values the other effect wrote,\n * which can leave the whole frame inert for good.\n *\n * Exempt are the scrim and each root child that CONTAINS a live overlay, so\n * a pane wrapped in a plain element is not inerted with its wrapper. A child\n * the Root inerts is marked, and closing clears only marked children, so\n * `inert` the app sets on a child is the app's before, during and after.\n */\n const contain = React.useCallback(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const liveEls = livePanes().map((pane) => pane.el);\n for (const child of rootEl.children) {\n if (!(child instanceof HTMLElement) || child.classList.contains('rt-ShellScrim')) continue;\n const holdsLive = liveEls.some((el) => child === el || child.contains(el));\n if (liveEls.length === 0 || holdsLive) {\n if (child.hasAttribute(INERT_MARK)) {\n child.removeAttribute(INERT_MARK);\n child.inert = false;\n }\n } else if (!child.inert) {\n child.setAttribute(INERT_MARK, '');\n child.inert = true;\n }\n }\n }, [livePanes]);\n\n const returnFocusTo = React.useRef<HTMLElement | null>(null);\n const lastLive = React.useRef<LivePane[]>([]);\n const lastFocusInRoot = React.useRef<HTMLElement | null>(null);\n const holdsLock = React.useRef(false);\n\n /*\n * Focus can be taken away after the commit that moved it: a menu that\n * opened or closed a pane restores focus to its own trigger when it\n * finishes closing, which may be inert or hidden by then. For a few frames\n * after an overlay opens or closes, focus that ends up nowhere useful is\n * put back where it belongs.\n */\n const rescueFrame = React.useRef(0);\n const cancelRescue = React.useCallback(() => {\n if (rescueFrame.current) cancelAnimationFrame(rescueFrame.current);\n rescueFrame.current = 0;\n }, []);\n const rescueFocus = React.useCallback(\n (target: HTMLElement, lost: (active: Element | null) => boolean) => {\n cancelRescue();\n let frames = 0;\n const tick = () => {\n rescueFrame.current = 0;\n if (!target.isConnected) return;\n if (lost(target.ownerDocument.activeElement)) {\n target.focus({ preventScroll: true });\n return;\n }\n frames += 1;\n if (frames < RESCUE_FRAMES) rescueFrame.current = requestAnimationFrame(tick);\n };\n rescueFrame.current = requestAnimationFrame(tick);\n },\n [cancelRescue],\n );\n\n React.useEffect(\n () => () => {\n cancelRescue();\n if (holdsLock.current) {\n holdsLock.current = false;\n updatePageLock(-1);\n }\n },\n [cancelRescue],\n );\n\n // No dependency array, on purpose: a pane opening or closing is a render\n // of this component, and so is a child appearing through the Root.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl) return;\n const doc = rootEl.ownerDocument;\n const live = livePanes();\n const liveEls = live.map((pane) => pane.el);\n\n const wantsLock = !contained && live.length > 0;\n if (wantsLock !== holdsLock.current) {\n holdsLock.current = wantsLock;\n updatePageLock(wantsLock ? 1 : -1);\n }\n\n const previous = lastLive.current;\n lastLive.current = live;\n // A pane that left the live set because it closed, as opposed to one\n // that is still open but stopped being an overlay at a breakpoint.\n const closed = previous.filter((pane) => {\n if (liveEls.includes(pane.el)) return false;\n const entry = store.entries.get(pane.name);\n return !pane.el.isConnected || !entry || entry.el !== pane.el || entry.value === 'closed';\n });\n const inClosed = (active: Element | null) => active !== null && closed.some((pane) => pane.el.contains(active));\n\n // The return target is taken on the opening edge, before inerting: inerting\n // the subtree that holds the trigger blurs it. Focus already inside the\n // overlay (a pane that became one at a breakpoint) is no place to return\n // to, and an opener in a portal (a menu item) goes away with its menu, so\n // the last place focus held inside the frame stands in for it.\n if (previous.length === 0 && live.length > 0) {\n const active = doc.activeElement;\n let target = active instanceof HTMLElement && !isNowhere(doc, active) && !liveEls.some((el) => el.contains(active)) ? active : null;\n if (target && !rootEl.contains(target)) {\n const inRoot = lastFocusInRoot.current;\n if (inRoot && inRoot.isConnected && !liveEls.some((el) => el.contains(inRoot))) target = inRoot;\n }\n returnFocusTo.current = target;\n }\n\n contain();\n\n if (live.length === 0) {\n const before = returnFocusTo.current;\n returnFocusTo.current = null;\n // Every overlay that left only stopped being one: focus stays where it is.\n if (closed.length === 0) return;\n const usable = (el: HTMLElement | null) => el !== null && el.isConnected && !el.closest('[inert]') && !inClosed(el);\n let target = usable(before) ? before : null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id);\n if (!target) return;\n const lost = (active: Element | null) => isNowhere(doc, active) || inClosed(active);\n if (lost(doc.activeElement)) target.focus({ preventScroll: true });\n else rescueFocus(target, lost);\n return;\n }\n\n // Some overlays closed while others stay: focus left in a closed one goes\n // to the Trigger that opened it, if a live pane holds it, or to the pane\n // on top.\n if (closed.length > 0) {\n const active = doc.activeElement;\n if (isNowhere(doc, active) || inClosed(active)) {\n let target: HTMLElement | null = null;\n for (const pane of closed) target ??= triggerFor(doc, pane.id, liveEls);\n (target ?? liveEls[liveEls.length - 1]).focus({ preventScroll: true });\n }\n }\n\n // Focus moves in on the opening edge and nowhere else, and only when it\n // is not already somewhere the user put it inside the live set.\n const opened = liveEls.filter((el) => !previous.some((pane) => pane.el === el));\n const active = doc.activeElement;\n if (opened.length > 0 && !liveEls.some((el) => el.contains(active))) {\n opened[0].focus({ preventScroll: true });\n rescueFocus(opened[0], (now) => isNowhere(doc, now) || (now instanceof Element && now.closest('[inert]') !== null));\n }\n });\n\n // A child that appears through its own state while an overlay is live does\n // not render the Root, so the Root watches its children while one is.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0 || typeof MutationObserver === 'undefined') return;\n const observer = new MutationObserver(contain);\n observer.observe(rootEl, { childList: true, subtree: true, attributes: true, attributeFilter: ['inert'] });\n return () => observer.disconnect();\n }, [liveCount, contain]);\n\n /*\n * Escape closes the overlays. It is handled as a React event on the Root, so\n * a component inside a pane that answers Escape in its own onKeyDown runs\n * first, and its preventDefault() or stopPropagation() keeps the pane open.\n * When the Root closes something it stops the event there, so a React\n * Escape handler above the Shell does not act on it too. A layer that\n * listens on the document in the capture phase (Radix dialogs, menus and\n * popovers) answers first and calls preventDefault() when it closes, so an\n * enclosing Kookie Dialog closes before a Shell inside it is asked.\n */\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.key !== 'Escape' || event.defaultPrevented || liveCount === 0) return;\n closeOverlays();\n event.stopPropagation();\n };\n\n // With focus on the document itself (a pane closed under it, or a menu that\n // closed and took focus with it), the Root never sees the key. While an\n // overlay is live the document answers that one case.\n React.useEffect(() => {\n const rootEl = rootRef.current;\n if (!rootEl || liveCount === 0) return;\n const doc = rootEl.ownerDocument;\n const onDocumentKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || event.defaultPrevented || !isNowhere(doc, event.target)) return;\n closeOverlays();\n };\n doc.addEventListener('keydown', onDocumentKeyDown);\n return () => doc.removeEventListener('keydown', onDocumentKeyDown);\n }, [liveCount, closeOverlays]);\n\n const handleFocus = (event: React.FocusEvent<HTMLDivElement>) => {\n onFocus?.(event);\n if (event.target instanceof HTMLElement && rootRef.current?.contains(event.target)) lastFocusInRoot.current = event.target;\n };\n\n // A floating Panel sits beside the Rail when the Rail is showing, and\n // beside its card when the Rail is inset.\n const rail = store.entries.get('rail');\n const railShown = rail !== undefined && rail.value !== undefined && rail.value !== 'closed';\n const railOffset = railShown ? (insetPanes.has('rail') ? `calc(${rail.size}px + 2 * var(--shell-inset-gap))` : `${rail.size}px`) : undefined;\n\n // `full` writes no inline height: the stylesheet states it as 100vh with a\n // 100dvh override where supported, and an inline value would beat both.\n const heightStyle: React.CSSProperties = height === 'full' ? {} : height === 'auto' ? { height: 'auto' } : typeof height === 'number' ? { height: `${height}px` } : { height };\n\n return (\n <ShellStoreContext.Provider value={store}>\n <ShellSizeContext.Provider value={size}>\n <ShellInsetContext.Provider value={insetContext}>\n {/* The Root is not a widget: it hears Escape bubbling up from the panes,\n after their own handlers, to close the overlays. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n {...props}\n ref={composedRef}\n className={classNames('rt-ShellRoot', className)}\n data-height={height === 'auto' ? 'auto' : undefined}\n data-has-inset={insetPanes.size > 0 || undefined}\n data-overlay-live={liveCount > 0 || undefined}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n style={{ ...heightStyle, ...(railOffset ? ({ '--shell-rail-offset': railOffset } as CSSPropertiesWithVars) : {}), ...style }}\n >\n {children}\n {/* Root-owned and always mounted. The stylesheet shows it while an\n overlay is live; containment takes the rest of the frame out of\n the accessibility tree, so the scrim itself is hidden from it. */}\n <div className=\"rt-ShellScrim\" aria-hidden onClick={closeOverlays} />\n </div>\n </ShellInsetContext.Provider>\n </ShellSizeContext.Provider>\n </ShellStoreContext.Provider>\n );\n});\nRoot.displayName = 'Shell.Root';\n\n/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellHeaderProps extends React.ComponentPropsWithoutRef<'header'> {\n height?: number;\n}\n\nconst Header = React.forwardRef<HTMLElement, ShellHeaderProps>(({ className, height = 64, style, ...props }, ref) => (\n <header\n {...props}\n ref={ref}\n className={classNames('rt-ShellHeader', className)}\n style={\n {\n ...style,\n '--shell-header-height': `${height}px`,\n } as CSSPropertiesWithVars\n }\n />\n));\nHeader.displayName = 'Shell.Header';\n\n/* \u2500\u2500 Left (deprecated) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface LeftProps extends React.ComponentPropsWithoutRef<'div'> {\n presentation?: ResponsivePresentation;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean, meta: { reason: 'init' | 'toggle' | 'panel' | 'responsive' | 'dismiss' }) => void;\n collapsible?: boolean;\n onExpand?: () => void;\n onCollapse?: () => void;\n inset?: boolean;\n}\n\n/**\n * @deprecated The Root no longer wraps the Rail and Panel in a Left\n * container: each is its own pane. `Shell.Left` renders its children and\n * ignores its own props. Removed in 1.0.\n */\nconst Left = React.forwardRef<HTMLDivElement, LeftProps>(({ children }, _ref) => {\n React.useEffect(() => {\n warnOnce('Shell.Left is deprecated and is removed in 1.0. Render Shell.Rail and Shell.Panel directly in Shell.Root.');\n }, []);\n return <>{children}</>;\n});\nLeft.displayName = 'Shell.Left';\n\n/* \u2500\u2500 Rail \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype RailOpenChangeMeta = { reason: 'init' | 'toggle' | 'responsive' | 'panel' | 'dismiss' };\n\ntype RailControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; defaultOpen?: never };\ntype RailUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: RailOpenChangeMeta) => void; open?: never };\n\ntype RailProps = React.ComponentPropsWithoutRef<'div'> & {\n presentation?: ResponsivePresentation;\n expandedSize?: number;\n collapsible?: boolean;\n /** @deprecated Use `onOpenChange`. */\n onExpand?: () => void;\n /** @deprecated Use `onOpenChange`. */\n onCollapse?: () => void;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n} & (RailControlledProps | RailUncontrolledProps);\n\nconst RAIL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\nconst Rail = React.forwardRef<HTMLDivElement, RailProps>((props, ref) => {\n const { className, presentation, expandedSize = 64, collapsible: _collapsible, onExpand, onCollapse, children, style, open, defaultOpen, onOpenChange, inset, id, ...domProps } = props;\n const { table, attributes } = usePresentationTable(presentation, 'fixed');\n const pane = usePane({\n name: 'rail',\n label: 'Rail',\n propNames: RAIL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable: table,\n builtIn: navigationRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('rail', inset);\n const composedRef = useComposedRefs(ref, pane.setElement);\n\n return (\n <div\n {...domProps}\n id={pane.id}\n ref={composedRef}\n className={classNames('rt-ShellPane', 'rt-ShellRail', className)}\n {...paneAttributes(pane, attributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={{ ...style, '--rail-size': `${expandedSize}px` } as CSSPropertiesWithVars}\n >\n <RailContent>{children}</RailContent>\n </div>\n );\n});\nRail.displayName = 'Shell.Rail';\n\n/** The Rail's content carries the index, so the thin row styles can size themselves by it. */\nfunction RailContent({ children }: { children: React.ReactNode }) {\n const size = React.useContext(ShellSizeContext);\n return (\n <div className={classNames('rt-ShellRailContent', `rt-r-size-${size}`)}>\n <PaneChromeScope presentation=\"thin\">{children}</PaneChromeScope>\n </div>\n );\n}\n\n/* \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype HandleComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<'div'> & React.RefAttributes<HTMLDivElement>>;\n\ntype PanelOpenChangeMeta = { reason: 'toggle' | 'left' | 'init' | 'responsive' | 'dismiss' };\ntype PanelControlledProps = { open: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; defaultOpen?: never };\ntype PanelUncontrolledProps = { defaultOpen?: boolean | Partial<Record<Breakpoint, boolean>>; onOpenChange?: (open: boolean, meta: PanelOpenChangeMeta) => void; open?: never };\n\ntype PanelSizeControlledProps = { size: number | string; defaultSize?: never };\ntype PanelSizeUncontrolledProps = { defaultSize?: number | string; size?: never };\n\ntype PanelSizeChangeMeta = { reason: 'init' | 'resize' | 'controlled' };\ntype PanelPublicProps = PaneBaseProps &\n (PanelControlledProps | PanelUncontrolledProps) &\n (PanelSizeControlledProps | PanelSizeUncontrolledProps) & {\n onSizeChange?: (size: number, meta: PanelSizeChangeMeta) => void;\n sizeUpdate?: 'throttle' | 'debounce';\n sizeUpdateMs?: number;\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n };\ntype PanelComponent = React.ForwardRefExoticComponent<PanelPublicProps & React.RefAttributes<HTMLDivElement>> & {\n Handle: HandleComponent;\n};\n\nconst PANEL_PROP_NAMES = { controlled: 'open', default: 'defaultOpen' };\n\n/**\n * A Panel with a `presentation` of its own uses it. One without follows the\n * Rail rendered before it, which is how 0.7 placed a Panel; the stylesheet\n * reads the Rail's attributes for the first paint and the registry carries\n * the Rail's table for the JS mirror.\n */\nconst Panel = React.forwardRef<HTMLDivElement, PanelPublicProps>((props, ref) => {\n const {\n className,\n presentation,\n defaultOpen,\n open,\n onOpenChange,\n size,\n defaultSize,\n expandedSize = 288,\n minSize = 100,\n maxSize = 800,\n resizable = false,\n collapsible = true,\n onExpand,\n onCollapse,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n children,\n style,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs = 50,\n inset,\n id,\n ...domProps\n } = props;\n const store = useShellStore('Shell.Panel');\n const rail = usePaneEntry(store, 'rail');\n const own = usePresentationTable(presentation, 'fixed');\n const followsRail = presentation === undefined;\n const presentationTable = followsRail ? (rail?.presentationTable ?? FIXED_TABLE) : own.table;\n const presentationAttributes = followsRail ? { 'data-presentation-follows': '' } : own.attributes;\n\n const pane = usePane({\n name: 'panel',\n label: 'Panel',\n propNames: PANEL_PROP_NAMES,\n id,\n controlled: toPaneValue(open),\n defaultValue: toPaneValue(defaultOpen),\n presentationTable,\n builtIn: detailRest,\n onChange: (value, reason) => onOpenChange?.(value !== 'closed', { reason }),\n onExpand,\n onCollapse,\n size: expandedSize,\n });\n useInsetRegistration('panel', inset);\n\n React.useEffect(() => {\n if (snapPoints !== undefined || collapseThreshold !== undefined || paneId !== undefined || persistence !== undefined) {\n warnOnce('Shell.Panel: `snapPoints`, `collapseThreshold`, `paneId` and `persistence` are deprecated and are removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n }\n }, [snapPoints, collapseThreshold, paneId, persistence]);\n\n const elementRef = React.useRef<HTMLElement | null>(null);\n const composedRef = useComposedRefs(ref, pane.setElement, elementRef);\n\n const resize = useResizablePane({\n name: 'panel',\n elementId: pane.id,\n elementRef,\n cssVarName: '--panel-size',\n orientation: 'vertical',\n edge: 'end',\n growth: startAnchoredGrowth,\n expandedSize,\n minSize,\n maxSize,\n resizable,\n collapsible,\n size,\n defaultSize,\n onSizeChange,\n sizeUpdate,\n sizeUpdateMs,\n onResize,\n onResizeStart,\n onResizeEnd,\n snapPoints,\n snapTolerance,\n collapseThreshold,\n paneId,\n persistence,\n overlaying: pane.overlaying,\n // Asked when the effect runs: the Rail registers its table after this\n // Panel first renders, so the render's answer can be out of date.\n overlayingNow: () => {\n const table = followsRail ? (store.entries.get('rail')?.presentationTable ?? FIXED_TABLE) : own.table;\n return table[readBreakpoint()] === 'overlay';\n },\n requestCollapse: () => pane.setValue('closed', 'toggle'),\n requestToggle: () => pane.toggle('toggle'),\n });\n\n const { handles, content } = splitHandles(children, PanelHandle);\n const handle = resizable && pane.shown !== false && !pane.overlaying ? <PaneResizeContext.Provider value={resize}>{handles.length > 0 ? handles : <PaneHandle />}</PaneResizeContext.Provider> : null;\n\n return (\n <div\n {...withoutRemovedPaneProps(domProps)}\n id={pane.id}\n ref={composedRef}\n className={classNames('rt-ShellPane', 'rt-ShellPanel', className)}\n {...paneAttributes(pane, presentationAttributes)}\n data-inset={inset || undefined}\n tabIndex={pane.overlaying ? -1 : domProps.tabIndex}\n style={\n {\n ...style,\n '--panel-expanded-size': `${expandedSize}px`,\n } as CSSPropertiesWithVars\n }\n >\n <div className=\"rt-ShellPanelContent\">\n <PaneChromeScope>{content}</PaneChromeScope>\n </div>\n {handle}\n </div>\n );\n}) as PanelComponent;\nPanel.displayName = 'Shell.Panel';\nPanel.Handle = PanelHandle;\n\n/* \u2500\u2500 Content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ninterface ShellContentProps extends React.ComponentPropsWithoutRef<'main'> {\n /** When true, adds margin and triggers the gray backdrop on the Shell. */\n inset?: boolean;\n}\n\nconst Content = React.forwardRef<HTMLElement, ShellContentProps>(({ className, inset, ...props }, ref) => {\n useInsetRegistration('content', inset);\n return <main {...props} ref={ref} className={classNames('rt-ShellContent', className)} data-inset={inset || undefined} />;\n});\nContent.displayName = 'Shell.Content';\n\n/* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\ntype TriggerAction = 'toggle' | 'expand' | 'collapse';\n\ninterface TriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n target: PaneTarget;\n action?: TriggerAction;\n /**\n * Whether to show a preview of the target pane on hover while it is closed\n * and not an overlay. Defaults to false.\n *\n * @deprecated Removed in 1.0. A preview reachable only by mouse hover has no\n * keyboard or touch equivalent; open the pane instead.\n */\n peekOnHover?: boolean;\n}\n\n/**\n * A button that drives a pane by name, through the registry. It sets\n * `aria-controls` and `aria-expanded` (left off while an untouched pane\n * cannot know its state yet), renders `type=\"button\"`, and runs the\n * consumer's `onClick` first: calling `preventDefault()` there cancels it.\n */\nconst Trigger = React.forwardRef<HTMLButtonElement, TriggerProps>(({ target, action = 'toggle', peekOnHover, onClick, onMouseEnter, onMouseLeave, children, ...props }, ref) => {\n const store = useShellStore('Shell.Trigger');\n React.useEffect(() => {\n if (target === 'left') warnOnce('Shell.Trigger target=\"left\" is deprecated and is removed in 1.0. Use target=\"rail\".');\n if (peekOnHover) warnOnce('Shell.Trigger: `peekOnHover` is deprecated and is removed in 1.0.');\n }, [target, peekOnHover]);\n const name: PaneName = target === 'left' ? 'rail' : target;\n // Subscribes to its own pane only.\n const entry = usePaneEntry(store, name);\n const shown = entry?.value === undefined ? undefined : entry.value !== 'closed';\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented) return;\n const current = store.entries.get(name);\n if (!current) return;\n if (store.peek === name) setShellPeek(store, null);\n if (action === 'toggle') current.toggle('toggle');\n else if (action === 'expand') current.setValue('open', 'toggle');\n else current.setValue('closed', 'toggle');\n };\n\n const handleMouseEnter = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseEnter?.(event);\n if (!peekOnHover) return;\n const current = store.entries.get(name);\n if (current && current.value === 'closed' && current.presentation !== 'overlay') setShellPeek(store, name);\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n onMouseLeave?.(event);\n if (peekOnHover && store.peek === name) setShellPeek(store, null);\n };\n\n return (\n <button\n // A button's default type is `submit`. Stated before the spread, so a consumer's own wins.\n type=\"button\"\n aria-controls={entry?.id}\n aria-expanded={shown}\n {...props}\n ref={ref}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-shell-trigger={target}\n data-shell-action={action}\n >\n {children}\n </button>\n );\n});\nTrigger.displayName = 'Shell.Trigger';\n\n// Exports\nexport {\n Root,\n Header,\n Left,\n Rail,\n Panel,\n Sidebar,\n Content,\n Inspector,\n Bottom,\n Trigger,\n PaneHeader,\n PaneFooter,\n Scroll,\n useShell,\n useSidebarMode,\n useResponsivePresentation,\n type PaneMode,\n type SidebarMode,\n type ResponsivePresentation,\n type PaneTarget,\n type TriggerAction,\n};\n"],
|
|
5
|
-
"mappings": "ouBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,GAAA,YAAAC,GAAA,WAAAC,GAAA,cAAAC,GAAA,SAAAC,GAAA,eAAAC,GAAA,eAAAC,GAAA,UAAAC,GAAA,SAAAC,GAAA,SAAAC,GAAA,WAAAC,GAAA,YAAAC,GAAA,YAAAC,GAAA,8BAAAC,GAAA,aAAAC,GAAA,mBAAAC,KAsBA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,mBAAAC,OAAuB,oBA2ChC,IAAIC,GAAkB,EACtB,SAASC,GAAeC,EAAe,CACrCF,GAAkB,KAAK,IAAI,EAAGA,GAAkBE,CAAK,EACrD,IAAMC,EAAM,SAAS,gBACjBH,GAAkB,EAAGG,EAAI,aAAa,qBAAsB,EAAE,EAC7DA,EAAI,gBAAgB,oBAAoB,CAC/C,CAGA,IAAMC,GAAa,sBAGbC,GAAgB,GAGtB,SAASC,EAAUH,EAAeI,EAA2C,CAC3E,OAAOA,IAAO,MAAQA,IAAOJ,GAAOI,IAAOJ,EAAI,MAAQI,IAAOJ,EAAI,eACpE,CAGA,SAASK,GAAWL,EAAeM,EAAYC,EAA4C,CACzF,QAAWH,KAAMJ,EAAI,iBAA8B,qCAAqC,EACtF,GAAI,EAAAI,EAAG,aAAa,eAAe,IAAME,GAAMF,EAAG,QAAQ,SAAS,IAC/D,EAAAG,GAAU,CAACA,EAAO,KAAMC,GAASA,EAAK,SAASJ,CAAE,CAAC,GACtD,OAAOA,EAET,OAAO,IACT,CAIA,IAAMK,GAAa,aAA2C,CAAC,C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A,EAAQ,eAAiB,WAAWC,EAAavI,EAAOmI,CAAI,CAC3G,EAEMM,EAAoBzF,GAA+C,CACvEkF,IAAelF,CAAK,EAChB+E,GAAe/H,EAAM,OAASmI,GAAMI,EAAavI,EAAO,IAAI,CAClE,EAEA,OACE,gBAAC,UAEC,KAAK,SACL,gBAAegB,GAAO,GACtB,gBAAeoH,EACd,GAAGtI,EACJ,IAAKC,EACL,QAASsI,EACT,aAAcG,EACd,aAAcC,EACd,qBAAoBzG,EACpB,oBAAmB8F,GAElBtI,CACH,CAEJ,CAAC,EACDqI,GAAQ,YAAc",
|
|
6
|
-
"names": ["shell_exports", "__export", "Bottom", "Content", "Header", "Inspector", "Left", "PaneFooter", "PaneHeader", "Panel", "Rail", "Root", "Scroll", "Sidebar", "Trigger", "useResponsivePresentation", "useShell", "useSidebarMode", "React", "classNames", "useComposedRefs", "pageLockHolders", "updatePageLock", "delta", "doc", "INERT_MARK", "RESCUE_FRAMES", "isNowhere", "el", "triggerFor", "id", "within", "pane", "Root", "className", "children", "height", "size", "style", "onKeyDown", "onFocus", "props", "ref", "store", "createShellStore", "subscribe", "listener", "subscribeShellStore", "rootRef", "composedRef", "useComposedRefs", "insetPanes", "setInsetPanes", "registerInset", "prev", "unregisterInset", "next", "insetContext", "closeOverlays", "entry", "livePanes", "liveCount", "contained", "contain", "rootEl", "liveEls", "child", "holdsLive", "returnFocusTo", "lastLive", "lastFocusInRoot", "holdsLock", "rescueFrame", "cancelRescue", "rescueFocus", "target", "lost", "frames", "tick", "live", "wantsLock", "previous", "closed", "inClosed", "active", "inRoot", "before", "opened", "now", "observer", "handleKeyDown", "event", "onDocumentKeyDown", "handleFocus", "rail", "railOffset", "heightStyle", "ShellStoreContext", "ShellSizeContext", "ShellInsetContext", "classNames", "Header", "Left", "_ref", "RAIL_PROP_NAMES", "Rail", "presentation", "expandedSize", "_collapsible", "onExpand", "onCollapse", "open", "defaultOpen", "onOpenChange", "inset", "domProps", "table", "attributes", "usePresentationTable", "usePane", "toPaneValue", "navigationRest", "value", "reason", "useInsetRegistration", "paneAttributes", "RailContent", "PaneChromeScope", "PANEL_PROP_NAMES", "Panel", "defaultSize", "minSize", "maxSize", "resizable", "collapsible", "onResize", "onResizeStart", "onResizeEnd", "snapPoints", "snapTolerance", "collapseThreshold", "paneId", "persistence", "onSizeChange", "sizeUpdate", "sizeUpdateMs", "useShellStore", "usePaneEntry", "own", "followsRail", "presentationTable", "FIXED_TABLE", "presentationAttributes", "detailRest", "elementRef", "resize", "useResizablePane", "startAnchoredGrowth", "readBreakpoint", "handles", "content", "splitHandles", "PanelHandle", "handle", "PaneResizeContext", "PaneHandle", "withoutRemovedPaneProps", "Content", "Trigger", "action", "peekOnHover", "onClick", "onMouseEnter", "onMouseLeave", "name", "shown", "handleClick", "current", "setShellPeek", "handleMouseEnter", "handleMouseLeave"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as te,b as re}from"./chunk-BUEYZEAY.js";import{a as z,b as oe,c as O}from"./chunk-MAI7FEU7.js";import{b as Z,c as ee}from"./chunk-IX5HIHVI.js";import{a as Y}from"./chunk-MJJ7XDIP.js";import{b as U,c as X}from"./chunk-2HUAVZZL.js";import{a as Q}from"./chunk-AGAQC4HH.js";import{c as J}from"./chunk-FWB47YCH.js";import{a as D}from"./chunk-UBSLEGQZ.js";import{a as _}from"./chunk-GSTOGDAJ.js";import{a as Te}from"./chunk-OS3FCYZY.js";var Me={};Te(Me,{Content:()=>fe,Empty:()=>Pe,Group:()=>Re,Input:()=>xe,Item:()=>ye,Label:()=>he,List:()=>ge,Root:()=>ue,Separator:()=>ve,Trigger:()=>de,Value:()=>Ce});import*as e from"react";import u from"classnames";import{Popover as ne}from"radix-ui";import{useCallbackRef as G,useComposedRefs as le,useControllableState as B,useLayoutEffect as H}from"radix-ui/internal";import{Command as I,useCommandState as ae}from"cmdk";var Ie={size:z.size},Ne={size:O.size},se=new Set;function Le(o){se.has(o)||(se.add(o),console.warn(o))}function we(o){let r=o,t=new Set;return{get:()=>r,set:n=>{Object.is(n,r)||(r=n,t.forEach(a=>a()))},subscribe:n=>(t.add(n),()=>{t.delete(n)})}}var ie=e.createContext(null),M=o=>{let r=e.useContext(ie);if(!r)throw new Error(`Combobox.${o} must be used within Combobox.Root`);return r},me=e.createContext(null),ce=e.createContext(null),be=e.createContext(null),pe=()=>e.useContext(be);function De(o){let r=o.getAttribute("aria-label")?.trim();if(r)return r;let t=o.getAttribute("aria-labelledby");if(t){let a=t.split(/\s+/).map(s=>o.ownerDocument.getElementById(s)?.textContent?.trim()).filter(Boolean).join(" ");if(a)return a}let n=o.labels;if(n&&n.length>0){let a=Array.from(n).map(s=>s.textContent?.trim()).filter(Boolean).join(" ");if(a)return a}}var ue=o=>{let{children:r,size:t=z.size.default,value:n,defaultValue:a=null,onValueChange:s,open:i,defaultOpen:d=!1,onOpenChange:m,placeholder:c="Select an option",searchPlaceholder:C="Search...",searchValue:f,defaultSearchValue:S="",onSearchValueChange:P,filter:R,shouldFilter:p=!0,loop:b=!0,disabled:x,resetSearchOnSelect:y=!0,resetSearchOnClose:g=!0,color:V,displayValue:h,...T}=o,[E,v]=B({prop:i,defaultProp:d,onChange:m}),[l,W]=B({prop:n,defaultProp:a,onChange:s}),[j,N]=B({prop:f,defaultProp:S,onChange:P}),K=typeof h=="function"?h(l):h,[L]=e.useState(()=>we(l));H(()=>{L.set(l)},[L,l]);let k=G(w=>{v(w),!w&&g&&N("")}),q=G(w=>{W(w),v(!1),y&&N("")}),F=e.useRef(null),$=e.useCallback(()=>F.current?De(F.current):void 0,[]),Se=e.useMemo(()=>({value:l,displayValue:K,setOpen:k,size:t,placeholder:c,searchPlaceholder:C,disabled:x,color:V,loop:b,shouldFilter:p,filter:R,triggerRef:F,getTriggerLabel:$}),[l,K,k,t,c,C,x,V,b,p,R,$]),Ve=e.useMemo(()=>({value:j,setValue:N}),[j,N]),Ee=e.useMemo(()=>({store:L,onSelect:q,disabled:x}),[L,q,x]);return e.createElement(ie.Provider,{value:Se},e.createElement(me.Provider,{value:Ve},e.createElement(ce.Provider,{value:Ee},e.createElement(te,{open:E,onOpenChange:k,...T},r))))};ue.displayName="Combobox.Root";var de=e.forwardRef((o,r)=>{let t=M("Trigger"),{children:n,className:a,placeholder:s,disabled:i,readOnly:d,error:m,loading:c,color:C,radius:f,onClick:S,onKeyDown:P,type:R,...p}=D({size:t.size,...o},Ie,oe,_),b=i??t.disabled,x=C??t.color,y=!!(d||c),g=t.value==null&&t.displayValue==null,V=le(r,t.triggerRef),{getTriggerLabel:h}=t;e.useEffect(()=>{},[h]);let T=l=>{S?.(l),y&&l.preventDefault()},E=l=>{P?.(l),!(l.defaultPrevented||y||b)&&l.key==="ArrowDown"&&(l.preventDefault(),t.setOpen(!0))},v=e.createElement(e.Fragment,null,e.createElement("span",{className:"rt-SelectTriggerInner"},e.createElement("span",{className:"rt-ComboboxValue"},t.displayValue??t.value??s??t.placeholder)),c?e.createElement("div",{className:"rt-SelectIcon rt-SelectLoadingIcon","aria-hidden":"true"},e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e.createElement("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"32",className:"rt-SelectLoadingIconCircle"}))):e.createElement(ee,{className:"rt-SelectIcon"}));return e.createElement(re,{disabled:b},e.createElement("button",{"data-accent-color":x,"data-radius":f,"data-error":m,"data-loading":c,"data-disabled":b||void 0,"data-read-only":d||void 0,"data-placeholder":g?"":void 0,...p,role:"combobox","aria-disabled":b||void 0,"aria-readonly":d||void 0,"aria-invalid":m||void 0,"aria-busy":c||void 0,type:R??"button",disabled:b,onClick:T,onKeyDown:E,ref:V,className:u("rt-reset","rt-SelectTrigger","rt-ComboboxTrigger",a)},n?Y(n):v))});de.displayName="Combobox.Trigger";var Ce=e.forwardRef(({placeholder:o,children:r,className:t,...n},a)=>{let s=M("Value"),i=s.displayValue??s.value??void 0;return e.createElement("span",{...n,ref:a,className:u("rt-ComboboxValue",t)},i??r??o??s.placeholder)});Ce.displayName="Combobox.Value";function Oe(){let o=ae(a=>a.filtered.count),r=ae(a=>a.search),[t,n]=e.useState("");return e.useEffect(()=>{let a=r?o===0?"No results":`${o} result${o===1?"":"s"}`:"",s=window.setTimeout(()=>n(a),r?400:0);return()=>window.clearTimeout(s)},[o,r]),e.createElement(Q,{role:"status","aria-live":"polite","aria-atomic":"true"},t)}var fe=e.forwardRef((o,r)=>{let t=M("Content"),n=U(),a=t.size==="4"?"3":t.size,s=o.size??a??O.size.default,{className:i,children:d,color:m,forceMount:c,container:C,onOpenAutoFocus:f,"aria-label":S,"aria-labelledby":P,...R}=D({...o,size:s},O),p=m||t.color||n.accentColor,{getTriggerLabel:b}=t,[x,y]=e.useState(b);H(()=>{if(x!==void 0)return;let v=b();v!==void 0&&y(v)},[b,x]);let g=o["aria-label"]??x,V=e.useMemo(()=>({sizeClassName:D({size:s},Ne).className||void 0,color:p,label:g}),[s,p,g]),h=e.useRef(null),T=v=>{if(f?.(v),v.defaultPrevented)return;let l=h.current;if(!l||l.querySelector("[cmdk-input]"))return;v.preventDefault(),(l.querySelector("[cmdk-list]")??l).focus({preventScroll:!0})},E=t.value?.trim()||void 0;return e.createElement(ne.Portal,{container:C,forceMount:c?!0:void 0},e.createElement(X,{asChild:!0},e.createElement(ne.Content,{"data-accent-color":p,align:"start",sideOffset:4,collisionPadding:10,"aria-label":P?void 0:g,"aria-labelledby":P,...R,forceMount:c?!0:void 0,onOpenAutoFocus:T,ref:r,className:u("rt-PopperContent","rt-BaseMenuContent","rt-variant-soft","rt-ComboboxContent",i)},e.createElement(be.Provider,{value:V},e.createElement(I,{ref:h,loop:t.loop,shouldFilter:t.shouldFilter,filter:t.filter,label:g,defaultValue:E,className:"rt-ComboboxCommand"},d,e.createElement(Oe,null))))))});fe.displayName="Combobox.Content";var xe=e.forwardRef(({className:o,startAdornment:r,endAdornment:t,placeholder:n,variant:a,value:s,onValueChange:i,...d},m)=>{let c=M("Input"),C=e.useContext(me),f=pe(),S=a??"soft",P=s??C?.value??"",R=i??C?.setValue,p=e.createElement("div",{className:u("rt-TextFieldRoot","rt-ComboboxInputRoot",f?.sizeClassName,`rt-variant-${S}`),"data-accent-color":f?.color},r?e.createElement("div",{className:"rt-TextFieldSlot"},r):null,e.createElement(I.Input,{...d,ref:m,value:P,onValueChange:R,placeholder:n??c.searchPlaceholder,className:u("rt-reset","rt-TextFieldInput",o)}),t?e.createElement("div",{className:"rt-TextFieldSlot","data-side":"right"},t):null);return f?e.createElement("div",{className:"rt-ComboboxSearch"},p):p});xe.displayName="Combobox.Input";var ge=e.forwardRef(({className:o,children:r,label:t,...n},a)=>{let s=pe();return e.createElement("div",{className:"rt-ComboboxScrollArea"},e.createElement("div",{className:u("rt-BaseMenuViewport","rt-ComboboxViewport")},e.createElement(I.List,{...n,label:t??s?.label,ref:a,className:u("rt-ComboboxList",o)},r)))});ge.displayName="Combobox.List";var Pe=e.forwardRef(({className:o,...r},t)=>e.createElement(I.Empty,{...r,ref:t,className:u("rt-ComboboxEmpty",o)}));Pe.displayName="Combobox.Empty";var Re=e.forwardRef(({className:o,...r},t)=>e.createElement(I.Group,{...r,ref:t,className:u("rt-BaseMenuGroup","rt-ComboboxGroup",o)}));Re.displayName="Combobox.Group";var he=e.forwardRef(({className:o,id:r,...t},n)=>{let a=e.useId(),s=r??a,i=e.useRef(null),d=le(n,i);return H(()=>{let m=i.current?.closest("[cmdk-group-items]");if(!(!m||m.hasAttribute("aria-labelledby")))return m.setAttribute("aria-labelledby",s),()=>{m.getAttribute("aria-labelledby")===s&&m.removeAttribute("aria-labelledby")}},[s]),e.createElement("div",{...t,id:s,ref:d,className:u("rt-BaseMenuLabel","rt-ComboboxLabel",o)})});he.displayName="Combobox.Label";var ve=e.forwardRef(({className:o,...r},t)=>e.createElement(I.Separator,{...r,ref:t,className:u("rt-BaseMenuSeparator","rt-ComboboxSeparator",o)}));ve.displayName="Combobox.Separator";function A(o){return o==null||typeof o=="boolean"?"":typeof o=="string"||typeof o=="number"?String(o):Array.isArray(o)?o.map(A).join(""):e.isValidElement(o)?A(o.props.children):""}var ye=e.forwardRef(({className:o,children:r,label:t,value:n,disabled:a,onSelect:s,keywords:i,...d},m)=>{let c=e.useContext(ce);if(!c)throw new Error("Combobox.Item must be used within Combobox.Root");let{store:C,onSelect:f,disabled:S}=c,P=n??(typeof r=="string"?r.trim():void 0),R=()=>P!==void 0&&C.get()===P,p=e.useSyncExternalStore(C.subscribe,R,R),b=G(s),x=e.useCallback(T=>{let E=n??T;f(E),b(E)},[n,f,b]),y=(t??A(r)).replace(/\s+/g," ").trim(),g=y?i?[y,...i]:[y]:i,V=g?g.join("\0"):"",h=a??S??!1;return e.createElement(I.Item,{key:V,...d,value:n,keywords:g,"aria-checked":p,disabled:h||void 0,ref:m,onSelect:x,className:u("rt-reset","rt-BaseMenuItem","rt-ComboboxItem",o)},p?e.createElement("span",{className:u("rt-BaseMenuItemIndicator","rt-ComboboxItemIndicator")},e.createElement(Z,{className:u("rt-BaseMenuItemIndicatorIcon","rt-ComboboxItemIndicatorIcon")})):null,e.createElement(J,null,r))});ye.displayName="Combobox.Item";export{ue as a,de as b,Ce as c,fe as d,xe as e,ge as f,Pe as g,Re as h,he as i,ve as j,ye as k,Me as l};
|
|
2
|
-
//# sourceMappingURL=chunk-OMUUPPJO.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/combobox.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\n/**\n * Combobox: Radix Popover for positioning, dismissal and focus; cmdk for search,\n * filtering and keyboard navigation.\n *\n * Render path. State is split so an interaction re-renders only what reads it:\n * - `ComboboxContext` (Trigger, Value, Content): config and the selected value.\n * Open state is not in it, so opening and closing re-render no consumer.\n * - `ComboboxSearchContext` (Input only): the search text.\n * - `ComboboxItemContext` (Items): stable values only. Items read \"am I selected\"\n * from a store through `useSyncExternalStore`, so a selection re-renders the old\n * and the new selected item, not all N.\n *\n * Highlight. cmdk's `data-selected` is the single highlight source, driven by both\n * the pointer and the keyboard. There is no separate CSS `:hover` highlight, so two\n * items are never lit at once and Enter always picks the lit item.\n */\n\nimport { warnDeprecated } from '../helpers/warn-deprecated.js';\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\nimport { useCallbackRef, useComposedRefs, useControllableState, useLayoutEffect } from 'radix-ui/internal';\nimport { Command as CommandPrimitive, useCommandState } from 'cmdk';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { comboboxRootPropDefs, comboboxTriggerPropDefs, comboboxContentPropDefs } from './combobox.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { ChevronDownIcon, ThickCheckIcon } from './icons.js';\nimport { Theme, useThemeContext } from './theme.js';\nimport { requireReactElement } from '../helpers/require-react-element.js';\nimport * as Popover from './popover.js';\nimport { Slottable } from './slot.js';\nimport { VisuallyHidden } from './visually-hidden.js';\n\nimport type { textFieldRootPropDefs } from './text-field.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TextFieldVariant = (typeof textFieldRootPropDefs.variant.values)[number];\ntype ComboboxValue = string | null;\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\n\n// Hoisted so extractProps' compiled prop-def cache (keyed by object identity) hits.\nconst triggerSizingPropDefs = { size: comboboxRootPropDefs.size };\nconst contentSizePropDefs = { size: comboboxContentPropDefs.size };\n\nconst warned = new Set<string>();\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n// ============================================================================\n// Selection store\n// ============================================================================\n\ninterface SelectionStore {\n get: () => ComboboxValue;\n set: (value: ComboboxValue) => void;\n subscribe: (listener: () => void) => () => void;\n}\n\nfunction createSelectionStore(initial: ComboboxValue): SelectionStore {\n let current = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => current,\n set: (next) => {\n if (Object.is(next, current)) return;\n current = next;\n listeners.forEach((listener) => listener());\n },\n subscribe: (listener) => {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n },\n };\n}\n\n// ============================================================================\n// Contexts\n// ============================================================================\n\ninterface ComboboxContextValue {\n value: ComboboxValue;\n displayValue?: string;\n setOpen: (open: boolean) => void;\n size?: ComboboxRootOwnProps['size'];\n placeholder?: string;\n searchPlaceholder?: string;\n disabled?: boolean;\n color?: string;\n loop: boolean;\n shouldFilter: boolean;\n filter?: CommandFilter;\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n /** Reads the trigger's accessible name from the DOM (aria-label, aria-labelledby or <label>). */\n getTriggerLabel: () => string | undefined;\n}\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | null>(null);\n\nconst useComboboxContext = (componentName: string) => {\n const ctx = React.useContext(ComboboxContext);\n if (!ctx) {\n throw new Error(`Combobox.${componentName} must be used within Combobox.Root`);\n }\n return ctx;\n};\n\ninterface ComboboxSearchContextValue {\n value: string;\n setValue: (value: string) => void;\n}\n\nconst ComboboxSearchContext = React.createContext<ComboboxSearchContextValue | null>(null);\n\ninterface ComboboxItemContextValue {\n store: SelectionStore;\n onSelect: (value: string) => void;\n disabled?: boolean;\n}\n\nconst ComboboxItemContext = React.createContext<ComboboxItemContextValue | null>(null);\n\n/** Values resolved by Content and read by Input and List. */\ninterface ComboboxContentContextValue {\n sizeClassName?: string;\n color?: string;\n label?: string;\n}\n\nconst ComboboxContentContext = React.createContext<ComboboxContentContextValue | null>(null);\n\nconst useComboboxContentContext = () => React.useContext(ComboboxContentContext);\n\n// ============================================================================\n// Root\n// ============================================================================\n\ntype ComboboxRootOwnProps = GetPropDefTypes<typeof comboboxRootPropDefs> & {\n value?: ComboboxValue;\n defaultValue?: ComboboxValue;\n onValueChange?: (value: ComboboxValue) => void;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n placeholder?: string;\n searchPlaceholder?: string;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n filter?: CommandFilter;\n shouldFilter?: boolean;\n loop?: boolean;\n disabled?: boolean;\n /** Clear the search text when an option is selected. Defaults to true. */\n resetSearchOnSelect?: boolean;\n /** Clear the search text when the popup is dismissed without a selection. Defaults to true. */\n resetSearchOnClose?: boolean;\n color?: (typeof comboboxTriggerPropDefs.color.values)[number];\n /**\n * Text shown in the trigger for the selected value. Without it the raw value is shown.\n * Can be a string or a function that receives the current value. Pass a stable\n * function (module scope or `useCallback`): an inline function runs on every render.\n * @example displayValue={(v) => items.find(i => i.value === v)?.label}\n */\n displayValue?: string | ((value: ComboboxValue) => string | undefined);\n};\n\ntype PopoverRootProps = React.ComponentPropsWithoutRef<typeof Popover.Root>;\ninterface ComboboxRootProps extends PopoverRootProps, ComboboxRootOwnProps {}\n\nfunction readElementLabel(el: HTMLElement): string | undefined {\n const ariaLabel = el.getAttribute('aria-label')?.trim();\n if (ariaLabel) return ariaLabel;\n\n const labelledBy = el.getAttribute('aria-labelledby');\n if (labelledBy) {\n const text = labelledBy\n .split(/\\s+/)\n .map((id) => el.ownerDocument.getElementById(id)?.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n const labels = (el as HTMLButtonElement).labels;\n if (labels && labels.length > 0) {\n const text = Array.from(labels)\n .map((label) => label.textContent?.trim())\n .filter(Boolean)\n .join(' ');\n if (text) return text;\n }\n\n return undefined;\n}\n\nconst ComboboxRoot: React.FC<ComboboxRootProps> = (props) => {\n const {\n children,\n size = comboboxRootPropDefs.size.default,\n value: valueProp,\n defaultValue = null,\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n placeholder = 'Select an option',\n searchPlaceholder = 'Search...',\n searchValue: searchValueProp,\n defaultSearchValue = '',\n onSearchValueChange,\n filter,\n shouldFilter = true,\n loop = true,\n disabled,\n resetSearchOnSelect = true,\n resetSearchOnClose = true,\n color,\n displayValue: displayValueProp,\n ...rootProps\n } = props;\n\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n const [value, setValue] = useControllableState<ComboboxValue>({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n const [searchValue, setSearchValue] = useControllableState<string>({\n prop: searchValueProp,\n defaultProp: defaultSearchValue,\n onChange: onSearchValueChange,\n });\n\n const resolvedDisplayValue = typeof displayValueProp === 'function' ? displayValueProp(value) : displayValueProp;\n\n // Items subscribe to this store instead of the context, so a selection\n // re-renders only the items whose selected state flips.\n const [store] = React.useState(() => createSelectionStore(value));\n useLayoutEffect(() => {\n store.set(value);\n }, [store, value]);\n\n // The radix setters change identity whenever their controlled prop changes.\n // Reading them through callback refs keeps these handlers stable, so the\n // contexts below do not change on every keystroke or selection.\n const handleOpenChange = useCallbackRef((nextOpen: boolean) => {\n setOpen(nextOpen);\n if (!nextOpen && resetSearchOnClose) setSearchValue('');\n });\n\n const onSelect = useCallbackRef((nextValue: string) => {\n setValue(nextValue);\n setOpen(false);\n if (resetSearchOnSelect) setSearchValue('');\n });\n\n const triggerRef = React.useRef<HTMLButtonElement | null>(null);\n const getTriggerLabel = React.useCallback(() => (triggerRef.current ? readElementLabel(triggerRef.current) : undefined), []);\n\n const contextValue = React.useMemo<ComboboxContextValue>(\n () => ({\n value,\n displayValue: resolvedDisplayValue,\n setOpen: handleOpenChange,\n size,\n placeholder,\n searchPlaceholder,\n disabled,\n color,\n loop,\n shouldFilter,\n filter,\n triggerRef,\n getTriggerLabel,\n }),\n [value, resolvedDisplayValue, handleOpenChange, size, placeholder, searchPlaceholder, disabled, color, loop, shouldFilter, filter, getTriggerLabel],\n );\n\n const searchContextValue = React.useMemo<ComboboxSearchContextValue>(() => ({ value: searchValue, setValue: setSearchValue }), [searchValue, setSearchValue]);\n\n const itemContextValue = React.useMemo<ComboboxItemContextValue>(() => ({ store, onSelect, disabled }), [store, onSelect, disabled]);\n\n return (\n <ComboboxContext.Provider value={contextValue}>\n <ComboboxSearchContext.Provider value={searchContextValue}>\n <ComboboxItemContext.Provider value={itemContextValue}>\n <Popover.Root open={open} onOpenChange={handleOpenChange} {...rootProps}>\n {children}\n </Popover.Root>\n </ComboboxItemContext.Provider>\n </ComboboxSearchContext.Provider>\n </ComboboxContext.Provider>\n );\n};\nComboboxRoot.displayName = 'Combobox.Root';\n\n// ============================================================================\n// Trigger\n// ============================================================================\n\ntype ComboboxTriggerElement = HTMLButtonElement;\ntype ComboboxTriggerOwnProps = GetPropDefTypes<typeof comboboxTriggerPropDefs>;\ntype NativeTriggerProps = Omit<React.ComponentPropsWithoutRef<'button'>, 'color'>;\ninterface ComboboxTriggerProps extends NativeTriggerProps, MarginProps, ComboboxTriggerOwnProps {}\n\nconst ComboboxTrigger = React.forwardRef<ComboboxTriggerElement, ComboboxTriggerProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Trigger');\n\n const {\n children,\n className,\n placeholder,\n disabled,\n readOnly,\n error,\n loading,\n color,\n radius,\n onClick,\n onKeyDown,\n type: buttonType,\n ...triggerProps\n } = extractProps({ size: ctx.size, ...props }, triggerSizingPropDefs, comboboxTriggerPropDefs, marginPropDefs);\n\n const isDisabled = disabled ?? ctx.disabled;\n const resolvedColor = color ?? ctx.color;\n // Read-only and loading triggers stay focusable but do not open.\n const isBlocked = Boolean(readOnly || loading);\n const isPlaceholder = ctx.value == null && ctx.displayValue == null;\n\n const composedRef = useComposedRefs(forwardedRef, ctx.triggerRef);\n\n const { getTriggerLabel } = ctx;\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (!getTriggerLabel()) {\n warnOnce(\n 'Combobox.Trigger has no accessible name. The combobox role does not take its name from its content. Add `aria-label`, `aria-labelledby`, or a `<label htmlFor>` that points at the trigger.',\n );\n }\n }, [getTriggerLabel]);\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n // Radix skips its open toggle when the event is default-prevented.\n if (isBlocked) event.preventDefault();\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isBlocked || isDisabled) return;\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n ctx.setOpen(true);\n }\n };\n\n const defaultContent = (\n <>\n <span className=\"rt-SelectTriggerInner\">\n <span className=\"rt-ComboboxValue\">{ctx.displayValue ?? ctx.value ?? placeholder ?? ctx.placeholder}</span>\n </span>\n {loading ? (\n <div className=\"rt-SelectIcon rt-SelectLoadingIcon\" aria-hidden=\"true\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"7\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeDasharray=\"32\"\n strokeDashoffset=\"32\"\n className=\"rt-SelectLoadingIconCircle\"\n />\n </svg>\n </div>\n ) : (\n <ChevronDownIcon className=\"rt-SelectIcon\" />\n )}\n </>\n );\n\n // Radix Popover.Trigger supplies aria-expanded, aria-controls (the popup id) and\n // aria-haspopup=\"dialog\", which matches the Popover dialog this opens.\n return (\n <Popover.Trigger disabled={isDisabled}>\n <button\n data-accent-color={resolvedColor}\n data-radius={radius}\n data-error={error}\n data-loading={loading}\n data-disabled={isDisabled || undefined}\n data-read-only={readOnly || undefined}\n data-placeholder={isPlaceholder ? '' : undefined}\n {...triggerProps}\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props -- Popover.Trigger (Slot) adds aria-expanded and aria-controls\n role=\"combobox\"\n aria-disabled={isDisabled || undefined}\n aria-readonly={readOnly || undefined}\n aria-invalid={error || undefined}\n aria-busy={loading || undefined}\n type={buttonType ?? 'button'}\n disabled={isDisabled}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n ref={composedRef}\n className={classNames('rt-reset', 'rt-SelectTrigger', 'rt-ComboboxTrigger', className)}\n >\n {children ? requireReactElement(children) : defaultContent}\n </button>\n </Popover.Trigger>\n );\n});\nComboboxTrigger.displayName = 'Combobox.Trigger';\n\n// ============================================================================\n// Value (standalone, for custom trigger layouts)\n// ============================================================================\n\ntype ComboboxValueElement = HTMLSpanElement;\ninterface ComboboxValueProps extends React.ComponentPropsWithoutRef<'span'> {\n placeholder?: string;\n}\n\nconst ComboboxValue = React.forwardRef<ComboboxValueElement, ComboboxValueProps>(({ placeholder, children, className, ...valueProps }, forwardedRef) => {\n const ctx = useComboboxContext('Value');\n const display = ctx.displayValue ?? ctx.value ?? undefined;\n return (\n <span {...valueProps} ref={forwardedRef} className={classNames('rt-ComboboxValue', className)}>\n {display ?? children ?? placeholder ?? ctx.placeholder}\n </span>\n );\n});\nComboboxValue.displayName = 'Combobox.Value';\n\n// ============================================================================\n// Content\n// ============================================================================\n\ntype ComboboxContentElement = React.ElementRef<typeof PopoverPrimitive.Content>;\ntype ComboboxContentOwnProps = GetPropDefTypes<typeof comboboxContentPropDefs> & {\n container?: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Portal>['container'];\n};\ninterface ComboboxContentProps extends Omit<ComponentPropsWithout<typeof PopoverPrimitive.Content, RemovedProps>, 'size'>, ComboboxContentOwnProps {}\n\n/** Announces the filtered result count to screen readers after typing settles. */\nfunction ComboboxAnnouncer() {\n const count = useCommandState((state) => state.filtered.count);\n const search = useCommandState((state) => state.search);\n const [message, setMessage] = React.useState('');\n\n React.useEffect(() => {\n const next = !search ? '' : count === 0 ? 'No results' : `${count} result${count === 1 ? '' : 's'}`;\n const timeout = window.setTimeout(() => setMessage(next), search ? 400 : 0);\n return () => window.clearTimeout(timeout);\n }, [count, search]);\n\n return (\n <VisuallyHidden role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {message}\n </VisuallyHidden>\n );\n}\n\nconst ComboboxContent = React.forwardRef<ComboboxContentElement, ComboboxContentProps>((props, forwardedRef) => {\n const ctx = useComboboxContext('Content');\n const themeContext = useThemeContext();\n\n // Menus stop at size 3; a size 4 field opens a size 3 list.\n const rootSize = ctx.size === '4' ? '3' : ctx.size;\n const size = props.size ?? rootSize ?? comboboxContentPropDefs.size.default;\n\n const {\n className,\n children,\n color,\n forceMount,\n container,\n onOpenAutoFocus,\n 'aria-label': _ariaLabel,\n 'aria-labelledby': ariaLabelledByProp,\n ...contentProps\n } = extractProps({ ...props, size }, comboboxContentPropDefs);\n\n const resolvedColor = color || ctx.color || themeContext.accentColor;\n\n\n // The trigger's name labels the popup, the search field and the listbox.\n // Read once per mount (the content remounts on every open); fall back to a\n // layout effect when the trigger was not attached yet (defaultOpen, forceMount).\n const { getTriggerLabel } = ctx;\n const [triggerLabel, setTriggerLabel] = React.useState(getTriggerLabel);\n useLayoutEffect(() => {\n if (triggerLabel !== undefined) return;\n const label = getTriggerLabel();\n if (label !== undefined) setTriggerLabel(label);\n }, [getTriggerLabel, triggerLabel]);\n\n const label = props['aria-label'] ?? triggerLabel;\n\n const contentContextValue = React.useMemo<ComboboxContentContextValue>(\n () => ({\n // Responsive-aware size class for the search field (never String() a responsive object).\n sizeClassName: extractProps({ size }, contentSizePropDefs).className || undefined,\n color: resolvedColor,\n label,\n }),\n [size, resolvedColor, label],\n );\n\n const commandRef = React.useRef<HTMLDivElement>(null);\n\n // Without a search field, focus would land on the popup itself, outside cmdk's\n // keydown handler. Focus the listbox instead so arrow keys and Enter work.\n const handleOpenAutoFocus = (event: Event) => {\n onOpenAutoFocus?.(event);\n if (event.defaultPrevented) return;\n const command = commandRef.current;\n if (!command || command.querySelector('[cmdk-input]')) return;\n event.preventDefault();\n const list = command.querySelector<HTMLElement>('[cmdk-list]');\n (list ?? command).focus({ preventScroll: true });\n };\n\n // Start the highlight on the selected option (cmdk trims item values).\n const initialHighlight = ctx.value?.trim() || undefined;\n\n return (\n <PopoverPrimitive.Portal container={container} forceMount={forceMount ? true : undefined}>\n <Theme asChild>\n <PopoverPrimitive.Content\n data-accent-color={resolvedColor}\n align=\"start\"\n sideOffset={4}\n collisionPadding={10}\n aria-label={ariaLabelledByProp ? undefined : label}\n aria-labelledby={ariaLabelledByProp}\n {...contentProps}\n forceMount={forceMount ? true : undefined}\n onOpenAutoFocus={handleOpenAutoFocus}\n ref={forwardedRef}\n className={classNames('rt-PopperContent', 'rt-BaseMenuContent',\n 'rt-variant-soft', 'rt-ComboboxContent', className)}\n >\n <ComboboxContentContext.Provider value={contentContextValue}>\n <CommandPrimitive\n ref={commandRef}\n loop={ctx.loop}\n shouldFilter={ctx.shouldFilter}\n filter={ctx.filter}\n label={label}\n defaultValue={initialHighlight}\n className=\"rt-ComboboxCommand\"\n >\n {children}\n <ComboboxAnnouncer />\n </CommandPrimitive>\n </ComboboxContentContext.Provider>\n </PopoverPrimitive.Content>\n </Theme>\n </PopoverPrimitive.Portal>\n );\n});\nComboboxContent.displayName = 'Combobox.Content';\n\n// ============================================================================\n// Input\n// ============================================================================\n\ntype ComboboxInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ninterface ComboboxInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'onValueChange'> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n variant?: TextFieldVariant;\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst ComboboxInput = React.forwardRef<ComboboxInputElement, ComboboxInputProps>(\n ({ className, startAdornment, endAdornment, placeholder, variant: inputVariant, value, onValueChange, ...inputProps }, forwardedRef) => {\n const ctx = useComboboxContext('Input');\n const search = React.useContext(ComboboxSearchContext);\n const contentContext = useComboboxContentContext();\n\n const textFieldVariant = inputVariant ?? 'soft';\n\n // The search text lives in Root; only this component subscribes to it.\n const searchValue = value ?? search?.value ?? '';\n const handleSearchChange = onValueChange ?? search?.setValue;\n\n const inputField = (\n <div\n className={classNames('rt-TextFieldRoot', 'rt-ComboboxInputRoot', contentContext?.sizeClassName, `rt-variant-${textFieldVariant}`)}\n data-accent-color={contentContext?.color}\n >\n {startAdornment ? <div className=\"rt-TextFieldSlot\">{startAdornment}</div> : null}\n <CommandPrimitive.Input\n {...inputProps}\n ref={forwardedRef}\n value={searchValue}\n onValueChange={handleSearchChange}\n placeholder={placeholder ?? ctx.searchPlaceholder}\n className={classNames('rt-reset', 'rt-TextFieldInput', className)}\n />\n {endAdornment ? (\n <div className=\"rt-TextFieldSlot\" data-side=\"right\">\n {endAdornment}\n </div>\n ) : null}\n </div>\n );\n\n return contentContext ? <div className=\"rt-ComboboxSearch\">{inputField}</div> : inputField;\n },\n);\nComboboxInput.displayName = 'Combobox.Input';\n\n// ============================================================================\n// List\n// ============================================================================\n\ntype ComboboxListElement = React.ElementRef<typeof CommandPrimitive.List>;\ninterface ComboboxListProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.List> {}\n\n// cmdk's List owns its id (referenced by the input's aria-controls), role and\n// aria-label (set from `label`), so none of them are overridden here.\nconst ComboboxList = React.forwardRef<ComboboxListElement, ComboboxListProps>(({ className, children, label, ...listProps }, forwardedRef) => {\n const contentContext = useComboboxContentContext();\n return (\n <div className=\"rt-ComboboxScrollArea\">\n <div className={classNames('rt-BaseMenuViewport', 'rt-ComboboxViewport')}>\n <CommandPrimitive.List {...listProps} label={label ?? contentContext?.label} ref={forwardedRef} className={classNames('rt-ComboboxList', className)}>\n {children}\n </CommandPrimitive.List>\n </div>\n </div>\n );\n});\nComboboxList.displayName = 'Combobox.List';\n\n// ============================================================================\n// Empty\n// ============================================================================\n\ntype ComboboxEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ninterface ComboboxEmptyProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty> {}\n\nconst ComboboxEmpty = React.forwardRef<ComboboxEmptyElement, ComboboxEmptyProps>(({ className, ...emptyProps }, forwardedRef) => (\n <CommandPrimitive.Empty {...emptyProps} ref={forwardedRef} className={classNames('rt-ComboboxEmpty', className)} />\n));\nComboboxEmpty.displayName = 'Combobox.Empty';\n\n// ============================================================================\n// Group\n// ============================================================================\n\ntype ComboboxGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ninterface ComboboxGroupProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group> {}\n\nconst ComboboxGroup = React.forwardRef<ComboboxGroupElement, ComboboxGroupProps>(({ className, ...groupProps }, forwardedRef) => (\n <CommandPrimitive.Group {...groupProps} ref={forwardedRef} className={classNames('rt-BaseMenuGroup', 'rt-ComboboxGroup', className)} />\n));\nComboboxGroup.displayName = 'Combobox.Group';\n\n// ============================================================================\n// Label\n// ============================================================================\n\ntype ComboboxLabelElement = React.ElementRef<'div'>;\ninterface ComboboxLabelProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst ComboboxLabel = React.forwardRef<ComboboxLabelElement, ComboboxLabelProps>(({ className, id: idProp, ...labelProps }, forwardedRef) => {\n const generatedId = React.useId();\n const id = idProp ?? generatedId;\n const localRef = React.useRef<HTMLDivElement>(null);\n const composedRef = useComposedRefs(forwardedRef, localRef);\n\n // cmdk renders the group's role=\"group\" element itself and gives no way to\n // label it from a child, so name it after this label when inside a Group.\n useLayoutEffect(() => {\n const group = localRef.current?.closest('[cmdk-group-items]');\n if (!group || group.hasAttribute('aria-labelledby')) return;\n group.setAttribute('aria-labelledby', id);\n return () => {\n if (group.getAttribute('aria-labelledby') === id) group.removeAttribute('aria-labelledby');\n };\n }, [id]);\n\n return <div {...labelProps} id={id} ref={composedRef} className={classNames('rt-BaseMenuLabel', 'rt-ComboboxLabel', className)} />;\n});\nComboboxLabel.displayName = 'Combobox.Label';\n\n// ============================================================================\n// Separator\n// ============================================================================\n\ntype ComboboxSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ninterface ComboboxSeparatorProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> {}\n\nconst ComboboxSeparator = React.forwardRef<ComboboxSeparatorElement, ComboboxSeparatorProps>(({ className, ...separatorProps }, forwardedRef) => (\n <CommandPrimitive.Separator {...separatorProps} ref={forwardedRef} className={classNames('rt-BaseMenuSeparator', 'rt-ComboboxSeparator', className)} />\n));\nComboboxSeparator.displayName = 'Combobox.Separator';\n\n// ============================================================================\n// Item\n// ============================================================================\n\n/** Plain text of a React node tree, used as the item's search text. */\nfunction getNodeText(node: React.ReactNode): string {\n if (node == null || typeof node === 'boolean') return '';\n if (typeof node === 'string' || typeof node === 'number') return String(node);\n if (Array.isArray(node)) return node.map(getNodeText).join('');\n if (React.isValidElement<{ children?: React.ReactNode }>(node)) return getNodeText(node.props.children);\n return '';\n}\n\ntype ComboboxItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ninterface ComboboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, 'keywords' | 'onSelect'> {\n /**\n * Text matched by search. Defaults to the text of `children`. Set it when the\n * children are components whose text is not in the JSX (it cannot be read).\n */\n label?: string;\n /** Additional keywords for search filtering. */\n keywords?: string[];\n /** Called when the item is selected. */\n onSelect?: (value: string) => void;\n}\n\nconst ComboboxItem = React.forwardRef<ComboboxItemElement, ComboboxItemProps>(\n ({ className, children, label, value, disabled, onSelect, keywords, ...itemProps }, forwardedRef) => {\n const itemContext = React.useContext(ComboboxItemContext);\n if (!itemContext) {\n throw new Error('Combobox.Item must be used within Combobox.Root');\n }\n const { store, onSelect: onSelectFromRoot, disabled: rootDisabled } = itemContext;\n\n // Without `value`, cmdk uses the trimmed text of string children.\n const itemValue = value ?? (typeof children === 'string' ? children.trim() : undefined);\n const getIsSelected = () => itemValue !== undefined && store.get() === itemValue;\n const isSelected = React.useSyncExternalStore(store.subscribe, getIsSelected, getIsSelected);\n\n const onSelectProp = useCallbackRef(onSelect);\n // cmdk passes its resolved value (the `value` prop, or the text when `value` is omitted).\n const handleSelect = React.useCallback(\n (resolvedValue: string) => {\n const nextValue = value ?? resolvedValue;\n onSelectFromRoot(nextValue);\n onSelectProp(nextValue);\n },\n [value, onSelectFromRoot, onSelectProp],\n );\n\n // cmdk matches only `value` and `keywords`, so add the visible text as a keyword.\n const text = (label ?? getNodeText(children)).replace(/\\s+/g, ' ').trim();\n const searchKeywords = text ? (keywords ? [text, ...keywords] : [text]) : keywords;\n // cmdk stores keywords only when `value` changes. Remount the cmdk item when\n // they change so a new label or keyword list is picked up.\n const keywordsKey = searchKeywords ? searchKeywords.join('\u0000') : '';\n\n const isDisabled = disabled ?? rootDisabled ?? false;\n\n return (\n <CommandPrimitive.Item\n key={keywordsKey}\n {...itemProps}\n value={value}\n keywords={searchKeywords}\n // cmdk owns aria-selected (the highlighted option); the chosen option is aria-checked.\n aria-checked={isSelected}\n disabled={isDisabled || undefined}\n ref={forwardedRef}\n onSelect={handleSelect}\n className={classNames('rt-reset', 'rt-BaseMenuItem', 'rt-ComboboxItem', className)}\n >\n {isSelected ? (\n <span className={classNames('rt-BaseMenuItemIndicator', 'rt-ComboboxItemIndicator')}>\n <ThickCheckIcon className={classNames('rt-BaseMenuItemIndicatorIcon', 'rt-ComboboxItemIndicatorIcon')} />\n </span>\n ) : null}\n <Slottable>{children}</Slottable>\n </CommandPrimitive.Item>\n );\n },\n);\nComboboxItem.displayName = 'Combobox.Item';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n ComboboxRoot as Root,\n ComboboxTrigger as Trigger,\n ComboboxValue as Value,\n ComboboxContent as Content,\n ComboboxInput as Input,\n ComboboxList as List,\n ComboboxEmpty as Empty,\n ComboboxGroup as Group,\n ComboboxLabel as Label,\n ComboboxSeparator as Separator,\n ComboboxItem as Item,\n};\n\nexport type {\n ComboboxRootProps as RootProps,\n ComboboxTriggerProps as TriggerProps,\n ComboboxValueProps as ValueProps,\n ComboboxContentProps as ContentProps,\n ComboboxInputProps as InputProps,\n ComboboxListProps as ListProps,\n ComboboxEmptyProps as EmptyProps,\n ComboboxGroupProps as GroupProps,\n ComboboxLabelProps as LabelProps,\n ComboboxSeparatorProps as SeparatorProps,\n ComboboxItemProps as ItemProps,\n};\n"],
|
|
5
|
-
"m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AgC,8BAA8B,EAAG,CACzG,EACE,KACJ,gBAACyE,EAAA,KAAW9I,CAAS,CACvB,CAEJ,CACF,EACA+H,GAAa,YAAc",
|
|
6
|
-
"names": ["combobox_exports", "__export", "ComboboxContent", "ComboboxEmpty", "ComboboxGroup", "ComboboxInput", "ComboboxItem", "ComboboxLabel", "ComboboxList", "ComboboxRoot", "ComboboxSeparator", "ComboboxTrigger", "ComboboxValue", "React", "classNames", "PopoverPrimitive", "useCallbackRef", "useComposedRefs", "useControllableState", "useLayoutEffect", "CommandPrimitive", "useCommandState", "triggerSizingPropDefs", "comboboxRootPropDefs", "contentSizePropDefs", "comboboxContentPropDefs", "warned", "warnOnce", "message", "createSelectionStore", "initial", "current", "listeners", "next", "listener", "ComboboxContext", "useComboboxContext", "componentName", "ctx", "ComboboxSearchContext", "ComboboxItemContext", "ComboboxContentContext", "useComboboxContentContext", "readElementLabel", "el", "ariaLabel", "labelledBy", "text", "id", "labels", "label", "ComboboxRoot", "props", "children", "size", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "placeholder", "searchPlaceholder", "searchValueProp", "defaultSearchValue", "onSearchValueChange", "filter", "shouldFilter", "loop", "disabled", "resetSearchOnSelect", "resetSearchOnClose", "color", "displayValueProp", "rootProps", "open", "setOpen", "useControllableState", "value", "setValue", "searchValue", "setSearchValue", "resolvedDisplayValue", "store", "useLayoutEffect", "handleOpenChange", "useCallbackRef", "nextOpen", "onSelect", "nextValue", "triggerRef", "getTriggerLabel", "contextValue", "searchContextValue", "itemContextValue", "PopoverRoot", "ComboboxTrigger", "forwardedRef", "className", "readOnly", "error", "loading", "radius", "onClick", "onKeyDown", "buttonType", "triggerProps", "extractProps", "comboboxTriggerPropDefs", "marginPropDefs", "isDisabled", "resolvedColor", "isBlocked", "isPlaceholder", "composedRef", "useComposedRefs", "handleClick", "event", "handleKeyDown", "defaultContent", "ChevronDownIcon", "PopoverTrigger", "classNames", "requireReactElement", "ComboboxValue", "valueProps", "display", "ComboboxAnnouncer", "count", "useCommandState", "state", "search", "setMessage", "timeout", "VisuallyHidden", "ComboboxContent", "themeContext", "useThemeContext", "rootSize", "forceMount", "container", "onOpenAutoFocus", "_ariaLabel", "ariaLabelledByProp", "contentProps", "triggerLabel", "setTriggerLabel", "contentContextValue", "commandRef", "handleOpenAutoFocus", "command", "initialHighlight", "PopoverPrimitive", "Theme", "CommandPrimitive", "ComboboxInput", "startAdornment", "endAdornment", "inputVariant", "inputProps", "contentContext", "textFieldVariant", "handleSearchChange", "inputField", "ComboboxList", "listProps", "ComboboxEmpty", "emptyProps", "ComboboxGroup", "groupProps", "ComboboxLabel", "idProp", "labelProps", "generatedId", "localRef", "group", "ComboboxSeparator", "separatorProps", "getNodeText", "node", "ComboboxItem", "keywords", "itemProps", "itemContext", "onSelectFromRoot", "rootDisabled", "itemValue", "getIsSelected", "isSelected", "onSelectProp", "handleSelect", "resolvedValue", "searchKeywords", "keywordsKey", "ThickCheckIcon", "Slottable"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-UBSLEGQZ.js";import{a as p}from"./chunk-GSTOGDAJ.js";import{a as m}from"./chunk-5LGWS5QS.js";import{a as c}from"./chunk-OS3FCYZY.js";var l={};c(l,{Content:()=>g,List:()=>P,Root:()=>b,Trigger:()=>f});import*as e from"react";import i from"classnames";import{Tabs as n}from"radix-ui";var b=e.forwardRef((s,o)=>{let{className:r,...t}=a(s,p);return e.createElement(n.Root,{...t,ref:o,className:i("rt-TabsRoot",r)})});b.displayName="Tabs.Root";var P=e.forwardRef((s,o)=>{let{className:r,color:t,...T}=a(s,m,p);return e.createElement(n.List,{"data-accent-color":t,...T,asChild:!1,ref:o,className:i("rt-BaseTabList","rt-TabsList",r)})});P.displayName="Tabs.List";var f=e.forwardRef((s,o)=>{let{className:r,children:t,...T}=s;return e.createElement(n.Trigger,{...T,asChild:!1,ref:o,className:i("rt-reset","rt-BaseTabListTrigger","rt-TabsTrigger",r)},e.createElement("span",{className:"rt-BaseTabListTriggerInner rt-TabsTriggerInner"},t),e.createElement("span",{className:"rt-BaseTabListTriggerInnerHidden rt-TabsTriggerInnerHidden"},t))});f.displayName="Tabs.Trigger";var g=e.forwardRef((s,o)=>{let{className:r,...t}=a(s,p);return e.createElement(n.Content,{...t,ref:o,className:i("rt-TabsContent",r),"aria-live":"polite","aria-atomic":"true"})});g.displayName="Tabs.Content";export{b as a,P as b,f as c,g as d,l as e};
|
|
2
|
-
//# sourceMappingURL=chunk-PNIVUG5D.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/tabs.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tabs as TabsPrimitive } from 'radix-ui';\n\nimport { tabsListPropDefs } from './tabs.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { tabsContentPropDefs, tabsRootPropDefs } from './tabs.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TabsRootElement = React.ElementRef<typeof TabsPrimitive.Root>;\ntype TabsRootOwnProps = GetPropDefTypes<typeof tabsRootPropDefs>;\ninterface TabsRootProps\n extends ComponentPropsWithout<typeof TabsPrimitive.Root, 'asChild' | 'color' | 'defaultChecked'>,\n MarginProps,\n TabsRootOwnProps {}\nconst TabsRoot = React.forwardRef<TabsRootElement, TabsRootProps>((props, forwardedRef) => {\n const { className, ...rootProps } = extractProps(props, marginPropDefs);\n return (\n <TabsPrimitive.Root\n {...rootProps}\n ref={forwardedRef}\n className={classNames('rt-TabsRoot', className)}\n />\n );\n});\nTabsRoot.displayName = 'Tabs.Root';\n\ntype TabsListElement = React.ElementRef<typeof TabsPrimitive.List>;\ntype TabsListOwnProps = GetPropDefTypes<typeof tabsListPropDefs>;\ninterface TabsListProps\n extends ComponentPropsWithout<typeof TabsPrimitive.List, RemovedProps>,\n MarginProps,\n TabsListOwnProps {}\nconst TabsList = React.forwardRef<TabsListElement, TabsListProps>((props, forwardedRef) => {\n const { className, color, ...listProps } = extractProps(\n props,\n tabsListPropDefs,\n marginPropDefs,\n );\n return (\n <TabsPrimitive.List\n data-accent-color={color}\n {...listProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-BaseTabList', 'rt-TabsList', className)}\n />\n );\n});\nTabsList.displayName = 'Tabs.List';\n\ntype TabsTriggerElement = React.ElementRef<typeof TabsPrimitive.Trigger>;\ninterface TabsTriggerProps\n extends ComponentPropsWithout<typeof TabsPrimitive.Trigger, RemovedProps> {}\nconst TabsTrigger = React.forwardRef<TabsTriggerElement, TabsTriggerProps>(\n (props, forwardedRef) => {\n const { className, children, ...triggerProps } = props;\n return (\n <TabsPrimitive.Trigger\n {...triggerProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseTabListTrigger', 'rt-TabsTrigger', className)}\n >\n <span className=\"rt-BaseTabListTriggerInner rt-TabsTriggerInner\">{children}</span>\n <span className=\"rt-BaseTabListTriggerInnerHidden rt-TabsTriggerInnerHidden\">\n {children}\n </span>\n </TabsPrimitive.Trigger>\n );\n },\n);\nTabsTrigger.displayName = 'Tabs.Trigger';\n\ntype TabsContentElement = React.ElementRef<typeof TabsPrimitive.Content>;\ntype TabsContentOwnProps = GetPropDefTypes<typeof tabsContentPropDefs>;\ninterface TabsContentProps\n extends ComponentPropsWithout<typeof TabsPrimitive.Content, RemovedProps>,\n MarginProps,\n TabsContentOwnProps {}\nconst TabsContent = React.forwardRef<TabsContentElement, TabsContentProps>(\n (props, forwardedRef) => {\n const { className, ...contentProps } = extractProps(props, marginPropDefs);\n return (\n <TabsPrimitive.Content\n {...contentProps}\n ref={forwardedRef}\n className={classNames('rt-TabsContent', className)}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n />\n );\n },\n);\nTabsContent.displayName = 'Tabs.Content';\n\nexport { TabsRoot as Root, TabsList as List, TabsTrigger as Trigger, TabsContent as Content };\nexport type {\n TabsRootProps as RootProps,\n TabsListProps as ListProps,\n TabsTriggerProps as TriggerProps,\n TabsContentProps as ContentProps,\n};\n"],
|
|
5
|
-
"mappings": "2JAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,EAAA,SAAAC,EAAA,SAAAC,EAAA,YAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,QAAQC,MAAqB,WAiBtC,IAAMC,EAAiB,aAA2C,CAACC,EAAOC,IAAiB,CACzF,GAAM,CAAE,UAAAC,EAAW,GAAGC,CAAU,EAAIC,EAAaJ,EAAOK,CAAc,EACtE,OACE,gBAACC,EAAc,KAAd,CACE,GAAGH,EACJ,IAAKF,EACL,UAAWM,EAAW,cAAeL,CAAS,EAChD,CAEJ,CAAC,EACDH,EAAS,YAAc,YAQvB,IAAMS,EAAiB,aAA2C,CAACR,EAAOC,IAAiB,CACzF,GAAM,CAAE,UAAAC,EAAW,MAAAO,EAAO,GAAGC,CAAU,EAAIN,EACzCJ,EACAW,EACAN,CACF,EACA,OACE,gBAACC,EAAc,KAAd,CACC,oBAAmBG,EAClB,GAAGC,EACJ,QAAS,GACT,IAAKT,EACL,UAAWM,EAAW,iBAAkB,cAAeL,CAAS,EAClE,CAEJ,CAAC,EACDM,EAAS,YAAc,YAKvB,IAAMI,EAAoB,aACxB,CAACZ,EAAOC,IAAiB,CACvB,GAAM,CAAE,UAAAC,EAAW,SAAAW,EAAU,GAAGC,CAAa,EAAId,EACjD,OACE,gBAACM,EAAc,QAAd,CACE,GAAGQ,EACJ,QAAS,GACT,IAAKb,EACL,UAAWM,EAAW,WAAY,wBAAyB,iBAAkBL,CAAS,GAEtF,gBAAC,QAAK,UAAU,kDAAkDW,CAAS,EAC3E,gBAAC,QAAK,UAAU,8DACbA,CACH,CACF,CAEJ,CACF,EACAD,EAAY,YAAc,eAQ1B,IAAMG,EAAoB,aACxB,CAACf,EAAOC,IAAiB,CACvB,GAAM,CAAE,UAAAC,EAAW,GAAGc,CAAa,EAAIZ,EAAaJ,EAAOK,CAAc,EACzE,OACE,gBAACC,EAAc,QAAd,CACE,GAAGU,EACJ,IAAKf,EACL,UAAWM,EAAW,iBAAkBL,CAAS,EACjD,YAAU,SACV,cAAY,OACd,CAEJ,CACF,EACAa,EAAY,YAAc",
|
|
6
|
-
"names": ["tabs_exports", "__export", "TabsContent", "TabsList", "TabsRoot", "TabsTrigger", "React", "classNames", "TabsPrimitive", "TabsRoot", "props", "forwardedRef", "className", "rootProps", "extractProps", "marginPropDefs", "TabsPrimitive", "classNames", "TabsList", "color", "listProps", "baseTabListPropDefs", "TabsTrigger", "children", "triggerProps", "TabsContent", "contentProps"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-UBSLEGQZ.js";import{a as t}from"./chunk-GSTOGDAJ.js";import{a as e}from"./chunk-4D7OU2UA.js";import*as o from"react";import f from"classnames";import{composeEventHandlers as l}from"radix-ui/internal";var R=o.forwardRef((p,a)=>{let{className:s,color:i,onChange:n,onValueChange:m,...d}=r(p,e,t);return o.createElement("input",{type:"radio","data-accent-color":i,...d,onChange:l(n,u=>m?.(u.currentTarget.value)),ref:a,className:f("rt-reset","rt-BaseRadioRoot","rt-RadioRoot",s)})});R.displayName="Radio";export{R as a};
|
|
2
|
-
//# sourceMappingURL=chunk-PSS45RHX.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/radio.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { composeEventHandlers } from 'radix-ui/internal';\n\nimport { radioPropDefs } from './radio.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout } from '../helpers/component-props.js';\nimport type { NotInputRadioAttributes } from '../helpers/input-attributes.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype RadioElement = React.ElementRef<'input'>;\ntype RadioOwnProps = GetPropDefTypes<typeof radioPropDefs> & {\n value: string;\n onValueChange?: (value: string) => void;\n};\ntype RadioInputProps = ComponentPropsWithout<\n 'input',\n NotInputRadioAttributes | 'color' | 'defaultValue' | 'value'\n>;\ninterface RadioProps extends RadioInputProps, MarginProps, RadioOwnProps {}\n\nconst Radio = React.forwardRef<RadioElement, RadioProps>((props, forwardedRef) => {\n const { className, color, onChange, onValueChange, ...radioProps } = extractProps(\n props,\n radioPropDefs,\n marginPropDefs,\n );\n return (\n <input\n type=\"radio\"\n data-accent-color={color}\n {...radioProps}\n onChange={composeEventHandlers(onChange, (event) =>\n onValueChange?.(event.currentTarget.value),\n )}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseRadioRoot', 'rt-RadioRoot', className)}\n />\n );\n});\nRadio.displayName = 'Radio';\n\nexport { Radio };\nexport type { RadioProps };\n"],
|
|
5
|
-
"mappings": "wHAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,wBAAAC,MAA4B,oBAsBrC,IAAMC,EAAc,aAAqC,CAACC,EAAOC,IAAiB,CAChF,GAAM,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAC,EAAU,cAAAC,EAAe,GAAGC,CAAW,EAAIC,EACnEP,EACAQ,EACAC,CACF,EACA,OACE,gBAAC,SACC,KAAK,QACL,oBAAmBN,EAClB,GAAGG,EACJ,SAAUI,EAAqBN,EAAWO,GACxCN,IAAgBM,EAAM,cAAc,KAAK,CAC3C,EACA,IAAKV,EACL,UAAWW,EAAW,WAAY,mBAAoB,eAAgBV,CAAS,EACjF,CAEJ,CAAC,EACDH,EAAM,YAAc",
|
|
6
|
-
"names": ["React", "classNames", "composeEventHandlers", "Radio", "props", "forwardedRef", "className", "color", "onChange", "onValueChange", "radioProps", "extractProps", "baseRadioPropDefs", "marginPropDefs", "composeEventHandlers", "event", "classNames"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-KRJTW535.js";import{a as e}from"./chunk-NZJGC6ZW.js";import{a as o,b as r}from"./chunk-34KVYDF6.js";var p=["inherit","light","dark"],t=["sans","mono","serif"],l={...e,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:p,default:"inherit"},accentColor:{type:"enum",values:o,default:"gray"},grayColor:{type:"enum",values:r,default:"gray"},radius:{type:"enum",values:a,default:"full"},fontFamily:{type:"enum",values:t,default:"sans"},headingFontFamily:{type:"enum",values:t}};export{l as a};
|
|
2
|
-
//# sourceMappingURL=chunk-PYYI64XK.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/theme.props.tsx"],
|
|
4
|
-
"sourcesContent": ["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": "0HAMA,IAAMA,EAAc,CAAC,UAAW,QAAS,MAAM,EACzCC,EAAe,CAAC,OAAQ,OAAQ,OAAO,EAEvCC,EAAgB,CACpB,GAAGC,EAOH,cAAe,CAAE,KAAM,UAAW,QAAS,EAAK,EAOhD,WAAY,CAAE,KAAM,OAAQ,OAAQH,EAAa,QAAS,SAAU,EAOpE,YAAa,CAAE,KAAM,OAAQ,OAAQI,EAAc,QAAS,MAAO,EAOnE,UAAW,CAAE,KAAM,OAAQ,OAAQC,EAAY,QAAS,MAAO,EAO/D,OAAQ,CAAE,KAAM,OAAQ,OAAQC,EAAO,QAAS,MAAO,EASvD,WAAY,CAAE,KAAM,OAAQ,OAAQL,EAAc,QAAS,MAAO,EAQlE,kBAAmB,CAAE,KAAM,OAAQ,OAAQA,CAAa,CAC1D",
|
|
6
|
-
"names": ["appearances", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-QDW5ZG5E.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-7ZOGH5NT.js";import{a as N}from"./chunk-7CBZFHSQ.js";import{b as v}from"./chunk-FWB47YCH.js";import{a as m}from"./chunk-UBSLEGQZ.js";import{a as R}from"./chunk-OS3FCYZY.js";var d={};R(d,{Actions:()=>P,Logo:()=>b,Navigation:()=>f,Root:()=>l});import*as o from"react";import p from"classnames";var l=o.forwardRef((e,s)=>{let{children:i,className:n,...a}=m(e,c),r=e.position??"fixed",t=e.size??"2";return o.createElement("header",{...a,ref:s,className:p("rt-NavbarRoot",n),"data-position":r,"data-size":t},o.createElement("div",{className:"rt-NavbarContainer"},i))});l.displayName="Navbar.Root";var b=o.forwardRef(({asChild:e,gap:s="2",align:i="center",justify:n="start",className:a,...r},t)=>e?o.createElement(v,{ref:t,className:p("rt-NavbarLogo",a),...r}):o.createElement(N,{ref:t,gap:s,align:i,justify:n,className:p("rt-NavbarLogo",a),...r}));b.displayName="Navbar.Logo";var f=o.forwardRef(({asChild:e,gap:s="4",align:i="center",justify:n="center",className:a,...r},t)=>e?o.createElement(v,{ref:t,className:p("rt-NavbarNavigation",a),role:"navigation",...r}):o.createElement(N,{ref:t,gap:s,align:i,justify:n,className:p("rt-NavbarNavigation",a),role:"navigation",...r}));f.displayName="Navbar.Navigation";var P=o.forwardRef(({asChild:e,gap:s="4",align:i="center",justify:n="end",className:a,...r},t)=>e?o.createElement(v,{ref:t,className:p("rt-NavbarActions",a),...r}):o.createElement(N,{ref:t,gap:s,align:i,justify:n,className:p("rt-NavbarActions",a),...r}));P.displayName="Navbar.Actions";export{l as a,b,f as c,P as d,d as e};
|
|
2
|
-
//# sourceMappingURL=chunk-QJFAGWBO.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/navbar.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Flex } from './flex.js';\nimport { Slot } from './slot.js';\n\nimport type { FlexProps } from './flex.js';\n\nimport { navbarRootPropDefs } from './navbar.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\n/**\n * Navbar Component\n *\n * A horizontal navigation bar component with semantic slots for organizing\n * content. Follows the Shell and Sidebar compound component patterns.\n *\n * @example\n * <Navbar.Root>\n * <Navbar.Logo>Brand/logo content</Navbar.Logo>\n * <Navbar.Navigation>Navigation links</Navbar.Navigation>\n * <Navbar.Actions>CTAs, user menu, etc</Navbar.Actions>\n * </Navbar.Root>\n */\n\n// Root Component\ntype NavbarRootElement = React.ElementRef<'header'>;\ntype NavbarRootOwnProps = GetPropDefTypes<typeof navbarRootPropDefs>;\ninterface NavbarRootProps\n extends ComponentPropsWithout<'header', RemovedProps>,\n NavbarRootOwnProps {}\n\nconst NavbarRoot = React.forwardRef<NavbarRootElement, NavbarRootProps>(\n (props, forwardedRef) => {\n const { children, className, ...rootProps } = extractProps(\n props,\n navbarRootPropDefs,\n );\n\n const position = props.position ?? 'fixed';\n const size = props.size ?? '2';\n\n return (\n <header\n {...rootProps}\n ref={forwardedRef}\n className={classNames('rt-NavbarRoot', className)}\n data-position={position}\n data-size={size}\n >\n <div className=\"rt-NavbarContainer\">{children}</div>\n </header>\n );\n },\n);\nNavbarRoot.displayName = 'Navbar.Root';\n\n// Logo Slot - extends FlexProps\ntype NavbarLogoProps = FlexProps & {\n asChild?: boolean;\n};\n\nconst NavbarLogo = React.forwardRef<HTMLDivElement, NavbarLogoProps>(\n ({ asChild, gap = '2', align = 'center', justify = 'start', className, ...props }, ref) => {\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={classNames('rt-NavbarLogo', className)}\n {...props}\n />\n );\n }\n\n return (\n <Flex\n ref={ref}\n gap={gap}\n align={align}\n justify={justify}\n className={classNames('rt-NavbarLogo', className)}\n {...props}\n />\n );\n }\n);\nNavbarLogo.displayName = 'Navbar.Logo';\n\n// Navigation Slot - extends FlexProps\ntype NavbarNavigationProps = FlexProps & {\n asChild?: boolean;\n};\n\nconst NavbarNavigation = React.forwardRef<HTMLDivElement, NavbarNavigationProps>(\n ({ asChild, gap = '4', align = 'center', justify = 'center', className, ...props }, ref) => {\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={classNames('rt-NavbarNavigation', className)}\n role=\"navigation\"\n {...props}\n />\n );\n }\n\n return (\n <Flex\n ref={ref}\n gap={gap}\n align={align}\n justify={justify}\n className={classNames('rt-NavbarNavigation', className)}\n role=\"navigation\"\n {...props}\n />\n );\n }\n);\nNavbarNavigation.displayName = 'Navbar.Navigation';\n\n// Actions Slot - extends FlexProps\ntype NavbarActionsProps = FlexProps & {\n asChild?: boolean;\n};\n\nconst NavbarActions = React.forwardRef<HTMLDivElement, NavbarActionsProps>(\n ({ asChild, gap = '4', align = 'center', justify = 'end', className, ...props }, ref) => {\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={classNames('rt-NavbarActions', className)}\n {...props}\n />\n );\n }\n\n return (\n <Flex\n ref={ref}\n gap={gap}\n align={align}\n justify={justify}\n className={classNames('rt-NavbarActions', className)}\n {...props}\n />\n );\n }\n);\nNavbarActions.displayName = 'Navbar.Actions';\n\nexport {\n NavbarRoot as Root,\n NavbarLogo as Logo,\n NavbarNavigation as Navigation,\n NavbarActions as Actions,\n};\n\nexport type {\n NavbarRootProps as RootProps,\n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EAKF,gBAACiB,EAAA,CACC,IAAKF,EACL,IAAKH,EACL,MAAOC,EACP,QAASC,EACT,UAAWL,EAAW,sBAAuBN,CAAS,EACtD,KAAK,aACJ,GAAGH,EACN,CAGN,EACAkB,EAAiB,YAAc,oBAO/B,IAAMC,EAAsB,aAC1B,CAAC,CAAE,QAAAR,EAAS,IAAAC,EAAM,IAAK,MAAAC,EAAQ,SAAU,QAAAC,EAAU,MAAO,UAAAX,EAAW,GAAGH,CAAM,EAAGe,IAC3EJ,EAEA,gBAACK,EAAA,CACC,IAAKD,EACL,UAAWN,EAAW,mBAAoBN,CAAS,EAClD,GAAGH,EACN,EAKF,gBAACiB,EAAA,CACC,IAAKF,EACL,IAAKH,EACL,MAAOC,EACP,QAASC,EACT,UAAWL,EAAW,mBAAoBN,CAAS,EAClD,GAAGH,EACN,CAGN,EACAmB,EAAc,YAAc",
|
|
6
|
-
"names": ["navbar_exports", "__export", "NavbarActions", "NavbarLogo", "NavbarNavigation", "NavbarRoot", "React", "classNames", "NavbarRoot", "props", "forwardedRef", "children", "className", "rootProps", "extractProps", "navbarRootPropDefs", "position", "size", "classNames", "NavbarLogo", "asChild", "gap", "align", "justify", "ref", "Slot", "Flex", "NavbarNavigation", "NavbarActions"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-NZJGC6ZW.js";import{a as s}from"./chunk-4D7OU2UA.js";import{c as r}from"./chunk-34KVYDF6.js";var o=["1","2","3"],a=s.variant.values,f={...e,size:{type:"enum",className:"rt-r-size",values:o,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:a,default:"raised"},...r};export{f as a};
|
|
2
|
-
//# sourceMappingURL=chunk-QWFFYUFH.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/radio-group.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { baseRadioPropDefs } from './_internal/base-radio.props.js';\nimport { 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 sizes = ['1', '2', '3'] as const;\n// The same list as Radio: a group offers exactly what its items can draw.\nconst variants = baseRadioPropDefs.variant.values;\n\nconst radioGroupRootPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { radioGroupRootPropDefs };\n"],
|
|
5
|
-
"mappings": "wHAMA,IAAMA,EAAQ,CAAC,IAAK,IAAK,GAAG,EAEtBC,EAAWC,EAAkB,QAAQ,OAErCC,EAAyB,CAC7B,GAAGC,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQJ,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,QAAS,EACtF,GAAGI,CACL",
|
|
6
|
-
"names": ["sizes", "variants", "baseRadioPropDefs", "radioGroupRootPropDefs", "asChildPropDef", "colorPropDef"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-NZJGC6ZW.js";var s=["1","2","3","4","5"],a=["raised","surface","outline","ghost","soft"],t={...e,size:{type:"enum",className:"rt-r-size",values:s,default:"1",responsive:!0},variant:{type:"enum",className:"rt-variant",values:a,default:"raised"},flush:{type:"boolean",default:!1},inset:{type:"boolean",default:!1}};export{t as a};
|
|
2
|
-
//# sourceMappingURL=chunk-RJ6SA7AY.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/card.props.tsx"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../props/as-child.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4', '5'] as const;\nconst variants = ['raised', 'surface', 'outline', 'ghost', 'soft'] as const;\n\nconst cardPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'raised' },\n flush: { type: 'boolean', default: false },\n inset: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n flush: PropDef<boolean>;\n inset: PropDef<boolean>;\n};\n\nexport { cardPropDefs };\n"],
|
|
5
|
-
"mappings": "wCAIA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,GAAG,EAChCC,EAAW,CAAC,SAAU,UAAW,UAAW,QAAS,MAAM,EAE3DC,EAAe,CACnB,GAAGC,EACH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQH,EAAO,QAAS,IAAK,WAAY,EAAK,EAC5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,QAAS,EACtF,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,EACzC,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
|
|
6
|
-
"names": ["sizes", "variants", "cardPropDefs", "asChildPropDef"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as p,b as R,c as n}from"./chunk-BALS3AVM.js";import{a as b}from"./chunk-HKRQ3E3I.js";import{a as s}from"./chunk-UBSLEGQZ.js";import{a as d}from"./chunk-GSTOGDAJ.js";import{b as m}from"./chunk-PBFSBHBS.js";import{a as h}from"./chunk-OS3FCYZY.js";var v={};h(v,{Body:()=>c,Cell:()=>C,ColumnHeaderCell:()=>y,Header:()=>T,Root:()=>P,Row:()=>f,RowHeaderCell:()=>i});import*as e from"react";import t from"classnames";var P=e.forwardRef((o,l)=>{let{layout:a,...r}=p,{className:w,children:u,layout:H,...N}=s(o,r,d),E=m({value:H,className:p.layout.className,propValues:p.layout.values});return e.createElement("div",{ref:l,className:t("rt-TableRoot",w),...N},e.createElement(b,null,e.createElement("table",{className:t("rt-TableRootTable",E)},u)))});P.displayName="Table.Root";var T=e.forwardRef(({className:o,...l},a)=>e.createElement("thead",{...l,ref:a,className:t("rt-TableHeader",o)}));T.displayName="Table.Header";var c=e.forwardRef(({className:o,...l},a)=>e.createElement("tbody",{...l,ref:a,className:t("rt-TableBody",o)}));c.displayName="Table.Body";var f=e.forwardRef((o,l)=>{let{className:a,...r}=s(o,R);return e.createElement("tr",{...r,ref:l,className:t("rt-TableRow",a)})});f.displayName="Table.Row";var C=e.forwardRef((o,l)=>{let{className:a,...r}=s(o,n);return e.createElement("td",{className:t("rt-TableCell",a),ref:l,...r})});C.displayName="Table.Cell";var y=e.forwardRef((o,l)=>{let{className:a,...r}=s(o,n);return e.createElement("th",{className:t("rt-TableCell","rt-TableColumnHeaderCell",a),scope:"col",ref:l,...r})});y.displayName="Table.ColumnHeaderCell";var i=e.forwardRef((o,l)=>{let{className:a,...r}=s(o,n);return e.createElement("th",{className:t("rt-TableCell","rt-TableRowHeaderCell",a),scope:"row",ref:l,...r})});i.displayName="Table.RowHeaderCell";export{P as a,T as b,c,f as d,C as e,y as f,i as g,v as h};
|
|
2
|
-
//# sourceMappingURL=chunk-RVHKSNMJ.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/table.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { tableRootPropDefs, tableRowPropDefs, tableCellPropDefs } from './table.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { getResponsiveClassNames } from '../helpers/get-responsive-styles.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { ScrollArea } from './scroll-area.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TableRootElement = React.ElementRef<'div'>;\ntype TableRootOwnProps = GetPropDefTypes<typeof tableRootPropDefs>;\ninterface TableRootProps\n extends ComponentPropsWithout<'div', RemovedProps>,\n MarginProps,\n TableRootOwnProps {}\nconst TableRoot = React.forwardRef<TableRootElement, TableRootProps>((props, forwardedRef) => {\n const { layout: layoutPropDef, ...rootPropDefs } = tableRootPropDefs;\n const { className, children, layout, ...rootProps } = extractProps(\n props,\n rootPropDefs,\n marginPropDefs\n );\n const tableLayoutClassNames = getResponsiveClassNames({\n value: layout,\n className: tableRootPropDefs.layout.className,\n propValues: tableRootPropDefs.layout.values,\n });\n return (\n <div ref={forwardedRef} className={classNames('rt-TableRoot', className)} {...rootProps}>\n <ScrollArea>\n <table className={classNames('rt-TableRootTable', tableLayoutClassNames)}>{children}</table>\n </ScrollArea>\n </div>\n );\n});\nTableRoot.displayName = 'Table.Root';\n\ntype TableHeaderElement = React.ElementRef<'thead'>;\ninterface TableHeaderProps extends ComponentPropsWithout<'thead', RemovedProps> {}\nconst TableHeader = React.forwardRef<TableHeaderElement, TableHeaderProps>(\n ({ className, ...props }, forwardedRef) => (\n <thead {...props} ref={forwardedRef} className={classNames('rt-TableHeader', className)} />\n )\n);\nTableHeader.displayName = 'Table.Header';\n\ntype TableBodyElement = React.ElementRef<'tbody'>;\ninterface TableBodyProps extends ComponentPropsWithout<'tbody', RemovedProps> {}\nconst TableBody = React.forwardRef<TableBodyElement, TableBodyProps>(\n ({ className, ...props }, forwardedRef) => (\n <tbody {...props} ref={forwardedRef} className={classNames('rt-TableBody', className)} />\n )\n);\nTableBody.displayName = 'Table.Body';\n\ntype TableRowElement = React.ElementRef<'tr'>;\ntype TableRowOwnProps = GetPropDefTypes<typeof tableRowPropDefs>;\ninterface TableRowProps extends ComponentPropsWithout<'tr', RemovedProps>, TableRowOwnProps {}\nconst TableRow = React.forwardRef<TableRowElement, TableRowProps>((props, forwardedRef) => {\n const { className, ...rowProps } = extractProps(props, tableRowPropDefs);\n return <tr {...rowProps} ref={forwardedRef} className={classNames('rt-TableRow', className)} />;\n});\nTableRow.displayName = 'Table.Row';\n\ntype TableCellElement = React.ElementRef<'td'>;\ntype TableCellOwnProps = GetPropDefTypes<typeof tableCellPropDefs>;\ninterface TableCellProps\n extends ComponentPropsWithout<'td', RemovedProps | 'width'>,\n TableCellOwnProps {}\nconst TableCell = React.forwardRef<TableCellElement, TableCellProps>((props, forwardedRef) => {\n const { className, ...cellProps } = extractProps(props, tableCellPropDefs);\n return <td className={classNames('rt-TableCell', className)} ref={forwardedRef} {...cellProps} />;\n});\nTableCell.displayName = 'Table.Cell';\n\ntype TableColumnHeaderCellElement = React.ElementRef<'th'>;\ninterface TableColumnHeaderCellProps\n extends ComponentPropsWithout<'th', RemovedProps>,\n TableCellOwnProps {}\nconst TableColumnHeaderCell = React.forwardRef<\n TableColumnHeaderCellElement,\n TableColumnHeaderCellProps\n>((props, forwardedRef) => {\n const { className, ...cellProps } = extractProps(props, tableCellPropDefs);\n return (\n <th\n className={classNames('rt-TableCell', 'rt-TableColumnHeaderCell', className)}\n scope=\"col\"\n ref={forwardedRef}\n {...cellProps}\n />\n );\n});\nTableColumnHeaderCell.displayName = 'Table.ColumnHeaderCell';\n\ntype TableRowHeaderCellElement = React.ElementRef<'th'>;\ninterface TableRowHeaderCellProps\n extends ComponentPropsWithout<'th', RemovedProps>,\n TableCellOwnProps {}\nconst TableRowHeaderCell = React.forwardRef<TableRowHeaderCellElement, TableRowHeaderCellProps>(\n (props, forwardedRef) => {\n const { className, ...cellProps } = extractProps(props, tableCellPropDefs);\n return (\n <th\n className={classNames('rt-TableCell', 'rt-TableRowHeaderCell', className)}\n scope=\"row\"\n ref={forwardedRef}\n {...cellProps}\n />\n );\n }\n);\nTableRowHeaderCell.displayName = 'Table.RowHeaderCell';\n\nexport {\n TableRoot as Root,\n TableHeader as Header,\n TableBody as Body,\n TableRow as Row,\n TableCell as Cell,\n TableColumnHeaderCell as ColumnHeaderCell,\n TableRowHeaderCell as RowHeaderCell,\n};\n\nexport type {\n TableRootProps as RootProps,\n TableHeaderProps as HeaderProps,\n TableBodyProps as BodyProps,\n TableRowProps as RowProps,\n TableCellProps as CellProps,\n TableColumnHeaderCellProps as ColumnHeaderCellProps,\n TableRowHeaderCellProps as RowHeaderCellProps,\n};\n"],
|
|
5
|
-
"mappings": "8PAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,SAAAC,EAAA,qBAAAC,EAAA,WAAAC,EAAA,SAAAC,EAAA,QAAAC,EAAA,kBAAAC,IAAA,UAAYC,MAAW,QACvB,OAAOC,MAAgB,aAkBvB,IAAMC,EAAkB,aAA6C,CAACC,EAAOC,IAAiB,CAC5F,GAAM,CAAE,OAAQC,EAAe,GAAGC,CAAa,EAAIC,EAC7C,CAAE,UAAAC,EAAW,SAAAC,EAAU,OAAAC,EAAQ,GAAGC,CAAU,EAAIC,EACpDT,EACAG,EACAO,CACF,EACMC,EAAwBC,EAAwB,CACpD,MAAOL,EACP,UAAWH,EAAkB,OAAO,UACpC,WAAYA,EAAkB,OAAO,MACvC,CAAC,EACD,OACE,gBAAC,OAAI,IAAKH,EAAc,UAAWY,EAAW,eAAgBR,CAAS,EAAI,GAAGG,GAC5E,gBAACM,EAAA,KACC,gBAAC,SAAM,UAAWD,EAAW,oBAAqBF,CAAqB,GAAIL,CAAS,CACtF,CACF,CAEJ,CAAC,EACDP,EAAU,YAAc,aAIxB,IAAMgB,EAAoB,aACxB,CAAC,CAAE,UAAAV,EAAW,GAAGL,CAAM,EAAGC,IACxB,gBAAC,SAAO,GAAGD,EAAO,IAAKC,EAAc,UAAWY,EAAW,iBAAkBR,CAAS,EAAG,CAE7F,EACAU,EAAY,YAAc,eAI1B,IAAMC,EAAkB,aACtB,CAAC,CAAE,UAAAX,EAA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RowHeaderCell", "React", "classNames", "TableRoot", "props", "forwardedRef", "layoutPropDef", "rootPropDefs", "tableRootPropDefs", "className", "children", "layout", "rootProps", "extractProps", "marginPropDefs", "tableLayoutClassNames", "getResponsiveClassNames", "classNames", "ScrollArea", "TableHeader", "TableBody", "TableRow", "rowProps", "tableRowPropDefs", "TableCell", "cellProps", "tableCellPropDefs", "TableColumnHeaderCell", "TableRowHeaderCell"]
|
|
7
|
-
}
|