@btst/stack 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/components/index.cjs +2 -2
- package/dist/client/components/index.mjs +2 -2
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.mjs +3 -3
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +825 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +814 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +763 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +751 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +375 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +350 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +160 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +182 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +161 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +137 -0
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.1/node_modules/@radix-ui/number/dist/index.cjs +8 -0
- package/dist/node_modules/.pnpm/@radix-ui_number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs +6 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@1_9e04309f365863673e44407648bb0cb6/node_modules/@radix-ui/react-arrow/dist/index.cjs +42 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-arrow@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@1_9e04309f365863673e44407648bb0cb6/node_modules/@radix-ui/react-arrow/dist/index.mjs +25 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_re_6d7c277722b3619c9ee7e64e9a822c45/node_modules/@radix-ui/react-collection/dist/index.cjs +77 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_re_6d7c277722b3619c9ee7e64e9a822c45/node_modules/@radix-ui/react-collection/dist/index.mjs +71 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +56 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +39 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.cjs +79 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs +63 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-direction/dist/index.cjs +27 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-direction@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.2_@types_react@19.2.2__@_ca5522e5d45d4722cb9eb5ce53defa61/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +229 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.2_@types_react@19.2.2__@_ca5522e5d45d4722cb9eb5ce53defa61/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +212 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +46 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +30 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_r_93de389b3f622f9f764acc8e59ec80c0/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +224 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.2_@types_react@19.2.2__@types_r_93de389b3f622f9f764acc8e59ec80c0/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +208 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.cjs +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.mjs +15 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_d6285b8269ea5d6b59b300f5be279a0c/node_modules/@radix-ui/react-popper/dist/index.cjs +308 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.8_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_d6285b8269ea5d6b59b300f5be279a0c/node_modules/@radix-ui/react-popper/dist/index.mjs +284 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_478b3d5dd4afab1a3dcce7ed1748cb95/node_modules/@radix-ui/react-portal/dist/index.cjs +37 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_478b3d5dd4afab1a3dcce7ed1748cb95/node_modules/@radix-ui/react-portal/dist/index.mjs +18 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.2_@types_react@19.2.2__@types_rea_bdc15f10281778271ffcbe8dd3cd491e/node_modules/@radix-ui/react-primitive/dist/index.cjs +61 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.2_@types_react@19.2.2__@types_rea_bdc15f10281778271ffcbe8dd3cd491e/node_modules/@radix-ui/react-primitive/dist/index.mjs +43 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07/node_modules/@radix-ui/react-select/dist/index.cjs +1198 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07/node_modules/@radix-ui/react-select/dist/index.mjs +1154 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +28 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +12 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +86 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +70 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +34 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +18 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +23 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +7 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-previous/dist/index.cjs +31 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-previous@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs +15 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-size/dist/index.cjs +56 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-size@1.1.1_@types_react@19.2.2_react@19.2.0/node_modules/@radix-ui/react-use-size/dist/index.mjs +40 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.2_@types_react@19.2.2__@typ_a84e98a44624c31e835a98d4b8b0c30d/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +51 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.2.3_@types_react-dom@19.2.2_@types_react@19.2.2__@typ_a84e98a44624c31e835a98d4b8b0c30d/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +34 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.cjs +139 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.mjs +137 -0
- package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.0/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.cjs +39 -0
- package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.0/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.mjs +37 -0
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.cjs +43 -0
- package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.mjs +38 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.cjs +1671 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.mjs +1669 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.cjs +10 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.mjs +8 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +74 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.mjs +56 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +15 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.mjs +10 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +34 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.mjs +31 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +25 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.mjs +9 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +178 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.mjs +160 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs +54 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/UI.mjs +38 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +23 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.mjs +21 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +113 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.mjs +110 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/medium.mjs +5 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +9 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.2_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.mjs +7 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/component.cjs +21 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/component.mjs +19 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/hook.cjs +41 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/hook.mjs +25 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/singleton.cjs +53 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.2_react@19.2.0/node_modules/react-style-singleton/dist/es2015/singleton.mjs +51 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +59 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs +56 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +26 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.mjs +24 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +64 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.mjs +48 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useRef.cjs +44 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.2_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useRef.mjs +42 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/use-sidecar/dist/es2015/exports.cjs +37 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/use-sidecar/dist/es2015/exports.mjs +21 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/use-sidecar/dist/es2015/medium.cjs +79 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.2_react@19.2.0/node_modules/use-sidecar/dist/es2015/medium.mjs +77 -0
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/image-field.cjs +3 -3
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/image-field.mjs +3 -3
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/post-forms.cjs +5 -5
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/post-forms.mjs +5 -5
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/tags-multiselect.cjs +2 -6
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/tags-multiselect.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/form-page-skeleton.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/form-page-skeleton.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/list-page-skeleton.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/list-page-skeleton.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/page-header-skeleton.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/page-header-skeleton.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-card-skeleton.cjs +2 -2
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-card-skeleton.mjs +2 -2
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-page-skeleton.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/post-page-skeleton.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.internal.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.internal.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/empty-list.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/empty-list.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/on-this-page.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/on-this-page.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-card.cjs +2 -2
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-card.mjs +2 -2
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-navigation.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/post-navigation.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/posts-list.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/posts-list.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/recent-posts-carousel.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/recent-posts-carousel.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-modal.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-modal.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/tags-list.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/tags-list.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/blog-hooks.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/blog-hooks.mjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/plugin.cjs +1 -1
- package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/plugin.mjs +1 -1
- package/dist/packages/ui/src/components/badge.cjs +42 -0
- package/dist/packages/ui/src/components/badge.mjs +39 -0
- package/dist/packages/ui/src/components/button.cjs +54 -0
- package/dist/packages/ui/src/components/button.mjs +51 -0
- package/dist/packages/ui/src/components/card.cjs +67 -0
- package/dist/packages/ui/src/components/card.mjs +61 -0
- package/dist/packages/ui/src/components/carousel.cjs +215 -0
- package/dist/packages/ui/src/components/carousel.mjs +195 -0
- package/dist/packages/ui/src/components/command.cjs +142 -0
- package/dist/packages/ui/src/components/command.mjs +134 -0
- package/dist/packages/ui/src/components/dialog.cjs +127 -0
- package/dist/packages/ui/src/components/dialog.mjs +105 -0
- package/dist/packages/ui/src/components/empty.cjs +76 -0
- package/dist/packages/ui/src/components/empty.mjs +71 -0
- package/dist/packages/ui/src/components/form.cjs +133 -0
- package/dist/packages/ui/src/components/form.mjs +110 -0
- package/dist/packages/ui/src/components/input.cjs +23 -0
- package/dist/packages/ui/src/components/input.mjs +21 -0
- package/dist/packages/ui/src/components/label.cjs +39 -0
- package/dist/packages/ui/src/components/label.mjs +23 -0
- package/dist/packages/ui/src/components/multi-select.cjs +555 -0
- package/dist/packages/ui/src/components/multi-select.mjs +540 -0
- package/dist/packages/ui/src/components/select.cjs +140 -0
- package/dist/packages/ui/src/components/select.mjs +132 -0
- package/dist/packages/ui/src/components/skeleton.cjs +17 -0
- package/dist/packages/ui/src/components/skeleton.mjs +15 -0
- package/dist/packages/ui/src/components/switch.cjs +48 -0
- package/dist/packages/ui/src/components/switch.mjs +32 -0
- package/dist/packages/ui/src/components/textarea.cjs +20 -0
- package/dist/packages/ui/src/components/textarea.mjs +18 -0
- package/dist/packages/ui/src/hooks/use-debounce.cjs +18 -0
- package/dist/packages/ui/src/hooks/use-debounce.mjs +16 -0
- package/dist/packages/ui/src/lib/utils.cjs +10 -0
- package/dist/packages/ui/src/lib/utils.mjs +8 -0
- package/dist/plugins/blog/api/index.cjs +1 -1
- package/dist/plugins/blog/api/index.mjs +1 -1
- package/dist/plugins/blog/client/components/index.cjs +4 -4
- package/dist/plugins/blog/client/components/index.mjs +4 -4
- package/dist/plugins/blog/client/hooks/index.cjs +1 -1
- package/dist/plugins/blog/client/hooks/index.mjs +1 -1
- package/dist/plugins/blog/client/index.cjs +1 -1
- package/dist/plugins/blog/client/index.d.cts +164 -177
- package/dist/plugins/blog/client/index.d.mts +164 -177
- package/dist/plugins/blog/client/index.d.ts +164 -177
- package/dist/plugins/blog/client/index.mjs +1 -1
- package/dist/plugins/client/index.cjs +1 -1
- package/dist/plugins/client/index.d.cts +8 -5
- package/dist/plugins/client/index.d.mts +8 -5
- package/dist/plugins/client/index.d.ts +8 -5
- package/dist/plugins/client/index.mjs +1 -1
- package/package.json +5 -5
- package/src/plugins/client/index.ts +14 -6
- /package/dist/{client → packages/better-stack/src/client}/components/compose.cjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/components/compose.mjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/components/error-boundary.cjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/components/error-boundary.mjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/meta-utils.cjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/meta-utils.mjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/path-utils.cjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/path-utils.mjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/sitemap-utils.cjs +0 -0
- /package/dist/{client → packages/better-stack/src/client}/sitemap-utils.mjs +0 -0
- /package/dist/{context → packages/better-stack/src/context}/provider.cjs +0 -0
- /package/dist/{context → packages/better-stack/src/context}/provider.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/api/plugin.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/api/plugin.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/markdown-editor.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/forms/markdown-editor.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/index.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/loading/index.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/404-page.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/404-page.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.internal.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.internal.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/edit-post-page.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.internal.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.internal.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/home-page.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.internal.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.internal.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/new-post-page.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/post-page.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.internal.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.internal.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/pages/tag-page.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/better-blog-attribution.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/better-blog-attribution.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/default-error.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/default-error.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/defaults.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/defaults.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/error-placeholder.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/error-placeholder.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/highlight-text.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/highlight-text.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/markdown-content.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/markdown-content.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-header.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-header.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-layout.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-layout.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-wrapper.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/page-wrapper.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-input.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/search-input.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/use-route-lifecycle.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/components/shared/use-route-lifecycle.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/use-debounce.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/hooks/use-debounce.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-card.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-card.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-common.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-common.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-forms.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-forms.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-list.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-list.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-post.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/blog-post.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/index.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/client/localization/index.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/db.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/db.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/schemas.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/schemas.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/utils.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/blog/utils.mjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/utils.cjs +0 -0
- /package/dist/{plugins → packages/better-stack/src/plugins}/utils.mjs +0 -0
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { Command as Command$1, useCommandState } from 'cmdk';
|
|
4
|
+
import { X } from 'lucide-react';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { useMemo, useEffect, useCallback, forwardRef } from 'react';
|
|
7
|
+
import { Badge } from './badge.mjs';
|
|
8
|
+
import { CommandItem, Command, CommandList, CommandGroup } from './command.mjs';
|
|
9
|
+
import { cn } from '../lib/utils.mjs';
|
|
10
|
+
import { useDebounce } from '../hooks/use-debounce.mjs';
|
|
11
|
+
|
|
12
|
+
const EMPTY_ARRAY = [];
|
|
13
|
+
function transToGroupOption(options, groupBy) {
|
|
14
|
+
if (options.length === 0) {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
if (!groupBy) {
|
|
18
|
+
return {
|
|
19
|
+
"": options
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const groupOption = {};
|
|
23
|
+
options.forEach((option) => {
|
|
24
|
+
const key = option[groupBy] || "";
|
|
25
|
+
if (!groupOption[key]) {
|
|
26
|
+
groupOption[key] = [];
|
|
27
|
+
}
|
|
28
|
+
groupOption[key].push(option);
|
|
29
|
+
});
|
|
30
|
+
return groupOption;
|
|
31
|
+
}
|
|
32
|
+
function removePickedOption(groupOption, picked) {
|
|
33
|
+
const cloneOption = JSON.parse(JSON.stringify(groupOption));
|
|
34
|
+
for (const [key, value] of Object.entries(cloneOption)) {
|
|
35
|
+
cloneOption[key] = value.filter(
|
|
36
|
+
(val) => !picked.find((p) => p.value === val.value)
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
return cloneOption;
|
|
40
|
+
}
|
|
41
|
+
function isOptionsExist(groupOption, targetOption) {
|
|
42
|
+
for (const [, value] of Object.entries(groupOption)) {
|
|
43
|
+
if (value.some((option) => targetOption.find((p) => p.value === option.value))) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
const CommandEmpty = forwardRef(({ className, ...props }, forwardedRef) => {
|
|
50
|
+
const render = useCommandState((state) => state.filtered.count === 0);
|
|
51
|
+
if (!render) return null;
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
ref: forwardedRef,
|
|
56
|
+
className: cn("py-6 text-center text-sm", className),
|
|
57
|
+
"cmdk-empty": "",
|
|
58
|
+
role: "presentation",
|
|
59
|
+
...props
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
CommandEmpty.displayName = "CommandEmpty";
|
|
64
|
+
const MultipleSelector = React.forwardRef(
|
|
65
|
+
({
|
|
66
|
+
value,
|
|
67
|
+
onChange,
|
|
68
|
+
placeholder,
|
|
69
|
+
defaultOptions: arrayDefaultOptions = EMPTY_ARRAY,
|
|
70
|
+
options: arrayOptions,
|
|
71
|
+
delay,
|
|
72
|
+
onSearch,
|
|
73
|
+
onSearchSync,
|
|
74
|
+
loadingIndicator,
|
|
75
|
+
emptyIndicator,
|
|
76
|
+
maxSelected = Number.MAX_SAFE_INTEGER,
|
|
77
|
+
onMaxSelected,
|
|
78
|
+
hidePlaceholderWhenSelected,
|
|
79
|
+
disabled,
|
|
80
|
+
groupBy,
|
|
81
|
+
className,
|
|
82
|
+
badgeClassName,
|
|
83
|
+
selectFirstItem = true,
|
|
84
|
+
creatable = false,
|
|
85
|
+
triggerSearchOnFocus = false,
|
|
86
|
+
commandProps,
|
|
87
|
+
inputProps,
|
|
88
|
+
hideClearAllButton = false
|
|
89
|
+
}, ref) => {
|
|
90
|
+
const inputRef = React.useRef(null);
|
|
91
|
+
const [open, setOpen] = React.useState(false);
|
|
92
|
+
const [onScrollbar, setOnScrollbar] = React.useState(false);
|
|
93
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
94
|
+
const dropdownRef = React.useRef(null);
|
|
95
|
+
const [selected, setSelected] = React.useState(
|
|
96
|
+
value || EMPTY_ARRAY
|
|
97
|
+
);
|
|
98
|
+
const [options, setOptions] = React.useState(
|
|
99
|
+
transToGroupOption(arrayDefaultOptions, groupBy)
|
|
100
|
+
);
|
|
101
|
+
const [inputValue, setInputValue] = React.useState("");
|
|
102
|
+
const debouncedSearchTerm = useDebounce(inputValue, delay || 500);
|
|
103
|
+
const selectedValue = useMemo(() => {
|
|
104
|
+
return {
|
|
105
|
+
selectedValue: [...selected],
|
|
106
|
+
input: inputRef.current,
|
|
107
|
+
focus: () => inputRef?.current?.focus(),
|
|
108
|
+
reset: () => setSelected([])
|
|
109
|
+
};
|
|
110
|
+
}, [selected]);
|
|
111
|
+
React.useImperativeHandle(ref, () => selectedValue, [selectedValue]);
|
|
112
|
+
const handleClickOutside = (event) => {
|
|
113
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
|
|
114
|
+
setOpen(false);
|
|
115
|
+
inputRef.current.blur();
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const handleUnselect = React.useCallback(
|
|
119
|
+
(option) => {
|
|
120
|
+
const newOptions = selected.filter((s) => s.value !== option.value);
|
|
121
|
+
setSelected(newOptions);
|
|
122
|
+
onChange?.(newOptions);
|
|
123
|
+
},
|
|
124
|
+
[onChange, selected]
|
|
125
|
+
);
|
|
126
|
+
const handleKeyDown = React.useCallback(
|
|
127
|
+
(e) => {
|
|
128
|
+
const input = inputRef.current;
|
|
129
|
+
if (input) {
|
|
130
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
131
|
+
if (input.value === "" && selected.length > 0) {
|
|
132
|
+
const lastSelectOption = selected[selected.length - 1];
|
|
133
|
+
if (lastSelectOption && !lastSelectOption.fixed) {
|
|
134
|
+
handleUnselect(lastSelectOption);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (e.key === "Escape") {
|
|
139
|
+
input.blur();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
[handleUnselect, selected]
|
|
144
|
+
);
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (open) {
|
|
147
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
148
|
+
document.addEventListener("touchend", handleClickOutside);
|
|
149
|
+
} else {
|
|
150
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
151
|
+
document.removeEventListener("touchend", handleClickOutside);
|
|
152
|
+
}
|
|
153
|
+
return () => {
|
|
154
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
155
|
+
document.removeEventListener("touchend", handleClickOutside);
|
|
156
|
+
};
|
|
157
|
+
}, [open]);
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
if (value) {
|
|
160
|
+
setSelected(value);
|
|
161
|
+
}
|
|
162
|
+
}, [value]);
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
if (!arrayOptions || onSearch) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const newOption = transToGroupOption(
|
|
168
|
+
arrayOptions || EMPTY_ARRAY,
|
|
169
|
+
groupBy
|
|
170
|
+
);
|
|
171
|
+
if (JSON.stringify(newOption) !== JSON.stringify(options)) {
|
|
172
|
+
setOptions(newOption);
|
|
173
|
+
}
|
|
174
|
+
}, [arrayDefaultOptions, arrayOptions, groupBy, onSearch, options]);
|
|
175
|
+
useEffect(() => {
|
|
176
|
+
const doSearchSync = () => {
|
|
177
|
+
const res = onSearchSync?.(debouncedSearchTerm);
|
|
178
|
+
setOptions(transToGroupOption(res || [], groupBy));
|
|
179
|
+
};
|
|
180
|
+
const exec = async () => {
|
|
181
|
+
if (!onSearchSync || !open) return;
|
|
182
|
+
if (triggerSearchOnFocus) {
|
|
183
|
+
doSearchSync();
|
|
184
|
+
}
|
|
185
|
+
if (debouncedSearchTerm) {
|
|
186
|
+
doSearchSync();
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
void exec();
|
|
190
|
+
}, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus]);
|
|
191
|
+
useEffect(() => {
|
|
192
|
+
const doSearch = async () => {
|
|
193
|
+
setIsLoading(true);
|
|
194
|
+
const res = await onSearch?.(debouncedSearchTerm);
|
|
195
|
+
setOptions(transToGroupOption(res || [], groupBy));
|
|
196
|
+
setIsLoading(false);
|
|
197
|
+
};
|
|
198
|
+
const exec = async () => {
|
|
199
|
+
if (!onSearch || !open) return;
|
|
200
|
+
if (triggerSearchOnFocus) {
|
|
201
|
+
await doSearch();
|
|
202
|
+
}
|
|
203
|
+
if (debouncedSearchTerm) {
|
|
204
|
+
await doSearch();
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
void exec();
|
|
208
|
+
}, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus]);
|
|
209
|
+
const handleCommandKeyDown = useCallback(
|
|
210
|
+
(e) => {
|
|
211
|
+
handleKeyDown(e);
|
|
212
|
+
commandProps?.onKeyDown?.(e);
|
|
213
|
+
},
|
|
214
|
+
[handleKeyDown, commandProps]
|
|
215
|
+
);
|
|
216
|
+
const handleBadgeGroupClick = useCallback(() => {
|
|
217
|
+
if (disabled) return;
|
|
218
|
+
inputRef?.current?.focus();
|
|
219
|
+
}, [disabled]);
|
|
220
|
+
const targetOption = useMemo(() => {
|
|
221
|
+
return [{ value: inputValue, label: inputValue }];
|
|
222
|
+
}, [inputValue]);
|
|
223
|
+
const handleCommandItemMouseDown = useCallback(
|
|
224
|
+
(e) => {
|
|
225
|
+
e.preventDefault();
|
|
226
|
+
e.stopPropagation();
|
|
227
|
+
},
|
|
228
|
+
[]
|
|
229
|
+
);
|
|
230
|
+
const handleCommandItemSelect = useCallback(
|
|
231
|
+
(value2) => {
|
|
232
|
+
if (selected.length >= maxSelected) {
|
|
233
|
+
onMaxSelected?.(selected.length);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
setInputValue("");
|
|
237
|
+
const newOptions = [...selected, { value: value2, label: value2 }];
|
|
238
|
+
setSelected(newOptions);
|
|
239
|
+
onChange?.(newOptions);
|
|
240
|
+
},
|
|
241
|
+
[maxSelected, onMaxSelected, selected, onChange]
|
|
242
|
+
);
|
|
243
|
+
const CreatableItem = () => {
|
|
244
|
+
if (!creatable) return void 0;
|
|
245
|
+
if (isOptionsExist(options, targetOption) || selected.find((s) => s.value === inputValue)) {
|
|
246
|
+
return void 0;
|
|
247
|
+
}
|
|
248
|
+
const Item = /* @__PURE__ */ jsx(
|
|
249
|
+
CommandItem,
|
|
250
|
+
{
|
|
251
|
+
value: inputValue,
|
|
252
|
+
className: "cursor-pointer",
|
|
253
|
+
onMouseDown: handleCommandItemMouseDown,
|
|
254
|
+
onSelect: handleCommandItemSelect,
|
|
255
|
+
children: `Create "${inputValue}"`
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
if (!onSearch && inputValue.length > 0) {
|
|
259
|
+
return Item;
|
|
260
|
+
}
|
|
261
|
+
if (onSearch && debouncedSearchTerm.length > 0 && !isLoading) {
|
|
262
|
+
return Item;
|
|
263
|
+
}
|
|
264
|
+
return void 0;
|
|
265
|
+
};
|
|
266
|
+
const EmptyItem = React.useCallback(() => {
|
|
267
|
+
if (!emptyIndicator) return void 0;
|
|
268
|
+
if (onSearch && !creatable && Object.keys(options).length === 0) {
|
|
269
|
+
return /* @__PURE__ */ jsx(CommandItem, { value: "-", disabled: true, children: emptyIndicator });
|
|
270
|
+
}
|
|
271
|
+
return /* @__PURE__ */ jsx(CommandEmpty, { children: emptyIndicator });
|
|
272
|
+
}, [creatable, emptyIndicator, onSearch, options]);
|
|
273
|
+
const selectables = React.useMemo(
|
|
274
|
+
() => removePickedOption(options, selected),
|
|
275
|
+
[options, selected]
|
|
276
|
+
);
|
|
277
|
+
const commandFilter = React.useCallback(() => {
|
|
278
|
+
if (commandProps?.filter) {
|
|
279
|
+
return commandProps.filter;
|
|
280
|
+
}
|
|
281
|
+
if (creatable) {
|
|
282
|
+
return (value2, search) => {
|
|
283
|
+
return value2.toLowerCase().includes(search.toLowerCase()) ? 1 : -1;
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
return void 0;
|
|
287
|
+
}, [creatable, commandProps?.filter]);
|
|
288
|
+
const handlePrimitiveInputValueChange = useCallback(
|
|
289
|
+
(value2) => {
|
|
290
|
+
setInputValue(value2);
|
|
291
|
+
inputProps?.onValueChange?.(value2);
|
|
292
|
+
},
|
|
293
|
+
[inputProps]
|
|
294
|
+
);
|
|
295
|
+
const handlePrimitiveInputBlur = useCallback(
|
|
296
|
+
(event) => {
|
|
297
|
+
if (!onScrollbar) {
|
|
298
|
+
setOpen(false);
|
|
299
|
+
}
|
|
300
|
+
inputProps?.onBlur?.(event);
|
|
301
|
+
},
|
|
302
|
+
[onScrollbar, inputProps]
|
|
303
|
+
);
|
|
304
|
+
const handlePrimitiveInputFocus = useCallback(
|
|
305
|
+
(event) => {
|
|
306
|
+
setOpen(true);
|
|
307
|
+
if (triggerSearchOnFocus) {
|
|
308
|
+
onSearch?.(debouncedSearchTerm);
|
|
309
|
+
}
|
|
310
|
+
inputProps?.onFocus?.(event);
|
|
311
|
+
},
|
|
312
|
+
[triggerSearchOnFocus, debouncedSearchTerm, inputProps, onSearch]
|
|
313
|
+
);
|
|
314
|
+
const handleClearAllButtonClick = useCallback(() => {
|
|
315
|
+
setSelected(selected.filter((s) => s.fixed));
|
|
316
|
+
onChange?.(selected.filter((s) => s.fixed));
|
|
317
|
+
}, [selected, onChange]);
|
|
318
|
+
const handleCommandListMouseLeave = useCallback(() => {
|
|
319
|
+
setOnScrollbar(false);
|
|
320
|
+
}, []);
|
|
321
|
+
const handleCommandListMouseEnter = useCallback(() => {
|
|
322
|
+
setOnScrollbar(true);
|
|
323
|
+
}, []);
|
|
324
|
+
const handleCommandListMouseUp = useCallback(() => {
|
|
325
|
+
inputRef?.current?.focus();
|
|
326
|
+
}, []);
|
|
327
|
+
const handleCommandGroupItemMouseDown = useCallback(
|
|
328
|
+
(e) => {
|
|
329
|
+
e.preventDefault();
|
|
330
|
+
e.stopPropagation();
|
|
331
|
+
},
|
|
332
|
+
[]
|
|
333
|
+
);
|
|
334
|
+
const handleCommandGroupItemSelect = useCallback(
|
|
335
|
+
(option) => {
|
|
336
|
+
if (selected.length >= maxSelected) {
|
|
337
|
+
onMaxSelected?.(selected.length);
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
setInputValue("");
|
|
341
|
+
const newOptions = [...selected, option];
|
|
342
|
+
setSelected(newOptions);
|
|
343
|
+
onChange?.(newOptions);
|
|
344
|
+
},
|
|
345
|
+
[maxSelected, onMaxSelected, selected, onChange]
|
|
346
|
+
);
|
|
347
|
+
return /* @__PURE__ */ jsxs(
|
|
348
|
+
Command,
|
|
349
|
+
{
|
|
350
|
+
ref: dropdownRef,
|
|
351
|
+
...commandProps,
|
|
352
|
+
onKeyDown: handleCommandKeyDown,
|
|
353
|
+
className: cn(
|
|
354
|
+
"h-auto overflow-visible bg-transparent",
|
|
355
|
+
commandProps?.className
|
|
356
|
+
),
|
|
357
|
+
shouldFilter: commandProps?.shouldFilter !== void 0 ? commandProps.shouldFilter : !onSearch,
|
|
358
|
+
filter: commandFilter(),
|
|
359
|
+
children: [
|
|
360
|
+
/* @__PURE__ */ jsx(
|
|
361
|
+
"div",
|
|
362
|
+
{
|
|
363
|
+
className: cn(
|
|
364
|
+
"min-h-10 rounded-md border border-input text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
365
|
+
{
|
|
366
|
+
"px-3 py-2": selected.length !== 0,
|
|
367
|
+
"cursor-text": !disabled && selected.length !== 0
|
|
368
|
+
},
|
|
369
|
+
className
|
|
370
|
+
),
|
|
371
|
+
onClick: handleBadgeGroupClick,
|
|
372
|
+
children: /* @__PURE__ */ jsxs("div", { className: "relative flex flex-wrap gap-1", children: [
|
|
373
|
+
selected.map((option) => {
|
|
374
|
+
return /* @__PURE__ */ jsx(
|
|
375
|
+
OptionBadge,
|
|
376
|
+
{
|
|
377
|
+
option,
|
|
378
|
+
onUnselect: handleUnselect,
|
|
379
|
+
badgeClassName,
|
|
380
|
+
disabled
|
|
381
|
+
},
|
|
382
|
+
option.value
|
|
383
|
+
);
|
|
384
|
+
}),
|
|
385
|
+
/* @__PURE__ */ jsx(
|
|
386
|
+
Command$1.Input,
|
|
387
|
+
{
|
|
388
|
+
...inputProps,
|
|
389
|
+
ref: inputRef,
|
|
390
|
+
value: inputValue,
|
|
391
|
+
disabled,
|
|
392
|
+
onValueChange: handlePrimitiveInputValueChange,
|
|
393
|
+
onBlur: handlePrimitiveInputBlur,
|
|
394
|
+
onFocus: handlePrimitiveInputFocus,
|
|
395
|
+
placeholder: hidePlaceholderWhenSelected && selected.length !== 0 ? "" : placeholder,
|
|
396
|
+
className: cn(
|
|
397
|
+
"flex-1 bg-transparent outline-none placeholder:text-muted-foreground",
|
|
398
|
+
{
|
|
399
|
+
"w-full": hidePlaceholderWhenSelected,
|
|
400
|
+
"px-3 py-2": selected.length === 0,
|
|
401
|
+
"ml-1": selected.length !== 0
|
|
402
|
+
},
|
|
403
|
+
inputProps?.className
|
|
404
|
+
)
|
|
405
|
+
}
|
|
406
|
+
),
|
|
407
|
+
/* @__PURE__ */ jsx(
|
|
408
|
+
"button",
|
|
409
|
+
{
|
|
410
|
+
type: "button",
|
|
411
|
+
onClick: handleClearAllButtonClick,
|
|
412
|
+
className: cn(
|
|
413
|
+
"absolute right-0 h-6 w-6 p-0",
|
|
414
|
+
(hideClearAllButton || disabled || selected.length < 1 || selected.filter((s) => s.fixed).length === selected.length) && "hidden"
|
|
415
|
+
),
|
|
416
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
417
|
+
}
|
|
418
|
+
)
|
|
419
|
+
] })
|
|
420
|
+
}
|
|
421
|
+
),
|
|
422
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: open && /* @__PURE__ */ jsx(
|
|
423
|
+
CommandList,
|
|
424
|
+
{
|
|
425
|
+
className: "absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",
|
|
426
|
+
onMouseLeave: handleCommandListMouseLeave,
|
|
427
|
+
onMouseEnter: handleCommandListMouseEnter,
|
|
428
|
+
onMouseUp: handleCommandListMouseUp,
|
|
429
|
+
children: isLoading ? /* @__PURE__ */ jsx(Fragment, { children: loadingIndicator }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
430
|
+
EmptyItem(),
|
|
431
|
+
CreatableItem(),
|
|
432
|
+
!selectFirstItem && /* @__PURE__ */ jsx(CommandItem, { value: "-", className: "hidden" }),
|
|
433
|
+
Object.entries(selectables).map(([key, dropdowns]) => /* @__PURE__ */ jsx(
|
|
434
|
+
CommandGroup,
|
|
435
|
+
{
|
|
436
|
+
heading: key,
|
|
437
|
+
className: "h-full overflow-auto",
|
|
438
|
+
children: /* @__PURE__ */ jsx(Fragment, { children: dropdowns.map((option) => {
|
|
439
|
+
return /* @__PURE__ */ jsx(
|
|
440
|
+
CommandGroupItem,
|
|
441
|
+
{
|
|
442
|
+
option,
|
|
443
|
+
onSelect: handleCommandGroupItemSelect,
|
|
444
|
+
onMouseDown: handleCommandGroupItemMouseDown
|
|
445
|
+
},
|
|
446
|
+
option.value
|
|
447
|
+
);
|
|
448
|
+
}) })
|
|
449
|
+
},
|
|
450
|
+
key
|
|
451
|
+
))
|
|
452
|
+
] })
|
|
453
|
+
}
|
|
454
|
+
) })
|
|
455
|
+
]
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
MultipleSelector.displayName = "MultipleSelector";
|
|
461
|
+
const OptionBadge = ({
|
|
462
|
+
option,
|
|
463
|
+
onUnselect,
|
|
464
|
+
badgeClassName,
|
|
465
|
+
disabled
|
|
466
|
+
}) => {
|
|
467
|
+
const handleUnselect = useCallback(() => {
|
|
468
|
+
onUnselect(option);
|
|
469
|
+
}, [onUnselect, option]);
|
|
470
|
+
const handleKeyDown = useCallback(
|
|
471
|
+
(e) => {
|
|
472
|
+
if (e.key === "Enter") {
|
|
473
|
+
onUnselect(option);
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
[onUnselect, option]
|
|
477
|
+
);
|
|
478
|
+
const handleMouseDown = useCallback(
|
|
479
|
+
(e) => {
|
|
480
|
+
e.preventDefault();
|
|
481
|
+
e.stopPropagation();
|
|
482
|
+
},
|
|
483
|
+
[]
|
|
484
|
+
);
|
|
485
|
+
return /* @__PURE__ */ jsxs(
|
|
486
|
+
Badge,
|
|
487
|
+
{
|
|
488
|
+
className: cn(
|
|
489
|
+
"data-disabled:bg-muted-foreground data-disabled:text-muted data-disabled:hover:bg-muted-foreground",
|
|
490
|
+
"data-fixed:bg-muted-foreground data-fixed:text-muted data-fixed:hover:bg-muted-foreground",
|
|
491
|
+
badgeClassName
|
|
492
|
+
),
|
|
493
|
+
"data-fixed": option.fixed,
|
|
494
|
+
"data-disabled": disabled || void 0,
|
|
495
|
+
children: [
|
|
496
|
+
option.label,
|
|
497
|
+
/* @__PURE__ */ jsx(
|
|
498
|
+
"button",
|
|
499
|
+
{
|
|
500
|
+
className: cn(
|
|
501
|
+
"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
502
|
+
(disabled || option.fixed) && "hidden"
|
|
503
|
+
),
|
|
504
|
+
onKeyDown: handleKeyDown,
|
|
505
|
+
onMouseDown: handleMouseDown,
|
|
506
|
+
onClick: handleUnselect,
|
|
507
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" })
|
|
508
|
+
}
|
|
509
|
+
)
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
option.value
|
|
513
|
+
);
|
|
514
|
+
};
|
|
515
|
+
const CommandGroupItem = ({
|
|
516
|
+
option,
|
|
517
|
+
onSelect,
|
|
518
|
+
onMouseDown
|
|
519
|
+
}) => {
|
|
520
|
+
const handleSelect = useCallback(() => {
|
|
521
|
+
onSelect(option);
|
|
522
|
+
}, [onSelect, option]);
|
|
523
|
+
return /* @__PURE__ */ jsx(
|
|
524
|
+
CommandItem,
|
|
525
|
+
{
|
|
526
|
+
value: option.value,
|
|
527
|
+
disabled: option.disable,
|
|
528
|
+
onMouseDown,
|
|
529
|
+
onSelect: handleSelect,
|
|
530
|
+
className: cn(
|
|
531
|
+
"cursor-pointer",
|
|
532
|
+
option.disable && "cursor-default text-muted-foreground"
|
|
533
|
+
),
|
|
534
|
+
children: option.label
|
|
535
|
+
},
|
|
536
|
+
option.value
|
|
537
|
+
);
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
export { MultipleSelector as default };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
const index = require('../../../../node_modules/.pnpm/@radix-ui_react-select@2.2.6_@types_react-dom@19.2.2_@types_react@19.2.2__@types_react@_802c3d414c85063bee785fcc98a39c07/node_modules/@radix-ui/react-select/dist/index.cjs');
|
|
6
|
+
const lucideReact = require('lucide-react');
|
|
7
|
+
const utils = require('../lib/utils.cjs');
|
|
8
|
+
|
|
9
|
+
function Select({
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index.Root, { "data-slot": "select", ...props });
|
|
13
|
+
}
|
|
14
|
+
function SelectValue({
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index.Value, { "data-slot": "select-value", ...props });
|
|
18
|
+
}
|
|
19
|
+
function SelectTrigger({
|
|
20
|
+
className,
|
|
21
|
+
size = "default",
|
|
22
|
+
children,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26
|
+
index.Trigger,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "select-trigger",
|
|
29
|
+
"data-size": size,
|
|
30
|
+
className: utils.cn(
|
|
31
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
...props,
|
|
35
|
+
children: [
|
|
36
|
+
children,
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
function SelectContent({
|
|
43
|
+
className,
|
|
44
|
+
children,
|
|
45
|
+
position = "popper",
|
|
46
|
+
align = "center",
|
|
47
|
+
...props
|
|
48
|
+
}) {
|
|
49
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50
|
+
index.Content,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "select-content",
|
|
53
|
+
className: utils.cn(
|
|
54
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
55
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
56
|
+
className
|
|
57
|
+
),
|
|
58
|
+
position,
|
|
59
|
+
align,
|
|
60
|
+
...props,
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
63
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
64
|
+
index.Viewport,
|
|
65
|
+
{
|
|
66
|
+
className: utils.cn(
|
|
67
|
+
"p-1",
|
|
68
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
69
|
+
),
|
|
70
|
+
children
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
) });
|
|
77
|
+
}
|
|
78
|
+
function SelectItem({
|
|
79
|
+
className,
|
|
80
|
+
children,
|
|
81
|
+
...props
|
|
82
|
+
}) {
|
|
83
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
84
|
+
index.Item,
|
|
85
|
+
{
|
|
86
|
+
"data-slot": "select-item",
|
|
87
|
+
className: utils.cn(
|
|
88
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
89
|
+
className
|
|
90
|
+
),
|
|
91
|
+
...props,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(index.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) }) }),
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.ItemText, { children })
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function SelectScrollUpButton({
|
|
100
|
+
className,
|
|
101
|
+
...props
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
104
|
+
index.ScrollUpButton,
|
|
105
|
+
{
|
|
106
|
+
"data-slot": "select-scroll-up-button",
|
|
107
|
+
className: utils.cn(
|
|
108
|
+
"flex cursor-default items-center justify-center py-1",
|
|
109
|
+
className
|
|
110
|
+
),
|
|
111
|
+
...props,
|
|
112
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function SelectScrollDownButton({
|
|
117
|
+
className,
|
|
118
|
+
...props
|
|
119
|
+
}) {
|
|
120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
121
|
+
index.ScrollDownButton,
|
|
122
|
+
{
|
|
123
|
+
"data-slot": "select-scroll-down-button",
|
|
124
|
+
className: utils.cn(
|
|
125
|
+
"flex cursor-default items-center justify-center py-1",
|
|
126
|
+
className
|
|
127
|
+
),
|
|
128
|
+
...props,
|
|
129
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
exports.Select = Select;
|
|
135
|
+
exports.SelectContent = SelectContent;
|
|
136
|
+
exports.SelectItem = SelectItem;
|
|
137
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
138
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
139
|
+
exports.SelectTrigger = SelectTrigger;
|
|
140
|
+
exports.SelectValue = SelectValue;
|