@psnext/design-system 2.2.0 → 2.4.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 +466 -4
- package/README.md +3 -3
- package/SKILL.md +83 -5
- package/bin/install-agent-skill.mjs +39 -7
- package/dist/Header.cjs +214 -108
- package/dist/Header.cjs.map +1 -1
- package/dist/Header.js +214 -108
- 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/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 +5 -1
- 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 +3 -2
- package/dist/index10.d.cts +6 -6
- package/dist/index10.d.ts +7 -7
- package/dist/index10.d.ts.map +1 -1
- 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 +11 -11
- package/dist/index12.d.ts +13 -13
- package/dist/index12.d.ts.map +1 -1
- 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.cts.map +1 -1
- package/dist/index14.d.ts +5 -5
- package/dist/index15.d.cts +3 -3
- package/dist/index15.d.cts.map +1 -1
- package/dist/index15.d.ts +3 -3
- package/dist/index15.d.ts.map +1 -1
- package/dist/index16.d.cts +2 -2
- package/dist/index16.d.cts.map +1 -1
- package/dist/index16.d.ts +2 -2
- package/dist/index16.d.ts.map +1 -1
- package/dist/index17.d.cts +4 -4
- package/dist/index17.d.cts.map +1 -1
- package/dist/index17.d.ts +4 -4
- package/dist/index18.d.cts +11 -11
- package/dist/index18.d.cts.map +1 -1
- package/dist/index18.d.ts +11 -11
- package/dist/index18.d.ts.map +1 -1
- package/dist/index19.d.cts +10 -10
- package/dist/index19.d.cts.map +1 -1
- package/dist/index19.d.ts +10 -10
- package/dist/index19.d.ts.map +1 -1
- package/dist/index2.d.cts +8 -8
- package/dist/index2.d.cts.map +1 -1
- package/dist/index2.d.ts +7 -7
- package/dist/index20.d.cts +16 -16
- package/dist/index20.d.cts.map +1 -1
- package/dist/index20.d.ts +16 -16
- package/dist/index20.d.ts.map +1 -1
- package/dist/index21.d.cts +4 -4
- package/dist/index21.d.cts.map +1 -1
- package/dist/index21.d.ts +4 -4
- package/dist/index21.d.ts.map +1 -1
- package/dist/index22.d.cts +11 -11
- package/dist/index22.d.ts +11 -11
- package/dist/index23.d.cts +16 -16
- package/dist/index23.d.cts.map +1 -1
- package/dist/index23.d.ts +16 -16
- package/dist/index23.d.ts.map +1 -1
- package/dist/index24.d.cts +10 -10
- package/dist/index24.d.cts.map +1 -1
- package/dist/index24.d.ts +11 -11
- package/dist/index24.d.ts.map +1 -1
- package/dist/index25.d.cts +2 -2
- package/dist/index25.d.cts.map +1 -1
- package/dist/index25.d.ts +2 -2
- package/dist/index25.d.ts.map +1 -1
- package/dist/index26.d.cts +13 -13
- package/dist/index26.d.cts.map +1 -1
- package/dist/index26.d.ts +15 -15
- package/dist/index26.d.ts.map +1 -1
- package/dist/index27.d.cts +7 -7
- package/dist/index27.d.cts.map +1 -1
- package/dist/index27.d.ts +7 -7
- package/dist/index27.d.ts.map +1 -1
- package/dist/index28.d.cts +4 -4
- package/dist/index28.d.ts +6 -6
- package/dist/index28.d.ts.map +1 -1
- package/dist/index29.d.cts +4 -4
- package/dist/index29.d.cts.map +1 -1
- package/dist/index29.d.ts +4 -4
- 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 +42 -13
- package/dist/index30.d.cts.map +1 -1
- package/dist/index30.d.ts +43 -14
- package/dist/index30.d.ts.map +1 -1
- package/dist/index31.d.cts +5 -5
- package/dist/index31.d.cts.map +1 -1
- package/dist/index31.d.ts +6 -6
- package/dist/index31.d.ts.map +1 -1
- package/dist/index32.d.cts +6 -6
- package/dist/index32.d.cts.map +1 -1
- package/dist/index32.d.ts +6 -6
- package/dist/index33.d.cts +11 -11
- package/dist/index33.d.cts.map +1 -1
- package/dist/index33.d.ts +12 -12
- package/dist/index33.d.ts.map +1 -1
- package/dist/index34.d.cts +5 -5
- package/dist/index34.d.cts.map +1 -1
- package/dist/index34.d.ts +5 -5
- package/dist/index34.d.ts.map +1 -1
- package/dist/index35.d.cts +15 -15
- package/dist/index35.d.cts.map +1 -1
- package/dist/index35.d.ts +16 -16
- package/dist/index35.d.ts.map +1 -1
- package/dist/index36.d.cts +3 -3
- package/dist/index36.d.ts +3 -3
- package/dist/index36.d.ts.map +1 -1
- package/dist/index37.d.cts +5 -5
- package/dist/index37.d.ts +6 -6
- package/dist/index38.d.cts +2 -2
- package/dist/index38.d.ts +2 -2
- package/dist/index39.d.cts +17 -17
- package/dist/index39.d.cts.map +1 -1
- package/dist/index39.d.ts +17 -17
- package/dist/index39.d.ts.map +1 -1
- package/dist/index4.d.cts +2 -2
- package/dist/index4.d.ts +2 -2
- package/dist/index40.d.cts +5 -5
- package/dist/index40.d.cts.map +1 -1
- package/dist/index40.d.ts +6 -6
- package/dist/index40.d.ts.map +1 -1
- package/dist/index41.d.cts +11 -11
- package/dist/index41.d.cts.map +1 -1
- package/dist/index41.d.ts +11 -11
- package/dist/index41.d.ts.map +1 -1
- package/dist/index42.d.cts +8 -8
- package/dist/index42.d.cts.map +1 -1
- package/dist/index42.d.ts +8 -8
- package/dist/index42.d.ts.map +1 -1
- package/dist/index43.d.cts +9 -9
- package/dist/index43.d.cts.map +1 -1
- package/dist/index43.d.ts +9 -9
- package/dist/index43.d.ts.map +1 -1
- package/dist/index45.d.cts +8 -8
- package/dist/index45.d.cts.map +1 -1
- package/dist/index45.d.ts +8 -8
- package/dist/index45.d.ts.map +1 -1
- package/dist/index46.d.cts +2 -2
- package/dist/index46.d.cts.map +1 -1
- package/dist/index46.d.ts +2 -2
- package/dist/index46.d.ts.map +1 -1
- package/dist/index47.d.cts +4 -4
- package/dist/index47.d.cts.map +1 -1
- package/dist/index47.d.ts +4 -4
- package/dist/index47.d.ts.map +1 -1
- package/dist/index48.d.cts +4 -4
- package/dist/index48.d.cts.map +1 -1
- package/dist/index48.d.ts +4 -4
- package/dist/index48.d.ts.map +1 -1
- package/dist/index49.d.cts +3 -3
- package/dist/index49.d.ts +3 -3
- package/dist/index5.d.cts +7 -7
- package/dist/index5.d.ts +7 -7
- package/dist/index5.d.ts.map +1 -1
- package/dist/index50.d.cts +11 -11
- package/dist/index50.d.cts.map +1 -1
- package/dist/index50.d.ts +11 -11
- package/dist/index50.d.ts.map +1 -1
- package/dist/index51.d.cts +9 -9
- package/dist/index51.d.cts.map +1 -1
- package/dist/index51.d.ts +9 -9
- package/dist/index51.d.ts.map +1 -1
- package/dist/index52.d.cts +5 -5
- package/dist/index52.d.ts +5 -5
- package/dist/index53.d.cts +26 -26
- package/dist/index53.d.cts.map +1 -1
- package/dist/index53.d.ts +27 -27
- package/dist/index53.d.ts.map +1 -1
- package/dist/index54.d.cts +5 -5
- package/dist/index54.d.ts +5 -5
- package/dist/index54.d.ts.map +1 -1
- package/dist/index55.d.cts +2 -2
- package/dist/index55.d.cts.map +1 -1
- package/dist/index55.d.ts +2 -2
- package/dist/index56.d.cts +2 -2
- package/dist/index56.d.cts.map +1 -1
- package/dist/index56.d.ts +2 -2
- package/dist/index56.d.ts.map +1 -1
- package/dist/index57.d.cts +2 -2
- package/dist/index57.d.cts.map +1 -1
- package/dist/index57.d.ts +2 -2
- package/dist/index57.d.ts.map +1 -1
- package/dist/index58.d.cts +4 -4
- package/dist/index58.d.ts +4 -4
- package/dist/index58.d.ts.map +1 -1
- package/dist/index59.d.cts +9 -9
- package/dist/index59.d.ts +9 -9
- package/dist/index6.d.cts +6 -6
- package/dist/index6.d.cts.map +1 -1
- package/dist/index6.d.ts +6 -6
- package/dist/index6.d.ts.map +1 -1
- package/dist/index60.d.cts +9 -9
- package/dist/index60.d.cts.map +1 -1
- package/dist/index60.d.ts +13 -13
- package/dist/index60.d.ts.map +1 -1
- package/dist/index61.d.cts +5 -5
- package/dist/index61.d.ts +6 -6
- package/dist/index62.d.cts +5 -5
- package/dist/index62.d.ts +5 -5
- package/dist/index62.d.ts.map +1 -1
- package/dist/index63.d.cts +2 -2
- package/dist/index63.d.cts.map +1 -1
- package/dist/index63.d.ts +2 -2
- package/dist/index63.d.ts.map +1 -1
- package/dist/index64.d.cts +6 -6
- package/dist/index64.d.cts.map +1 -1
- package/dist/index64.d.ts +7 -7
- package/dist/index65.d.cts +3 -3
- package/dist/index65.d.ts +4 -4
- package/dist/index65.d.ts.map +1 -1
- package/dist/index66.d.cts +4 -4
- package/dist/index66.d.cts.map +1 -1
- package/dist/index66.d.ts +6 -6
- package/dist/index66.d.ts.map +1 -1
- package/dist/index67.d.cts +83 -11
- package/dist/index67.d.cts.map +1 -1
- package/dist/index67.d.ts +83 -11
- package/dist/index67.d.ts.map +1 -1
- package/dist/index68.d.cts +12 -30
- package/dist/index68.d.cts.map +1 -1
- package/dist/index68.d.ts +12 -30
- package/dist/index68.d.ts.map +1 -1
- package/dist/index69.d.cts +28 -27
- package/dist/index69.d.cts.map +1 -1
- package/dist/index69.d.ts +29 -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 +33 -78
- package/dist/index70.d.cts.map +1 -1
- package/dist/index70.d.ts +33 -78
- package/dist/index70.d.ts.map +1 -1
- package/dist/index71.d.cts +77 -258
- package/dist/index71.d.cts.map +1 -1
- package/dist/index71.d.ts +77 -258
- package/dist/index71.d.ts.map +1 -1
- package/dist/index72.d.cts +278 -0
- package/dist/index72.d.cts.map +1 -0
- package/dist/index72.d.ts +278 -0
- package/dist/index72.d.ts.map +1 -0
- package/dist/index8.d.cts +5 -5
- package/dist/index8.d.ts +5 -5
- package/dist/index8.d.ts.map +1 -1
- package/dist/index9.d.cts +2 -2
- package/dist/index9.d.cts.map +1 -1
- package/dist/index9.d.ts +2 -2
- package/dist/layouts/Container/index.cjs +2 -1
- package/dist/layouts/Container/index.cjs.map +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 +5 -4
- package/dist/layouts/index.d.ts +5 -4
- 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/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 +11 -11
- package/dist/patterns/MediaObject/index.d.ts +14 -14
- 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.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.ts +2 -2
- package/dist/patterns/SectionCard/index.d.ts.map +1 -1
- package/dist/patterns/SectionHeading/index.d.cts +2 -2
- package/dist/patterns/SectionHeading/index.d.ts +2 -2
- package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
- package/dist/patterns/index.d.cts +1 -1
- package/dist/patterns/index.d.ts +1 -1
- 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 +9 -2
- package/dist/primitives/Checkbox/index.cjs.map +1 -1
- package/dist/primitives/Checkbox/index.js +9 -2
- 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.js +6 -2
- package/dist/primitives/CheckboxTree/index.js.map +1 -1
- package/dist/primitives/Collapsible/index.cjs +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.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.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.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.js +3 -2
- package/dist/primitives/Dialog/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.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.js +1 -1
- package/dist/primitives/Field/index.cjs +1 -1
- package/dist/primitives/Field/index.js +1 -1
- package/dist/primitives/Form/index.cjs +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.js +1 -1
- package/dist/primitives/HoverCard/index.cjs +1 -1
- package/dist/primitives/HoverCard/index.js +1 -1
- package/dist/primitives/InfoBanner/index.cjs +6 -3
- package/dist/primitives/InfoBanner/index.cjs.map +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.js +1 -1
- package/dist/primitives/InputGroup/index.cjs +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.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.js +2 -2
- package/dist/primitives/Label/index.cjs +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.js +2 -2
- package/dist/primitives/Menubar/index.cjs +14 -4
- package/dist/primitives/Menubar/index.cjs.map +1 -1
- package/dist/primitives/Menubar/index.js +14 -4
- package/dist/primitives/Menubar/index.js.map +1 -1
- package/dist/primitives/NativeSelect/index.cjs +6 -3
- package/dist/primitives/NativeSelect/index.cjs.map +1 -1
- package/dist/primitives/NativeSelect/index.js +5 -3
- package/dist/primitives/NativeSelect/index.js.map +1 -1
- package/dist/primitives/NavigationMenu/index.cjs +5 -3
- package/dist/primitives/NavigationMenu/index.cjs.map +1 -1
- package/dist/primitives/NavigationMenu/index.js +5 -3
- package/dist/primitives/NavigationMenu/index.js.map +1 -1
- package/dist/primitives/Pagination/index.cjs +6 -2
- package/dist/primitives/Pagination/index.cjs.map +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.js +1 -1
- package/dist/primitives/Progress/index.cjs +1 -1
- package/dist/primitives/Progress/index.js +1 -1
- package/dist/primitives/RadioGroup/index.cjs +6 -2
- package/dist/primitives/RadioGroup/index.cjs.map +1 -1
- package/dist/primitives/RadioGroup/index.js +6 -2
- 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.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.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.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 +6 -2
- package/dist/primitives/Sheet/index.cjs.map +1 -1
- package/dist/primitives/Sheet/index.js +6 -2
- package/dist/primitives/Sheet/index.js.map +1 -1
- package/dist/primitives/Slider/index.cjs +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.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.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.js +1 -1
- package/dist/primitives/Tabs/index.cjs +2 -2
- 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.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.js +1 -1
- package/dist/primitives/Toggle/index.cjs +3 -2
- package/dist/primitives/Toggle/index.cjs.map +1 -1
- package/dist/primitives/Toggle/index.js +2 -2
- package/dist/primitives/ToggleGroup/index.cjs +1 -1
- package/dist/primitives/ToggleGroup/index.js +1 -1
- package/dist/primitives/Tooltip/index.cjs +1 -1
- package/dist/primitives/Tooltip/index.js +1 -1
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +1 -1
- package/package.json +2 -1
|
@@ -2,9 +2,9 @@ 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
4
|
const require_primitives_Label_index = require("../Label/index.cjs");
|
|
5
|
+
let class_variance_authority = require("class-variance-authority");
|
|
5
6
|
let react = require("react");
|
|
6
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
let class_variance_authority = require("class-variance-authority");
|
|
8
8
|
//#region src/primitives/Field/Field.tsx
|
|
9
9
|
/** A `<fieldset>` wrapper that groups related fields with consistent spacing. */
|
|
10
10
|
function FieldSet({ className, ...props }) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
2
|
import { Separator } from "../Separator/index.js";
|
|
3
3
|
import { Label } from "../Label/index.js";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
4
5
|
import { useMemo } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { cva } from "class-variance-authority";
|
|
7
7
|
//#region src/primitives/Field/Field.tsx
|
|
8
8
|
/** A `<fieldset>` wrapper that groups related fields with consistent spacing. */
|
|
9
9
|
function FieldSet({ className, ...props }) {
|
|
@@ -4,8 +4,8 @@ const require_cn = require("../../cn.cjs");
|
|
|
4
4
|
const require_primitives_Field_index = require("../Field/index.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_chunk.__toESM(react);
|
|
7
|
-
let radix_ui = require("radix-ui");
|
|
8
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let radix_ui = require("radix-ui");
|
|
9
9
|
let react_hook_form = require("react-hook-form");
|
|
10
10
|
//#region src/primitives/Form/Form.tsx
|
|
11
11
|
/** Root provider that shares one react-hook-form instance with all nested form pieces. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
2
|
import { Field, FieldDescription, FieldError, FieldLabel } from "../Field/index.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { Slot } from "radix-ui";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Slot } from "radix-ui";
|
|
6
6
|
import { Controller, FormProvider, useFormContext, useFormState } from "react-hook-form";
|
|
7
7
|
//#region src/primitives/Form/Form.tsx
|
|
8
8
|
/** Root provider that shares one react-hook-form instance with all nested form pieces. */
|
|
@@ -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/Heading/Heading.tsx
|
|
5
|
-
const headingVariants = (0,
|
|
6
|
+
const headingVariants = (0, class_variance_authority.cva)("font-heading text-balance", {
|
|
6
7
|
variants: {
|
|
7
8
|
size: {
|
|
8
9
|
"1": "text-[length:var(--heading-1-font-size)] leading-[var(--heading-1-line-height)] font-normal",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Heading/Heading.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Heading — display/section titles using the design-system HEADING scale\n// (Outfit): the Figma \"heading 1–7\" steps (tokens in styles/tokens/typography.css).\n// `size` drives the visual step (font-size + line-height + the spec's per-step\n// weight: 1–4 Regular, 5–7 Medium); `as` controls the semantic level\n// independently; `gradient` enables the brand gradient text fill.\nconst headingVariants = cva(\"font-heading text-balance\", {\n variants: {\n size: {\n \"1\": \"text-[length:var(--heading-1-font-size)] leading-[var(--heading-1-line-height)] font-normal\",\n \"2\": \"text-[length:var(--heading-2-font-size)] leading-[var(--heading-2-line-height)] font-normal\",\n \"3\": \"text-[length:var(--heading-3-font-size)] leading-[var(--heading-3-line-height)] font-normal\",\n \"4\": \"text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal\",\n \"5\": \"text-[length:var(--heading-5-font-size)] leading-[var(--heading-5-line-height)] font-medium\",\n \"6\": \"text-[length:var(--heading-6-font-size)] leading-[var(--heading-6-line-height)] font-medium\",\n \"7\": \"text-[length:var(--heading-7-font-size)] leading-[var(--heading-7-line-height)] font-medium\",\n },\n // Optional override of the per-step default weight.\n weight: {\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n },\n gradient: {\n true: \"bg-gradient-to-r from-[var(--theme-brand-700)] to-[var(--theme-brand-500-primary)] bg-clip-text text-transparent\",\n false: \"text-primary-txt\",\n },\n },\n defaultVariants: {\n size: \"2\",\n gradient: false,\n },\n});\n\ntype HeadingProps = React.ComponentProps<\"h2\"> &\n VariantProps<typeof headingVariants> & {\n /** Semantic heading level/element. Defaults to `h2`. */\n as?: React.ElementType;\n /** Visual step on the Figma heading scale (1 largest → 7 smallest); also sets the per-step default weight. */\n size?: VariantProps<typeof headingVariants>[\"size\"];\n /** Override the per-step default weight. */\n weight?: VariantProps<typeof headingVariants>[\"weight\"];\n /** Text alignment. */\n align?: VariantProps<typeof headingVariants>[\"align\"];\n /** When true, fills the text with the brand gradient instead of the foreground colour. */\n gradient?: VariantProps<typeof headingVariants>[\"gradient\"];\n };\n\n/** Display/section title using the design-system heading scale; `size` sets the visual step, `as` the semantic element. */\nfunction Heading({ as, className, size, weight, align, gradient, ...props }: HeadingProps) {\n const Comp = as ?? \"h2\";\n return (\n <Comp\n data-slot=\"heading\"\n className={cn(headingVariants({ size, weight, align, gradient }), className)}\n {...props}\n />\n );\n}\n\nexport { Heading, headingVariants, type HeadingProps };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Heading/Heading.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n// Heading — display/section titles using the design-system HEADING scale\n// (Outfit): the Figma \"heading 1–7\" steps (tokens in styles/tokens/typography.css).\n// `size` drives the visual step (font-size + line-height + the spec's per-step\n// weight: 1–4 Regular, 5–7 Medium); `as` controls the semantic level\n// independently; `gradient` enables the brand gradient text fill.\nconst headingVariants = cva(\"font-heading text-balance\", {\n variants: {\n size: {\n \"1\": \"text-[length:var(--heading-1-font-size)] leading-[var(--heading-1-line-height)] font-normal\",\n \"2\": \"text-[length:var(--heading-2-font-size)] leading-[var(--heading-2-line-height)] font-normal\",\n \"3\": \"text-[length:var(--heading-3-font-size)] leading-[var(--heading-3-line-height)] font-normal\",\n \"4\": \"text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal\",\n \"5\": \"text-[length:var(--heading-5-font-size)] leading-[var(--heading-5-line-height)] font-medium\",\n \"6\": \"text-[length:var(--heading-6-font-size)] leading-[var(--heading-6-line-height)] font-medium\",\n \"7\": \"text-[length:var(--heading-7-font-size)] leading-[var(--heading-7-line-height)] font-medium\",\n },\n // Optional override of the per-step default weight.\n weight: {\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n },\n gradient: {\n true: \"bg-gradient-to-r from-[var(--theme-brand-700)] to-[var(--theme-brand-500-primary)] bg-clip-text text-transparent\",\n false: \"text-primary-txt\",\n },\n },\n defaultVariants: {\n size: \"2\",\n gradient: false,\n },\n});\n\ntype HeadingProps = React.ComponentProps<\"h2\"> &\n VariantProps<typeof headingVariants> & {\n /** Semantic heading level/element. Defaults to `h2`. */\n as?: React.ElementType;\n /** Visual step on the Figma heading scale (1 largest → 7 smallest); also sets the per-step default weight. */\n size?: VariantProps<typeof headingVariants>[\"size\"];\n /** Override the per-step default weight. */\n weight?: VariantProps<typeof headingVariants>[\"weight\"];\n /** Text alignment. */\n align?: VariantProps<typeof headingVariants>[\"align\"];\n /** When true, fills the text with the brand gradient instead of the foreground colour. */\n gradient?: VariantProps<typeof headingVariants>[\"gradient\"];\n };\n\n/** Display/section title using the design-system heading scale; `size` sets the visual step, `as` the semantic element. */\nfunction Heading({ as, className, size, weight, align, gradient, ...props }: HeadingProps) {\n const Comp = as ?? \"h2\";\n return (\n <Comp\n data-slot=\"heading\"\n className={cn(headingVariants({ size, weight, align, gradient }), className)}\n {...props}\n />\n );\n}\n\nexport { Heading, headingVariants, type HeadingProps };\n"],"mappings":";;;;;AAUA,MAAM,mBAAA,GAAA,yBAAA,KAAsB,6BAA6B;CACvD,UAAU;EACR,MAAM;GACJ,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;GACL,KAAK;EACP;EAEA,QAAQ;GACN,QAAQ;GACR,QAAQ;GACR,UAAU;EACZ;EACA,OAAO;GACL,MAAM;GACN,QAAQ;GACR,OAAO;EACT;EACA,UAAU;GACR,MAAM;GACN,OAAO;EACT;CACF;CACA,iBAAiB;EACf,MAAM;EACN,UAAU;CACZ;AACF,CAAC;;AAiBD,SAAS,QAAQ,EAAE,IAAI,WAAW,MAAM,QAAQ,OAAO,UAAU,GAAG,SAAuB;CAEzF,OACE,iBAAA,GAAA,kBAAA,KAFW,MAAM,MAEjB;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,gBAAgB;GAAE;GAAM;GAAQ;GAAO;EAAS,CAAC,GAAG,SAAS;EAC3E,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -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/Heading/Heading.tsx
|
|
5
5
|
const headingVariants = cva("font-heading text-balance", {
|
|
6
6
|
variants: {
|
|
@@ -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/HoverCard/HoverCard.tsx
|
|
6
6
|
/** Root that reveals a floating card when the user hovers (or focuses) the trigger. */
|
|
7
7
|
function HoverCard({ ...props }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
-
import { HoverCard as HoverCard$1 } from "radix-ui";
|
|
3
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { HoverCard as HoverCard$1 } from "radix-ui";
|
|
4
4
|
//#region src/primitives/HoverCard/HoverCard.tsx
|
|
5
5
|
/** Root that reveals a floating card when the user hovers (or focuses) the trigger. */
|
|
6
6
|
function HoverCard({ ...props }) {
|
|
@@ -1,10 +1,12 @@
|
|
|
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 class_variance_authority = require("class-variance-authority");
|
|
3
5
|
let react = require("react");
|
|
4
|
-
let lucide_react = require("lucide-react");
|
|
5
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let lucide_react = require("lucide-react");
|
|
6
8
|
//#region src/primitives/InfoBanner/InfoBanner.tsx
|
|
7
|
-
const infoBannerVariants = (0,
|
|
9
|
+
const infoBannerVariants = (0, class_variance_authority.cva)("flex w-full gap-4 rounded-12 px-4 py-3", {
|
|
8
10
|
variants: { variant: {
|
|
9
11
|
info: "bg-info-bg text-info-txt",
|
|
10
12
|
success: "bg-success-bg text-success-txt",
|
|
@@ -63,7 +65,8 @@ function InfoBanner({ title, description, variant, icon, dismissible = true, vis
|
|
|
63
65
|
"aria-label": "Dismiss",
|
|
64
66
|
onClick: handleDismiss,
|
|
65
67
|
className: "-mr-2 flex size-8 shrink-0 items-center justify-center rounded-8 text-primary-txt transition-colors hover:bg-primary-txt/5",
|
|
66
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
68
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
69
|
+
as: lucide_react.X,
|
|
67
70
|
"data-slot": "info-banner-dismiss-icon",
|
|
68
71
|
className: "size-4",
|
|
69
72
|
"aria-hidden": "true"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["Info","CircleCheck","TriangleAlert","CircleAlert","cn","X"],"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.cjs","names":["Info","CircleCheck","TriangleAlert","CircleAlert","cn","Icon","X"],"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,sBAAA,GAAA,yBAAA,KAAyB,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,MAAMA,aAAAA;CACN,SAASC,aAAAA;CACT,SAASC,aAAAA;CACT,OAAOC,aAAAA;CACP,SAASH,aAAAA;AACX;;AAqBA,SAAS,WAAW,EAClB,OACA,aACA,SACA,MACA,cAAc,MACd,SACA,WACA,WACA,GAAG,SACe;CAClB,MAAM,CAAC,iBAAiB,uBAAA,GAAA,MAAA,UAA+B,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,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,aAAU;EACV,gBAAc,WAAW;EACzB,MAAK;EACL,WAAWI,WAAAA,GACT,mBAAmB,EAAE,QAAQ,CAAC,GAE9B,eACA,SACF;EACA,GAAI;YAVN;GAaE,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAAmB,WAAU;IAAkB,eAAY;cACxE,QAAQ,iBAAA,GAAA,kBAAA,KAAC,aAAD,EAAa,WAAU,SAAU,CAAA;GACtC,CAAA;GAEN,iBAAA,GAAA,kBAAA,MAAC,OAAD;IAAK,aAAU;IAAsB,WAAU;cAA/C,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;KACE,aAAU;KACV,WAAU;eAET;IACG,CAAA,GACL,eAAe,QACd,iBAAA,GAAA,kBAAA,KAAC,QAAD;KACE,aAAU;KACV,WAAU;eAET;IACG,CAAA,CAEL;;GAEJ,eACC,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,aAAU;IACV,MAAK;IACL,cAAW;IACX,SAAS;IACT,WAAU;cAEV,iBAAA,GAAA,kBAAA,KAACC,aAAAA,MAAD;KAAM,IAAIC,aAAAA;KAAG,aAAU;KAA2B,WAAU;KAAS,eAAY;IAAQ,CAAA;GACnF,CAAA;EAEP;;AAET"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { t as cn } from "../../cn.js";
|
|
2
|
+
import { t as Icon } from "../../Icon.js";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
2
4
|
import { useState } from "react";
|
|
3
|
-
import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from "lucide-react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
+
import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from "lucide-react";
|
|
6
7
|
//#region src/primitives/InfoBanner/InfoBanner.tsx
|
|
7
8
|
const infoBannerVariants = cva("flex w-full gap-4 rounded-12 px-4 py-3", {
|
|
8
9
|
variants: { variant: {
|
|
@@ -63,7 +64,8 @@ function InfoBanner({ title, description, variant, icon, dismissible = true, vis
|
|
|
63
64
|
"aria-label": "Dismiss",
|
|
64
65
|
onClick: handleDismiss,
|
|
65
66
|
className: "-mr-2 flex size-8 shrink-0 items-center justify-center rounded-8 text-primary-txt transition-colors hover:bg-primary-txt/5",
|
|
66
|
-
children: /* @__PURE__ */ jsx(
|
|
67
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
68
|
+
as: X,
|
|
67
69
|
"data-slot": "info-banner-dismiss-icon",
|
|
68
70
|
className: "size-4",
|
|
69
71
|
"aria-hidden": "true"
|
|
@@ -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,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 }) {
|
|
@@ -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,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,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,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,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,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,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. */
|