@psnext/design-system 1.2.0 → 1.2.1
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/dist/Header.cjs +2 -2
- package/dist/Header.cjs.map +1 -1
- package/dist/Header.js +2 -2
- package/dist/Header.js.map +1 -1
- package/dist/Icon.cjs +8 -8
- package/dist/Icon.cjs.map +1 -1
- package/dist/Icon.js +8 -8
- package/dist/Icon.js.map +1 -1
- package/dist/Logo.cjs +163 -137
- package/dist/Logo.cjs.map +1 -1
- package/dist/Logo.js +163 -137
- package/dist/Logo.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/index10.d.cts +7 -7
- package/dist/index10.d.cts.map +1 -1
- package/dist/index10.d.ts +6 -6
- package/dist/index10.d.ts.map +1 -1
- package/dist/index11.d.cts +3 -3
- package/dist/index11.d.ts +3 -3
- package/dist/index11.d.ts.map +1 -1
- package/dist/index12.d.cts +12 -12
- package/dist/index12.d.ts +11 -11
- package/dist/index12.d.ts.map +1 -1
- package/dist/index13.d.cts +6 -6
- package/dist/index13.d.ts +6 -6
- package/dist/index13.d.ts.map +1 -1
- package/dist/index14.d.cts +5 -5
- package/dist/index14.d.ts +5 -5
- package/dist/index15.d.cts +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/index17.d.ts.map +1 -1
- 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.ts +10 -10
- package/dist/index2.d.cts +8 -8
- package/dist/index2.d.cts.map +1 -1
- package/dist/index2.d.ts +8 -8
- package/dist/index20.d.cts +16 -16
- 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.ts +4 -4
- package/dist/index21.d.ts.map +1 -1
- package/dist/index22.d.cts +11 -11
- package/dist/index22.d.cts.map +1 -1
- package/dist/index22.d.ts +11 -11
- package/dist/index23.d.cts +16 -16
- package/dist/index23.d.ts +16 -16
- package/dist/index24.d.cts +10 -10
- package/dist/index24.d.ts +10 -10
- package/dist/index25.d.cts +2 -2
- package/dist/index25.d.cts.map +1 -1
- package/dist/index25.d.ts +2 -2
- package/dist/index26.d.cts +14 -14
- package/dist/index26.d.cts.map +1 -1
- package/dist/index26.d.ts +11 -11
- package/dist/index27.d.cts +7 -7
- package/dist/index27.d.cts.map +1 -1
- package/dist/index27.d.ts +7 -7
- 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/index3.d.cts +13 -13
- package/dist/index3.d.cts.map +1 -1
- package/dist/index3.d.ts +13 -13
- package/dist/index3.d.ts.map +1 -1
- package/dist/index30.d.cts +6 -6
- package/dist/index30.d.cts.map +1 -1
- package/dist/index30.d.ts +5 -5
- package/dist/index30.d.ts.map +1 -1
- package/dist/index31.d.cts +5 -5
- package/dist/index31.d.ts +5 -5
- package/dist/index31.d.ts.map +1 -1
- package/dist/index32.d.cts +6 -6
- package/dist/index32.d.ts +3 -3
- package/dist/index33.d.cts +10 -10
- package/dist/index33.d.cts.map +1 -1
- package/dist/index33.d.ts +10 -10
- 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/index35.d.cts +16 -16
- package/dist/index35.d.cts.map +1 -1
- package/dist/index35.d.ts +14 -14
- package/dist/index35.d.ts.map +1 -1
- package/dist/index36.d.cts +3 -3
- package/dist/index36.d.ts +3 -3
- package/dist/index37.d.cts +4 -4
- package/dist/index37.d.cts.map +1 -1
- package/dist/index37.d.ts +5 -5
- package/dist/index37.d.ts.map +1 -1
- 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.ts +17 -17
- package/dist/index4.d.cts +2 -2
- package/dist/index4.d.cts.map +1 -1
- package/dist/index4.d.ts +2 -2
- package/dist/index40.d.cts +5 -5
- package/dist/index40.d.cts.map +1 -1
- package/dist/index40.d.ts +4 -4
- package/dist/index41.d.cts +11 -11
- package/dist/index41.d.ts +11 -11
- package/dist/index42.d.cts +8 -8
- 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/index44.d.cts +8 -8
- package/dist/index44.d.cts.map +1 -1
- package/dist/index44.d.ts +8 -8
- package/dist/index44.d.ts.map +1 -1
- package/dist/index45.d.cts +2 -2
- package/dist/index45.d.cts.map +1 -1
- package/dist/index45.d.ts +2 -2
- package/dist/index45.d.ts.map +1 -1
- package/dist/index46.d.cts +4 -4
- package/dist/index46.d.ts +4 -4
- 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 +3 -3
- package/dist/index48.d.ts +3 -3
- package/dist/index49.d.cts +11 -11
- package/dist/index49.d.cts.map +1 -1
- package/dist/index49.d.ts +11 -11
- package/dist/index5.d.cts +7 -7
- package/dist/index5.d.cts.map +1 -1
- package/dist/index5.d.ts +7 -7
- package/dist/index5.d.ts.map +1 -1
- package/dist/index50.d.cts +9 -9
- package/dist/index50.d.ts +9 -9
- package/dist/index50.d.ts.map +1 -1
- package/dist/index51.d.cts +5 -5
- package/dist/index51.d.ts +5 -5
- package/dist/index52.d.cts +27 -27
- package/dist/index52.d.cts.map +1 -1
- package/dist/index52.d.ts +26 -26
- package/dist/index53.d.cts +5 -5
- package/dist/index53.d.ts +5 -5
- package/dist/index53.d.ts.map +1 -1
- package/dist/index54.d.cts +2 -2
- package/dist/index54.d.ts +2 -2
- package/dist/index55.d.cts +2 -2
- package/dist/index55.d.ts +2 -2
- package/dist/index55.d.ts.map +1 -1
- package/dist/index56.d.cts +2 -2
- package/dist/index56.d.ts +2 -2
- package/dist/index57.d.cts +4 -4
- package/dist/index57.d.ts +4 -4
- package/dist/index58.d.cts +9 -9
- package/dist/index58.d.ts +9 -9
- package/dist/index59.d.cts +11 -11
- package/dist/index59.d.cts.map +1 -1
- package/dist/index59.d.ts +9 -9
- package/dist/index6.d.cts +5 -5
- package/dist/index6.d.cts.map +1 -1
- package/dist/index6.d.ts +5 -5
- package/dist/index6.d.ts.map +1 -1
- package/dist/index60.d.cts +5 -5
- package/dist/index60.d.cts.map +1 -1
- package/dist/index60.d.ts +6 -6
- package/dist/index60.d.ts.map +1 -1
- package/dist/index61.d.cts +4 -4
- package/dist/index61.d.cts.map +1 -1
- package/dist/index61.d.ts +4 -4
- package/dist/index62.d.cts +2 -2
- package/dist/index62.d.ts +2 -2
- package/dist/index63.d.cts +6 -6
- package/dist/index63.d.ts +5 -5
- package/dist/index63.d.ts.map +1 -1
- package/dist/index64.d.cts +3 -3
- package/dist/index64.d.ts +3 -3
- package/dist/index65.d.cts +4 -4
- package/dist/index65.d.cts.map +1 -1
- package/dist/index65.d.ts +4 -4
- package/dist/index65.d.ts.map +1 -1
- package/dist/index66.d.cts +2 -2
- package/dist/index66.d.ts +2 -2
- package/dist/index67.d.cts +8 -8
- package/dist/index67.d.cts.map +1 -1
- package/dist/index67.d.ts +6 -6
- package/dist/index67.d.ts.map +1 -1
- package/dist/index68.d.cts +7 -7
- package/dist/index68.d.ts +6 -6
- package/dist/index68.d.ts.map +1 -1
- package/dist/index7.d.cts +8 -8
- package/dist/index7.d.ts +8 -8
- package/dist/index7.d.ts.map +1 -1
- package/dist/index70.d.cts +8 -8
- package/dist/index70.d.ts +8 -8
- package/dist/index8.d.cts +4 -4
- package/dist/index8.d.ts +2 -2
- package/dist/index9.d.cts +2 -2
- package/dist/index9.d.ts +2 -2
- package/dist/layouts/Container/index.cjs +1 -1
- package/dist/layouts/Container/index.cjs.map +1 -1
- package/dist/layouts/Container/index.js +1 -1
- package/dist/layouts/Container/index.js.map +1 -1
- package/dist/layouts/PageBackground/index.cjs +1 -1
- package/dist/layouts/PageBackground/index.cjs.map +1 -1
- package/dist/layouts/PageBackground/index.js +1 -1
- package/dist/layouts/PageBackground/index.js.map +1 -1
- package/dist/patterns/DataTable/index.d.cts +3 -3
- package/dist/patterns/DataTable/index.d.ts +3 -3
- package/dist/patterns/Footer/index.cjs +1 -1
- package/dist/patterns/Footer/index.cjs.map +1 -1
- package/dist/patterns/Footer/index.d.cts +8 -8
- package/dist/patterns/Footer/index.d.cts.map +1 -1
- package/dist/patterns/Footer/index.d.ts +8 -8
- package/dist/patterns/Footer/index.d.ts.map +1 -1
- package/dist/patterns/Footer/index.js +1 -1
- package/dist/patterns/Footer/index.js.map +1 -1
- package/dist/patterns/MediaObject/index.d.cts +11 -11
- package/dist/patterns/MediaObject/index.d.ts +11 -11
- package/dist/patterns/SectionCard/index.d.cts +2 -2
- package/dist/patterns/SectionCard/index.d.ts +2 -2
- package/dist/patterns/SectionHeading/index.d.cts +2 -2
- package/dist/patterns/SectionHeading/index.d.ts +2 -2
- package/dist/primitives/Accordion/index.cjs +1 -1
- package/dist/primitives/Accordion/index.cjs.map +1 -1
- package/dist/primitives/Accordion/index.js +1 -1
- package/dist/primitives/Accordion/index.js.map +1 -1
- package/dist/primitives/Alert/index.cjs +2 -2
- package/dist/primitives/Alert/index.cjs.map +1 -1
- package/dist/primitives/Alert/index.js +2 -2
- package/dist/primitives/Alert/index.js.map +1 -1
- package/dist/primitives/AlertDialog/index.cjs +2 -2
- package/dist/primitives/AlertDialog/index.cjs.map +1 -1
- package/dist/primitives/AlertDialog/index.js +2 -2
- package/dist/primitives/AlertDialog/index.js.map +1 -1
- package/dist/primitives/Avatar/index.cjs +2 -2
- package/dist/primitives/Avatar/index.cjs.map +1 -1
- package/dist/primitives/Avatar/index.js +2 -2
- package/dist/primitives/Avatar/index.js.map +1 -1
- package/dist/primitives/Badge/index.cjs +4 -4
- package/dist/primitives/Badge/index.cjs.map +1 -1
- package/dist/primitives/Badge/index.js +4 -4
- package/dist/primitives/Badge/index.js.map +1 -1
- package/dist/primitives/Button/index.cjs +5 -5
- package/dist/primitives/Button/index.cjs.map +1 -1
- package/dist/primitives/Button/index.js +5 -5
- package/dist/primitives/Button/index.js.map +1 -1
- package/dist/primitives/ButtonGroup/index.cjs +2 -2
- package/dist/primitives/ButtonGroup/index.cjs.map +1 -1
- package/dist/primitives/ButtonGroup/index.js +2 -2
- package/dist/primitives/ButtonGroup/index.js.map +1 -1
- package/dist/primitives/Calendar/index.cjs +1 -1
- package/dist/primitives/Calendar/index.cjs.map +1 -1
- package/dist/primitives/Calendar/index.js +1 -1
- package/dist/primitives/Calendar/index.js.map +1 -1
- package/dist/primitives/Card/index.cjs +4 -4
- package/dist/primitives/Card/index.cjs.map +1 -1
- package/dist/primitives/Card/index.js +4 -4
- package/dist/primitives/Card/index.js.map +1 -1
- package/dist/primitives/Chart/index.cjs +1 -1
- package/dist/primitives/Chart/index.cjs.map +1 -1
- package/dist/primitives/Chart/index.js +1 -1
- package/dist/primitives/Chart/index.js.map +1 -1
- package/dist/primitives/Checkbox/index.cjs +1 -1
- package/dist/primitives/Checkbox/index.cjs.map +1 -1
- package/dist/primitives/Checkbox/index.js +1 -1
- package/dist/primitives/Checkbox/index.js.map +1 -1
- package/dist/primitives/Command/index.cjs +1 -1
- package/dist/primitives/Command/index.cjs.map +1 -1
- package/dist/primitives/Command/index.js +1 -1
- package/dist/primitives/Command/index.js.map +1 -1
- package/dist/primitives/ContextMenu/index.cjs +1 -1
- package/dist/primitives/ContextMenu/index.cjs.map +1 -1
- package/dist/primitives/ContextMenu/index.js +1 -1
- package/dist/primitives/ContextMenu/index.js.map +1 -1
- package/dist/primitives/Credits/index.cjs +1 -1
- package/dist/primitives/Credits/index.cjs.map +1 -1
- package/dist/primitives/Credits/index.js +1 -1
- package/dist/primitives/Credits/index.js.map +1 -1
- package/dist/primitives/Dialog/index.cjs +2 -2
- package/dist/primitives/Dialog/index.cjs.map +1 -1
- package/dist/primitives/Dialog/index.js +2 -2
- package/dist/primitives/Dialog/index.js.map +1 -1
- package/dist/primitives/Drawer/index.cjs +1 -1
- package/dist/primitives/Drawer/index.cjs.map +1 -1
- package/dist/primitives/Drawer/index.js +1 -1
- package/dist/primitives/Drawer/index.js.map +1 -1
- package/dist/primitives/DropdownMenu/index.cjs +1 -1
- package/dist/primitives/DropdownMenu/index.cjs.map +1 -1
- package/dist/primitives/DropdownMenu/index.js +1 -1
- package/dist/primitives/DropdownMenu/index.js.map +1 -1
- package/dist/primitives/Field/index.cjs +1 -1
- package/dist/primitives/Field/index.cjs.map +1 -1
- package/dist/primitives/Field/index.js +1 -1
- package/dist/primitives/Field/index.js.map +1 -1
- package/dist/primitives/HoverCard/index.cjs +1 -1
- package/dist/primitives/HoverCard/index.cjs.map +1 -1
- package/dist/primitives/HoverCard/index.js +1 -1
- package/dist/primitives/HoverCard/index.js.map +1 -1
- package/dist/primitives/Input/index.cjs +4 -4
- package/dist/primitives/Input/index.cjs.map +1 -1
- package/dist/primitives/Input/index.js +4 -4
- package/dist/primitives/Input/index.js.map +1 -1
- package/dist/primitives/InputGroup/index.cjs +6 -6
- package/dist/primitives/InputGroup/index.cjs.map +1 -1
- package/dist/primitives/InputGroup/index.js +6 -6
- package/dist/primitives/InputGroup/index.js.map +1 -1
- package/dist/primitives/InputOtp/index.cjs +1 -1
- package/dist/primitives/InputOtp/index.cjs.map +1 -1
- package/dist/primitives/InputOtp/index.js +1 -1
- package/dist/primitives/InputOtp/index.js.map +1 -1
- package/dist/primitives/Item/index.cjs +2 -2
- package/dist/primitives/Item/index.cjs.map +1 -1
- package/dist/primitives/Item/index.js +2 -2
- package/dist/primitives/Item/index.js.map +1 -1
- package/dist/primitives/Kbd/index.cjs +1 -1
- package/dist/primitives/Kbd/index.cjs.map +1 -1
- package/dist/primitives/Kbd/index.js +1 -1
- package/dist/primitives/Kbd/index.js.map +1 -1
- package/dist/primitives/Menubar/index.cjs +1 -1
- package/dist/primitives/Menubar/index.cjs.map +1 -1
- package/dist/primitives/Menubar/index.js +1 -1
- package/dist/primitives/Menubar/index.js.map +1 -1
- package/dist/primitives/NativeSelect/index.cjs +1 -1
- package/dist/primitives/NativeSelect/index.cjs.map +1 -1
- package/dist/primitives/NativeSelect/index.js +1 -1
- package/dist/primitives/NativeSelect/index.js.map +1 -1
- package/dist/primitives/NavRail/index.cjs +2 -2
- package/dist/primitives/NavRail/index.cjs.map +1 -1
- package/dist/primitives/NavRail/index.js +2 -2
- package/dist/primitives/NavRail/index.js.map +1 -1
- package/dist/primitives/NavigationMenu/index.cjs +1 -1
- package/dist/primitives/NavigationMenu/index.cjs.map +1 -1
- package/dist/primitives/NavigationMenu/index.js +1 -1
- package/dist/primitives/NavigationMenu/index.js.map +1 -1
- package/dist/primitives/Popover/index.cjs +1 -1
- package/dist/primitives/Popover/index.cjs.map +1 -1
- package/dist/primitives/Popover/index.js +1 -1
- package/dist/primitives/Popover/index.js.map +1 -1
- package/dist/primitives/Progress/index.cjs +1 -1
- package/dist/primitives/Progress/index.cjs.map +1 -1
- package/dist/primitives/Progress/index.js +1 -1
- package/dist/primitives/Progress/index.js.map +1 -1
- package/dist/primitives/RadioGroup/index.cjs +1 -1
- package/dist/primitives/RadioGroup/index.cjs.map +1 -1
- package/dist/primitives/RadioGroup/index.js +1 -1
- package/dist/primitives/RadioGroup/index.js.map +1 -1
- package/dist/primitives/ScrollArea/index.cjs +1 -1
- package/dist/primitives/ScrollArea/index.cjs.map +1 -1
- package/dist/primitives/ScrollArea/index.js +1 -1
- package/dist/primitives/ScrollArea/index.js.map +1 -1
- package/dist/primitives/Select/index.cjs +1 -1
- package/dist/primitives/Select/index.cjs.map +1 -1
- package/dist/primitives/Select/index.js +1 -1
- package/dist/primitives/Select/index.js.map +1 -1
- package/dist/primitives/Skeleton/index.cjs +2 -2
- package/dist/primitives/Skeleton/index.cjs.map +1 -1
- package/dist/primitives/Skeleton/index.js +2 -2
- package/dist/primitives/Skeleton/index.js.map +1 -1
- package/dist/primitives/Slider/index.cjs +1 -1
- package/dist/primitives/Slider/index.cjs.map +1 -1
- package/dist/primitives/Slider/index.js +1 -1
- package/dist/primitives/Slider/index.js.map +1 -1
- package/dist/primitives/Sonner/index.cjs +1 -1
- package/dist/primitives/Sonner/index.cjs.map +1 -1
- package/dist/primitives/Sonner/index.js +1 -1
- package/dist/primitives/Sonner/index.js.map +1 -1
- package/dist/primitives/Switch/index.cjs +3 -3
- package/dist/primitives/Switch/index.cjs.map +1 -1
- package/dist/primitives/Switch/index.js +3 -3
- package/dist/primitives/Switch/index.js.map +1 -1
- package/dist/primitives/Table/index.cjs +3 -3
- package/dist/primitives/Table/index.cjs.map +1 -1
- package/dist/primitives/Table/index.js +3 -3
- package/dist/primitives/Table/index.js.map +1 -1
- package/dist/primitives/Tabs/index.cjs +4 -4
- package/dist/primitives/Tabs/index.cjs.map +1 -1
- package/dist/primitives/Tabs/index.js +4 -4
- package/dist/primitives/Tabs/index.js.map +1 -1
- package/dist/primitives/Textarea/index.cjs +2 -2
- package/dist/primitives/Textarea/index.cjs.map +1 -1
- package/dist/primitives/Textarea/index.js +2 -2
- package/dist/primitives/Textarea/index.js.map +1 -1
- package/dist/primitives/Toggle/index.cjs +2 -2
- package/dist/primitives/Toggle/index.cjs.map +1 -1
- package/dist/primitives/Toggle/index.js +2 -2
- package/dist/primitives/Toggle/index.js.map +1 -1
- package/dist/primitives/Tooltip/index.cjs +2 -2
- package/dist/primitives/Tooltip/index.cjs.map +1 -1
- package/dist/primitives/Tooltip/index.js +2 -2
- package/dist/primitives/Tooltip/index.js.map +1 -1
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.js +1 -1
- package/dist/styles/semantic.css +23 -12
- package/dist/styles/theme.css +32 -1
- package/dist/styles/tokens/border-radius.css +2 -1
- package/dist/styles/tokens/mode-dark.css +1 -1
- package/package.json +7 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Alert/Alert.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../utils\";\n\nconst alertVariants = cva(\n cn(\n \"relative flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-sm\",\n \"[&>svg]:order-1 [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n // `flipIcon` moves the icon to the trailing edge (Figma \"Flip Icon\").\n \"data-[flip-icon=true]:[&>svg]:order-3\",\n ),\n {\n variants: {\n variant: {\n default: \"bg-card text-
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Alert/Alert.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../utils\";\n\nconst alertVariants = cva(\n cn(\n \"relative flex w-full items-start gap-3 rounded-lg border px-4 py-3 text-sm\",\n \"[&>svg]:order-1 [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n // `flipIcon` moves the icon to the trailing edge (Figma \"Flip Icon\").\n \"data-[flip-icon=true]:[&>svg]:order-3\",\n ),\n {\n variants: {\n variant: {\n default: \"bg-card text-foreground\",\n destructive:\n \"text-destructive-foreground bg-card [&_[data-slot=alert-description]]:text-destructive-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\n/** Callout banner for surfacing contextual messages, statuses, and errors. */\nfunction Alert({\n className,\n variant,\n flipIcon = false,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof alertVariants> & {\n /** Visual tone of the alert. */\n variant?: VariantProps<typeof alertVariants>[\"variant\"];\n /** Moves the leading icon to the trailing edge (Figma \"Flip Icon\"). */\n flipIcon?: boolean;\n }) {\n return (\n <div\n data-slot=\"alert\"\n data-flip-icon={flipIcon}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\n/** Wraps the title + description so the icon and action can sit beside them. */\nfunction AlertContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-content\"\n className={cn(\"order-2 flex min-w-0 flex-1 flex-col gap-0.5\", className)}\n {...props}\n />\n );\n}\n\n/** Primary heading line of the alert. */\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"h5\">) {\n return (\n <h5\n data-slot=\"alert-title\"\n className={cn(\"min-h-4 font-medium tracking-tight\", className)}\n {...props}\n />\n );\n}\n\n/** Secondary supporting text shown beneath the title. */\nfunction AlertDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\"text-muted-foreground text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n );\n}\n\n/** Trailing action slot (Figma \"Show Button\"); always sits at the trailing edge. */\nfunction AlertAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-action\"\n className={cn(\"order-4 flex shrink-0 items-center self-center\", className)}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription, AlertContent, AlertAction };\n"],"mappings":";;;;AAKA,MAAM,gBAAgB,IACpB,GACE,8EACA,gGAEA,uCACF,GACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,aACE;CACJ,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;;AAGA,SAAS,MAAM,EACb,WACA,SACA,WAAW,OACX,GAAG,SAOA;CACH,OACE,oBAAC,OAAD;EACE,aAAU;EACV,kBAAgB;EAChB,MAAK;EACL,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;EACnD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,gDAAgD,SAAS;EACvE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAqC;CACvE,OACE,oBAAC,MAAD;EACE,aAAU;EACV,WAAW,GAAG,sCAAsC,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAsC;CAC9E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,uDAAuD,SAAS;EAC9E,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,kDAAkD,SAAS;EACzE,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -34,7 +34,7 @@ function AlertDialogContent({ className, size = "default", ...props }) {
|
|
|
34
34
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AlertDialogPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertDialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Content, {
|
|
35
35
|
"data-slot": "alert-dialog-content",
|
|
36
36
|
"data-size": size,
|
|
37
|
-
className: require_cn.cn("group/alert-dialog-content bg-background fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 rounded-
|
|
37
|
+
className: require_cn.cn("group/alert-dialog-content bg-background fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 rounded-2xl border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[size=default]:sm:max-w-sm data-[size=large]:sm:max-w-lg", className),
|
|
38
38
|
...props
|
|
39
39
|
})] });
|
|
40
40
|
}
|
|
@@ -55,7 +55,7 @@ function AlertDialogFooter({ className, ...props }) {
|
|
|
55
55
|
function AlertDialogTitle({ className, ...props }) {
|
|
56
56
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Title, {
|
|
57
57
|
"data-slot": "alert-dialog-title",
|
|
58
|
-
className: require_cn.cn("text-
|
|
58
|
+
className: require_cn.cn("font-heading text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal", className),
|
|
59
59
|
...props
|
|
60
60
|
});
|
|
61
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["AlertDialogPrimitive","cn","buttonVariants"],"sources":["../../../src/primitives/AlertDialog/AlertDialog.tsx"],"sourcesContent":["import { AlertDialog as AlertDialogPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\nimport { buttonVariants } from \"../Button\";\n\n/** A modal confirmation dialog that interrupts the user and expects a deliberate response. */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n /** Layout preset: `default` is compact + centered, `large` is wide + left-aligned. */\n size?: \"default\" | \"large\";\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content bg-background fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 rounded-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["AlertDialogPrimitive","cn","buttonVariants"],"sources":["../../../src/primitives/AlertDialog/AlertDialog.tsx"],"sourcesContent":["import { AlertDialog as AlertDialogPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\nimport { buttonVariants } from \"../Button\";\n\n/** A modal confirmation dialog that interrupts the user and expects a deliberate response. */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n /** Layout preset: `default` is compact + centered, `large` is wide + left-aligned. */\n size?: \"default\" | \"large\";\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content bg-background fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 rounded-2xl border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n // Width by size: default = compact / centered, large = wide / left-aligned.\n \"data-[size=default]:sm:max-w-sm data-[size=large]:sm:max-w-lg\",\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"flex flex-col gap-2\",\n \"group-data-[size=default]/alert-dialog-content:items-center group-data-[size=default]/alert-dialog-content:text-center\",\n \"group-data-[size=large]/alert-dialog-content:text-left\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"flex gap-2\",\n // default: buttons share the width side-by-side; large: trailing-aligned.\n \"group-data-[size=default]/alert-dialog-content:flex-row group-data-[size=default]/alert-dialog-content:[&>*]:flex-1\",\n \"group-data-[size=large]/alert-dialog-content:flex-row group-data-[size=large]/alert-dialog-content:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"font-heading text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\n// Small icon slot — centered for the default size, leading for large.\nfunction AlertDialogMedia({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"flex items-center [&>svg]:size-5\",\n \"group-data-[size=default]/alert-dialog-content:justify-center\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action> & {\n /** Button style for the confirming action; use `destructive` for irreversible actions. */\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant: \"outline\" }), className)}\n {...props}\n />\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":";;;;;;;AAOA,SAAS,YAAY,EAAE,GAAG,SAAiE;CACzF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,mBAAmB,EAC1B,GAAG,SACyD;CAC5D,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;AAEA,SAAS,kBAAkB,EAAE,GAAG,SAAmE;CACjG,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,QAAtB;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;AAEA,SAAS,mBAAmB,EAC1B,WACA,GAAG,SACyD;CAC5D,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,YAAqB,SAAtB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,kKACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAC1B,WACA,OAAO,WACP,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,MAAC,mBAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAC,oBAAD,CAAqB,CAAA,GACrB,iBAAA,GAAA,kBAAA,KAACD,SAAAA,YAAqB,SAAtB;EACE,aAAU;EACV,aAAW;EACX,WAAWC,WAAAA,GACT,wYAEA,iEACA,SACF;EACA,GAAI;CACL,CAAA,CACgB,EAAA,CAAA;AAEvB;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAsC;CAC/E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,uBACA,0HACA,0DACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAsC;CAC/E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,cAEA,uHACA,kHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,YAAqB,OAAtB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,4GACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,YAAqB,aAAtB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAGA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAsC;CAC9E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,oCACA,iEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,UAAU,WACV,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,YAAqB,QAAtB;EACE,WAAWC,WAAAA,GAAGC,gCAAAA,eAAe,EAAE,QAAQ,CAAC,GAAG,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,iBAAA,GAAA,kBAAA,KAACF,SAAAA,YAAqB,QAAtB;EACE,WAAWC,WAAAA,GAAGC,gCAAAA,eAAe,EAAE,SAAS,UAAU,CAAC,GAAG,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -33,7 +33,7 @@ function AlertDialogContent({ className, size = "default", ...props }) {
|
|
|
33
33
|
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Content, {
|
|
34
34
|
"data-slot": "alert-dialog-content",
|
|
35
35
|
"data-size": size,
|
|
36
|
-
className: cn("group/alert-dialog-content bg-background fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 rounded-
|
|
36
|
+
className: cn("group/alert-dialog-content bg-background fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 rounded-2xl border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[size=default]:sm:max-w-sm data-[size=large]:sm:max-w-lg", className),
|
|
37
37
|
...props
|
|
38
38
|
})] });
|
|
39
39
|
}
|
|
@@ -54,7 +54,7 @@ function AlertDialogFooter({ className, ...props }) {
|
|
|
54
54
|
function AlertDialogTitle({ className, ...props }) {
|
|
55
55
|
return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
|
|
56
56
|
"data-slot": "alert-dialog-title",
|
|
57
|
-
className: cn("text-
|
|
57
|
+
className: cn("font-heading text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal", className),
|
|
58
58
|
...props
|
|
59
59
|
});
|
|
60
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["AlertDialogPrimitive"],"sources":["../../../src/primitives/AlertDialog/AlertDialog.tsx"],"sourcesContent":["import { AlertDialog as AlertDialogPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\nimport { buttonVariants } from \"../Button\";\n\n/** A modal confirmation dialog that interrupts the user and expects a deliberate response. */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n /** Layout preset: `default` is compact + centered, `large` is wide + left-aligned. */\n size?: \"default\" | \"large\";\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content bg-background fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 rounded-
|
|
1
|
+
{"version":3,"file":"index.js","names":["AlertDialogPrimitive"],"sources":["../../../src/primitives/AlertDialog/AlertDialog.tsx"],"sourcesContent":["import { AlertDialog as AlertDialogPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\nimport { buttonVariants } from \"../Button\";\n\n/** A modal confirmation dialog that interrupts the user and expects a deliberate response. */\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n /** Layout preset: `default` is compact + centered, `large` is wide + left-aligned. */\n size?: \"default\" | \"large\";\n}) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n \"group/alert-dialog-content bg-background fixed top-[50%] left-[50%] z-50 flex w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] flex-col gap-4 rounded-2xl border p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n // Width by size: default = compact / centered, large = wide / left-aligned.\n \"data-[size=default]:sm:max-w-sm data-[size=large]:sm:max-w-lg\",\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n \"flex flex-col gap-2\",\n \"group-data-[size=default]/alert-dialog-content:items-center group-data-[size=default]/alert-dialog-content:text-center\",\n \"group-data-[size=large]/alert-dialog-content:text-left\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"flex gap-2\",\n // default: buttons share the width side-by-side; large: trailing-aligned.\n \"group-data-[size=default]/alert-dialog-content:flex-row group-data-[size=default]/alert-dialog-content:[&>*]:flex-1\",\n \"group-data-[size=large]/alert-dialog-content:flex-row group-data-[size=large]/alert-dialog-content:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n \"font-heading text-[length:var(--heading-4-font-size)] leading-[var(--heading-4-line-height)] font-normal\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\n// Small icon slot — centered for the default size, leading for large.\nfunction AlertDialogMedia({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"flex items-center [&>svg]:size-5\",\n \"group-data-[size=default]/alert-dialog-content:justify-center\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action> & {\n /** Button style for the confirming action; use `destructive` for irreversible actions. */\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant: \"outline\" }), className)}\n {...props}\n />\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n"],"mappings":";;;;;;AAOA,SAAS,YAAY,EAAE,GAAG,SAAiE;CACzF,OAAO,oBAACA,cAAqB,MAAtB;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,mBAAmB,EAC1B,GAAG,SACyD;CAC5D,OAAO,oBAACA,cAAqB,SAAtB;EAA8B,aAAU;EAAuB,GAAI;CAAQ,CAAA;AACpF;AAEA,SAAS,kBAAkB,EAAE,GAAG,SAAmE;CACjG,OAAO,oBAACA,cAAqB,QAAtB;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;AAEA,SAAS,mBAAmB,EAC1B,WACA,GAAG,SACyD;CAC5D,OACE,oBAACA,cAAqB,SAAtB;EACE,aAAU;EACV,WAAW,GACT,kKACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAC1B,WACA,OAAO,WACP,GAAG,SAIF;CACD,OACE,qBAAC,mBAAD,EAAA,UAAA,CACE,oBAAC,oBAAD,CAAqB,CAAA,GACrB,oBAACA,cAAqB,SAAtB;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT,wYAEA,iEACA,SACF;EACA,GAAI;CACL,CAAA,CACgB,EAAA,CAAA;AAEvB;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAsC;CAC/E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,uBACA,0HACA,0DACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAsC;CAC/E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,cAEA,uHACA,kHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EACxB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,cAAqB,OAAtB;EACE,aAAU;EACV,WAAW,GACT,4GACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAACA,cAAqB,aAAtB;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAGA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAsC;CAC9E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,oCACA,iEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,UAAU,WACV,GAAG,SAIF;CACD,OACE,oBAACA,cAAqB,QAAtB;EACE,WAAW,GAAG,eAAe,EAAE,QAAQ,CAAC,GAAG,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,kBAAkB,EACzB,WACA,GAAG,SACwD;CAC3D,OACE,oBAACA,cAAqB,QAAtB;EACE,WAAW,GAAG,eAAe,EAAE,SAAS,UAAU,CAAC,GAAG,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -9,7 +9,7 @@ function Avatar({ className, size = "default", shape = "round", ...props }) {
|
|
|
9
9
|
"data-slot": "avatar",
|
|
10
10
|
"data-size": size,
|
|
11
11
|
"data-shape": shape,
|
|
12
|
-
className: require_cn.cn("group/avatar relative flex size-10 shrink-0 overflow-hidden rounded-full select-none", "data-[size=sm]:size-8 data-[size=xs]:size-6 data-[size=xxs]:size-5", "data-[shape=roundrect]:rounded-
|
|
12
|
+
className: require_cn.cn("group/avatar relative flex size-10 shrink-0 overflow-hidden rounded-full select-none", "data-[size=sm]:size-8 data-[size=xs]:size-6 data-[size=xxs]:size-5", "data-[shape=roundrect]:data-[size=default]:rounded-10 data-[shape=roundrect]:data-[size=sm]:rounded-10 data-[shape=roundrect]:data-[size=xs]:rounded-md data-[shape=roundrect]:data-[size=xxs]:rounded-sm", className),
|
|
13
13
|
...props
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -25,7 +25,7 @@ function AvatarImage({ className, ...props }) {
|
|
|
25
25
|
function AvatarFallback({ className, ...props }) {
|
|
26
26
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Avatar.Fallback, {
|
|
27
27
|
"data-slot": "avatar-fallback",
|
|
28
|
-
className: require_cn.cn("bg-
|
|
28
|
+
className: require_cn.cn("bg-accent flex size-full items-center justify-center rounded-full", "group-[[data-shape=roundrect][data-size=default]]/avatar:rounded-10 group-[[data-shape=roundrect][data-size=sm]]/avatar:rounded-10 group-[[data-shape=roundrect][data-size=xs]]/avatar:rounded-md group-[[data-shape=roundrect][data-size=xxs]]/avatar:rounded-sm", "group-data-[size=sm]/avatar:text-sm group-data-[size=xs]/avatar:text-xs group-data-[size=xxs]/avatar:text-[10px]", className),
|
|
29
29
|
...props
|
|
30
30
|
});
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["AvatarPrimitive","cn"],"sources":["../../../src/primitives/Avatar/Avatar.tsx"],"sourcesContent":["import { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root avatar container — sizes/shapes the image+fallback and exposes data attrs for descendants. */\nfunction Avatar({\n className,\n size = \"default\",\n shape = \"round\",\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> & {\n /** Pixel footprint of the avatar. */\n size?: \"default\" | \"sm\" | \"xs\" | \"xxs\";\n /** Corner treatment: a circle (`round`) or a rounded square (`roundrect`). */\n shape?: \"round\" | \"roundrect\";\n}) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n data-shape={shape}\n className={cn(\n \"group/avatar relative flex size-10 shrink-0 overflow-hidden rounded-full select-none\",\n \"data-[size=sm]:size-8 data-[size=xs]:size-6 data-[size=xxs]:size-5\",\n \"data-[shape=roundrect]:rounded-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["AvatarPrimitive","cn"],"sources":["../../../src/primitives/Avatar/Avatar.tsx"],"sourcesContent":["import { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root avatar container — sizes/shapes the image+fallback and exposes data attrs for descendants. */\nfunction Avatar({\n className,\n size = \"default\",\n shape = \"round\",\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> & {\n /** Pixel footprint of the avatar. */\n size?: \"default\" | \"sm\" | \"xs\" | \"xxs\";\n /** Corner treatment: a circle (`round`) or a rounded square (`roundrect`). */\n shape?: \"round\" | \"roundrect\";\n}) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n data-shape={shape}\n className={cn(\n \"group/avatar relative flex size-10 shrink-0 overflow-hidden rounded-full select-none\",\n \"data-[size=sm]:size-8 data-[size=xs]:size-6 data-[size=xxs]:size-5\",\n // Roundrect corner radius per size (Figma): default/sm 10px (--radius), xs 6px, xxs 4px.\n \"data-[shape=roundrect]:data-[size=default]:rounded-10 data-[shape=roundrect]:data-[size=sm]:rounded-10 data-[shape=roundrect]:data-[size=xs]:rounded-md data-[shape=roundrect]:data-[size=xxs]:rounded-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The avatar photo; falls back to `AvatarFallback` when the source fails to load. */\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full\", className)}\n {...props}\n />\n );\n}\n\n/** Placeholder (typically initials) rendered when no image is available. */\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"bg-accent flex size-full items-center justify-center rounded-full\",\n \"group-[[data-shape=roundrect][data-size=default]]/avatar:rounded-10 group-[[data-shape=roundrect][data-size=sm]]/avatar:rounded-10 group-[[data-shape=roundrect][data-size=xs]]/avatar:rounded-md group-[[data-shape=roundrect][data-size=xxs]]/avatar:rounded-sm\",\n \"group-data-[size=sm]/avatar:text-sm group-data-[size=xs]/avatar:text-xs group-data-[size=xxs]/avatar:text-[10px]\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Small status indicator (e.g. presence dot) anchored to the avatar's bottom-right corner. */\nfunction AvatarBadge({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"avatar-badge\"\n className={cn(\n \"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none\",\n \"group-data-[size=default]/avatar:size-3 group-data-[size=default]/avatar:[&>svg]:size-2\",\n \"group-data-[size=sm]/avatar:size-2.5 group-data-[size=sm]/avatar:[&>svg]:size-2\",\n \"group-data-[size=xs]/avatar:size-2 group-data-[size=xs]/avatar:[&>svg]:size-1.5\",\n \"group-data-[size=xxs]/avatar:size-1.5 group-data-[size=xxs]/avatar:[&>svg]:size-1\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Wrapper that overlaps a row of avatars into a stacked cluster. */\nfunction AvatarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"avatar-group\"\n className={cn(\n \"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Trailing chip in an `AvatarGroup` showing the overflow count (e.g. `+3`). */\nfunction AvatarGroupCount({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"avatar-group-count\"\n className={cn(\n \"relative flex size-10 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=sm]/avatar-group:size-8 [&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount };\n"],"mappings":";;;;;;AAMA,SAAS,OAAO,EACd,WACA,OAAO,WACP,QAAQ,SACR,GAAG,SAMF;CACD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,MAAjB;EACE,aAAU;EACV,aAAW;EACX,cAAY;EACZ,WAAWC,WAAAA,GACT,wFACA,sEAEA,6MACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,OAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EACtB,WACA,GAAG,SACqD;CACxD,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,UAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,qEACA,qQACA,oHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAuC;CAC1E,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,6JACA,2FACA,mFACA,mFACA,qFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,uGACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAsC;CAC9E,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,0PACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -8,7 +8,7 @@ function Avatar({ className, size = "default", shape = "round", ...props }) {
|
|
|
8
8
|
"data-slot": "avatar",
|
|
9
9
|
"data-size": size,
|
|
10
10
|
"data-shape": shape,
|
|
11
|
-
className: cn("group/avatar relative flex size-10 shrink-0 overflow-hidden rounded-full select-none", "data-[size=sm]:size-8 data-[size=xs]:size-6 data-[size=xxs]:size-5", "data-[shape=roundrect]:rounded-
|
|
11
|
+
className: cn("group/avatar relative flex size-10 shrink-0 overflow-hidden rounded-full select-none", "data-[size=sm]:size-8 data-[size=xs]:size-6 data-[size=xxs]:size-5", "data-[shape=roundrect]:data-[size=default]:rounded-10 data-[shape=roundrect]:data-[size=sm]:rounded-10 data-[shape=roundrect]:data-[size=xs]:rounded-md data-[shape=roundrect]:data-[size=xxs]:rounded-sm", className),
|
|
12
12
|
...props
|
|
13
13
|
});
|
|
14
14
|
}
|
|
@@ -24,7 +24,7 @@ function AvatarImage({ className, ...props }) {
|
|
|
24
24
|
function AvatarFallback({ className, ...props }) {
|
|
25
25
|
return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
26
26
|
"data-slot": "avatar-fallback",
|
|
27
|
-
className: cn("bg-
|
|
27
|
+
className: cn("bg-accent flex size-full items-center justify-center rounded-full", "group-[[data-shape=roundrect][data-size=default]]/avatar:rounded-10 group-[[data-shape=roundrect][data-size=sm]]/avatar:rounded-10 group-[[data-shape=roundrect][data-size=xs]]/avatar:rounded-md group-[[data-shape=roundrect][data-size=xxs]]/avatar:rounded-sm", "group-data-[size=sm]/avatar:text-sm group-data-[size=xs]/avatar:text-xs group-data-[size=xxs]/avatar:text-[10px]", className),
|
|
28
28
|
...props
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["AvatarPrimitive"],"sources":["../../../src/primitives/Avatar/Avatar.tsx"],"sourcesContent":["import { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root avatar container — sizes/shapes the image+fallback and exposes data attrs for descendants. */\nfunction Avatar({\n className,\n size = \"default\",\n shape = \"round\",\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> & {\n /** Pixel footprint of the avatar. */\n size?: \"default\" | \"sm\" | \"xs\" | \"xxs\";\n /** Corner treatment: a circle (`round`) or a rounded square (`roundrect`). */\n shape?: \"round\" | \"roundrect\";\n}) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n data-shape={shape}\n className={cn(\n \"group/avatar relative flex size-10 shrink-0 overflow-hidden rounded-full select-none\",\n \"data-[size=sm]:size-8 data-[size=xs]:size-6 data-[size=xxs]:size-5\",\n \"data-[shape=roundrect]:rounded-
|
|
1
|
+
{"version":3,"file":"index.js","names":["AvatarPrimitive"],"sources":["../../../src/primitives/Avatar/Avatar.tsx"],"sourcesContent":["import { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root avatar container — sizes/shapes the image+fallback and exposes data attrs for descendants. */\nfunction Avatar({\n className,\n size = \"default\",\n shape = \"round\",\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root> & {\n /** Pixel footprint of the avatar. */\n size?: \"default\" | \"sm\" | \"xs\" | \"xxs\";\n /** Corner treatment: a circle (`round`) or a rounded square (`roundrect`). */\n shape?: \"round\" | \"roundrect\";\n}) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n data-size={size}\n data-shape={shape}\n className={cn(\n \"group/avatar relative flex size-10 shrink-0 overflow-hidden rounded-full select-none\",\n \"data-[size=sm]:size-8 data-[size=xs]:size-6 data-[size=xxs]:size-5\",\n // Roundrect corner radius per size (Figma): default/sm 10px (--radius), xs 6px, xxs 4px.\n \"data-[shape=roundrect]:data-[size=default]:rounded-10 data-[shape=roundrect]:data-[size=sm]:rounded-10 data-[shape=roundrect]:data-[size=xs]:rounded-md data-[shape=roundrect]:data-[size=xxs]:rounded-sm\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** The avatar photo; falls back to `AvatarFallback` when the source fails to load. */\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full\", className)}\n {...props}\n />\n );\n}\n\n/** Placeholder (typically initials) rendered when no image is available. */\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"bg-accent flex size-full items-center justify-center rounded-full\",\n \"group-[[data-shape=roundrect][data-size=default]]/avatar:rounded-10 group-[[data-shape=roundrect][data-size=sm]]/avatar:rounded-10 group-[[data-shape=roundrect][data-size=xs]]/avatar:rounded-md group-[[data-shape=roundrect][data-size=xxs]]/avatar:rounded-sm\",\n \"group-data-[size=sm]/avatar:text-sm group-data-[size=xs]/avatar:text-xs group-data-[size=xxs]/avatar:text-[10px]\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Small status indicator (e.g. presence dot) anchored to the avatar's bottom-right corner. */\nfunction AvatarBadge({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"avatar-badge\"\n className={cn(\n \"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none\",\n \"group-data-[size=default]/avatar:size-3 group-data-[size=default]/avatar:[&>svg]:size-2\",\n \"group-data-[size=sm]/avatar:size-2.5 group-data-[size=sm]/avatar:[&>svg]:size-2\",\n \"group-data-[size=xs]/avatar:size-2 group-data-[size=xs]/avatar:[&>svg]:size-1.5\",\n \"group-data-[size=xxs]/avatar:size-1.5 group-data-[size=xxs]/avatar:[&>svg]:size-1\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Wrapper that overlaps a row of avatars into a stacked cluster. */\nfunction AvatarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"avatar-group\"\n className={cn(\n \"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Trailing chip in an `AvatarGroup` showing the overflow count (e.g. `+3`). */\nfunction AvatarGroupCount({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"avatar-group-count\"\n className={cn(\n \"relative flex size-10 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=sm]/avatar-group:size-8 [&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount };\n"],"mappings":";;;;;AAMA,SAAS,OAAO,EACd,WACA,OAAO,WACP,QAAQ,SACR,GAAG,SAMF;CACD,OACE,oBAACA,SAAgB,MAAjB;EACE,aAAU;EACV,aAAW;EACX,cAAY;EACZ,WAAW,GACT,wFACA,sEAEA,6MACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EACtB,WACA,GAAG,SACqD;CACxD,OACE,oBAACA,SAAgB,UAAjB;EACE,aAAU;EACV,WAAW,GACT,qEACA,qQACA,oHACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAuC;CAC1E,OACE,oBAAC,QAAD;EACE,aAAU;EACV,WAAW,GACT,6JACA,2FACA,mFACA,mFACA,qFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,uGACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAsC;CAC9E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GACT,0PACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -3,20 +3,20 @@ const require_cn = require("../../cn.cjs");
|
|
|
3
3
|
let radix_ui = require("radix-ui");
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
//#region src/primitives/Badge/Badge.tsx
|
|
6
|
-
const badgeVariants = (0, require("class-variance-authority").cva)("inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-
|
|
6
|
+
const badgeVariants = (0, require("class-variance-authority").cva)("inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
10
10
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
11
|
-
destructive: "border-transparent bg-
|
|
12
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
11
|
+
destructive: "border-transparent bg-error-subtle text-destructive-foreground [a&]:hover:brightness-95 focus-visible:ring-ring-error",
|
|
12
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
13
13
|
ghost: "border-transparent text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
14
14
|
success: "border-transparent bg-[var(--bg-success-subtle)] text-[var(--content-success-bold)] [a&]:hover:brightness-95",
|
|
15
15
|
warning: "border-transparent bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)] [a&]:hover:brightness-95",
|
|
16
16
|
info: "border-transparent bg-[var(--bg-info-subtle)] text-[var(--content-info-bold)] [a&]:hover:brightness-95"
|
|
17
17
|
},
|
|
18
18
|
shape: {
|
|
19
|
-
default: "rounded-
|
|
19
|
+
default: "rounded-lg",
|
|
20
20
|
round: "rounded-full"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["Slot","cn"],"sources":["../../../src/primitives/Badge/Badge.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/index\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Slot","cn"],"sources":["../../../src/primitives/Badge/Badge.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/index\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n // Semantic variants are soft per Figma: a subtle tinted fill with a bold\n // text color, drawn from the same --bg-*-subtle / --content-*-bold token\n // sets InfoBanner uses (light + dark aware).\n destructive:\n \"border-transparent bg-error-subtle text-destructive-foreground [a&]:hover:brightness-95 focus-visible:ring-ring-error\",\n outline:\n \"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n ghost:\n \"border-transparent text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n success:\n \"border-transparent bg-[var(--bg-success-subtle)] text-[var(--content-success-bold)] [a&]:hover:brightness-95\",\n warning:\n \"border-transparent bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)] [a&]:hover:brightness-95\",\n info: \"border-transparent bg-[var(--bg-info-subtle)] text-[var(--content-info-bold)] [a&]:hover:brightness-95\",\n },\n shape: {\n default: \"rounded-lg\",\n round: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n shape: \"default\",\n },\n },\n);\n\n/** A compact label for status, counts, or metadata. Renders a `span` by default. */\nfunction Badge({\n className,\n /** Visual style — solid (`default`/`secondary`), `outline`/`ghost`, or a soft semantic tint (`destructive`/`success`/`warning`/`info`). */\n variant = \"default\",\n /** Corner radius — `default` is `rounded-md`, `round` is a full pill. */\n shape = \"default\",\n /** Render the child element instead of a `span` (Radix `Slot`), e.g. to make a link badge. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"span\";\n\n return (\n <Comp\n data-slot=\"badge\"\n data-variant={variant}\n className={cn(badgeVariants({ variant, shape }), className)}\n {...props}\n />\n );\n}\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;AAMA,MAAM,iBAAA,qCAAA,EAAA,KACJ,6VACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,WACE;GAIF,aACE;GACF,SACE;GACF,OACE;GACF,SACE;GACF,SACE;GACF,MAAM;EACR;EACA,OAAO;GACL,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,SAAS;EACT,OAAO;CACT;AACF,CACF;;AAGA,SAAS,MAAM,EACb,WAEA,UAAU,WAEV,QAAQ,WAER,UAAU,OACV,GAAG,SACyF;CAG5F,OACE,iBAAA,GAAA,kBAAA,KAHW,UAAUA,SAAAA,KAAK,OAAO,QAGjC;EACE,aAAU;EACV,gBAAc;EACd,WAAWC,WAAAA,GAAG,cAAc;GAAE;GAAS;EAAM,CAAC,GAAG,SAAS;EAC1D,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -3,20 +3,20 @@ import { Slot } from "radix-ui";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
//#region src/primitives/Badge/Badge.tsx
|
|
6
|
-
const badgeVariants = cva("inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-
|
|
6
|
+
const badgeVariants = cva("inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
10
10
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
11
|
-
destructive: "border-transparent bg-
|
|
12
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
11
|
+
destructive: "border-transparent bg-error-subtle text-destructive-foreground [a&]:hover:brightness-95 focus-visible:ring-ring-error",
|
|
12
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
13
13
|
ghost: "border-transparent text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
14
14
|
success: "border-transparent bg-[var(--bg-success-subtle)] text-[var(--content-success-bold)] [a&]:hover:brightness-95",
|
|
15
15
|
warning: "border-transparent bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)] [a&]:hover:brightness-95",
|
|
16
16
|
info: "border-transparent bg-[var(--bg-info-subtle)] text-[var(--content-info-bold)] [a&]:hover:brightness-95"
|
|
17
17
|
},
|
|
18
18
|
shape: {
|
|
19
|
-
default: "rounded-
|
|
19
|
+
default: "rounded-lg",
|
|
20
20
|
round: "rounded-full"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Badge/Badge.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/index\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Badge/Badge.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/index\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n // Semantic variants are soft per Figma: a subtle tinted fill with a bold\n // text color, drawn from the same --bg-*-subtle / --content-*-bold token\n // sets InfoBanner uses (light + dark aware).\n destructive:\n \"border-transparent bg-error-subtle text-destructive-foreground [a&]:hover:brightness-95 focus-visible:ring-ring-error\",\n outline:\n \"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n ghost:\n \"border-transparent text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n success:\n \"border-transparent bg-[var(--bg-success-subtle)] text-[var(--content-success-bold)] [a&]:hover:brightness-95\",\n warning:\n \"border-transparent bg-[var(--bg-warning-subtle)] text-[var(--content-warning-bold)] [a&]:hover:brightness-95\",\n info: \"border-transparent bg-[var(--bg-info-subtle)] text-[var(--content-info-bold)] [a&]:hover:brightness-95\",\n },\n shape: {\n default: \"rounded-lg\",\n round: \"rounded-full\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n shape: \"default\",\n },\n },\n);\n\n/** A compact label for status, counts, or metadata. Renders a `span` by default. */\nfunction Badge({\n className,\n /** Visual style — solid (`default`/`secondary`), `outline`/`ghost`, or a soft semantic tint (`destructive`/`success`/`warning`/`info`). */\n variant = \"default\",\n /** Corner radius — `default` is `rounded-md`, `round` is a full pill. */\n shape = \"default\",\n /** Render the child element instead of a `span` (Radix `Slot`), e.g. to make a link badge. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"span\";\n\n return (\n <Comp\n data-slot=\"badge\"\n data-variant={variant}\n className={cn(badgeVariants({ variant, shape }), className)}\n {...props}\n />\n );\n}\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;AAMA,MAAM,gBAAgB,IACpB,6VACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,WACE;GAIF,aACE;GACF,SACE;GACF,OACE;GACF,SACE;GACF,SACE;GACF,MAAM;EACR;EACA,OAAO;GACL,SAAS;GACT,OAAO;EACT;CACF;CACA,iBAAiB;EACf,SAAS;EACT,OAAO;CACT;AACF,CACF;;AAGA,SAAS,MAAM,EACb,WAEA,UAAU,WAEV,QAAQ,WAER,UAAU,OACV,GAAG,SACyF;CAG5F,OACE,oBAHW,UAAU,KAAK,OAAO,QAGjC;EACE,aAAU;EACV,gBAAc;EACd,WAAW,GAAG,cAAc;GAAE;GAAS;EAAM,CAAC,GAAG,SAAS;EAC1D,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -5,15 +5,15 @@ let react = require("react");
|
|
|
5
5
|
let radix_ui = require("radix-ui");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
//#region src/primitives/Button/Button.tsx
|
|
8
|
-
const buttonVariants = (0, require("class-variance-authority").cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-
|
|
8
|
+
const buttonVariants = (0, require("class-variance-authority").cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
-
destructive: "bg-destructive text-
|
|
13
|
-
outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground
|
|
12
|
+
destructive: "bg-destructive-alpha text-error-bold-foreground hover:bg-destructive-alpha/80 focus-visible:ring-ring-error",
|
|
13
|
+
outline: "border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
14
14
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
-
ghost: "hover:bg-accent hover:text-accent-foreground
|
|
16
|
-
link: "text-
|
|
15
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
|
+
link: "text-foreground underline-offset-4 hover:underline"
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
19
|
xs: "h-7 gap-1 px-2.5 text-xs has-[>svg]:px-2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["Slot","cn","Spinner"],"sources":["../../../src/primitives/Button/Button.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport { type ComponentProps, forwardRef } from \"react\";\n\nimport { Spinner } from \"@/primitives/Spinner\";\nimport { cn } from \"@/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Slot","cn","Spinner"],"sources":["../../../src/primitives/Button/Button.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport { type ComponentProps, forwardRef } from \"react\";\n\nimport { Spinner } from \"@/primitives/Spinner\";\nimport { cn } from \"@/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive-alpha text-error-bold-foreground hover:bg-destructive-alpha/80 focus-visible:ring-ring-error\",\n outline:\n \"border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-foreground underline-offset-4 hover:underline\",\n },\n size: {\n xs: \"h-7 gap-1 px-2.5 text-xs has-[>svg]:px-2\",\n sm: \"h-8 gap-1.5 px-3 has-[>svg]:px-2.5\",\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n lg: \"h-10 px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n // Default is a pill (Figma); `square` gives the standard rounded-md corner.\n shape: {\n default: \"rounded-full\",\n square: \"rounded-md\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\ntype ButtonProps = ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n /** Render as the child element (Radix `Slot`) instead of a native `<button>`. */\n asChild?: boolean;\n /** Show a spinner and disable the button while an action is in flight. */\n loading?: boolean;\n };\n\n/**\n * Clickable button supporting visual variants, sizes, shapes, async loading, and\n * `asChild` composition. Forwards its ref so it can be used as a Radix trigger\n * (`asChild`) for floating overlays (Popover, Tooltip, DropdownMenu, …).\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n className,\n variant,\n size,\n shape,\n asChild = false,\n loading = false,\n disabled,\n children,\n ...props\n },\n ref,\n) {\n const Comp = asChild ? Slot.Root : \"button\";\n\n return (\n <Comp\n ref={ref}\n data-slot=\"button\"\n data-loading={loading || undefined}\n className={cn(buttonVariants({ variant, size, shape, className }))}\n disabled={disabled || loading}\n {...props}\n >\n {/* asChild expects a single child, so only plain buttons get the spinner. */}\n {asChild ? (\n children\n ) : (\n <>\n {loading ? <Spinner /> : null}\n {children}\n </>\n )}\n </Comp>\n );\n});\n\nexport { Button, buttonVariants, type ButtonProps };\n"],"mappings":";;;;;;;AAOA,MAAM,kBAAA,qCAAA,EAAA,KACJ,4hBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,aACE;GACF,SACE;GACF,WAAW;GACX,OAAO;GACP,MAAM;EACR;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;GACJ,MAAM;EACR;EAEA,OAAO;GACL,SAAS;GACT,QAAQ;EACV;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF;;;;;;AAeA,MAAM,UAAA,GAAA,MAAA,YAAoD,SAAS,OACjE,EACE,WACA,SACA,MACA,OACA,UAAU,OACV,UAAU,OACV,UACA,UACA,GAAG,SAEL,KACA;CAGA,OACE,iBAAA,GAAA,kBAAA,KAHW,UAAUA,SAAAA,KAAK,OAAO,UAGjC;EACO;EACL,aAAU;EACV,gBAAc,WAAW,KAAA;EACzB,WAAWC,WAAAA,GAAG,eAAe;GAAE;GAAS;GAAM;GAAO;EAAU,CAAC,CAAC;EACjE,UAAU,YAAY;EACtB,GAAI;YAGH,UACC,WAEA,iBAAA,GAAA,kBAAA,MAAA,kBAAA,UAAA,EAAA,UAAA,CACG,UAAU,iBAAA,GAAA,kBAAA,KAACC,iCAAAA,SAAD,CAAU,CAAA,IAAI,MACxB,QACD,EAAA,CAAA;CAEA,CAAA;AAEV,CAAC"}
|
|
@@ -5,15 +5,15 @@ import { Slot } from "radix-ui";
|
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
//#region src/primitives/Button/Button.tsx
|
|
8
|
-
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-
|
|
8
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive", {
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
-
destructive: "bg-destructive text-
|
|
13
|
-
outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground
|
|
12
|
+
destructive: "bg-destructive-alpha text-error-bold-foreground hover:bg-destructive-alpha/80 focus-visible:ring-ring-error",
|
|
13
|
+
outline: "border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
14
14
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
-
ghost: "hover:bg-accent hover:text-accent-foreground
|
|
16
|
-
link: "text-
|
|
15
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
|
+
link: "text-foreground underline-offset-4 hover:underline"
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
19
|
xs: "h-7 gap-1 px-2.5 text-xs has-[>svg]:px-2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Button/Button.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport { type ComponentProps, forwardRef } from \"react\";\n\nimport { Spinner } from \"@/primitives/Spinner\";\nimport { cn } from \"@/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Button/Button.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport { type ComponentProps, forwardRef } from \"react\";\n\nimport { Spinner } from \"@/primitives/Spinner\";\nimport { cn } from \"@/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium cursor-pointer transition-[background-color,color,border-color,box-shadow,opacity,transform] duration-150 ease-out active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-ring-error aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive-alpha text-error-bold-foreground hover:bg-destructive-alpha/80 focus-visible:ring-ring-error\",\n outline:\n \"border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-foreground underline-offset-4 hover:underline\",\n },\n size: {\n xs: \"h-7 gap-1 px-2.5 text-xs has-[>svg]:px-2\",\n sm: \"h-8 gap-1.5 px-3 has-[>svg]:px-2.5\",\n default: \"h-9 px-4 py-2 has-[>svg]:px-3\",\n lg: \"h-10 px-6 has-[>svg]:px-4\",\n icon: \"size-9\",\n },\n // Default is a pill (Figma); `square` gives the standard rounded-md corner.\n shape: {\n default: \"rounded-full\",\n square: \"rounded-md\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n shape: \"default\",\n },\n },\n);\n\ntype ButtonProps = ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n /** Render as the child element (Radix `Slot`) instead of a native `<button>`. */\n asChild?: boolean;\n /** Show a spinner and disable the button while an action is in flight. */\n loading?: boolean;\n };\n\n/**\n * Clickable button supporting visual variants, sizes, shapes, async loading, and\n * `asChild` composition. Forwards its ref so it can be used as a Radix trigger\n * (`asChild`) for floating overlays (Popover, Tooltip, DropdownMenu, …).\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n className,\n variant,\n size,\n shape,\n asChild = false,\n loading = false,\n disabled,\n children,\n ...props\n },\n ref,\n) {\n const Comp = asChild ? Slot.Root : \"button\";\n\n return (\n <Comp\n ref={ref}\n data-slot=\"button\"\n data-loading={loading || undefined}\n className={cn(buttonVariants({ variant, size, shape, className }))}\n disabled={disabled || loading}\n {...props}\n >\n {/* asChild expects a single child, so only plain buttons get the spinner. */}\n {asChild ? (\n children\n ) : (\n <>\n {loading ? <Spinner /> : null}\n {children}\n </>\n )}\n </Comp>\n );\n});\n\nexport { Button, buttonVariants, type ButtonProps };\n"],"mappings":";;;;;;;AAOA,MAAM,iBAAiB,IACrB,4hBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,aACE;GACF,SACE;GACF,WAAW;GACX,OAAO;GACP,MAAM;EACR;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;GACJ,MAAM;EACR;EAEA,OAAO;GACL,SAAS;GACT,QAAQ;EACV;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF;;;;;;AAeA,MAAM,SAAS,WAA2C,SAAS,OACjE,EACE,WACA,SACA,MACA,OACA,UAAU,OACV,UAAU,OACV,UACA,UACA,GAAG,SAEL,KACA;CAGA,OACE,oBAHW,UAAU,KAAK,OAAO,UAGjC;EACO;EACL,aAAU;EACV,gBAAc,WAAW,KAAA;EACzB,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAO;EAAU,CAAC,CAAC;EACjE,UAAU,YAAY;EACtB,GAAI;YAGH,UACC,WAEA,qBAAA,UAAA,EAAA,UAAA,CACG,UAAU,oBAAC,SAAD,CAAU,CAAA,IAAI,MACxB,QACD,EAAA,CAAA;CAEA,CAAA;AAEV,CAAC"}
|
|
@@ -24,7 +24,7 @@ function ButtonGroup({ className, orientation, ...props }) {
|
|
|
24
24
|
/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */
|
|
25
25
|
function ButtonGroupText({ className, asChild = false, ...props }) {
|
|
26
26
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? radix_ui.Slot.Root : "div", {
|
|
27
|
-
className: require_cn.cn("flex items-center gap-2 rounded-
|
|
27
|
+
className: require_cn.cn("flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
28
28
|
...props
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -33,7 +33,7 @@ function ButtonGroupSeparator({ className, orientation = "vertical", ...props })
|
|
|
33
33
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_primitives_Separator_index.Separator, {
|
|
34
34
|
"data-slot": "button-group-separator",
|
|
35
35
|
orientation,
|
|
36
|
-
className: require_cn.cn("relative m-0! self-stretch bg-
|
|
36
|
+
className: require_cn.cn("relative m-0! self-stretch bg-border data-[orientation=vertical]:h-auto", className),
|
|
37
37
|
...props
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["cn","Slot","Separator"],"sources":["../../../src/primitives/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { Separator } from \"@/primitives/Separator\";\nimport { cn } from \"@/utils\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n },\n);\n\n/** Props for the {@link ButtonGroup} container. */\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>;\n\n/** Groups related buttons into a single attached unit with merged borders and shared corners. */\nfunction ButtonGroup({\n className,\n /** Lays the group out left-to-right (`horizontal`, default) or stacked (`vertical`). */\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\n/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */\nfunction ButtonGroupText({\n className,\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : \"div\";\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["cn","Slot","Separator"],"sources":["../../../src/primitives/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { Separator } from \"@/primitives/Separator\";\nimport { cn } from \"@/utils\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n },\n);\n\n/** Props for the {@link ButtonGroup} container. */\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>;\n\n/** Groups related buttons into a single attached unit with merged borders and shared corners. */\nfunction ButtonGroup({\n className,\n /** Lays the group out left-to-right (`horizontal`, default) or stacked (`vertical`). */\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\n/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */\nfunction ButtonGroupText({\n className,\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : \"div\";\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A divider between segments inside a {@link ButtonGroup}, defaulting to a vertical rule. */\nfunction ButtonGroupSeparator({\n className,\n /** Divider direction; defaults to `vertical` to split horizontally-laid buttons. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"relative m-0! self-stretch bg-border data-[orientation=vertical]:h-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };\n"],"mappings":";;;;;;AAMA,MAAM,uBAAA,qCAAA,EAAA,KACJ,oSACA;CACE,UAAU,EACR,aAAa;EACX,YACE;EACF,UACE;CACJ,EACF;CACA,iBAAiB,EACf,aAAa,aACf;AACF,CACF;;AAMA,SAAS,YAAY,EACnB,WAEA,aACA,GAAG,SACgB;CACnB,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAWA,WAAAA,GAAG,oBAAoB,EAAE,YAAY,CAAC,GAAG,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EACvB,WAEA,UAAU,OACV,GAAG,SAIF;CAGD,OACE,iBAAA,GAAA,kBAAA,KAHW,UAAUC,SAAAA,KAAK,OAAO,OAGjC;EACE,WAAWD,WAAAA,GACT,0JACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WAEA,cAAc,YACd,GAAG,SACsC;CACzC,OACE,iBAAA,GAAA,kBAAA,KAACE,mCAAAA,WAAD;EACE,aAAU;EACG;EACb,WAAWF,WAAAA,GACT,2EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -24,7 +24,7 @@ function ButtonGroup({ className, orientation, ...props }) {
|
|
|
24
24
|
/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */
|
|
25
25
|
function ButtonGroupText({ className, asChild = false, ...props }) {
|
|
26
26
|
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "div", {
|
|
27
|
-
className: cn("flex items-center gap-2 rounded-
|
|
27
|
+
className: cn("flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
28
28
|
...props
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -33,7 +33,7 @@ function ButtonGroupSeparator({ className, orientation = "vertical", ...props })
|
|
|
33
33
|
return /* @__PURE__ */ jsx(Separator$1, {
|
|
34
34
|
"data-slot": "button-group-separator",
|
|
35
35
|
orientation,
|
|
36
|
-
className: cn("relative m-0! self-stretch bg-
|
|
36
|
+
className: cn("relative m-0! self-stretch bg-border data-[orientation=vertical]:h-auto", className),
|
|
37
37
|
...props
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Separator"],"sources":["../../../src/primitives/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { Separator } from \"@/primitives/Separator\";\nimport { cn } from \"@/utils\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n },\n);\n\n/** Props for the {@link ButtonGroup} container. */\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>;\n\n/** Groups related buttons into a single attached unit with merged borders and shared corners. */\nfunction ButtonGroup({\n className,\n /** Lays the group out left-to-right (`horizontal`, default) or stacked (`vertical`). */\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\n/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */\nfunction ButtonGroupText({\n className,\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : \"div\";\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-
|
|
1
|
+
{"version":3,"file":"index.js","names":["Separator"],"sources":["../../../src/primitives/ButtonGroup/ButtonGroup.tsx"],"sourcesContent":["import { type VariantProps, cva } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\n\nimport { Separator } from \"@/primitives/Separator\";\nimport { cn } from \"@/utils\";\n\nconst buttonGroupVariants = cva(\n \"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1\",\n {\n variants: {\n orientation: {\n horizontal:\n \"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none\",\n vertical:\n \"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none\",\n },\n },\n defaultVariants: {\n orientation: \"horizontal\",\n },\n },\n);\n\n/** Props for the {@link ButtonGroup} container. */\ntype ButtonGroupProps = React.ComponentProps<\"div\"> & VariantProps<typeof buttonGroupVariants>;\n\n/** Groups related buttons into a single attached unit with merged borders and shared corners. */\nfunction ButtonGroup({\n className,\n /** Lays the group out left-to-right (`horizontal`, default) or stacked (`vertical`). */\n orientation,\n ...props\n}: ButtonGroupProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"button-group\"\n data-orientation={orientation}\n className={cn(buttonGroupVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\n/** A non-interactive label/affix segment styled to sit inline with the grouped buttons. */\nfunction ButtonGroupText({\n className,\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> & {\n /** Renders into the child element via Radix `Slot` instead of a wrapping `div`. */\n asChild?: boolean;\n}) {\n const Comp = asChild ? Slot.Root : \"div\";\n\n return (\n <Comp\n className={cn(\n \"flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A divider between segments inside a {@link ButtonGroup}, defaulting to a vertical rule. */\nfunction ButtonGroupSeparator({\n className,\n /** Divider direction; defaults to `vertical` to split horizontally-laid buttons. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"button-group-separator\"\n orientation={orientation}\n className={cn(\n \"relative m-0! self-stretch bg-border data-[orientation=vertical]:h-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };\n"],"mappings":";;;;;;AAMA,MAAM,sBAAsB,IAC1B,oSACA;CACE,UAAU,EACR,aAAa;EACX,YACE;EACF,UACE;CACJ,EACF;CACA,iBAAiB,EACf,aAAa,aACf;AACF,CACF;;AAMA,SAAS,YAAY,EACnB,WAEA,aACA,GAAG,SACgB;CACnB,OACE,oBAAC,OAAD;EACE,MAAK;EACL,aAAU;EACV,oBAAkB;EAClB,WAAW,GAAG,oBAAoB,EAAE,YAAY,CAAC,GAAG,SAAS;EAC7D,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,gBAAgB,EACvB,WAEA,UAAU,OACV,GAAG,SAIF;CAGD,OACE,oBAHW,UAAU,KAAK,OAAO,OAGjC;EACE,WAAW,GACT,0JACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WAEA,cAAc,YACd,GAAG,SACsC;CACzC,OACE,oBAACA,aAAD;EACE,aAAU;EACG;EACb,WAAW,GACT,2EACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -101,7 +101,7 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
|
101
101
|
"data-range-start": modifiers.range_start,
|
|
102
102
|
"data-range-end": modifiers.range_end,
|
|
103
103
|
"data-range-middle": modifiers.range_middle,
|
|
104
|
-
className: require_cn.cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground
|
|
104
|
+
className: require_cn.cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-accent data-[range-end=true]:text-accent-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-accent data-[range-start=true]:text-accent-foreground data-[selected-single=true]:bg-accent data-[selected-single=true]:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
|
|
105
105
|
...props
|
|
106
106
|
});
|
|
107
107
|
}
|