@psnext/design-system 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +7 -2
- package/SKILL.md +1 -1
- package/dist/Header.cjs +2 -2
- package/dist/Header.js +2 -2
- package/dist/Logo.cjs +322 -315
- package/dist/Logo.cjs.map +1 -1
- package/dist/Logo.js +322 -315
- package/dist/Logo.js.map +1 -1
- package/dist/Mosaic.cjs +72 -15
- package/dist/Mosaic.cjs.map +1 -1
- package/dist/Mosaic.js +72 -15
- package/dist/Mosaic.js.map +1 -1
- package/dist/index.cjs +12 -2
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -3
- package/dist/index10.d.cts +6 -6
- package/dist/index10.d.cts.map +1 -1
- package/dist/index10.d.ts +6 -6
- package/dist/index11.d.cts +3 -3
- package/dist/index11.d.cts.map +1 -1
- package/dist/index11.d.ts +3 -3
- package/dist/index12.d.cts +11 -11
- package/dist/index12.d.ts +11 -11
- package/dist/index13.d.cts +6 -6
- package/dist/index13.d.ts +6 -6
- package/dist/index14.d.cts +5 -5
- package/dist/index14.d.cts.map +1 -1
- package/dist/index14.d.ts +5 -5
- package/dist/index15.d.cts +2 -2
- package/dist/index15.d.ts +2 -2
- package/dist/index16.d.cts +3 -3
- package/dist/index16.d.cts.map +1 -1
- package/dist/index16.d.ts +3 -3
- package/dist/index17.d.cts +2 -2
- package/dist/index17.d.ts +2 -2
- package/dist/index18.d.cts +4 -4
- package/dist/index18.d.cts.map +1 -1
- package/dist/index18.d.ts +4 -4
- package/dist/index19.d.cts +11 -11
- package/dist/index19.d.cts.map +1 -1
- package/dist/index19.d.ts +11 -11
- package/dist/index2.d.cts +8 -8
- package/dist/index2.d.ts +8 -8
- package/dist/index2.d.ts.map +1 -1
- package/dist/index20.d.cts +10 -10
- package/dist/index20.d.ts +10 -10
- package/dist/index21.d.cts +30 -81
- package/dist/index21.d.cts.map +1 -1
- package/dist/index21.d.ts +30 -81
- package/dist/index21.d.ts.map +1 -1
- package/dist/index22.d.cts +114 -27
- package/dist/index22.d.cts.map +1 -1
- package/dist/index22.d.ts +114 -27
- package/dist/index22.d.ts.map +1 -1
- package/dist/index23.d.cts +75 -53
- package/dist/index23.d.cts.map +1 -1
- package/dist/index23.d.ts +75 -53
- package/dist/index23.d.ts.map +1 -1
- package/dist/index24.d.cts +28 -93
- package/dist/index24.d.cts.map +1 -1
- package/dist/index24.d.ts +28 -93
- package/dist/index24.d.ts.map +1 -1
- package/dist/index25.d.cts +58 -33
- package/dist/index25.d.cts.map +1 -1
- package/dist/index25.d.ts +58 -33
- package/dist/index25.d.ts.map +1 -1
- package/dist/index26.d.cts +93 -11
- package/dist/index26.d.cts.map +1 -1
- package/dist/index26.d.ts +93 -11
- package/dist/index26.d.ts.map +1 -1
- package/dist/index27.d.cts +32 -63
- package/dist/index27.d.cts.map +1 -1
- package/dist/index27.d.ts +32 -63
- package/dist/index27.d.ts.map +1 -1
- package/dist/index28.d.cts +11 -48
- package/dist/index28.d.cts.map +1 -1
- package/dist/index28.d.ts +11 -48
- package/dist/index28.d.ts.map +1 -1
- package/dist/index29.d.cts +68 -59
- package/dist/index29.d.cts.map +1 -1
- package/dist/index29.d.ts +68 -59
- 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/index30.d.cts +47 -30
- package/dist/index30.d.cts.map +1 -1
- package/dist/index30.d.ts +47 -30
- package/dist/index30.d.ts.map +1 -1
- package/dist/index31.d.cts +63 -17
- package/dist/index31.d.cts.map +1 -1
- package/dist/index31.d.ts +63 -17
- package/dist/index31.d.ts.map +1 -1
- package/dist/index32.d.cts +29 -80
- package/dist/index32.d.cts.map +1 -1
- package/dist/index32.d.ts +29 -80
- package/dist/index32.d.ts.map +1 -1
- package/dist/index33.d.cts +19 -34
- package/dist/index33.d.cts.map +1 -1
- package/dist/index33.d.ts +19 -34
- package/dist/index33.d.ts.map +1 -1
- package/dist/index34.d.cts +80 -18
- package/dist/index34.d.cts.map +1 -1
- package/dist/index34.d.ts +80 -18
- package/dist/index34.d.ts.map +1 -1
- package/dist/index35.d.cts +32 -51
- package/dist/index35.d.cts.map +1 -1
- package/dist/index35.d.ts +32 -51
- package/dist/index35.d.ts.map +1 -1
- package/dist/index36.d.cts +19 -36
- package/dist/index36.d.cts.map +1 -1
- package/dist/index36.d.ts +19 -36
- package/dist/index36.d.ts.map +1 -1
- package/dist/index37.d.cts +43 -61
- package/dist/index37.d.cts.map +1 -1
- package/dist/index37.d.ts +43 -61
- package/dist/index37.d.ts.map +1 -1
- package/dist/index38.d.cts +35 -11
- package/dist/index38.d.cts.map +1 -1
- package/dist/index38.d.ts +35 -11
- package/dist/index38.d.ts.map +1 -1
- package/dist/index39.d.cts +68 -20
- package/dist/index39.d.cts.map +1 -1
- package/dist/index39.d.ts +68 -20
- package/dist/index39.d.ts.map +1 -1
- package/dist/index4.d.cts +2 -2
- package/dist/index4.d.cts.map +1 -1
- package/dist/index4.d.ts +2 -2
- package/dist/index40.d.cts +14 -15
- package/dist/index40.d.cts.map +1 -1
- package/dist/index40.d.ts +14 -15
- package/dist/index40.d.ts.map +1 -1
- package/dist/index41.d.cts +22 -98
- package/dist/index41.d.cts.map +1 -1
- package/dist/index41.d.ts +22 -98
- package/dist/index41.d.ts.map +1 -1
- package/dist/index42.d.cts +16 -120
- package/dist/index42.d.cts.map +1 -1
- package/dist/index42.d.ts +16 -120
- package/dist/index42.d.ts.map +1 -1
- package/dist/index43.d.cts +99 -16
- package/dist/index43.d.cts.map +1 -1
- package/dist/index43.d.ts +99 -16
- package/dist/index43.d.ts.map +1 -1
- package/dist/index44.d.cts +184 -49
- package/dist/index44.d.cts.map +1 -1
- package/dist/index44.d.ts +184 -49
- package/dist/index44.d.ts.map +1 -1
- package/dist/index45.d.cts +16 -39
- package/dist/index45.d.cts.map +1 -1
- package/dist/index45.d.ts +16 -39
- package/dist/index45.d.ts.map +1 -1
- package/dist/index46.d.cts +37 -77
- package/dist/index46.d.cts.map +1 -1
- package/dist/index46.d.ts +37 -77
- package/dist/index46.d.ts.map +1 -1
- package/dist/index47.d.cts +96 -1
- package/dist/index47.d.cts.map +1 -0
- package/dist/index47.d.ts +96 -1
- package/dist/index47.d.ts.map +1 -0
- package/dist/index48.d.cts +1 -127
- package/dist/index48.d.ts +1 -127
- package/dist/index49.d.cts +121 -42
- package/dist/index49.d.cts.map +1 -1
- package/dist/index49.d.ts +121 -42
- package/dist/index49.d.ts.map +1 -1
- package/dist/index5.d.cts +7 -7
- package/dist/index5.d.cts.map +1 -1
- package/dist/index5.d.ts +7 -7
- package/dist/index50.d.cts +42 -22
- package/dist/index50.d.cts.map +1 -1
- package/dist/index50.d.ts +42 -22
- package/dist/index50.d.ts.map +1 -1
- package/dist/index51.d.cts +21 -34
- package/dist/index51.d.cts.map +1 -1
- package/dist/index51.d.ts +21 -34
- package/dist/index51.d.ts.map +1 -1
- package/dist/index52.d.cts +33 -17
- package/dist/index52.d.cts.map +1 -1
- package/dist/index52.d.ts +33 -17
- package/dist/index52.d.ts.map +1 -1
- package/dist/index53.d.cts +18 -14
- package/dist/index53.d.cts.map +1 -1
- package/dist/index53.d.ts +18 -14
- package/dist/index53.d.ts.map +1 -1
- package/dist/index54.d.cts +12 -60
- package/dist/index54.d.cts.map +1 -1
- package/dist/index54.d.ts +12 -60
- package/dist/index54.d.ts.map +1 -1
- package/dist/index55.d.cts +51 -80
- package/dist/index55.d.cts.map +1 -1
- package/dist/index55.d.ts +51 -80
- package/dist/index55.d.ts.map +1 -1
- package/dist/index56.d.cts +91 -24
- package/dist/index56.d.cts.map +1 -1
- package/dist/index56.d.ts +91 -24
- package/dist/index56.d.ts.map +1 -1
- package/dist/index57.d.cts +25 -203
- package/dist/index57.d.cts.map +1 -1
- package/dist/index57.d.ts +25 -203
- package/dist/index57.d.ts.map +1 -1
- package/dist/index58.d.cts +198 -15
- package/dist/index58.d.cts.map +1 -1
- package/dist/index58.d.ts +198 -15
- package/dist/index58.d.ts.map +1 -1
- package/dist/index59.d.cts +21 -23
- package/dist/index59.d.cts.map +1 -1
- package/dist/index59.d.ts +21 -23
- package/dist/index59.d.ts.map +1 -1
- package/dist/index6.d.cts +5 -5
- package/dist/index6.d.ts +5 -5
- package/dist/index60.d.cts +21 -18
- package/dist/index60.d.cts.map +1 -1
- package/dist/index60.d.ts +21 -18
- package/dist/index60.d.ts.map +1 -1
- package/dist/index61.d.cts +21 -8
- package/dist/index61.d.cts.map +1 -1
- package/dist/index61.d.ts +21 -8
- package/dist/index61.d.ts.map +1 -1
- package/dist/index62.d.cts +6 -44
- package/dist/index62.d.cts.map +1 -1
- package/dist/index62.d.ts +6 -44
- package/dist/index62.d.ts.map +1 -1
- package/dist/index63.d.cts +46 -47
- package/dist/index63.d.cts.map +1 -1
- package/dist/index63.d.ts +46 -47
- package/dist/index63.d.ts.map +1 -1
- package/dist/index64.d.cts +47 -59
- package/dist/index64.d.cts.map +1 -1
- package/dist/index64.d.ts +47 -59
- package/dist/index64.d.ts.map +1 -1
- package/dist/index65.d.cts +56 -38
- package/dist/index65.d.cts.map +1 -1
- package/dist/index65.d.ts +56 -38
- package/dist/index65.d.ts.map +1 -1
- package/dist/index66.d.cts +37 -16
- package/dist/index66.d.cts.map +1 -1
- package/dist/index66.d.ts +37 -16
- package/dist/index66.d.ts.map +1 -1
- package/dist/index67.d.cts +20 -41
- package/dist/index67.d.cts.map +1 -1
- package/dist/index67.d.ts +20 -41
- package/dist/index67.d.ts.map +1 -1
- package/dist/index68.d.cts +41 -19
- package/dist/index68.d.cts.map +1 -1
- package/dist/index68.d.ts +41 -19
- package/dist/index68.d.ts.map +1 -1
- package/dist/index69.d.cts +14 -39
- package/dist/index69.d.cts.map +1 -1
- package/dist/index69.d.ts +14 -39
- package/dist/index69.d.ts.map +1 -1
- package/dist/index7.d.cts +8 -8
- package/dist/index7.d.cts.map +1 -1
- package/dist/index7.d.ts +8 -8
- package/dist/index70.d.cts +39 -16
- package/dist/index70.d.cts.map +1 -1
- package/dist/index70.d.ts +39 -16
- package/dist/index70.d.ts.map +1 -1
- package/dist/index71.d.cts +17 -83
- package/dist/index71.d.cts.map +1 -1
- package/dist/index71.d.ts +15 -81
- package/dist/index71.d.ts.map +1 -1
- package/dist/index72.d.cts +83 -11
- package/dist/index72.d.cts.map +1 -1
- package/dist/index72.d.ts +83 -11
- package/dist/index72.d.ts.map +1 -1
- package/dist/index73.d.cts +12 -30
- package/dist/index73.d.cts.map +1 -1
- package/dist/index73.d.ts +12 -30
- package/dist/index73.d.ts.map +1 -1
- package/dist/index74.d.cts +28 -27
- package/dist/index74.d.cts.map +1 -1
- package/dist/index74.d.ts +28 -27
- package/dist/index74.d.ts.map +1 -1
- package/dist/index75.d.cts +33 -83
- package/dist/index75.d.cts.map +1 -1
- package/dist/index75.d.ts +33 -83
- package/dist/index75.d.ts.map +1 -1
- package/dist/index76.d.cts +82 -273
- package/dist/index76.d.cts.map +1 -1
- package/dist/index76.d.ts +82 -273
- package/dist/index76.d.ts.map +1 -1
- package/dist/index77.d.cts +278 -0
- package/dist/index77.d.cts.map +1 -0
- package/dist/index77.d.ts +278 -0
- package/dist/index77.d.ts.map +1 -0
- package/dist/index8.d.cts +4 -4
- package/dist/index8.d.cts.map +1 -1
- package/dist/index8.d.ts +3 -3
- package/dist/index9.d.cts +2 -2
- package/dist/index9.d.ts +2 -2
- package/dist/layouts/Container/index.d.cts +1 -1
- package/dist/layouts/Container/index.d.ts +1 -1
- package/dist/layouts/MultiColumn/index.d.cts +1 -1
- package/dist/layouts/MultiColumn/index.d.ts +1 -1
- package/dist/layouts/PageBackground/index.d.cts +1 -1
- package/dist/layouts/PageBackground/index.d.ts +1 -1
- package/dist/layouts/Stack/index.d.cts +1 -1
- package/dist/layouts/Stack/index.d.ts +1 -1
- package/dist/layouts/TwoColumn/index.d.cts +1 -1
- package/dist/layouts/TwoColumn/index.d.ts +1 -1
- package/dist/layouts/index.d.cts +5 -5
- package/dist/layouts/index.d.ts +5 -5
- package/dist/patterns/DataTable/index.d.cts +3 -3
- package/dist/patterns/DataTable/index.d.cts.map +1 -1
- package/dist/patterns/DataTable/index.d.ts +3 -3
- package/dist/patterns/Footer/index.d.cts +7 -7
- package/dist/patterns/Footer/index.d.ts +7 -7
- package/dist/patterns/Header/index.d.cts +1 -1
- package/dist/patterns/Header/index.d.ts +1 -1
- package/dist/patterns/MediaObject/index.d.cts +14 -14
- package/dist/patterns/MediaObject/index.d.cts.map +1 -1
- package/dist/patterns/MediaObject/index.d.ts +11 -11
- package/dist/patterns/MediaObject/index.d.ts.map +1 -1
- package/dist/patterns/NavRail/index.d.cts +1 -1
- package/dist/patterns/NavRail/index.d.ts +1 -1
- package/dist/patterns/SectionCard/index.d.cts +2 -2
- package/dist/patterns/SectionCard/index.d.cts.map +1 -1
- package/dist/patterns/SectionCard/index.d.ts +2 -2
- package/dist/patterns/SectionHeading/index.d.cts +3 -3
- package/dist/patterns/SectionHeading/index.d.cts.map +1 -1
- package/dist/patterns/SectionHeading/index.d.ts +3 -3
- package/dist/patterns/SectionHeading/index.d.ts.map +1 -1
- package/dist/patterns/index.d.cts +2 -2
- package/dist/patterns/index.d.ts +2 -2
- package/dist/primitives/Combobox/index.cjs +210 -0
- package/dist/primitives/Combobox/index.cjs.map +1 -0
- package/dist/primitives/Combobox/index.d.cts +2 -0
- package/dist/primitives/Combobox/index.d.ts +2 -0
- package/dist/primitives/Combobox/index.js +199 -0
- package/dist/primitives/Combobox/index.js.map +1 -0
- package/dist/primitives/ContextMenu/index.d.cts +1 -1
- package/dist/primitives/ContextMenu/index.d.ts +1 -1
- package/dist/primitives/Credits/index.d.cts +1 -1
- package/dist/primitives/Credits/index.d.ts +1 -1
- package/dist/primitives/Drawer/index.d.cts +1 -1
- package/dist/primitives/Drawer/index.d.ts +1 -1
- package/dist/primitives/DropdownMenu/index.d.cts +1 -1
- package/dist/primitives/DropdownMenu/index.d.ts +1 -1
- package/dist/primitives/Empty/index.d.cts +1 -1
- package/dist/primitives/Empty/index.d.ts +1 -1
- package/dist/primitives/Field/index.d.cts +1 -1
- package/dist/primitives/Field/index.d.ts +1 -1
- package/dist/primitives/FileUpload/index.d.cts +1 -1
- package/dist/primitives/FileUpload/index.d.ts +1 -1
- package/dist/primitives/Form/index.d.cts +1 -1
- package/dist/primitives/Form/index.d.ts +1 -1
- package/dist/primitives/Heading/index.d.cts +1 -1
- package/dist/primitives/Heading/index.d.ts +1 -1
- package/dist/primitives/HoverCard/index.d.cts +1 -1
- package/dist/primitives/HoverCard/index.d.ts +1 -1
- package/dist/primitives/Icon/index.d.cts +1 -1
- package/dist/primitives/Icon/index.d.ts +1 -1
- package/dist/primitives/InfoBanner/index.d.cts +1 -1
- package/dist/primitives/InfoBanner/index.d.ts +1 -1
- package/dist/primitives/Input/index.d.cts +1 -1
- package/dist/primitives/Input/index.d.ts +1 -1
- package/dist/primitives/InputGroup/index.d.cts +1 -1
- package/dist/primitives/InputGroup/index.d.ts +1 -1
- package/dist/primitives/InputOtp/index.d.cts +1 -1
- package/dist/primitives/InputOtp/index.d.ts +1 -1
- package/dist/primitives/Item/index.d.cts +1 -1
- package/dist/primitives/Item/index.d.ts +1 -1
- package/dist/primitives/Kbd/index.d.cts +1 -1
- package/dist/primitives/Kbd/index.d.ts +1 -1
- package/dist/primitives/Label/index.d.cts +1 -1
- package/dist/primitives/Label/index.d.ts +1 -1
- package/dist/primitives/Link/index.d.cts +1 -1
- package/dist/primitives/Link/index.d.ts +1 -1
- package/dist/primitives/Logo/index.d.cts +1 -1
- package/dist/primitives/Logo/index.d.ts +1 -1
- package/dist/primitives/Menubar/index.d.cts +1 -1
- package/dist/primitives/Menubar/index.d.ts +1 -1
- package/dist/primitives/Mosaic/index.d.cts +2 -2
- package/dist/primitives/Mosaic/index.d.ts +2 -2
- package/dist/primitives/NativeSelect/index.d.cts +1 -1
- package/dist/primitives/NativeSelect/index.d.ts +1 -1
- package/dist/primitives/NavRail/index.d.cts +2 -2
- package/dist/primitives/NavRail/index.d.ts +2 -2
- package/dist/primitives/NavigationMenu/index.d.cts +1 -1
- package/dist/primitives/NavigationMenu/index.d.ts +1 -1
- package/dist/primitives/NotchedCard/index.d.cts +1 -1
- package/dist/primitives/NotchedCard/index.d.ts +1 -1
- package/dist/primitives/Pagination/index.d.cts +1 -1
- package/dist/primitives/Pagination/index.d.ts +1 -1
- package/dist/primitives/Popover/index.d.cts +1 -1
- package/dist/primitives/Popover/index.d.ts +1 -1
- package/dist/primitives/Progress/index.d.cts +1 -1
- package/dist/primitives/Progress/index.d.ts +1 -1
- package/dist/primitives/RadioGroup/index.d.cts +1 -1
- package/dist/primitives/RadioGroup/index.d.ts +1 -1
- package/dist/primitives/Resizable/index.d.cts +1 -1
- package/dist/primitives/Resizable/index.d.ts +1 -1
- package/dist/primitives/ScrollArea/index.d.cts +1 -1
- package/dist/primitives/ScrollArea/index.d.ts +1 -1
- package/dist/primitives/Select/index.d.cts +1 -1
- package/dist/primitives/Select/index.d.ts +1 -1
- package/dist/primitives/Sheet/index.d.cts +1 -1
- package/dist/primitives/Sheet/index.d.ts +1 -1
- package/dist/primitives/Sidebar/index.d.cts +1 -1
- package/dist/primitives/Sidebar/index.d.ts +1 -1
- package/dist/primitives/Skeleton/index.d.cts +1 -1
- package/dist/primitives/Skeleton/index.d.ts +1 -1
- package/dist/primitives/Slider/index.d.cts +1 -1
- package/dist/primitives/Slider/index.d.ts +1 -1
- package/dist/primitives/Sonner/index.d.cts +1 -1
- package/dist/primitives/Sonner/index.d.ts +1 -1
- package/dist/primitives/Spinner/index.d.cts +1 -1
- package/dist/primitives/Spinner/index.d.ts +1 -1
- package/dist/primitives/Switch/index.d.cts +1 -1
- package/dist/primitives/Switch/index.d.ts +1 -1
- package/dist/primitives/Table/index.d.cts +1 -1
- package/dist/primitives/Table/index.d.ts +1 -1
- package/dist/primitives/Tabs/index.cjs +153 -10
- package/dist/primitives/Tabs/index.cjs.map +1 -1
- package/dist/primitives/Tabs/index.d.cts +1 -1
- package/dist/primitives/Tabs/index.d.ts +1 -1
- package/dist/primitives/Tabs/index.js +153 -10
- package/dist/primitives/Tabs/index.js.map +1 -1
- package/dist/primitives/Text/index.d.cts +1 -1
- package/dist/primitives/Text/index.d.ts +1 -1
- package/dist/primitives/Textarea/index.d.cts +1 -1
- package/dist/primitives/Textarea/index.d.ts +1 -1
- package/dist/primitives/ThemeProvider/index.d.cts +1 -1
- package/dist/primitives/ThemeProvider/index.d.ts +1 -1
- package/dist/primitives/Toggle/index.d.cts +1 -1
- package/dist/primitives/Toggle/index.d.ts +1 -1
- package/dist/primitives/ToggleGroup/index.d.cts +1 -1
- package/dist/primitives/ToggleGroup/index.d.ts +1 -1
- package/dist/primitives/Tooltip/index.d.cts +1 -1
- package/dist/primitives/Tooltip/index.d.ts +1 -1
- package/dist/primitives/index.cjs +12 -2
- package/dist/primitives/index.d.cts +50 -49
- package/dist/primitives/index.d.ts +50 -49
- package/dist/primitives/index.js +4 -3
- package/dist/styles/tokens/mode-dark.css +1 -1
- package/package.json +1 -1
- package/dist/index48.d.cts.map +0 -1
- package/dist/index48.d.ts.map +0 -1
package/dist/index44.d.cts
CHANGED
|
@@ -1,56 +1,191 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { NavigationMenu } from "radix-ui";
|
|
3
|
-
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
1
|
+
import * as react_jsx_runtime86 from "react/jsx-runtime";
|
|
4
2
|
import * as React from "react";
|
|
5
3
|
|
|
6
|
-
//#region src/primitives/
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
/** A
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
4
|
+
//#region src/primitives/Mosaic/Mosaic.utils.d.ts
|
|
5
|
+
/** A pane's identity. Compared with `===`, so no object identities. */
|
|
6
|
+
type MosaicKey = string | number;
|
|
7
|
+
/** "row" places children side by side (horizontal split); "column" stacks them (vertical split). */
|
|
8
|
+
type MosaicDirection = "row" | "column";
|
|
9
|
+
/** Sequence of "first"/"second" steps from the tree root down to a node. */
|
|
10
|
+
type MosaicPath = ("first" | "second")[];
|
|
11
|
+
type MosaicParent<T extends MosaicKey = MosaicKey> = {
|
|
12
|
+
direction: MosaicDirection;
|
|
13
|
+
/** A node, or `null` for an intentionally blank slot: the space is kept (per `splitPercentage`) but no pane chrome renders there, and drags/splits can't target it. */
|
|
14
|
+
first: MosaicNode<T> | null;
|
|
15
|
+
/** Same as `first` — `null` renders that side as blank space. */
|
|
16
|
+
second: MosaicNode<T> | null;
|
|
17
|
+
/** Percentage (0-100) of the group's size given to `first`. Defaults to 50 when omitted. */
|
|
18
|
+
splitPercentage?: number;
|
|
19
|
+
};
|
|
20
|
+
/** A leaf pane id, or a parent split of two further nodes. */
|
|
21
|
+
type MosaicNode<T extends MosaicKey = MosaicKey> = T | MosaicParent<T>;
|
|
22
|
+
/** Which edge (or center) of a pane a drag is hovering over. */
|
|
23
|
+
type DropZone = "top" | "bottom" | "left" | "right" | "center";
|
|
24
|
+
/**
|
|
25
|
+
* A leaf supplied to `value`/`defaultValue` as an object: `id` is the pane's
|
|
26
|
+
* identity, every other key is ignored by Mosaic. `direction` is reserved —
|
|
27
|
+
* it's what distinguishes a parent split from an object leaf — so an object
|
|
28
|
+
* leaf must not have one.
|
|
29
|
+
*/
|
|
30
|
+
type MosaicLeafObject<T extends MosaicKey = MosaicKey> = {
|
|
31
|
+
id: T;
|
|
32
|
+
direction?: never;
|
|
33
|
+
[extra: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
type MosaicInputParent<T extends MosaicKey = MosaicKey> = {
|
|
36
|
+
direction: MosaicDirection;
|
|
37
|
+
/** A node, or a blank slot: `null`, `undefined`, or simply omitted. Blank slots normalize to `null` in the canonical tree. */
|
|
38
|
+
first?: MosaicInputNode<T> | null;
|
|
39
|
+
/** Same as `first` — omit (or pass `null`/`undefined`) for a blank slot. */
|
|
40
|
+
second?: MosaicInputNode<T> | null;
|
|
41
|
+
/** Percentage (0-100) of the group's size given to `first`. Defaults to 50 when omitted. */
|
|
42
|
+
splitPercentage?: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The tree shape `value`/`defaultValue` accept: like `MosaicNode`, but a leaf
|
|
46
|
+
* may also be written as `{ id }` (`MosaicLeafObject`). Normalized to the
|
|
47
|
+
* canonical bare-id `MosaicNode` on the way in — `onChange` always emits the
|
|
48
|
+
* canonical shape.
|
|
49
|
+
*
|
|
50
|
+
* `MosaicParent<T>` is listed even though it's structurally a subtype of
|
|
51
|
+
* `MosaicInputParent<T>`: passing a value annotated as `MosaicNode<T>` /
|
|
52
|
+
* `MosaicParent<T>` then infers `T` through the matching alias, instead of
|
|
53
|
+
* falling back to `createNode`'s return type (which may be a narrower
|
|
54
|
+
* literal).
|
|
55
|
+
*/
|
|
56
|
+
type MosaicInputNode<T extends MosaicKey = MosaicKey> = T | MosaicLeafObject<T> | MosaicInputParent<T> | MosaicParent<T>;
|
|
57
|
+
/**
|
|
58
|
+
* Collapses `{ id }` object leaves to their bare id, recursively, yielding
|
|
59
|
+
* the canonical `MosaicNode` every tree algorithm operates on. Extra keys on
|
|
60
|
+
* an object leaf are dropped — Mosaic reads only `id`.
|
|
61
|
+
*/
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/primitives/Mosaic/Mosaic.d.ts
|
|
64
|
+
/**
|
|
65
|
+
* Toolbar display mode for every pane in a Mosaic:
|
|
66
|
+
* - `"always"` — toolbars are always visible (default).
|
|
67
|
+
* - `"autohide"` — toolbars overlay the pane content and fade in on pane
|
|
68
|
+
* hover or keyboard focus within the toolbar.
|
|
69
|
+
* - `"hidden"` — toolbars are not rendered at all. The toolbar-driven
|
|
70
|
+
* affordances (drag handle, split/remove/rename) are unavailable, so
|
|
71
|
+
* layout changes must come from outside via the controlled `value`;
|
|
72
|
+
* divider resizing still works.
|
|
73
|
+
*/
|
|
74
|
+
type MosaicToolbarVisibility = "always" | "autohide" | "hidden";
|
|
75
|
+
type MosaicProps<T extends MosaicKey = string> = Omit<React.ComponentProps<"div">, "onChange" | "value" | "defaultValue"> & {
|
|
76
|
+
/**
|
|
77
|
+
* The tree of panes to render. `null` (or an empty tree via
|
|
78
|
+
* `emptyPlaceholder`) renders nothing tile-related. Leaves may be written
|
|
79
|
+
* as bare ids or as `{ id }` objects (any extra keys are ignored); object
|
|
80
|
+
* leaves are normalized to their bare id on the way in, and `onChange`
|
|
81
|
+
* always emits the normalized bare-id tree.
|
|
82
|
+
*/
|
|
83
|
+
value?: MosaicInputNode<T> | null;
|
|
84
|
+
/** Initial tree when uncontrolled. Accepts the same leaf shapes as `value`. */
|
|
85
|
+
defaultValue?: MosaicInputNode<T> | null;
|
|
86
|
+
/**
|
|
87
|
+
* Fires with the updated tree after a resize, toolbar split/remove, or
|
|
88
|
+
* drag-drop rearrange. Pass `value` back to fully control; omit for
|
|
89
|
+
* internal (uncontrolled) tracking — mirrors MultiColumn's
|
|
90
|
+
* `columns`/`onColumnsChange`.
|
|
91
|
+
*
|
|
92
|
+
* Note: there is no strict controlled veto. If a controlled consumer's
|
|
93
|
+
* `onChange` doesn't feed back an updated `value` (e.g. to reject a
|
|
94
|
+
* drag/split), the optimistic change still applies locally and persists —
|
|
95
|
+
* the same behavior MultiColumn already ships for resize/reorder. A true
|
|
96
|
+
* veto would need a different API shape (e.g. an `onBeforeChange` returning
|
|
97
|
+
* `boolean`), which is out of scope here.
|
|
98
|
+
*/
|
|
99
|
+
onChange?: (next: MosaicNode<T> | null) => void;
|
|
100
|
+
/** Renders the content for a leaf pane; required — Mosaic has no default tile content. */
|
|
101
|
+
renderTile: (id: T, path: MosaicPath) => React.ReactNode;
|
|
102
|
+
/** Renders the title shown in a pane's toolbar. Defaults to `String(id)`. */
|
|
103
|
+
renderTitle?: (id: T, path: MosaicPath) => React.ReactNode;
|
|
104
|
+
/** Renders extra toolbar actions for a pane, after the built-in split/remove buttons. */
|
|
105
|
+
renderControls?: (id: T, path: MosaicPath) => React.ReactNode;
|
|
106
|
+
/** Renders a rename (pencil) button in each pane's toolbar; double-clicking the title also starts editing. Renaming sets a plain-text name that overrides `renderTitle`/`String(id)` for that pane. Default off. */
|
|
107
|
+
renamable?: boolean;
|
|
108
|
+
/** Custom pane names, keyed by leaf id (controlled). Only panes that have been renamed need an entry. */
|
|
109
|
+
paneNames?: Partial<Record<T, string>>;
|
|
110
|
+
/** Initial pane names when uncontrolled. */
|
|
111
|
+
defaultPaneNames?: Partial<Record<T, string>>;
|
|
112
|
+
/** Fires with the updated name map after a rename commits (Enter, blur, or the confirm affordance). Clearing a pane's name back to empty removes its entry, falling back to `renderTitle`/`String(id)` again. Pass `paneNames` back to fully control; omit for internal (uncontrolled) tracking. */
|
|
113
|
+
onPaneNamesChange?: (names: Partial<Record<T, string>>) => void;
|
|
114
|
+
/**
|
|
115
|
+
* Creates the id for a new pane when a toolbar split button is used
|
|
116
|
+
* (drag-triggered splits reuse the dragged pane's existing id instead).
|
|
117
|
+
* May return a Promise. `renderTile` must be able to render whatever this
|
|
118
|
+
* returns.
|
|
119
|
+
*/
|
|
120
|
+
createNode: (path: MosaicPath) => T | Promise<T>;
|
|
121
|
+
/** Renders a drag handle in each pane's toolbar for drag-to-split/rearrange. Toolbar split/remove buttons remain active either way. Default enabled. */
|
|
122
|
+
dragToRearrange?: boolean;
|
|
123
|
+
/** Fraction (0-1) of a pane's width/height, measured from each edge, that counts as an edge drop zone rather than the center. Defaults to `0.25`. */
|
|
124
|
+
dropZoneFraction?: number;
|
|
125
|
+
/** Minimum size (percentage, 0-100) a pane can be resized down to. Defaults to `10`. */
|
|
126
|
+
minPaneSizePercentage?: number;
|
|
127
|
+
/**
|
|
128
|
+
* How pane toolbars are shown. `"always"` (default) keeps them visible;
|
|
129
|
+
* `"autohide"` overlays them on the pane content, fading in on pane hover
|
|
130
|
+
* or keyboard focus; `"hidden"` removes them entirely — the toolbar-driven
|
|
131
|
+
* affordances (drag handle, split/remove/rename) become unavailable, so
|
|
132
|
+
* drive layout changes through the controlled `value` instead. Divider
|
|
133
|
+
* resizing works in every mode.
|
|
134
|
+
*/
|
|
135
|
+
toolbarVisibility?: MosaicToolbarVisibility;
|
|
136
|
+
/** Rendered instead of the tree when `value`/the live tree is `null` (e.g. every pane has been removed). */
|
|
137
|
+
emptyPlaceholder?: React.ReactNode;
|
|
138
|
+
};
|
|
139
|
+
/** Recursive tiling layout: panes split into rows/columns, resized via draggable dividers, and rearranged by dragging a pane's title bar onto another pane's edge or center. */
|
|
140
|
+
declare function Mosaic<T extends MosaicKey = string>({
|
|
46
141
|
className,
|
|
142
|
+
style,
|
|
143
|
+
value,
|
|
144
|
+
defaultValue,
|
|
145
|
+
onChange,
|
|
146
|
+
renderTile,
|
|
147
|
+
renderTitle,
|
|
148
|
+
renderControls,
|
|
149
|
+
renamable,
|
|
150
|
+
paneNames,
|
|
151
|
+
defaultPaneNames,
|
|
152
|
+
onPaneNamesChange,
|
|
153
|
+
createNode,
|
|
154
|
+
dragToRearrange,
|
|
155
|
+
dropZoneFraction,
|
|
156
|
+
minPaneSizePercentage,
|
|
157
|
+
toolbarVisibility,
|
|
158
|
+
emptyPlaceholder,
|
|
47
159
|
...props
|
|
48
|
-
}:
|
|
49
|
-
|
|
50
|
-
|
|
160
|
+
}: MosaicProps<T>): react_jsx_runtime86.JSX.Element;
|
|
161
|
+
type MosaicWindowProps<T extends MosaicKey = string> = {
|
|
162
|
+
/** This pane's leaf id. */
|
|
163
|
+
id: T;
|
|
164
|
+
/** This pane's path from the tree root — supplied automatically when rendered by `Mosaic`. */
|
|
165
|
+
path: MosaicPath;
|
|
166
|
+
className?: string;
|
|
167
|
+
/** Extra toolbar actions rendered after the built-in split/remove buttons. */
|
|
168
|
+
controls?: React.ReactNode;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* A single pane's chrome: drag handle, title, split/remove buttons, and its
|
|
172
|
+
* `renderTile` content. Rendered internally by `Mosaic` for every leaf,
|
|
173
|
+
* and also exported for a consumer already inside a `<Mosaic>` tree who
|
|
174
|
+
* wants to add a fixed, non-tile element reusing the same toolbar chrome —
|
|
175
|
+
* it calls `useMosaic()` internally, so it can't be used to build an
|
|
176
|
+
* independent custom recursive renderer outside a `Mosaic`.
|
|
177
|
+
*
|
|
178
|
+
* The `path` you supply for such a fixed element must not collide with any
|
|
179
|
+
* real leaf's path in the current tree — its split/remove/rename actions
|
|
180
|
+
* operate on whatever the tree resolves at that path, so a colliding path
|
|
181
|
+
* would silently act on that real pane instead of a no-op.
|
|
182
|
+
*/
|
|
183
|
+
declare function MosaicWindow<T extends MosaicKey = string>({
|
|
184
|
+
id,
|
|
185
|
+
path,
|
|
51
186
|
className,
|
|
52
|
-
|
|
53
|
-
}:
|
|
187
|
+
controls
|
|
188
|
+
}: MosaicWindowProps<T>): react_jsx_runtime86.JSX.Element;
|
|
54
189
|
//#endregion
|
|
55
|
-
export {
|
|
190
|
+
export { MosaicWindowProps as a, MosaicInputNode as c, MosaicLeafObject as d, MosaicNode as f, MosaicWindow as i, MosaicInputParent as l, MosaicPath as m, MosaicProps as n, DropZone as o, MosaicParent as p, MosaicToolbarVisibility as r, MosaicDirection as s, Mosaic as t, MosaicKey as u };
|
|
56
191
|
//# sourceMappingURL=index44.d.cts.map
|
package/dist/index44.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index44.d.cts","names":[],"sources":["../src/primitives/
|
|
1
|
+
{"version":3,"file":"index44.d.cts","names":[],"sources":["../src/primitives/Mosaic/Mosaic.utils.ts","../src/primitives/Mosaic/Mosaic.tsx"],"mappings":";;;;;KAMK,SAAA;;KAGA,eAAA;;AAHS,KAMT,UAAA,GAHA,CAAA,OAAe,GAAA,QAAA,CAAA,EAAA;AAAA,KAKf,YAFU,CAAA,UAEa,SAFb,GAEyB,SAFzB,CAAA,GAAA;EAEV,SAAA,EACQ,eADI;EAAA;OAAW,EAGnB,UAHmB,CAGR,CAHQ,CAAA,GAAA,IAAA;;QACf,EAIH,UAJG,CAIQ,CAJR,CAAA,GAAA,IAAA;;iBAEJ,CAAA,EAAA,MAAA;;;AAEW,KAMf,UANe,CAAA,UAMM,SANN,GAMkB,SANlB,CAAA,GAM+B,CAN/B,GAMmC,YANnC,CAMgD,CANhD,CAAA;AAAA;KASf,QAAA,GAHU,KAAA,GAAA,QAAA,GAAA,MAAA,GAAA,OAAA,GAAA,QAAA;;;;;;AAAoD;AAAA,KAW9D,gBARQ,CAAA,UAQmB,SARnB,GAQ+B,SAR/B,CAAA,GAAA;EAQR,EAAA,EACC,CADD;EAAgB,SAAA,CAAA,EAAA,KAAA;QAAW,EAAA,MAAA,CAAA,EAAA,OAAA;;KAM3B,iBALC,CAAA,UAK2B,SAL3B,GAKuC,SALvC,CAAA,GAAA;EAAC,SAAA,EAMM,eANN;EAKF;EAAiB,KAAA,CAAA,EAGZ,eAHY,CAGI,CAHJ,CAAA,GAAA,IAAA;;QAAuB,CAAA,EAKlC,eALkC,CAKlB,CALkB,CAAA,GAAA,IAAA;;iBAGnB,CAAA,EAAA,MAAA;;;;AAEA;AAAA;;;;;;;;;KAiBrB,eAIY,CAAA,UAJc,SAId,GAJ0B,SAI1B,CAAA,GAHb,CAGa,GAFb,gBAEa,CAFI,CAEJ,CAAA,GADb,iBACa,CADK,CACL,CAAA,GAAb,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CQ;EAoDnB,UAAA,EAAA,CAAA,IAAW,EAgDK,UAhDL,EAAA,GAgDoB,CAhDpB,GAgDwB,OAhDxB,CAgDgC,CAhDhC,CAAA;EAAA;iBAAW,CAAA,EAAA,OAAA;;kBAAsB,CAAA,EAAA,MAAA;;uBAWvC,CAAA,EAAA,MAAA;;;;;;;;;mBAoBoB,CAAA,EAgCR,uBAhCQ;;kBAEN,CAAA,EAgCH,KAAA,CAAM,SAhCH;;;iBAoCf,MAhCoB,CAAA,UAgCH,SAhCG,GAAA,MAAA,CAAA,CAAA;EAAA,SAAA;EAAA,KAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,UAAA;EAAA,WAAA;EAAA,cAAA;EAAA,SAAA;EAAA,SAAA;EAAA,gBAAA;EAAA,iBAAA;EAAA,UAAA;EAAA,eAAA;EAAA,gBAAA;EAAA,qBAAA;EAAA,iBAAA;EAAA,gBAAA;EAAA,GAAA;AAAA,CAAA,EAoD1B,WApD0B,CAoDd,CApDc,CAAA,CAAA,EAoDZ,mBAAA,CAAA,GAAA,CAAA,OApDY;KAmWxB,iBAnWiB,CAAA,UAmWW,SAnWX,GAAA,MAAA,CAAA,GAAA;;MAqWhB,CAnW8B;;MAAf,EAqWb,UArWa;WAEwB,CAAA,EAAA,MAAA;;UAAf,CAAA,EAsWjB,KAAA,CAAM,SAtWW;;;;;;;AAwBM;AAAA;;;;;;;iBA8V3B,YArVP,CAAA,UAqV8B,SArV9B,GAAA,MAAA,CAAA,CAAA;EAAA,EAAA;EAAA,IAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EA0VC,iBA1VD,CA0VmB,CA1VnB,CAAA,CAAA,EA0VqB,mBAAA,CAAA,GAAA,CAAA,OA1VrB"}
|
package/dist/index44.d.ts
CHANGED
|
@@ -1,56 +1,191 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
3
|
-
import { NavigationMenu } from "radix-ui";
|
|
4
|
-
import * as class_variance_authority_types24 from "class-variance-authority/types";
|
|
2
|
+
import * as react_jsx_runtime177 from "react/jsx-runtime";
|
|
5
3
|
|
|
6
|
-
//#region src/primitives/
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
/** A
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
4
|
+
//#region src/primitives/Mosaic/Mosaic.utils.d.ts
|
|
5
|
+
/** A pane's identity. Compared with `===`, so no object identities. */
|
|
6
|
+
type MosaicKey = string | number;
|
|
7
|
+
/** "row" places children side by side (horizontal split); "column" stacks them (vertical split). */
|
|
8
|
+
type MosaicDirection = "row" | "column";
|
|
9
|
+
/** Sequence of "first"/"second" steps from the tree root down to a node. */
|
|
10
|
+
type MosaicPath = ("first" | "second")[];
|
|
11
|
+
type MosaicParent<T extends MosaicKey = MosaicKey> = {
|
|
12
|
+
direction: MosaicDirection;
|
|
13
|
+
/** A node, or `null` for an intentionally blank slot: the space is kept (per `splitPercentage`) but no pane chrome renders there, and drags/splits can't target it. */
|
|
14
|
+
first: MosaicNode<T> | null;
|
|
15
|
+
/** Same as `first` — `null` renders that side as blank space. */
|
|
16
|
+
second: MosaicNode<T> | null;
|
|
17
|
+
/** Percentage (0-100) of the group's size given to `first`. Defaults to 50 when omitted. */
|
|
18
|
+
splitPercentage?: number;
|
|
19
|
+
};
|
|
20
|
+
/** A leaf pane id, or a parent split of two further nodes. */
|
|
21
|
+
type MosaicNode<T extends MosaicKey = MosaicKey> = T | MosaicParent<T>;
|
|
22
|
+
/** Which edge (or center) of a pane a drag is hovering over. */
|
|
23
|
+
type DropZone = "top" | "bottom" | "left" | "right" | "center";
|
|
24
|
+
/**
|
|
25
|
+
* A leaf supplied to `value`/`defaultValue` as an object: `id` is the pane's
|
|
26
|
+
* identity, every other key is ignored by Mosaic. `direction` is reserved —
|
|
27
|
+
* it's what distinguishes a parent split from an object leaf — so an object
|
|
28
|
+
* leaf must not have one.
|
|
29
|
+
*/
|
|
30
|
+
type MosaicLeafObject<T extends MosaicKey = MosaicKey> = {
|
|
31
|
+
id: T;
|
|
32
|
+
direction?: never;
|
|
33
|
+
[extra: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
type MosaicInputParent<T extends MosaicKey = MosaicKey> = {
|
|
36
|
+
direction: MosaicDirection;
|
|
37
|
+
/** A node, or a blank slot: `null`, `undefined`, or simply omitted. Blank slots normalize to `null` in the canonical tree. */
|
|
38
|
+
first?: MosaicInputNode<T> | null;
|
|
39
|
+
/** Same as `first` — omit (or pass `null`/`undefined`) for a blank slot. */
|
|
40
|
+
second?: MosaicInputNode<T> | null;
|
|
41
|
+
/** Percentage (0-100) of the group's size given to `first`. Defaults to 50 when omitted. */
|
|
42
|
+
splitPercentage?: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The tree shape `value`/`defaultValue` accept: like `MosaicNode`, but a leaf
|
|
46
|
+
* may also be written as `{ id }` (`MosaicLeafObject`). Normalized to the
|
|
47
|
+
* canonical bare-id `MosaicNode` on the way in — `onChange` always emits the
|
|
48
|
+
* canonical shape.
|
|
49
|
+
*
|
|
50
|
+
* `MosaicParent<T>` is listed even though it's structurally a subtype of
|
|
51
|
+
* `MosaicInputParent<T>`: passing a value annotated as `MosaicNode<T>` /
|
|
52
|
+
* `MosaicParent<T>` then infers `T` through the matching alias, instead of
|
|
53
|
+
* falling back to `createNode`'s return type (which may be a narrower
|
|
54
|
+
* literal).
|
|
55
|
+
*/
|
|
56
|
+
type MosaicInputNode<T extends MosaicKey = MosaicKey> = T | MosaicLeafObject<T> | MosaicInputParent<T> | MosaicParent<T>;
|
|
57
|
+
/**
|
|
58
|
+
* Collapses `{ id }` object leaves to their bare id, recursively, yielding
|
|
59
|
+
* the canonical `MosaicNode` every tree algorithm operates on. Extra keys on
|
|
60
|
+
* an object leaf are dropped — Mosaic reads only `id`.
|
|
61
|
+
*/
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/primitives/Mosaic/Mosaic.d.ts
|
|
64
|
+
/**
|
|
65
|
+
* Toolbar display mode for every pane in a Mosaic:
|
|
66
|
+
* - `"always"` — toolbars are always visible (default).
|
|
67
|
+
* - `"autohide"` — toolbars overlay the pane content and fade in on pane
|
|
68
|
+
* hover or keyboard focus within the toolbar.
|
|
69
|
+
* - `"hidden"` — toolbars are not rendered at all. The toolbar-driven
|
|
70
|
+
* affordances (drag handle, split/remove/rename) are unavailable, so
|
|
71
|
+
* layout changes must come from outside via the controlled `value`;
|
|
72
|
+
* divider resizing still works.
|
|
73
|
+
*/
|
|
74
|
+
type MosaicToolbarVisibility = "always" | "autohide" | "hidden";
|
|
75
|
+
type MosaicProps<T extends MosaicKey = string> = Omit<React.ComponentProps<"div">, "onChange" | "value" | "defaultValue"> & {
|
|
76
|
+
/**
|
|
77
|
+
* The tree of panes to render. `null` (or an empty tree via
|
|
78
|
+
* `emptyPlaceholder`) renders nothing tile-related. Leaves may be written
|
|
79
|
+
* as bare ids or as `{ id }` objects (any extra keys are ignored); object
|
|
80
|
+
* leaves are normalized to their bare id on the way in, and `onChange`
|
|
81
|
+
* always emits the normalized bare-id tree.
|
|
82
|
+
*/
|
|
83
|
+
value?: MosaicInputNode<T> | null;
|
|
84
|
+
/** Initial tree when uncontrolled. Accepts the same leaf shapes as `value`. */
|
|
85
|
+
defaultValue?: MosaicInputNode<T> | null;
|
|
86
|
+
/**
|
|
87
|
+
* Fires with the updated tree after a resize, toolbar split/remove, or
|
|
88
|
+
* drag-drop rearrange. Pass `value` back to fully control; omit for
|
|
89
|
+
* internal (uncontrolled) tracking — mirrors MultiColumn's
|
|
90
|
+
* `columns`/`onColumnsChange`.
|
|
91
|
+
*
|
|
92
|
+
* Note: there is no strict controlled veto. If a controlled consumer's
|
|
93
|
+
* `onChange` doesn't feed back an updated `value` (e.g. to reject a
|
|
94
|
+
* drag/split), the optimistic change still applies locally and persists —
|
|
95
|
+
* the same behavior MultiColumn already ships for resize/reorder. A true
|
|
96
|
+
* veto would need a different API shape (e.g. an `onBeforeChange` returning
|
|
97
|
+
* `boolean`), which is out of scope here.
|
|
98
|
+
*/
|
|
99
|
+
onChange?: (next: MosaicNode<T> | null) => void;
|
|
100
|
+
/** Renders the content for a leaf pane; required — Mosaic has no default tile content. */
|
|
101
|
+
renderTile: (id: T, path: MosaicPath) => React.ReactNode;
|
|
102
|
+
/** Renders the title shown in a pane's toolbar. Defaults to `String(id)`. */
|
|
103
|
+
renderTitle?: (id: T, path: MosaicPath) => React.ReactNode;
|
|
104
|
+
/** Renders extra toolbar actions for a pane, after the built-in split/remove buttons. */
|
|
105
|
+
renderControls?: (id: T, path: MosaicPath) => React.ReactNode;
|
|
106
|
+
/** Renders a rename (pencil) button in each pane's toolbar; double-clicking the title also starts editing. Renaming sets a plain-text name that overrides `renderTitle`/`String(id)` for that pane. Default off. */
|
|
107
|
+
renamable?: boolean;
|
|
108
|
+
/** Custom pane names, keyed by leaf id (controlled). Only panes that have been renamed need an entry. */
|
|
109
|
+
paneNames?: Partial<Record<T, string>>;
|
|
110
|
+
/** Initial pane names when uncontrolled. */
|
|
111
|
+
defaultPaneNames?: Partial<Record<T, string>>;
|
|
112
|
+
/** Fires with the updated name map after a rename commits (Enter, blur, or the confirm affordance). Clearing a pane's name back to empty removes its entry, falling back to `renderTitle`/`String(id)` again. Pass `paneNames` back to fully control; omit for internal (uncontrolled) tracking. */
|
|
113
|
+
onPaneNamesChange?: (names: Partial<Record<T, string>>) => void;
|
|
114
|
+
/**
|
|
115
|
+
* Creates the id for a new pane when a toolbar split button is used
|
|
116
|
+
* (drag-triggered splits reuse the dragged pane's existing id instead).
|
|
117
|
+
* May return a Promise. `renderTile` must be able to render whatever this
|
|
118
|
+
* returns.
|
|
119
|
+
*/
|
|
120
|
+
createNode: (path: MosaicPath) => T | Promise<T>;
|
|
121
|
+
/** Renders a drag handle in each pane's toolbar for drag-to-split/rearrange. Toolbar split/remove buttons remain active either way. Default enabled. */
|
|
122
|
+
dragToRearrange?: boolean;
|
|
123
|
+
/** Fraction (0-1) of a pane's width/height, measured from each edge, that counts as an edge drop zone rather than the center. Defaults to `0.25`. */
|
|
124
|
+
dropZoneFraction?: number;
|
|
125
|
+
/** Minimum size (percentage, 0-100) a pane can be resized down to. Defaults to `10`. */
|
|
126
|
+
minPaneSizePercentage?: number;
|
|
127
|
+
/**
|
|
128
|
+
* How pane toolbars are shown. `"always"` (default) keeps them visible;
|
|
129
|
+
* `"autohide"` overlays them on the pane content, fading in on pane hover
|
|
130
|
+
* or keyboard focus; `"hidden"` removes them entirely — the toolbar-driven
|
|
131
|
+
* affordances (drag handle, split/remove/rename) become unavailable, so
|
|
132
|
+
* drive layout changes through the controlled `value` instead. Divider
|
|
133
|
+
* resizing works in every mode.
|
|
134
|
+
*/
|
|
135
|
+
toolbarVisibility?: MosaicToolbarVisibility;
|
|
136
|
+
/** Rendered instead of the tree when `value`/the live tree is `null` (e.g. every pane has been removed). */
|
|
137
|
+
emptyPlaceholder?: React.ReactNode;
|
|
138
|
+
};
|
|
139
|
+
/** Recursive tiling layout: panes split into rows/columns, resized via draggable dividers, and rearranged by dragging a pane's title bar onto another pane's edge or center. */
|
|
140
|
+
declare function Mosaic<T extends MosaicKey = string>({
|
|
46
141
|
className,
|
|
142
|
+
style,
|
|
143
|
+
value,
|
|
144
|
+
defaultValue,
|
|
145
|
+
onChange,
|
|
146
|
+
renderTile,
|
|
147
|
+
renderTitle,
|
|
148
|
+
renderControls,
|
|
149
|
+
renamable,
|
|
150
|
+
paneNames,
|
|
151
|
+
defaultPaneNames,
|
|
152
|
+
onPaneNamesChange,
|
|
153
|
+
createNode,
|
|
154
|
+
dragToRearrange,
|
|
155
|
+
dropZoneFraction,
|
|
156
|
+
minPaneSizePercentage,
|
|
157
|
+
toolbarVisibility,
|
|
158
|
+
emptyPlaceholder,
|
|
47
159
|
...props
|
|
48
|
-
}:
|
|
49
|
-
|
|
50
|
-
|
|
160
|
+
}: MosaicProps<T>): react_jsx_runtime177.JSX.Element;
|
|
161
|
+
type MosaicWindowProps<T extends MosaicKey = string> = {
|
|
162
|
+
/** This pane's leaf id. */
|
|
163
|
+
id: T;
|
|
164
|
+
/** This pane's path from the tree root — supplied automatically when rendered by `Mosaic`. */
|
|
165
|
+
path: MosaicPath;
|
|
166
|
+
className?: string;
|
|
167
|
+
/** Extra toolbar actions rendered after the built-in split/remove buttons. */
|
|
168
|
+
controls?: React.ReactNode;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* A single pane's chrome: drag handle, title, split/remove buttons, and its
|
|
172
|
+
* `renderTile` content. Rendered internally by `Mosaic` for every leaf,
|
|
173
|
+
* and also exported for a consumer already inside a `<Mosaic>` tree who
|
|
174
|
+
* wants to add a fixed, non-tile element reusing the same toolbar chrome —
|
|
175
|
+
* it calls `useMosaic()` internally, so it can't be used to build an
|
|
176
|
+
* independent custom recursive renderer outside a `Mosaic`.
|
|
177
|
+
*
|
|
178
|
+
* The `path` you supply for such a fixed element must not collide with any
|
|
179
|
+
* real leaf's path in the current tree — its split/remove/rename actions
|
|
180
|
+
* operate on whatever the tree resolves at that path, so a colliding path
|
|
181
|
+
* would silently act on that real pane instead of a no-op.
|
|
182
|
+
*/
|
|
183
|
+
declare function MosaicWindow<T extends MosaicKey = string>({
|
|
184
|
+
id,
|
|
185
|
+
path,
|
|
51
186
|
className,
|
|
52
|
-
|
|
53
|
-
}:
|
|
187
|
+
controls
|
|
188
|
+
}: MosaicWindowProps<T>): react_jsx_runtime177.JSX.Element;
|
|
54
189
|
//#endregion
|
|
55
|
-
export {
|
|
190
|
+
export { MosaicWindowProps as a, MosaicInputNode as c, MosaicLeafObject as d, MosaicNode as f, MosaicWindow as i, MosaicInputParent as l, MosaicPath as m, MosaicProps as n, DropZone as o, MosaicParent as p, MosaicToolbarVisibility as r, MosaicDirection as s, Mosaic as t, MosaicKey as u };
|
|
56
191
|
//# sourceMappingURL=index44.d.ts.map
|
package/dist/index44.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index44.d.ts","names":[],"sources":["../src/primitives/
|
|
1
|
+
{"version":3,"file":"index44.d.ts","names":[],"sources":["../src/primitives/Mosaic/Mosaic.utils.ts","../src/primitives/Mosaic/Mosaic.tsx"],"mappings":";;;;;KAMK,SAAA;;KAGA,eAAA;;AAHS,KAMT,UAAA,GAHA,CAAA,OAAe,GAAA,QAAA,CAAA,EAAA;AAAA,KAKf,YAFU,CAAA,UAEa,SAFb,GAEyB,SAFzB,CAAA,GAAA;EAEV,SAAA,EACQ,eADI;EAAA;OAAW,EAGnB,UAHmB,CAGR,CAHQ,CAAA,GAAA,IAAA;;QACf,EAIH,UAJG,CAIQ,CAJR,CAAA,GAAA,IAAA;;iBAEJ,CAAA,EAAA,MAAA;;;AAEW,KAMf,UANe,CAAA,UAMM,SANN,GAMkB,SANlB,CAAA,GAM+B,CAN/B,GAMmC,YANnC,CAMgD,CANhD,CAAA;AAAA;KASf,QAAA,GAHU,KAAA,GAAA,QAAA,GAAA,MAAA,GAAA,OAAA,GAAA,QAAA;;;;;;AAAoD;AAAA,KAW9D,gBARQ,CAAA,UAQmB,SARnB,GAQ+B,SAR/B,CAAA,GAAA;EAQR,EAAA,EACC,CADD;EAAgB,SAAA,CAAA,EAAA,KAAA;QAAW,EAAA,MAAA,CAAA,EAAA,OAAA;;KAM3B,iBALC,CAAA,UAK2B,SAL3B,GAKuC,SALvC,CAAA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A,UAqV8B,SArV9B,GAAA,MAAA,CAAA,CAAA;EAAA,EAAA;EAAA,IAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EA0VC,iBA1VD,CA0VmB,CA1VnB,CAAA,CAAA,EA0VqB,oBAAA,CAAA,GAAA,CAAA,OA1VrB"}
|
package/dist/index45.d.cts
CHANGED
|
@@ -1,45 +1,22 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as react_jsx_runtime300 from "react/jsx-runtime";
|
|
2
|
+
import * as class_variance_authority_types27 from "class-variance-authority/types";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
|
|
5
|
-
//#region src/primitives/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/** The floating, portaled panel rendered when the popover is open. */
|
|
15
|
-
declare function PopoverContent({
|
|
16
|
-
/** Extra classes merged onto the content surface. */
|
|
17
|
-
className,
|
|
18
|
-
/** Alignment of the content relative to the trigger along the chosen side. */
|
|
19
|
-
align,
|
|
20
|
-
/** Distance in px between the content and the trigger. */
|
|
21
|
-
sideOffset,
|
|
22
|
-
...props
|
|
23
|
-
}: React.ComponentProps<typeof Popover.Content>): react_jsx_runtime305.JSX.Element;
|
|
24
|
-
/** Optional element the content positions against instead of the trigger. */
|
|
25
|
-
declare function PopoverAnchor({
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof Popover.Anchor>): react_jsx_runtime305.JSX.Element;
|
|
28
|
-
/** Stacked header slot for a title and description at the top of the content. */
|
|
29
|
-
declare function PopoverHeader({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: React.ComponentProps<"div">): react_jsx_runtime305.JSX.Element;
|
|
33
|
-
/** Emphasised title line for the popover header. */
|
|
34
|
-
declare function PopoverTitle({
|
|
35
|
-
className,
|
|
36
|
-
...props
|
|
37
|
-
}: React.ComponentProps<"h2">): react_jsx_runtime305.JSX.Element;
|
|
38
|
-
/** Muted supporting copy for the popover header. */
|
|
39
|
-
declare function PopoverDescription({
|
|
6
|
+
//#region src/primitives/NativeSelect/NativeSelect.d.ts
|
|
7
|
+
declare const nativeSelectVariants: (props?: ({
|
|
8
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types27.ClassProp) | undefined) => string;
|
|
10
|
+
/**
|
|
11
|
+
* A styled native `<select>` with a chevron affordance. Mirrors Input visuals
|
|
12
|
+
* and shares its size scale; pass `<option>`/`<optgroup>` as children.
|
|
13
|
+
*/
|
|
14
|
+
declare function NativeSelect({
|
|
40
15
|
className,
|
|
16
|
+
size,
|
|
17
|
+
children,
|
|
41
18
|
...props
|
|
42
|
-
}: React.ComponentProps<"
|
|
19
|
+
}: Omit<React.ComponentProps<"select">, "size"> & VariantProps<typeof nativeSelectVariants>): react_jsx_runtime300.JSX.Element;
|
|
43
20
|
//#endregion
|
|
44
|
-
export {
|
|
21
|
+
export { nativeSelectVariants as n, NativeSelect as t };
|
|
45
22
|
//# sourceMappingURL=index45.d.cts.map
|
package/dist/index45.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index45.d.cts","names":[],"sources":["../src/primitives/
|
|
1
|
+
{"version":3,"file":"index45.d.cts","names":[],"sources":["../src/primitives/NativeSelect/NativeSelect.tsx"],"mappings":";;;;;;cAUM;;IAqBL,gCAAA,CAAA;;AA5BmC;;;iBAkC3B,YAAA,CACP;EAAA,SAAA;EAAA,IAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAIC,IAJD,CAIM,KAAA,CAAM,cAJZ,CAAA,QAAA,CAAA,EAAA,MAAA,CAAA,GAIgD,YAJhD,CAAA,OAIoE,oBAJpE,CAAA,CAAA,EAIyF,oBAAA,CAAA,GAAA,CAAA,OAJzF"}
|