@psnext/design-system 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.cts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index10.d.cts +6 -6
- package/dist/index10.d.cts.map +1 -1
- package/dist/index10.d.ts +7 -7
- package/dist/index10.d.ts.map +1 -1
- package/dist/index11.d.cts +3 -3
- package/dist/index11.d.ts +3 -3
- package/dist/index11.d.ts.map +1 -1
- package/dist/index12.d.cts +12 -12
- package/dist/index12.d.ts +12 -12
- package/dist/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.ts +3 -3
- package/dist/index15.d.ts.map +1 -1
- package/dist/index16.d.cts +2 -2
- package/dist/index16.d.ts +2 -2
- package/dist/index16.d.ts.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/index19.d.ts.map +1 -1
- package/dist/index2.d.cts +8 -8
- package/dist/index2.d.cts.map +1 -1
- package/dist/index2.d.ts +8 -8
- package/dist/index2.d.ts.map +1 -1
- package/dist/index20.d.cts +16 -16
- package/dist/index20.d.cts.map +1 -1
- package/dist/index20.d.ts +16 -16
- 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.ts +11 -11
- package/dist/index22.d.ts.map +1 -1
- package/dist/index23.d.cts +16 -16
- package/dist/index23.d.ts +16 -16
- package/dist/index24.d.cts +7 -7
- package/dist/index24.d.cts.map +1 -1
- package/dist/index24.d.ts +10 -10
- package/dist/index25.d.cts +2 -2
- package/dist/index25.d.ts +2 -2
- package/dist/index25.d.ts.map +1 -1
- package/dist/index26.d.cts +13 -13
- package/dist/index26.d.cts.map +1 -1
- package/dist/index26.d.ts +14 -14
- package/dist/index26.d.ts.map +1 -1
- package/dist/index27.d.cts +7 -7
- package/dist/index27.d.ts +7 -7
- package/dist/index28.d.cts +5 -5
- package/dist/index28.d.cts.map +1 -1
- package/dist/index28.d.ts +5 -5
- package/dist/index29.d.cts +4 -4
- package/dist/index29.d.cts.map +1 -1
- package/dist/index29.d.ts +4 -4
- package/dist/index29.d.ts.map +1 -1
- package/dist/index3.d.cts +13 -13
- package/dist/index3.d.cts.map +1 -1
- package/dist/index3.d.ts +13 -13
- package/dist/index3.d.ts.map +1 -1
- package/dist/index30.d.cts +5 -5
- package/dist/index30.d.cts.map +1 -1
- package/dist/index30.d.ts +6 -6
- package/dist/index30.d.ts.map +1 -1
- package/dist/index31.d.cts +2 -2
- package/dist/index31.d.ts +3 -3
- package/dist/index32.d.cts +6 -6
- package/dist/index32.d.cts.map +1 -1
- package/dist/index32.d.ts +6 -6
- package/dist/index32.d.ts.map +1 -1
- package/dist/index33.d.cts +10 -10
- package/dist/index33.d.cts.map +1 -1
- package/dist/index33.d.ts +11 -11
- package/dist/index33.d.ts.map +1 -1
- package/dist/index34.d.cts +5 -5
- package/dist/index34.d.ts +5 -5
- package/dist/index35.d.cts +17 -17
- package/dist/index35.d.cts.map +1 -1
- package/dist/index35.d.ts +15 -15
- package/dist/index35.d.ts.map +1 -1
- package/dist/index36.d.cts +3 -3
- package/dist/index36.d.cts.map +1 -1
- package/dist/index36.d.ts +3 -3
- package/dist/index36.d.ts.map +1 -1
- package/dist/index37.d.cts +4 -4
- package/dist/index37.d.ts +5 -5
- 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.ts +2 -2
- package/dist/index4.d.ts.map +1 -1
- package/dist/index40.d.cts +5 -5
- package/dist/index40.d.cts.map +1 -1
- package/dist/index40.d.ts +5 -5
- package/dist/index40.d.ts.map +1 -1
- package/dist/index41.d.cts +11 -11
- package/dist/index41.d.cts.map +1 -1
- package/dist/index41.d.ts +11 -11
- package/dist/index42.d.cts +8 -8
- package/dist/index42.d.cts.map +1 -1
- package/dist/index42.d.ts +8 -8
- package/dist/index42.d.ts.map +1 -1
- package/dist/index43.d.cts +9 -9
- package/dist/index43.d.cts.map +1 -1
- package/dist/index43.d.ts +9 -9
- package/dist/index44.d.cts +8 -8
- 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.cts.map +1 -1
- package/dist/index48.d.ts +3 -3
- package/dist/index48.d.ts.map +1 -1
- package/dist/index49.d.cts +11 -11
- package/dist/index49.d.cts.map +1 -1
- package/dist/index49.d.ts +11 -11
- package/dist/index49.d.ts.map +1 -1
- package/dist/index5.d.cts +7 -7
- package/dist/index5.d.cts.map +1 -1
- package/dist/index5.d.ts +7 -7
- package/dist/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/index51.d.ts.map +1 -1
- package/dist/index52.d.cts +27 -27
- package/dist/index52.d.cts.map +1 -1
- package/dist/index52.d.ts +25 -25
- package/dist/index52.d.ts.map +1 -1
- package/dist/index53.d.cts +5 -5
- package/dist/index53.d.ts +5 -5
- package/dist/index54.d.cts +2 -2
- package/dist/index54.d.ts +2 -2
- package/dist/index54.d.ts.map +1 -1
- package/dist/index55.d.cts +2 -2
- package/dist/index55.d.cts.map +1 -1
- package/dist/index55.d.ts +2 -2
- package/dist/index55.d.ts.map +1 -1
- package/dist/index56.d.cts +2 -2
- package/dist/index56.d.ts +2 -2
- package/dist/index56.d.ts.map +1 -1
- package/dist/index57.d.cts +4 -4
- package/dist/index57.d.ts +4 -4
- package/dist/index57.d.ts.map +1 -1
- package/dist/index58.d.cts +9 -9
- package/dist/index58.d.ts +9 -9
- package/dist/index58.d.ts.map +1 -1
- package/dist/index59.d.cts +9 -9
- package/dist/index59.d.ts +13 -13
- package/dist/index59.d.ts.map +1 -1
- package/dist/index6.d.cts +5 -5
- package/dist/index6.d.cts.map +1 -1
- package/dist/index6.d.ts +5 -5
- package/dist/index6.d.ts.map +1 -1
- package/dist/index60.d.cts +6 -6
- package/dist/index60.d.cts.map +1 -1
- package/dist/index60.d.ts +7 -7
- 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/index61.d.ts.map +1 -1
- package/dist/index62.d.cts +2 -2
- package/dist/index62.d.cts.map +1 -1
- package/dist/index62.d.ts +2 -2
- package/dist/index62.d.ts.map +1 -1
- package/dist/index63.d.cts +5 -5
- package/dist/index63.d.ts +3 -3
- package/dist/index64.d.cts +3 -3
- package/dist/index64.d.ts +3 -3
- package/dist/index64.d.ts.map +1 -1
- 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/index66.d.ts.map +1 -1
- package/dist/index67.d.cts +7 -7
- package/dist/index67.d.cts.map +1 -1
- package/dist/index67.d.ts +8 -8
- package/dist/index67.d.ts.map +1 -1
- package/dist/index68.d.cts +7 -7
- package/dist/index68.d.ts +7 -7
- package/dist/index68.d.ts.map +1 -1
- package/dist/index7.d.cts +8 -8
- package/dist/index7.d.cts.map +1 -1
- package/dist/index7.d.ts +8 -8
- package/dist/index7.d.ts.map +1 -1
- package/dist/index70.d.cts +8 -8
- package/dist/index70.d.ts +8 -8
- package/dist/index8.d.cts +4 -4
- package/dist/index8.d.ts +4 -4
- package/dist/index8.d.ts.map +1 -1
- package/dist/index9.d.cts +2 -2
- package/dist/index9.d.cts.map +1 -1
- package/dist/index9.d.ts +2 -2
- package/dist/index9.d.ts.map +1 -1
- 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 +13 -13
- package/dist/patterns/MediaObject/index.d.ts.map +1 -1
- package/dist/patterns/SectionCard/index.d.cts +2 -2
- package/dist/patterns/SectionCard/index.d.ts +2 -2
- package/dist/patterns/SectionCard/index.d.ts.map +1 -1
- package/dist/patterns/SectionHeading/index.d.cts +2 -2
- package/dist/patterns/SectionHeading/index.d.ts +2 -2
- package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
- package/dist/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/index.css +3 -0
- package/dist/styles/semantic.css +23 -12
- package/dist/styles/theme.css +43 -4
- package/dist/styles/tokens/border-radius.css +2 -1
- package/dist/styles/tokens/mode-dark.css +1 -1
- package/dist/styles/typography.css +136 -0
- package/package.json +7 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ProgressPrimitive"],"sources":["../../../src/primitives/Progress/Progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst progressIndicatorVariants = {\n default: \"bg-primary\",\n // Filled in the active product's brand colour.\n brand: \"bg-brand-surface\",\n // Status colours (mode-aware, shared with Badge/Text).\n success: \"bg-[var(--content-success)]\",\n warning: \"bg-[var(--content-warning)]\",\n info: \"bg-[var(--content-info)]\",\n destructive: \"bg-destructive\",\n // Activity colours (Helix data pipeline states).\n analyzing: \"bg-[var(--progress-analyzing)]\",\n ingesting: \"bg-[var(--progress-ingesting)]\",\n} as const;\n\nconst progressTrackVariants = {\n default: \"bg-
|
|
1
|
+
{"version":3,"file":"index.js","names":["ProgressPrimitive"],"sources":["../../../src/primitives/Progress/Progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst progressIndicatorVariants = {\n default: \"bg-primary\",\n // Filled in the active product's brand colour.\n brand: \"bg-brand-surface\",\n // Status colours (mode-aware, shared with Badge/Text).\n success: \"bg-[var(--content-success)]\",\n warning: \"bg-[var(--content-warning)]\",\n info: \"bg-[var(--content-info)]\",\n destructive: \"bg-destructive\",\n // Activity colours (Helix data pipeline states).\n analyzing: \"bg-[var(--progress-analyzing)]\",\n ingesting: \"bg-[var(--progress-ingesting)]\",\n} as const;\n\nconst progressTrackVariants = {\n // Track uses the border-3 grey (Figma) rather than the muted surface.\n default: \"bg-input\",\n brand: \"bg-brand-surface/15\",\n success: \"bg-[var(--content-success)]/15\",\n warning: \"bg-[var(--content-warning)]/15\",\n info: \"bg-[var(--content-info)]/15\",\n destructive: \"bg-destructive/15\",\n analyzing: \"bg-primary/20\",\n ingesting: \"bg-primary/20\",\n} as const;\n\n/** Determinate or indeterminate progress bar built on Radix Progress, with semantic, brand, and activity colour variants. */\nfunction Progress({\n className,\n value,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root> & {\n /** Fill colour: `default`, `brand`, status (`success`/`warning`/`info`/`destructive`), or activity (`analyzing`/`ingesting`). */\n variant?: keyof typeof progressIndicatorVariants;\n}) {\n // No `value` → indeterminate: a sliding segment signalling ongoing work.\n const indeterminate = value == null;\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n value={value}\n className={cn(\n \"relative h-2 w-full overflow-hidden rounded-full\",\n progressTrackVariants[variant],\n className,\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={cn(\n \"h-full flex-1 transition-all\",\n progressIndicatorVariants[variant],\n indeterminate ? \"progress-indeterminate rounded-full\" : \"w-full\",\n )}\n style={indeterminate ? undefined : { transform: `translateX(-${100 - (value ?? 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n}\n\nexport { Progress };\n"],"mappings":";;;;AAKA,MAAM,4BAA4B;CAChC,SAAS;CAET,OAAO;CAEP,SAAS;CACT,SAAS;CACT,MAAM;CACN,aAAa;CAEb,WAAW;CACX,WAAW;AACb;AAEA,MAAM,wBAAwB;CAE5B,SAAS;CACT,OAAO;CACP,SAAS;CACT,SAAS;CACT,MAAM;CACN,aAAa;CACb,WAAW;CACX,WAAW;AACb;;AAGA,SAAS,SAAS,EAChB,WACA,OACA,UAAU,WACV,GAAG,SAIF;CAED,MAAM,gBAAgB,SAAS;CAC/B,OACE,oBAACA,WAAkB,MAAnB;EACE,aAAU;EACH;EACP,WAAW,GACT,oDACA,sBAAsB,UACtB,SACF;EACA,GAAI;YAEJ,oBAACA,WAAkB,WAAnB;GACE,aAAU;GACV,WAAW,GACT,gCACA,0BAA0B,UAC1B,gBAAgB,wCAAwC,QAC1D;GACA,OAAO,gBAAgB,KAAA,IAAY,EAAE,WAAW,eAAe,OAAO,SAAS,GAAG,IAAI;EACvF,CAAA;CACqB,CAAA;AAE5B"}
|
|
@@ -19,7 +19,7 @@ function RadioGroup({ className, orientation = "vertical", ...props }) {
|
|
|
19
19
|
function RadioGroupItem({ className, ...props }) {
|
|
20
20
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.RadioGroup.Item, {
|
|
21
21
|
"data-slot": "radio-group-item",
|
|
22
|
-
className: require_cn.cn("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-
|
|
22
|
+
className: require_cn.cn("aspect-square size-4 shrink-0 rounded-full border border-input bg-input-background text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-ring-error", className),
|
|
23
23
|
...props,
|
|
24
24
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.RadioGroup.Indicator, {
|
|
25
25
|
"data-slot": "radio-group-indicator",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["RadioGroupPrimitive","cn","CircleIcon"],"sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { CircleIcon } from \"lucide-react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */\nfunction RadioGroup({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n /** Stack the items in a column (`vertical`) or wrap them in a row (`horizontal`). */\n orientation?: \"vertical\" | \"horizontal\";\n}) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-row flex-wrap gap-4 items-center\" : \"grid gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single selectable radio control; pair it with a label for accessible option text. */\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["RadioGroupPrimitive","cn","CircleIcon"],"sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { CircleIcon } from \"lucide-react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */\nfunction RadioGroup({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n /** Stack the items in a column (`vertical`) or wrap them in a row (`horizontal`). */\n orientation?: \"vertical\" | \"horizontal\";\n}) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-row flex-wrap gap-4 items-center\" : \"grid gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single selectable radio control; pair it with a label for accessible option text. */\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"aspect-square size-4 shrink-0 rounded-full border border-input bg-input-background text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-ring-error\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <CircleIcon className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\n/** A card-style radio option with a bordered surface, title, and description that highlights when checked. */\nfunction RichRadioItem({\n className,\n value,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: Omit<React.ComponentProps<typeof RadioGroupPrimitive.Item>, \"children\"> & {\n /** Value submitted when this option is selected. */\n value: string;\n /** Bold heading shown at the top of the card. */\n title?: React.ReactNode;\n /** Secondary muted text shown beneath the title. */\n description?: React.ReactNode;\n /** Place the radio control on the trailing edge instead of the leading edge. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const itemId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-radio-item\"\n htmlFor={itemId}\n className={cn(\n \"flex cursor-pointer items-start gap-3 rounded-lg border border-input bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <RadioGroupItem\n data-slot=\"rich-radio-item-control\"\n id={itemId}\n value={value}\n className=\"mt-0.5\"\n {...props}\n />\n <span data-slot=\"rich-radio-item-content\" className=\"flex flex-col gap-1\">\n {title != null && (\n <span data-slot=\"rich-radio-item-title\" className=\"font-medium text-sm leading-none\">\n {title}\n </span>\n )}\n {description != null && (\n <span data-slot=\"rich-radio-item-description\" className=\"text-sm text-muted-foreground\">\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { RadioGroup, RadioGroupItem, RichRadioItem };\n"],"mappings":";;;;;;;;AAQA,SAAS,WAAW,EAClB,WACA,cAAc,YACd,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,WAAoB,MAArB;EACE,aAAU;EACV,oBAAkB;EACL;EACb,WAAWC,WAAAA,GACT,gBAAgB,eAAe,+CAA+C,cAC9E,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EACtB,WACA,GAAG,SACqD;CACxD,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,WAAoB,MAArB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,mVACA,SACF;EACA,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAACD,SAAAA,WAAoB,WAArB;GACE,aAAU;GACV,WAAU;aAEV,iBAAA,GAAA,kBAAA,KAACE,aAAAA,YAAD,EAAY,WAAU,kFAAmF,CAAA;EAC5E,CAAA;CACP,CAAA;AAE9B;;AAGA,SAAS,cAAc,EACrB,WACA,OACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAUF;CACD,MAAM,eAAA,GAAA,MAAA,OAAoB;CAC1B,MAAM,SAAS,MAAM;CACrB,OACE,iBAAA,GAAA,kBAAA,MAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAWD,WAAAA,GACT,qRACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,iBAAA,GAAA,kBAAA,KAAC,gBAAD;GACE,aAAU;GACV,IAAI;GACG;GACP,WAAU;GACV,GAAI;EACL,CAAA,GACD,iBAAA,GAAA,kBAAA,MAAC,QAAD;GAAM,aAAU;GAA0B,WAAU;aAApD,CACG,SAAS,QACR,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAAwB,WAAU;cAC/C;GACG,CAAA,GAEP,eAAe,QACd,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAA8B,WAAU;cACrD;GACG,CAAA,CAEJ;IACD;;AAEX"}
|
|
@@ -18,7 +18,7 @@ function RadioGroup({ className, orientation = "vertical", ...props }) {
|
|
|
18
18
|
function RadioGroupItem({ className, ...props }) {
|
|
19
19
|
return /* @__PURE__ */ jsx(RadioGroup$1.Item, {
|
|
20
20
|
"data-slot": "radio-group-item",
|
|
21
|
-
className: cn("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-
|
|
21
|
+
className: cn("aspect-square size-4 shrink-0 rounded-full border border-input bg-input-background text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-ring-error", className),
|
|
22
22
|
...props,
|
|
23
23
|
children: /* @__PURE__ */ jsx(RadioGroup$1.Indicator, {
|
|
24
24
|
"data-slot": "radio-group-indicator",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["RadioGroupPrimitive"],"sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { CircleIcon } from \"lucide-react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */\nfunction RadioGroup({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n /** Stack the items in a column (`vertical`) or wrap them in a row (`horizontal`). */\n orientation?: \"vertical\" | \"horizontal\";\n}) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-row flex-wrap gap-4 items-center\" : \"grid gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single selectable radio control; pair it with a label for accessible option text. */\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-
|
|
1
|
+
{"version":3,"file":"index.js","names":["RadioGroupPrimitive"],"sources":["../../../src/primitives/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { CircleIcon } from \"lucide-react\";\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of a set of mutually-exclusive radio options; lays them out vertically or horizontally. */\nfunction RadioGroup({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n /** Stack the items in a column (`vertical`) or wrap them in a row (`horizontal`). */\n orientation?: \"vertical\" | \"horizontal\";\n}) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-row flex-wrap gap-4 items-center\" : \"grid gap-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/** A single selectable radio control; pair it with a label for accessible option text. */\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"aspect-square size-4 shrink-0 rounded-full border border-input bg-input-background text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-ring-error\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <CircleIcon className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\n/** A card-style radio option with a bordered surface, title, and description that highlights when checked. */\nfunction RichRadioItem({\n className,\n value,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: Omit<React.ComponentProps<typeof RadioGroupPrimitive.Item>, \"children\"> & {\n /** Value submitted when this option is selected. */\n value: string;\n /** Bold heading shown at the top of the card. */\n title?: React.ReactNode;\n /** Secondary muted text shown beneath the title. */\n description?: React.ReactNode;\n /** Place the radio control on the trailing edge instead of the leading edge. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const itemId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-radio-item\"\n htmlFor={itemId}\n className={cn(\n \"flex cursor-pointer items-start gap-3 rounded-lg border border-input bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <RadioGroupItem\n data-slot=\"rich-radio-item-control\"\n id={itemId}\n value={value}\n className=\"mt-0.5\"\n {...props}\n />\n <span data-slot=\"rich-radio-item-content\" className=\"flex flex-col gap-1\">\n {title != null && (\n <span data-slot=\"rich-radio-item-title\" className=\"font-medium text-sm leading-none\">\n {title}\n </span>\n )}\n {description != null && (\n <span data-slot=\"rich-radio-item-description\" className=\"text-sm text-muted-foreground\">\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { RadioGroup, RadioGroupItem, RichRadioItem };\n"],"mappings":";;;;;;;AAQA,SAAS,WAAW,EAClB,WACA,cAAc,YACd,GAAG,SAIF;CACD,OACE,oBAACA,aAAoB,MAArB;EACE,aAAU;EACV,oBAAkB;EACL;EACb,WAAW,GACT,gBAAgB,eAAe,+CAA+C,cAC9E,SACF;EACA,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EACtB,WACA,GAAG,SACqD;CACxD,OACE,oBAACA,aAAoB,MAArB;EACE,aAAU;EACV,WAAW,GACT,mVACA,SACF;EACA,GAAI;YAEJ,oBAACA,aAAoB,WAArB;GACE,aAAU;GACV,WAAU;aAEV,oBAAC,YAAD,EAAY,WAAU,kFAAmF,CAAA;EAC5E,CAAA;CACP,CAAA;AAE9B;;AAGA,SAAS,cAAc,EACrB,WACA,OACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAUF;CACD,MAAM,cAAc,MAAM;CAC1B,MAAM,SAAS,MAAM;CACrB,OACE,qBAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAW,GACT,qRACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,oBAAC,gBAAD;GACE,aAAU;GACV,IAAI;GACG;GACP,WAAU;GACV,GAAI;EACL,CAAA,GACD,qBAAC,QAAD;GAAM,aAAU;GAA0B,WAAU;aAApD,CACG,SAAS,QACR,oBAAC,QAAD;IAAM,aAAU;IAAwB,WAAU;cAC/C;GACG,CAAA,GAEP,eAAe,QACd,oBAAC,QAAD;IAAM,aAAU;IAA8B,WAAU;cACrD;GACG,CAAA,CAEJ;IACD;;AAEX"}
|
|
@@ -29,7 +29,7 @@ function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
|
29
29
|
...props,
|
|
30
30
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.ScrollArea.ScrollAreaThumb, {
|
|
31
31
|
"data-slot": "scroll-area-thumb",
|
|
32
|
-
className: "relative flex-1 rounded-
|
|
32
|
+
className: "relative flex-1 rounded-sm bg-border"
|
|
33
33
|
})
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["ScrollAreaPrimitive","cn"],"sources":["../../../src/primitives/ScrollArea/ScrollArea.tsx"],"sourcesContent":["import { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Custom-styled scroll container: a viewport with a slim, auto-hiding scrollbar. */\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\n/** A single scrollbar track + thumb for the ScrollArea, vertical or horizontal. */\nfunction ScrollBar({\n className,\n /** Axis the scrollbar controls; defaults to `\"vertical\"`. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["ScrollAreaPrimitive","cn"],"sources":["../../../src/primitives/ScrollArea/ScrollArea.tsx"],"sourcesContent":["import { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Custom-styled scroll container: a viewport with a slim, auto-hiding scrollbar. */\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\n/** A single scrollbar track + thumb for the ScrollArea, vertical or horizontal. */\nfunction ScrollBar({\n className,\n /** Axis the scrollbar controls; defaults to `\"vertical\"`. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-sm bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;;AAMA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACqD;CACxD,OACE,iBAAA,GAAA,kBAAA,MAACA,SAAAA,WAAoB,MAArB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,YAAY,SAAS;EACnC,GAAI;YAHN;GAKE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,WAAoB,UAArB;IACE,aAAU;IACV,WAAU;IAET;GAC2B,CAAA;GAC9B,iBAAA,GAAA,kBAAA,KAAC,WAAD,CAAY,CAAA;GACZ,iBAAA,GAAA,kBAAA,KAACA,SAAAA,WAAoB,QAArB,CAA6B,CAAA;EACL;;AAE9B;;AAGA,SAAS,UAAU,EACjB,WAEA,cAAc,YACd,GAAG,SACoE;CACvE,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,WAAoB,qBAArB;EACE,aAAU;EACG;EACb,WAAWC,WAAAA,GACT,sDACA,gBAAgB,cAAc,8CAC9B,gBAAgB,gBAAgB,gDAChC,SACF;EACA,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAACD,SAAAA,WAAoB,iBAArB;GACE,aAAU;GACV,WAAU;EACX,CAAA;CACsC,CAAA;AAE7C"}
|
|
@@ -28,7 +28,7 @@ function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
|
28
28
|
...props,
|
|
29
29
|
children: /* @__PURE__ */ jsx(ScrollArea$1.ScrollAreaThumb, {
|
|
30
30
|
"data-slot": "scroll-area-thumb",
|
|
31
|
-
className: "relative flex-1 rounded-
|
|
31
|
+
className: "relative flex-1 rounded-sm bg-border"
|
|
32
32
|
})
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ScrollAreaPrimitive"],"sources":["../../../src/primitives/ScrollArea/ScrollArea.tsx"],"sourcesContent":["import { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Custom-styled scroll container: a viewport with a slim, auto-hiding scrollbar. */\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\n/** A single scrollbar track + thumb for the ScrollArea, vertical or horizontal. */\nfunction ScrollBar({\n className,\n /** Axis the scrollbar controls; defaults to `\"vertical\"`. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-
|
|
1
|
+
{"version":3,"file":"index.js","names":["ScrollAreaPrimitive"],"sources":["../../../src/primitives/ScrollArea/ScrollArea.tsx"],"sourcesContent":["import { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Custom-styled scroll container: a viewport with a slim, auto-hiding scrollbar. */\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\n/** A single scrollbar track + thumb for the ScrollArea, vertical or horizontal. */\nfunction ScrollBar({\n className,\n /** Axis the scrollbar controls; defaults to `\"vertical\"`. */\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none\",\n orientation === \"vertical\" && \"h-full w-2.5 border-l border-l-transparent\",\n orientation === \"horizontal\" && \"h-2.5 flex-col border-t border-t-transparent\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-sm bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n"],"mappings":";;;;;AAMA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACqD;CACxD,OACE,qBAACA,aAAoB,MAArB;EACE,aAAU;EACV,WAAW,GAAG,YAAY,SAAS;EACnC,GAAI;YAHN;GAKE,oBAACA,aAAoB,UAArB;IACE,aAAU;IACV,WAAU;IAET;GAC2B,CAAA;GAC9B,oBAAC,WAAD,CAAY,CAAA;GACZ,oBAACA,aAAoB,QAArB,CAA6B,CAAA;EACL;;AAE9B;;AAGA,SAAS,UAAU,EACjB,WAEA,cAAc,YACd,GAAG,SACoE;CACvE,OACE,oBAACA,aAAoB,qBAArB;EACE,aAAU;EACG;EACb,WAAW,GACT,sDACA,gBAAgB,cAAc,8CAC9B,gBAAgB,gBAAgB,gDAChC,SACF;EACA,GAAI;YAEJ,oBAACA,aAAoB,iBAArB;GACE,aAAU;GACV,WAAU;EACX,CAAA;CACsC,CAAA;AAE7C"}
|
|
@@ -31,7 +31,7 @@ function SelectTrigger({ className, size = "default", width = "full", label, chi
|
|
|
31
31
|
"data-slot": "select-trigger",
|
|
32
32
|
"data-size": size,
|
|
33
33
|
"data-lines": label ? "2" : "1",
|
|
34
|
-
className: require_cn.cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-
|
|
34
|
+
className: require_cn.cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-ring-error aria-invalid:border-destructive flex items-center justify-between gap-2 rounded-xl border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 data-[size=default]:h-9 data-[size=lg]:h-10 data-[lines=2]:h-auto data-[lines=2]:py-1.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", width === "full" ? "w-full" : "w-fit", className),
|
|
35
35
|
...props,
|
|
36
36
|
children: [label ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
37
37
|
className: "flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["SelectPrimitive","cn","ChevronDownIcon","CheckIcon","ChevronUpIcon"],"sources":["../../../src/primitives/Select/Select.tsx"],"sourcesContent":["import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\nimport { Select as SelectPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of the select. Holds the open/value state and wires the trigger to the content. */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related items under a shared `SelectLabel` for sectioned menus. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the selected value (or the `placeholder`) inside the trigger. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/** The clickable control that opens the menu and shows the current value. */\nfunction SelectTrigger({\n className,\n size = \"default\",\n width = \"full\",\n label,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Trigger height: `sm` (h-8), `default` (h-9), or `lg` (h-10). */\n size?: \"sm\" | \"default\" | \"lg\";\n /** Trigger width: `full` stretches to the container, `fit` hugs the value. */\n width?: \"full\" | \"fit\";\n /** Optional stacked label rendered above the value (2-line trigger). */\n label?: React.ReactNode;\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n data-lines={label ? \"2\" : \"1\"}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 data-[size=default]:h-9 data-[size=lg]:h-10 data-[lines=2]:h-auto data-[lines=2]:py-1.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n width === \"full\" ? \"w-full\" : \"w-fit\",\n className,\n )}\n {...props}\n >\n {label ? (\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left\">\n <span className=\"text-xs leading-none font-normal text-muted-foreground\">{label}</span>\n <span className=\"flex w-full items-center gap-2 text-sm\">{children}</span>\n </span>\n ) : (\n children\n )}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** The portalled popover that holds the list of items. */\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** A non-interactive heading for a `SelectGroup`. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable option; its `value` becomes the select's value when chosen. */\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\n/** A thin divider rule between groups or items. */\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\n/** Auto-shown scroll affordance at the top of a long, overflowing list. */\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\n/** Auto-shown scroll affordance at the bottom of a long, overflowing list. */\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;;AAOA,SAAS,OAAO,EAAE,GAAG,SAA4D;CAC/E,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,QAAQ,QACR,OACA,UACA,GAAG,SAQF;CACD,OACE,iBAAA,GAAA,kBAAA,MAACA,SAAAA,OAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,cAAY,QAAQ,MAAM;EAC1B,WAAWC,WAAAA,GACT,q2BACA,UAAU,SAAS,WAAW,SAC9B,SACF;EACA,GAAI;YATN,CAWG,QACC,iBAAA,GAAA,kBAAA,MAAC,QAAD;GAAM,WAAU;aAAhB,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;cAA0D;GAAY,CAAA,GACtF,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;IAA0C;GAAe,CAAA,CACrE;OAEN,UAEF,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,MAAjB;GAAsB,SAAA;aACpB,iBAAA,GAAA,kBAAA,KAACE,aAAAA,iBAAD,EAAiB,WAAU,oBAAqB,CAAA;EAC5B,CAAA,CACC;;AAE7B;;AAGA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,UACX,GAAG,SACoD;CACvD,OACE,iBAAA,GAAA,kBAAA,KAACF,SAAAA,OAAgB,QAAjB,EAAA,UACE,iBAAA,GAAA,kBAAA,MAACA,SAAAA,OAAgB,SAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,ijBACA,aAAa,YACX,mIACF,SACF;EACU;EACV,GAAI;YATN;GAWE,iBAAA,GAAA,kBAAA,KAAC,sBAAD,CAAuB,CAAA;GACvB,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,UAAjB;IACE,WAAWC,WAAAA,GACT,OACA,aAAa,YACX,qGACJ;IAEC;GACuB,CAAA;GAC1B,iBAAA,GAAA,kBAAA,KAAC,wBAAD,CAAyB,CAAA;EACF;IACH,CAAA;AAE5B;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,OAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,iBAAA,GAAA,kBAAA,MAACD,SAAAA,OAAgB,MAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,6aACA,SACF;EACA,GAAI;YANN,CAQE,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aACd,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,eAAjB,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACG,aAAAA,WAAD,EAAW,WAAU,SAAU,CAAA,EACF,CAAA;EAC3B,CAAA,GACN,iBAAA,GAAA,kBAAA,KAACH,SAAAA,OAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;;AAGA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,WAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,gBAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAACG,aAAAA,eAAD,EAAe,WAAU,SAAU,CAAA;CACL,CAAA;AAEpC;;AAGA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,iBAAA,GAAA,kBAAA,KAACJ,SAAAA,OAAgB,kBAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAACC,aAAAA,iBAAD,EAAiB,WAAU,SAAU,CAAA;CACL,CAAA;AAEtC"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["SelectPrimitive","cn","ChevronDownIcon","CheckIcon","ChevronUpIcon"],"sources":["../../../src/primitives/Select/Select.tsx"],"sourcesContent":["import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\nimport { Select as SelectPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of the select. Holds the open/value state and wires the trigger to the content. */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related items under a shared `SelectLabel` for sectioned menus. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the selected value (or the `placeholder`) inside the trigger. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/** The clickable control that opens the menu and shows the current value. */\nfunction SelectTrigger({\n className,\n size = \"default\",\n width = \"full\",\n label,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Trigger height: `sm` (h-8), `default` (h-9), or `lg` (h-10). */\n size?: \"sm\" | \"default\" | \"lg\";\n /** Trigger width: `full` stretches to the container, `fit` hugs the value. */\n width?: \"full\" | \"fit\";\n /** Optional stacked label rendered above the value (2-line trigger). */\n label?: React.ReactNode;\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n data-lines={label ? \"2\" : \"1\"}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-ring-error aria-invalid:border-destructive flex items-center justify-between gap-2 rounded-xl border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 data-[size=default]:h-9 data-[size=lg]:h-10 data-[lines=2]:h-auto data-[lines=2]:py-1.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n width === \"full\" ? \"w-full\" : \"w-fit\",\n className,\n )}\n {...props}\n >\n {label ? (\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left\">\n <span className=\"text-xs leading-none font-normal text-muted-foreground\">{label}</span>\n <span className=\"flex w-full items-center gap-2 text-sm\">{children}</span>\n </span>\n ) : (\n children\n )}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** The portalled popover that holds the list of items. */\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** A non-interactive heading for a `SelectGroup`. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable option; its `value` becomes the select's value when chosen. */\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\n/** A thin divider rule between groups or items. */\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\n/** Auto-shown scroll affordance at the top of a long, overflowing list. */\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\n/** Auto-shown scroll affordance at the bottom of a long, overflowing list. */\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;;AAOA,SAAS,OAAO,EAAE,GAAG,SAA4D;CAC/E,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,QAAQ,QACR,OACA,UACA,GAAG,SAQF;CACD,OACE,iBAAA,GAAA,kBAAA,MAACA,SAAAA,OAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,cAAY,QAAQ,MAAM;EAC1B,WAAWC,WAAAA,GACT,mxBACA,UAAU,SAAS,WAAW,SAC9B,SACF;EACA,GAAI;YATN,CAWG,QACC,iBAAA,GAAA,kBAAA,MAAC,QAAD;GAAM,WAAU;aAAhB,CACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;cAA0D;GAAY,CAAA,GACtF,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,WAAU;IAA0C;GAAe,CAAA,CACrE;OAEN,UAEF,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,MAAjB;GAAsB,SAAA;aACpB,iBAAA,GAAA,kBAAA,KAACE,aAAAA,iBAAD,EAAiB,WAAU,oBAAqB,CAAA;EAC5B,CAAA,CACC;;AAE7B;;AAGA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,UACX,GAAG,SACoD;CACvD,OACE,iBAAA,GAAA,kBAAA,KAACF,SAAAA,OAAgB,QAAjB,EAAA,UACE,iBAAA,GAAA,kBAAA,MAACA,SAAAA,OAAgB,SAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,ijBACA,aAAa,YACX,mIACF,SACF;EACU;EACV,GAAI;YATN;GAWE,iBAAA,GAAA,kBAAA,KAAC,sBAAD,CAAuB,CAAA;GACvB,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,UAAjB;IACE,WAAWC,WAAAA,GACT,OACA,aAAa,YACX,qGACJ;IAEC;GACuB,CAAA;GAC1B,iBAAA,GAAA,kBAAA,KAAC,wBAAD,CAAyB,CAAA;EACF;IACH,CAAA;AAE5B;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,OAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,iBAAA,GAAA,kBAAA,MAACD,SAAAA,OAAgB,MAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GACT,6aACA,SACF;EACA,GAAI;YANN,CAQE,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aACd,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,eAAjB,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACG,aAAAA,WAAD,EAAW,WAAU,SAAU,CAAA,EACF,CAAA;EAC3B,CAAA,GACN,iBAAA,GAAA,kBAAA,KAACH,SAAAA,OAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;;AAGA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,WAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,gBAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAACG,aAAAA,eAAD,EAAe,WAAU,SAAU,CAAA;CACL,CAAA;AAEpC;;AAGA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,iBAAA,GAAA,kBAAA,KAACJ,SAAAA,OAAgB,kBAAjB;EACE,aAAU;EACV,WAAWC,WAAAA,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAACC,aAAAA,iBAAD,EAAiB,WAAU,SAAU,CAAA;CACL,CAAA;AAEtC"}
|
|
@@ -30,7 +30,7 @@ function SelectTrigger({ className, size = "default", width = "full", label, chi
|
|
|
30
30
|
"data-slot": "select-trigger",
|
|
31
31
|
"data-size": size,
|
|
32
32
|
"data-lines": label ? "2" : "1",
|
|
33
|
-
className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-
|
|
33
|
+
className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-ring-error aria-invalid:border-destructive flex items-center justify-between gap-2 rounded-xl border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 data-[size=default]:h-9 data-[size=lg]:h-10 data-[lines=2]:h-auto data-[lines=2]:py-1.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", width === "full" ? "w-full" : "w-fit", className),
|
|
34
34
|
...props,
|
|
35
35
|
children: [label ? /* @__PURE__ */ jsxs("span", {
|
|
36
36
|
className: "flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["SelectPrimitive"],"sources":["../../../src/primitives/Select/Select.tsx"],"sourcesContent":["import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\nimport { Select as SelectPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of the select. Holds the open/value state and wires the trigger to the content. */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related items under a shared `SelectLabel` for sectioned menus. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the selected value (or the `placeholder`) inside the trigger. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/** The clickable control that opens the menu and shows the current value. */\nfunction SelectTrigger({\n className,\n size = \"default\",\n width = \"full\",\n label,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Trigger height: `sm` (h-8), `default` (h-9), or `lg` (h-10). */\n size?: \"sm\" | \"default\" | \"lg\";\n /** Trigger width: `full` stretches to the container, `fit` hugs the value. */\n width?: \"full\" | \"fit\";\n /** Optional stacked label rendered above the value (2-line trigger). */\n label?: React.ReactNode;\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n data-lines={label ? \"2\" : \"1\"}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 data-[size=default]:h-9 data-[size=lg]:h-10 data-[lines=2]:h-auto data-[lines=2]:py-1.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n width === \"full\" ? \"w-full\" : \"w-fit\",\n className,\n )}\n {...props}\n >\n {label ? (\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left\">\n <span className=\"text-xs leading-none font-normal text-muted-foreground\">{label}</span>\n <span className=\"flex w-full items-center gap-2 text-sm\">{children}</span>\n </span>\n ) : (\n children\n )}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** The portalled popover that holds the list of items. */\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** A non-interactive heading for a `SelectGroup`. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable option; its `value` becomes the select's value when chosen. */\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\n/** A thin divider rule between groups or items. */\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\n/** Auto-shown scroll affordance at the top of a long, overflowing list. */\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\n/** Auto-shown scroll affordance at the bottom of a long, overflowing list. */\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;AAOA,SAAS,OAAO,EAAE,GAAG,SAA4D;CAC/E,OAAO,oBAACA,SAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,oBAACA,SAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,oBAACA,SAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,QAAQ,QACR,OACA,UACA,GAAG,SAQF;CACD,OACE,qBAACA,SAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,cAAY,QAAQ,MAAM;EAC1B,WAAW,GACT,q2BACA,UAAU,SAAS,WAAW,SAC9B,SACF;EACA,GAAI;YATN,CAWG,QACC,qBAAC,QAAD;GAAM,WAAU;aAAhB,CACE,oBAAC,QAAD;IAAM,WAAU;cAA0D;GAAY,CAAA,GACtF,oBAAC,QAAD;IAAM,WAAU;IAA0C;GAAe,CAAA,CACrE;OAEN,UAEF,oBAACA,SAAgB,MAAjB;GAAsB,SAAA;aACpB,oBAAC,iBAAD,EAAiB,WAAU,oBAAqB,CAAA;EAC5B,CAAA,CACC;;AAE7B;;AAGA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,UACX,GAAG,SACoD;CACvD,OACE,oBAACA,SAAgB,QAAjB,EAAA,UACE,qBAACA,SAAgB,SAAjB;EACE,aAAU;EACV,WAAW,GACT,ijBACA,aAAa,YACX,mIACF,SACF;EACU;EACV,GAAI;YATN;GAWE,oBAAC,sBAAD,CAAuB,CAAA;GACvB,oBAACA,SAAgB,UAAjB;IACE,WAAW,GACT,OACA,aAAa,YACX,qGACJ;IAEC;GACuB,CAAA;GAC1B,oBAAC,wBAAD,CAAyB,CAAA;EACF;IACH,CAAA;AAE5B;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,qBAACA,SAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT,6aACA,SACF;EACA,GAAI;YANN,CAQE,oBAAC,QAAD;GAAM,WAAU;aACd,oBAACA,SAAgB,eAAjB,EAAA,UACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,EACF,CAAA;EAC3B,CAAA,GACN,oBAACA,SAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;;AAGA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,oBAACA,SAAgB,WAAjB;EACE,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAACA,SAAgB,gBAAjB;EACE,aAAU;EACV,WAAW,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,oBAAC,eAAD,EAAe,WAAU,SAAU,CAAA;CACL,CAAA;AAEpC;;AAGA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAACA,SAAgB,kBAAjB;EACE,aAAU;EACV,WAAW,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,oBAAC,iBAAD,EAAiB,WAAU,SAAU,CAAA;CACL,CAAA;AAEtC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["SelectPrimitive"],"sources":["../../../src/primitives/Select/Select.tsx"],"sourcesContent":["import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from \"lucide-react\";\nimport { Select as SelectPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** Root of the select. Holds the open/value state and wires the trigger to the content. */\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\n/** Groups related items under a shared `SelectLabel` for sectioned menus. */\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\n/** Renders the selected value (or the `placeholder`) inside the trigger. */\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\n/** The clickable control that opens the menu and shows the current value. */\nfunction SelectTrigger({\n className,\n size = \"default\",\n width = \"full\",\n label,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n /** Trigger height: `sm` (h-8), `default` (h-9), or `lg` (h-10). */\n size?: \"sm\" | \"default\" | \"lg\";\n /** Trigger width: `full` stretches to the container, `fit` hugs the value. */\n width?: \"full\" | \"fit\";\n /** Optional stacked label rendered above the value (2-line trigger). */\n label?: React.ReactNode;\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n data-lines={label ? \"2\" : \"1\"}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-ring-error aria-invalid:border-destructive flex items-center justify-between gap-2 rounded-xl border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 data-[size=default]:h-9 data-[size=lg]:h-10 data-[lines=2]:h-auto data-[lines=2]:py-1.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n width === \"full\" ? \"w-full\" : \"w-fit\",\n className,\n )}\n {...props}\n >\n {label ? (\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5 text-left\">\n <span className=\"text-xs leading-none font-normal text-muted-foreground\">{label}</span>\n <span className=\"flex w-full items-center gap-2 text-sm\">{children}</span>\n </span>\n ) : (\n children\n )}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\n/** The portalled popover that holds the list of items. */\nfunction SelectContent({\n className,\n children,\n position = \"popper\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\n/** A non-interactive heading for a `SelectGroup`. */\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n );\n}\n\n/** A selectable option; its `value` becomes the select's value when chosen. */\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\n/** A thin divider rule between groups or items. */\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border pointer-events-none -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\n/** Auto-shown scroll affordance at the top of a long, overflowing list. */\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\n/** Auto-shown scroll affordance at the bottom of a long, overflowing list. */\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\"flex cursor-default items-center justify-center py-1\", className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;AAOA,SAAS,OAAO,EAAE,GAAG,SAA4D;CAC/E,OAAO,oBAACA,SAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,oBAACA,SAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,YAAY,EAAE,GAAG,SAA6D;CACrF,OAAO,oBAACA,SAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;;AAGA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,QAAQ,QACR,OACA,UACA,GAAG,SAQF;CACD,OACE,qBAACA,SAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,cAAY,QAAQ,MAAM;EAC1B,WAAW,GACT,mxBACA,UAAU,SAAS,WAAW,SAC9B,SACF;EACA,GAAI;YATN,CAWG,QACC,qBAAC,QAAD;GAAM,WAAU;aAAhB,CACE,oBAAC,QAAD;IAAM,WAAU;cAA0D;GAAY,CAAA,GACtF,oBAAC,QAAD;IAAM,WAAU;IAA0C;GAAe,CAAA,CACrE;OAEN,UAEF,oBAACA,SAAgB,MAAjB;GAAsB,SAAA;aACpB,oBAAC,iBAAD,EAAiB,WAAU,oBAAqB,CAAA;EAC5B,CAAA,CACC;;AAE7B;;AAGA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,UACX,GAAG,SACoD;CACvD,OACE,oBAACA,SAAgB,QAAjB,EAAA,UACE,qBAACA,SAAgB,SAAjB;EACE,aAAU;EACV,WAAW,GACT,ijBACA,aAAa,YACX,mIACF,SACF;EACU;EACV,GAAI;YATN;GAWE,oBAAC,sBAAD,CAAuB,CAAA;GACvB,oBAACA,SAAgB,UAAjB;IACE,WAAW,GACT,OACA,aAAa,YACX,qGACJ;IAEC;GACuB,CAAA;GAC1B,oBAAC,wBAAD,CAAyB,CAAA;EACF;IACH,CAAA;AAE5B;;AAGA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA6D;CAChG,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,qBAACA,SAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT,6aACA,SACF;EACA,GAAI;YANN,CAQE,oBAAC,QAAD;GAAM,WAAU;aACd,oBAACA,SAAgB,eAAjB,EAAA,UACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,EACF,CAAA;EAC3B,CAAA,GACN,oBAACA,SAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;;AAGA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,oBAACA,SAAgB,WAAjB;EACE,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAACA,SAAgB,gBAAjB;EACE,aAAU;EACV,WAAW,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,oBAAC,eAAD,EAAe,WAAU,SAAU,CAAA;CACL,CAAA;AAEpC;;AAGA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAACA,SAAgB,kBAAjB;EACE,aAAU;EACV,WAAW,GAAG,wDAAwD,SAAS;EAC/E,GAAI;YAEJ,oBAAC,iBAAD,EAAiB,WAAU,SAAU,CAAA;CACL,CAAA;AAEtC"}
|
|
@@ -6,7 +6,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
6
6
|
function Skeleton({ className, ...props }) {
|
|
7
7
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8
8
|
"data-slot": "skeleton",
|
|
9
|
-
className: require_cn.cn("skeleton-shimmer rounded-
|
|
9
|
+
className: require_cn.cn("skeleton-shimmer rounded-lg", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -30,7 +30,7 @@ function SkeletonLine({ className, ...props }) {
|
|
|
30
30
|
function SkeletonObject({ className, ...props }) {
|
|
31
31
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Skeleton, {
|
|
32
32
|
"data-slot": "skeleton-object",
|
|
33
|
-
className: require_cn.cn("h-24 w-full rounded-
|
|
33
|
+
className: require_cn.cn("h-24 w-full rounded-lg", className),
|
|
34
34
|
...props
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\n\n/** Animated shimmer placeholder for content that is still loading. */\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"skeleton\" className={cn(\"skeleton-shimmer rounded-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["cn"],"sources":["../../../src/primitives/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\n\n/** Animated shimmer placeholder for content that is still loading. */\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"skeleton\" className={cn(\"skeleton-shimmer rounded-lg\", className)} {...props} />\n );\n}\n\n/** Skeleton sized as a circular avatar placeholder (`size-10 rounded-full`). */\nfunction SkeletonAvatar({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-avatar\"\n className={cn(\"size-10 rounded-full\", className)}\n {...props}\n />\n );\n}\n\n/** Skeleton sized as a single line of text (`h-4 w-full rounded-full`). */\nfunction SkeletonLine({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-line\"\n className={cn(\"h-4 w-full rounded-full\", className)}\n {...props}\n />\n );\n}\n\n/** Skeleton sized as a larger block, e.g. an image or card body (`h-24 w-full`). */\nfunction SkeletonObject({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-object\"\n className={cn(\"h-24 w-full rounded-lg\", className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton, SkeletonAvatar, SkeletonLine, SkeletonObject };\n"],"mappings":";;;;;AAGA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;CACtE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,aAAU;EAAW,WAAWA,WAAAA,GAAG,+BAA+B,SAAS;EAAG,GAAI;CAAQ,CAAA;AAEnG;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GAAG,0BAA0B,SAAS;EACjD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
function Skeleton({ className, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx("div", {
|
|
7
7
|
"data-slot": "skeleton",
|
|
8
|
-
className: cn("skeleton-shimmer rounded-
|
|
8
|
+
className: cn("skeleton-shimmer rounded-lg", className),
|
|
9
9
|
...props
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -29,7 +29,7 @@ function SkeletonLine({ className, ...props }) {
|
|
|
29
29
|
function SkeletonObject({ className, ...props }) {
|
|
30
30
|
return /* @__PURE__ */ jsx(Skeleton, {
|
|
31
31
|
"data-slot": "skeleton-object",
|
|
32
|
-
className: cn("h-24 w-full rounded-
|
|
32
|
+
className: cn("h-24 w-full rounded-lg", className),
|
|
33
33
|
...props
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\n\n/** Animated shimmer placeholder for content that is still loading. */\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"skeleton\" className={cn(\"skeleton-shimmer rounded-
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Skeleton/Skeleton.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\n\n/** Animated shimmer placeholder for content that is still loading. */\nfunction Skeleton({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"skeleton\" className={cn(\"skeleton-shimmer rounded-lg\", className)} {...props} />\n );\n}\n\n/** Skeleton sized as a circular avatar placeholder (`size-10 rounded-full`). */\nfunction SkeletonAvatar({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-avatar\"\n className={cn(\"size-10 rounded-full\", className)}\n {...props}\n />\n );\n}\n\n/** Skeleton sized as a single line of text (`h-4 w-full rounded-full`). */\nfunction SkeletonLine({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-line\"\n className={cn(\"h-4 w-full rounded-full\", className)}\n {...props}\n />\n );\n}\n\n/** Skeleton sized as a larger block, e.g. an image or card body (`h-24 w-full`). */\nfunction SkeletonObject({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <Skeleton\n data-slot=\"skeleton-object\"\n className={cn(\"h-24 w-full rounded-lg\", className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton, SkeletonAvatar, SkeletonLine, SkeletonObject };\n"],"mappings":";;;;AAGA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;CACtE,OACE,oBAAC,OAAD;EAAK,aAAU;EAAW,WAAW,GAAG,+BAA+B,SAAS;EAAG,GAAI;CAAQ,CAAA;AAEnG;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,oBAAC,UAAD;EACE,aAAU;EACV,WAAW,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAsC;CAC1E,OACE,oBAAC,UAAD;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,SAAS;EAClD,GAAI;CACL,CAAA;AAEL;;AAGA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAsC;CAC5E,OACE,oBAAC,UAAD;EACE,aAAU;EACV,WAAW,GAAG,0BAA0B,SAAS;EACjD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -36,7 +36,7 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
|
|
|
36
36
|
})
|
|
37
37
|
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Slider.Thumb, {
|
|
38
38
|
"data-slot": "slider-thumb",
|
|
39
|
-
className: "border-
|
|
39
|
+
className: "border-foreground bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
40
40
|
}, index))]
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["React","SliderPrimitive","cn"],"sources":["../../../src/primitives/Slider/Slider.tsx"],"sourcesContent":["\"use client\";\n\nimport { Slider as SliderPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/**\n * A range input built on Radix Slider. Renders one thumb per value, so passing a\n * two-item `value`/`defaultValue` array yields a range (two-thumb) slider. Accepts\n * all Radix Slider Root props (`min`, `max`, `step`, `orientation`, `disabled`,\n * `onValueChange`, …).\n */\nfunction Slider({\n /** Extra classes merged onto the slider root. */\n className,\n /** Uncontrolled starting value(s); one thumb is rendered per array item. */\n defaultValue,\n /** Controlled value(s); one thumb is rendered per array item. */\n value,\n /** Lower bound of the track. Defaults to 0. */\n min = 0,\n /** Upper bound of the track. Defaults to 100. */\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]),\n [value, defaultValue, min, max],\n );\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col\",\n className,\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className={cn(\n \"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5\",\n )}\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className={cn(\n \"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full\",\n )}\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"border-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["React","SliderPrimitive","cn"],"sources":["../../../src/primitives/Slider/Slider.tsx"],"sourcesContent":["\"use client\";\n\nimport { Slider as SliderPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/**\n * A range input built on Radix Slider. Renders one thumb per value, so passing a\n * two-item `value`/`defaultValue` array yields a range (two-thumb) slider. Accepts\n * all Radix Slider Root props (`min`, `max`, `step`, `orientation`, `disabled`,\n * `onValueChange`, …).\n */\nfunction Slider({\n /** Extra classes merged onto the slider root. */\n className,\n /** Uncontrolled starting value(s); one thumb is rendered per array item. */\n defaultValue,\n /** Controlled value(s); one thumb is rendered per array item. */\n value,\n /** Lower bound of the track. Defaults to 0. */\n min = 0,\n /** Upper bound of the track. Defaults to 100. */\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]),\n [value, defaultValue, min, max],\n );\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col\",\n className,\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className={cn(\n \"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5\",\n )}\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className={cn(\n \"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full\",\n )}\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"border-foreground bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50\"\n />\n ))}\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAS,OAAO,EAEd,WAEA,cAEA,OAEA,MAAM,GAEN,MAAM,KACN,GAAG,SACiD;CACpD,MAAM,UAAUA,MAAM,cACb,MAAM,QAAQ,KAAK,IAAI,QAAQ,MAAM,QAAQ,YAAY,IAAI,eAAe,CAAC,KAAK,GAAG,GAC5F;EAAC;EAAO;EAAc;EAAK;CAAG,CAChC;CAEA,OACE,iBAAA,GAAA,kBAAA,MAACC,SAAAA,OAAgB,MAAjB;EACE,aAAU;EACI;EACP;EACF;EACA;EACL,WAAWC,WAAAA,GACT,uOACA,SACF;EACA,GAAI;YAVN,CAYE,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,OAAjB;GACE,aAAU;GACV,WAAWC,WAAAA,GACT,mMACF;aAEA,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,OAAjB;IACE,aAAU;IACV,WAAWC,WAAAA,GACT,6FACF;GACD,CAAA;EACoB,CAAA,GACtB,MAAM,KAAK,EAAE,QAAQ,QAAQ,OAAO,IAAI,GAAG,UAC1C,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,OAAjB;GACE,aAAU;GAEV,WAAU;EACX,GAFM,KAEN,CACF,CACmB;;AAE1B"}
|
|
@@ -33,7 +33,7 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
|
|
|
33
33
|
})
|
|
34
34
|
}), Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx(Slider$1.Thumb, {
|
|
35
35
|
"data-slot": "slider-thumb",
|
|
36
|
-
className: "border-
|
|
36
|
+
className: "border-foreground bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
37
37
|
}, index))]
|
|
38
38
|
});
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["SliderPrimitive"],"sources":["../../../src/primitives/Slider/Slider.tsx"],"sourcesContent":["\"use client\";\n\nimport { Slider as SliderPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/**\n * A range input built on Radix Slider. Renders one thumb per value, so passing a\n * two-item `value`/`defaultValue` array yields a range (two-thumb) slider. Accepts\n * all Radix Slider Root props (`min`, `max`, `step`, `orientation`, `disabled`,\n * `onValueChange`, …).\n */\nfunction Slider({\n /** Extra classes merged onto the slider root. */\n className,\n /** Uncontrolled starting value(s); one thumb is rendered per array item. */\n defaultValue,\n /** Controlled value(s); one thumb is rendered per array item. */\n value,\n /** Lower bound of the track. Defaults to 0. */\n min = 0,\n /** Upper bound of the track. Defaults to 100. */\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]),\n [value, defaultValue, min, max],\n );\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col\",\n className,\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className={cn(\n \"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5\",\n )}\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className={cn(\n \"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full\",\n )}\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"border-
|
|
1
|
+
{"version":3,"file":"index.js","names":["SliderPrimitive"],"sources":["../../../src/primitives/Slider/Slider.tsx"],"sourcesContent":["\"use client\";\n\nimport { Slider as SliderPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/**\n * A range input built on Radix Slider. Renders one thumb per value, so passing a\n * two-item `value`/`defaultValue` array yields a range (two-thumb) slider. Accepts\n * all Radix Slider Root props (`min`, `max`, `step`, `orientation`, `disabled`,\n * `onValueChange`, …).\n */\nfunction Slider({\n /** Extra classes merged onto the slider root. */\n className,\n /** Uncontrolled starting value(s); one thumb is rendered per array item. */\n defaultValue,\n /** Controlled value(s); one thumb is rendered per array item. */\n value,\n /** Lower bound of the track. Defaults to 0. */\n min = 0,\n /** Upper bound of the track. Defaults to 100. */\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]),\n [value, defaultValue, min, max],\n );\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col\",\n className,\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className={cn(\n \"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5\",\n )}\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className={cn(\n \"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full\",\n )}\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"border-foreground bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50\"\n />\n ))}\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n"],"mappings":";;;;;;;;;;;AAaA,SAAS,OAAO,EAEd,WAEA,cAEA,OAEA,MAAM,GAEN,MAAM,KACN,GAAG,SACiD;CACpD,MAAM,UAAU,MAAM,cACb,MAAM,QAAQ,KAAK,IAAI,QAAQ,MAAM,QAAQ,YAAY,IAAI,eAAe,CAAC,KAAK,GAAG,GAC5F;EAAC;EAAO;EAAc;EAAK;CAAG,CAChC;CAEA,OACE,qBAACA,SAAgB,MAAjB;EACE,aAAU;EACI;EACP;EACF;EACA;EACL,WAAW,GACT,uOACA,SACF;EACA,GAAI;YAVN,CAYE,oBAACA,SAAgB,OAAjB;GACE,aAAU;GACV,WAAW,GACT,mMACF;aAEA,oBAACA,SAAgB,OAAjB;IACE,aAAU;IACV,WAAW,GACT,6FACF;GACD,CAAA;EACoB,CAAA,GACtB,MAAM,KAAK,EAAE,QAAQ,QAAQ,OAAO,IAAI,GAAG,UAC1C,oBAACA,SAAgB,OAAjB;GACE,aAAU;GAEV,WAAU;EACX,GAFM,KAEN,CACF,CACmB;;AAE1B"}
|
|
@@ -30,7 +30,7 @@ const Toaster = ({ theme = "system", position = "top-center", closeButton = true
|
|
|
30
30
|
},
|
|
31
31
|
style: {
|
|
32
32
|
"--normal-bg": "var(--popover)",
|
|
33
|
-
"--normal-text": "var(--
|
|
33
|
+
"--normal-text": "var(--foreground)",
|
|
34
34
|
"--normal-border": "var(--border)"
|
|
35
35
|
},
|
|
36
36
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["Sonner","CircleCheckIcon","InfoIcon","TriangleAlertIcon","OctagonXIcon","Loader2Icon"],"sources":["../../../src/primitives/Sonner/Sonner.tsx"],"sourcesContent":["import {\n CircleCheckIcon,\n InfoIcon,\n Loader2Icon,\n OctagonXIcon,\n TriangleAlertIcon,\n} from \"lucide-react\";\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\";\n\n/**\n * Toaster wired to the design-system tokens.\n *\n * Theme is accepted as a prop (default \"system\") instead of being read from\n * `next-themes`, so the DS does not couple to any particular theme provider —\n * consuming apps pass their resolved theme explicitly.\n *\n * Per-severity colors map Sonner's rich-color CSS variables to our tokens, so\n * `toast.error/success/warning/info(...)` adopt the tokenized palette and react\n * to light/dark + brand switching. Severity icons are provided here.\n */\nconst Toaster = ({\n /** Resolved color scheme for the toasts; pass your app's theme explicitly. */\n theme = \"system\",\n /** Screen corner/edge where toasts are anchored. */\n position = \"top-center\",\n /** Whether each toast renders a dismiss (close) button. */\n closeButton = true,\n ...props\n}: ToasterProps) => {\n return (\n <Sonner\n theme={theme}\n position={position}\n closeButton={closeButton}\n richColors\n className=\"toaster group\"\n icons={{\n success: <CircleCheckIcon className=\"size-4\" />,\n info: <InfoIcon className=\"size-4\" />,\n warning: <TriangleAlertIcon className=\"size-4\" />,\n error: <OctagonXIcon className=\"size-4\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin\" />,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["Sonner","CircleCheckIcon","InfoIcon","TriangleAlertIcon","OctagonXIcon","Loader2Icon"],"sources":["../../../src/primitives/Sonner/Sonner.tsx"],"sourcesContent":["import {\n CircleCheckIcon,\n InfoIcon,\n Loader2Icon,\n OctagonXIcon,\n TriangleAlertIcon,\n} from \"lucide-react\";\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\";\n\n/**\n * Toaster wired to the design-system tokens.\n *\n * Theme is accepted as a prop (default \"system\") instead of being read from\n * `next-themes`, so the DS does not couple to any particular theme provider —\n * consuming apps pass their resolved theme explicitly.\n *\n * Per-severity colors map Sonner's rich-color CSS variables to our tokens, so\n * `toast.error/success/warning/info(...)` adopt the tokenized palette and react\n * to light/dark + brand switching. Severity icons are provided here.\n */\nconst Toaster = ({\n /** Resolved color scheme for the toasts; pass your app's theme explicitly. */\n theme = \"system\",\n /** Screen corner/edge where toasts are anchored. */\n position = \"top-center\",\n /** Whether each toast renders a dismiss (close) button. */\n closeButton = true,\n ...props\n}: ToasterProps) => {\n return (\n <Sonner\n theme={theme}\n position={position}\n closeButton={closeButton}\n richColors\n className=\"toaster group\"\n icons={{\n success: <CircleCheckIcon className=\"size-4\" />,\n info: <InfoIcon className=\"size-4\" />,\n warning: <TriangleAlertIcon className=\"size-4\" />,\n error: <OctagonXIcon className=\"size-4\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin\" />,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--foreground)\",\n \"--normal-border\": \"var(--border)\",\n } as React.CSSProperties\n }\n {...props}\n />\n );\n};\n\nexport { Toaster };\n"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAM,WAAW,EAEf,QAAQ,UAER,WAAW,cAEX,cAAc,MACd,GAAG,YACe;CAClB,OACE,iBAAA,GAAA,kBAAA,KAACA,OAAAA,SAAD;EACS;EACG;EACG;EACb,YAAA;EACA,WAAU;EACV,OAAO;GACL,SAAS,iBAAA,GAAA,kBAAA,KAACC,aAAAA,iBAAD,EAAiB,WAAU,SAAU,CAAA;GAC9C,MAAM,iBAAA,GAAA,kBAAA,KAACC,aAAAA,UAAD,EAAU,WAAU,SAAU,CAAA;GACpC,SAAS,iBAAA,GAAA,kBAAA,KAACC,aAAAA,mBAAD,EAAmB,WAAU,SAAU,CAAA;GAChD,OAAO,iBAAA,GAAA,kBAAA,KAACC,aAAAA,cAAD,EAAc,WAAU,SAAU,CAAA;GACzC,SAAS,iBAAA,GAAA,kBAAA,KAACC,aAAAA,aAAD,EAAa,WAAU,sBAAuB,CAAA;EACzD;EACA,OACE;GACE,eAAe;GACf,iBAAiB;GACjB,mBAAmB;EACrB;EAEF,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -29,7 +29,7 @@ const Toaster = ({ theme = "system", position = "top-center", closeButton = true
|
|
|
29
29
|
},
|
|
30
30
|
style: {
|
|
31
31
|
"--normal-bg": "var(--popover)",
|
|
32
|
-
"--normal-text": "var(--
|
|
32
|
+
"--normal-text": "var(--foreground)",
|
|
33
33
|
"--normal-border": "var(--border)"
|
|
34
34
|
},
|
|
35
35
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Sonner"],"sources":["../../../src/primitives/Sonner/Sonner.tsx"],"sourcesContent":["import {\n CircleCheckIcon,\n InfoIcon,\n Loader2Icon,\n OctagonXIcon,\n TriangleAlertIcon,\n} from \"lucide-react\";\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\";\n\n/**\n * Toaster wired to the design-system tokens.\n *\n * Theme is accepted as a prop (default \"system\") instead of being read from\n * `next-themes`, so the DS does not couple to any particular theme provider —\n * consuming apps pass their resolved theme explicitly.\n *\n * Per-severity colors map Sonner's rich-color CSS variables to our tokens, so\n * `toast.error/success/warning/info(...)` adopt the tokenized palette and react\n * to light/dark + brand switching. Severity icons are provided here.\n */\nconst Toaster = ({\n /** Resolved color scheme for the toasts; pass your app's theme explicitly. */\n theme = \"system\",\n /** Screen corner/edge where toasts are anchored. */\n position = \"top-center\",\n /** Whether each toast renders a dismiss (close) button. */\n closeButton = true,\n ...props\n}: ToasterProps) => {\n return (\n <Sonner\n theme={theme}\n position={position}\n closeButton={closeButton}\n richColors\n className=\"toaster group\"\n icons={{\n success: <CircleCheckIcon className=\"size-4\" />,\n info: <InfoIcon className=\"size-4\" />,\n warning: <TriangleAlertIcon className=\"size-4\" />,\n error: <OctagonXIcon className=\"size-4\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin\" />,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--
|
|
1
|
+
{"version":3,"file":"index.js","names":["Sonner"],"sources":["../../../src/primitives/Sonner/Sonner.tsx"],"sourcesContent":["import {\n CircleCheckIcon,\n InfoIcon,\n Loader2Icon,\n OctagonXIcon,\n TriangleAlertIcon,\n} from \"lucide-react\";\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\";\n\n/**\n * Toaster wired to the design-system tokens.\n *\n * Theme is accepted as a prop (default \"system\") instead of being read from\n * `next-themes`, so the DS does not couple to any particular theme provider —\n * consuming apps pass their resolved theme explicitly.\n *\n * Per-severity colors map Sonner's rich-color CSS variables to our tokens, so\n * `toast.error/success/warning/info(...)` adopt the tokenized palette and react\n * to light/dark + brand switching. Severity icons are provided here.\n */\nconst Toaster = ({\n /** Resolved color scheme for the toasts; pass your app's theme explicitly. */\n theme = \"system\",\n /** Screen corner/edge where toasts are anchored. */\n position = \"top-center\",\n /** Whether each toast renders a dismiss (close) button. */\n closeButton = true,\n ...props\n}: ToasterProps) => {\n return (\n <Sonner\n theme={theme}\n position={position}\n closeButton={closeButton}\n richColors\n className=\"toaster group\"\n icons={{\n success: <CircleCheckIcon className=\"size-4\" />,\n info: <InfoIcon className=\"size-4\" />,\n warning: <TriangleAlertIcon className=\"size-4\" />,\n error: <OctagonXIcon className=\"size-4\" />,\n loading: <Loader2Icon className=\"size-4 animate-spin\" />,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--foreground)\",\n \"--normal-border\": \"var(--border)\",\n } as React.CSSProperties\n }\n {...props}\n />\n );\n};\n\nexport { Toaster };\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAM,WAAW,EAEf,QAAQ,UAER,WAAW,cAEX,cAAc,MACd,GAAG,YACe;CAClB,OACE,oBAACA,WAAD;EACS;EACG;EACG;EACb,YAAA;EACA,WAAU;EACV,OAAO;GACL,SAAS,oBAAC,iBAAD,EAAiB,WAAU,SAAU,CAAA;GAC9C,MAAM,oBAAC,UAAD,EAAU,WAAU,SAAU,CAAA;GACpC,SAAS,oBAAC,mBAAD,EAAmB,WAAU,SAAU,CAAA;GAChD,OAAO,oBAAC,cAAD,EAAc,WAAU,SAAU,CAAA;GACzC,SAAS,oBAAC,aAAD,EAAa,WAAU,sBAAuB,CAAA;EACzD;EACA,OACE;GACE,eAAe;GACf,iBAAiB;GACjB,mBAAmB;EACrB;EAEF,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -9,11 +9,11 @@ function Switch({ className, size = "default", ...props }) {
|
|
|
9
9
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Switch.Root, {
|
|
10
10
|
"data-slot": "switch",
|
|
11
11
|
"data-size": size,
|
|
12
|
-
className: require_cn.cn("peer group/switch inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-[var(--content-success)] data-[state=unchecked]:bg-
|
|
12
|
+
className: require_cn.cn("peer group/switch inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-[var(--content-success)] data-[state=unchecked]:bg-muted-foreground data-[state=checked]:disabled:bg-[var(--bg-success)] data-[state=checked]:disabled:opacity-100", className),
|
|
13
13
|
...props,
|
|
14
14
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Switch.Thumb, {
|
|
15
15
|
"data-slot": "switch-thumb",
|
|
16
|
-
className: require_cn.cn("pointer-events-none block rounded-full bg-
|
|
16
|
+
className: require_cn.cn("pointer-events-none block rounded-full bg-destructive-content-foreground ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -43,7 +43,7 @@ function RichSwitchGroup({ className, title, description, flipped = false, id, .
|
|
|
43
43
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
44
44
|
"data-slot": "rich-switch-group",
|
|
45
45
|
htmlFor: switchId,
|
|
46
|
-
className: require_cn.cn("flex cursor-pointer items-center gap-3 rounded-lg border border-
|
|
46
|
+
className: require_cn.cn("flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50", flipped ? "flex-row-reverse" : "flex-row", className),
|
|
47
47
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Switch, {
|
|
48
48
|
"data-slot": "rich-switch-group-control",
|
|
49
49
|
id: switchId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["SwitchPrimitive","cn"],"sources":["../../../src/primitives/Switch/Switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** A toggle control for switching a single setting on or off. */\nfunction Switch({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n /** Visual size of the track and thumb. */\n size?: \"sm\" | \"default\";\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n \"peer group/switch inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-[var(--content-success)] data-[state=unchecked]:bg-
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["SwitchPrimitive","cn"],"sources":["../../../src/primitives/Switch/Switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from \"radix-ui\";\nimport { useId } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\n/** A toggle control for switching a single setting on or off. */\nfunction Switch({\n className,\n size = \"default\",\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n /** Visual size of the track and thumb. */\n size?: \"sm\" | \"default\";\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n \"peer group/switch inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-[var(--content-success)] data-[state=unchecked]:bg-muted-foreground data-[state=checked]:disabled:bg-[var(--bg-success)] data-[state=checked]:disabled:opacity-100\",\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n \"pointer-events-none block rounded-full bg-destructive-content-foreground ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0\",\n )}\n />\n </SwitchPrimitive.Root>\n );\n}\n\n/** A `Switch` paired with a clickable text label. */\nfunction SwitchGroup({\n className,\n label,\n flipped = false,\n id,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n /** Visual size of the track and thumb. */\n size?: \"sm\" | \"default\";\n /** Text (or node) rendered as the switch's label. */\n label?: React.ReactNode;\n /** Renders the label before the switch instead of after it. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const switchId = id ?? generatedId;\n return (\n <div\n data-slot=\"switch-group\"\n className={cn(\n \"flex items-center gap-2\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <Switch data-slot=\"switch-group-control\" id={switchId} {...props} />\n {label != null && (\n <label\n data-slot=\"switch-group-label\"\n htmlFor={switchId}\n className=\"cursor-pointer select-none font-medium text-sm leading-none\"\n >\n {label}\n </label>\n )}\n </div>\n );\n}\n\n/** A `Switch` inside a bordered card with a title and description. */\nfunction RichSwitchGroup({\n className,\n title,\n description,\n flipped = false,\n id,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n /** Visual size of the track and thumb. */\n size?: \"sm\" | \"default\";\n /** Primary label rendered above the description. */\n title?: React.ReactNode;\n /** Secondary helper text rendered below the title. */\n description?: React.ReactNode;\n /** Renders the switch before the text content instead of after it. */\n flipped?: boolean;\n}) {\n const generatedId = useId();\n const switchId = id ?? generatedId;\n return (\n <label\n data-slot=\"rich-switch-group\"\n htmlFor={switchId}\n className={cn(\n \"flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50\",\n flipped ? \"flex-row-reverse\" : \"flex-row\",\n className,\n )}\n >\n <Switch data-slot=\"rich-switch-group-control\" id={switchId} {...props} />\n <span data-slot=\"rich-switch-group-content\" className=\"flex flex-1 flex-col gap-1\">\n {title != null && (\n <span data-slot=\"rich-switch-group-title\" className=\"font-medium text-sm leading-none\">\n {title}\n </span>\n )}\n {description != null && (\n <span data-slot=\"rich-switch-group-description\" className=\"text-sm text-muted-foreground\">\n {description}\n </span>\n )}\n </span>\n </label>\n );\n}\n\nexport { Switch, SwitchGroup, RichSwitchGroup };\n"],"mappings":";;;;;;;AAOA,SAAS,OAAO,EACd,WACA,OAAO,WACP,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAACA,SAAAA,OAAgB,MAAjB;EACE,aAAU;EACV,aAAW;EACX,WAAWC,WAAAA,GACT,4iBACA,SACF;EACA,GAAI;YAEJ,iBAAA,GAAA,kBAAA,KAACD,SAAAA,OAAgB,OAAjB;GACE,aAAU;GACV,WAAWC,WAAAA,GACT,wQACF;EACD,CAAA;CACmB,CAAA;AAE1B;;AAGA,SAAS,YAAY,EACnB,WACA,OACA,UAAU,OACV,IACA,GAAG,SAQF;CACD,MAAM,eAAA,GAAA,MAAA,OAAoB;CAC1B,MAAM,WAAW,MAAM;CACvB,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,aAAU;EACV,WAAWA,WAAAA,GACT,2BACA,UAAU,qBAAqB,YAC/B,SACF;YANF,CAQE,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAQ,aAAU;GAAuB,IAAI;GAAU,GAAI;EAAQ,CAAA,GAClE,SAAS,QACR,iBAAA,GAAA,kBAAA,KAAC,SAAD;GACE,aAAU;GACV,SAAS;GACT,WAAU;aAET;EACI,CAAA,CAEN;;AAET;;AAGA,SAAS,gBAAgB,EACvB,WACA,OACA,aACA,UAAU,OACV,IACA,GAAG,SAUF;CACD,MAAM,eAAA,GAAA,MAAA,OAAoB;CAC1B,MAAM,WAAW,MAAM;CACvB,OACE,iBAAA,GAAA,kBAAA,MAAC,SAAD;EACE,aAAU;EACV,SAAS;EACT,WAAWA,WAAAA,GACT,uRACA,UAAU,qBAAqB,YAC/B,SACF;YAPF,CASE,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAQ,aAAU;GAA4B,IAAI;GAAU,GAAI;EAAQ,CAAA,GACxE,iBAAA,GAAA,kBAAA,MAAC,QAAD;GAAM,aAAU;GAA4B,WAAU;aAAtD,CACG,SAAS,QACR,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAA0B,WAAU;cACjD;GACG,CAAA,GAEP,eAAe,QACd,iBAAA,GAAA,kBAAA,KAAC,QAAD;IAAM,aAAU;IAAgC,WAAU;cACvD;GACG,CAAA,CAEJ;IACD;;AAEX"}
|
|
@@ -8,11 +8,11 @@ function Switch({ className, size = "default", ...props }) {
|
|
|
8
8
|
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
9
9
|
"data-slot": "switch",
|
|
10
10
|
"data-size": size,
|
|
11
|
-
className: cn("peer group/switch inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-[var(--content-success)] data-[state=unchecked]:bg-
|
|
11
|
+
className: cn("peer group/switch inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-[var(--content-success)] data-[state=unchecked]:bg-muted-foreground data-[state=checked]:disabled:bg-[var(--bg-success)] data-[state=checked]:disabled:opacity-100", className),
|
|
12
12
|
...props,
|
|
13
13
|
children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
14
14
|
"data-slot": "switch-thumb",
|
|
15
|
-
className: cn("pointer-events-none block rounded-full bg-
|
|
15
|
+
className: cn("pointer-events-none block rounded-full bg-destructive-content-foreground ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")
|
|
16
16
|
})
|
|
17
17
|
});
|
|
18
18
|
}
|
|
@@ -42,7 +42,7 @@ function RichSwitchGroup({ className, title, description, flipped = false, id, .
|
|
|
42
42
|
return /* @__PURE__ */ jsxs("label", {
|
|
43
43
|
"data-slot": "rich-switch-group",
|
|
44
44
|
htmlFor: switchId,
|
|
45
|
-
className: cn("flex cursor-pointer items-center gap-3 rounded-lg border border-
|
|
45
|
+
className: cn("flex cursor-pointer items-center gap-3 rounded-lg border border-border bg-card p-4 text-card-foreground shadow-xs transition-colors has-[[data-state=checked]]:border-primary has-[[data-state=checked]]:bg-accent/40 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50", flipped ? "flex-row-reverse" : "flex-row", className),
|
|
46
46
|
children: [/* @__PURE__ */ jsx(Switch, {
|
|
47
47
|
"data-slot": "rich-switch-group-control",
|
|
48
48
|
id: switchId,
|