@psnext/design-system 2.3.0 → 2.5.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/DESIGN.md +493 -8
- package/README.md +3 -3
- package/SKILL.md +84 -6
- package/bin/install-agent-skill.mjs +39 -7
- package/dist/Header.cjs +152 -21
- package/dist/Header.cjs.map +1 -1
- package/dist/Header.js +152 -21
- package/dist/Header.js.map +1 -1
- package/dist/Icon.cjs +40 -8
- package/dist/Icon.cjs.map +1 -1
- package/dist/Icon.js +40 -8
- package/dist/Icon.js.map +1 -1
- package/dist/Mosaic.cjs +472 -0
- package/dist/Mosaic.cjs.map +1 -0
- package/dist/Mosaic.js +459 -0
- package/dist/Mosaic.js.map +1 -0
- package/dist/MultiColumn.cjs +354 -0
- package/dist/MultiColumn.cjs.map +1 -0
- package/dist/MultiColumn.js +335 -0
- package/dist/MultiColumn.js.map +1 -0
- package/dist/Sidebar.cjs +4 -3
- package/dist/Sidebar.cjs.map +1 -1
- package/dist/Sidebar.js +4 -3
- package/dist/Sidebar.js.map +1 -1
- package/dist/index.cjs +18 -3
- package/dist/index.d.cts +5 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index10.d.cts +6 -6
- package/dist/index10.d.cts.map +1 -1
- package/dist/index10.d.ts +6 -6
- package/dist/index11.d.cts +3 -3
- package/dist/index11.d.cts.map +1 -1
- package/dist/index11.d.ts +3 -3
- package/dist/index11.d.ts.map +1 -1
- package/dist/index12.d.cts +12 -12
- package/dist/index12.d.ts +12 -12
- package/dist/index13.d.cts +6 -6
- package/dist/index13.d.cts.map +1 -1
- package/dist/index13.d.ts +6 -6
- package/dist/index13.d.ts.map +1 -1
- package/dist/index14.d.cts +5 -5
- package/dist/index14.d.ts +5 -5
- package/dist/index15.d.cts +58 -23
- package/dist/index15.d.cts.map +1 -1
- package/dist/index15.d.ts +58 -23
- package/dist/index15.d.ts.map +1 -1
- package/dist/index16.d.cts +23 -32
- package/dist/index16.d.cts.map +1 -1
- package/dist/index16.d.ts +23 -32
- package/dist/index16.d.ts.map +1 -1
- package/dist/index17.d.cts +34 -15
- package/dist/index17.d.cts.map +1 -1
- package/dist/index17.d.ts +34 -15
- package/dist/index17.d.ts.map +1 -1
- package/dist/index18.d.cts +13 -67
- package/dist/index18.d.cts.map +1 -1
- package/dist/index18.d.ts +13 -67
- package/dist/index18.d.ts.map +1 -1
- package/dist/index19.d.cts +55 -48
- package/dist/index19.d.cts.map +1 -1
- package/dist/index19.d.ts +55 -48
- package/dist/index19.d.ts.map +1 -1
- package/dist/index2.d.cts +8 -8
- package/dist/index2.d.ts +9 -9
- package/dist/index20.d.cts +45 -75
- package/dist/index20.d.cts.map +1 -1
- package/dist/index20.d.ts +45 -75
- package/dist/index20.d.ts.map +1 -1
- package/dist/index21.d.cts +90 -28
- package/dist/index21.d.cts.map +1 -1
- package/dist/index21.d.ts +90 -28
- package/dist/index21.d.ts.map +1 -1
- package/dist/index22.d.cts +28 -56
- package/dist/index22.d.cts.map +1 -1
- package/dist/index22.d.ts +28 -56
- package/dist/index22.d.ts.map +1 -1
- package/dist/index23.d.cts +53 -78
- package/dist/index23.d.cts.map +1 -1
- package/dist/index23.d.ts +53 -78
- package/dist/index23.d.ts.map +1 -1
- package/dist/index24.d.cts +83 -33
- package/dist/index24.d.cts.map +1 -1
- package/dist/index24.d.ts +83 -33
- package/dist/index24.d.ts.map +1 -1
- package/dist/index25.d.cts +43 -11
- package/dist/index25.d.cts.map +1 -1
- package/dist/index25.d.ts +43 -11
- package/dist/index25.d.ts.map +1 -1
- package/dist/index26.d.cts +11 -74
- package/dist/index26.d.cts.map +1 -1
- package/dist/index26.d.ts +11 -74
- package/dist/index26.d.ts.map +1 -1
- package/dist/index27.d.cts +68 -59
- package/dist/index27.d.cts.map +1 -1
- package/dist/index27.d.ts +68 -59
- package/dist/index27.d.ts.map +1 -1
- package/dist/index28.d.cts +47 -30
- package/dist/index28.d.cts.map +1 -1
- package/dist/index28.d.ts +47 -30
- package/dist/index28.d.ts.map +1 -1
- package/dist/index29.d.cts +63 -17
- package/dist/index29.d.cts.map +1 -1
- package/dist/index29.d.ts +63 -17
- package/dist/index29.d.ts.map +1 -1
- package/dist/index3.d.cts +13 -13
- package/dist/index3.d.ts +13 -13
- package/dist/index30.d.cts +29 -51
- package/dist/index30.d.cts.map +1 -1
- package/dist/index30.d.ts +30 -52
- package/dist/index30.d.ts.map +1 -1
- package/dist/index31.d.cts +19 -34
- package/dist/index31.d.cts.map +1 -1
- package/dist/index31.d.ts +19 -34
- package/dist/index31.d.ts.map +1 -1
- package/dist/index32.d.cts +80 -18
- package/dist/index32.d.cts.map +1 -1
- package/dist/index32.d.ts +79 -17
- package/dist/index32.d.ts.map +1 -1
- package/dist/index33.d.cts +32 -51
- package/dist/index33.d.cts.map +1 -1
- package/dist/index33.d.ts +33 -52
- package/dist/index33.d.ts.map +1 -1
- package/dist/index34.d.cts +19 -36
- package/dist/index34.d.cts.map +1 -1
- package/dist/index34.d.ts +19 -36
- package/dist/index34.d.ts.map +1 -1
- package/dist/index35.d.cts +43 -61
- package/dist/index35.d.cts.map +1 -1
- package/dist/index35.d.ts +44 -62
- package/dist/index35.d.ts.map +1 -1
- package/dist/index36.d.cts +35 -11
- package/dist/index36.d.cts.map +1 -1
- package/dist/index36.d.ts +35 -11
- package/dist/index36.d.ts.map +1 -1
- package/dist/index37.d.cts +68 -20
- package/dist/index37.d.cts.map +1 -1
- package/dist/index37.d.ts +69 -21
- package/dist/index37.d.ts.map +1 -1
- package/dist/index38.d.cts +14 -15
- package/dist/index38.d.cts.map +1 -1
- package/dist/index38.d.ts +14 -15
- package/dist/index38.d.ts.map +1 -1
- package/dist/index39.d.cts +22 -98
- package/dist/index39.d.cts.map +1 -1
- package/dist/index39.d.ts +22 -98
- package/dist/index39.d.ts.map +1 -1
- package/dist/index4.d.cts +2 -2
- package/dist/index4.d.cts.map +1 -1
- package/dist/index4.d.ts +2 -2
- package/dist/index40.d.cts +15 -17
- package/dist/index40.d.cts.map +1 -1
- package/dist/index40.d.ts +15 -17
- package/dist/index40.d.ts.map +1 -1
- package/dist/index41.d.cts +84 -35
- package/dist/index41.d.cts.map +1 -1
- package/dist/index41.d.ts +84 -35
- package/dist/index41.d.ts.map +1 -1
- package/dist/index42.d.cts +118 -38
- package/dist/index42.d.cts.map +1 -1
- package/dist/index42.d.ts +118 -38
- package/dist/index42.d.ts.map +1 -1
- package/dist/index43.d.cts +15 -89
- package/dist/index43.d.cts.map +1 -1
- package/dist/index43.d.ts +15 -89
- package/dist/index43.d.ts.map +1 -1
- package/dist/index44.d.cts +56 -1
- package/dist/index44.d.cts.map +1 -0
- package/dist/index44.d.ts +56 -1
- package/dist/index44.d.ts.map +1 -0
- package/dist/index45.d.cts +31 -34
- package/dist/index45.d.cts.map +1 -1
- package/dist/index45.d.ts +31 -34
- package/dist/index45.d.ts.map +1 -1
- package/dist/index46.d.cts +89 -21
- package/dist/index46.d.cts.map +1 -1
- package/dist/index46.d.ts +89 -21
- package/dist/index46.d.ts.map +1 -1
- package/dist/index47.d.cts +1 -41
- package/dist/index47.d.ts +1 -41
- package/dist/index48.d.cts +122 -20
- package/dist/index48.d.cts.map +1 -1
- package/dist/index48.d.ts +122 -20
- package/dist/index48.d.ts.map +1 -1
- package/dist/index49.d.cts +40 -13
- package/dist/index49.d.cts.map +1 -1
- package/dist/index49.d.ts +40 -13
- package/dist/index49.d.ts.map +1 -1
- package/dist/index5.d.cts +7 -7
- package/dist/index5.d.cts.map +1 -1
- package/dist/index5.d.ts +7 -7
- package/dist/index50.d.cts +22 -63
- package/dist/index50.d.cts.map +1 -1
- package/dist/index50.d.ts +22 -63
- package/dist/index50.d.ts.map +1 -1
- package/dist/index51.d.cts +33 -55
- package/dist/index51.d.cts.map +1 -1
- package/dist/index51.d.ts +33 -55
- package/dist/index51.d.ts.map +1 -1
- package/dist/index52.d.cts +18 -24
- package/dist/index52.d.cts.map +1 -1
- package/dist/index52.d.ts +18 -24
- package/dist/index52.d.ts.map +1 -1
- package/dist/index53.d.cts +12 -200
- package/dist/index53.d.cts.map +1 -1
- package/dist/index53.d.ts +12 -200
- package/dist/index53.d.ts.map +1 -1
- package/dist/index54.d.cts +58 -15
- package/dist/index54.d.cts.map +1 -1
- package/dist/index54.d.ts +58 -15
- package/dist/index54.d.ts.map +1 -1
- package/dist/index55.d.cts +93 -23
- package/dist/index55.d.cts.map +1 -1
- package/dist/index55.d.ts +93 -23
- package/dist/index55.d.ts.map +1 -1
- package/dist/index56.d.cts +27 -21
- package/dist/index56.d.cts.map +1 -1
- package/dist/index56.d.ts +27 -21
- package/dist/index56.d.ts.map +1 -1
- package/dist/index57.d.cts +203 -6
- package/dist/index57.d.cts.map +1 -1
- package/dist/index57.d.ts +203 -6
- package/dist/index57.d.ts.map +1 -1
- package/dist/index58.d.cts +17 -41
- package/dist/index58.d.cts.map +1 -1
- package/dist/index58.d.ts +17 -41
- package/dist/index58.d.ts.map +1 -1
- package/dist/index59.d.cts +24 -47
- package/dist/index59.d.cts.map +1 -1
- package/dist/index59.d.ts +24 -47
- package/dist/index59.d.ts.map +1 -1
- package/dist/index6.d.cts +5 -5
- package/dist/index6.d.cts.map +1 -1
- package/dist/index6.d.ts +6 -6
- package/dist/index60.d.cts +19 -57
- package/dist/index60.d.cts.map +1 -1
- package/dist/index60.d.ts +19 -57
- package/dist/index60.d.ts.map +1 -1
- package/dist/index61.d.cts +6 -39
- package/dist/index61.d.cts.map +1 -1
- package/dist/index61.d.ts +6 -39
- package/dist/index61.d.ts.map +1 -1
- package/dist/index62.d.cts +44 -18
- package/dist/index62.d.cts.map +1 -1
- package/dist/index62.d.ts +44 -18
- package/dist/index62.d.ts.map +1 -1
- package/dist/index63.d.cts +47 -41
- package/dist/index63.d.cts.map +1 -1
- package/dist/index63.d.ts +47 -41
- package/dist/index63.d.ts.map +1 -1
- package/dist/index64.d.cts +55 -15
- package/dist/index64.d.cts.map +1 -1
- package/dist/index64.d.ts +54 -14
- package/dist/index64.d.ts.map +1 -1
- package/dist/index65.d.cts +36 -39
- package/dist/index65.d.cts.map +1 -1
- package/dist/index65.d.ts +37 -40
- package/dist/index65.d.ts.map +1 -1
- package/dist/index66.d.cts +16 -17
- package/dist/index66.d.cts.map +1 -1
- package/dist/index66.d.ts +17 -18
- package/dist/index66.d.ts.map +1 -1
- package/dist/index67.d.cts +40 -14
- package/dist/index67.d.cts.map +1 -1
- package/dist/index67.d.ts +40 -14
- package/dist/index67.d.ts.map +1 -1
- package/dist/index68.d.cts +16 -30
- package/dist/index68.d.cts.map +1 -1
- package/dist/index68.d.ts +17 -31
- package/dist/index68.d.ts.map +1 -1
- package/dist/index69.d.cts +39 -27
- package/dist/index69.d.cts.map +1 -1
- package/dist/index69.d.ts +40 -28
- package/dist/index69.d.ts.map +1 -1
- package/dist/index7.d.cts +8 -8
- package/dist/index7.d.cts.map +1 -1
- package/dist/index7.d.ts +8 -8
- package/dist/index7.d.ts.map +1 -1
- package/dist/index70.d.cts +22 -78
- package/dist/index70.d.cts.map +1 -1
- package/dist/index70.d.ts +22 -78
- package/dist/index70.d.ts.map +1 -1
- package/dist/index71.d.cts +77 -251
- package/dist/index71.d.cts.map +1 -1
- package/dist/index71.d.ts +77 -251
- package/dist/index71.d.ts.map +1 -1
- package/dist/index72.d.cts +19 -0
- package/dist/index72.d.cts.map +1 -0
- package/dist/index72.d.ts +19 -0
- package/dist/index72.d.ts.map +1 -0
- package/dist/index73.d.cts +37 -0
- package/dist/index73.d.cts.map +1 -0
- package/dist/index73.d.ts +37 -0
- package/dist/index73.d.ts.map +1 -0
- package/dist/index74.d.cts +36 -0
- package/dist/index74.d.cts.map +1 -0
- package/dist/index74.d.ts +36 -0
- package/dist/index74.d.ts.map +1 -0
- package/dist/index75.d.cts +86 -0
- package/dist/index75.d.cts.map +1 -0
- package/dist/index75.d.ts +86 -0
- package/dist/index75.d.ts.map +1 -0
- package/dist/index76.d.cts +278 -0
- package/dist/index76.d.cts.map +1 -0
- package/dist/index76.d.ts +278 -0
- package/dist/index76.d.ts.map +1 -0
- package/dist/index8.d.cts +4 -4
- package/dist/index8.d.ts +5 -5
- package/dist/index9.d.cts +2 -2
- package/dist/index9.d.ts +2 -2
- package/dist/index9.d.ts.map +1 -1
- package/dist/layouts/Container/index.cjs +2 -1
- package/dist/layouts/Container/index.cjs.map +1 -1
- package/dist/layouts/Container/index.d.cts +1 -1
- package/dist/layouts/Container/index.d.ts +1 -1
- package/dist/layouts/Container/index.js +1 -1
- package/dist/layouts/MultiColumn/index.cjs +5 -0
- package/dist/layouts/MultiColumn/index.d.cts +2 -0
- package/dist/layouts/MultiColumn/index.d.ts +2 -0
- package/dist/layouts/MultiColumn/index.js +2 -0
- package/dist/layouts/PageBackground/index.d.cts +1 -1
- package/dist/layouts/PageBackground/index.d.ts +1 -1
- package/dist/layouts/Stack/index.cjs +2 -1
- package/dist/layouts/Stack/index.cjs.map +1 -1
- package/dist/layouts/Stack/index.d.cts +1 -1
- package/dist/layouts/Stack/index.d.ts +1 -1
- package/dist/layouts/Stack/index.js +1 -1
- package/dist/layouts/TwoColumn/index.cjs +2 -1
- package/dist/layouts/TwoColumn/index.cjs.map +1 -1
- package/dist/layouts/TwoColumn/index.d.cts +1 -1
- package/dist/layouts/TwoColumn/index.d.ts +1 -1
- package/dist/layouts/TwoColumn/index.js +1 -1
- package/dist/layouts/index.cjs +4 -0
- package/dist/layouts/index.d.cts +6 -5
- package/dist/layouts/index.d.ts +6 -5
- package/dist/layouts/index.js +2 -1
- package/dist/patterns/DataTable/index.cjs +6 -2
- package/dist/patterns/DataTable/index.cjs.map +1 -1
- package/dist/patterns/DataTable/index.d.cts +3 -3
- package/dist/patterns/DataTable/index.d.cts.map +1 -1
- package/dist/patterns/DataTable/index.d.ts +3 -3
- package/dist/patterns/DataTable/index.d.ts.map +1 -1
- package/dist/patterns/DataTable/index.js +6 -2
- package/dist/patterns/DataTable/index.js.map +1 -1
- package/dist/patterns/Footer/index.d.cts +7 -7
- package/dist/patterns/Footer/index.d.cts.map +1 -1
- package/dist/patterns/Footer/index.d.ts +7 -7
- package/dist/patterns/Footer/index.d.ts.map +1 -1
- package/dist/patterns/Header/index.d.cts +1 -1
- package/dist/patterns/Header/index.d.ts +1 -1
- package/dist/patterns/MediaObject/index.cjs +1 -1
- package/dist/patterns/MediaObject/index.d.cts +14 -14
- package/dist/patterns/MediaObject/index.d.cts.map +1 -1
- package/dist/patterns/MediaObject/index.d.ts +12 -12
- package/dist/patterns/MediaObject/index.js +1 -1
- package/dist/patterns/NavRail/index.cjs +4 -2
- package/dist/patterns/NavRail/index.cjs.map +1 -1
- package/dist/patterns/NavRail/index.d.cts +1 -1
- package/dist/patterns/NavRail/index.d.ts +1 -1
- package/dist/patterns/NavRail/index.js +4 -2
- package/dist/patterns/NavRail/index.js.map +1 -1
- package/dist/patterns/SectionCard/index.d.cts +2 -2
- package/dist/patterns/SectionCard/index.d.cts.map +1 -1
- package/dist/patterns/SectionCard/index.d.ts +2 -2
- package/dist/patterns/SectionCard/index.d.ts.map +1 -1
- package/dist/patterns/SectionHeading/index.d.cts +3 -3
- package/dist/patterns/SectionHeading/index.d.cts.map +1 -1
- package/dist/patterns/SectionHeading/index.d.ts +3 -3
- package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
- package/dist/patterns/index.d.cts +2 -2
- package/dist/patterns/index.d.ts +2 -2
- package/dist/primitives/Accordion/index.cjs +6 -2
- package/dist/primitives/Accordion/index.cjs.map +1 -1
- package/dist/primitives/Accordion/index.js +6 -2
- package/dist/primitives/Accordion/index.js.map +1 -1
- package/dist/primitives/Alert/index.cjs +2 -1
- package/dist/primitives/Alert/index.cjs.map +1 -1
- package/dist/primitives/Alert/index.js +1 -1
- package/dist/primitives/AlertDialog/index.cjs +1 -1
- package/dist/primitives/AlertDialog/index.js +1 -1
- package/dist/primitives/AspectRatio/index.cjs +1 -1
- package/dist/primitives/AspectRatio/index.js +1 -1
- package/dist/primitives/Avatar/index.cjs +1 -1
- package/dist/primitives/Avatar/index.js +1 -1
- package/dist/primitives/Badge/index.cjs +3 -2
- package/dist/primitives/Badge/index.cjs.map +1 -1
- package/dist/primitives/Badge/index.js +2 -2
- package/dist/primitives/Breadcrumb/index.cjs +7 -3
- package/dist/primitives/Breadcrumb/index.cjs.map +1 -1
- package/dist/primitives/Breadcrumb/index.js +7 -3
- package/dist/primitives/Breadcrumb/index.js.map +1 -1
- package/dist/primitives/Button/index.cjs +3 -2
- package/dist/primitives/Button/index.cjs.map +1 -1
- package/dist/primitives/Button/index.js +2 -2
- package/dist/primitives/ButtonGroup/index.cjs +3 -2
- package/dist/primitives/ButtonGroup/index.cjs.map +1 -1
- package/dist/primitives/ButtonGroup/index.js +2 -2
- package/dist/primitives/Calendar/index.cjs +12 -11
- package/dist/primitives/Calendar/index.cjs.map +1 -1
- package/dist/primitives/Calendar/index.js +12 -11
- package/dist/primitives/Calendar/index.js.map +1 -1
- package/dist/primitives/Card/index.cjs +2 -1
- package/dist/primitives/Card/index.cjs.map +1 -1
- package/dist/primitives/Card/index.js +1 -1
- package/dist/primitives/Carousel/index.cjs +4 -3
- package/dist/primitives/Carousel/index.cjs.map +1 -1
- package/dist/primitives/Carousel/index.js +4 -3
- package/dist/primitives/Carousel/index.js.map +1 -1
- package/dist/primitives/Checkbox/index.cjs +10 -3
- package/dist/primitives/Checkbox/index.cjs.map +1 -1
- package/dist/primitives/Checkbox/index.d.cts +1 -1
- package/dist/primitives/Checkbox/index.d.ts +1 -1
- package/dist/primitives/Checkbox/index.js +10 -3
- package/dist/primitives/Checkbox/index.js.map +1 -1
- package/dist/primitives/CheckboxTree/index.cjs +6 -2
- package/dist/primitives/CheckboxTree/index.cjs.map +1 -1
- package/dist/primitives/CheckboxTree/index.d.cts +1 -1
- package/dist/primitives/CheckboxTree/index.d.ts +1 -1
- package/dist/primitives/CheckboxTree/index.js +6 -2
- package/dist/primitives/CheckboxTree/index.js.map +1 -1
- package/dist/primitives/CircularProgress/index.cjs +106 -0
- package/dist/primitives/CircularProgress/index.cjs.map +1 -0
- package/dist/primitives/CircularProgress/index.d.cts +2 -0
- package/dist/primitives/CircularProgress/index.d.ts +2 -0
- package/dist/primitives/CircularProgress/index.js +105 -0
- package/dist/primitives/CircularProgress/index.js.map +1 -0
- package/dist/primitives/Collapsible/index.cjs +1 -1
- package/dist/primitives/Collapsible/index.d.cts +1 -1
- package/dist/primitives/Collapsible/index.d.ts +1 -1
- package/dist/primitives/Collapsible/index.js +1 -1
- package/dist/primitives/Command/index.cjs +6 -2
- package/dist/primitives/Command/index.cjs.map +1 -1
- package/dist/primitives/Command/index.d.cts +1 -1
- package/dist/primitives/Command/index.d.ts +1 -1
- package/dist/primitives/Command/index.js +6 -2
- package/dist/primitives/Command/index.js.map +1 -1
- package/dist/primitives/ContextMenu/index.cjs +14 -4
- package/dist/primitives/ContextMenu/index.cjs.map +1 -1
- package/dist/primitives/ContextMenu/index.d.cts +1 -1
- package/dist/primitives/ContextMenu/index.d.ts +1 -1
- package/dist/primitives/ContextMenu/index.js +14 -4
- package/dist/primitives/ContextMenu/index.js.map +1 -1
- package/dist/primitives/Credits/index.cjs +8 -3
- package/dist/primitives/Credits/index.cjs.map +1 -1
- package/dist/primitives/Credits/index.d.cts +1 -1
- package/dist/primitives/Credits/index.d.ts +1 -1
- package/dist/primitives/Credits/index.js +7 -3
- package/dist/primitives/Credits/index.js.map +1 -1
- package/dist/primitives/Dialog/index.cjs +3 -2
- package/dist/primitives/Dialog/index.cjs.map +1 -1
- package/dist/primitives/Dialog/index.d.cts +1 -1
- package/dist/primitives/Dialog/index.d.ts +1 -1
- package/dist/primitives/Dialog/index.js +3 -2
- package/dist/primitives/Dialog/index.js.map +1 -1
- package/dist/primitives/Drawer/index.cjs +34 -2
- package/dist/primitives/Drawer/index.cjs.map +1 -1
- package/dist/primitives/Drawer/index.d.cts +1 -1
- package/dist/primitives/Drawer/index.d.ts +1 -1
- package/dist/primitives/Drawer/index.js +34 -2
- package/dist/primitives/Drawer/index.js.map +1 -1
- package/dist/primitives/DropdownMenu/index.cjs +14 -4
- package/dist/primitives/DropdownMenu/index.cjs.map +1 -1
- package/dist/primitives/DropdownMenu/index.d.cts +1 -1
- package/dist/primitives/DropdownMenu/index.d.ts +1 -1
- package/dist/primitives/DropdownMenu/index.js +14 -4
- package/dist/primitives/DropdownMenu/index.js.map +1 -1
- package/dist/primitives/Empty/index.cjs +1 -1
- package/dist/primitives/Empty/index.d.cts +1 -1
- package/dist/primitives/Empty/index.d.ts +1 -1
- package/dist/primitives/Empty/index.js +1 -1
- package/dist/primitives/Field/index.cjs +1 -1
- package/dist/primitives/Field/index.d.cts +1 -1
- package/dist/primitives/Field/index.d.ts +1 -1
- package/dist/primitives/Field/index.js +1 -1
- package/dist/primitives/FileUpload/index.cjs +354 -0
- package/dist/primitives/FileUpload/index.cjs.map +1 -0
- package/dist/primitives/FileUpload/index.d.cts +2 -0
- package/dist/primitives/FileUpload/index.d.ts +2 -0
- package/dist/primitives/FileUpload/index.js +351 -0
- package/dist/primitives/FileUpload/index.js.map +1 -0
- package/dist/primitives/Form/index.cjs +1 -1
- package/dist/primitives/Form/index.d.cts +1 -1
- package/dist/primitives/Form/index.d.ts +1 -1
- package/dist/primitives/Form/index.js +1 -1
- package/dist/primitives/Heading/index.cjs +2 -1
- package/dist/primitives/Heading/index.cjs.map +1 -1
- package/dist/primitives/Heading/index.d.cts +1 -1
- package/dist/primitives/Heading/index.d.ts +1 -1
- package/dist/primitives/Heading/index.js +1 -1
- package/dist/primitives/HoverCard/index.cjs +1 -1
- package/dist/primitives/HoverCard/index.d.cts +1 -1
- package/dist/primitives/HoverCard/index.d.ts +1 -1
- package/dist/primitives/HoverCard/index.js +1 -1
- package/dist/primitives/Icon/index.d.cts +1 -1
- package/dist/primitives/Icon/index.d.ts +1 -1
- package/dist/primitives/InfoBanner/index.cjs +6 -3
- package/dist/primitives/InfoBanner/index.cjs.map +1 -1
- package/dist/primitives/InfoBanner/index.d.cts +1 -1
- package/dist/primitives/InfoBanner/index.d.ts +1 -1
- package/dist/primitives/InfoBanner/index.js +5 -3
- package/dist/primitives/InfoBanner/index.js.map +1 -1
- package/dist/primitives/Input/index.cjs +2 -1
- package/dist/primitives/Input/index.cjs.map +1 -1
- package/dist/primitives/Input/index.d.cts +1 -1
- package/dist/primitives/Input/index.d.ts +1 -1
- package/dist/primitives/Input/index.js +1 -1
- package/dist/primitives/InputGroup/index.cjs +1 -1
- package/dist/primitives/InputGroup/index.d.cts +1 -1
- package/dist/primitives/InputGroup/index.d.ts +1 -1
- package/dist/primitives/InputGroup/index.js +1 -1
- package/dist/primitives/InputOtp/index.cjs +3 -2
- package/dist/primitives/InputOtp/index.cjs.map +1 -1
- package/dist/primitives/InputOtp/index.d.cts +1 -1
- package/dist/primitives/InputOtp/index.d.ts +1 -1
- package/dist/primitives/InputOtp/index.js +3 -2
- package/dist/primitives/InputOtp/index.js.map +1 -1
- package/dist/primitives/Item/index.cjs +2 -2
- package/dist/primitives/Item/index.d.cts +1 -1
- package/dist/primitives/Item/index.d.ts +1 -1
- package/dist/primitives/Item/index.js +2 -2
- package/dist/primitives/Kbd/index.d.cts +1 -1
- package/dist/primitives/Kbd/index.d.ts +1 -1
- package/dist/primitives/Label/index.cjs +1 -1
- package/dist/primitives/Label/index.d.cts +1 -1
- package/dist/primitives/Label/index.d.ts +1 -1
- package/dist/primitives/Label/index.js +1 -1
- package/dist/primitives/Link/index.cjs +3 -2
- package/dist/primitives/Link/index.cjs.map +1 -1
- package/dist/primitives/Link/index.d.cts +1 -1
- package/dist/primitives/Link/index.d.ts +1 -1
- package/dist/primitives/Link/index.js +2 -2
- package/dist/primitives/Logo/index.d.cts +1 -1
- package/dist/primitives/Logo/index.d.ts +1 -1
- package/dist/primitives/Menubar/index.cjs +14 -4
- package/dist/primitives/Menubar/index.cjs.map +1 -1
- package/dist/primitives/Menubar/index.d.cts +1 -1
- package/dist/primitives/Menubar/index.d.ts +1 -1
- package/dist/primitives/Menubar/index.js +14 -4
- package/dist/primitives/Menubar/index.js.map +1 -1
- package/dist/primitives/Mosaic/index.cjs +4 -0
- package/dist/primitives/Mosaic/index.d.cts +2 -0
- package/dist/primitives/Mosaic/index.d.ts +2 -0
- package/dist/primitives/Mosaic/index.js +2 -0
- package/dist/primitives/NativeSelect/index.cjs +6 -3
- package/dist/primitives/NativeSelect/index.cjs.map +1 -1
- package/dist/primitives/NativeSelect/index.d.cts +1 -1
- package/dist/primitives/NativeSelect/index.d.ts +1 -1
- package/dist/primitives/NativeSelect/index.js +5 -3
- package/dist/primitives/NativeSelect/index.js.map +1 -1
- package/dist/primitives/NavRail/index.d.cts +2 -2
- package/dist/primitives/NavRail/index.d.ts +2 -2
- package/dist/primitives/NavigationMenu/index.cjs +5 -3
- package/dist/primitives/NavigationMenu/index.cjs.map +1 -1
- package/dist/primitives/NavigationMenu/index.d.cts +1 -1
- package/dist/primitives/NavigationMenu/index.d.ts +1 -1
- package/dist/primitives/NavigationMenu/index.js +5 -3
- package/dist/primitives/NavigationMenu/index.js.map +1 -1
- package/dist/primitives/NotchedCard/index.cjs +390 -0
- package/dist/primitives/NotchedCard/index.cjs.map +1 -0
- package/dist/primitives/NotchedCard/index.d.cts +2 -0
- package/dist/primitives/NotchedCard/index.d.ts +2 -0
- package/dist/primitives/NotchedCard/index.js +385 -0
- package/dist/primitives/NotchedCard/index.js.map +1 -0
- package/dist/primitives/Pagination/index.cjs +6 -2
- package/dist/primitives/Pagination/index.cjs.map +1 -1
- package/dist/primitives/Pagination/index.d.cts +1 -1
- package/dist/primitives/Pagination/index.d.ts +1 -1
- package/dist/primitives/Pagination/index.js +6 -2
- package/dist/primitives/Pagination/index.js.map +1 -1
- package/dist/primitives/Popover/index.cjs +1 -1
- package/dist/primitives/Popover/index.d.cts +1 -1
- package/dist/primitives/Popover/index.d.ts +1 -1
- package/dist/primitives/Popover/index.js +1 -1
- package/dist/primitives/Progress/index.cjs +1 -1
- package/dist/primitives/Progress/index.d.cts +1 -1
- package/dist/primitives/Progress/index.d.ts +1 -1
- package/dist/primitives/Progress/index.js +1 -1
- package/dist/primitives/RadioGroup/index.cjs +7 -3
- package/dist/primitives/RadioGroup/index.cjs.map +1 -1
- package/dist/primitives/RadioGroup/index.d.cts +1 -1
- package/dist/primitives/RadioGroup/index.d.ts +1 -1
- package/dist/primitives/RadioGroup/index.js +7 -3
- package/dist/primitives/RadioGroup/index.js.map +1 -1
- package/dist/primitives/Resizable/index.cjs +6 -2
- package/dist/primitives/Resizable/index.cjs.map +1 -1
- package/dist/primitives/Resizable/index.d.cts +1 -1
- package/dist/primitives/Resizable/index.d.ts +1 -1
- package/dist/primitives/Resizable/index.js +6 -2
- package/dist/primitives/Resizable/index.js.map +1 -1
- package/dist/primitives/ScrollArea/index.cjs +1 -1
- package/dist/primitives/ScrollArea/index.d.cts +1 -1
- package/dist/primitives/ScrollArea/index.d.ts +1 -1
- package/dist/primitives/ScrollArea/index.js +1 -1
- package/dist/primitives/Select/index.cjs +18 -5
- package/dist/primitives/Select/index.cjs.map +1 -1
- package/dist/primitives/Select/index.d.cts +1 -1
- package/dist/primitives/Select/index.d.ts +1 -1
- package/dist/primitives/Select/index.js +18 -5
- package/dist/primitives/Select/index.js.map +1 -1
- package/dist/primitives/Separator/index.cjs +1 -1
- package/dist/primitives/Separator/index.js +1 -1
- package/dist/primitives/Sheet/index.cjs +40 -4
- package/dist/primitives/Sheet/index.cjs.map +1 -1
- package/dist/primitives/Sheet/index.d.cts +1 -1
- package/dist/primitives/Sheet/index.d.ts +1 -1
- package/dist/primitives/Sheet/index.js +40 -4
- package/dist/primitives/Sheet/index.js.map +1 -1
- package/dist/primitives/Sidebar/index.d.cts +1 -1
- package/dist/primitives/Sidebar/index.d.ts +1 -1
- package/dist/primitives/Skeleton/index.d.cts +1 -1
- package/dist/primitives/Skeleton/index.d.ts +1 -1
- package/dist/primitives/Slider/index.cjs +1 -1
- package/dist/primitives/Slider/index.d.cts +1 -1
- package/dist/primitives/Slider/index.d.ts +1 -1
- package/dist/primitives/Slider/index.js +1 -1
- package/dist/primitives/Sonner/index.cjs +22 -6
- package/dist/primitives/Sonner/index.cjs.map +1 -1
- package/dist/primitives/Sonner/index.d.cts +1 -1
- package/dist/primitives/Sonner/index.d.ts +1 -1
- package/dist/primitives/Sonner/index.js +22 -6
- package/dist/primitives/Sonner/index.js.map +1 -1
- package/dist/primitives/Spinner/index.cjs +4 -2
- package/dist/primitives/Spinner/index.cjs.map +1 -1
- package/dist/primitives/Spinner/index.d.cts +1 -1
- package/dist/primitives/Spinner/index.d.ts +1 -1
- package/dist/primitives/Spinner/index.js +4 -2
- package/dist/primitives/Spinner/index.js.map +1 -1
- package/dist/primitives/Switch/index.cjs +1 -1
- package/dist/primitives/Switch/index.d.cts +1 -1
- package/dist/primitives/Switch/index.d.ts +1 -1
- package/dist/primitives/Switch/index.js +1 -1
- package/dist/primitives/Table/index.d.cts +1 -1
- package/dist/primitives/Table/index.d.ts +1 -1
- package/dist/primitives/Tabs/index.cjs +2 -2
- package/dist/primitives/Tabs/index.d.cts +1 -1
- package/dist/primitives/Tabs/index.d.ts +1 -1
- package/dist/primitives/Tabs/index.js +2 -2
- package/dist/primitives/Text/index.cjs +2 -1
- package/dist/primitives/Text/index.cjs.map +1 -1
- package/dist/primitives/Text/index.d.cts +1 -1
- package/dist/primitives/Text/index.d.ts +1 -1
- package/dist/primitives/Text/index.js +1 -1
- package/dist/primitives/Textarea/index.cjs +2 -1
- package/dist/primitives/Textarea/index.cjs.map +1 -1
- package/dist/primitives/Textarea/index.d.cts +1 -1
- package/dist/primitives/Textarea/index.d.ts +1 -1
- package/dist/primitives/Textarea/index.js +1 -1
- package/dist/primitives/ThemeProvider/index.d.cts +1 -1
- package/dist/primitives/ThemeProvider/index.d.ts +1 -1
- package/dist/primitives/Toggle/index.cjs +3 -2
- package/dist/primitives/Toggle/index.cjs.map +1 -1
- package/dist/primitives/Toggle/index.d.cts +1 -1
- package/dist/primitives/Toggle/index.d.ts +1 -1
- package/dist/primitives/Toggle/index.js +2 -2
- package/dist/primitives/ToggleGroup/index.cjs +1 -1
- package/dist/primitives/ToggleGroup/index.d.cts +1 -1
- package/dist/primitives/ToggleGroup/index.d.ts +1 -1
- package/dist/primitives/ToggleGroup/index.js +1 -1
- package/dist/primitives/Tooltip/index.cjs +1 -1
- package/dist/primitives/Tooltip/index.d.cts +1 -1
- package/dist/primitives/Tooltip/index.d.ts +1 -1
- package/dist/primitives/Tooltip/index.js +1 -1
- package/dist/primitives/index.cjs +14 -3
- package/dist/primitives/index.d.cts +55 -51
- package/dist/primitives/index.d.ts +55 -51
- package/dist/primitives/index.js +8 -4
- package/package.json +2 -1
- package/dist/index47.d.cts.map +0 -1
- package/dist/index47.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["RadioGroupPrimitive","cn","CircleIcon"],"sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { CircleIcon } from \"lucide-react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */\nfunction RadioGroup({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n /** Stack the items in a column (`vertical`) or wrap them in a row (`horizontal`). */\n orientation?: \"vertical\" | \"horizontal\";\n}) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-row flex-wrap gap-4 items-center\" : \"grid gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single selectable radio control; pair it with a label for accessible option text. */\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n // Dot color rides on currentColor: the checked dot is the inverted fill,\n // flipping to the danger color under aria-invalid (Figma radio spec).\n \"aspect-square size-4 shrink-0 rounded-full border border-secondary-border bg-input-bg text-primary-invert-bg transition-[color,box-shadow] outline-none focus-visible:ring-3 focus-visible:ring-focus data-[state=checked]:border-selected-border disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger-border aria-invalid:ring-focus-error aria-invalid:text-danger-txt\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <CircleIcon
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["RadioGroupPrimitive","cn","Icon","CircleIcon"],"sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { CircleIcon } from \"lucide-react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */\nfunction RadioGroup({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n /** Stack the items in a column (`vertical`) or wrap them in a row (`horizontal`). */\n orientation?: \"vertical\" | \"horizontal\";\n}) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-row flex-wrap gap-4 items-center\" : \"grid gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single selectable radio control; pair it with a label for accessible option text. */\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n // Keep the visible control at 16px while expanding the click/tap target to 24px.\n // This follows the repo's hit-area pattern (negative inset pseudo-element)\n // so surrounding layout stays unchanged.\n // Dot color rides on currentColor: the checked dot is the inverted fill,\n // flipping to the danger color under aria-invalid (Figma radio spec).\n \"relative aspect-square size-4 shrink-0 rounded-full border border-secondary-border bg-input-bg text-primary-invert-bg transition-[color,box-shadow] outline-none after:absolute after:-inset-1 after:rounded-full after:content-[''] focus-visible:ring-3 focus-visible:ring-focus data-[state=checked]:border-selected-border disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger-border aria-invalid:ring-focus-error aria-invalid:text-danger-txt\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <Icon\n as={CircleIcon}\n className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current stroke-current\"\n />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\n/** A card-style radio option with a bordered surface, title, and description that highlights when checked. */\nfunction RichRadioItem({\n className,\n value,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: Omit<React.ComponentProps<typeof RadioGroupPrimitive.Item>, \"children\"> & {\n /** Value submitted when this option is selected. */\n value: string;\n /** Bold heading shown at the top of the card. */\n title?: React.ReactNode;\n /** Secondary muted text shown beneath the title. */\n description?: React.ReactNode;\n /** Place the radio control on the trailing edge instead of the leading edge. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const itemId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-radio-item\"\n htmlFor={itemId}\n className={cn(\n \"flex cursor-pointer items-start gap-3 rounded-10 border border-primary-border bg-muted-bg p-3 text-primary-txt transition-colors has-[[data-state=checked]]:border-selected-border has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <RadioGroupItem\n data-slot=\"rich-radio-item-control\"\n id={itemId}\n value={value}\n className=\"mt-0.75\"\n {...props}\n />\n <span data-slot=\"rich-radio-item-content\" className=\"flex flex-col gap-1.5\">\n {title != null && (\n <span data-slot=\"rich-radio-item-title\" className=\"text-sm leading-5\">\n {title}\n </span>\n )}\n {description != null && (\n <span\n data-slot=\"rich-radio-item-description\"\n className=\"text-xs leading-4 text-muted-txt\"\n >\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { RadioGroup, RadioGroupItem, RichRadioItem };\n"],"mappings":";;;;;;;;;AASA,SAAS,WAAW,EAClB,WACA,cAAc,YACd,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,WAAoB,MAArB;EACE,aAAU;EACV,oBAAkB;EACL;EACb,WAAWC,WAAAA,GACT,gBAAgB,eAAe,+CAA+C,cAC9E,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EACtB,WACA,GAAG,SACqD;CACxD,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,WAAoB,MAArB;EACE,aAAU;EACV,WAAWC,WAAAA,GAMT,+cACA,SACF;EACA,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAACD,SAAAA,WAAoB,WAArB;GACE,aAAU;GACV,WAAU;aAEV,iBAAA,GAAA,kBAAA,KAACE,aAAAA,MAAD;IACE,IAAIC,aAAAA;IACJ,WAAU;GACX,CAAA;EAC4B,CAAA;CACP,CAAA;AAE9B;;AAGA,SAAS,cAAc,EACrB,WACA,OACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAUF;CACD,MAAM,eAAA,GAAA,MAAA,OAAoB;CAC1B,MAAM,SAAS,MAAM;CACrB,OACE,iBAAA,GAAA,kBAAA,MAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAWF,WAAAA,GACT,oPACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,iBAAA,GAAA,kBAAA,KAAC,gBAAD;GACE,aAAU;GACV,IAAI;GACG;GACP,WAAU;GACV,GAAI;EACL,CAAA,GACD,iBAAA,GAAA,kBAAA,MAAC,QAAD;GAAM,aAAU;GAA0B,WAAU;aAApD,CACG,SAAS,QACR,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAAwB,WAAU;cAC/C;GACG,CAAA,GAEP,eAAe,QACd,iBAAA,GAAA,kBAAA,KAAC,QAAD;IACE,aAAU;IACV,WAAU;cAET;GACG,CAAA,CAEJ;IACD;;AAEX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as RadioGroupItem, r as RichRadioItem, t as RadioGroup } from "../../
|
|
1
|
+
import { n as RadioGroupItem, r as RichRadioItem, t as RadioGroup } from "../../index51.cjs";
|
|
2
2
|
export { RadioGroup, RadioGroupItem, RichRadioItem };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as RadioGroupItem, r as RichRadioItem, t as RadioGroup } from "../../
|
|
1
|
+
import { n as RadioGroupItem, r as RichRadioItem, t as RadioGroup } from "../../index51.js";
|
|
2
2
|
export { RadioGroup, RadioGroupItem, RichRadioItem };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
+
import { t as Icon } from "../../Icon.js";
|
|
2
3
|
import { useId } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
5
|
import { CircleIcon } from "lucide-react";
|
|
4
6
|
import { RadioGroup as RadioGroup$1 } from "radix-ui";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/primitives/RadioGroup/RadioGroup.tsx
|
|
7
8
|
/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */
|
|
8
9
|
function RadioGroup({ className, orientation = "vertical", ...props }) {
|
|
@@ -18,12 +19,15 @@ function RadioGroup({ className, orientation = "vertical", ...props }) {
|
|
|
18
19
|
function RadioGroupItem({ className, ...props }) {
|
|
19
20
|
return /* @__PURE__ */ jsx(RadioGroup$1.Item, {
|
|
20
21
|
"data-slot": "radio-group-item",
|
|
21
|
-
className: cn("aspect-square size-4 shrink-0 rounded-full border border-secondary-border bg-input-bg text-primary-invert-bg transition-[color,box-shadow] outline-none focus-visible:ring-3 focus-visible:ring-focus data-[state=checked]:border-selected-border disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger-border aria-invalid:ring-focus-error aria-invalid:text-danger-txt", className),
|
|
22
|
+
className: cn("relative aspect-square size-4 shrink-0 rounded-full border border-secondary-border bg-input-bg text-primary-invert-bg transition-[color,box-shadow] outline-none after:absolute after:-inset-1 after:rounded-full after:content-[''] focus-visible:ring-3 focus-visible:ring-focus data-[state=checked]:border-selected-border disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger-border aria-invalid:ring-focus-error aria-invalid:text-danger-txt", className),
|
|
22
23
|
...props,
|
|
23
24
|
children: /* @__PURE__ */ jsx(RadioGroup$1.Indicator, {
|
|
24
25
|
"data-slot": "radio-group-indicator",
|
|
25
26
|
className: "relative flex items-center justify-center",
|
|
26
|
-
children: /* @__PURE__ */ jsx(
|
|
27
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
28
|
+
as: CircleIcon,
|
|
29
|
+
className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current stroke-current"
|
|
30
|
+
})
|
|
27
31
|
})
|
|
28
32
|
});
|
|
29
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["RadioGroupPrimitive"],"sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { CircleIcon } from \"lucide-react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */\nfunction RadioGroup({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n /** Stack the items in a column (`vertical`) or wrap them in a row (`horizontal`). */\n orientation?: \"vertical\" | \"horizontal\";\n}) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-row flex-wrap gap-4 items-center\" : \"grid gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single selectable radio control; pair it with a label for accessible option text. */\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n // Dot color rides on currentColor: the checked dot is the inverted fill,\n // flipping to the danger color under aria-invalid (Figma radio spec).\n \"aspect-square size-4 shrink-0 rounded-full border border-secondary-border bg-input-bg text-primary-invert-bg transition-[color,box-shadow] outline-none focus-visible:ring-3 focus-visible:ring-focus data-[state=checked]:border-selected-border disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger-border aria-invalid:ring-focus-error aria-invalid:text-danger-txt\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <CircleIcon
|
|
1
|
+
{"version":3,"file":"index.js","names":["RadioGroupPrimitive"],"sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { CircleIcon } from \"lucide-react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */\nfunction RadioGroup({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n /** Stack the items in a column (`vertical`) or wrap them in a row (`horizontal`). */\n orientation?: \"vertical\" | \"horizontal\";\n}) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-row flex-wrap gap-4 items-center\" : \"grid gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single selectable radio control; pair it with a label for accessible option text. */\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n // Keep the visible control at 16px while expanding the click/tap target to 24px.\n // This follows the repo's hit-area pattern (negative inset pseudo-element)\n // so surrounding layout stays unchanged.\n // Dot color rides on currentColor: the checked dot is the inverted fill,\n // flipping to the danger color under aria-invalid (Figma radio spec).\n \"relative aspect-square size-4 shrink-0 rounded-full border border-secondary-border bg-input-bg text-primary-invert-bg transition-[color,box-shadow] outline-none after:absolute after:-inset-1 after:rounded-full after:content-[''] focus-visible:ring-3 focus-visible:ring-focus data-[state=checked]:border-selected-border disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger-border aria-invalid:ring-focus-error aria-invalid:text-danger-txt\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <Icon\n as={CircleIcon}\n className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current stroke-current\"\n />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\n/** A card-style radio option with a bordered surface, title, and description that highlights when checked. */\nfunction RichRadioItem({\n className,\n value,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: Omit<React.ComponentProps<typeof RadioGroupPrimitive.Item>, \"children\"> & {\n /** Value submitted when this option is selected. */\n value: string;\n /** Bold heading shown at the top of the card. */\n title?: React.ReactNode;\n /** Secondary muted text shown beneath the title. */\n description?: React.ReactNode;\n /** Place the radio control on the trailing edge instead of the leading edge. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const itemId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-radio-item\"\n htmlFor={itemId}\n className={cn(\n \"flex cursor-pointer items-start gap-3 rounded-10 border border-primary-border bg-muted-bg p-3 text-primary-txt transition-colors has-[[data-state=checked]]:border-selected-border has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <RadioGroupItem\n data-slot=\"rich-radio-item-control\"\n id={itemId}\n value={value}\n className=\"mt-0.75\"\n {...props}\n />\n <span data-slot=\"rich-radio-item-content\" className=\"flex flex-col gap-1.5\">\n {title != null && (\n <span data-slot=\"rich-radio-item-title\" className=\"text-sm leading-5\">\n {title}\n </span>\n )}\n {description != null && (\n <span\n data-slot=\"rich-radio-item-description\"\n className=\"text-xs leading-4 text-muted-txt\"\n >\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { RadioGroup, RadioGroupItem, RichRadioItem };\n"],"mappings":";;;;;;;;AASA,SAAS,WAAW,EAClB,WACA,cAAc,YACd,GAAG,SAIF;CACD,OACE,oBAACA,aAAoB,MAArB;EACE,aAAU;EACV,oBAAkB;EACL;EACb,WAAW,GACT,gBAAgB,eAAe,+CAA+C,cAC9E,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EACtB,WACA,GAAG,SACqD;CACxD,OACE,oBAACA,aAAoB,MAArB;EACE,aAAU;EACV,WAAW,GAMT,+cACA,SACF;EACA,GAAI;YAEJ,oBAACA,aAAoB,WAArB;GACE,aAAU;GACV,WAAU;aAEV,oBAAC,MAAD;IACE,IAAI;IACJ,WAAU;GACX,CAAA;EAC4B,CAAA;CACP,CAAA;AAE9B;;AAGA,SAAS,cAAc,EACrB,WACA,OACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAUF;CACD,MAAM,cAAc,MAAM;CAC1B,MAAM,SAAS,MAAM;CACrB,OACE,qBAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAW,GACT,oPACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,oBAAC,gBAAD;GACE,aAAU;GACV,IAAI;GACG;GACP,WAAU;GACV,GAAI;EACL,CAAA,GACD,qBAAC,QAAD;GAAM,aAAU;GAA0B,WAAU;aAApD,CACG,SAAS,QACR,oBAAC,QAAD;IAAM,aAAU;IAAwB,WAAU;cAC/C;GACG,CAAA,GAEP,eAAe,QACd,oBAAC,QAAD;IACE,aAAU;IACV,WAAU;cAET;GACG,CAAA,CAEJ;IACD;;AAEX"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk.cjs");
|
|
3
3
|
const require_cn = require("../../cn.cjs");
|
|
4
|
-
|
|
4
|
+
const require_Icon = require("../../Icon.cjs");
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let lucide_react = require("lucide-react");
|
|
6
7
|
let react_resizable_panels = require("react-resizable-panels");
|
|
7
8
|
react_resizable_panels = require_chunk.__toESM(react_resizable_panels);
|
|
8
9
|
//#region src/primitives/Resizable/Resizable.tsx
|
|
@@ -29,7 +30,10 @@ function ResizableHandle({ withHandle, className, ...props }) {
|
|
|
29
30
|
...props,
|
|
30
31
|
children: withHandle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
31
32
|
className: "z-10 flex h-4 w-3 items-center justify-center rounded-2 border bg-primary-border",
|
|
32
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
33
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
34
|
+
as: lucide_react.GripVerticalIcon,
|
|
35
|
+
className: "size-2.5"
|
|
36
|
+
})
|
|
33
37
|
})
|
|
34
38
|
});
|
|
35
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["ResizablePrimitive","cn","GripVerticalIcon"],"sources":["../../../src/primitives/Resizable/Resizable.tsx"],"sourcesContent":["import { GripVerticalIcon } from \"lucide-react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\n\nimport { cn } from \"@/utils\";\n\n/** Root container that lays out `ResizablePanel`s and `ResizableHandle`s and drives resize behaviour (set `orientation` to switch axis). */\nfunction ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn(\"flex h-full w-full aria-[orientation=vertical]:flex-col\", className)}\n {...props}\n />\n );\n}\n\n/** A single resizable region within a `ResizablePanelGroup`; size it with `defaultSize`/`minSize`/`maxSize`. */\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\n/** Draggable divider between two panels; pass `withHandle` to render a visible grip affordance. */\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n /** Renders a visible grip icon centred on the divider. */\n withHandle?: boolean;\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n \"relative flex w-px items-center justify-center bg-primary-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-2 border bg-primary-border\">\n <GripVerticalIcon className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.Separator>\n );\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["ResizablePrimitive","cn","Icon","GripVerticalIcon"],"sources":["../../../src/primitives/Resizable/Resizable.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { GripVerticalIcon } from \"lucide-react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\n\nimport { cn } from \"@/utils\";\n\n/** Root container that lays out `ResizablePanel`s and `ResizableHandle`s and drives resize behaviour (set `orientation` to switch axis). */\nfunction ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn(\"flex h-full w-full aria-[orientation=vertical]:flex-col\", className)}\n {...props}\n />\n );\n}\n\n/** A single resizable region within a `ResizablePanelGroup`; size it with `defaultSize`/`minSize`/`maxSize`. */\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\n/** Draggable divider between two panels; pass `withHandle` to render a visible grip affordance. */\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n /** Renders a visible grip icon centred on the divider. */\n withHandle?: boolean;\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n \"relative flex w-px items-center justify-center bg-primary-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-2 border bg-primary-border\">\n <Icon as={GripVerticalIcon} className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.Separator>\n );\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"],"mappings":";;;;;;;;;;AAOA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAwC;CACnF,OACE,iBAAA,GAAA,kBAAA,KAACA,uBAAmB,OAApB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,2DAA2D,SAAS;EAClF,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EAAE,GAAG,SAAwC;CACnE,OAAO,iBAAA,GAAA,kBAAA,KAACD,uBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;;AAGA,SAAS,gBAAgB,EACvB,YACA,WACA,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAACA,uBAAmB,WAApB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,slBACA,SACF;EACA,GAAI;YAEH,cACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;GAAK,WAAU;aACb,iBAAA,GAAA,kBAAA,KAACC,aAAAA,MAAD;IAAM,IAAIC,aAAAA;IAAkB,WAAU;GAAY,CAAA;EAC/C,CAAA;CAEqB,CAAA;AAElC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ResizablePanel, r as ResizablePanelGroup, t as ResizableHandle } from "../../
|
|
1
|
+
import { n as ResizablePanel, r as ResizablePanelGroup, t as ResizableHandle } from "../../index52.cjs";
|
|
2
2
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ResizablePanel, r as ResizablePanelGroup, t as ResizableHandle } from "../../
|
|
1
|
+
import { n as ResizablePanel, r as ResizablePanelGroup, t as ResizableHandle } from "../../index52.js";
|
|
2
2
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as Icon } from "../../Icon.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { GripVerticalIcon } from "lucide-react";
|
|
4
5
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
5
6
|
//#region src/primitives/Resizable/Resizable.tsx
|
|
6
7
|
/** Root container that lays out `ResizablePanel`s and `ResizableHandle`s and drives resize behaviour (set `orientation` to switch axis). */
|
|
@@ -26,7 +27,10 @@ function ResizableHandle({ withHandle, className, ...props }) {
|
|
|
26
27
|
...props,
|
|
27
28
|
children: withHandle && /* @__PURE__ */ jsx("div", {
|
|
28
29
|
className: "z-10 flex h-4 w-3 items-center justify-center rounded-2 border bg-primary-border",
|
|
29
|
-
children: /* @__PURE__ */ jsx(
|
|
30
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
31
|
+
as: GripVerticalIcon,
|
|
32
|
+
className: "size-2.5"
|
|
33
|
+
})
|
|
30
34
|
})
|
|
31
35
|
});
|
|
32
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Resizable/Resizable.tsx"],"sourcesContent":["import { GripVerticalIcon } from \"lucide-react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\n\nimport { cn } from \"@/utils\";\n\n/** Root container that lays out `ResizablePanel`s and `ResizableHandle`s and drives resize behaviour (set `orientation` to switch axis). */\nfunction ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn(\"flex h-full w-full aria-[orientation=vertical]:flex-col\", className)}\n {...props}\n />\n );\n}\n\n/** A single resizable region within a `ResizablePanelGroup`; size it with `defaultSize`/`minSize`/`maxSize`. */\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\n/** Draggable divider between two panels; pass `withHandle` to render a visible grip affordance. */\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n /** Renders a visible grip icon centred on the divider. */\n withHandle?: boolean;\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n \"relative flex w-px items-center justify-center bg-primary-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-2 border bg-primary-border\">\n <GripVerticalIcon className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.Separator>\n );\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Resizable/Resizable.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { GripVerticalIcon } from \"lucide-react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\n\nimport { cn } from \"@/utils\";\n\n/** Root container that lays out `ResizablePanel`s and `ResizableHandle`s and drives resize behaviour (set `orientation` to switch axis). */\nfunction ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn(\"flex h-full w-full aria-[orientation=vertical]:flex-col\", className)}\n {...props}\n />\n );\n}\n\n/** A single resizable region within a `ResizablePanelGroup`; size it with `defaultSize`/`minSize`/`maxSize`. */\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />;\n}\n\n/** Draggable divider between two panels; pass `withHandle` to render a visible grip affordance. */\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n /** Renders a visible grip icon centred on the divider. */\n withHandle?: boolean;\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n \"relative flex w-px items-center justify-center bg-primary-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-2 border bg-primary-border\">\n <Icon as={GripVerticalIcon} className=\"size-2.5\" />\n </div>\n )}\n </ResizablePrimitive.Separator>\n );\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"],"mappings":";;;;;;;AAOA,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAwC;CACnF,OACE,oBAAC,mBAAmB,OAApB;EACE,aAAU;EACV,WAAW,GAAG,2DAA2D,SAAS;EAClF,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EAAE,GAAG,SAAwC;CACnE,OAAO,oBAAC,mBAAmB,OAApB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;;AAGA,SAAS,gBAAgB,EACvB,YACA,WACA,GAAG,SAIF;CACD,OACE,oBAAC,mBAAmB,WAApB;EACE,aAAU;EACV,WAAW,GACT,slBACA,SACF;EACA,GAAI;YAEH,cACC,oBAAC,OAAD;GAAK,WAAU;aACb,oBAAC,MAAD;IAAM,IAAI;IAAkB,WAAU;GAAY,CAAA;EAC/C,CAAA;CAEqB,CAAA;AAElC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_cn = require("../../cn.cjs");
|
|
3
|
-
let radix_ui = require("radix-ui");
|
|
4
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let radix_ui = require("radix-ui");
|
|
5
5
|
//#region src/primitives/ScrollArea/ScrollArea.tsx
|
|
6
6
|
/** Custom-styled scroll container: a viewport with a slim, auto-hiding scrollbar. */
|
|
7
7
|
function ScrollArea({ className, children, ...props }) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ScrollBar, t as ScrollArea } from "../../
|
|
1
|
+
import { n as ScrollBar, t as ScrollArea } from "../../index53.cjs";
|
|
2
2
|
export { ScrollArea, ScrollBar };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ScrollBar, t as ScrollArea } from "../../
|
|
1
|
+
import { n as ScrollBar, t as ScrollArea } from "../../index53.js";
|
|
2
2
|
export { ScrollArea, ScrollBar };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
-
import { ScrollArea as ScrollArea$1 } from "radix-ui";
|
|
3
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ScrollArea as ScrollArea$1 } from "radix-ui";
|
|
4
4
|
//#region src/primitives/ScrollArea/ScrollArea.tsx
|
|
5
5
|
/** Custom-styled scroll container: a viewport with a slim, auto-hiding scrollbar. */
|
|
6
6
|
function ScrollArea({ className, children, ...props }) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_cn = require("../../cn.cjs");
|
|
3
|
+
const require_Icon = require("../../Icon.cjs");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
5
|
let lucide_react = require("lucide-react");
|
|
4
6
|
let radix_ui = require("radix-ui");
|
|
5
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
7
|
//#region src/primitives/Select/Select.tsx
|
|
7
8
|
/** Root of the select. Holds the open/value state and wires the trigger to the content. */
|
|
8
9
|
function Select({ ...props }) {
|
|
@@ -44,7 +45,10 @@ function SelectTrigger({ className, size = "default", width = "full", label, chi
|
|
|
44
45
|
})]
|
|
45
46
|
}) : children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Select.Icon, {
|
|
46
47
|
asChild: true,
|
|
47
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
48
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
49
|
+
as: lucide_react.ChevronDownIcon,
|
|
50
|
+
className: "size-4"
|
|
51
|
+
})
|
|
48
52
|
})]
|
|
49
53
|
});
|
|
50
54
|
}
|
|
@@ -81,7 +85,10 @@ function SelectItem({ className, children, ...props }) {
|
|
|
81
85
|
...props,
|
|
82
86
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
83
87
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
84
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Select.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
88
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Select.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
89
|
+
as: lucide_react.CheckIcon,
|
|
90
|
+
className: "size-4"
|
|
91
|
+
}) })
|
|
85
92
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Select.ItemText, { children })]
|
|
86
93
|
});
|
|
87
94
|
}
|
|
@@ -99,7 +106,10 @@ function SelectScrollUpButton({ className, ...props }) {
|
|
|
99
106
|
"data-slot": "select-scroll-up-button",
|
|
100
107
|
className: require_cn.cn("flex cursor-default items-center justify-center py-1", className),
|
|
101
108
|
...props,
|
|
102
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
109
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
110
|
+
as: lucide_react.ChevronUpIcon,
|
|
111
|
+
className: "size-4"
|
|
112
|
+
})
|
|
103
113
|
});
|
|
104
114
|
}
|
|
105
115
|
/** Auto-shown scroll affordance at the bottom of a long, overflowing list. */
|
|
@@ -108,7 +118,10 @@ function SelectScrollDownButton({ className, ...props }) {
|
|
|
108
118
|
"data-slot": "select-scroll-down-button",
|
|
109
119
|
className: require_cn.cn("flex cursor-default items-center justify-center py-1", className),
|
|
110
120
|
...props,
|
|
111
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
121
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
122
|
+
as: lucide_react.ChevronDownIcon,
|
|
123
|
+
className: "size-4"
|
|
124
|
+
})
|
|
112
125
|
});
|
|
113
126
|
}
|
|
114
127
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["SelectPrimitive","cn","ChevronDownIcon","CheckIcon","ChevronUpIcon"],"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` (32px), `default` (36px), or `lg` (40px). */\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-primary-border data-[placeholder]:text-muted-txt text-primary-txt [&_svg:not([class*='text-'])]:text-muted-txt focus-visible:border-primary-invert-border focus-visible:ring-focus aria-invalid:ring-focus-error aria-invalid:border-danger-border flex items-center justify-between gap-2 rounded-12 border bg-input-bg pl-3 pr-2 py-2 text-sm leading-5 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-3 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-4 font-normal text-muted-txt\">{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\" />\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-glass-none-bg text-primary-txt border-primary-border 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-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-12 border shadow-sm\",\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-2\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-2\",\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-txt px-2 py-1.5 text-xs leading-4 font-medium\", 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-ghost-hover-bg [&_svg:not([class*='text-'])]:text-muted-txt relative flex w-full min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-8 pl-2 text-sm leading-5 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-primary-border pointer-events-none 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":"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"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["SelectPrimitive","cn","Icon","ChevronDownIcon","CheckIcon","ChevronUpIcon"],"sources":["../../../src/primitives/Select/Select.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { 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` (32px), `default` (36px), or `lg` (40px). */\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-primary-border data-[placeholder]:text-muted-txt text-primary-txt [&_svg:not([class*='text-'])]:text-muted-txt focus-visible:border-primary-invert-border focus-visible:ring-focus aria-invalid:ring-focus-error aria-invalid:border-danger-border flex items-center justify-between gap-2 rounded-12 border bg-input-bg pl-3 pr-2 py-2 text-sm leading-5 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-3 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-4 font-normal text-muted-txt\">{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 <Icon as={ChevronDownIcon} className=\"size-4\" />\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-glass-none-bg text-primary-txt border-primary-border 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-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-12 border shadow-sm\",\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-2\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-2\",\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-txt px-2 py-1.5 text-xs leading-4 font-medium\", 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-ghost-hover-bg [&_svg:not([class*='text-'])]:text-muted-txt relative flex w-full min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-8 pl-2 text-sm leading-5 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 <Icon as={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-primary-border pointer-events-none 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 <Icon as={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 <Icon as={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":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SelectLabel, c as SelectSeparator, i as SelectItem, l as SelectTrigger, n as SelectContent, o as SelectScrollDownButton, r as SelectGroup, s as SelectScrollUpButton, t as Select, u as SelectValue } from "../../
|
|
1
|
+
import { a as SelectLabel, c as SelectSeparator, i as SelectItem, l as SelectTrigger, n as SelectContent, o as SelectScrollDownButton, r as SelectGroup, s as SelectScrollUpButton, t as Select, u as SelectValue } from "../../index54.cjs";
|
|
2
2
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SelectLabel, c as SelectSeparator, i as SelectItem, l as SelectTrigger, n as SelectContent, o as SelectScrollDownButton, r as SelectGroup, s as SelectScrollUpButton, t as Select, u as SelectValue } from "../../
|
|
1
|
+
import { a as SelectLabel, c as SelectSeparator, i as SelectItem, l as SelectTrigger, n as SelectContent, o as SelectScrollDownButton, r as SelectGroup, s as SelectScrollUpButton, t as Select, u as SelectValue } from "../../index54.js";
|
|
2
2
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
+
import { t as Icon } from "../../Icon.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
4
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
3
5
|
import { Select as Select$1 } from "radix-ui";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/primitives/Select/Select.tsx
|
|
6
7
|
/** Root of the select. Holds the open/value state and wires the trigger to the content. */
|
|
7
8
|
function Select({ ...props }) {
|
|
@@ -43,7 +44,10 @@ function SelectTrigger({ className, size = "default", width = "full", label, chi
|
|
|
43
44
|
})]
|
|
44
45
|
}) : children, /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
45
46
|
asChild: true,
|
|
46
|
-
children: /* @__PURE__ */ jsx(
|
|
47
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
48
|
+
as: ChevronDownIcon,
|
|
49
|
+
className: "size-4"
|
|
50
|
+
})
|
|
47
51
|
})]
|
|
48
52
|
});
|
|
49
53
|
}
|
|
@@ -80,7 +84,10 @@ function SelectItem({ className, children, ...props }) {
|
|
|
80
84
|
...props,
|
|
81
85
|
children: [/* @__PURE__ */ jsx("span", {
|
|
82
86
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
83
|
-
children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
87
|
+
children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
|
|
88
|
+
as: CheckIcon,
|
|
89
|
+
className: "size-4"
|
|
90
|
+
}) })
|
|
84
91
|
}), /* @__PURE__ */ jsx(Select$1.ItemText, { children })]
|
|
85
92
|
});
|
|
86
93
|
}
|
|
@@ -98,7 +105,10 @@ function SelectScrollUpButton({ className, ...props }) {
|
|
|
98
105
|
"data-slot": "select-scroll-up-button",
|
|
99
106
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
100
107
|
...props,
|
|
101
|
-
children: /* @__PURE__ */ jsx(
|
|
108
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
109
|
+
as: ChevronUpIcon,
|
|
110
|
+
className: "size-4"
|
|
111
|
+
})
|
|
102
112
|
});
|
|
103
113
|
}
|
|
104
114
|
/** Auto-shown scroll affordance at the bottom of a long, overflowing list. */
|
|
@@ -107,7 +117,10 @@ function SelectScrollDownButton({ className, ...props }) {
|
|
|
107
117
|
"data-slot": "select-scroll-down-button",
|
|
108
118
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
109
119
|
...props,
|
|
110
|
-
children: /* @__PURE__ */ jsx(
|
|
120
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
121
|
+
as: ChevronDownIcon,
|
|
122
|
+
className: "size-4"
|
|
123
|
+
})
|
|
111
124
|
});
|
|
112
125
|
}
|
|
113
126
|
//#endregion
|
|
@@ -1 +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` (32px), `default` (36px), or `lg` (40px). */\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-primary-border data-[placeholder]:text-muted-txt text-primary-txt [&_svg:not([class*='text-'])]:text-muted-txt focus-visible:border-primary-invert-border focus-visible:ring-focus aria-invalid:ring-focus-error aria-invalid:border-danger-border flex items-center justify-between gap-2 rounded-12 border bg-input-bg pl-3 pr-2 py-2 text-sm leading-5 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-3 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-4 font-normal text-muted-txt\">{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\" />\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-glass-none-bg text-primary-txt border-primary-border 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-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-12 border shadow-sm\",\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-2\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-2\",\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-txt px-2 py-1.5 text-xs leading-4 font-medium\", 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-ghost-hover-bg [&_svg:not([class*='text-'])]:text-muted-txt relative flex w-full min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-8 pl-2 text-sm leading-5 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-primary-border pointer-events-none 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,ozBACA,UAAU,SAAS,WAAW,SAC9B,SACF;EACA,GAAI;YATN,CAWG,QACC,qBAAC,QAAD;GAAM,WAAU;aAAhB,CACE,oBAAC,QAAD;IAAM,WAAU;cAAgD;GAAY,CAAA,GAC5E,oBAAC,QAAD;IAAM,WAAU;IAA0C;GAAe,CAAA,CACrE;OAEN,UAEF,oBAACA,SAAgB,MAAjB;GAAsB,SAAA;aACpB,oBAAC,iBAAD,EAAiB,WAAU,SAAU,CAAA;EACjB,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,kkBACA,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,4DAA4D,SAAS;EACnF,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,qBAACA,SAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT,maACA,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,mDAAmD,SAAS;EAC1E,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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["SelectPrimitive"],"sources":["../../../src/primitives/Select/Select.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { 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` (32px), `default` (36px), or `lg` (40px). */\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-primary-border data-[placeholder]:text-muted-txt text-primary-txt [&_svg:not([class*='text-'])]:text-muted-txt focus-visible:border-primary-invert-border focus-visible:ring-focus aria-invalid:ring-focus-error aria-invalid:border-danger-border flex items-center justify-between gap-2 rounded-12 border bg-input-bg pl-3 pr-2 py-2 text-sm leading-5 whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-3 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-4 font-normal text-muted-txt\">{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 <Icon as={ChevronDownIcon} className=\"size-4\" />\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-glass-none-bg text-primary-txt border-primary-border 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-8 data-[side=left]:slide-in-from-right-8 data-[side=right]:slide-in-from-left-8 data-[side=top]:slide-in-from-bottom-8 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-12 border shadow-sm\",\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-2\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-2\",\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-txt px-2 py-1.5 text-xs leading-4 font-medium\", 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-ghost-hover-bg [&_svg:not([class*='text-'])]:text-muted-txt relative flex w-full min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-8 pl-2 text-sm leading-5 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 <Icon as={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-primary-border pointer-events-none 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 <Icon as={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 <Icon as={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":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_cn = require("../../cn.cjs");
|
|
3
|
-
let radix_ui = require("radix-ui");
|
|
4
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let radix_ui = require("radix-ui");
|
|
5
5
|
//#region src/primitives/Separator/Separator.tsx
|
|
6
6
|
const spacingClasses = {
|
|
7
7
|
none: "",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
-
import { Separator as Separator$1 } from "radix-ui";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Separator as Separator$1 } from "radix-ui";
|
|
4
4
|
//#region src/primitives/Separator/Separator.tsx
|
|
5
5
|
const spacingClasses = {
|
|
6
6
|
none: "",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_cn = require("../../cn.cjs");
|
|
3
|
+
const require_Icon = require("../../Icon.cjs");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
5
|
let lucide_react = require("lucide-react");
|
|
4
6
|
let radix_ui = require("radix-ui");
|
|
5
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
7
|
//#region src/primitives/Sheet/Sheet.tsx
|
|
7
8
|
/** Root provider for a slide-in panel (drawer). Wraps a `SheetTrigger` and `SheetContent`; controls open/closed state. */
|
|
8
9
|
function Sheet({ ...props }) {
|
|
@@ -47,15 +48,50 @@ const sheetOverlayVariants = {
|
|
|
47
48
|
glass: "bg-glass-40-bg backdrop-blur-glass",
|
|
48
49
|
none: "bg-transparent"
|
|
49
50
|
};
|
|
51
|
+
const sheetSizeVariants = {
|
|
52
|
+
small: {
|
|
53
|
+
right: "w-2/3 sm:max-w-xs",
|
|
54
|
+
left: "w-2/3 sm:max-w-xs",
|
|
55
|
+
top: "h-[40vh]",
|
|
56
|
+
bottom: "h-[40vh]"
|
|
57
|
+
},
|
|
58
|
+
default: {
|
|
59
|
+
right: "w-3/4 sm:max-w-sm",
|
|
60
|
+
left: "w-3/4 sm:max-w-sm",
|
|
61
|
+
top: "h-auto",
|
|
62
|
+
bottom: "h-auto"
|
|
63
|
+
},
|
|
64
|
+
medium: {
|
|
65
|
+
right: "w-4/5 sm:max-w-md",
|
|
66
|
+
left: "w-4/5 sm:max-w-md",
|
|
67
|
+
top: "h-[60vh]",
|
|
68
|
+
bottom: "h-[60vh]"
|
|
69
|
+
},
|
|
70
|
+
large: {
|
|
71
|
+
right: "w-11/12 sm:max-w-lg",
|
|
72
|
+
left: "w-11/12 sm:max-w-lg",
|
|
73
|
+
top: "h-[80vh]",
|
|
74
|
+
bottom: "h-[80vh]"
|
|
75
|
+
},
|
|
76
|
+
extraLarge: {
|
|
77
|
+
right: "w-[95vw] sm:max-w-2xl",
|
|
78
|
+
left: "w-[95vw] sm:max-w-2xl",
|
|
79
|
+
top: "h-[95vh]",
|
|
80
|
+
bottom: "h-[95vh]"
|
|
81
|
+
}
|
|
82
|
+
};
|
|
50
83
|
/** 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 }) {
|
|
84
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, overlay = "default", size = "default", ...props }) {
|
|
52
85
|
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
86
|
"data-slot": "sheet-content",
|
|
54
|
-
className: require_cn.cn("bg-primary-bg 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
|
|
87
|
+
className: require_cn.cn("bg-primary-bg 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 rounded-l-8", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full rounded-r-8", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 rounded-b-8", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 rounded-t-8", sheetSizeVariants[size][side], className),
|
|
55
88
|
...props,
|
|
56
89
|
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(radix_ui.Dialog.Close, {
|
|
57
90
|
className: "absolute top-4 right-4 rounded-2 opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-focus focus-visible:ring-3 focus:outline-hidden disabled:pointer-events-none",
|
|
58
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
91
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
92
|
+
as: lucide_react.XIcon,
|
|
93
|
+
className: "size-4"
|
|
94
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59
95
|
className: "sr-only",
|
|
60
96
|
children: "Close"
|
|
61
97
|
})]
|