@womp/kookie-ui 0.22.1 → 0.24.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 +247 -187
- package/dist/cjs/components/_internal/base-button.d.ts +11 -1
- 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/menu-context.d.ts +2 -0
- package/dist/cjs/components/_internal/menu-context.d.ts.map +1 -1
- package/dist/cjs/components/_internal/menu-context.js +1 -1
- package/dist/cjs/components/_internal/menu-context.js.map +3 -3
- package/dist/cjs/components/_internal/pane-chrome.d.ts +17 -2
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +4 -4
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/accordion.d.ts +2 -2
- 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 +3 -3
- package/dist/cjs/components/avatar.d.ts +1 -1
- package/dist/cjs/components/avatar.d.ts.map +1 -1
- package/dist/cjs/components/avatar.js +1 -1
- package/dist/cjs/components/avatar.js.map +3 -3
- package/dist/cjs/components/avatar.props.d.ts +8 -0
- package/dist/cjs/components/avatar.props.d.ts.map +1 -1
- package/dist/cjs/components/avatar.props.js +1 -1
- package/dist/cjs/components/avatar.props.js.map +2 -2
- package/dist/cjs/components/blockquote.d.ts +1 -1
- package/dist/cjs/components/blockquote.d.ts.map +1 -1
- package/dist/cjs/components/blockquote.js +1 -1
- package/dist/cjs/components/blockquote.js.map +4 -4
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +4 -4
- package/dist/cjs/components/chatbar.d.ts.map +1 -1
- package/dist/cjs/components/chatbar.js +1 -1
- package/dist/cjs/components/chatbar.js.map +4 -4
- 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 +3 -3
- package/dist/cjs/components/checkbox-group.primitive.d.ts +12 -5
- package/dist/cjs/components/checkbox-group.primitive.d.ts.map +1 -1
- package/dist/cjs/components/checkbox-group.primitive.js +1 -1
- package/dist/cjs/components/checkbox-group.primitive.js.map +3 -3
- package/dist/cjs/components/checkbox.js +1 -1
- package/dist/cjs/components/checkbox.js.map +3 -3
- package/dist/cjs/components/chip.d.ts.map +1 -1
- package/dist/cjs/components/chip.js +1 -1
- package/dist/cjs/components/chip.js.map +3 -3
- package/dist/cjs/components/code.d.ts.map +1 -1
- package/dist/cjs/components/code.js +1 -1
- package/dist/cjs/components/code.js.map +2 -2
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +3 -3
- package/dist/cjs/components/context-menu.d.ts.map +1 -1
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +4 -4
- package/dist/cjs/components/dialog.d.ts +1 -1
- package/dist/cjs/components/dialog.d.ts.map +1 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/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/icons.d.ts +3 -1
- package/dist/cjs/components/icons.d.ts.map +1 -1
- package/dist/cjs/components/icons.js +1 -1
- package/dist/cjs/components/icons.js.map +3 -3
- package/dist/cjs/components/image.d.ts +23 -0
- package/dist/cjs/components/image.d.ts.map +1 -0
- package/dist/cjs/components/image.js +2 -0
- package/dist/cjs/components/image.js.map +7 -0
- package/dist/cjs/components/image.props.d.ts +19 -0
- package/dist/cjs/components/image.props.d.ts.map +1 -0
- package/dist/cjs/components/image.props.js +2 -0
- package/dist/cjs/components/image.props.js.map +7 -0
- package/dist/cjs/components/index.d.ts +2 -1
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +2 -10
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/message-scroller.d.ts.map +1 -1
- package/dist/cjs/components/message-scroller.js +1 -1
- 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 +3 -3
- package/dist/cjs/components/notice.d.ts +4 -1
- package/dist/cjs/components/notice.d.ts.map +1 -1
- package/dist/cjs/components/notice.js +1 -1
- package/dist/cjs/components/notice.js.map +4 -4
- package/dist/cjs/components/progress.d.ts.map +1 -1
- package/dist/cjs/components/progress.js +1 -1
- package/dist/cjs/components/progress.js.map +3 -3
- package/dist/cjs/components/schemas/button.schema.d.ts +2 -2
- package/dist/cjs/components/schemas/toggle.schema.d.ts +1 -1
- package/dist/cjs/components/scroll-area.d.ts +3 -1
- 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 +4 -4
- package/dist/cjs/components/segmented-control.d.ts +3 -1
- package/dist/cjs/components/segmented-control.d.ts.map +1 -1
- package/dist/cjs/components/segmented-control.js +1 -1
- package/dist/cjs/components/segmented-control.js.map +3 -3
- package/dist/cjs/components/select.d.ts +1 -2
- package/dist/cjs/components/select.d.ts.map +1 -1
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +3 -3
- package/dist/cjs/components/separator.d.ts.map +1 -1
- package/dist/cjs/components/separator.js +1 -1
- package/dist/cjs/components/separator.js.map +3 -3
- package/dist/cjs/components/sheet.d.ts +1 -0
- package/dist/cjs/components/sheet.d.ts.map +1 -1
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +3 -3
- package/dist/cjs/components/shell.d.ts +12 -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.d.ts.map +1 -1
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- 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 +3 -3
- package/dist/cjs/components/spinner.d.ts.map +1 -1
- package/dist/cjs/components/spinner.js +1 -1
- package/dist/cjs/components/spinner.js.map +3 -3
- package/dist/cjs/components/table.d.ts.map +1 -1
- package/dist/cjs/components/table.js +1 -1
- package/dist/cjs/components/table.js.map +4 -4
- 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 +2 -2
- package/dist/cjs/components/text-area.js +1 -1
- package/dist/cjs/components/text-area.js.map +2 -2
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.js.map +2 -2
- package/dist/cjs/components/toggle.d.ts +3 -2
- package/dist/cjs/components/toggle.d.ts.map +1 -1
- package/dist/cjs/components/toggle.js +1 -9
- package/dist/cjs/components/toggle.js.map +4 -4
- package/dist/cjs/components/toolbar.d.ts +80 -8
- package/dist/cjs/components/toolbar.d.ts.map +1 -1
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/components/virtual-menu.d.ts +3 -5
- package/dist/cjs/components/virtual-menu.d.ts.map +1 -1
- package/dist/cjs/components/virtual-menu.js +1 -1
- package/dist/cjs/components/virtual-menu.js.map +3 -3
- package/dist/cjs/helpers/extract-margin-props.d.ts +7 -7
- package/dist/cjs/hooks/use-scroll-edges.d.ts +4 -2
- package/dist/cjs/hooks/use-scroll-edges.d.ts.map +1 -1
- package/dist/cjs/hooks/use-scroll-edges.js +1 -1
- package/dist/cjs/hooks/use-scroll-edges.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +2 -2
- package/dist/esm/chunk-3VTS4C63.js +2 -0
- package/dist/esm/chunk-3VTS4C63.js.map +7 -0
- package/dist/esm/chunk-3WE4E2WQ.js +2 -0
- package/dist/esm/chunk-3WE4E2WQ.js.map +7 -0
- package/dist/esm/chunk-3XUY5WFA.js +2 -0
- package/dist/esm/chunk-3XUY5WFA.js.map +7 -0
- package/dist/esm/chunk-3XZOE2IQ.js +2 -0
- package/dist/esm/chunk-3XZOE2IQ.js.map +7 -0
- package/dist/esm/chunk-432YLNB3.js +2 -0
- package/dist/esm/chunk-432YLNB3.js.map +7 -0
- package/dist/esm/chunk-4QKZYCCH.js +2 -0
- package/dist/esm/chunk-4QKZYCCH.js.map +7 -0
- package/dist/esm/chunk-4R5EMVB3.js +2 -0
- package/dist/esm/chunk-4R5EMVB3.js.map +7 -0
- package/dist/esm/chunk-4ZOVV3TY.js +2 -0
- package/dist/esm/chunk-4ZOVV3TY.js.map +7 -0
- package/dist/esm/{chunk-IX5HIHVI.js → chunk-62ZGP4ET.js} +2 -2
- package/dist/esm/{chunk-IX5HIHVI.js.map → chunk-62ZGP4ET.js.map} +3 -3
- package/dist/esm/chunk-BGAJ2MDF.js +2 -0
- package/dist/esm/chunk-BGAJ2MDF.js.map +7 -0
- package/dist/esm/chunk-CHPT42BY.js +2 -0
- package/dist/esm/{chunk-Y3JYEEFB.js.map → chunk-CHPT42BY.js.map} +2 -2
- package/dist/esm/{chunk-KS4U4VPH.js → chunk-CMHUK7OG.js} +2 -2
- package/dist/esm/{chunk-KS4U4VPH.js.map → chunk-CMHUK7OG.js.map} +2 -2
- package/dist/esm/chunk-CN6F4REJ.js +2 -0
- package/dist/esm/chunk-CN6F4REJ.js.map +7 -0
- package/dist/esm/chunk-DUTZUWZP.js +2 -0
- package/dist/esm/chunk-DUTZUWZP.js.map +7 -0
- package/dist/esm/chunk-EZYXYLR2.js +2 -0
- package/dist/esm/chunk-EZYXYLR2.js.map +7 -0
- package/dist/esm/chunk-FDJV5RXX.js +2 -0
- package/dist/esm/chunk-FDJV5RXX.js.map +7 -0
- package/dist/esm/chunk-G2JD52O5.js +2 -0
- package/dist/esm/{chunk-23KT3D2Z.js.map → chunk-G2JD52O5.js.map} +3 -3
- package/dist/esm/{chunk-PNAB6KCN.js → chunk-G4ETY2NP.js} +2 -2
- package/dist/esm/{chunk-PNAB6KCN.js.map → chunk-G4ETY2NP.js.map} +1 -1
- package/dist/esm/chunk-GPOCLDBR.js +2 -0
- package/dist/esm/chunk-GPOCLDBR.js.map +7 -0
- package/dist/esm/chunk-GYP66ZK2.js +2 -0
- package/dist/esm/chunk-GYP66ZK2.js.map +7 -0
- package/dist/esm/chunk-H5BYPX6V.js +2 -0
- package/dist/esm/chunk-H5BYPX6V.js.map +7 -0
- package/dist/esm/chunk-H5G7UECV.js +2 -0
- package/dist/esm/chunk-H5G7UECV.js.map +7 -0
- package/dist/esm/chunk-I4FLQELQ.js +2 -0
- package/dist/esm/chunk-I4FLQELQ.js.map +7 -0
- package/dist/esm/chunk-JYQGCXXI.js +2 -0
- package/dist/esm/chunk-JYQGCXXI.js.map +7 -0
- package/dist/esm/chunk-KA5UE2VN.js +2 -0
- package/dist/esm/chunk-KA5UE2VN.js.map +7 -0
- package/dist/esm/{chunk-T62PRLPN.js → chunk-KEGCX5VM.js} +2 -2
- package/dist/esm/chunk-KVHKPUZ2.js +2 -0
- package/dist/esm/chunk-KVHKPUZ2.js.map +7 -0
- package/dist/esm/chunk-M7I6ISPL.js +2 -0
- package/dist/esm/chunk-M7I6ISPL.js.map +7 -0
- package/dist/esm/chunk-MYYXOFU5.js +1 -0
- package/dist/esm/{chunk-FFG32ERA.js → chunk-N3WBEQWL.js} +3 -3
- package/dist/esm/chunk-N3WBEQWL.js.map +7 -0
- package/dist/esm/{chunk-HKPXDQ2B.js → chunk-NC3CJUE3.js} +2 -2
- package/dist/esm/chunk-P2MV6HLA.js +2 -0
- package/dist/esm/{chunk-7SS4UUJH.js.map → chunk-P2MV6HLA.js.map} +3 -3
- package/dist/esm/chunk-PALE5UWK.js +2 -0
- package/dist/esm/{chunk-DSPYHO3L.js.map → chunk-PALE5UWK.js.map} +2 -2
- package/dist/esm/chunk-PDMCLVYT.js +2 -0
- package/dist/esm/chunk-PDMCLVYT.js.map +7 -0
- package/dist/esm/chunk-PM6QY3JO.js +2 -0
- package/dist/esm/{chunk-TJL47GIO.js.map → chunk-PM6QY3JO.js.map} +3 -3
- package/dist/esm/chunk-RKZVXVBN.js +2 -0
- package/dist/esm/chunk-RKZVXVBN.js.map +7 -0
- package/dist/esm/chunk-TXQZ5HLV.js +2 -0
- package/dist/esm/chunk-TXQZ5HLV.js.map +7 -0
- package/dist/esm/chunk-UKASIY6M.js +2 -0
- package/dist/esm/chunk-UKASIY6M.js.map +7 -0
- package/dist/esm/{chunk-OJQNLROL.js → chunk-UY6WJUNA.js} +2 -2
- package/dist/esm/chunk-V5O3TF57.js +2 -0
- package/dist/esm/{chunk-3KQE2PSJ.js.map → chunk-V5O3TF57.js.map} +3 -3
- package/dist/esm/chunk-VUNCI6A6.js +2 -0
- package/dist/esm/chunk-VUNCI6A6.js.map +7 -0
- package/dist/esm/{chunk-JBHRV364.js → chunk-VUPIJNG2.js} +2 -2
- package/dist/esm/chunk-W6BN5QLH.js +2 -0
- package/dist/esm/{chunk-ZNDCZM5A.js.map → chunk-W6BN5QLH.js.map} +2 -2
- package/dist/esm/chunk-WG5ORTIW.js +2 -0
- package/dist/esm/chunk-WG5ORTIW.js.map +7 -0
- package/dist/esm/chunk-WMVR2XBR.js +2 -0
- package/dist/esm/{chunk-XKSU3NLG.js.map → chunk-WMVR2XBR.js.map} +2 -2
- package/dist/esm/{chunk-NNZTSXKH.js → chunk-WX7SX5BN.js} +2 -2
- package/dist/esm/chunk-XOACTIBL.js +2 -0
- package/dist/esm/chunk-XOACTIBL.js.map +7 -0
- package/dist/esm/components/_internal/base-button.d.ts +11 -1
- 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/menu-context.d.ts +2 -0
- package/dist/esm/components/_internal/menu-context.d.ts.map +1 -1
- package/dist/esm/components/_internal/menu-context.js +1 -1
- package/dist/esm/components/_internal/pane-chrome.d.ts +17 -2
- package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/esm/components/_internal/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accordion.d.ts +2 -2
- 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/avatar.d.ts +1 -1
- package/dist/esm/components/avatar.d.ts.map +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/avatar.props.d.ts +8 -0
- package/dist/esm/components/avatar.props.d.ts.map +1 -1
- package/dist/esm/components/avatar.props.js +1 -1
- package/dist/esm/components/blockquote.d.ts +1 -1
- package/dist/esm/components/blockquote.d.ts.map +1 -1
- package/dist/esm/components/blockquote.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/chatbar.d.ts.map +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-group.d.ts.map +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox-group.primitive.d.ts +12 -5
- package/dist/esm/components/checkbox-group.primitive.d.ts.map +1 -1
- package/dist/esm/components/checkbox-group.primitive.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/chip.d.ts.map +1 -1
- package/dist/esm/components/chip.js +1 -1
- package/dist/esm/components/code.d.ts.map +1 -1
- package/dist/esm/components/code.js +1 -1
- package/dist/esm/components/combobox.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/dialog.d.ts +1 -1
- package/dist/esm/components/dialog.d.ts.map +1 -1
- package/dist/esm/components/dialog.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/icons.d.ts +3 -1
- package/dist/esm/components/icons.d.ts.map +1 -1
- package/dist/esm/components/icons.js +1 -1
- package/dist/esm/components/image.d.ts +23 -0
- package/dist/esm/components/image.d.ts.map +1 -0
- package/dist/esm/components/image.js +2 -0
- package/dist/esm/components/image.js.map +7 -0
- package/dist/esm/components/image.props.d.ts +19 -0
- package/dist/esm/components/image.props.d.ts.map +1 -0
- package/dist/esm/components/image.props.js +2 -0
- package/dist/esm/components/image.props.js.map +7 -0
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/message-scroller.d.ts.map +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 +4 -1
- package/dist/esm/components/notice.d.ts.map +1 -1
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/progress.d.ts.map +1 -1
- package/dist/esm/components/progress.js +1 -1
- package/dist/esm/components/schemas/button.schema.d.ts +2 -2
- package/dist/esm/components/schemas/toggle.schema.d.ts +1 -1
- package/dist/esm/components/scroll-area.d.ts +3 -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/segmented-control.d.ts +3 -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 +1 -2
- package/dist/esm/components/select.d.ts.map +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/separator.d.ts.map +1 -1
- package/dist/esm/components/separator.js +1 -1
- package/dist/esm/components/sheet.d.ts +1 -0
- 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 +12 -1
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.d.ts.map +1 -1
- package/dist/esm/components/sidebar.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.d.ts.map +1 -1
- package/dist/esm/components/spinner.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/tabs.d.ts.map +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/toggle.d.ts +3 -2
- package/dist/esm/components/toggle.d.ts.map +1 -1
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/toolbar.d.ts +80 -8
- package/dist/esm/components/toolbar.d.ts.map +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/virtual-menu.d.ts +3 -5
- package/dist/esm/components/virtual-menu.d.ts.map +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/index.js +1 -1
- package/dist/esm/hooks/index.js +1 -1
- package/dist/esm/hooks/use-scroll-edges.d.ts +4 -2
- package/dist/esm/hooks/use-scroll-edges.d.ts.map +1 -1
- package/dist/esm/hooks/use-scroll-edges.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/package.json +1 -1
- package/src/components/_internal/base-button.css +6 -0
- package/src/components/_internal/base-button.tsx +56 -17
- package/src/components/_internal/base-sidebar-menu.css +8 -0
- package/src/components/_internal/menu-context.tsx +11 -0
- package/src/components/_internal/pane-chrome.tsx +45 -8
- package/src/components/accordion.css +35 -4
- package/src/components/accordion.tsx +12 -16
- package/src/components/alert-dialog.tsx +59 -161
- package/src/components/avatar.props.tsx +6 -0
- package/src/components/avatar.tsx +57 -71
- package/src/components/blockquote.tsx +8 -9
- package/src/components/chatbar.tsx +27 -20
- package/src/components/checkbox-group.primitive.tsx +40 -51
- package/src/components/checkbox-group.tsx +1 -9
- package/src/components/chip.css +18 -20
- package/src/components/chip.tsx +3 -4
- package/src/components/code.tsx +3 -2
- package/src/components/combobox.css +13 -0
- package/src/components/context-menu.tsx +23 -5
- package/src/components/dialog.tsx +59 -160
- package/src/components/dropdown-menu.tsx +8 -5
- package/src/components/icons.tsx +11 -1
- package/src/components/image.css +33 -0
- package/src/components/image.props.ts +18 -0
- package/src/components/image.tsx +71 -0
- package/src/components/index.css +1 -0
- package/src/components/index.tsx +8 -0
- package/src/components/message-scroller.tsx +48 -26
- package/src/components/navbar.tsx +34 -69
- package/src/components/notice.tsx +6 -3
- package/src/components/progress.tsx +6 -3
- package/src/components/scroll-area.css +28 -2
- package/src/components/scroll-area.tsx +49 -3
- package/src/components/segmented-control.css +8 -130
- package/src/components/segmented-control.tsx +36 -5
- package/src/components/select.tsx +100 -32
- package/src/components/separator.tsx +13 -1
- package/src/components/sheet.css +7 -6
- package/src/components/sheet.tsx +76 -143
- package/src/components/shell.css +26 -0
- package/src/components/shell.tsx +29 -8
- package/src/components/sidebar.tsx +27 -16
- package/src/components/slider.css +1 -0
- package/src/components/slider.tsx +54 -44
- package/src/components/spinner.css +19 -1
- package/src/components/spinner.tsx +21 -11
- package/src/components/table.tsx +18 -5
- package/src/components/tabs.css +34 -0
- package/src/components/tabs.tsx +0 -2
- package/src/components/text-area.css +2 -1
- package/src/components/text-area.tsx +1 -1
- package/src/components/text-field.tsx +1 -1
- package/src/components/toggle.tsx +21 -39
- package/src/components/toolbar.css +34 -0
- package/src/components/toolbar.tsx +432 -23
- package/src/components/virtual-menu.tsx +110 -37
- package/src/hooks/use-scroll-edges.ts +11 -2
- package/src/styles/tokens/color.css +1 -22
- package/src/styles/utilities/truncate.css +10 -0
- package/styles.css +252 -208
- package/tokens/base.css +0 -21
- package/tokens.css +0 -21
- package/utilities.css +5 -0
- package/dist/esm/chunk-23KT3D2Z.js +0 -2
- package/dist/esm/chunk-3JA7SJDT.js +0 -2
- package/dist/esm/chunk-3JA7SJDT.js.map +0 -7
- package/dist/esm/chunk-3KQE2PSJ.js +0 -2
- package/dist/esm/chunk-3YWVE5GL.js +0 -2
- package/dist/esm/chunk-3YWVE5GL.js.map +0 -7
- package/dist/esm/chunk-5BWLY27A.js +0 -2
- package/dist/esm/chunk-5BWLY27A.js.map +0 -7
- package/dist/esm/chunk-6CK7UTNH.js +0 -2
- package/dist/esm/chunk-6CK7UTNH.js.map +0 -7
- package/dist/esm/chunk-6RK26HIY.js +0 -2
- package/dist/esm/chunk-6RK26HIY.js.map +0 -7
- package/dist/esm/chunk-7ESWH773.js +0 -2
- package/dist/esm/chunk-7ESWH773.js.map +0 -7
- package/dist/esm/chunk-7SS4UUJH.js +0 -2
- package/dist/esm/chunk-A3YQIJDA.js +0 -2
- package/dist/esm/chunk-A3YQIJDA.js.map +0 -7
- package/dist/esm/chunk-AB3QCCUM.js +0 -2
- package/dist/esm/chunk-AB3QCCUM.js.map +0 -7
- package/dist/esm/chunk-BEP4AH5V.js +0 -2
- package/dist/esm/chunk-BEP4AH5V.js.map +0 -7
- package/dist/esm/chunk-D3U4MWDZ.js +0 -1
- package/dist/esm/chunk-DBROSD2J.js +0 -2
- package/dist/esm/chunk-DBROSD2J.js.map +0 -7
- package/dist/esm/chunk-DSPYHO3L.js +0 -2
- package/dist/esm/chunk-E2D2VWUI.js +0 -2
- package/dist/esm/chunk-E2D2VWUI.js.map +0 -7
- package/dist/esm/chunk-EMNSA65L.js +0 -2
- package/dist/esm/chunk-EMNSA65L.js.map +0 -7
- package/dist/esm/chunk-FFG32ERA.js.map +0 -7
- package/dist/esm/chunk-FHPHEIYJ.js +0 -2
- package/dist/esm/chunk-FHPHEIYJ.js.map +0 -7
- package/dist/esm/chunk-FJFBM7HW.js +0 -2
- package/dist/esm/chunk-FJFBM7HW.js.map +0 -7
- package/dist/esm/chunk-HIKMKGPT.js +0 -2
- package/dist/esm/chunk-HIKMKGPT.js.map +0 -7
- package/dist/esm/chunk-IJRBX6EV.js +0 -2
- package/dist/esm/chunk-IJRBX6EV.js.map +0 -7
- package/dist/esm/chunk-KMDXIZAG.js +0 -2
- package/dist/esm/chunk-KMDXIZAG.js.map +0 -7
- package/dist/esm/chunk-LC5AK2ZD.js +0 -2
- package/dist/esm/chunk-LC5AK2ZD.js.map +0 -7
- package/dist/esm/chunk-LHIS3UKQ.js +0 -2
- package/dist/esm/chunk-LHIS3UKQ.js.map +0 -7
- package/dist/esm/chunk-NLXJZJNN.js +0 -2
- package/dist/esm/chunk-NLXJZJNN.js.map +0 -7
- package/dist/esm/chunk-QOHJIF25.js +0 -2
- package/dist/esm/chunk-QOHJIF25.js.map +0 -7
- package/dist/esm/chunk-R4XJNQX5.js +0 -2
- package/dist/esm/chunk-R4XJNQX5.js.map +0 -7
- package/dist/esm/chunk-TJL47GIO.js +0 -2
- package/dist/esm/chunk-V32EP3S7.js +0 -2
- package/dist/esm/chunk-V32EP3S7.js.map +0 -7
- package/dist/esm/chunk-WKSXMFFF.js +0 -2
- package/dist/esm/chunk-WKSXMFFF.js.map +0 -7
- package/dist/esm/chunk-XKSU3NLG.js +0 -2
- package/dist/esm/chunk-Y3JYEEFB.js +0 -2
- package/dist/esm/chunk-YK3ZUMRQ.js +0 -2
- package/dist/esm/chunk-YK3ZUMRQ.js.map +0 -7
- package/dist/esm/chunk-YZM54IJE.js +0 -2
- package/dist/esm/chunk-YZM54IJE.js.map +0 -7
- package/dist/esm/chunk-ZJI2IK7C.js +0 -2
- package/dist/esm/chunk-ZJI2IK7C.js.map +0 -7
- package/dist/esm/chunk-ZNDCZM5A.js +0 -2
- /package/dist/esm/{chunk-T62PRLPN.js.map → chunk-KEGCX5VM.js.map} +0 -0
- /package/dist/esm/{chunk-D3U4MWDZ.js.map → chunk-MYYXOFU5.js.map} +0 -0
- /package/dist/esm/{chunk-HKPXDQ2B.js.map → chunk-NC3CJUE3.js.map} +0 -0
- /package/dist/esm/{chunk-OJQNLROL.js.map → chunk-UY6WJUNA.js.map} +0 -0
- /package/dist/esm/{chunk-JBHRV364.js.map → chunk-VUPIJNG2.js.map} +0 -0
- /package/dist/esm/{chunk-NNZTSXKH.js.map → chunk-WX7SX5BN.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,sBAAsB,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAMtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAU5D,KAAK,yBAAyB,GAAG,eAAe,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAOnF,UAAU,sBACR,SAAQ,qBAAqB,CACzB,OAAO,sBAAsB,CAAC,IAAI,EAClC,SAAS,GAAG,OAAO,GAAG,gBAAgB,CACvC,EACD,yBAAyB;CAAG;AAChC,QAAA,MAAM,iBAAiB,+FA6BtB,CAAC;AAIF,UAAU,sBACR,SAAQ,qBAAqB,CAAC,OAAO,sBAAsB,CAAC,IAAI,EAAE,YAAY,CAAC;CAAG;AACpF,QAAA,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"checkbox-group.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,sBAAsB,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAMtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAU5D,KAAK,yBAAyB,GAAG,eAAe,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAOnF,UAAU,sBACR,SAAQ,qBAAqB,CACzB,OAAO,sBAAsB,CAAC,IAAI,EAClC,SAAS,GAAG,OAAO,GAAG,gBAAgB,CACvC,EACD,yBAAyB;CAAG;AAChC,QAAA,MAAM,iBAAiB,+FA6BtB,CAAC;AAIF,UAAU,sBACR,SAAQ,qBAAqB,CAAC,OAAO,sBAAsB,CAAC,IAAI,EAAE,YAAY,CAAC;CAAG;AACpF,QAAA,MAAM,iBAAiB,kGAmCtB,CAAC;AAyCF,OAAO,EAAE,iBAAiB,IAAI,IAAI,EAAE,iBAAiB,IAAI,IAAI,EAAE,CAAC;AAChE,YAAY,EAAE,sBAAsB,IAAI,SAAS,EAAE,sBAAsB,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var De=Object.create;var k=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Se=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var Te=(o,e)=>{for(var t in e)k(o,t,{get:e[t],enumerable:!0})},F=(o,e,t,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Se(e))!Ie.call(o,i)&&i!==t&&k(o,i,{get:()=>e[i],enumerable:!(p=Ge(e,i))||p.enumerable});return o};var P=(o,e,t)=>(t=o!=null?De(we(o)):{},F(e||!o||!o.__esModule?k(t,"default",{value:o,enumerable:!0}):t,o)),Ne=o=>F(k({},"__esModule",{value:!0}),o);var yo={};Te(yo,{Item:()=>ge,Root:()=>Ce});module.exports=Ne(yo);var d=P(require("react")),I=P(require("classnames")),de=require("radix-ui/internal");var f=P(require("react")),y=require("radix-ui"),h=require("radix-ui/internal"),{useDirection:Ee}=y.Direction,E="CheckboxGroup",[Ve,V]=h.Context.createContextScope(E,[h.RovingFocus.createRovingFocusGroupScope,y.Checkbox.createCheckboxScope]),A=h.RovingFocus.createRovingFocusGroupScope(),$=y.Checkbox.createCheckboxScope(),[je,ze]=Ve(E),U=f.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,name:p,defaultValue:i,value:r,required:n=!1,disabled:c=!1,orientation:a,dir:s,loop:l=!0,onValueChange:m,...x}=o,xe=A(t),B=Ee(s),[ve=[],b]=(0,h.useControllableState)({prop:r,defaultProp:i??[],onChange:m}),be=f.useCallback(T=>b((N=[])=>[...N,T]),[b]),ke=f.useCallback(T=>b((N=[])=>N.filter(Re=>Re!==T)),[b]);return f.createElement(je,{scope:t,name:p,required:n,disabled:c,value:ve,onItemCheck:be,onItemUncheck:ke},f.createElement(h.RovingFocus.Root,{asChild:!0,...xe,orientation:a,dir:B,loop:l},f.createElement(h.Primitive.div,{role:"group","data-disabled":c?"":void 0,dir:B,...x,ref:e})))});U.displayName=E;var H="CheckboxGroupItem",q=f.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,disabled:p,...i}=o,r=ze(H,t),n=r.disabled||p,c=A(t),a=$(t),s=f.useRef(null),l=(0,h.useComposedRefs)(e,s),m=r.value?.includes(i.value);return f.createElement(h.RovingFocus.Item,{asChild:!0,...c,focusable:!n,active:m},f.createElement(y.Checkbox.Root,{name:r.name,disabled:n,required:r.required,checked:m,...a,...i,ref:l,onCheckedChange:x=>{x?r.onItemCheck(o.value):r.onItemUncheck(o.value)}}))});q.displayName=H;var Oe="CheckboxGroupIndicator",K=f.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,...p}=o,i=$(t);return f.createElement(y.Checkbox.Indicator,{...i,...p,ref:e})});K.displayName=Oe;var Z=U,X=q,Y=K;var R={asChild:{type:"boolean"}};var We=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var D={color:{type:"enum",values:We,default:void 0}};var _e=["1","2","3","4"],Me=["raised","solid","soft","outline","surface"],J={size:{type:"enum",className:"kui-r-size",values:_e,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:Me,default:"raised"},...D};var v={...R,...J};var u=P(require("react")),Be=u.default.forwardRef((o,e)=>u.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));Be.displayName="ThickDividerHorizontalIcon";var j=u.default.forwardRef((o,e)=>u.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));j.displayName="ThickCheckIcon";var Fe=u.default.forwardRef((o,e)=>u.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},u.default.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));Fe.displayName="ChevronDownIcon";var Ae=u.default.forwardRef((o,e)=>u.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));Ae.displayName="ThickChevronRightIcon";var $e=u.default.forwardRef((o,e)=>u.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z"})));$e.displayName="ThickChevronLeftIcon";var Ue=u.default.forwardRef((o,e)=>u.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},u.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));Ue.displayName="ThickDotIcon";var He=u.default.forwardRef((o,e)=>u.default.createElement("svg",{...o,ref:e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u.default.createElement("path",{d:"M18 6 6 18"}),u.default.createElement("path",{d:"m6 6 12 12"})));He.displayName="CloseIcon";var qe=u.default.forwardRef((o,e)=>u.default.createElement("svg",{...o,ref:e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u.default.createElement("path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"})));qe.displayName="PaperclipIcon";var Ke=u.default.forwardRef((o,e)=>u.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),u.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));Ke.displayName="FileIcon";var Ze=u.default.forwardRef((o,e)=>u.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},u.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),u.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),u.default.createElement("path",{d:"M10 9H8"}),u.default.createElement("path",{d:"M16 13H8"}),u.default.createElement("path",{d:"M16 17H8"})));Ze.displayName="FileTextIcon";var g=P(require("react")),le=require("radix-ui");var te=P(require("classnames"));var Xe=[],Ye=new Set;function Je(o){let e=Object.assign({},...o),t=[],p=[],i=new Set;for(let r in e){let n=e[r],c=n.values??Xe,a={key:r,type:n.type,default:n.default,hasDefault:n.default!==void 0,responsive:"responsive"in n,className:n.className,customProperties:n.customProperties,parseValue:n.parseValue,values:c,valueSet:c.length>0?new Set(c):Ye,enumValueSet:n.type==="enum"?new Set([n.default,...c]):void 0};n.className?(t.push(a),i.add(r)):(a.hasDefault||n.type==="enum")&&p.push(a)}return{styling:t,passthrough:p,stylingKeys:i}}var Qe={children:new WeakMap};function Q(o){let e=Qe;for(let t=0;t<o.length;t++){let p=o[t],i=e.children.get(p);i===void 0&&(i={children:new WeakMap},e.children.set(p,i)),e=i}return e.compiled??(e.compiled=Je(o))}var eo=["initial","xs","sm","md","lg","xl"],z=new Set(eo);function O(o,e){return Object.prototype.hasOwnProperty.call(o,e)}var oo=new Set(["initial","xs","sm","md","lg","xl"]);function C(o){if(typeof o!="object"||o===null)return!1;for(let e in o)if(oo.has(e))return!0;return!1}function G(o,e,t){return e!==void 0?e.has(t):o.includes(t)}function oe({className:o,customProperties:e,...t}){let p=L({allowArbitraryValues:!0,className:o,...t}),i=to({customProperties:e,...t});return[p,i]}function L({allowArbitraryValues:o,value:e,className:t,propValues:p,propValueSet:i,parseValue:r=n=>n}){if(e){if(typeof e=="string")return G(p,i,e)?ee(t,e,r):o?t:void 0;if(C(e)){let n=e,c=[];for(let a in n){if(!O(n,a)||!z.has(a))continue;let s=n[a];if(s!==void 0){if(G(p,i,s)){let l=ee(t,s,r),m=a==="initial"?l:`${a}:${l}`;c.push(m)}else if(o){let l=a==="initial"?t:`${a}:${t}`;c.push(l)}}}return c.length>0?c.join(" "):""}if(o)return t}}function ee(o,e,t){let p=o?"-":"",i=t(e),r=i?.startsWith("-"),n=r?"-":"",c=r?i?.substring(1):i;return`${n}${o}${p}${c}`}function to({customProperties:o,value:e,propValues:t,propValueSet:p,parseValue:i=r=>r}){if(!e||typeof e=="string"&&G(t,p,e))return;let r;if(typeof e=="string"){let n=i(e);r={};for(let c of o)r[c]=n;return r}if(C(e)){let n=e;for(let c in n){if(!O(n,c)||!z.has(c))continue;let a=n[c];if(a===void 0||G(t,p,a))continue;let s=i(a);r??(r={});for(let l of o){let m=c==="initial"?l:`${l}-${c}`;r[m]=s}}}return r??{}}function W(...o){let e;for(let t of o)t&&(e===void 0&&(e={}),Object.assign(e,t));return e}function ro(o,e){let t=o.initial,p=!1;return e.hasDefault&&t===void 0&&(t=e.default,p=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(t)&&(t=e.default,p=!0),p?{...o,initial:t}:o}function S(o,...e){let{styling:t,passthrough:p,stylingKeys:i}=Q(e),r={};for(let a in o)i.has(a)||(r[a]=o[a]);for(let a=0;a<p.length;a++){let s=p[a],l=r[s.key];if(l===void 0){s.hasDefault&&(r[s.key]=s.default);continue}s.enumValueSet!==void 0&&!s.enumValueSet.has(l)&&!C(l)&&(r[s.key]=s.default)}let n,c=[];for(let a=0;a<t.length;a++){let s=t[a],l=o[s.key];if(l===void 0&&s.hasDefault&&(l=s.default),s.enumValueSet!==void 0&&!s.enumValueSet.has(l)&&!C(l)&&(l=s.default),!!l){if(C(l)){if(!s.responsive)continue;l=ro(l,s)}if(s.type==="enum"){let m=L({allowArbitraryValues:!1,value:l,className:s.className,propValues:s.values,propValueSet:s.valueSet,parseValue:s.parseValue});m&&c.push(m);continue}if(s.type==="string"||s.type==="enum | string"){let[m,x]=oe({className:s.className,customProperties:s.customProperties,propValues:s.type==="string"?[]:s.values,propValueSet:s.type==="string"?void 0:s.valueSet,parseValue:s.parseValue,value:l});x&&(n=W(n,x)),m&&c.push(m);continue}if(s.type==="boolean"){c.push(s.className);continue}}}return r.className=(0,te.default)(c.length>0?c.join(" "):void 0,o.className),r.style=W(n,o.style),r}var no=["loud","medium","quiet"],re={emphasis:{type:"enum",className:"kui-emphasis",values:no,default:void 0}};var so=["normal","start","end","both"],ne={trim:{type:"enum",className:"kui-r-lt",values:so,responsive:!0}};var io=["left","center","right"],se={align:{type:"enum",className:"kui-r-ta",values:io,responsive:!0}};var po=["wrap","nowrap","pretty","balance"],ie={wrap:{type:"enum",className:"kui-r-tw",values:po,responsive:!0}};var pe={truncate:{type:"boolean",className:"kui-truncate"}};var ao=["sans","mono","serif"],ae={font:{type:"enum",className:"kui-r-ff",values:ao}};var co=["regular","medium","semibold"],ce={weight:{type:"enum",className:"kui-r-weight",values:co,responsive:!0}};var uo=["span","div","label","p"],lo=["1","2","3","4","5","6","7","8","9"],ue={as:{type:"enum",values:uo,default:"span"},...R,size:{type:"enum",className:"kui-r-size",values:lo,responsive:!0},...ae,...ce,...se,...ne,...pe,...ie,...D,...re};var _=g.memo(g.forwardRef((o,e)=>{let{children:t,className:p,asChild:i,as:r="span",color:n,...c}=S(o,ue),a=p?`kui-Text ${p}`:"kui-Text";return i?g.createElement(le.Slot.Root,{"data-accent-color":n,...c,ref:e,className:a},t):g.createElement(r,{"data-accent-color":n,...c,ref:e,className:a},t)}));_.displayName="Text";var w=P(require("react")),fo="2",fe=w.createContext(fo);fe.displayName="ThemeSizeContext";function mo(o,e){if(e.includes(o))return o;let t=Number(o),p=e[0],i=1/0;for(let r=0;r<e.length;r++){let n=Math.abs(Number(e[r])-t);n<i&&(i=n,p=e[r])}return p}function me(o,e){let t=w.useContext(fe);return o!==void 0?o:mo(t,e.values)}var he="CheckboxGroup",[ho]=de.Context.createContextScope(he,[V]),Pe=V(),[Po,ye]=ho(he),Ce=d.forwardRef(({color:o=v.color.default,size:e,variant:t=v.variant.default,...p},i)=>{let r=me(e,v.size),{__scopeCheckboxGroup:n,className:c,...a}=p,s=Pe(n);return d.createElement(Po,{scope:n,color:o,size:r,variant:t},d.createElement(Z,{...s,...a,ref:i,className:(0,I.default)("kui-CheckboxGroupRoot",c)}))});Ce.displayName="CheckboxGroup.Root";var ge=d.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,children:p,className:i,style:r,...n}=o,{size:c}=ye("CheckboxGroupItem",t),a=s=>typeof s=="string"&&/^[1-9]$/.test(s)?s:"3";return p?d.createElement(_,{as:"label",size:a(c),className:(0,I.default)("kui-CheckboxGroupItem",i),style:r},d.createElement(M,{__scopeCheckboxGroup:t,...n,ref:e}),p&&d.createElement("span",{className:"kui-CheckboxGroupItemInner"},p)):d.createElement(M,{__scopeCheckboxGroup:t,...n,ref:e,className:i,style:r})});ge.displayName="CheckboxGroup.Item";var M=d.forwardRef(({__scopeCheckboxGroup:o,...e},t)=>{let p=ye("CheckboxGroupItemCheckbox",o),i=Pe(o),{color:r,className:n}=S({...e,...p},v);return d.createElement(X,{...i,"data-accent-color":r,...e,ref:t,className:(0,I.default)("kui-reset","kui-BaseCheckboxRoot","kui-CheckboxGroupItemCheckbox",n)},d.createElement(Y,{...i,asChild:!0,className:"kui-BaseCheckboxIndicator"},d.createElement(j,null)))});M.displayName="CheckboxGroup.ItemCheckbox";
|
|
1
|
+
"use strict";"use client";var ve=Object.create;var v=Object.defineProperty;var Re=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var Ge=(o,e)=>{for(var t in e)v(o,t,{get:e[t],enumerable:!0})},B=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of De(e))!Ie.call(o,s)&&s!==t&&v(o,s,{get:()=>e[s],enumerable:!(i=Re(e,s))||i.enumerable});return o};var h=(o,e,t)=>(t=o!=null?ve(we(o)):{},B(e||!o||!o.__esModule?v(t,"default",{value:o,enumerable:!0}):t,o)),Se=o=>B(v({},"__esModule",{value:!0}),o);var Po={};Ge(Po,{Item:()=>ye,Root:()=>Pe});module.exports=Se(Po);var f=h(require("react")),S=h(require("classnames")),fe=require("radix-ui/internal");var m=h(require("react")),P=require("radix-ui"),x=require("radix-ui/internal"),{useDirection:Te}=P.Direction,V="CheckboxGroup",[Ne,E]=x.Context.createContextScope(V,[P.Checkbox.createCheckboxScope]),A=P.Checkbox.createCheckboxScope(),[Ve,Ee]=Ne(V),$=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,name:i,defaultValue:s,value:r,required:n=!1,disabled:c=!1,orientation:l,dir:p,loop:u,onValueChange:d,...b}=o,Ce=Te(p),[xe=[],k]=(0,x.useControllableState)({prop:r,defaultProp:s??[],onChange:d}),ge=m.useCallback(T=>k((N=[])=>[...N,T]),[k]),be=m.useCallback(T=>k((N=[])=>N.filter(ke=>ke!==T)),[k]);return m.createElement(Ve,{scope:t,name:i,required:n,disabled:c,value:xe,onItemCheck:ge,onItemUncheck:be},m.createElement(x.Primitive.div,{role:"group","data-disabled":c?"":void 0,dir:Ce,...b,ref:e}))});$.displayName=V;var U="CheckboxGroupItem",q=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,disabled:i,...s}=o,r=Ee(U,t),n=r.disabled||i,c=A(t),l=r.value?.includes(s.value),p=r.required&&(r.value?.length??0)===0;return m.createElement(P.Checkbox.Root,{name:r.name,disabled:n,required:p,checked:l,...c,...s,ref:e,onCheckedChange:u=>{u?r.onItemCheck(o.value):r.onItemUncheck(o.value)}})});q.displayName=U;var je="CheckboxGroupIndicator",H=m.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,...i}=o,s=A(t);return m.createElement(P.Checkbox.Indicator,{...s,...i,ref:e})});H.displayName=je;var K=$,F=q,Z=H;var R={asChild:{type:"boolean"}};var Le=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"];var D={color:{type:"enum",values:Le,default:void 0}};var Oe=["1","2","3","4"],_e=["raised","solid","soft","outline","surface"],X={size:{type:"enum",className:"kui-r-size",values:Oe,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:_e,default:"raised"},...D};var g={...R,...X};var a=h(require("react")),We=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"})));We.displayName="ThickDividerHorizontalIcon";var j=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"})));j.displayName="ThickCheckIcon";var Me=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{d:"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z"})));Me.displayName="ChevronDownIcon";var Be=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z"})));Be.displayName="ThickChevronRightIcon";var Ae=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z"})));Ae.displayName="ThickChevronLeftIcon";var $e=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("circle",{cx:"4.5",cy:"4.5",r:"2"})));$e.displayName="ThickDotIcon";var Ue=a.default.forwardRef((o,e)=>a.default.createElement("svg",{...o,ref:e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M18 6 6 18"}),a.default.createElement("path",{d:"m6 6 12 12"})));Ue.displayName="CloseIcon";var qe=a.default.forwardRef((o,e)=>a.default.createElement("svg",{...o,ref:e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"})));qe.displayName="PaperclipIcon";var He=a.default.forwardRef((o,e)=>a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),a.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"})));He.displayName="FileIcon";var Ke=a.default.forwardRef((o,e)=>a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),a.default.createElement("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),a.default.createElement("path",{d:"M10 9H8"}),a.default.createElement("path",{d:"M16 13H8"}),a.default.createElement("path",{d:"M16 17H8"})));Ke.displayName="FileTextIcon";var Fe=a.default.forwardRef((o,e)=>a.default.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,ref:e},a.default.createElement("path",{d:"M5 12.75L9.5 17.25L19 7.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})));Fe.displayName="TickIcon";var C=h(require("react")),ce=require("radix-ui");var ee=h(require("classnames"));var Ze=[],Xe=new Set;function Ye(o){let e=Object.assign({},...o),t=[],i=[],s=new Set;for(let r in e){let n=e[r],c=n.values??Ze,l={key:r,type:n.type,default:n.default,hasDefault:n.default!==void 0,responsive:"responsive"in n,className:n.className,customProperties:n.customProperties,parseValue:n.parseValue,values:c,valueSet:c.length>0?new Set(c):Xe,enumValueSet:n.type==="enum"?new Set([n.default,...c]):void 0};n.className?(t.push(l),s.add(r)):(l.hasDefault||n.type==="enum")&&i.push(l)}return{styling:t,passthrough:i,stylingKeys:s}}var Je={children:new WeakMap};function Y(o){let e=Je;for(let t=0;t<o.length;t++){let i=o[t],s=e.children.get(i);s===void 0&&(s={children:new WeakMap},e.children.set(i,s)),e=s}return e.compiled??(e.compiled=Ye(o))}var Qe=["initial","xs","sm","md","lg","xl"],z=new Set(Qe);function L(o,e){return Object.prototype.hasOwnProperty.call(o,e)}var eo=new Set(["initial","xs","sm","md","lg","xl"]);function y(o){if(typeof o!="object"||o===null)return!1;for(let e in o)if(eo.has(e))return!0;return!1}function w(o,e,t){return e!==void 0?e.has(t):o.includes(t)}function Q({className:o,customProperties:e,...t}){let i=O({allowArbitraryValues:!0,className:o,...t}),s=oo({customProperties:e,...t});return[i,s]}function O({allowArbitraryValues:o,value:e,className:t,propValues:i,propValueSet:s,parseValue:r=n=>n}){if(e){if(typeof e=="string")return w(i,s,e)?J(t,e,r):o?t:void 0;if(y(e)){let n=e,c=[];for(let l in n){if(!L(n,l)||!z.has(l))continue;let p=n[l];if(p!==void 0){if(w(i,s,p)){let u=J(t,p,r),d=l==="initial"?u:`${l}:${u}`;c.push(d)}else if(o){let u=l==="initial"?t:`${l}:${t}`;c.push(u)}}}return c.length>0?c.join(" "):""}if(o)return t}}function J(o,e,t){let i=o?"-":"",s=t(e),r=s?.startsWith("-"),n=r?"-":"",c=r?s?.substring(1):s;return`${n}${o}${i}${c}`}function oo({customProperties:o,value:e,propValues:t,propValueSet:i,parseValue:s=r=>r}){if(!e||typeof e=="string"&&w(t,i,e))return;let r;if(typeof e=="string"){let n=s(e);r={};for(let c of o)r[c]=n;return r}if(y(e)){let n=e;for(let c in n){if(!L(n,c)||!z.has(c))continue;let l=n[c];if(l===void 0||w(t,i,l))continue;let p=s(l);r??(r={});for(let u of o){let d=c==="initial"?u:`${u}-${c}`;r[d]=p}}}return r??{}}function _(...o){let e;for(let t of o)t&&(e===void 0&&(e={}),Object.assign(e,t));return e}function to(o,e){let t=o.initial,i=!1;return e.hasDefault&&t===void 0&&(t=e.default,i=!0),e.enumValueSet!==void 0&&!e.enumValueSet.has(t)&&(t=e.default,i=!0),i?{...o,initial:t}:o}function I(o,...e){let{styling:t,passthrough:i,stylingKeys:s}=Y(e),r={};for(let l in o)s.has(l)||(r[l]=o[l]);for(let l=0;l<i.length;l++){let p=i[l],u=r[p.key];if(u===void 0){p.hasDefault&&(r[p.key]=p.default);continue}p.enumValueSet!==void 0&&!p.enumValueSet.has(u)&&!y(u)&&(r[p.key]=p.default)}let n,c=[];for(let l=0;l<t.length;l++){let p=t[l],u=o[p.key];if(u===void 0&&p.hasDefault&&(u=p.default),p.enumValueSet!==void 0&&!p.enumValueSet.has(u)&&!y(u)&&(u=p.default),!!u){if(y(u)){if(!p.responsive)continue;u=to(u,p)}if(p.type==="enum"){let d=O({allowArbitraryValues:!1,value:u,className:p.className,propValues:p.values,propValueSet:p.valueSet,parseValue:p.parseValue});d&&c.push(d);continue}if(p.type==="string"||p.type==="enum | string"){let[d,b]=Q({className:p.className,customProperties:p.customProperties,propValues:p.type==="string"?[]:p.values,propValueSet:p.type==="string"?void 0:p.valueSet,parseValue:p.parseValue,value:u});b&&(n=_(n,b)),d&&c.push(d);continue}if(p.type==="boolean"){c.push(p.className);continue}}}return r.className=(0,ee.default)(c.length>0?c.join(" "):void 0,o.className),r.style=_(n,o.style),r}var ro=["loud","medium","quiet"],oe={emphasis:{type:"enum",className:"kui-emphasis",values:ro,default:void 0}};var no=["normal","start","end","both"],te={trim:{type:"enum",className:"kui-r-lt",values:no,responsive:!0}};var so=["left","center","right"],re={align:{type:"enum",className:"kui-r-ta",values:so,responsive:!0}};var io=["wrap","nowrap","pretty","balance"],ne={wrap:{type:"enum",className:"kui-r-tw",values:io,responsive:!0}};var se={truncate:{type:"boolean",className:"kui-truncate"}};var po=["sans","mono","serif"],ie={font:{type:"enum",className:"kui-r-ff",values:po}};var ao=["regular","medium","semibold"],pe={weight:{type:"enum",className:"kui-r-weight",values:ao,responsive:!0}};var co=["span","div","label","p"],lo=["1","2","3","4","5","6","7","8","9"],ae={as:{type:"enum",values:co,default:"span"},...R,size:{type:"enum",className:"kui-r-size",values:lo,responsive:!0},...ie,...pe,...re,...te,...se,...ne,...D,...oe};var W=C.memo(C.forwardRef((o,e)=>{let{children:t,className:i,asChild:s,as:r="span",color:n,...c}=I(o,ae),l=i?`kui-Text ${i}`:"kui-Text";return s?C.createElement(ce.Slot.Root,{"data-accent-color":n,...c,ref:e,className:l},t):C.createElement(r,{"data-accent-color":n,...c,ref:e,className:l},t)}));W.displayName="Text";var G=h(require("react")),uo="2",le=G.createContext(uo);le.displayName="ThemeSizeContext";function fo(o,e){if(e.includes(o))return o;let t=Number(o),i=e[0],s=1/0;for(let r=0;r<e.length;r++){let n=Math.abs(Number(e[r])-t);n<s&&(s=n,i=e[r])}return i}function ue(o,e){let t=G.useContext(le);return o!==void 0?o:fo(t,e.values)}var me="CheckboxGroup",[mo]=fe.Context.createContextScope(me,[E]),de=E(),[ho,he]=mo(me),Pe=f.forwardRef(({color:o=g.color.default,size:e,variant:t=g.variant.default,...i},s)=>{let r=ue(e,g.size),{__scopeCheckboxGroup:n,className:c,...l}=i,p=de(n);return f.createElement(ho,{scope:n,color:o,size:r,variant:t},f.createElement(K,{...p,...l,ref:s,className:(0,S.default)("kui-CheckboxGroupRoot",c)}))});Pe.displayName="CheckboxGroup.Root";var ye=f.forwardRef((o,e)=>{let{__scopeCheckboxGroup:t,children:i,className:s,style:r,...n}=o,{size:c}=he("CheckboxGroupItem",t);return i?f.createElement(W,{as:"label",size:c,className:(0,S.default)("kui-CheckboxGroupItem",s),style:r},f.createElement(M,{__scopeCheckboxGroup:t,...n,ref:e}),i&&f.createElement("span",{className:"kui-CheckboxGroupItemInner"},i)):f.createElement(M,{__scopeCheckboxGroup:t,...n,ref:e,className:s,style:r})});ye.displayName="CheckboxGroup.Item";var M=f.forwardRef(({__scopeCheckboxGroup:o,...e},t)=>{let i=he("CheckboxGroupItemCheckbox",o),s=de(o),{color:r,className:n}=I({...e,...i},g);return f.createElement(F,{...s,"data-accent-color":r,...e,ref:t,className:(0,S.default)("kui-reset","kui-BaseCheckboxRoot","kui-CheckboxGroupItemCheckbox",n)},f.createElement(Z,{...s,asChild:!0,className:"kui-BaseCheckboxIndicator"},f.createElement(j,null)))});M.displayName="CheckboxGroup.ItemCheckbox";
|
|
2
2
|
//# sourceMappingURL=checkbox-group.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/checkbox-group.tsx", "../../../src/components/checkbox-group.primitive.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/components/_internal/base-checkbox.props.ts", "../../../src/components/checkbox-group.props.tsx", "../../../src/components/icons.tsx", "../../../src/components/text.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/emphasis.prop.ts", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/helpers/theme-size.ts"],
|
|
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 { useThemeSize } from '../helpers/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-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 CheckboxGroupRootOwnProps {}\nconst CheckboxGroupRoot = React.forwardRef<CheckboxGroupRootElement, CheckboxGroupRootProps>(\n (\n {\n color = checkboxGroupRootPropDefs.color.default,\n size: sizeProp,\n variant = checkboxGroupRootPropDefs.variant.default,\n ...props\n }: ScopedProps<CheckboxGroupRootProps>,\n forwardedRef,\n ) => {\n const size = useThemeSize(sizeProp, checkboxGroupRootPropDefs.size);\n const { __scopeCheckboxGroup, className, ...rootProps } = props;\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('kui-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> {}\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('kui-CheckboxGroupItem', className)}\n style={style}\n >\n <CheckboxGroupItemCheckbox\n __scopeCheckboxGroup={__scopeCheckboxGroup}\n {...props}\n ref={forwardedRef}\n />\n {children && <span className=\"kui-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 );\n return (\n <CheckboxGroupPrimitive.Item\n {...checkboxGroupScope}\n data-accent-color={color}\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseCheckboxRoot',\n 'kui-CheckboxGroupItemCheckbox',\n className,\n )}\n >\n <CheckboxGroupPrimitive.Indicator\n {...checkboxGroupScope}\n asChild\n className=\"kui-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", "'use client';\n\nimport * as React from 'react';\nimport { Checkbox as CheckboxPrimitive, Direction } from 'radix-ui';\nimport {\n Context,\n Primitive,\n useComposedRefs,\n RovingFocus,\n useControllableState,\n} from 'radix-ui/internal';\n\nconst { useDirection } = Direction;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = Context.createContextScope(\n CHECKBOX_GROUP_NAME,\n [RovingFocus.createRovingFocusGroupScope, CheckboxPrimitive.createCheckboxScope],\n);\nconst useRovingFocusGroupScope = RovingFocus.createRovingFocusGroupScope();\nconst useCheckboxScope = CheckboxPrimitive.createCheckboxScope();\n\ntype CheckboxGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value?: string[];\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocus.Root>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CheckboxGroupProps extends PrimitiveDivProps {\n name?: CheckboxGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n dir?: RovingFocusGroupProps['dir'];\n orientation?: RovingFocusGroupProps['orientation'];\n loop?: RovingFocusGroupProps['loop'];\n defaultValue?: string[];\n value?: CheckboxGroupContextValue['value'];\n onValueChange?: (value: string[]) => void;\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (props: ScopedProps<CheckboxGroupProps>, forwardedRef) => {\n const {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...groupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeCheckboxGroup);\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n name={name}\n required={required}\n disabled={disabled}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <RovingFocus.Root\n asChild\n {...rovingFocusGroupScope}\n orientation={orientation}\n dir={direction}\n loop={loop}\n >\n <Primitive.div\n role=\"group\"\n data-disabled={disabled ? '' : undefined}\n dir={direction}\n {...groupProps}\n ref={forwardedRef}\n />\n </RovingFocus.Root>\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'CheckboxGroupItem';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\ninterface CheckboxGroupItemProps\n extends Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'> {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, disabled, ...itemProps } = props;\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeCheckboxGroup);\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const ref = React.useRef<React.ElementRef<typeof CheckboxPrimitive.Root>>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const checked = context.value?.includes(itemProps.value);\n\n return (\n <RovingFocus.Item asChild {...rovingFocusGroupScope} focusable={!isDisabled} active={checked}>\n <CheckboxPrimitive.Root\n name={context.name}\n disabled={isDisabled}\n required={context.required}\n checked={checked}\n {...checkboxScope}\n {...itemProps}\n ref={composedRefs}\n onCheckedChange={(checked) => {\n if (checked) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n </RovingFocus.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxGroupIndicator';\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\ninterface CheckboxGroupIndicatorProps extends CheckboxIndicatorProps {}\n\nconst CheckboxGroupIndicator = React.forwardRef<\n CheckboxGroupIndicatorElement,\n CheckboxGroupIndicatorProps\n>((props: ScopedProps<CheckboxGroupIndicatorProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, ...indicatorProps } = props;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n return <CheckboxPrimitive.Indicator {...checkboxScope} {...indicatorProps} ref={forwardedRef} />;\n});\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n //\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { CheckboxGroupProps, CheckboxGroupItemProps, CheckboxGroupIndicatorProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import { colorPropDef } from '../../props/color.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'solid', 'soft', 'outline', 'surface'] as const;\n\nconst baseCheckboxPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { baseCheckboxPropDefs };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { baseCheckboxPropDefs } from './_internal/base-checkbox.props.js';\n\nconst checkboxGroupRootPropDefs = {\n ...asChildPropDef,\n ...baseCheckboxPropDefs,\n};\n\nexport { checkboxGroupRootPropDefs };\n", "import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n});\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickChevronLeftIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronLeftIcon.displayName = 'ThickChevronLeftIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, textPropDefs);\n\n const combinedClassName = className ? `kui-Text ${className}` : 'kui-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst emphases = ['loud', 'medium', 'quiet'] as const;\n\n// Text-first components only (Text, Heading, Blockquote, Code).\n// No colour + emphasis reads the gray ink ladder; colour + emphasis reads the accent ink ladder.\n// Components that need a different default spread this def and override `default`.\nconst emphasisPropDef = {\n emphasis: {\n type: 'enum',\n className: 'kui-emphasis',\n values: emphases,\n default: undefined,\n },\n} satisfies {\n emphasis: PropDef<(typeof emphases)[number]>;\n};\n\nexport { emphasisPropDef, emphases };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'kui-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'kui-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'kui-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'kui-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'kui-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n/** v2's three weights (\u00A715). No bold: a larger size or stronger emphasis says importance. */\nconst weights = ['regular', 'medium', 'semibold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'kui-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "'use client';\n\nimport * as React from 'react';\n\ntype ThemeSize = '1' | '2' | '3' | '4';\n\n/** The rest of the 1-4 index when no Theme states a size. */\nconst THEME_SIZE_DEFAULT: ThemeSize = '2';\n\n/**\n * The app-wide size index, provided by `Theme` beside `ThemeContext`.\n *\n * It is its own context, holding one string, so a component that only needs\n * the size does not re-render when the accent colour or appearance changes.\n */\nconst ThemeSizeContext = React.createContext<ThemeSize>(THEME_SIZE_DEFAULT);\nThemeSizeContext.displayName = 'ThemeSizeContext';\n\ninterface SizePropDef {\n values: readonly string[];\n default?: string;\n}\n\n/**\n * Maps the theme size onto a component's own range: the value itself when the\n * component has it, otherwise the nearest end of the range (`4` on a 1-3 scale\n * is `3`, on a 1-2 scale it is `2`).\n */\nfunction clampSize(size: ThemeSize, values: readonly string[]): string {\n if (values.includes(size)) return size;\n const n = Number(size);\n let nearest = values[0];\n let distance = Infinity;\n for (let i = 0; i < values.length; i++) {\n const d = Math.abs(Number(values[i]) - n);\n if (d < distance) {\n distance = d;\n nearest = values[i];\n }\n }\n return nearest;\n}\n\n/**\n * The size a component on the 1-4 index takes: what the caller said, else the\n * nearest Theme's size, mapped into the component's range.\n */\nfunction useThemeSize<V>(explicit: V | undefined, propDef: SizePropDef): V {\n const themeSize = React.useContext(ThemeSizeContext);\n if (explicit !== undefined) return explicit;\n // The clamped value is one of `propDef.values`, which is what `V` ranges over.\n return clampSize(themeSize, propDef.values) as V;\n}\n\n/**\n * Fills `size` from the nearest Theme when the caller left it unset, so the\n * result can go straight into `extractProps`. An explicit size, responsive\n * object included, wins.\n *\n * Returns the same props object when there is nothing to fill: when a size is\n * set, or when the theme size resolves to the prop def's own default (the\n * common case, a Theme with no size), so `extractProps` applies it as before.\n */\nfunction useThemeSizeProps<P extends { size?: unknown }>(props: P, propDef: SizePropDef): P {\n const themeSize = React.useContext(ThemeSizeContext);\n if (props.size !== undefined) return props;\n const size = clampSize(themeSize, propDef.values);\n if (size === propDef.default) return props;\n return { ...props, size };\n}\n\nexport { ThemeSizeContext, THEME_SIZE_DEFAULT, clampSize, useThemeSize, useThemeSizeProps };\nexport type { ThemeSize };\n"],
|
|
5
|
-
"mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,UAAAE,GAAA,SAAAC,KAAA,eAAAC,GAAAJ,IAEA,IAAAK,EAAuB,oBACvBC,EAAuB,yBACvBC,GAAwB,6BCFxB,IAAAC,EAAuB,oBACvBC,EAAyD,oBACzDC,EAMO,6BAED,CAAE,aAAAC,EAAa,EAAI,YAKnBC,EAAsB,gBAGtB,CAACC,GAA4BC,CAAwB,EAAI,UAAQ,mBACrEF,EACA,CAAC,cAAY,4BAA6B,EAAAG,SAAkB,mBAAmB,CACjF,EACMC,EAA2B,cAAY,4BAA4B,EACnEC,EAAmB,EAAAF,SAAkB,oBAAoB,EAWzD,CAACG,GAAuBC,EAAuB,EACnDN,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,EAAO,GAAGkB,CAAQ,EACvBrB,CACF,EACA,OACE,gBAAwBuB,EAAvB,CACE,GAAGb,EACJ,oBAAmBX,EAClB,GAAGI,EACJ,IAAKC,EACL,aAAW,EAAAQ,SACT,YACA,uBACA,gCACAJ,CACF,GAEA,gBAAwBgB,EAAvB,CACE,GAAGd,EACJ,QAAO,GACP,UAAU,6BAEV,gBAACe,EAAA,IAAe,CAClB,CACF,CAEJ,CAAC,EACDL,EAA0B,YAAc",
|
|
6
|
-
"names": ["checkbox_group_exports", "__export", "CheckboxGroupItem", "CheckboxGroupRoot", "__toCommonJS", "React", "import_classnames", "import_internal", "React", "import_radix_ui", "import_internal", "useDirection", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "createCheckboxGroupScope", "CheckboxPrimitive", "
|
|
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 { useThemeSize } from '../helpers/theme-size.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-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 CheckboxGroupRootOwnProps {}\nconst CheckboxGroupRoot = React.forwardRef<CheckboxGroupRootElement, CheckboxGroupRootProps>(\n (\n {\n color = checkboxGroupRootPropDefs.color.default,\n size: sizeProp,\n variant = checkboxGroupRootPropDefs.variant.default,\n ...props\n }: ScopedProps<CheckboxGroupRootProps>,\n forwardedRef,\n ) => {\n const size = useThemeSize(sizeProp, checkboxGroupRootPropDefs.size);\n const { __scopeCheckboxGroup, className, ...rootProps } = props;\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('kui-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> {}\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 // 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={size}\n className={classNames('kui-CheckboxGroupItem', className)}\n style={style}\n >\n <CheckboxGroupItemCheckbox\n __scopeCheckboxGroup={__scopeCheckboxGroup}\n {...props}\n ref={forwardedRef}\n />\n {children && <span className=\"kui-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 );\n return (\n <CheckboxGroupPrimitive.Item\n {...checkboxGroupScope}\n data-accent-color={color}\n {...props}\n ref={forwardedRef}\n className={classNames(\n 'kui-reset',\n 'kui-BaseCheckboxRoot',\n 'kui-CheckboxGroupItemCheckbox',\n className,\n )}\n >\n <CheckboxGroupPrimitive.Indicator\n {...checkboxGroupScope}\n asChild\n className=\"kui-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", "'use client';\n\nimport * as React from 'react';\nimport { Checkbox as CheckboxPrimitive, Direction } from 'radix-ui';\nimport { Context, Primitive, useControllableState } from 'radix-ui/internal';\n\nconst { useDirection } = Direction;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroup\n * -----------------------------------------------------------------------------------------------*/\nconst CHECKBOX_GROUP_NAME = 'CheckboxGroup';\n\ntype ScopedProps<P> = P & { __scopeCheckboxGroup?: Context.Scope };\nconst [createCheckboxGroupContext, createCheckboxGroupScope] = Context.createContextScope(\n CHECKBOX_GROUP_NAME,\n [CheckboxPrimitive.createCheckboxScope],\n);\nconst useCheckboxScope = CheckboxPrimitive.createCheckboxScope();\n\ntype CheckboxGroupContextValue = {\n name?: string;\n required: boolean;\n disabled: boolean;\n value?: string[];\n onItemCheck(value: string): void;\n onItemUncheck(value: string): void;\n};\n\nconst [CheckboxGroupProvider, useCheckboxGroupContext] =\n createCheckboxGroupContext<CheckboxGroupContextValue>(CHECKBOX_GROUP_NAME);\n\ntype CheckboxGroupElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface CheckboxGroupProps extends PrimitiveDivProps {\n name?: CheckboxGroupContextValue['name'];\n required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];\n disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];\n dir?: 'ltr' | 'rtl';\n /**\n * @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,\n * so there is no arrow-key navigation to orient.\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,\n * so there is no arrow-key navigation to loop.\n */\n loop?: boolean;\n defaultValue?: string[];\n value?: CheckboxGroupContextValue['value'];\n onValueChange?: (value: string[]) => void;\n}\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n (props: ScopedProps<CheckboxGroupProps>, forwardedRef) => {\n const {\n __scopeCheckboxGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation: _orientation,\n dir,\n loop: _loop,\n onValueChange,\n ...groupProps\n } = props;\n const direction = useDirection(dir);\n const [value = [], setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue ?? [],\n onChange: onValueChange,\n });\n\n const handleItemCheck = React.useCallback(\n (itemValue: string) => setValue((prevValue = []) => [...prevValue, itemValue]),\n [setValue],\n );\n\n const handleItemUncheck = React.useCallback(\n (itemValue: string) =>\n setValue((prevValue = []) => prevValue.filter((value) => value !== itemValue)),\n [setValue],\n );\n\n return (\n <CheckboxGroupProvider\n scope={__scopeCheckboxGroup}\n name={name}\n required={required}\n disabled={disabled}\n value={value}\n onItemCheck={handleItemCheck}\n onItemUncheck={handleItemUncheck}\n >\n <Primitive.div\n role=\"group\"\n data-disabled={disabled ? '' : undefined}\n dir={direction}\n {...groupProps}\n ref={forwardedRef}\n />\n </CheckboxGroupProvider>\n );\n },\n);\n\nCheckboxGroup.displayName = CHECKBOX_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'CheckboxGroupItem';\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxPrimitive.Root>;\ntype CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>;\ninterface CheckboxGroupItemProps\n extends Omit<CheckboxProps, 'checked' | 'defaultChecked' | 'onCheckedChange' | 'name'> {\n value: string;\n}\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n (props: ScopedProps<CheckboxGroupItemProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, disabled, ...itemProps } = props;\n const context = useCheckboxGroupContext(ITEM_NAME, __scopeCheckboxGroup);\n const isDisabled = context.disabled || disabled;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n const checked = context.value?.includes(itemProps.value);\n // A required group needs at least one box checked, not every box: the items are\n // required only while none is checked.\n const isRequired = context.required && (context.value?.length ?? 0) === 0;\n\n return (\n <CheckboxPrimitive.Root\n name={context.name}\n disabled={isDisabled}\n required={isRequired}\n checked={checked}\n {...checkboxScope}\n {...itemProps}\n ref={forwardedRef}\n onCheckedChange={(checked) => {\n if (checked) {\n context.onItemCheck(props.value);\n } else {\n context.onItemUncheck(props.value);\n }\n }}\n />\n );\n },\n);\n\nCheckboxGroupItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * CheckboxGroupIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'CheckboxGroupIndicator';\n\ntype CheckboxGroupIndicatorElement = React.ElementRef<typeof CheckboxPrimitive.Indicator>;\ntype CheckboxIndicatorProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Indicator>;\ninterface CheckboxGroupIndicatorProps extends CheckboxIndicatorProps {}\n\nconst CheckboxGroupIndicator = React.forwardRef<\n CheckboxGroupIndicatorElement,\n CheckboxGroupIndicatorProps\n>((props: ScopedProps<CheckboxGroupIndicatorProps>, forwardedRef) => {\n const { __scopeCheckboxGroup, ...indicatorProps } = props;\n const checkboxScope = useCheckboxScope(__scopeCheckboxGroup);\n return <CheckboxPrimitive.Indicator {...checkboxScope} {...indicatorProps} ref={forwardedRef} />;\n});\n\nCheckboxGroupIndicator.displayName = INDICATOR_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = CheckboxGroup;\nconst Item = CheckboxGroupItem;\nconst Indicator = CheckboxGroupIndicator;\n\nexport {\n createCheckboxGroupScope,\n //\n CheckboxGroup,\n CheckboxGroupItem,\n CheckboxGroupIndicator,\n //\n Root,\n Item,\n Indicator,\n};\nexport type { CheckboxGroupProps, CheckboxGroupItemProps, CheckboxGroupIndicatorProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Chip, Avatar, Code): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import { colorPropDef } from '../../props/color.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst variants = ['raised', 'solid', 'soft', 'outline', 'surface'] as const;\n\nconst baseCheckboxPropDefs = {\n size: { type: 'enum', className: 'kui-r-size', values: sizes, default: '2', responsive: true },\n variant: { type: 'enum', className: 'kui-variant', values: variants, default: 'raised' },\n ...colorPropDef,\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport { baseCheckboxPropDefs };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { baseCheckboxPropDefs } from './_internal/base-checkbox.props.js';\n\nconst checkboxGroupRootPropDefs = {\n ...asChildPropDef,\n ...baseCheckboxPropDefs,\n};\n\nexport { checkboxGroupRootPropDefs };\n", "import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n});\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickChevronLeftIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronLeftIcon.displayName = 'ThickChevronLeftIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\n/** The tick a button shows in place of its icon while `done`. Drawn on the 24 grid at the icon set's stroke. */\nconst TickIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M5 12.75L9.5 17.25L19 7.25\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n );\n});\nTickIcon.displayName = 'TickIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon, TickIcon };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, textPropDefs);\n\n const combinedClassName = className ? `kui-Text ${className}` : 'kui-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { PropDef } from './prop-def.js';\n\nconst emphases = ['loud', 'medium', 'quiet'] as const;\n\n// Text-first components only (Text, Heading, Blockquote, Code).\n// No colour + emphasis reads the gray ink ladder; colour + emphasis reads the accent ink ladder.\n// Components that need a different default spread this def and override `default`.\nconst emphasisPropDef = {\n emphasis: {\n type: 'enum',\n className: 'kui-emphasis',\n values: emphases,\n default: undefined,\n },\n} satisfies {\n emphasis: PropDef<(typeof emphases)[number]>;\n};\n\nexport { emphasisPropDef, emphases };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'kui-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'kui-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'kui-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'kui-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'kui-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n/** v2's three weights (\u00A715). No bold: a larger size or stronger emphasis says importance. */\nconst weights = ['regular', 'medium', 'semibold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'kui-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { emphasisPropDef } from '../props/emphasis.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['1', '2', '3', '4', '5', '6', '7', '8', '9'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'kui-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...emphasisPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "'use client';\n\nimport * as React from 'react';\n\ntype ThemeSize = '1' | '2' | '3' | '4';\n\n/** The rest of the 1-4 index when no Theme states a size. */\nconst THEME_SIZE_DEFAULT: ThemeSize = '2';\n\n/**\n * The app-wide size index, provided by `Theme` beside `ThemeContext`.\n *\n * It is its own context, holding one string, so a component that only needs\n * the size does not re-render when the accent colour or appearance changes.\n */\nconst ThemeSizeContext = React.createContext<ThemeSize>(THEME_SIZE_DEFAULT);\nThemeSizeContext.displayName = 'ThemeSizeContext';\n\ninterface SizePropDef {\n values: readonly string[];\n default?: string;\n}\n\n/**\n * Maps the theme size onto a component's own range: the value itself when the\n * component has it, otherwise the nearest end of the range (`4` on a 1-3 scale\n * is `3`, on a 1-2 scale it is `2`).\n */\nfunction clampSize(size: ThemeSize, values: readonly string[]): string {\n if (values.includes(size)) return size;\n const n = Number(size);\n let nearest = values[0];\n let distance = Infinity;\n for (let i = 0; i < values.length; i++) {\n const d = Math.abs(Number(values[i]) - n);\n if (d < distance) {\n distance = d;\n nearest = values[i];\n }\n }\n return nearest;\n}\n\n/**\n * The size a component on the 1-4 index takes: what the caller said, else the\n * nearest Theme's size, mapped into the component's range.\n */\nfunction useThemeSize<V>(explicit: V | undefined, propDef: SizePropDef): V {\n const themeSize = React.useContext(ThemeSizeContext);\n if (explicit !== undefined) return explicit;\n // The clamped value is one of `propDef.values`, which is what `V` ranges over.\n return clampSize(themeSize, propDef.values) as V;\n}\n\n/**\n * Fills `size` from the nearest Theme when the caller left it unset, so the\n * result can go straight into `extractProps`. An explicit size, responsive\n * object included, wins.\n *\n * Returns the same props object when there is nothing to fill: when a size is\n * set, or when the theme size resolves to the prop def's own default (the\n * common case, a Theme with no size), so `extractProps` applies it as before.\n */\nfunction useThemeSizeProps<P extends { size?: unknown }>(props: P, propDef: SizePropDef): P {\n const themeSize = React.useContext(ThemeSizeContext);\n if (props.size !== undefined) return props;\n const size = clampSize(themeSize, propDef.values);\n if (size === propDef.default) return props;\n return { ...props, size };\n}\n\nexport { ThemeSizeContext, THEME_SIZE_DEFAULT, clampSize, useThemeSize, useThemeSizeProps };\nexport type { ThemeSize };\n"],
|
|
5
|
+
"mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,UAAAE,GAAA,SAAAC,KAAA,eAAAC,GAAAJ,IAEA,IAAAK,EAAuB,oBACvBC,EAAuB,yBACvBC,GAAwB,6BCFxB,IAAAC,EAAuB,oBACvBC,EAAyD,oBACzDC,EAAyD,6BAEnD,CAAE,aAAAC,EAAa,EAAI,YAKnBC,EAAsB,gBAGtB,CAACC,GAA4BC,CAAwB,EAAI,UAAQ,mBACrEF,EACA,CA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EAAO,UAAAS,CAAU,EAAIY,EAC3B,CAAE,GAAGjB,EAAO,GAAGgB,CAAQ,EACvBnB,CACF,EACA,OACE,gBAAwBqB,EAAvB,CACE,GAAGX,EACJ,oBAAmBX,EAClB,GAAGI,EACJ,IAAKC,EACL,aAAW,EAAAQ,SACT,YACA,uBACA,gCACAJ,CACF,GAEA,gBAAwBc,EAAvB,CACE,GAAGZ,EACJ,QAAO,GACP,UAAU,6BAEV,gBAACa,EAAA,IAAe,CAClB,CACF,CAEJ,CAAC,EACDL,EAA0B,YAAc",
|
|
6
|
+
"names": ["checkbox_group_exports", "__export", "CheckboxGroupItem", "CheckboxGroupRoot", "__toCommonJS", "React", "import_classnames", "import_internal", "React", "import_radix_ui", "import_internal", "useDirection", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "createCheckboxGroupScope", "CheckboxPrimitive", "useCheckboxScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "CheckboxGroup", "props", "forwardedRef", "__scopeCheckboxGroup", "name", "defaultValue", "valueProp", "required", "disabled", "_orientation", "dir", "_loop", "onValueChange", "groupProps", "direction", "value", "setValue", "handleItemCheck", "itemValue", "prevValue", "handleItemUncheck", "ITEM_NAME", "CheckboxGroupItem", "itemProps", "context", "isDisabled", "checkboxScope", "checked", "isRequired", "INDICATOR_NAME", "CheckboxGroupIndicator", "indicatorProps", "Root", "Item", "Indicator", "asChildPropDef", "accentColors", "colorPropDef", "accentColors", "sizes", "variants", "baseCheckboxPropDefs", "colorPropDef", "checkboxGroupRootPropDefs", "asChildPropDef", "baseCheckboxPropDefs", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "TickIcon", "React", "import_radix_ui", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "emphases", "emphasisPropDef", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "emphasisPropDef", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "textPropDefs", "combinedClassName", "React", "THEME_SIZE_DEFAULT", "ThemeSizeContext", "clampSize", "size", "values", "n", "nearest", "distance", "i", "d", "useThemeSize", "explicit", "propDef", "themeSize", "CHECKBOX_GROUP_NAME", "createCheckboxGroupContext", "createCheckboxGroupScope", "useCheckboxGroupScope", "CheckboxGroupProvider", "useCheckboxGroupContext", "CheckboxGroupRoot", "color", "checkboxGroupRootPropDefs", "sizeProp", "variant", "props", "forwardedRef", "size", "useThemeSize", "__scopeCheckboxGroup", "className", "rootProps", "checkboxGroupScope", "Root", "classNames", "CheckboxGroupItem", "_props", "children", "style", "Text", "CheckboxGroupItemCheckbox", "context", "extractProps", "Item", "Indicator", "ThickCheckIcon"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Checkbox as CheckboxPrimitive } from 'radix-ui';
|
|
3
|
-
import { Context, Primitive
|
|
3
|
+
import { Context, Primitive } from 'radix-ui/internal';
|
|
4
4
|
declare const createCheckboxGroupScope: Context.CreateScope;
|
|
5
5
|
type CheckboxGroupContextValue = {
|
|
6
6
|
name?: string;
|
|
@@ -10,15 +10,22 @@ type CheckboxGroupContextValue = {
|
|
|
10
10
|
onItemCheck(value: string): void;
|
|
11
11
|
onItemUncheck(value: string): void;
|
|
12
12
|
};
|
|
13
|
-
type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocus.Root>;
|
|
14
13
|
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
15
14
|
interface CheckboxGroupProps extends PrimitiveDivProps {
|
|
16
15
|
name?: CheckboxGroupContextValue['name'];
|
|
17
16
|
required?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['required'];
|
|
18
17
|
disabled?: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>['disabled'];
|
|
19
|
-
dir?:
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
dir?: 'ltr' | 'rtl';
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,
|
|
21
|
+
* so there is no arrow-key navigation to orient.
|
|
22
|
+
*/
|
|
23
|
+
orientation?: 'horizontal' | 'vertical';
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Has no effect. Each checkbox is its own tab stop, as with native checkboxes,
|
|
26
|
+
* so there is no arrow-key navigation to loop.
|
|
27
|
+
*/
|
|
28
|
+
loop?: boolean;
|
|
22
29
|
defaultValue?: string[];
|
|
23
30
|
value?: CheckboxGroupContextValue['value'];
|
|
24
31
|
onValueChange?: (value: string[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.primitive.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox-group.primitive.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAa,MAAM,UAAU,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"checkbox-group.primitive.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox-group.primitive.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAa,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAwB,MAAM,mBAAmB,CAAC;AAU7E,QAAA,MAAmC,wBAAwB,qBAG1D,CAAC;AAGF,KAAK,yBAAyB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC,CAAC;AAMF,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9E,UAAU,kBAAmB,SAAQ,iBAAiB;IACpD,IAAI,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,iBAAiB,CAAC,IAAI,C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,2BAA2B,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var N=Object.create;var C=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var M=(e,o)=>{for(var t in o)C(e,t,{get:o[t],enumerable:!0})},G=(e,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of U(o))!A.call(e,r)&&r!==t&&C(e,r,{get:()=>o[r],enumerable:!(i=D(o,r))||i.enumerable});return e};var O=(e,o,t)=>(t=e!=null?N(W(e)):{},G(o||!e||!e.__esModule?C(t,"default",{value:e,enumerable:!0}):t,e)),w=e=>G(C({},"__esModule",{value:!0}),e);var L={};M(L,{CheckboxGroup:()=>x,CheckboxGroupIndicator:()=>P,CheckboxGroupItem:()=>m,Indicator:()=>J,Item:()=>F,Root:()=>j,createCheckboxGroupScope:()=>B});module.exports=w(L);var c=O(require("react")),a=require("radix-ui"),p=require("radix-ui/internal"),{useDirection:T}=a.Direction,k="CheckboxGroup",[z,B]=p.Context.createContextScope(k,[a.Checkbox.createCheckboxScope]),I=a.Checkbox.createCheckboxScope(),[H,K]=z(k),x=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,name:i,defaultValue:r,value:n,required:d=!1,disabled:s=!1,orientation:f,dir:h,loop:v,onValueChange:y,...g}=e,E=T(h),[_=[],u]=(0,p.useControllableState)({prop:n,defaultProp:r??[],onChange:y}),S=c.useCallback(l=>u((b=[])=>[...b,l]),[u]),V=c.useCallback(l=>u((b=[])=>b.filter(q=>q!==l)),[u]);return c.createElement(H,{scope:t,name:i,required:d,disabled:s,value:_,onItemCheck:S,onItemUncheck:V},c.createElement(p.Primitive.div,{role:"group","data-disabled":s?"":void 0,dir:E,...g,ref:o}))});x.displayName=k;var R="CheckboxGroupItem",m=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,disabled:i,...r}=e,n=K(R,t),d=n.disabled||i,s=I(t),f=n.value?.includes(r.value),h=n.required&&(n.value?.length??0)===0;return c.createElement(a.Checkbox.Root,{name:n.name,disabled:d,required:h,checked:f,...s,...r,ref:o,onCheckedChange:v=>{v?n.onItemCheck(e.value):n.onItemUncheck(e.value)}})});m.displayName=R;var X="CheckboxGroupIndicator",P=c.forwardRef((e,o)=>{let{__scopeCheckboxGroup:t,...i}=e,r=I(t);return c.createElement(a.Checkbox.Indicator,{...r,...i,ref:o})});P.displayName=X;var j=x,F=m,J=P;
|
|
2
2
|
//# sourceMappingURL=checkbox-group.primitive.js.map
|