@psnext/design-system 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -90
- package/dist/Header.cjs +890 -0
- package/dist/Header.cjs.map +1 -0
- package/dist/Header.js +798 -0
- package/dist/Header.js.map +1 -0
- package/dist/Icon.cjs +1969 -0
- package/dist/Icon.cjs.map +1 -0
- package/dist/Icon.js +1956 -0
- package/dist/Icon.js.map +1 -0
- package/dist/Logo.cjs +813 -0
- package/dist/Logo.cjs.map +1 -0
- package/dist/Logo.js +808 -0
- package/dist/Logo.js.map +1 -0
- package/dist/Sidebar.cjs +562 -0
- package/dist/Sidebar.cjs.map +1 -0
- package/dist/Sidebar.js +416 -0
- package/dist/Sidebar.js.map +1 -0
- package/dist/chunk.cjs +28 -0
- package/dist/cn.cjs +15 -0
- package/dist/cn.cjs.map +1 -0
- package/dist/cn.js +10 -0
- package/dist/cn.js.map +1 -0
- package/dist/contexts/index.cjs +0 -60
- package/dist/contexts/index.d.cts +1 -23
- package/dist/contexts/index.d.ts +1 -23
- package/dist/contexts/index.js +1 -58
- package/dist/index.cjs +414 -272
- package/dist/index.d.cts +17 -1424
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +17 -1424
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +72 -7
- package/dist/index10.d.cts +38 -0
- package/dist/index10.d.cts.map +1 -0
- package/dist/index10.d.ts +38 -0
- package/dist/index10.d.ts.map +1 -0
- package/dist/index11.d.cts +30 -0
- package/dist/index11.d.cts.map +1 -0
- package/dist/index11.d.ts +30 -0
- package/dist/index11.d.ts.map +1 -0
- package/dist/index12.d.cts +75 -0
- package/dist/index12.d.cts.map +1 -0
- package/dist/index12.d.ts +75 -0
- package/dist/index12.d.ts.map +1 -0
- package/dist/index13.d.cts +57 -0
- package/dist/index13.d.cts.map +1 -0
- package/dist/index13.d.ts +57 -0
- package/dist/index13.d.ts.map +1 -0
- package/dist/index14.d.cts +98 -0
- package/dist/index14.d.cts.map +1 -0
- package/dist/index14.d.ts +98 -0
- package/dist/index14.d.ts.map +1 -0
- package/dist/index15.d.cts +29 -0
- package/dist/index15.d.cts.map +1 -0
- package/dist/index15.d.ts +29 -0
- package/dist/index15.d.ts.map +1 -0
- package/dist/index16.d.cts +38 -0
- package/dist/index16.d.cts.map +1 -0
- package/dist/index16.d.ts +38 -0
- package/dist/index16.d.ts.map +1 -0
- package/dist/index17.d.cts +19 -0
- package/dist/index17.d.cts.map +1 -0
- package/dist/index17.d.ts +19 -0
- package/dist/index17.d.ts.map +1 -0
- package/dist/index18.d.cts +73 -0
- package/dist/index18.d.cts.map +1 -0
- package/dist/index18.d.ts +73 -0
- package/dist/index18.d.ts.map +1 -0
- package/dist/index19.d.cts +66 -0
- package/dist/index19.d.cts.map +1 -0
- package/dist/index19.d.ts +66 -0
- package/dist/index19.d.ts.map +1 -0
- package/dist/index2.d.cts +41 -13
- package/dist/index2.d.cts.map +1 -1
- package/dist/index2.d.ts +41 -13
- package/dist/index2.d.ts.map +1 -1
- package/dist/index20.d.cts +96 -0
- package/dist/index20.d.cts.map +1 -0
- package/dist/index20.d.ts +96 -0
- package/dist/index20.d.ts.map +1 -0
- package/dist/index21.d.cts +34 -0
- package/dist/index21.d.cts.map +1 -0
- package/dist/index21.d.ts +34 -0
- package/dist/index21.d.ts.map +1 -0
- package/dist/index22.d.cts +62 -0
- package/dist/index22.d.cts.map +1 -0
- package/dist/index22.d.ts +62 -0
- package/dist/index22.d.ts.map +1 -0
- package/dist/index23.d.cts +99 -0
- package/dist/index23.d.cts.map +1 -0
- package/dist/index23.d.ts +99 -0
- package/dist/index23.d.ts.map +1 -0
- package/dist/index24.d.cts +49 -0
- package/dist/index24.d.cts.map +1 -0
- package/dist/index24.d.ts +49 -0
- package/dist/index24.d.ts.map +1 -0
- package/dist/index25.d.cts +17 -0
- package/dist/index25.d.cts.map +1 -0
- package/dist/index25.d.ts +17 -0
- package/dist/index25.d.ts.map +1 -0
- package/dist/index26.d.cts +80 -0
- package/dist/index26.d.cts.map +1 -0
- package/dist/index26.d.ts +80 -0
- package/dist/index26.d.ts.map +1 -0
- package/dist/index27.d.cts +71 -0
- package/dist/index27.d.cts.map +1 -0
- package/dist/index27.d.ts +71 -0
- package/dist/index27.d.ts.map +1 -0
- package/dist/index28.d.cts +37 -0
- package/dist/index28.d.cts.map +1 -0
- package/dist/index28.d.ts +37 -0
- package/dist/index28.d.ts.map +1 -0
- package/dist/index29.d.cts +25 -0
- package/dist/index29.d.cts.map +1 -0
- package/dist/index29.d.ts +25 -0
- package/dist/index29.d.ts.map +1 -0
- package/dist/index3.d.cts +62 -0
- package/dist/index3.d.cts.map +1 -0
- package/dist/index3.d.ts +62 -0
- package/dist/index3.d.ts.map +1 -0
- package/dist/index30.d.cts +59 -0
- package/dist/index30.d.cts.map +1 -0
- package/dist/index30.d.ts +59 -0
- package/dist/index30.d.ts.map +1 -0
- package/dist/index31.d.cts +40 -0
- package/dist/index31.d.cts.map +1 -0
- package/dist/index31.d.ts +40 -0
- package/dist/index31.d.ts.map +1 -0
- package/dist/index32.d.cts +23 -0
- package/dist/index32.d.cts.map +1 -0
- package/dist/index32.d.ts +23 -0
- package/dist/index32.d.ts.map +1 -0
- package/dist/index33.d.cts +55 -0
- package/dist/index33.d.cts.map +1 -0
- package/dist/index33.d.ts +55 -0
- package/dist/index33.d.ts.map +1 -0
- package/dist/index34.d.cts +43 -0
- package/dist/index34.d.cts.map +1 -0
- package/dist/index34.d.ts +43 -0
- package/dist/index34.d.ts.map +1 -0
- package/dist/index35.d.cts +77 -0
- package/dist/index35.d.cts.map +1 -0
- package/dist/index35.d.ts +77 -0
- package/dist/index35.d.ts.map +1 -0
- package/dist/index36.d.cts +19 -0
- package/dist/index36.d.cts.map +1 -0
- package/dist/index36.d.ts +19 -0
- package/dist/index36.d.ts.map +1 -0
- package/dist/index37.d.cts +29 -0
- package/dist/index37.d.cts.map +1 -0
- package/dist/index37.d.ts +29 -0
- package/dist/index37.d.ts.map +1 -0
- package/dist/index38.d.cts +20 -0
- package/dist/index38.d.cts.map +1 -0
- package/dist/index38.d.ts +20 -0
- package/dist/index38.d.ts.map +1 -0
- package/dist/index39.d.cts +105 -0
- package/dist/index39.d.cts.map +1 -0
- package/dist/index39.d.ts +105 -0
- package/dist/index39.d.ts.map +1 -0
- package/dist/index4.d.cts +11 -0
- package/dist/index4.d.cts.map +1 -0
- package/dist/index4.d.ts +11 -0
- package/dist/index4.d.ts.map +1 -0
- package/dist/index40.d.cts +22 -0
- package/dist/index40.d.cts.map +1 -0
- package/dist/index40.d.ts +22 -0
- package/dist/index40.d.ts.map +1 -0
- package/dist/index41.d.cts +56 -0
- package/dist/index41.d.cts.map +1 -0
- package/dist/index41.d.ts +56 -0
- package/dist/index41.d.ts.map +1 -0
- package/dist/index42.d.cts +45 -0
- package/dist/index42.d.cts.map +1 -0
- package/dist/index42.d.ts +45 -0
- package/dist/index42.d.ts.map +1 -0
- package/dist/index43.d.cts +96 -0
- package/dist/index43.d.cts.map +1 -0
- package/dist/index43.d.ts +96 -0
- package/dist/index43.d.ts.map +1 -0
- package/dist/index44.d.cts +48 -0
- package/dist/index44.d.cts.map +1 -0
- package/dist/index44.d.ts +48 -0
- package/dist/index44.d.ts.map +1 -0
- package/dist/index45.d.cts +28 -0
- package/dist/index45.d.cts.map +1 -0
- package/dist/index45.d.ts +28 -0
- package/dist/index45.d.ts.map +1 -0
- package/dist/index46.d.cts +41 -0
- package/dist/index46.d.cts.map +1 -0
- package/dist/index46.d.ts +41 -0
- package/dist/index46.d.ts.map +1 -0
- package/dist/index47.d.cts +25 -0
- package/dist/index47.d.cts.map +1 -0
- package/dist/index47.d.ts +25 -0
- package/dist/index47.d.ts.map +1 -0
- package/dist/index48.d.cts +21 -0
- package/dist/index48.d.cts.map +1 -0
- package/dist/index48.d.ts +21 -0
- package/dist/index48.d.ts.map +1 -0
- package/dist/index49.d.cts +69 -0
- package/dist/index49.d.cts.map +1 -0
- package/dist/index49.d.ts +69 -0
- package/dist/index49.d.ts.map +1 -0
- package/dist/index5.d.cts +45 -0
- package/dist/index5.d.cts.map +1 -0
- package/dist/index5.d.ts +45 -0
- package/dist/index5.d.ts.map +1 -0
- package/dist/index50.d.cts +63 -0
- package/dist/index50.d.cts.map +1 -0
- package/dist/index50.d.ts +63 -0
- package/dist/index50.d.ts.map +1 -0
- package/dist/index51.d.cts +31 -0
- package/dist/index51.d.cts.map +1 -0
- package/dist/index51.d.ts +31 -0
- package/dist/index51.d.ts.map +1 -0
- package/dist/index52.d.cts +209 -0
- package/dist/index52.d.cts.map +1 -0
- package/dist/index52.d.ts +209 -0
- package/dist/index52.d.ts.map +1 -0
- package/dist/index53.d.cts +26 -0
- package/dist/index53.d.cts.map +1 -0
- package/dist/index53.d.ts +26 -0
- package/dist/index53.d.ts.map +1 -0
- package/dist/index54.d.cts +28 -0
- package/dist/index54.d.cts.map +1 -0
- package/dist/index54.d.ts +28 -0
- package/dist/index54.d.ts.map +1 -0
- package/dist/index55.d.cts +25 -0
- package/dist/index55.d.cts.map +1 -0
- package/dist/index55.d.ts +25 -0
- package/dist/index55.d.ts.map +1 -0
- package/dist/index56.d.cts +12 -0
- package/dist/index56.d.cts.map +1 -0
- package/dist/index56.d.ts +12 -0
- package/dist/index56.d.ts.map +1 -0
- package/dist/index57.d.cts +50 -0
- package/dist/index57.d.cts.map +1 -0
- package/dist/index57.d.ts +50 -0
- package/dist/index57.d.ts.map +1 -0
- package/dist/index58.d.cts +51 -0
- package/dist/index58.d.cts.map +1 -0
- package/dist/index58.d.ts +51 -0
- package/dist/index58.d.ts.map +1 -0
- package/dist/index59.d.cts +58 -0
- package/dist/index59.d.cts.map +1 -0
- package/dist/index59.d.ts +58 -0
- package/dist/index59.d.ts.map +1 -0
- package/dist/index6.d.cts +26 -0
- package/dist/index6.d.cts.map +1 -0
- package/dist/index6.d.ts +26 -0
- package/dist/index6.d.ts.map +1 -0
- package/dist/index60.d.cts +45 -0
- package/dist/index60.d.cts.map +1 -0
- package/dist/index60.d.ts +45 -0
- package/dist/index60.d.ts.map +1 -0
- package/dist/index61.d.cts +21 -0
- package/dist/index61.d.cts.map +1 -0
- package/dist/index61.d.ts +21 -0
- package/dist/index61.d.ts.map +1 -0
- package/dist/index62.d.cts +45 -0
- package/dist/index62.d.cts.map +1 -0
- package/dist/index62.d.ts +45 -0
- package/dist/index62.d.ts.map +1 -0
- package/dist/index63.d.cts +23 -0
- package/dist/index63.d.cts.map +1 -0
- package/dist/index63.d.ts +23 -0
- package/dist/index63.d.ts.map +1 -0
- package/dist/index64.d.cts +48 -0
- package/dist/index64.d.cts.map +1 -0
- package/dist/index64.d.ts +48 -0
- package/dist/index64.d.ts.map +1 -0
- package/dist/index65.d.cts +25 -0
- package/dist/index65.d.cts.map +1 -0
- package/dist/index65.d.ts +25 -0
- package/dist/index65.d.ts.map +1 -0
- package/dist/index66.d.cts +19 -0
- package/dist/index66.d.cts.map +1 -0
- package/dist/index66.d.ts +19 -0
- package/dist/index66.d.ts.map +1 -0
- package/dist/index67.d.cts +37 -0
- package/dist/index67.d.cts.map +1 -0
- package/dist/index67.d.ts +37 -0
- package/dist/index67.d.ts.map +1 -0
- package/dist/index68.d.cts +36 -0
- package/dist/index68.d.cts.map +1 -0
- package/dist/index68.d.ts +36 -0
- package/dist/index68.d.ts.map +1 -0
- package/dist/index69.d.cts +69 -0
- package/dist/index69.d.ts +69 -0
- package/dist/index7.d.cts +46 -0
- package/dist/index7.d.cts.map +1 -0
- package/dist/index7.d.ts +46 -0
- package/dist/index7.d.ts.map +1 -0
- package/dist/index70.d.cts +242 -0
- package/dist/index70.d.cts.map +1 -0
- package/dist/index70.d.ts +242 -0
- package/dist/index70.d.ts.map +1 -0
- package/dist/index8.d.cts +26 -0
- package/dist/index8.d.cts.map +1 -0
- package/dist/index8.d.ts +26 -0
- package/dist/index8.d.ts.map +1 -0
- package/dist/index9.d.cts +20 -0
- package/dist/index9.d.cts.map +1 -0
- package/dist/index9.d.ts +20 -0
- package/dist/index9.d.ts.map +1 -0
- package/dist/layouts/Container/index.cjs +39 -0
- package/dist/layouts/Container/index.cjs.map +1 -0
- package/dist/layouts/Container/index.d.cts +2 -0
- package/dist/layouts/Container/index.d.ts +2 -0
- package/dist/layouts/Container/index.js +38 -0
- package/dist/layouts/Container/index.js.map +1 -0
- package/dist/layouts/PageBackground/index.cjs +22 -0
- package/dist/layouts/PageBackground/index.cjs.map +1 -0
- package/dist/layouts/PageBackground/index.d.cts +2 -0
- package/dist/layouts/PageBackground/index.d.ts +2 -0
- package/dist/layouts/PageBackground/index.js +21 -0
- package/dist/layouts/PageBackground/index.js.map +1 -0
- package/dist/layouts/Stack/index.cjs +56 -0
- package/dist/layouts/Stack/index.cjs.map +1 -0
- package/dist/layouts/Stack/index.d.cts +2 -0
- package/dist/layouts/Stack/index.d.ts +2 -0
- package/dist/layouts/Stack/index.js +55 -0
- package/dist/layouts/Stack/index.js.map +1 -0
- package/dist/layouts/TwoColumn/index.cjs +51 -0
- package/dist/layouts/TwoColumn/index.cjs.map +1 -0
- package/dist/layouts/TwoColumn/index.d.cts +2 -0
- package/dist/layouts/TwoColumn/index.d.ts +2 -0
- package/dist/layouts/TwoColumn/index.js +48 -0
- package/dist/layouts/TwoColumn/index.js.map +1 -0
- package/dist/layouts/index.cjs +13 -12
- package/dist/layouts/index.d.cts +5 -133
- package/dist/layouts/index.d.ts +5 -133
- package/dist/layouts/index.js +5 -2
- package/dist/patterns/DataTable/index.cjs +114 -0
- package/dist/patterns/DataTable/index.cjs.map +1 -0
- package/dist/patterns/DataTable/index.d.cts +43 -0
- package/dist/patterns/DataTable/index.d.cts.map +1 -0
- package/dist/patterns/DataTable/index.d.ts +43 -0
- package/dist/patterns/DataTable/index.d.ts.map +1 -0
- package/dist/patterns/DataTable/index.js +110 -0
- package/dist/patterns/DataTable/index.js.map +1 -0
- package/dist/patterns/Footer/index.cjs +76 -0
- package/dist/patterns/Footer/index.cjs.map +1 -0
- package/dist/patterns/Footer/index.d.cts +54 -0
- package/dist/patterns/Footer/index.d.cts.map +1 -0
- package/dist/patterns/Footer/index.d.ts +54 -0
- package/dist/patterns/Footer/index.d.ts.map +1 -0
- package/dist/patterns/Footer/index.js +70 -0
- package/dist/patterns/Footer/index.js.map +1 -0
- package/dist/patterns/Header/index.cjs +17 -0
- package/dist/patterns/Header/index.d.cts +2 -0
- package/dist/patterns/Header/index.d.ts +2 -0
- package/dist/patterns/Header/index.js +2 -0
- package/dist/patterns/MediaObject/index.cjs +108 -0
- package/dist/patterns/MediaObject/index.cjs.map +1 -0
- package/dist/patterns/MediaObject/index.d.cts +71 -0
- package/dist/patterns/MediaObject/index.d.cts.map +1 -0
- package/dist/patterns/MediaObject/index.d.ts +71 -0
- package/dist/patterns/MediaObject/index.d.ts.map +1 -0
- package/dist/patterns/MediaObject/index.js +99 -0
- package/dist/patterns/MediaObject/index.js.map +1 -0
- package/dist/patterns/SectionCard/index.cjs +35 -0
- package/dist/patterns/SectionCard/index.cjs.map +1 -0
- package/dist/patterns/SectionCard/index.d.cts +21 -0
- package/dist/patterns/SectionCard/index.d.cts.map +1 -0
- package/dist/patterns/SectionCard/index.d.ts +21 -0
- package/dist/patterns/SectionCard/index.d.ts.map +1 -0
- package/dist/patterns/SectionCard/index.js +34 -0
- package/dist/patterns/SectionCard/index.js.map +1 -0
- package/dist/patterns/SectionHeading/index.cjs +44 -0
- package/dist/patterns/SectionHeading/index.cjs.map +1 -0
- package/dist/patterns/SectionHeading/index.d.cts +37 -0
- package/dist/patterns/SectionHeading/index.d.cts.map +1 -0
- package/dist/patterns/SectionHeading/index.d.ts +37 -0
- package/dist/patterns/SectionHeading/index.d.ts.map +1 -0
- package/dist/patterns/SectionHeading/index.js +43 -0
- package/dist/patterns/SectionHeading/index.js.map +1 -0
- package/dist/patterns/index.cjs +40 -7374
- package/dist/patterns/index.d.cts +7 -418
- package/dist/patterns/index.d.ts +7 -418
- package/dist/patterns/index.js +7 -7344
- package/dist/primitives/Accordion/index.cjs +54 -0
- package/dist/primitives/Accordion/index.cjs.map +1 -0
- package/dist/primitives/Accordion/index.d.cts +2 -0
- package/dist/primitives/Accordion/index.d.ts +2 -0
- package/dist/primitives/Accordion/index.js +50 -0
- package/dist/primitives/Accordion/index.js.map +1 -0
- package/dist/primitives/Alert/index.cjs +61 -0
- package/dist/primitives/Alert/index.cjs.map +1 -0
- package/dist/primitives/Alert/index.d.cts +2 -0
- package/dist/primitives/Alert/index.d.ts +2 -0
- package/dist/primitives/Alert/index.js +57 -0
- package/dist/primitives/Alert/index.js.map +1 -0
- package/dist/primitives/AlertDialog/index.cjs +102 -0
- package/dist/primitives/AlertDialog/index.cjs.map +1 -0
- package/dist/primitives/AlertDialog/index.d.cts +2 -0
- package/dist/primitives/AlertDialog/index.d.ts +2 -0
- package/dist/primitives/AlertDialog/index.js +90 -0
- package/dist/primitives/AlertDialog/index.js.map +1 -0
- package/dist/primitives/AspectRatio/index.cjs +15 -0
- package/dist/primitives/AspectRatio/index.cjs.map +1 -0
- package/dist/primitives/AspectRatio/index.d.cts +2 -0
- package/dist/primitives/AspectRatio/index.d.ts +2 -0
- package/dist/primitives/AspectRatio/index.js +14 -0
- package/dist/primitives/AspectRatio/index.js.map +1 -0
- package/dist/primitives/Avatar/index.cjs +64 -0
- package/dist/primitives/Avatar/index.cjs.map +1 -0
- package/dist/primitives/Avatar/index.d.cts +2 -0
- package/dist/primitives/Avatar/index.d.ts +2 -0
- package/dist/primitives/Avatar/index.js +58 -0
- package/dist/primitives/Avatar/index.js.map +1 -0
- package/dist/primitives/Badge/index.cjs +44 -0
- package/dist/primitives/Badge/index.cjs.map +1 -0
- package/dist/primitives/Badge/index.d.cts +2 -0
- package/dist/primitives/Badge/index.d.ts +2 -0
- package/dist/primitives/Badge/index.js +43 -0
- package/dist/primitives/Badge/index.js.map +1 -0
- package/dist/primitives/Breadcrumb/index.cjs +82 -0
- package/dist/primitives/Breadcrumb/index.cjs.map +1 -0
- package/dist/primitives/Breadcrumb/index.d.cts +2 -0
- package/dist/primitives/Breadcrumb/index.d.ts +2 -0
- package/dist/primitives/Breadcrumb/index.js +75 -0
- package/dist/primitives/Breadcrumb/index.js.map +1 -0
- package/dist/primitives/Button/index.cjs +61 -0
- package/dist/primitives/Button/index.cjs.map +1 -0
- package/dist/primitives/Button/index.d.cts +2 -0
- package/dist/primitives/Button/index.d.ts +2 -0
- package/dist/primitives/Button/index.js +60 -0
- package/dist/primitives/Button/index.js.map +1 -0
- package/dist/primitives/ButtonGroup/index.cjs +46 -0
- package/dist/primitives/ButtonGroup/index.cjs.map +1 -0
- package/dist/primitives/ButtonGroup/index.d.cts +2 -0
- package/dist/primitives/ButtonGroup/index.d.ts +2 -0
- package/dist/primitives/ButtonGroup/index.js +43 -0
- package/dist/primitives/ButtonGroup/index.js.map +1 -0
- package/dist/primitives/Calendar/index.cjs +112 -0
- package/dist/primitives/Calendar/index.cjs.map +1 -0
- package/dist/primitives/Calendar/index.d.cts +2 -0
- package/dist/primitives/Calendar/index.d.ts +2 -0
- package/dist/primitives/Calendar/index.js +108 -0
- package/dist/primitives/Calendar/index.js.map +1 -0
- package/dist/primitives/Card/index.cjs +128 -0
- package/dist/primitives/Card/index.cjs.map +1 -0
- package/dist/primitives/Card/index.d.cts +2 -0
- package/dist/primitives/Card/index.d.ts +2 -0
- package/dist/primitives/Card/index.js +121 -0
- package/dist/primitives/Card/index.js.map +1 -0
- package/dist/primitives/Carousel/index.cjs +146 -0
- package/dist/primitives/Carousel/index.cjs.map +1 -0
- package/dist/primitives/Carousel/index.d.cts +2 -0
- package/dist/primitives/Carousel/index.d.ts +2 -0
- package/dist/primitives/Carousel/index.js +138 -0
- package/dist/primitives/Carousel/index.js.map +1 -0
- package/dist/primitives/Chart/index.cjs +162 -0
- package/dist/primitives/Chart/index.cjs.map +1 -0
- package/dist/primitives/Chart/index.d.cts +2 -0
- package/dist/primitives/Chart/index.d.ts +2 -0
- package/dist/primitives/Chart/index.js +153 -0
- package/dist/primitives/Chart/index.js.map +1 -0
- package/dist/primitives/Checkbox/index.cjs +53 -0
- package/dist/primitives/Checkbox/index.cjs.map +1 -0
- package/dist/primitives/Checkbox/index.d.cts +2 -0
- package/dist/primitives/Checkbox/index.d.ts +2 -0
- package/dist/primitives/Checkbox/index.js +51 -0
- package/dist/primitives/Checkbox/index.js.map +1 -0
- package/dist/primitives/CheckboxTree/index.cjs +106 -0
- package/dist/primitives/CheckboxTree/index.cjs.map +1 -0
- package/dist/primitives/CheckboxTree/index.d.cts +2 -0
- package/dist/primitives/CheckboxTree/index.d.ts +2 -0
- package/dist/primitives/CheckboxTree/index.js +103 -0
- package/dist/primitives/CheckboxTree/index.js.map +1 -0
- package/dist/primitives/Collapsible/index.cjs +31 -0
- package/dist/primitives/Collapsible/index.cjs.map +1 -0
- package/dist/primitives/Collapsible/index.d.cts +2 -0
- package/dist/primitives/Collapsible/index.d.ts +2 -0
- package/dist/primitives/Collapsible/index.js +28 -0
- package/dist/primitives/Collapsible/index.js.map +1 -0
- package/dist/primitives/Command/index.cjs +104 -0
- package/dist/primitives/Command/index.cjs.map +1 -0
- package/dist/primitives/Command/index.d.cts +2 -0
- package/dist/primitives/Command/index.d.ts +2 -0
- package/dist/primitives/Command/index.js +95 -0
- package/dist/primitives/Command/index.js.map +1 -0
- package/dist/primitives/ContextMenu/index.cjs +152 -0
- package/dist/primitives/ContextMenu/index.cjs.map +1 -0
- package/dist/primitives/ContextMenu/index.d.cts +2 -0
- package/dist/primitives/ContextMenu/index.d.ts +2 -0
- package/dist/primitives/ContextMenu/index.js +137 -0
- package/dist/primitives/ContextMenu/index.js.map +1 -0
- package/dist/primitives/Credits/index.cjs +39 -0
- package/dist/primitives/Credits/index.cjs.map +1 -0
- package/dist/primitives/Credits/index.d.cts +2 -0
- package/dist/primitives/Credits/index.d.ts +2 -0
- package/dist/primitives/Credits/index.js +38 -0
- package/dist/primitives/Credits/index.js.map +1 -0
- package/dist/primitives/Dialog/index.cjs +121 -0
- package/dist/primitives/Dialog/index.cjs.map +1 -0
- package/dist/primitives/Dialog/index.d.cts +2 -0
- package/dist/primitives/Dialog/index.d.ts +2 -0
- package/dist/primitives/Dialog/index.js +111 -0
- package/dist/primitives/Dialog/index.js.map +1 -0
- package/dist/primitives/Drawer/index.cjs +98 -0
- package/dist/primitives/Drawer/index.cjs.map +1 -0
- package/dist/primitives/Drawer/index.d.cts +2 -0
- package/dist/primitives/Drawer/index.d.ts +2 -0
- package/dist/primitives/Drawer/index.js +88 -0
- package/dist/primitives/Drawer/index.js.map +1 -0
- package/dist/primitives/DropdownMenu/index.cjs +153 -0
- package/dist/primitives/DropdownMenu/index.cjs.map +1 -0
- package/dist/primitives/DropdownMenu/index.d.cts +2 -0
- package/dist/primitives/DropdownMenu/index.d.ts +2 -0
- package/dist/primitives/DropdownMenu/index.js +138 -0
- package/dist/primitives/DropdownMenu/index.js.map +1 -0
- package/dist/primitives/Empty/index.cjs +84 -0
- package/dist/primitives/Empty/index.cjs.map +1 -0
- package/dist/primitives/Empty/index.d.cts +2 -0
- package/dist/primitives/Empty/index.d.ts +2 -0
- package/dist/primitives/Empty/index.js +77 -0
- package/dist/primitives/Empty/index.js.map +1 -0
- package/dist/primitives/Field/index.cjs +139 -0
- package/dist/primitives/Field/index.cjs.map +1 -0
- package/dist/primitives/Field/index.d.cts +2 -0
- package/dist/primitives/Field/index.d.ts +2 -0
- package/dist/primitives/Field/index.js +129 -0
- package/dist/primitives/Field/index.js.map +1 -0
- package/dist/primitives/Form/index.cjs +104 -0
- package/dist/primitives/Form/index.cjs.map +1 -0
- package/dist/primitives/Form/index.d.cts +2 -0
- package/dist/primitives/Form/index.d.ts +2 -0
- package/dist/primitives/Form/index.js +94 -0
- package/dist/primitives/Form/index.js.map +1 -0
- package/dist/primitives/Heading/index.cjs +53 -0
- package/dist/primitives/Heading/index.cjs.map +1 -0
- package/dist/primitives/Heading/index.d.cts +2 -0
- package/dist/primitives/Heading/index.d.ts +2 -0
- package/dist/primitives/Heading/index.js +52 -0
- package/dist/primitives/Heading/index.js.map +1 -0
- package/dist/primitives/HoverCard/index.cjs +38 -0
- package/dist/primitives/HoverCard/index.cjs.map +1 -0
- package/dist/primitives/HoverCard/index.d.cts +2 -0
- package/dist/primitives/HoverCard/index.d.ts +2 -0
- package/dist/primitives/HoverCard/index.js +35 -0
- package/dist/primitives/HoverCard/index.js.map +1 -0
- package/dist/primitives/Icon/index.cjs +4 -0
- package/dist/primitives/Icon/index.d.cts +2 -0
- package/dist/primitives/Icon/index.d.ts +2 -0
- package/dist/primitives/Icon/index.js +2 -0
- package/dist/primitives/InfoBanner/index.cjs +79 -0
- package/dist/primitives/InfoBanner/index.cjs.map +1 -0
- package/dist/primitives/InfoBanner/index.d.cts +2 -0
- package/dist/primitives/InfoBanner/index.d.ts +2 -0
- package/dist/primitives/InfoBanner/index.js +78 -0
- package/dist/primitives/InfoBanner/index.js.map +1 -0
- package/dist/primitives/Input/index.cjs +39 -0
- package/dist/primitives/Input/index.cjs.map +1 -0
- package/dist/primitives/Input/index.d.cts +2 -0
- package/dist/primitives/Input/index.d.ts +2 -0
- package/dist/primitives/Input/index.js +38 -0
- package/dist/primitives/Input/index.js.map +1 -0
- package/dist/primitives/InputGroup/index.cjs +91 -0
- package/dist/primitives/InputGroup/index.cjs.map +1 -0
- package/dist/primitives/InputGroup/index.d.cts +2 -0
- package/dist/primitives/InputGroup/index.d.ts +2 -0
- package/dist/primitives/InputGroup/index.js +85 -0
- package/dist/primitives/InputGroup/index.js.map +1 -0
- package/dist/primitives/InputOtp/index.cjs +80 -0
- package/dist/primitives/InputOtp/index.cjs.map +1 -0
- package/dist/primitives/InputOtp/index.d.cts +2 -0
- package/dist/primitives/InputOtp/index.d.ts +2 -0
- package/dist/primitives/InputOtp/index.js +74 -0
- package/dist/primitives/InputOtp/index.js.map +1 -0
- package/dist/primitives/Item/index.cjs +137 -0
- package/dist/primitives/Item/index.cjs.map +1 -0
- package/dist/primitives/Item/index.d.cts +2 -0
- package/dist/primitives/Item/index.d.ts +2 -0
- package/dist/primitives/Item/index.js +127 -0
- package/dist/primitives/Item/index.js.map +1 -0
- package/dist/primitives/Kbd/index.cjs +25 -0
- package/dist/primitives/Kbd/index.cjs.map +1 -0
- package/dist/primitives/Kbd/index.d.cts +2 -0
- package/dist/primitives/Kbd/index.d.ts +2 -0
- package/dist/primitives/Kbd/index.js +23 -0
- package/dist/primitives/Kbd/index.js.map +1 -0
- package/dist/primitives/Label/index.cjs +18 -0
- package/dist/primitives/Label/index.cjs.map +1 -0
- package/dist/primitives/Label/index.d.cts +2 -0
- package/dist/primitives/Label/index.d.ts +2 -0
- package/dist/primitives/Label/index.js +17 -0
- package/dist/primitives/Label/index.js.map +1 -0
- package/dist/primitives/Link/index.cjs +38 -0
- package/dist/primitives/Link/index.cjs.map +1 -0
- package/dist/primitives/Link/index.d.cts +2 -0
- package/dist/primitives/Link/index.d.ts +2 -0
- package/dist/primitives/Link/index.js +37 -0
- package/dist/primitives/Link/index.js.map +1 -0
- package/dist/primitives/Logo/index.cjs +3 -0
- package/dist/primitives/Logo/index.d.cts +2 -0
- package/dist/primitives/Logo/index.d.ts +2 -0
- package/dist/primitives/Logo/index.js +2 -0
- package/dist/primitives/Menubar/index.cjs +165 -0
- package/dist/primitives/Menubar/index.cjs.map +1 -0
- package/dist/primitives/Menubar/index.d.cts +2 -0
- package/dist/primitives/Menubar/index.d.ts +2 -0
- package/dist/primitives/Menubar/index.js +149 -0
- package/dist/primitives/Menubar/index.js.map +1 -0
- package/dist/primitives/NativeSelect/index.cjs +40 -0
- package/dist/primitives/NativeSelect/index.cjs.map +1 -0
- package/dist/primitives/NativeSelect/index.d.cts +2 -0
- package/dist/primitives/NativeSelect/index.d.ts +2 -0
- package/dist/primitives/NativeSelect/index.js +39 -0
- package/dist/primitives/NativeSelect/index.js.map +1 -0
- package/dist/primitives/NavRail/index.cjs +195 -0
- package/dist/primitives/NavRail/index.cjs.map +1 -0
- package/dist/primitives/NavRail/index.d.cts +2 -0
- package/dist/primitives/NavRail/index.d.ts +2 -0
- package/dist/primitives/NavRail/index.js +185 -0
- package/dist/primitives/NavRail/index.js.map +1 -0
- package/dist/primitives/NavigationMenu/index.cjs +98 -0
- package/dist/primitives/NavigationMenu/index.cjs.map +1 -0
- package/dist/primitives/NavigationMenu/index.d.cts +2 -0
- package/dist/primitives/NavigationMenu/index.d.ts +2 -0
- package/dist/primitives/NavigationMenu/index.js +89 -0
- package/dist/primitives/NavigationMenu/index.js.map +1 -0
- package/dist/primitives/Pagination/index.cjs +93 -0
- package/dist/primitives/Pagination/index.cjs.map +1 -0
- package/dist/primitives/Pagination/index.d.cts +2 -0
- package/dist/primitives/Pagination/index.d.ts +2 -0
- package/dist/primitives/Pagination/index.js +86 -0
- package/dist/primitives/Pagination/index.js.map +1 -0
- package/dist/primitives/Popover/index.cjs +70 -0
- package/dist/primitives/Popover/index.cjs.map +1 -0
- package/dist/primitives/Popover/index.d.cts +2 -0
- package/dist/primitives/Popover/index.d.ts +2 -0
- package/dist/primitives/Popover/index.js +63 -0
- package/dist/primitives/Popover/index.js.map +1 -0
- package/dist/primitives/Progress/index.cjs +44 -0
- package/dist/primitives/Progress/index.cjs.map +1 -0
- package/dist/primitives/Progress/index.d.cts +2 -0
- package/dist/primitives/Progress/index.d.ts +2 -0
- package/dist/primitives/Progress/index.js +43 -0
- package/dist/primitives/Progress/index.js.map +1 -0
- package/dist/primitives/RadioGroup/index.cjs +65 -0
- package/dist/primitives/RadioGroup/index.cjs.map +1 -0
- package/dist/primitives/RadioGroup/index.d.cts +2 -0
- package/dist/primitives/RadioGroup/index.d.ts +2 -0
- package/dist/primitives/RadioGroup/index.js +62 -0
- package/dist/primitives/RadioGroup/index.js.map +1 -0
- package/dist/primitives/Resizable/index.cjs +41 -0
- package/dist/primitives/Resizable/index.cjs.map +1 -0
- package/dist/primitives/Resizable/index.d.cts +2 -0
- package/dist/primitives/Resizable/index.d.ts +2 -0
- package/dist/primitives/Resizable/index.js +36 -0
- package/dist/primitives/Resizable/index.js.map +1 -0
- package/dist/primitives/ScrollArea/index.cjs +40 -0
- package/dist/primitives/ScrollArea/index.cjs.map +1 -0
- package/dist/primitives/ScrollArea/index.d.cts +2 -0
- package/dist/primitives/ScrollArea/index.d.ts +2 -0
- package/dist/primitives/ScrollArea/index.js +38 -0
- package/dist/primitives/ScrollArea/index.js.map +1 -0
- package/dist/primitives/Select/index.cjs +126 -0
- package/dist/primitives/Select/index.cjs.map +1 -0
- package/dist/primitives/Select/index.d.cts +2 -0
- package/dist/primitives/Select/index.d.ts +2 -0
- package/dist/primitives/Select/index.js +116 -0
- package/dist/primitives/Select/index.js.map +1 -0
- package/dist/primitives/Separator/index.cjs +25 -0
- package/dist/primitives/Separator/index.cjs.map +1 -0
- package/dist/primitives/Separator/index.d.cts +2 -0
- package/dist/primitives/Separator/index.d.ts +2 -0
- package/dist/primitives/Separator/index.js +24 -0
- package/dist/primitives/Separator/index.js.map +1 -0
- package/dist/primitives/Sheet/index.cjs +107 -0
- package/dist/primitives/Sheet/index.cjs.map +1 -0
- package/dist/primitives/Sheet/index.d.cts +2 -0
- package/dist/primitives/Sheet/index.d.ts +2 -0
- package/dist/primitives/Sheet/index.js +99 -0
- package/dist/primitives/Sheet/index.js.map +1 -0
- package/dist/primitives/Sidebar/index.cjs +26 -0
- package/dist/primitives/Sidebar/index.d.cts +2 -0
- package/dist/primitives/Sidebar/index.d.ts +2 -0
- package/dist/primitives/Sidebar/index.js +2 -0
- package/dist/primitives/Skeleton/index.cjs +43 -0
- package/dist/primitives/Skeleton/index.cjs.map +1 -0
- package/dist/primitives/Skeleton/index.d.cts +2 -0
- package/dist/primitives/Skeleton/index.d.ts +2 -0
- package/dist/primitives/Skeleton/index.js +39 -0
- package/dist/primitives/Skeleton/index.js.map +1 -0
- package/dist/primitives/Slider/index.cjs +46 -0
- package/dist/primitives/Slider/index.cjs.map +1 -0
- package/dist/primitives/Slider/index.d.cts +2 -0
- package/dist/primitives/Slider/index.d.ts +2 -0
- package/dist/primitives/Slider/index.js +43 -0
- package/dist/primitives/Slider/index.js.map +1 -0
- package/dist/primitives/Sonner/index.cjs +42 -0
- package/dist/primitives/Sonner/index.cjs.map +1 -0
- package/dist/primitives/Sonner/index.d.cts +2 -0
- package/dist/primitives/Sonner/index.d.ts +2 -0
- package/dist/primitives/Sonner/index.js +41 -0
- package/dist/primitives/Sonner/index.js.map +1 -0
- package/dist/primitives/Spinner/index.cjs +19 -0
- package/dist/primitives/Spinner/index.cjs.map +1 -0
- package/dist/primitives/Spinner/index.d.cts +2 -0
- package/dist/primitives/Spinner/index.d.ts +2 -0
- package/dist/primitives/Spinner/index.js +18 -0
- package/dist/primitives/Spinner/index.js.map +1 -0
- package/dist/primitives/Switch/index.cjs +71 -0
- package/dist/primitives/Switch/index.cjs.map +1 -0
- package/dist/primitives/Switch/index.d.cts +2 -0
- package/dist/primitives/Switch/index.d.ts +2 -0
- package/dist/primitives/Switch/index.js +68 -0
- package/dist/primitives/Switch/index.js.map +1 -0
- package/dist/primitives/Table/index.cjs +84 -0
- package/dist/primitives/Table/index.cjs.map +1 -0
- package/dist/primitives/Table/index.d.cts +2 -0
- package/dist/primitives/Table/index.d.ts +2 -0
- package/dist/primitives/Table/index.js +76 -0
- package/dist/primitives/Table/index.js.map +1 -0
- package/dist/primitives/Tabs/index.cjs +267 -0
- package/dist/primitives/Tabs/index.cjs.map +1 -0
- package/dist/primitives/Tabs/index.d.cts +2 -0
- package/dist/primitives/Tabs/index.d.ts +2 -0
- package/dist/primitives/Tabs/index.js +258 -0
- package/dist/primitives/Tabs/index.js.map +1 -0
- package/dist/primitives/Text/index.cjs +64 -0
- package/dist/primitives/Text/index.cjs.map +1 -0
- package/dist/primitives/Text/index.d.cts +2 -0
- package/dist/primitives/Text/index.d.ts +2 -0
- package/dist/primitives/Text/index.js +63 -0
- package/dist/primitives/Text/index.js.map +1 -0
- package/dist/primitives/Textarea/index.cjs +24 -0
- package/dist/primitives/Textarea/index.cjs.map +1 -0
- package/dist/primitives/Textarea/index.d.cts +2 -0
- package/dist/primitives/Textarea/index.d.ts +2 -0
- package/dist/primitives/Textarea/index.js +23 -0
- package/dist/primitives/Textarea/index.js.map +1 -0
- package/dist/primitives/ThemeProvider/index.cjs +93 -0
- package/dist/primitives/ThemeProvider/index.cjs.map +1 -0
- package/dist/primitives/ThemeProvider/index.d.cts +2 -0
- package/dist/primitives/ThemeProvider/index.d.ts +2 -0
- package/dist/primitives/ThemeProvider/index.js +88 -0
- package/dist/primitives/ThemeProvider/index.js.map +1 -0
- package/dist/primitives/Toggle/index.cjs +59 -0
- package/dist/primitives/Toggle/index.cjs.map +1 -0
- package/dist/primitives/Toggle/index.d.cts +2 -0
- package/dist/primitives/Toggle/index.d.ts +2 -0
- package/dist/primitives/Toggle/index.js +58 -0
- package/dist/primitives/Toggle/index.js.map +1 -0
- package/dist/primitives/ToggleGroup/index.cjs +65 -0
- package/dist/primitives/ToggleGroup/index.cjs.map +1 -0
- package/dist/primitives/ToggleGroup/index.d.cts +2 -0
- package/dist/primitives/ToggleGroup/index.d.ts +2 -0
- package/dist/primitives/ToggleGroup/index.js +61 -0
- package/dist/primitives/ToggleGroup/index.js.map +1 -0
- package/dist/primitives/Tooltip/index.cjs +47 -0
- package/dist/primitives/Tooltip/index.cjs.map +1 -0
- package/dist/primitives/Tooltip/index.d.cts +2 -0
- package/dist/primitives/Tooltip/index.d.ts +2 -0
- package/dist/primitives/Tooltip/index.js +43 -0
- package/dist/primitives/Tooltip/index.js.map +1 -0
- package/dist/primitives/index.cjs +398 -255
- package/dist/primitives/index.d.cts +65 -2
- package/dist/primitives/index.d.ts +65 -2
- package/dist/primitives/index.js +65 -5
- package/dist/styles/base.css +113 -0
- package/dist/styles/glass.css +75 -0
- package/dist/styles/index.css +43 -23
- package/dist/styles/semantic.css +167 -0
- package/dist/styles/theme.css +54 -24
- package/dist/styles/tokens/alpha.css +39 -0
- package/dist/styles/tokens/border-radius.css +17 -0
- package/dist/styles/tokens/chart-colors-dark.css +18 -0
- package/dist/styles/tokens/chart-colors-light.css +18 -0
- package/dist/styles/tokens/colors.css +251 -0
- package/dist/styles/tokens/mode-dark.css +101 -0
- package/dist/styles/tokens/mode-light.css +101 -0
- package/dist/styles/tokens/shadows.css +14 -0
- package/dist/styles/tokens/spacing.css +44 -0
- package/dist/styles/tokens/theme-bodhi.css +35 -0
- package/dist/styles/tokens/theme-slingshot.css +35 -0
- package/dist/styles/tokens/theme-sustain.css +35 -0
- package/dist/styles/tokens/typography.css +83 -0
- package/package.json +33 -40
- package/dist/AiChatPanel.cjs +0 -1603
- package/dist/AiChatPanel.cjs.map +0 -1
- package/dist/AiChatPanel.js +0 -1526
- package/dist/AiChatPanel.js.map +0 -1
- package/dist/BodhiLogo.cjs +0 -240
- package/dist/BodhiLogo.cjs.map +0 -1
- package/dist/BodhiLogo.js +0 -194
- package/dist/BodhiLogo.js.map +0 -1
- package/dist/Skeleton.cjs +0 -19
- package/dist/Skeleton.cjs.map +0 -1
- package/dist/Skeleton.js +0 -14
- package/dist/Skeleton.js.map +0 -1
- package/dist/SustainLogo.cjs +0 -415
- package/dist/SustainLogo.cjs.map +0 -1
- package/dist/SustainLogo.js +0 -378
- package/dist/SustainLogo.js.map +0 -1
- package/dist/contexts/index.cjs.map +0 -1
- package/dist/contexts/index.d.cts.map +0 -1
- package/dist/contexts/index.d.ts.map +0 -1
- package/dist/contexts/index.js.map +0 -1
- package/dist/layouts/index.d.cts.map +0 -1
- package/dist/layouts/index.d.ts.map +0 -1
- package/dist/layouts.cjs +0 -3245
- package/dist/layouts.cjs.map +0 -1
- package/dist/layouts.js +0 -3180
- package/dist/layouts.js.map +0 -1
- package/dist/patterns/index.cjs.map +0 -1
- package/dist/patterns/index.d.cts.map +0 -1
- package/dist/patterns/index.d.ts.map +0 -1
- package/dist/patterns/index.js.map +0 -1
- package/dist/primitives.cjs +0 -4292
- package/dist/primitives.cjs.map +0 -1
- package/dist/primitives.js +0 -2807
- package/dist/primitives.js.map +0 -1
- package/dist/styles/base/colors.css +0 -300
- package/dist/styles/base/component-tokens.css +0 -240
- package/dist/styles/base/elevation.css +0 -7
- package/dist/styles/base/fonts.css +0 -14
- package/dist/styles/base/global.css +0 -305
- package/dist/styles/base/radius.css +0 -22
- package/dist/styles/base/semantic-aliases.css +0 -53
- package/dist/styles/base/spacing.css +0 -33
- package/dist/styles/base/typography.css +0 -48
- package/dist/styles/generated/bodhi-vars.css +0 -34
- package/dist/styles/generated/dark.css +0 -87
- package/dist/styles/generated/light.css +0 -87
- package/dist/styles/generated/slingshot-vars.css +0 -34
- package/dist/styles/generated/sustain-vars.css +0 -34
- package/dist/styles/themes/bodhi.css +0 -166
- package/dist/styles/themes/slingshot.css +0 -144
- package/dist/styles/themes/sustain.css +0 -130
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { t as cn } from "../../cn.js";
|
|
2
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
3
|
+
import { Select as Select$1 } from "radix-ui";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/Select/Select.tsx
|
|
6
|
+
/** Root of the select. Holds the open/value state and wires the trigger to the content. */
|
|
7
|
+
function Select({ ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Select$1.Root, {
|
|
9
|
+
"data-slot": "select",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/** Groups related items under a shared `SelectLabel` for sectioned menus. */
|
|
14
|
+
function SelectGroup({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Select$1.Group, {
|
|
16
|
+
"data-slot": "select-group",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** Renders the selected value (or the `placeholder`) inside the trigger. */
|
|
21
|
+
function SelectValue({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Select$1.Value, {
|
|
23
|
+
"data-slot": "select-value",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** The clickable control that opens the menu and shows the current value. */
|
|
28
|
+
function SelectTrigger({ className, size = "default", width = "full", label, children, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
30
|
+
"data-slot": "select-trigger",
|
|
31
|
+
"data-size": size,
|
|
32
|
+
"data-lines": label ? "2" : "1",
|
|
33
|
+
className: cn("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 items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 data-[size=default]:h-9 data-[size=lg]:h-10 data-[lines=2]:h-auto data-[lines=2]:py-1.5 *: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", width === "full" ? "w-full" : "w-fit", className),
|
|
34
|
+
...props,
|
|
35
|
+
children: [label ? /* @__PURE__ */ jsxs("span", {
|
|
36
|
+
className: "flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left",
|
|
37
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: "text-xs leading-none font-normal text-muted-foreground",
|
|
39
|
+
children: label
|
|
40
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: "flex w-full items-center gap-2 text-sm",
|
|
42
|
+
children
|
|
43
|
+
})]
|
|
44
|
+
}) : children, /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
45
|
+
asChild: true,
|
|
46
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
47
|
+
})]
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/** The portalled popover that holds the list of items. */
|
|
51
|
+
function SelectContent({ className, children, position = "popper", ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsxs(Select$1.Content, {
|
|
53
|
+
"data-slot": "select-content",
|
|
54
|
+
className: cn("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", 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", className),
|
|
55
|
+
position,
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
59
|
+
/* @__PURE__ */ jsx(Select$1.Viewport, {
|
|
60
|
+
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
61
|
+
children
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
64
|
+
]
|
|
65
|
+
}) });
|
|
66
|
+
}
|
|
67
|
+
/** A non-interactive heading for a `SelectGroup`. */
|
|
68
|
+
function SelectLabel({ className, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(Select$1.Label, {
|
|
70
|
+
"data-slot": "select-label",
|
|
71
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/** A selectable option; its `value` becomes the select's value when chosen. */
|
|
76
|
+
function SelectItem({ className, children, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
78
|
+
"data-slot": "select-item",
|
|
79
|
+
className: cn("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", className),
|
|
80
|
+
...props,
|
|
81
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
82
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
83
|
+
children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
84
|
+
}), /* @__PURE__ */ jsx(Select$1.ItemText, { children })]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/** A thin divider rule between groups or items. */
|
|
88
|
+
function SelectSeparator({ className, ...props }) {
|
|
89
|
+
return /* @__PURE__ */ jsx(Select$1.Separator, {
|
|
90
|
+
"data-slot": "select-separator",
|
|
91
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/** Auto-shown scroll affordance at the top of a long, overflowing list. */
|
|
96
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
97
|
+
return /* @__PURE__ */ jsx(Select$1.ScrollUpButton, {
|
|
98
|
+
"data-slot": "select-scroll-up-button",
|
|
99
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
100
|
+
...props,
|
|
101
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/** Auto-shown scroll affordance at the bottom of a long, overflowing list. */
|
|
105
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx(Select$1.ScrollDownButton, {
|
|
107
|
+
"data-slot": "select-scroll-down-button",
|
|
108
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
109
|
+
...props,
|
|
110
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["SelectPrimitive"],"sources":["../../../src/primitives/Select/Select.tsx"],"sourcesContent":["import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\nimport { Select as SelectPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of the select. Holds the open/value state and wires the trigger to the content. */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related items under a shared `SelectLabel` for sectioned menus. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the selected value (or the `placeholder`) inside the trigger. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/** The clickable control that opens the menu and shows the current value. */\nfunction SelectTrigger({\n className,\n size = \"default\",\n width = \"full\",\n label,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Trigger height: `sm` (h-8), `default` (h-9), or `lg` (h-10). */\n size?: \"sm\" | \"default\" | \"lg\";\n /** Trigger width: `full` stretches to the container, `fit` hugs the value. */\n width?: \"full\" | \"fit\";\n /** Optional stacked label rendered above the value (2-line trigger). */\n label?: React.ReactNode;\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n data-lines={label ? \"2\" : \"1\"}\n className={cn(\n \"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 items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 data-[size=default]:h-9 data-[size=lg]:h-10 data-[lines=2]:h-auto data-[lines=2]:py-1.5 *: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\",\n width === \"full\" ? \"w-full\" : \"w-fit\",\n className,\n )}\n {...props}\n >\n {label ? (\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left\">\n <span className=\"text-xs leading-none font-normal text-muted-foreground\">{label}</span>\n <span className=\"flex w-full items-center gap-2 text-sm\">{children}</span>\n </span>\n ) : (\n children\n )}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** The portalled popover that holds the list of items. */\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"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\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** A non-interactive heading for a `SelectGroup`. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable option; its `value` becomes the select's value when chosen. */\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"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\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\n/** A thin divider rule between groups or items. */\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\n/** Auto-shown scroll affordance at the top of a long, overflowing list. */\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\n/** Auto-shown scroll affordance at the bottom of a long, overflowing list. */\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;AAOA,SAAS,OAAO,EAAE,GAAG,SAA4D;CAC/E,OAAO,oBAACA,SAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,oBAACA,SAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,oBAACA,SAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,QAAQ,QACR,OACA,UACA,GAAG,SAQF;CACD,OACE,qBAACA,SAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,cAAY,QAAQ,MAAM;EAC1B,WAAW,GACT,q2BACA,UAAU,SAAS,WAAW,SAC9B,SACF;EACA,GAAI;YATN,CAWG,QACC,qBAAC,QAAD;GAAM,WAAU;aAAhB,CACE,oBAAC,QAAD;IAAM,WAAU;cAA0D;GAAY,CAAA,GACtF,oBAAC,QAAD;IAAM,WAAU;IAA0C;GAAe,CAAA,CACrE;OAEN,UAEF,oBAACA,SAAgB,MAAjB;GAAsB,SAAA;aACpB,oBAAC,iBAAD,EAAiB,WAAU,oBAAqB,CAAA;EAC5B,CAAA,CACC;;AAE7B;;AAGA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,UACX,GAAG,SACoD;CACvD,OACE,oBAACA,SAAgB,QAAjB,EAAA,UACE,qBAACA,SAAgB,SAAjB;EACE,aAAU;EACV,WAAW,GACT,ijBACA,aAAa,YACX,mIACF,SACF;EACU;EACV,GAAI;YATN;GAWE,oBAAC,sBAAD,CAAuB,CAAA;GACvB,oBAACA,SAAgB,UAAjB;IACE,WAAW,GACT,OACA,aAAa,YACX,qGACJ;IAEC;GACuB,CAAA;GAC1B,oBAAC,wBAAD,CAAyB,CAAA;EACF;IACH,CAAA;AAE5B;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,qBAACA,SAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT,6aACA,SACF;EACA,GAAI;YANN,CAQE,oBAAC,QAAD;GAAM,WAAU;aACd,oBAACA,SAAgB,eAAjB,EAAA,UACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,EACF,CAAA;EAC3B,CAAA,GACN,oBAACA,SAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;;AAGA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,oBAACA,SAAgB,WAAjB;EACE,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAACA,SAAgB,gBAAjB;EACE,aAAU;EACV,WAAW,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,oBAAC,eAAD,EAAe,WAAU,SAAU,CAAA;CACL,CAAA;AAEpC;;AAGA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAACA,SAAgB,kBAAjB;EACE,aAAU;EACV,WAAW,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,oBAAC,iBAAD,EAAiB,WAAU,SAAU,CAAA;CACL,CAAA;AAEtC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_cn = require("../../cn.cjs");
|
|
3
|
+
let radix_ui = require("radix-ui");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
//#region src/primitives/Separator/Separator.tsx
|
|
6
|
+
const spacingClasses = {
|
|
7
|
+
none: "",
|
|
8
|
+
regular: "data-[orientation=horizontal]:my-2 data-[orientation=vertical]:mx-2",
|
|
9
|
+
spacious: "data-[orientation=horizontal]:my-4 data-[orientation=vertical]:mx-4"
|
|
10
|
+
};
|
|
11
|
+
/** A thin rule that visually or semantically divides content, horizontally or vertically. */
|
|
12
|
+
function Separator({ className, orientation = "horizontal", decorative = true, spacing = "none", ...props }) {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Separator.Root, {
|
|
14
|
+
"data-slot": "separator",
|
|
15
|
+
"data-spacing": spacing,
|
|
16
|
+
decorative,
|
|
17
|
+
orientation,
|
|
18
|
+
className: require_cn.cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", spacingClasses[spacing], className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.Separator = Separator;
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["SeparatorPrimitive","cn"],"sources":["../../../src/primitives/Separator/Separator.tsx"],"sourcesContent":["import { Separator as SeparatorPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype SeparatorSpacing = \"none\" | \"regular\" | \"spacious\";\n\nconst spacingClasses: Record<SeparatorSpacing, string> = {\n none: \"\",\n regular: \"data-[orientation=horizontal]:my-2 data-[orientation=vertical]:mx-2\",\n spacious: \"data-[orientation=horizontal]:my-4 data-[orientation=vertical]:mx-4\",\n};\n\n/** A thin rule that visually or semantically divides content, horizontally or vertically. */\nfunction Separator({\n className,\n orientation = \"horizontal\",\n decorative = true,\n spacing = \"none\",\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root> & {\n /** Margin applied around the rule along its axis: `none`, `regular`, or `spacious`. */\n spacing?: SeparatorSpacing;\n}) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n data-spacing={spacing}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px\",\n spacingClasses[spacing],\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\nexport type { SeparatorSpacing };\n"],"mappings":";;;;;AAOA,MAAM,iBAAmD;CACvD,MAAM;CACN,SAAS;CACT,UAAU;AACZ;;AAGA,SAAS,UAAU,EACjB,WACA,cAAc,cACd,aAAa,MACb,UAAU,QACV,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,UAAmB,MAApB;EACE,aAAU;EACV,gBAAc;EACF;EACC;EACb,WAAWC,WAAAA,GACT,kKACA,eAAe,UACf,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { t as cn } from "../../cn.js";
|
|
2
|
+
import { Separator as Separator$1 } from "radix-ui";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/primitives/Separator/Separator.tsx
|
|
5
|
+
const spacingClasses = {
|
|
6
|
+
none: "",
|
|
7
|
+
regular: "data-[orientation=horizontal]:my-2 data-[orientation=vertical]:mx-2",
|
|
8
|
+
spacious: "data-[orientation=horizontal]:my-4 data-[orientation=vertical]:mx-4"
|
|
9
|
+
};
|
|
10
|
+
/** A thin rule that visually or semantically divides content, horizontally or vertically. */
|
|
11
|
+
function Separator({ className, orientation = "horizontal", decorative = true, spacing = "none", ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Separator$1.Root, {
|
|
13
|
+
"data-slot": "separator",
|
|
14
|
+
"data-spacing": spacing,
|
|
15
|
+
decorative,
|
|
16
|
+
orientation,
|
|
17
|
+
className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", spacingClasses[spacing], className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Separator };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["SeparatorPrimitive"],"sources":["../../../src/primitives/Separator/Separator.tsx"],"sourcesContent":["import { Separator as SeparatorPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype SeparatorSpacing = \"none\" | \"regular\" | \"spacious\";\n\nconst spacingClasses: Record<SeparatorSpacing, string> = {\n none: \"\",\n regular: \"data-[orientation=horizontal]:my-2 data-[orientation=vertical]:mx-2\",\n spacious: \"data-[orientation=horizontal]:my-4 data-[orientation=vertical]:mx-4\",\n};\n\n/** A thin rule that visually or semantically divides content, horizontally or vertically. */\nfunction Separator({\n className,\n orientation = \"horizontal\",\n decorative = true,\n spacing = \"none\",\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root> & {\n /** Margin applied around the rule along its axis: `none`, `regular`, or `spacious`. */\n spacing?: SeparatorSpacing;\n}) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n data-spacing={spacing}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px\",\n spacingClasses[spacing],\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\nexport type { SeparatorSpacing };\n"],"mappings":";;;;AAOA,MAAM,iBAAmD;CACvD,MAAM;CACN,SAAS;CACT,UAAU;AACZ;;AAGA,SAAS,UAAU,EACjB,WACA,cAAc,cACd,aAAa,MACb,UAAU,QACV,GAAG,SAIF;CACD,OACE,oBAACA,YAAmB,MAApB;EACE,aAAU;EACV,gBAAc;EACF;EACC;EACb,WAAW,GACT,kKACA,eAAe,UACf,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_cn = require("../../cn.cjs");
|
|
3
|
+
let lucide_react = require("lucide-react");
|
|
4
|
+
let radix_ui = require("radix-ui");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
//#region src/primitives/Sheet/Sheet.tsx
|
|
7
|
+
/** Root provider for a slide-in panel (drawer). Wraps a `SheetTrigger` and `SheetContent`; controls open/closed state. */
|
|
8
|
+
function Sheet({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Root, {
|
|
10
|
+
"data-slot": "sheet",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** Element that opens the sheet when activated. Use `asChild` to wrap your own button. */
|
|
15
|
+
function SheetTrigger({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Trigger, {
|
|
17
|
+
"data-slot": "sheet-trigger",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/** Element that closes the sheet when activated. Use `asChild` to wrap your own button. */
|
|
22
|
+
function SheetClose({ ...props }) {
|
|
23
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Close, {
|
|
24
|
+
"data-slot": "sheet-close",
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** Portals the overlay and content out of the DOM tree to the document body. */
|
|
29
|
+
function SheetPortal({ ...props }) {
|
|
30
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Portal, {
|
|
31
|
+
"data-slot": "sheet-portal",
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** Full-screen scrim rendered behind the sheet content. */
|
|
36
|
+
function SheetOverlay({ className, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Overlay, {
|
|
38
|
+
"data-slot": "sheet-overlay",
|
|
39
|
+
className: require_cn.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/** Predefined scrim styles for the sheet overlay. Pass via `overlay`. */
|
|
44
|
+
const sheetOverlayVariants = {
|
|
45
|
+
default: "bg-[var(--overlay)]",
|
|
46
|
+
dark: "bg-black/50",
|
|
47
|
+
glass: "bg-[var(--glass-medium)] backdrop-blur-[45px]",
|
|
48
|
+
none: "bg-transparent"
|
|
49
|
+
};
|
|
50
|
+
/** The sliding panel surface (portaled, with its overlay). Holds the header, body, and footer. */
|
|
51
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, overlay = "default", ...props }) {
|
|
52
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SheetPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SheetOverlay, { className: sheetOverlayVariants[overlay] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(radix_ui.Dialog.Content, {
|
|
53
|
+
"data-slot": "sheet-content",
|
|
54
|
+
className: require_cn.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 overflow-y-auto shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
|
|
55
|
+
...props,
|
|
56
|
+
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(radix_ui.Dialog.Close, {
|
|
57
|
+
className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
|
|
58
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.XIcon, { className: "size-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59
|
+
className: "sr-only",
|
|
60
|
+
children: "Close"
|
|
61
|
+
})]
|
|
62
|
+
})]
|
|
63
|
+
})] });
|
|
64
|
+
}
|
|
65
|
+
/** Top region of the sheet; typically holds the `SheetTitle` and `SheetDescription`. */
|
|
66
|
+
function SheetHeader({ className, ...props }) {
|
|
67
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
68
|
+
"data-slot": "sheet-header",
|
|
69
|
+
className: require_cn.cn("flex flex-col gap-1.5 p-4", className),
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/** Bottom region of the sheet, pinned to the base; typically holds action buttons. */
|
|
74
|
+
function SheetFooter({ className, ...props }) {
|
|
75
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
76
|
+
"data-slot": "sheet-footer",
|
|
77
|
+
className: require_cn.cn("mt-auto flex flex-col-reverse gap-2 p-4 sm:flex-row sm:justify-end", className),
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** Accessible title for the sheet, announced when it opens. */
|
|
82
|
+
function SheetTitle({ className, ...props }) {
|
|
83
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Title, {
|
|
84
|
+
"data-slot": "sheet-title",
|
|
85
|
+
className: require_cn.cn("text-foreground font-semibold", className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/** Accessible supporting text for the sheet, linked to the dialog for screen readers. */
|
|
90
|
+
function SheetDescription({ className, ...props }) {
|
|
91
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Description, {
|
|
92
|
+
"data-slot": "sheet-description",
|
|
93
|
+
className: require_cn.cn("text-muted-foreground text-sm", className),
|
|
94
|
+
...props
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
exports.Sheet = Sheet;
|
|
99
|
+
exports.SheetClose = SheetClose;
|
|
100
|
+
exports.SheetContent = SheetContent;
|
|
101
|
+
exports.SheetDescription = SheetDescription;
|
|
102
|
+
exports.SheetFooter = SheetFooter;
|
|
103
|
+
exports.SheetHeader = SheetHeader;
|
|
104
|
+
exports.SheetTitle = SheetTitle;
|
|
105
|
+
exports.SheetTrigger = SheetTrigger;
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["SheetPrimitive","cn","XIcon"],"sources":["../../../src/primitives/Sheet/Sheet.tsx"],"sourcesContent":["import { XIcon } from \"lucide-react\";\nimport { Dialog as SheetPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root provider for a slide-in panel (drawer). Wraps a `SheetTrigger` and `SheetContent`; controls open/closed state. */\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\n/** Element that opens the sheet when activated. Use `asChild` to wrap your own button. */\nfunction SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\n/** Element that closes the sheet when activated. Use `asChild` to wrap your own button. */\nfunction SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\n/** Portals the overlay and content out of the DOM tree to the document body. */\nfunction SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\n/** Full-screen scrim rendered behind the sheet content. */\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Predefined scrim styles for the sheet overlay. Pass via `overlay`. */\nconst sheetOverlayVariants = {\n default: \"bg-[var(--overlay)]\",\n dark: \"bg-black/50\",\n glass: \"bg-[var(--glass-medium)] backdrop-blur-[45px]\",\n none: \"bg-transparent\",\n} as const;\n\n/** The sliding panel surface (portaled, with its overlay). Holds the header, body, and footer. */\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n showCloseButton = true,\n overlay = \"default\",\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n /** Edge the sheet slides in from. */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n /** Whether to render the built-in top-right close (X) button. */\n showCloseButton?: boolean;\n /** Scrim style behind the sheet (e.g. `glass` for drawer patterns). */\n overlay?: keyof typeof sheetOverlayVariants;\n}) {\n return (\n <SheetPortal>\n <SheetOverlay className={sheetOverlayVariants[overlay]} />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 overflow-y-auto shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n side === \"right\" &&\n \"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n side === \"left\" &&\n \"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n side === \"top\" &&\n \"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b\",\n side === \"bottom\" &&\n \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close className=\"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\n/** Top region of the sheet; typically holds the `SheetTitle` and `SheetDescription`. */\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n {...props}\n />\n );\n}\n\n/** Bottom region of the sheet, pinned to the base; typically holds action buttons. */\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\n \"mt-auto flex flex-col-reverse gap-2 p-4 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Accessible title for the sheet, announced when it opens. */\nfunction SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\"text-foreground font-semibold\", className)}\n {...props}\n />\n );\n}\n\n/** Accessible supporting text for the sheet, linked to the dialog for screen readers. */\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n"],"mappings":";;;;;;;AAOA,SAAS,MAAM,EAAE,GAAG,SAA2D;CAC7E,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAe,MAAhB;EAAqB,aAAU;EAAQ,GAAI;CAAQ,CAAA;AAC5D;;AAGA,SAAS,aAAa,EAAE,GAAG,SAA8D;CACvF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAe,SAAhB;EAAwB,aAAU;EAAgB,GAAI;CAAQ,CAAA;AACvE;;AAGA,SAAS,WAAW,EAAE,GAAG,SAA4D;CACnF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAe,OAAhB;EAAsB,aAAU;EAAc,GAAI;CAAQ,CAAA;AACnE;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAe,QAAhB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,aAAa,EACpB,WACA,GAAG,SACmD;CACtD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAe,SAAhB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,8IACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,MAAM,uBAAuB;CAC3B,SAAS;CACT,MAAM;CACN,OAAO;CACP,MAAM;AACR;;AAGA,SAAS,aAAa,EACpB,WACA,UACA,OAAO,SACP,kBAAkB,MAClB,UAAU,WACV,GAAG,SAQF;CACD,OACE,iBAAA,GAAA,kBAAA,MAAC,aAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAC,cAAD,EAAc,WAAW,qBAAqB,SAAW,CAAA,GACzD,iBAAA,GAAA,kBAAA,MAACD,SAAAA,OAAe,SAAhB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,8NACA,SAAS,WACP,oIACF,SAAS,UACP,iIACF,SAAS,SACP,4GACF,SAAS,YACP,qHACF,SACF;EACA,GAAI;YAdN,CAgBG,UACA,mBACC,iBAAA,GAAA,kBAAA,MAACD,SAAAA,OAAe,OAAhB;GAAsB,WAAU;aAAhC,CACE,iBAAA,GAAA,kBAAA,KAACE,aAAAA,OAAD,EAAO,WAAU,SAAU,CAAA,GAC3B,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;cAAU;GAAW,CAAA,CACjB;IAEF;GACb,EAAA,CAAA;AAEjB;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWD,WAAAA,GAAG,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,sEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA4D;CAC9F,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAe,OAAhB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAe,aAAhB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as SheetFooter, c as SheetTrigger, i as SheetDescription, n as SheetClose, o as SheetHeader, r as SheetContent, s as SheetTitle, t as Sheet } from "../../index50.cjs";
|
|
2
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as SheetFooter, c as SheetTrigger, i as SheetDescription, n as SheetClose, o as SheetHeader, r as SheetContent, s as SheetTitle, t as Sheet } from "../../index50.js";
|
|
2
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { t as cn } from "../../cn.js";
|
|
2
|
+
import { XIcon } from "lucide-react";
|
|
3
|
+
import { Dialog } from "radix-ui";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/primitives/Sheet/Sheet.tsx
|
|
6
|
+
/** Root provider for a slide-in panel (drawer). Wraps a `SheetTrigger` and `SheetContent`; controls open/closed state. */
|
|
7
|
+
function Sheet({ ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
9
|
+
"data-slot": "sheet",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/** Element that opens the sheet when activated. Use `asChild` to wrap your own button. */
|
|
14
|
+
function SheetTrigger({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
16
|
+
"data-slot": "sheet-trigger",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** Element that closes the sheet when activated. Use `asChild` to wrap your own button. */
|
|
21
|
+
function SheetClose({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
23
|
+
"data-slot": "sheet-close",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** Portals the overlay and content out of the DOM tree to the document body. */
|
|
28
|
+
function SheetPortal({ ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
30
|
+
"data-slot": "sheet-portal",
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** Full-screen scrim rendered behind the sheet content. */
|
|
35
|
+
function SheetOverlay({ className, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsx(Dialog.Overlay, {
|
|
37
|
+
"data-slot": "sheet-overlay",
|
|
38
|
+
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50", className),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** Predefined scrim styles for the sheet overlay. Pass via `overlay`. */
|
|
43
|
+
const sheetOverlayVariants = {
|
|
44
|
+
default: "bg-[var(--overlay)]",
|
|
45
|
+
dark: "bg-black/50",
|
|
46
|
+
glass: "bg-[var(--glass-medium)] backdrop-blur-[45px]",
|
|
47
|
+
none: "bg-transparent"
|
|
48
|
+
};
|
|
49
|
+
/** The sliding panel surface (portaled, with its overlay). Holds the header, body, and footer. */
|
|
50
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, overlay = "default", ...props }) {
|
|
51
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, { className: sheetOverlayVariants[overlay] }), /* @__PURE__ */ jsxs(Dialog.Content, {
|
|
52
|
+
"data-slot": "sheet-content",
|
|
53
|
+
className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 overflow-y-auto shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", className),
|
|
54
|
+
...props,
|
|
55
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
56
|
+
className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",
|
|
57
|
+
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "sr-only",
|
|
59
|
+
children: "Close"
|
|
60
|
+
})]
|
|
61
|
+
})]
|
|
62
|
+
})] });
|
|
63
|
+
}
|
|
64
|
+
/** Top region of the sheet; typically holds the `SheetTitle` and `SheetDescription`. */
|
|
65
|
+
function SheetHeader({ className, ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx("div", {
|
|
67
|
+
"data-slot": "sheet-header",
|
|
68
|
+
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/** Bottom region of the sheet, pinned to the base; typically holds action buttons. */
|
|
73
|
+
function SheetFooter({ className, ...props }) {
|
|
74
|
+
return /* @__PURE__ */ jsx("div", {
|
|
75
|
+
"data-slot": "sheet-footer",
|
|
76
|
+
className: cn("mt-auto flex flex-col-reverse gap-2 p-4 sm:flex-row sm:justify-end", className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/** Accessible title for the sheet, announced when it opens. */
|
|
81
|
+
function SheetTitle({ className, ...props }) {
|
|
82
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
83
|
+
"data-slot": "sheet-title",
|
|
84
|
+
className: cn("text-foreground font-semibold", className),
|
|
85
|
+
...props
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** Accessible supporting text for the sheet, linked to the dialog for screen readers. */
|
|
89
|
+
function SheetDescription({ className, ...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
91
|
+
"data-slot": "sheet-description",
|
|
92
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
98
|
+
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["SheetPrimitive"],"sources":["../../../src/primitives/Sheet/Sheet.tsx"],"sourcesContent":["import { XIcon } from \"lucide-react\";\nimport { Dialog as SheetPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root provider for a slide-in panel (drawer). Wraps a `SheetTrigger` and `SheetContent`; controls open/closed state. */\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\n/** Element that opens the sheet when activated. Use `asChild` to wrap your own button. */\nfunction SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\n/** Element that closes the sheet when activated. Use `asChild` to wrap your own button. */\nfunction SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\n/** Portals the overlay and content out of the DOM tree to the document body. */\nfunction SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\n/** Full-screen scrim rendered behind the sheet content. */\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Predefined scrim styles for the sheet overlay. Pass via `overlay`. */\nconst sheetOverlayVariants = {\n default: \"bg-[var(--overlay)]\",\n dark: \"bg-black/50\",\n glass: \"bg-[var(--glass-medium)] backdrop-blur-[45px]\",\n none: \"bg-transparent\",\n} as const;\n\n/** The sliding panel surface (portaled, with its overlay). Holds the header, body, and footer. */\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n showCloseButton = true,\n overlay = \"default\",\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n /** Edge the sheet slides in from. */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n /** Whether to render the built-in top-right close (X) button. */\n showCloseButton?: boolean;\n /** Scrim style behind the sheet (e.g. `glass` for drawer patterns). */\n overlay?: keyof typeof sheetOverlayVariants;\n}) {\n return (\n <SheetPortal>\n <SheetOverlay className={sheetOverlayVariants[overlay]} />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 overflow-y-auto shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n side === \"right\" &&\n \"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n side === \"left\" &&\n \"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n side === \"top\" &&\n \"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b\",\n side === \"bottom\" &&\n \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close className=\"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\n/** Top region of the sheet; typically holds the `SheetTitle` and `SheetDescription`. */\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n {...props}\n />\n );\n}\n\n/** Bottom region of the sheet, pinned to the base; typically holds action buttons. */\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\n \"mt-auto flex flex-col-reverse gap-2 p-4 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Accessible title for the sheet, announced when it opens. */\nfunction SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\"text-foreground font-semibold\", className)}\n {...props}\n />\n );\n}\n\n/** Accessible supporting text for the sheet, linked to the dialog for screen readers. */\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n};\n"],"mappings":";;;;;;AAOA,SAAS,MAAM,EAAE,GAAG,SAA2D;CAC7E,OAAO,oBAACA,OAAe,MAAhB;EAAqB,aAAU;EAAQ,GAAI;CAAQ,CAAA;AAC5D;;AAGA,SAAS,aAAa,EAAE,GAAG,SAA8D;CACvF,OAAO,oBAACA,OAAe,SAAhB;EAAwB,aAAU;EAAgB,GAAI;CAAQ,CAAA;AACvE;;AAGA,SAAS,WAAW,EAAE,GAAG,SAA4D;CACnF,OAAO,oBAACA,OAAe,OAAhB;EAAsB,aAAU;EAAc,GAAI;CAAQ,CAAA;AACnE;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,oBAACA,OAAe,QAAhB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,aAAa,EACpB,WACA,GAAG,SACmD;CACtD,OACE,oBAACA,OAAe,SAAhB;EACE,aAAU;EACV,WAAW,GACT,8IACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,MAAM,uBAAuB;CAC3B,SAAS;CACT,MAAM;CACN,OAAO;CACP,MAAM;AACR;;AAGA,SAAS,aAAa,EACpB,WACA,UACA,OAAO,SACP,kBAAkB,MAClB,UAAU,WACV,GAAG,SAQF;CACD,OACE,qBAAC,aAAD,EAAA,UAAA,CACE,oBAAC,cAAD,EAAc,WAAW,qBAAqB,SAAW,CAAA,GACzD,qBAACA,OAAe,SAAhB;EACE,aAAU;EACV,WAAW,GACT,8NACA,SAAS,WACP,oIACF,SAAS,UACP,iIACF,SAAS,SACP,4GACF,SAAS,YACP,qHACF,SACF;EACA,GAAI;YAdN,CAgBG,UACA,mBACC,qBAACA,OAAe,OAAhB;GAAsB,WAAU;aAAhC,CACE,oBAAC,OAAD,EAAO,WAAU,SAAU,CAAA,GAC3B,oBAAC,QAAD;IAAM,WAAU;cAAU;GAAW,CAAA,CACjB;IAEF;GACb,EAAA,CAAA;AAEjB;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,sEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA4D;CAC9F,OACE,oBAACA,OAAe,OAAhB;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,OAAe,aAAhB;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_Sidebar = require("../../Sidebar.cjs");
|
|
3
|
+
exports.Sidebar = require_Sidebar.Sidebar;
|
|
4
|
+
exports.SidebarContent = require_Sidebar.SidebarContent;
|
|
5
|
+
exports.SidebarFooter = require_Sidebar.SidebarFooter;
|
|
6
|
+
exports.SidebarGroup = require_Sidebar.SidebarGroup;
|
|
7
|
+
exports.SidebarGroupAction = require_Sidebar.SidebarGroupAction;
|
|
8
|
+
exports.SidebarGroupContent = require_Sidebar.SidebarGroupContent;
|
|
9
|
+
exports.SidebarGroupLabel = require_Sidebar.SidebarGroupLabel;
|
|
10
|
+
exports.SidebarHeader = require_Sidebar.SidebarHeader;
|
|
11
|
+
exports.SidebarInput = require_Sidebar.SidebarInput;
|
|
12
|
+
exports.SidebarInset = require_Sidebar.SidebarInset;
|
|
13
|
+
exports.SidebarMenu = require_Sidebar.SidebarMenu;
|
|
14
|
+
exports.SidebarMenuAction = require_Sidebar.SidebarMenuAction;
|
|
15
|
+
exports.SidebarMenuBadge = require_Sidebar.SidebarMenuBadge;
|
|
16
|
+
exports.SidebarMenuButton = require_Sidebar.SidebarMenuButton;
|
|
17
|
+
exports.SidebarMenuItem = require_Sidebar.SidebarMenuItem;
|
|
18
|
+
exports.SidebarMenuSkeleton = require_Sidebar.SidebarMenuSkeleton;
|
|
19
|
+
exports.SidebarMenuSub = require_Sidebar.SidebarMenuSub;
|
|
20
|
+
exports.SidebarMenuSubButton = require_Sidebar.SidebarMenuSubButton;
|
|
21
|
+
exports.SidebarMenuSubItem = require_Sidebar.SidebarMenuSubItem;
|
|
22
|
+
exports.SidebarProvider = require_Sidebar.SidebarProvider;
|
|
23
|
+
exports.SidebarRail = require_Sidebar.SidebarRail;
|
|
24
|
+
exports.SidebarSeparator = require_Sidebar.SidebarSeparator;
|
|
25
|
+
exports.SidebarTrigger = require_Sidebar.SidebarTrigger;
|
|
26
|
+
exports.useSidebar = require_Sidebar.useSidebar;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "../../index52.cjs";
|
|
2
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "../../index52.js";
|
|
2
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "../../Sidebar.js";
|
|
2
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_cn = require("../../cn.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
//#region src/primitives/Skeleton/Skeleton.tsx
|
|
5
|
+
/** Animated shimmer placeholder for content that is still loading. */
|
|
6
|
+
function Skeleton({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8
|
+
"data-slot": "skeleton",
|
|
9
|
+
className: require_cn.cn("skeleton-shimmer rounded-md", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/** Skeleton sized as a circular avatar placeholder (`size-10 rounded-full`). */
|
|
14
|
+
function SkeletonAvatar({ className, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
16
|
+
"data-slot": "skeleton-avatar",
|
|
17
|
+
className: require_cn.cn("size-10 rounded-full", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/** Skeleton sized as a single line of text (`h-4 w-full rounded-full`). */
|
|
22
|
+
function SkeletonLine({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
24
|
+
"data-slot": "skeleton-line",
|
|
25
|
+
className: require_cn.cn("h-4 w-full rounded-full", className),
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** Skeleton sized as a larger block, e.g. an image or card body (`h-24 w-full`). */
|
|
30
|
+
function SkeletonObject({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
32
|
+
"data-slot": "skeleton-object",
|
|
33
|
+
className: require_cn.cn("h-24 w-full rounded-md", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
exports.Skeleton = Skeleton;
|
|
39
|
+
exports.SkeletonAvatar = SkeletonAvatar;
|
|
40
|
+
exports.SkeletonLine = SkeletonLine;
|
|
41
|
+
exports.SkeletonObject = SkeletonObject;
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\n\n/** Animated shimmer placeholder for content that is still loading. */\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"skeleton\" className={cn(\"skeleton-shimmer rounded-md\", className)} {...props} />\n );\n}\n\n/** Skeleton sized as a circular avatar placeholder (`size-10 rounded-full`). */\nfunction SkeletonAvatar({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-avatar\"\n className={cn(\"size-10 rounded-full\", className)}\n {...props}\n />\n );\n}\n\n/** Skeleton sized as a single line of text (`h-4 w-full rounded-full`). */\nfunction SkeletonLine({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-line\"\n className={cn(\"h-4 w-full rounded-full\", className)}\n {...props}\n />\n );\n}\n\n/** Skeleton sized as a larger block, e.g. an image or card body (`h-24 w-full`). */\nfunction SkeletonObject({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-object\"\n className={cn(\"h-24 w-full rounded-md\", className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton, SkeletonAvatar, SkeletonLine, SkeletonObject };\n"],"mappings":";;;;;AAGA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;CACtE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,aAAU;EAAW,WAAWA,WAAAA,GAAG,+BAA+B,SAAS;EAAG,GAAI;CAAQ,CAAA;AAEnG;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,0BAA0B,SAAS;EACjD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { t as cn } from "../../cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/primitives/Skeleton/Skeleton.tsx
|
|
4
|
+
/** Animated shimmer placeholder for content that is still loading. */
|
|
5
|
+
function Skeleton({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
"data-slot": "skeleton",
|
|
8
|
+
className: cn("skeleton-shimmer rounded-md", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
/** Skeleton sized as a circular avatar placeholder (`size-10 rounded-full`). */
|
|
13
|
+
function SkeletonAvatar({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Skeleton, {
|
|
15
|
+
"data-slot": "skeleton-avatar",
|
|
16
|
+
className: cn("size-10 rounded-full", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** Skeleton sized as a single line of text (`h-4 w-full rounded-full`). */
|
|
21
|
+
function SkeletonLine({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Skeleton, {
|
|
23
|
+
"data-slot": "skeleton-line",
|
|
24
|
+
className: cn("h-4 w-full rounded-full", className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** Skeleton sized as a larger block, e.g. an image or card body (`h-24 w-full`). */
|
|
29
|
+
function SkeletonObject({ className, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(Skeleton, {
|
|
31
|
+
"data-slot": "skeleton-object",
|
|
32
|
+
className: cn("h-24 w-full rounded-md", className),
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Skeleton, SkeletonAvatar, SkeletonLine, SkeletonObject };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\n\n/** Animated shimmer placeholder for content that is still loading. */\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"skeleton\" className={cn(\"skeleton-shimmer rounded-md\", className)} {...props} />\n );\n}\n\n/** Skeleton sized as a circular avatar placeholder (`size-10 rounded-full`). */\nfunction SkeletonAvatar({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-avatar\"\n className={cn(\"size-10 rounded-full\", className)}\n {...props}\n />\n );\n}\n\n/** Skeleton sized as a single line of text (`h-4 w-full rounded-full`). */\nfunction SkeletonLine({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-line\"\n className={cn(\"h-4 w-full rounded-full\", className)}\n {...props}\n />\n );\n}\n\n/** Skeleton sized as a larger block, e.g. an image or card body (`h-24 w-full`). */\nfunction SkeletonObject({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-object\"\n className={cn(\"h-24 w-full rounded-md\", className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton, SkeletonAvatar, SkeletonLine, SkeletonObject };\n"],"mappings":";;;;AAGA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;CACtE,OACE,oBAAC,OAAD;EAAK,aAAU;EAAW,WAAW,GAAG,+BAA+B,SAAS;EAAG,GAAI;CAAQ,CAAA;AAEnG;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,oBAAC,UAAD;EACE,aAAU;EACV,WAAW,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,oBAAC,UAAD;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,oBAAC,UAAD;EACE,aAAU;EACV,WAAW,GAAG,0BAA0B,SAAS;EACjD,GAAI;CACL,CAAA;AAEL"}
|