@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.js","names":[],"sources":["../../../src/primitives/InfoBanner/InfoBanner.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { CircleAlert, CircleCheck, Info, TriangleAlert, X } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { useState } from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// InfoBanner — a dismissible inline status banner (Figma \"Toast Messages\" on\n// the Alert page, node 3962:11659): status-bg surface, rounded-12, px-4 py-3,\n// heading-5 title in the status text color, 14/20 medium secondary description.\n// Distinct from Alert (which is not dismissible).\nconst infoBannerVariants = cva(\"flex w-full gap-4 rounded-12 px-4 py-3\", {\n variants: {\n variant: {\n info: \"bg-info-bg text-info-txt\",\n success: \"bg-success-bg text-success-txt\",\n warning: \"bg-warning-bg text-warning-txt\",\n error: \"bg-danger-bg text-danger-txt\",\n neutral: \"bg-muted-bg text-primary-txt\",\n },\n },\n defaultVariants: {\n variant: \"info\",\n },\n});\n\nconst variantIcons = {\n info: Info,\n success: CircleCheck,\n warning: TriangleAlert,\n error: CircleAlert,\n neutral: Info,\n} as const;\n\nexport type InfoBannerProps = Omit<React.ComponentProps<\"div\">, \"title\"> &\n VariantProps<typeof infoBannerVariants> & {\n /** Intent that drives the banner colors and default icon. Default `info`. */\n variant?: VariantProps<typeof infoBannerVariants>[\"variant\"];\n /** Banner heading. */\n title: string;\n /** Optional supporting copy below the title. */\n description?: React.ReactNode;\n /** Override the default per-variant leading icon. */\n icon?: React.ReactNode;\n /** Show the trailing dismiss button. Default true. */\n dismissible?: boolean;\n /** Controlled visibility. When provided, overrides internal state. */\n visible?: boolean;\n /** Called when the dismiss button is pressed. */\n onDismiss?: () => void;\n };\n\n/** Dismissible inline status banner colored by intent (info/success/warning/error/neutral). */\nfunction InfoBanner({\n title,\n description,\n variant,\n icon,\n dismissible = true,\n visible,\n onDismiss,\n className,\n ...props\n}: InfoBannerProps) {\n const [internalVisible, setInternalVisible] = useState(true);\n const isControlled = visible !== undefined;\n const isVisible = isControlled ? visible : internalVisible;\n\n if (!isVisible) return null;\n\n const handleDismiss = () => {\n if (!isControlled) setInternalVisible(false);\n onDismiss?.();\n };\n\n const VariantIcon = variantIcons[variant ?? \"info\"];\n\n return (\n <div\n data-slot=\"info-banner\"\n data-variant={variant ?? \"info\"}\n role=\"status\"\n className={cn(\n infoBannerVariants({ variant }),\n // Top-aligned like Alert; the icon aligner below sits it on the first line.\n \"items-start\",\n className,\n )}\n {...props}\n >\n {/* Icon inherits the variant's text color via currentColor. */}\n <span data-slot=\"info-banner-icon\" className=\"shrink-0 pt-0.5\" aria-hidden=\"true\">\n {icon ?? <VariantIcon className=\"size-5\" />}\n </span>\n\n <div data-slot=\"info-banner-content\" className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span\n data-slot=\"info-banner-title\"\n className=\"font-heading text-[length:var(--heading-5-font-size)] leading-[var(--heading-5-line-height)] font-medium\"\n >\n {title}\n </span>\n {description != null && (\n <span\n data-slot=\"info-banner-description\"\n className=\"text-sm leading-5 font-medium text-secondary-txt\"\n >\n {description}\n </span>\n )}\n </div>\n\n {dismissible && (\n <button\n data-slot=\"info-banner-dismiss\"\n type=\"button\"\n aria-label=\"Dismiss\"\n onClick={handleDismiss}\n className=\"-mr-2 flex size-8 shrink-0 items-center justify-center rounded-8 text-primary-txt transition-colors hover:bg-primary-txt/5\"\n >\n <X data-slot=\"info-banner-dismiss-icon\" className=\"size-4\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n}\n\nexport { InfoBanner, infoBannerVariants };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/InfoBanner/InfoBanner.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport { CircleAlert, CircleCheck, Info, TriangleAlert, X } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { useState } from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// InfoBanner — a dismissible inline status banner (Figma \"Toast Messages\" on\n// the Alert page, node 3962:11659): status-bg surface, rounded-12, px-4 py-3,\n// heading-5 title in the status text color, 14/20 medium secondary description.\n// Distinct from Alert (which is not dismissible).\nconst infoBannerVariants = cva(\"flex w-full gap-4 rounded-12 px-4 py-3\", {\n variants: {\n variant: {\n info: \"bg-info-bg text-info-txt\",\n success: \"bg-success-bg text-success-txt\",\n warning: \"bg-warning-bg text-warning-txt\",\n error: \"bg-danger-bg text-danger-txt\",\n neutral: \"bg-muted-bg text-primary-txt\",\n },\n },\n defaultVariants: {\n variant: \"info\",\n },\n});\n\nconst variantIcons = {\n info: Info,\n success: CircleCheck,\n warning: TriangleAlert,\n error: CircleAlert,\n neutral: Info,\n} as const;\n\nexport type InfoBannerProps = Omit<React.ComponentProps<\"div\">, \"title\"> &\n VariantProps<typeof infoBannerVariants> & {\n /** Intent that drives the banner colors and default icon. Default `info`. */\n variant?: VariantProps<typeof infoBannerVariants>[\"variant\"];\n /** Banner heading. */\n title: string;\n /** Optional supporting copy below the title. */\n description?: React.ReactNode;\n /** Override the default per-variant leading icon. */\n icon?: React.ReactNode;\n /** Show the trailing dismiss button. Default true. */\n dismissible?: boolean;\n /** Controlled visibility. When provided, overrides internal state. */\n visible?: boolean;\n /** Called when the dismiss button is pressed. */\n onDismiss?: () => void;\n };\n\n/** Dismissible inline status banner colored by intent (info/success/warning/error/neutral). */\nfunction InfoBanner({\n title,\n description,\n variant,\n icon,\n dismissible = true,\n visible,\n onDismiss,\n className,\n ...props\n}: InfoBannerProps) {\n const [internalVisible, setInternalVisible] = useState(true);\n const isControlled = visible !== undefined;\n const isVisible = isControlled ? visible : internalVisible;\n\n if (!isVisible) return null;\n\n const handleDismiss = () => {\n if (!isControlled) setInternalVisible(false);\n onDismiss?.();\n };\n\n const VariantIcon = variantIcons[variant ?? \"info\"];\n\n return (\n <div\n data-slot=\"info-banner\"\n data-variant={variant ?? \"info\"}\n role=\"status\"\n className={cn(\n infoBannerVariants({ variant }),\n // Top-aligned like Alert; the icon aligner below sits it on the first line.\n \"items-start\",\n className,\n )}\n {...props}\n >\n {/* Icon inherits the variant's text color via currentColor. */}\n <span data-slot=\"info-banner-icon\" className=\"shrink-0 pt-0.5\" aria-hidden=\"true\">\n {icon ?? <VariantIcon className=\"size-5\" />}\n </span>\n\n <div data-slot=\"info-banner-content\" className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <span\n data-slot=\"info-banner-title\"\n className=\"font-heading text-[length:var(--heading-5-font-size)] leading-[var(--heading-5-line-height)] font-medium\"\n >\n {title}\n </span>\n {description != null && (\n <span\n data-slot=\"info-banner-description\"\n className=\"text-sm leading-5 font-medium text-secondary-txt\"\n >\n {description}\n </span>\n )}\n </div>\n\n {dismissible && (\n <button\n data-slot=\"info-banner-dismiss\"\n type=\"button\"\n aria-label=\"Dismiss\"\n onClick={handleDismiss}\n className=\"-mr-2 flex size-8 shrink-0 items-center justify-center rounded-8 text-primary-txt transition-colors hover:bg-primary-txt/5\"\n >\n <Icon as={X} data-slot=\"info-banner-dismiss-icon\" className=\"size-4\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n );\n}\n\nexport { InfoBanner, infoBannerVariants };\n"],"mappings":";;;;;;;AAYA,MAAM,qBAAqB,IAAI,0CAA0C;CACvE,UAAU,EACR,SAAS;EACP,MAAM;EACN,SAAS;EACT,SAAS;EACT,OAAO;EACP,SAAS;CACX,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CAAC;AAED,MAAM,eAAe;CACnB,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACP,SAAS;AACX;;AAqBA,SAAS,WAAW,EAClB,OACA,aACA,SACA,MACA,cAAc,MACd,SACA,WACA,WACA,GAAG,SACe;CAClB,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,IAAI;CAC3D,MAAM,eAAe,YAAY,KAAA;CAGjC,IAAI,EAFc,eAAe,UAAU,kBAE3B,OAAO;CAEvB,MAAM,sBAAsB;EAC1B,IAAI,CAAC,cAAc,mBAAmB,KAAK;EAC3C,YAAY;CACd;CAEA,MAAM,cAAc,aAAa,WAAW;CAE5C,OACE,qBAAC,OAAD;EACE,aAAU;EACV,gBAAc,WAAW;EACzB,MAAK;EACL,WAAW,GACT,mBAAmB,EAAE,QAAQ,CAAC,GAE9B,eACA,SACF;EACA,GAAI;YAVN;GAaE,oBAAC,QAAD;IAAM,aAAU;IAAmB,WAAU;IAAkB,eAAY;cACxE,QAAQ,oBAAC,aAAD,EAAa,WAAU,SAAU,CAAA;GACtC,CAAA;GAEN,qBAAC,OAAD;IAAK,aAAU;IAAsB,WAAU;cAA/C,CACE,oBAAC,QAAD;KACE,aAAU;KACV,WAAU;eAET;IACG,CAAA,GACL,eAAe,QACd,oBAAC,QAAD;KACE,aAAU;KACV,WAAU;eAET;IACG,CAAA,CAEL;;GAEJ,eACC,oBAAC,UAAD;IACE,aAAU;IACV,MAAK;IACL,cAAW;IACX,SAAS;IACT,WAAU;cAEV,oBAAC,MAAD;KAAM,IAAI;KAAG,aAAU;KAA2B,WAAU;KAAS,eAAY;IAAQ,CAAA;GACnF,CAAA;EAEP;;AAET"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_cn = require("../../cn.cjs");
|
|
3
|
+
let class_variance_authority = require("class-variance-authority");
|
|
3
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
5
|
//#region src/primitives/Input/Input.tsx
|
|
5
|
-
const inputVariants = (0,
|
|
6
|
+
const inputVariants = (0, class_variance_authority.cva)(require_cn.cn("file:text-primary-txt text-primary-txt placeholder:text-muted-txt selection:bg-primary-invert-bg selection:text-primary-invert-txt flex w-full min-w-0 transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:ring-focus focus-visible:ring-3", "aria-invalid:ring-focus-error"), {
|
|
6
7
|
variants: {
|
|
7
8
|
variant: {
|
|
8
9
|
default: "border border-primary-border bg-input-bg focus-visible:border-primary-invert-border aria-invalid:border-danger-border",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Input/Input.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/* Figma: PS AI Helix – Core → Input & Input Group (node 16:1738). Paddings with\n half-pixel values are Figma's \"hacks to fit scale\" tokens (no spacing step). */\nconst inputVariants = cva(\n cn(\n \"file:text-primary-txt text-primary-txt placeholder:text-muted-txt selection:bg-primary-invert-bg selection:text-primary-invert-txt flex w-full min-w-0 transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:ring-focus focus-visible:ring-3\",\n \"aria-invalid:ring-focus-error\",\n ),\n {\n variants: {\n // `ai` swaps the border for the AI gradient; text/placeholder are unchanged.\n variant: {\n default:\n \"border border-primary-border bg-input-bg focus-visible:border-primary-invert-border aria-invalid:border-danger-border\",\n ai: \"ai-border [--ai-surface:var(--input-bg)]\",\n },\n // Sizes map to the Figma \"Input\" spec: Mini 24px / Small 32px / Regular 36px / Large 40px.\n size: {\n xs: \"h-6 px-1.5 py-1 text-xs leading-4 file:h-5 file:text-xs\",\n sm: \"h-8 px-2 py-1.5 text-sm leading-5 file:h-6 file:text-xs\",\n default: \"h-9 px-3 py-2 text-sm leading-5 file:h-7 file:text-sm\",\n lg: \"h-10 px-4 py-2.5 text-sm leading-5 file:h-8 file:text-sm\",\n },\n // Roundness: Default (12px) and Round (pill).\n shape: {\n default: \"rounded-12\",\n round: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\n/** Styled text input that supports the Figma size and roundness axes; forwards all native `<input>` props. */\nfunction Input({\n className,\n type,\n /** Chrome style — `default` bordered field or `ai` (AI gradient border). */\n variant,\n /** Height/typography preset — Mini (`xs`), Small (`sm`), Regular (`default`), or Large (`lg`). */\n size,\n /** Corner roundness — `default` (12px) or `round` (pill). */\n shape,\n ...props\n}: Omit<React.ComponentProps<\"input\">, \"size\"> & VariantProps<typeof inputVariants>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(inputVariants({ variant, size, shape }), className)}\n {...props}\n />\n );\n}\n\nexport { Input, inputVariants };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Input/Input.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/* Figma: PS AI Helix – Core → Input & Input Group (node 16:1738). Paddings with\n half-pixel values are Figma's \"hacks to fit scale\" tokens (no spacing step). */\nconst inputVariants = cva(\n cn(\n \"file:text-primary-txt text-primary-txt placeholder:text-muted-txt selection:bg-primary-invert-bg selection:text-primary-invert-txt flex w-full min-w-0 transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:ring-focus focus-visible:ring-3\",\n \"aria-invalid:ring-focus-error\",\n ),\n {\n variants: {\n // `ai` swaps the border for the AI gradient; text/placeholder are unchanged.\n variant: {\n default:\n \"border border-primary-border bg-input-bg focus-visible:border-primary-invert-border aria-invalid:border-danger-border\",\n ai: \"ai-border [--ai-surface:var(--input-bg)]\",\n },\n // Sizes map to the Figma \"Input\" spec: Mini 24px / Small 32px / Regular 36px / Large 40px.\n size: {\n xs: \"h-6 px-1.5 py-1 text-xs leading-4 file:h-5 file:text-xs\",\n sm: \"h-8 px-2 py-1.5 text-sm leading-5 file:h-6 file:text-xs\",\n default: \"h-9 px-3 py-2 text-sm leading-5 file:h-7 file:text-sm\",\n lg: \"h-10 px-4 py-2.5 text-sm leading-5 file:h-8 file:text-sm\",\n },\n // Roundness: Default (12px) and Round (pill).\n shape: {\n default: \"rounded-12\",\n round: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\n/** Styled text input that supports the Figma size and roundness axes; forwards all native `<input>` props. */\nfunction Input({\n className,\n type,\n /** Chrome style — `default` bordered field or `ai` (AI gradient border). */\n variant,\n /** Height/typography preset — Mini (`xs`), Small (`sm`), Regular (`default`), or Large (`lg`). */\n size,\n /** Corner roundness — `default` (12px) or `round` (pill). */\n shape,\n ...props\n}: Omit<React.ComponentProps<\"input\">, \"size\"> & VariantProps<typeof inputVariants>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(inputVariants({ variant, size, shape }), className)}\n {...props}\n />\n );\n}\n\nexport { Input, inputVariants };\n"],"mappings":";;;;;AAOA,MAAM,iBAAA,GAAA,yBAAA,KACJA,WAAAA,GACE,sVACA,iDACA,+BACF,GACA;CACE,UAAU;EAER,SAAS;GACP,SACE;GACF,IAAI;EACN;EAEA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;EAEA,OAAO;GACL,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF;;AAGA,SAAS,MAAM,EACb,WACA,MAEA,SAEA,MAEA,OACA,GAAG,SACgF;CACnF,OACE,iBAAA,GAAA,kBAAA,KAAC,SAAD;EACQ;EACN,aAAU;EACV,WAAWA,WAAAA,GAAG,cAAc;GAAE;GAAS;GAAM;EAAM,CAAC,GAAG,SAAS;EAChE,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as inputVariants, t as Input } from "../../
|
|
1
|
+
import { n as inputVariants, t as Input } from "../../index34.cjs";
|
|
2
2
|
export { Input, inputVariants };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as inputVariants, t as Input } from "../../
|
|
1
|
+
import { n as inputVariants, t as Input } from "../../index34.js";
|
|
2
2
|
export { Input, inputVariants };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { cva } from "class-variance-authority";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/primitives/Input/Input.tsx
|
|
5
5
|
const inputVariants = cva(cn("file:text-primary-txt text-primary-txt placeholder:text-muted-txt selection:bg-primary-invert-bg selection:text-primary-invert-txt flex w-full min-w-0 transition-[color,box-shadow] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:ring-focus focus-visible:ring-3", "aria-invalid:ring-focus-error"), {
|
|
6
6
|
variants: {
|
|
@@ -3,8 +3,8 @@ const require_cn = require("../../cn.cjs");
|
|
|
3
3
|
const require_primitives_Button_index = require("../Button/index.cjs");
|
|
4
4
|
const require_primitives_Input_index = require("../Input/index.cjs");
|
|
5
5
|
const require_primitives_Textarea_index = require("../Textarea/index.cjs");
|
|
6
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
6
|
let class_variance_authority = require("class-variance-authority");
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
//#region src/primitives/InputGroup/InputGroup.tsx
|
|
9
9
|
/** Bordered container that groups a control (input/textarea) with addons, buttons, and text into one focusable field. */
|
|
10
10
|
function InputGroup({ className, variant = "default", ...props }) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as InputGroupText, i as InputGroupInput, n as InputGroupAddon, o as InputGroupTextarea, r as InputGroupButton, t as InputGroup } from "../../
|
|
1
|
+
import { a as InputGroupText, i as InputGroupInput, n as InputGroupAddon, o as InputGroupTextarea, r as InputGroupButton, t as InputGroup } from "../../index35.cjs";
|
|
2
2
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as InputGroupText, i as InputGroupInput, n as InputGroupAddon, o as InputGroupTextarea, r as InputGroupButton, t as InputGroup } from "../../
|
|
1
|
+
import { a as InputGroupText, i as InputGroupInput, n as InputGroupAddon, o as InputGroupTextarea, r as InputGroupButton, t as InputGroup } from "../../index35.js";
|
|
2
2
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -2,8 +2,8 @@ import { t as cn } from "../../cn.js";
|
|
|
2
2
|
import { Button } from "../Button/index.js";
|
|
3
3
|
import { Input } from "../Input/index.js";
|
|
4
4
|
import { Textarea } from "../Textarea/index.js";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
import { cva } from "class-variance-authority";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/primitives/InputGroup/InputGroup.tsx
|
|
8
8
|
/** Bordered container that groups a control (input/textarea) with addons, buttons, and text into one focusable field. */
|
|
9
9
|
function InputGroup({ className, variant = "default", ...props }) {
|
|
@@ -1,10 +1,11 @@
|
|
|
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
|
+
const require_Icon = require("../../Icon.cjs");
|
|
4
5
|
let react = require("react");
|
|
5
6
|
react = require_chunk.__toESM(react);
|
|
6
|
-
let lucide_react = require("lucide-react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let lucide_react = require("lucide-react");
|
|
8
9
|
let input_otp = require("input-otp");
|
|
9
10
|
//#region src/primitives/InputOtp/InputOtp.tsx
|
|
10
11
|
const InputOTPSettingsContext = react.createContext({ size: "default" });
|
|
@@ -68,7 +69,7 @@ function InputOTPSeparator({ ...props }) {
|
|
|
68
69
|
"data-slot": "input-otp-separator",
|
|
69
70
|
role: "separator",
|
|
70
71
|
...props,
|
|
71
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MinusIcon
|
|
72
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, { as: lucide_react.MinusIcon })
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
75
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["React","OTPInput","cn","OTPInputContext","MinusIcon"],"sources":["../../../src/primitives/InputOtp/InputOtp.tsx"],"sourcesContent":["\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\ntype InputOTPSize = \"default\" | \"lg\" | \"sm\" | \"xs\";\n\ntype InputOTPContextValue = {\n size: InputOTPSize;\n placeholder?: string;\n};\n\nconst InputOTPSettingsContext = React.createContext<InputOTPContextValue>({\n size: \"default\",\n});\n\n// Sizes mirror the Figma \"Input\" spec: Mini 24px / Small 32px / Default 36px / Large 40px.\nconst inputOTPSlotSizes: Record<InputOTPSize, string> = {\n xs: \"size-6 text-xs\",\n sm: \"size-8 text-sm\",\n default: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n};\n\n/** One-time-passcode field: a row of single-character slots backed by a hidden input. */\nfunction InputOTP({\n className,\n containerClassName,\n size = \"default\",\n placeholder,\n ...props\n}: DistributiveOmit<React.ComponentProps<typeof OTPInput>, \"size\" | \"placeholder\"> & {\n /** Class applied to the outer flex container that wraps the slot groups. */\n containerClassName?: string;\n /** Slot dimensions and type scale: Mini 24px / Small 32px / Default 36px / Large 40px. */\n size?: InputOTPSize;\n /** Single character shown in empty slots as a hint until the user types. */\n placeholder?: string;\n}) {\n const settings = React.useMemo<InputOTPContextValue>(\n () => ({ size, placeholder }),\n [size, placeholder],\n );\n\n return (\n <InputOTPSettingsContext.Provider value={settings}>\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSettingsContext.Provider>\n );\n}\n\n/** Visual cluster of adjacent slots; use multiple groups around an `InputOTPSeparator`. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\n/** A single character cell rendering its char, active ring, fake caret, and placeholder. */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Zero-based position of this slot within the input's character buffer. */\n index: number;\n}) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { size, placeholder } = React.useContext(InputOTPSettingsContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n const isEmpty = char == null || char === \"\";\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-primary-invert-border data-[active=true]:ring-focus data-[active=true]:aria-invalid:ring-focus-error aria-invalid:border-danger-border data-[active=true]:aria-invalid:border-danger-border relative flex items-center justify-center border-y border-r border-secondary-border bg-input-bg transition-all outline-none first:rounded-l-8 first:border-l last:rounded-r-8 data-[active=true]:z-10 data-[active=true]:ring-3\",\n inputOTPSlotSizes[size],\n className,\n )}\n {...props}\n >\n {char}\n {isEmpty && placeholder && (\n <span className=\"text-muted-txt pointer-events-none\">{placeholder}</span>\n )}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-primary-txt h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Decorative divider (a minus icon) placed between two `InputOTPGroup`s. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["React","OTPInput","cn","OTPInputContext","Icon","MinusIcon"],"sources":["../../../src/primitives/InputOtp/InputOtp.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icon } from \"@/primitives/Icon\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\ntype InputOTPSize = \"default\" | \"lg\" | \"sm\" | \"xs\";\n\ntype InputOTPContextValue = {\n size: InputOTPSize;\n placeholder?: string;\n};\n\nconst InputOTPSettingsContext = React.createContext<InputOTPContextValue>({\n size: \"default\",\n});\n\n// Sizes mirror the Figma \"Input\" spec: Mini 24px / Small 32px / Default 36px / Large 40px.\nconst inputOTPSlotSizes: Record<InputOTPSize, string> = {\n xs: \"size-6 text-xs\",\n sm: \"size-8 text-sm\",\n default: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n};\n\n/** One-time-passcode field: a row of single-character slots backed by a hidden input. */\nfunction InputOTP({\n className,\n containerClassName,\n size = \"default\",\n placeholder,\n ...props\n}: DistributiveOmit<React.ComponentProps<typeof OTPInput>, \"size\" | \"placeholder\"> & {\n /** Class applied to the outer flex container that wraps the slot groups. */\n containerClassName?: string;\n /** Slot dimensions and type scale: Mini 24px / Small 32px / Default 36px / Large 40px. */\n size?: InputOTPSize;\n /** Single character shown in empty slots as a hint until the user types. */\n placeholder?: string;\n}) {\n const settings = React.useMemo<InputOTPContextValue>(\n () => ({ size, placeholder }),\n [size, placeholder],\n );\n\n return (\n <InputOTPSettingsContext.Provider value={settings}>\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSettingsContext.Provider>\n );\n}\n\n/** Visual cluster of adjacent slots; use multiple groups around an `InputOTPSeparator`. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\n/** A single character cell rendering its char, active ring, fake caret, and placeholder. */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Zero-based position of this slot within the input's character buffer. */\n index: number;\n}) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { size, placeholder } = React.useContext(InputOTPSettingsContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n const isEmpty = char == null || char === \"\";\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-primary-invert-border data-[active=true]:ring-focus data-[active=true]:aria-invalid:ring-focus-error aria-invalid:border-danger-border data-[active=true]:aria-invalid:border-danger-border relative flex items-center justify-center border-y border-r border-secondary-border bg-input-bg transition-all outline-none first:rounded-l-8 first:border-l last:rounded-r-8 data-[active=true]:z-10 data-[active=true]:ring-3\",\n inputOTPSlotSizes[size],\n className,\n )}\n {...props}\n >\n {char}\n {isEmpty && placeholder && (\n <span className=\"text-muted-txt pointer-events-none\">{placeholder}</span>\n )}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-primary-txt h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Decorative divider (a minus icon) placed between two `InputOTPGroup`s. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <Icon as={MinusIcon} />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":";;;;;;;;;;AAkBA,MAAM,0BAA0BA,MAAM,cAAoC,EACxE,MAAM,UACR,CAAC;AAGD,MAAM,oBAAkD;CACtD,IAAI;CACJ,IAAI;CACJ,SAAS;CACT,IAAI;AACN;;AAGA,SAAS,SAAS,EAChB,WACA,oBACA,OAAO,WACP,aACA,GAAG,SAQF;CACD,MAAM,WAAWA,MAAM,eACd;EAAE;EAAM;CAAY,IAC3B,CAAC,MAAM,WAAW,CACpB;CAEA,OACE,iBAAA,GAAA,kBAAA,KAAC,wBAAwB,UAAzB;EAAkC,OAAO;YACvC,iBAAA,GAAA,kBAAA,KAACC,UAAAA,UAAD;GACE,aAAU;GACV,oBAAoBC,WAAAA,GAClB,mDACA,kBACF;GACA,WAAWA,WAAAA,GAAG,+BAA+B,SAAS;GACtD,GAAI;EACL,CAAA;CAC+B,CAAA;AAEtC;;AAGA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EACpB,OACA,WACA,GAAG,SAIF;CACD,MAAM,kBAAkBF,MAAM,WAAWG,UAAAA,eAAe;CACxD,MAAM,EAAE,MAAM,gBAAgBH,MAAM,WAAW,uBAAuB;CACtE,MAAM,EAAE,MAAM,cAAc,aAAa,iBAAiB,MAAM,UAAU,CAAC;CAC3E,MAAM,UAAU,QAAQ,QAAQ,SAAS;CAEzC,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,aAAU;EACV,eAAa;EACb,WAAWE,WAAAA,GACT,ybACA,kBAAkB,OAClB,SACF;EACA,GAAI;YARN;GAUG;GACA,WAAW,eACV,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;cAAsC;GAAkB,CAAA;GAEzE,gBACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAU;cACb,iBAAA,GAAA,kBAAA,KAAC,OAAD,EAAK,WAAU,4DAA6D,CAAA;GACzE,CAAA;EAEJ;;AAET;;AAGA,SAAS,kBAAkB,EAAE,GAAG,SAAsC;CACpE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,aAAU;EAAsB,MAAK;EAAY,GAAI;YACxD,iBAAA,GAAA,kBAAA,KAACE,aAAAA,MAAD,EAAM,IAAIC,aAAAA,UAAY,CAAA;CACnB,CAAA;AAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as InputOTPSlot, n as InputOTPGroup, r as InputOTPSeparator, t as InputOTP } from "../../
|
|
1
|
+
import { i as InputOTPSlot, n as InputOTPGroup, r as InputOTPSeparator, t as InputOTP } from "../../index36.cjs";
|
|
2
2
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as InputOTPSlot, n as InputOTPGroup, r as InputOTPSeparator, t as InputOTP } from "../../
|
|
1
|
+
import { i as InputOTPSlot, n as InputOTPGroup, r as InputOTPSeparator, t as InputOTP } from "../../index36.js";
|
|
2
2
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
+
import { t as Icon } from "../../Icon.js";
|
|
2
3
|
import * as React from "react";
|
|
3
|
-
import { MinusIcon } from "lucide-react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { MinusIcon } from "lucide-react";
|
|
5
6
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
6
7
|
//#region src/primitives/InputOtp/InputOtp.tsx
|
|
7
8
|
const InputOTPSettingsContext = React.createContext({ size: "default" });
|
|
@@ -65,7 +66,7 @@ function InputOTPSeparator({ ...props }) {
|
|
|
65
66
|
"data-slot": "input-otp-separator",
|
|
66
67
|
role: "separator",
|
|
67
68
|
...props,
|
|
68
|
-
children: /* @__PURE__ */ jsx(
|
|
69
|
+
children: /* @__PURE__ */ jsx(Icon, { as: MinusIcon })
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/InputOtp/InputOtp.tsx"],"sourcesContent":["\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\ntype InputOTPSize = \"default\" | \"lg\" | \"sm\" | \"xs\";\n\ntype InputOTPContextValue = {\n size: InputOTPSize;\n placeholder?: string;\n};\n\nconst InputOTPSettingsContext = React.createContext<InputOTPContextValue>({\n size: \"default\",\n});\n\n// Sizes mirror the Figma \"Input\" spec: Mini 24px / Small 32px / Default 36px / Large 40px.\nconst inputOTPSlotSizes: Record<InputOTPSize, string> = {\n xs: \"size-6 text-xs\",\n sm: \"size-8 text-sm\",\n default: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n};\n\n/** One-time-passcode field: a row of single-character slots backed by a hidden input. */\nfunction InputOTP({\n className,\n containerClassName,\n size = \"default\",\n placeholder,\n ...props\n}: DistributiveOmit<React.ComponentProps<typeof OTPInput>, \"size\" | \"placeholder\"> & {\n /** Class applied to the outer flex container that wraps the slot groups. */\n containerClassName?: string;\n /** Slot dimensions and type scale: Mini 24px / Small 32px / Default 36px / Large 40px. */\n size?: InputOTPSize;\n /** Single character shown in empty slots as a hint until the user types. */\n placeholder?: string;\n}) {\n const settings = React.useMemo<InputOTPContextValue>(\n () => ({ size, placeholder }),\n [size, placeholder],\n );\n\n return (\n <InputOTPSettingsContext.Provider value={settings}>\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSettingsContext.Provider>\n );\n}\n\n/** Visual cluster of adjacent slots; use multiple groups around an `InputOTPSeparator`. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\n/** A single character cell rendering its char, active ring, fake caret, and placeholder. */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Zero-based position of this slot within the input's character buffer. */\n index: number;\n}) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { size, placeholder } = React.useContext(InputOTPSettingsContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n const isEmpty = char == null || char === \"\";\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-primary-invert-border data-[active=true]:ring-focus data-[active=true]:aria-invalid:ring-focus-error aria-invalid:border-danger-border data-[active=true]:aria-invalid:border-danger-border relative flex items-center justify-center border-y border-r border-secondary-border bg-input-bg transition-all outline-none first:rounded-l-8 first:border-l last:rounded-r-8 data-[active=true]:z-10 data-[active=true]:ring-3\",\n inputOTPSlotSizes[size],\n className,\n )}\n {...props}\n >\n {char}\n {isEmpty && placeholder && (\n <span className=\"text-muted-txt pointer-events-none\">{placeholder}</span>\n )}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-primary-txt h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Decorative divider (a minus icon) placed between two `InputOTPGroup`s. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/InputOtp/InputOtp.tsx"],"sourcesContent":["\"use client\";\n\nimport { Icon } from \"@/primitives/Icon\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;\n\ntype InputOTPSize = \"default\" | \"lg\" | \"sm\" | \"xs\";\n\ntype InputOTPContextValue = {\n size: InputOTPSize;\n placeholder?: string;\n};\n\nconst InputOTPSettingsContext = React.createContext<InputOTPContextValue>({\n size: \"default\",\n});\n\n// Sizes mirror the Figma \"Input\" spec: Mini 24px / Small 32px / Default 36px / Large 40px.\nconst inputOTPSlotSizes: Record<InputOTPSize, string> = {\n xs: \"size-6 text-xs\",\n sm: \"size-8 text-sm\",\n default: \"size-9 text-sm\",\n lg: \"size-10 text-base\",\n};\n\n/** One-time-passcode field: a row of single-character slots backed by a hidden input. */\nfunction InputOTP({\n className,\n containerClassName,\n size = \"default\",\n placeholder,\n ...props\n}: DistributiveOmit<React.ComponentProps<typeof OTPInput>, \"size\" | \"placeholder\"> & {\n /** Class applied to the outer flex container that wraps the slot groups. */\n containerClassName?: string;\n /** Slot dimensions and type scale: Mini 24px / Small 32px / Default 36px / Large 40px. */\n size?: InputOTPSize;\n /** Single character shown in empty slots as a hint until the user types. */\n placeholder?: string;\n}) {\n const settings = React.useMemo<InputOTPContextValue>(\n () => ({ size, placeholder }),\n [size, placeholder],\n );\n\n return (\n <InputOTPSettingsContext.Provider value={settings}>\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSettingsContext.Provider>\n );\n}\n\n/** Visual cluster of adjacent slots; use multiple groups around an `InputOTPSeparator`. */\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\n/** A single character cell rendering its char, active ring, fake caret, and placeholder. */\nfunction InputOTPSlot({\n index,\n className,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Zero-based position of this slot within the input's character buffer. */\n index: number;\n}) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { size, placeholder } = React.useContext(InputOTPSettingsContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n const isEmpty = char == null || char === \"\";\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"data-[active=true]:border-primary-invert-border data-[active=true]:ring-focus data-[active=true]:aria-invalid:ring-focus-error aria-invalid:border-danger-border data-[active=true]:aria-invalid:border-danger-border relative flex items-center justify-center border-y border-r border-secondary-border bg-input-bg transition-all outline-none first:rounded-l-8 first:border-l last:rounded-r-8 data-[active=true]:z-10 data-[active=true]:ring-3\",\n inputOTPSlotSizes[size],\n className,\n )}\n {...props}\n >\n {char}\n {isEmpty && placeholder && (\n <span className=\"text-muted-txt pointer-events-none\">{placeholder}</span>\n )}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-primary-txt h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n );\n}\n\n/** Decorative divider (a minus icon) placed between two `InputOTPGroup`s. */\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"input-otp-separator\" role=\"separator\" {...props}>\n <Icon as={MinusIcon} />\n </div>\n );\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"],"mappings":";;;;;;;AAkBA,MAAM,0BAA0B,MAAM,cAAoC,EACxE,MAAM,UACR,CAAC;AAGD,MAAM,oBAAkD;CACtD,IAAI;CACJ,IAAI;CACJ,SAAS;CACT,IAAI;AACN;;AAGA,SAAS,SAAS,EAChB,WACA,oBACA,OAAO,WACP,aACA,GAAG,SAQF;CACD,MAAM,WAAW,MAAM,eACd;EAAE;EAAM;CAAY,IAC3B,CAAC,MAAM,WAAW,CACpB;CAEA,OACE,oBAAC,wBAAwB,UAAzB;EAAkC,OAAO;YACvC,oBAAC,UAAD;GACE,aAAU;GACV,oBAAoB,GAClB,mDACA,kBACF;GACA,WAAW,GAAG,+BAA+B,SAAS;GACtD,GAAI;EACL,CAAA;CAC+B,CAAA;AAEtC;;AAGA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EACpB,OACA,WACA,GAAG,SAIF;CACD,MAAM,kBAAkB,MAAM,WAAW,eAAe;CACxD,MAAM,EAAE,MAAM,gBAAgB,MAAM,WAAW,uBAAuB;CACtE,MAAM,EAAE,MAAM,cAAc,aAAa,iBAAiB,MAAM,UAAU,CAAC;CAC3E,MAAM,UAAU,QAAQ,QAAQ,SAAS;CAEzC,OACE,qBAAC,OAAD;EACE,aAAU;EACV,eAAa;EACb,WAAW,GACT,ybACA,kBAAkB,OAClB,SACF;EACA,GAAI;YARN;GAUG;GACA,WAAW,eACV,oBAAC,QAAD;IAAM,WAAU;cAAsC;GAAkB,CAAA;GAEzE,gBACC,oBAAC,OAAD;IAAK,WAAU;cACb,oBAAC,OAAD,EAAK,WAAU,4DAA6D,CAAA;GACzE,CAAA;EAEJ;;AAET;;AAGA,SAAS,kBAAkB,EAAE,GAAG,SAAsC;CACpE,OACE,oBAAC,OAAD;EAAK,aAAU;EAAsB,MAAK;EAAY,GAAI;YACxD,oBAAC,MAAD,EAAM,IAAI,UAAY,CAAA;CACnB,CAAA;AAET"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_cn = require("../../cn.cjs");
|
|
3
3
|
const require_primitives_Separator_index = require("../Separator/index.cjs");
|
|
4
|
-
let radix_ui = require("radix-ui");
|
|
5
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
4
|
let class_variance_authority = require("class-variance-authority");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let radix_ui = require("radix-ui");
|
|
7
7
|
//#region src/primitives/Item/Item.tsx
|
|
8
8
|
/** Vertical list container that groups related `Item`s (role="list"). */
|
|
9
9
|
function ItemGroup({ className, ...props }) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ItemFooter, c as ItemMedia, i as ItemDescription, l as ItemSeparator, n as ItemActions, o as ItemGroup, r as ItemContent, s as ItemHeader, t as Item, u as ItemTitle } from "../../
|
|
1
|
+
import { a as ItemFooter, c as ItemMedia, i as ItemDescription, l as ItemSeparator, n as ItemActions, o as ItemGroup, r as ItemContent, s as ItemHeader, t as Item, u as ItemTitle } from "../../index37.cjs";
|
|
2
2
|
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ItemFooter, c as ItemMedia, i as ItemDescription, l as ItemSeparator, n as ItemActions, o as ItemGroup, r as ItemContent, s as ItemHeader, t as Item, u as ItemTitle } from "../../
|
|
1
|
+
import { a as ItemFooter, c as ItemMedia, i as ItemDescription, l as ItemSeparator, n as ItemActions, o as ItemGroup, r as ItemContent, s as ItemHeader, t as Item, u as ItemTitle } from "../../index37.js";
|
|
2
2
|
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
2
|
import { Separator as Separator$1 } from "../Separator/index.js";
|
|
3
|
-
import { Slot } from "radix-ui";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
3
|
import { cva } from "class-variance-authority";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Slot } from "radix-ui";
|
|
6
6
|
//#region src/primitives/Item/Item.tsx
|
|
7
7
|
/** Vertical list container that groups related `Item`s (role="list"). */
|
|
8
8
|
function ItemGroup({ className, ...props }) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as KbdGroup, t as Kbd } from "../../
|
|
1
|
+
import { n as KbdGroup, t as Kbd } from "../../index38.cjs";
|
|
2
2
|
export { Kbd, KbdGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as KbdGroup, t as Kbd } from "../../
|
|
1
|
+
import { n as KbdGroup, t as Kbd } from "../../index38.js";
|
|
2
2
|
export { Kbd, KbdGroup };
|
|
@@ -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/Label/Label.tsx
|
|
6
6
|
/** Accessible form label (Radix `Label.Root`) that ties caption text to a control and dims when the associated field is disabled. */
|
|
7
7
|
function Label({ className, align = "block", ...props }) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Label } from "../../
|
|
1
|
+
import { t as Label } from "../../index26.cjs";
|
|
2
2
|
export { Label };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Label } from "../../
|
|
1
|
+
import { t as Label } from "../../index26.js";
|
|
2
2
|
export { Label };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
-
import { Label as Label$1 } from "radix-ui";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Label as Label$1 } from "radix-ui";
|
|
4
4
|
//#region src/primitives/Label/Label.tsx
|
|
5
5
|
/** Accessible form label (Radix `Label.Root`) that ties caption text to a control and dims when the associated field is disabled. */
|
|
6
6
|
function Label({ className, align = "block", ...props }) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_cn = require("../../cn.cjs");
|
|
3
|
-
let
|
|
3
|
+
let class_variance_authority = require("class-variance-authority");
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let radix_ui = require("radix-ui");
|
|
5
6
|
//#region src/primitives/Link/Link.tsx
|
|
6
|
-
const linkVariants = (0,
|
|
7
|
+
const linkVariants = (0, class_variance_authority.cva)("rounded-2 underline underline-offset-2 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-focus", {
|
|
7
8
|
variants: {
|
|
8
9
|
variant: {
|
|
9
10
|
default: "font-medium text-primary-txt hover:text-primary-txt/80",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["Slot","cn"],"sources":["../../../src/primitives/Link/Link.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Link — inline text link. Use `asChild` to render a router link (e.g. React\n// Router's <Link>) while keeping the design-system styling.\nconst linkVariants = cva(\n \"rounded-2 underline underline-offset-2 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-focus\",\n {\n variants: {\n variant: {\n default: \"font-medium text-primary-txt hover:text-primary-txt/80\",\n muted: \"font-medium text-muted-txt hover:text-primary-txt\",\n subtle: \"text-primary-txt hover:text-primary-txt/80\",\n },\n underline: {\n always: \"\",\n hover: \"no-underline hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n underline: \"always\",\n },\n },\n);\n\ntype LinkProps = React.ComponentProps<\"a\"> &\n VariantProps<typeof linkVariants> & {\n /** Render the child element instead of an <a> (for router links). */\n asChild?: boolean;\n /** Visual emphasis of the link text: primary (`default`), `muted`, or `subtle`. */\n variant?: VariantProps<typeof linkVariants>[\"variant\"];\n /** When the underline shows: `always` or only on `hover`. */\n underline?: VariantProps<typeof linkVariants>[\"underline\"];\n };\n\n/** Inline text link styled to the design system; pass `asChild` to render a router link. */\nfunction Link({ asChild = false, className, variant, underline, ...props }: LinkProps) {\n const Comp = asChild ? Slot.Root : \"a\";\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkVariants({ variant, underline }), className)}\n {...props}\n />\n );\n}\n\nexport { Link, linkVariants, type LinkProps };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Slot","cn"],"sources":["../../../src/primitives/Link/Link.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Link — inline text link. Use `asChild` to render a router link (e.g. React\n// Router's <Link>) while keeping the design-system styling.\nconst linkVariants = cva(\n \"rounded-2 underline underline-offset-2 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-focus\",\n {\n variants: {\n variant: {\n default: \"font-medium text-primary-txt hover:text-primary-txt/80\",\n muted: \"font-medium text-muted-txt hover:text-primary-txt\",\n subtle: \"text-primary-txt hover:text-primary-txt/80\",\n },\n underline: {\n always: \"\",\n hover: \"no-underline hover:underline\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n underline: \"always\",\n },\n },\n);\n\ntype LinkProps = React.ComponentProps<\"a\"> &\n VariantProps<typeof linkVariants> & {\n /** Render the child element instead of an <a> (for router links). */\n asChild?: boolean;\n /** Visual emphasis of the link text: primary (`default`), `muted`, or `subtle`. */\n variant?: VariantProps<typeof linkVariants>[\"variant\"];\n /** When the underline shows: `always` or only on `hover`. */\n underline?: VariantProps<typeof linkVariants>[\"underline\"];\n };\n\n/** Inline text link styled to the design system; pass `asChild` to render a router link. */\nfunction Link({ asChild = false, className, variant, underline, ...props }: LinkProps) {\n const Comp = asChild ? Slot.Root : \"a\";\n return (\n <Comp\n data-slot=\"link\"\n className={cn(linkVariants({ variant, underline }), className)}\n {...props}\n />\n );\n}\n\nexport { Link, linkVariants, type LinkProps };\n"],"mappings":";;;;;;AAQA,MAAM,gBAAA,GAAA,yBAAA,KACJ,uHACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,OAAO;GACP,QAAQ;EACV;EACA,WAAW;GACT,QAAQ;GACR,OAAO;EACT;CACF;CACA,iBAAiB;EACf,SAAS;EACT,WAAW;CACb;AACF,CACF;;AAaA,SAAS,KAAK,EAAE,UAAU,OAAO,WAAW,SAAS,WAAW,GAAG,SAAoB;CAErF,OACE,iBAAA,GAAA,kBAAA,KAFW,UAAUA,SAAAA,KAAK,OAAO,KAEjC;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,aAAa;GAAE;GAAS;EAAU,CAAC,GAAG,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as LinkProps, r as linkVariants, t as Link } from "../../
|
|
1
|
+
import { n as LinkProps, r as linkVariants, t as Link } from "../../index39.cjs";
|
|
2
2
|
export { Link, LinkProps, linkVariants };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as LinkProps, r as linkVariants, t as Link } from "../../
|
|
1
|
+
import { n as LinkProps, r as linkVariants, t as Link } from "../../index39.js";
|
|
2
2
|
export { Link, LinkProps, linkVariants };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
-
import { Slot } from "radix-ui";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
2
|
import { cva } from "class-variance-authority";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Slot } from "radix-ui";
|
|
5
5
|
//#region src/primitives/Link/Link.tsx
|
|
6
6
|
const linkVariants = cva("rounded-2 underline underline-offset-2 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-focus", {
|
|
7
7
|
variants: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as LogoBrand, r as LogoVariant, t as Logo } from "../../
|
|
1
|
+
import { n as LogoBrand, r as LogoVariant, t as Logo } from "../../index40.cjs";
|
|
2
2
|
export { Logo, LogoBrand, LogoVariant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as LogoBrand, r as LogoVariant, t as Logo } from "../../
|
|
1
|
+
import { n as LogoBrand, r as LogoVariant, t as Logo } from "../../index40.js";
|
|
2
2
|
export { Logo, LogoBrand, LogoVariant };
|
|
@@ -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/Menubar/Menubar.tsx
|
|
7
8
|
/** Horizontal application menu bar that hosts a row of dropdown menus (File, Edit, …). */
|
|
8
9
|
function Menubar({ className, ...props }) {
|
|
@@ -78,7 +79,10 @@ function MenubarCheckboxItem({ className, children, checked, ...props }) {
|
|
|
78
79
|
...props,
|
|
79
80
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
80
81
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
81
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Menubar.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
82
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Menubar.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
83
|
+
as: lucide_react.CheckIcon,
|
|
84
|
+
className: "size-4"
|
|
85
|
+
}) })
|
|
82
86
|
}), children]
|
|
83
87
|
});
|
|
84
88
|
}
|
|
@@ -90,7 +94,10 @@ function MenubarRadioItem({ className, children, ...props }) {
|
|
|
90
94
|
...props,
|
|
91
95
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
92
96
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
93
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Menubar.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
97
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Menubar.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
98
|
+
as: lucide_react.CircleIcon,
|
|
99
|
+
className: "size-2 fill-current"
|
|
100
|
+
}) })
|
|
94
101
|
}), children]
|
|
95
102
|
});
|
|
96
103
|
}
|
|
@@ -133,7 +140,10 @@ function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
|
133
140
|
"data-inset": inset,
|
|
134
141
|
className: require_cn.cn("flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-none select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg", className),
|
|
135
142
|
...props,
|
|
136
|
-
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
143
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
144
|
+
as: lucide_react.ChevronRightIcon,
|
|
145
|
+
className: "ml-auto size-4"
|
|
146
|
+
})]
|
|
137
147
|
});
|
|
138
148
|
}
|
|
139
149
|
/** The dropdown surface for a nested submenu's items. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["MenubarPrimitive","cn","CheckIcon","CircleIcon","ChevronRightIcon"],"sources":["../../../src/primitives/Menubar/Menubar.tsx"],"sourcesContent":["import { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { Menubar as MenubarPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Horizontal application menu bar that hosts a row of dropdown menus (File, Edit, …). */\nfunction Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>) {\n return (\n <MenubarPrimitive.Root\n data-slot=\"menubar\"\n className={cn(\n \"flex h-9 items-center gap-1 rounded-8 border border-primary-border bg-primary-bg p-1 shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single menu within the bar — wraps a trigger and its content. */\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu data-slot=\"menubar-menu\" {...props} />;\n}\n\n/** Groups related menu items together for semantic structure. */\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group data-slot=\"menubar-group\" {...props} />;\n}\n\n/** Portals menu content into the document body so it escapes overflow/stacking contexts. */\nfunction MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal data-slot=\"menubar-portal\" {...props} />;\n}\n\n/** Groups `MenubarRadioItem`s so only one can be selected at a time. */\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup data-slot=\"menubar-radio-group\" {...props} />;\n}\n\n/** The clickable label in the bar that opens its menu's content. */\nfunction MenubarTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {\n return (\n <MenubarPrimitive.Trigger\n data-slot=\"menubar-trigger\"\n className={cn(\n \"flex items-center rounded-8 px-2 py-1 font-heading text-sm leading-5 font-medium outline-hidden select-none focus:bg-ghost-hover-bg data-[state=open]:bg-toggle-active-bg\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The dropdown surface that holds a menu's items; portalled and animated. */\nfunction MenubarContent({\n className,\n align = \"start\",\n alignOffset = -4,\n sideOffset = 8,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Content>) {\n return (\n <MenubarPortal>\n <MenubarPrimitive.Content\n data-slot=\"menubar-content\"\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-48 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm 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 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n </MenubarPortal>\n );\n}\n\n/** A selectable action inside a menu's content. */\nfunction MenubarItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Item> & {\n /** Adds left padding to align the label with items that have leading icons/indicators. */\n inset?: boolean;\n /** Visual intent — `destructive` styles the item in the danger colour. */\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <MenubarPrimitive.Item\n data-slot=\"menubar-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-danger-txt data-[variant=destructive]:focus:bg-danger-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt data-[variant=destructive]:*:[svg]:text-danger-txt!\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A menu item with a toggleable checkmark indicator. */\nfunction MenubarCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>) {\n return (\n <MenubarPrimitive.CheckboxItem\n data-slot=\"menubar-checkbox-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n );\n}\n\n/** A menu item with a radio dot indicator; use inside a `MenubarRadioGroup`. */\nfunction MenubarRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioItem>) {\n return (\n <MenubarPrimitive.RadioItem\n data-slot=\"menubar-radio-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n );\n}\n\n/** A non-interactive heading that titles a group of menu items. */\nfunction MenubarLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Label> & {\n /** Adds left padding to align the label with items that have leading icons/indicators. */\n inset?: boolean;\n}) {\n return (\n <MenubarPrimitive.Label\n data-slot=\"menubar-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-xs leading-4 font-medium text-muted-txt data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A thin divider line between groups of menu items. */\nfunction MenubarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Separator>) {\n return (\n <MenubarPrimitive.Separator\n data-slot=\"menubar-separator\"\n className={cn(\"my-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** Right-aligned hint text for an item's keyboard shortcut (e.g. ⌘T). */\nfunction MenubarShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"menubar-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\n/** Wraps a nested submenu (its trigger and content). */\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\n/** An item that opens a nested submenu; shows a trailing chevron. */\nfunction MenubarSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {\n /** Adds left padding to align the label with items that have leading icons/indicators. */\n inset?: boolean;\n}) {\n return (\n <MenubarPrimitive.SubTrigger\n data-slot=\"menubar-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-none select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n );\n}\n\n/** The dropdown surface for a nested submenu's items. */\nfunction MenubarSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {\n return (\n <MenubarPrimitive.SubContent\n data-slot=\"menubar-sub-content\"\n className={cn(\n \"z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Menubar,\n MenubarPortal,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarGroup,\n MenubarSeparator,\n MenubarLabel,\n MenubarItem,\n MenubarShortcut,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["MenubarPrimitive","cn","Icon","CheckIcon","CircleIcon","ChevronRightIcon"],"sources":["../../../src/primitives/Menubar/Menubar.tsx"],"sourcesContent":["import { Icon } from \"@/primitives/Icon\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport { Menubar as MenubarPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Horizontal application menu bar that hosts a row of dropdown menus (File, Edit, …). */\nfunction Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>) {\n return (\n <MenubarPrimitive.Root\n data-slot=\"menubar\"\n className={cn(\n \"flex h-9 items-center gap-1 rounded-8 border border-primary-border bg-primary-bg p-1 shadow-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single menu within the bar — wraps a trigger and its content. */\nfunction MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n return <MenubarPrimitive.Menu data-slot=\"menubar-menu\" {...props} />;\n}\n\n/** Groups related menu items together for semantic structure. */\nfunction MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n return <MenubarPrimitive.Group data-slot=\"menubar-group\" {...props} />;\n}\n\n/** Portals menu content into the document body so it escapes overflow/stacking contexts. */\nfunction MenubarPortal({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n return <MenubarPrimitive.Portal data-slot=\"menubar-portal\" {...props} />;\n}\n\n/** Groups `MenubarRadioItem`s so only one can be selected at a time. */\nfunction MenubarRadioGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n return <MenubarPrimitive.RadioGroup data-slot=\"menubar-radio-group\" {...props} />;\n}\n\n/** The clickable label in the bar that opens its menu's content. */\nfunction MenubarTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {\n return (\n <MenubarPrimitive.Trigger\n data-slot=\"menubar-trigger\"\n className={cn(\n \"flex items-center rounded-8 px-2 py-1 font-heading text-sm leading-5 font-medium outline-hidden select-none focus:bg-ghost-hover-bg data-[state=open]:bg-toggle-active-bg\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The dropdown surface that holds a menu's items; portalled and animated. */\nfunction MenubarContent({\n className,\n align = \"start\",\n alignOffset = -4,\n sideOffset = 8,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Content>) {\n return (\n <MenubarPortal>\n <MenubarPrimitive.Content\n data-slot=\"menubar-content\"\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-48 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm 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 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n </MenubarPortal>\n );\n}\n\n/** A selectable action inside a menu's content. */\nfunction MenubarItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Item> & {\n /** Adds left padding to align the label with items that have leading icons/indicators. */\n inset?: boolean;\n /** Visual intent — `destructive` styles the item in the danger colour. */\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <MenubarPrimitive.Item\n data-slot=\"menubar-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-danger-txt data-[variant=destructive]:focus:bg-danger-bg [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-txt data-[variant=destructive]:*:[svg]:text-danger-txt!\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A menu item with a toggleable checkmark indicator. */\nfunction MenubarCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>) {\n return (\n <MenubarPrimitive.CheckboxItem\n data-slot=\"menubar-checkbox-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Icon as={CheckIcon} className=\"size-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n );\n}\n\n/** A menu item with a radio dot indicator; use inside a `MenubarRadioGroup`. */\nfunction MenubarRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioItem>) {\n return (\n <MenubarPrimitive.RadioItem\n data-slot=\"menubar-radio-item\"\n className={cn(\n \"relative flex min-h-8 cursor-default items-center gap-2 rounded-10 py-1.5 pr-2 pl-8 text-sm leading-5 outline-hidden select-none focus:bg-ghost-hover-bg data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Icon as={CircleIcon} className=\"size-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n );\n}\n\n/** A non-interactive heading that titles a group of menu items. */\nfunction MenubarLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Label> & {\n /** Adds left padding to align the label with items that have leading icons/indicators. */\n inset?: boolean;\n}) {\n return (\n <MenubarPrimitive.Label\n data-slot=\"menubar-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-xs leading-4 font-medium text-muted-txt data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A thin divider line between groups of menu items. */\nfunction MenubarSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.Separator>) {\n return (\n <MenubarPrimitive.Separator\n data-slot=\"menubar-separator\"\n className={cn(\"my-1 h-px bg-primary-border\", className)}\n {...props}\n />\n );\n}\n\n/** Right-aligned hint text for an item's keyboard shortcut (e.g. ⌘T). */\nfunction MenubarShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"menubar-shortcut\"\n className={cn(\"ml-auto text-sm leading-5 text-muted-txt\", className)}\n {...props}\n />\n );\n}\n\n/** Wraps a nested submenu (its trigger and content). */\nfunction MenubarSub({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n return <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\n/** An item that opens a nested submenu; shows a trailing chevron. */\nfunction MenubarSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {\n /** Adds left padding to align the label with items that have leading icons/indicators. */\n inset?: boolean;\n}) {\n return (\n <MenubarPrimitive.SubTrigger\n data-slot=\"menubar-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-none select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg\",\n className,\n )}\n {...props}\n >\n {children}\n <Icon as={ChevronRightIcon} className=\"ml-auto size-4\" />\n </MenubarPrimitive.SubTrigger>\n );\n}\n\n/** The dropdown surface for a nested submenu's items. */\nfunction MenubarSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {\n return (\n <MenubarPrimitive.SubContent\n data-slot=\"menubar-sub-content\"\n className={cn(\n \"z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-12 border border-primary-border bg-glass-none-bg p-2 text-primary-txt shadow-sm 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n // Vertical hierarchy: if any item reserves the 32px indicator column\n // (checkbox/radio items), plain items, labels and sub-triggers share it.\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-item]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-label]:not([data-inset])]:pl-8\",\n \"[&:has([role=menuitemcheckbox],[role=menuitemradio])_[data-slot=menubar-sub-trigger]:not([data-inset])]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Menubar,\n MenubarPortal,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarGroup,\n MenubarSeparator,\n MenubarLabel,\n MenubarItem,\n MenubarShortcut,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n};\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MenubarItem, c as MenubarPortal, d as MenubarSeparator, f as MenubarShortcut, g as MenubarTrigger, h as MenubarSubTrigger, i as MenubarGroup, l as MenubarRadioGroup, m as MenubarSubContent, n as MenubarCheckboxItem, o as MenubarLabel, p as MenubarSub, r as MenubarContent, s as MenubarMenu, t as Menubar, u as MenubarRadioItem } from "../../
|
|
1
|
+
import { a as MenubarItem, c as MenubarPortal, d as MenubarSeparator, f as MenubarShortcut, g as MenubarTrigger, h as MenubarSubTrigger, i as MenubarGroup, l as MenubarRadioGroup, m as MenubarSubContent, n as MenubarCheckboxItem, o as MenubarLabel, p as MenubarSub, r as MenubarContent, s as MenubarMenu, t as Menubar, u as MenubarRadioItem } from "../../index41.cjs";
|
|
2
2
|
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MenubarItem, c as MenubarPortal, d as MenubarSeparator, f as MenubarShortcut, g as MenubarTrigger, h as MenubarSubTrigger, i as MenubarGroup, l as MenubarRadioGroup, m as MenubarSubContent, n as MenubarCheckboxItem, o as MenubarLabel, p as MenubarSub, r as MenubarContent, s as MenubarMenu, t as Menubar, u as MenubarRadioItem } from "../../
|
|
1
|
+
import { a as MenubarItem, c as MenubarPortal, d as MenubarSeparator, f as MenubarShortcut, g as MenubarTrigger, h as MenubarSubTrigger, i as MenubarGroup, l as MenubarRadioGroup, m as MenubarSubContent, n as MenubarCheckboxItem, o as MenubarLabel, p as MenubarSub, r as MenubarContent, s as MenubarMenu, t as Menubar, u as MenubarRadioItem } from "../../index41.js";
|
|
2
2
|
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
@@ -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, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
3
5
|
import { Menubar as Menubar$1 } from "radix-ui";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/primitives/Menubar/Menubar.tsx
|
|
6
7
|
/** Horizontal application menu bar that hosts a row of dropdown menus (File, Edit, …). */
|
|
7
8
|
function Menubar({ className, ...props }) {
|
|
@@ -77,7 +78,10 @@ function MenubarCheckboxItem({ className, children, checked, ...props }) {
|
|
|
77
78
|
...props,
|
|
78
79
|
children: [/* @__PURE__ */ jsx("span", {
|
|
79
80
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
80
|
-
children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
81
|
+
children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
|
|
82
|
+
as: CheckIcon,
|
|
83
|
+
className: "size-4"
|
|
84
|
+
}) })
|
|
81
85
|
}), children]
|
|
82
86
|
});
|
|
83
87
|
}
|
|
@@ -89,7 +93,10 @@ function MenubarRadioItem({ className, children, ...props }) {
|
|
|
89
93
|
...props,
|
|
90
94
|
children: [/* @__PURE__ */ jsx("span", {
|
|
91
95
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
92
|
-
children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
96
|
+
children: /* @__PURE__ */ jsx(Menubar$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
|
|
97
|
+
as: CircleIcon,
|
|
98
|
+
className: "size-2 fill-current"
|
|
99
|
+
}) })
|
|
93
100
|
}), children]
|
|
94
101
|
});
|
|
95
102
|
}
|
|
@@ -132,7 +139,10 @@ function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
|
132
139
|
"data-inset": inset,
|
|
133
140
|
className: cn("flex min-h-8 cursor-default items-center gap-2 rounded-10 px-2 py-1.5 text-sm leading-5 outline-none select-none focus:bg-ghost-hover-bg data-[inset]:pl-8 data-[state=open]:bg-ghost-hover-bg", className),
|
|
134
141
|
...props,
|
|
135
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
142
|
+
children: [children, /* @__PURE__ */ jsx(Icon, {
|
|
143
|
+
as: ChevronRightIcon,
|
|
144
|
+
className: "ml-auto size-4"
|
|
145
|
+
})]
|
|
136
146
|
});
|
|
137
147
|
}
|
|
138
148
|
/** The dropdown surface for a nested submenu's items. */
|