@datalayer/primer-addons 1.0.54 → 1.0.56
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/README.md +18 -0
- package/lib/components/animated-text/AnimatedText.d.ts +56 -0
- package/lib/components/animated-text/AnimatedText.js +100 -0
- package/lib/components/animated-text/AnimatedText.stories.d.ts +14 -0
- package/lib/components/animated-text/AnimatedText.stories.js +21 -0
- package/lib/components/animated-text/index.d.ts +1 -0
- package/lib/components/animated-text/index.js +5 -0
- package/lib/components/appearance/ColorModeCircle.js +3 -1
- package/lib/components/buttons/Buttons.stories.d.ts +14 -0
- package/lib/components/buttons/Buttons.stories.js +24 -0
- package/lib/components/buttons/CopyToClipboardButton.d.ts +13 -0
- package/lib/components/buttons/CopyToClipboardButton.js +73 -0
- package/lib/components/buttons/DownloadCSVButton.d.ts +8 -0
- package/lib/components/buttons/DownloadCSVButton.js +12 -0
- package/lib/components/buttons/DownloadJsonButton.d.ts +9 -0
- package/lib/components/buttons/DownloadJsonButton.js +12 -0
- package/lib/components/buttons/LongActionButton.d.ts +29 -0
- package/lib/components/buttons/LongActionButton.js +23 -0
- package/lib/components/buttons/UploadButton.d.ts +35 -0
- package/lib/components/buttons/UploadButton.js +35 -0
- package/lib/components/buttons/VariantType.d.ts +1 -0
- package/lib/components/buttons/VariantType.js +5 -0
- package/lib/components/buttons/index.d.ts +6 -0
- package/lib/components/buttons/index.js +10 -0
- package/lib/components/display/AvatarSkeleton.d.ts +5 -0
- package/lib/components/display/AvatarSkeleton.js +11 -0
- package/lib/components/display/BusyDots.d.ts +9 -0
- package/lib/components/display/BusyDots.js +31 -0
- package/lib/components/display/CenteredSpinner.d.ts +11 -0
- package/lib/components/display/CenteredSpinner.js +11 -0
- package/lib/components/display/CodePreview.d.ts +4 -0
- package/lib/components/display/CodePreview.js +15 -0
- package/lib/components/display/Display.stories.d.ts +17 -0
- package/lib/components/display/Display.stories.js +27 -0
- package/lib/components/display/HorizontalCenter.d.ts +6 -0
- package/lib/components/display/HorizontalCenter.js +10 -0
- package/lib/components/display/NotebookSkeleton.d.ts +2 -0
- package/lib/components/display/NotebookSkeleton.js +11 -0
- package/lib/components/display/Placeholder.d.ts +2 -0
- package/lib/components/display/Placeholder.js +9 -0
- package/lib/components/display/VisuallyHidden.d.ts +5 -0
- package/lib/components/display/VisuallyHidden.js +24 -0
- package/lib/components/display/index.d.ts +8 -0
- package/lib/components/display/index.js +12 -0
- package/lib/components/emoji/FluentEmoji.d.ts +33 -0
- package/lib/components/emoji/FluentEmoji.js +66 -0
- package/lib/components/emoji/FluentEmoji.stories.d.ts +14 -0
- package/lib/components/emoji/FluentEmoji.stories.js +19 -0
- package/lib/components/emoji/faceEmojis.d.ts +24 -0
- package/lib/components/emoji/faceEmojis.js +229 -0
- package/lib/components/emoji/fluent/loaders.d.ts +12 -0
- package/lib/components/emoji/fluent/loaders.js +200 -0
- package/lib/components/emoji/fluent/svg/1f304.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f304.js +9 -0
- package/lib/components/emoji/fluent/svg/1f308.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f308.js +9 -0
- package/lib/components/emoji/fluent/svg/1f30a.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f30a.js +9 -0
- package/lib/components/emoji/fluent/svg/1f30d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f30d.js +9 -0
- package/lib/components/emoji/fluent/svg/1f30f.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f30f.js +9 -0
- package/lib/components/emoji/fluent/svg/1f310.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f310.js +9 -0
- package/lib/components/emoji/fluent/svg/1f31f.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f31f.js +9 -0
- package/lib/components/emoji/fluent/svg/1f324.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f324.js +9 -0
- package/lib/components/emoji/fluent/svg/1f326.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f326.js +9 -0
- package/lib/components/emoji/fluent/svg/1f327.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f327.js +9 -0
- package/lib/components/emoji/fluent/svg/1f331.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f331.js +9 -0
- package/lib/components/emoji/fluent/svg/1f33e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f33e.js +9 -0
- package/lib/components/emoji/fluent/svg/1f340.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f340.js +9 -0
- package/lib/components/emoji/fluent/svg/1f355.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f355.js +9 -0
- package/lib/components/emoji/fluent/svg/1f372.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f372.js +9 -0
- package/lib/components/emoji/fluent/svg/1f373.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f373.js +9 -0
- package/lib/components/emoji/fluent/svg/1f381.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f381.js +9 -0
- package/lib/components/emoji/fluent/svg/1f385.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f385.js +9 -0
- package/lib/components/emoji/fluent/svg/1f386.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f386.js +9 -0
- package/lib/components/emoji/fluent/svg/1f387.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f387.js +9 -0
- package/lib/components/emoji/fluent/svg/1f389.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f389.js +9 -0
- package/lib/components/emoji/fluent/svg/1f393.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f393.js +9 -0
- package/lib/components/emoji/fluent/svg/1f399.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f399.js +9 -0
- package/lib/components/emoji/fluent/svg/1f39b.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f39b.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3a8.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3a8.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3ab.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3ab.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3ac.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3ac.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3af.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3af.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3b5.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3b5.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3c4.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3c4.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3c6.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3c6.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3ca.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3ca.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3d7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3d7.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3db.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3db.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3e0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e0.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3e2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e2.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3e5.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e5.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3e6.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3e6.js +9 -0
- package/lib/components/emoji/fluent/svg/1f3f7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f3f7.js +9 -0
- package/lib/components/emoji/fluent/svg/1f409.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f409.js +9 -0
- package/lib/components/emoji/fluent/svg/1f419.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f419.js +9 -0
- package/lib/components/emoji/fluent/svg/1f41b.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f41b.js +9 -0
- package/lib/components/emoji/fluent/svg/1f41d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f41d.js +9 -0
- package/lib/components/emoji/fluent/svg/1f427.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f427.js +9 -0
- package/lib/components/emoji/fluent/svg/1f431.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f431.js +9 -0
- package/lib/components/emoji/fluent/svg/1f432.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f432.js +9 -0
- package/lib/components/emoji/fluent/svg/1f433.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f433.js +9 -0
- package/lib/components/emoji/fluent/svg/1f436.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f436.js +9 -0
- package/lib/components/emoji/fluent/svg/1f440.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f440.js +9 -0
- package/lib/components/emoji/fluent/svg/1f441.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f441.js +9 -0
- package/lib/components/emoji/fluent/svg/1f44b.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f44b.js +9 -0
- package/lib/components/emoji/fluent/svg/1f450.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f450.js +9 -0
- package/lib/components/emoji/fluent/svg/1f465.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f465.js +9 -0
- package/lib/components/emoji/fluent/svg/1f477.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f477.js +9 -0
- package/lib/components/emoji/fluent/svg/1f47d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f47d.js +9 -0
- package/lib/components/emoji/fluent/svg/1f47e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f47e.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4a1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4a1.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4ac.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4ac.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4b0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4b0.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4b3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4b3.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4b9.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4b9.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4bc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4bc.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4be.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4be.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4c1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4c1.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4c2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4c2.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4c4.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4c4.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4c5.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4c5.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4c8.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4c8.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4ca.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4ca.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4cb.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4cb.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4cc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4cc.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4d1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4d1.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4d3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4d3.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4d6.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4d6.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4da.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4da.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4dc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4dc.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4dd.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4dd.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4de.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4de.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4e1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4e1.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4e2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4e2.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4e3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4e3.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4e6.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4e6.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4e7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4e7.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4ec.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4ec.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4f0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4f0.js +9 -0
- package/lib/components/emoji/fluent/svg/1f4f7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f4f7.js +9 -0
- package/lib/components/emoji/fluent/svg/1f500.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f500.js +9 -0
- package/lib/components/emoji/fluent/svg/1f501.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f501.js +9 -0
- package/lib/components/emoji/fluent/svg/1f504.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f504.js +9 -0
- package/lib/components/emoji/fluent/svg/1f50d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f50d.js +9 -0
- package/lib/components/emoji/fluent/svg/1f50e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f50e.js +9 -0
- package/lib/components/emoji/fluent/svg/1f511.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f511.js +9 -0
- package/lib/components/emoji/fluent/svg/1f512.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f512.js +9 -0
- package/lib/components/emoji/fluent/svg/1f514.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f514.js +9 -0
- package/lib/components/emoji/fluent/svg/1f525.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f525.js +9 -0
- package/lib/components/emoji/fluent/svg/1f527.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f527.js +9 -0
- package/lib/components/emoji/fluent/svg/1f52c.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f52c.js +9 -0
- package/lib/components/emoji/fluent/svg/1f52d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f52d.js +9 -0
- package/lib/components/emoji/fluent/svg/1f552.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f552.js +9 -0
- package/lib/components/emoji/fluent/svg/1f58a.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f58a.js +9 -0
- package/lib/components/emoji/fluent/svg/1f58b.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f58b.js +9 -0
- package/lib/components/emoji/fluent/svg/1f5b2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5b2.js +9 -0
- package/lib/components/emoji/fluent/svg/1f5bc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5bc.js +9 -0
- package/lib/components/emoji/fluent/svg/1f5c2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5c2.js +9 -0
- package/lib/components/emoji/fluent/svg/1f5c3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5c3.js +9 -0
- package/lib/components/emoji/fluent/svg/1f5d1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5d1.js +9 -0
- package/lib/components/emoji/fluent/svg/1f5d3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5d3.js +9 -0
- package/lib/components/emoji/fluent/svg/1f5dc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5dc.js +9 -0
- package/lib/components/emoji/fluent/svg/1f5fa.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f5fa.js +9 -0
- package/lib/components/emoji/fluent/svg/1f600.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f600.js +9 -0
- package/lib/components/emoji/fluent/svg/1f604.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f604.js +9 -0
- package/lib/components/emoji/fluent/svg/1f60e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f60e.js +9 -0
- package/lib/components/emoji/fluent/svg/1f642.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f642.js +9 -0
- package/lib/components/emoji/fluent/svg/1f680.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f680.js +9 -0
- package/lib/components/emoji/fluent/svg/1f69a.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f69a.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6a2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6a2.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6a7.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6a7.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6b2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6b2.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6cd.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6cd.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6d2.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6d2.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6df.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6df.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6e0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6e0.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6e1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6e1.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6eb.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6eb.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6f0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6f0.js +9 -0
- package/lib/components/emoji/fluent/svg/1f6f8.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f6f8.js +9 -0
- package/lib/components/emoji/fluent/svg/1f913.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f913.js +9 -0
- package/lib/components/emoji/fluent/svg/1f916.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f916.js +9 -0
- package/lib/components/emoji/fluent/svg/1f917.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f917.js +9 -0
- package/lib/components/emoji/fluent/svg/1f91d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f91d.js +9 -0
- package/lib/components/emoji/fluent/svg/1f920.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f920.js +9 -0
- package/lib/components/emoji/fluent/svg/1f977.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f977.js +9 -0
- package/lib/components/emoji/fluent/svg/1f984.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f984.js +9 -0
- package/lib/components/emoji/fluent/svg/1f988.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f988.js +9 -0
- package/lib/components/emoji/fluent/svg/1f989.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f989.js +9 -0
- package/lib/components/emoji/fluent/svg/1f98a.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f98a.js +9 -0
- package/lib/components/emoji/fluent/svg/1f98e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f98e.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d0.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f33e.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f33e.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f373.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f373.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f393.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f393.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f3eb.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f3eb.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bb.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bb.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bc.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f4bc.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f52c.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f52c.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f680.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-1f680.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-2695.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-2695.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-2696.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9d1-200d-2696.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9dd.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9dd.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9e0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9e0.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9e9.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9e9.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9ea.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9ea.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9ec.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9ec.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9ed.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9ed.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9ee.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9ee.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9f0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9f0.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9f9.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9f9.js +9 -0
- package/lib/components/emoji/fluent/svg/1f9fe.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1f9fe.js +9 -0
- package/lib/components/emoji/fluent/svg/1fa79.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1fa79.js +9 -0
- package/lib/components/emoji/fluent/svg/1fa84.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1fa84.js +9 -0
- package/lib/components/emoji/fluent/svg/1fa90.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1fa90.js +9 -0
- package/lib/components/emoji/fluent/svg/1fa9d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1fa9d.js +9 -0
- package/lib/components/emoji/fluent/svg/1fa9f.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/1fa9f.js +9 -0
- package/lib/components/emoji/fluent/svg/23f0.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/23f0.js +9 -0
- package/lib/components/emoji/fluent/svg/23f3.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/23f3.js +9 -0
- package/lib/components/emoji/fluent/svg/2600.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2600.js +9 -0
- package/lib/components/emoji/fluent/svg/2601.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2601.js +9 -0
- package/lib/components/emoji/fluent/svg/2603.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2603.js +9 -0
- package/lib/components/emoji/fluent/svg/2611.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2611.js +9 -0
- package/lib/components/emoji/fluent/svg/2615.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2615.js +9 -0
- package/lib/components/emoji/fluent/svg/262f.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/262f.js +9 -0
- package/lib/components/emoji/fluent/svg/2696.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2696.js +9 -0
- package/lib/components/emoji/fluent/svg/2699.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2699.js +9 -0
- package/lib/components/emoji/fluent/svg/269b.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/269b.js +9 -0
- package/lib/components/emoji/fluent/svg/26a1.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/26a1.js +9 -0
- package/lib/components/emoji/fluent/svg/2702.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2702.js +9 -0
- package/lib/components/emoji/fluent/svg/2705.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2705.js +9 -0
- package/lib/components/emoji/fluent/svg/2709.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2709.js +9 -0
- package/lib/components/emoji/fluent/svg/270d.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/270d.js +9 -0
- package/lib/components/emoji/fluent/svg/270f.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/270f.js +9 -0
- package/lib/components/emoji/fluent/svg/2712.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2712.js +9 -0
- package/lib/components/emoji/fluent/svg/2728.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2728.js +9 -0
- package/lib/components/emoji/fluent/svg/2764.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2764.js +9 -0
- package/lib/components/emoji/fluent/svg/2b1c.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2b1c.js +9 -0
- package/lib/components/emoji/fluent/svg/2b50.d.ts +2 -0
- package/lib/components/emoji/fluent/svg/2b50.js +9 -0
- package/lib/components/emoji/index.d.ts +3 -0
- package/lib/components/emoji/index.js +7 -0
- package/lib/components/index.d.ts +11 -0
- package/lib/components/index.js +11 -0
- package/lib/components/labels/StatusLabels.d.ts +55 -0
- package/lib/components/labels/StatusLabels.js +77 -0
- package/lib/components/labels/StatusLabels.stories.d.ts +14 -0
- package/lib/components/labels/StatusLabels.stories.js +19 -0
- package/lib/components/labels/VisibilityLabel.d.ts +4 -0
- package/lib/components/labels/VisibilityLabel.js +14 -0
- package/lib/components/labels/index.d.ts +2 -0
- package/lib/components/labels/index.js +6 -0
- package/lib/components/progress/Progress.stories.d.ts +14 -0
- package/lib/components/progress/Progress.stories.js +20 -0
- package/lib/components/progress/ProgressRing.d.ts +37 -0
- package/lib/components/progress/ProgressRing.js +31 -0
- package/lib/components/progress/SpinnerBar.d.ts +2 -0
- package/lib/components/progress/SpinnerBar.js +21 -0
- package/lib/components/progress/Timer.d.ts +10 -0
- package/lib/components/progress/Timer.js +24 -0
- package/lib/components/progress/index.d.ts +3 -0
- package/lib/components/progress/index.js +7 -0
- package/lib/components/scroll-area/ScrollArea.d.ts +7 -7
- package/lib/components/sparklines/Sparklines.d.ts +16 -0
- package/lib/components/sparklines/Sparklines.js +68 -0
- package/lib/components/sparklines/Sparklines.stories.d.ts +12 -0
- package/lib/components/sparklines/Sparklines.stories.js +15 -0
- package/lib/components/sparklines/SparklinesLine.d.ts +8 -0
- package/lib/components/sparklines/SparklinesLine.js +37 -0
- package/lib/components/sparklines/dataProcessing.d.ts +23 -0
- package/lib/components/sparklines/dataProcessing.js +35 -0
- package/lib/components/sparklines/index.d.ts +5 -0
- package/lib/components/sparklines/index.js +7 -0
- package/lib/components/sparklines/types.d.ts +36 -0
- package/lib/components/sparklines/types.js +5 -0
- package/lib/components/tabs/ViewTabs.d.ts +48 -0
- package/lib/components/tabs/ViewTabs.js +40 -0
- package/lib/components/tabs/ViewTabs.stories.d.ts +13 -0
- package/lib/components/tabs/ViewTabs.stories.js +30 -0
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +5 -0
- package/lib/components/timeline/Timeline.d.ts +20 -0
- package/lib/components/timeline/Timeline.js +58 -0
- package/lib/components/timeline/Timeline.stories.d.ts +12 -0
- package/lib/components/timeline/Timeline.stories.js +22 -0
- package/lib/components/timeline/index.d.ts +1 -0
- package/lib/components/timeline/index.js +5 -0
- package/lib/components/toast/ToastPanel.d.ts +11 -0
- package/lib/components/toast/ToastPanel.js +43 -0
- package/lib/components/toast/ToastPanel.stories.d.ts +12 -0
- package/lib/components/toast/ToastPanel.stories.js +16 -0
- package/lib/components/toast/index.d.ts +2 -0
- package/lib/components/toast/index.js +6 -0
- package/lib/components/toast/toastQueue.d.ts +35 -0
- package/lib/components/toast/toastQueue.js +47 -0
- package/lib/components/toolbar/Toolbar.d.ts +14 -2
- package/lib/components/toolbar/Toolbar.js +102 -8
- package/lib/components/toolbar/ToolbarRenderer.d.ts +2 -0
- package/lib/components/toolbar/ToolbarRenderer.js +3 -1
- package/lib/components/toolbar/types.d.ts +6 -0
- package/lib/components/truncate/Truncate.d.ts +44 -0
- package/lib/components/truncate/Truncate.js +46 -0
- package/lib/components/truncate/Truncate.stories.d.ts +13 -0
- package/lib/components/truncate/Truncate.stories.js +19 -0
- package/lib/components/truncate/index.d.ts +1 -0
- package/lib/components/truncate/index.js +5 -0
- package/lib/theme/themes/agentThemeStyles.d.ts +1 -1
- package/lib/theme/themes/datalayerThemeStyles.d.ts +1 -1
- package/lib/theme/themes/earthThemeStyles.d.ts +1 -1
- package/lib/theme/themes/ivoryThemeStyles.d.ts +1 -1
- package/lib/theme/themes/lovelyThemeStyles.d.ts +1 -1
- package/lib/theme/themes/matrixThemeStyles.d.ts +1 -1
- package/lib/theme/themes/metalThemeStyles.d.ts +1 -1
- package/lib/theme/themes/sandThemeStyles.d.ts +1 -1
- package/lib/theme/themes/spatialThemeStyles.d.ts +1 -1
- package/lib/theme/themes/sunThemeStyles.d.ts +1 -1
- package/lib/theme/themes/vscodeThemeStyles.d.ts +1 -1
- package/lib/utils/Download.d.ts +3 -0
- package/lib/utils/Download.js +50 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/package.json +4 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Sparklines Line Component
|
|
4
|
+
*
|
|
5
|
+
* Renders a line chart within a Sparklines container.
|
|
6
|
+
*/
|
|
7
|
+
export const SparklinesLine = ({ points = [], height = 60, margin = 2, color = '#0969da', style = {}, }) => {
|
|
8
|
+
if (!points || points.length === 0) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
// Convert points to polyline format
|
|
12
|
+
const linePoints = points.map(p => `${p.x},${p.y}`).join(' ');
|
|
13
|
+
// Create fill area by closing the path
|
|
14
|
+
const closePolyPoints = [
|
|
15
|
+
{ x: points[points.length - 1].x, y: height - margin },
|
|
16
|
+
{ x: margin, y: height - margin },
|
|
17
|
+
{ x: margin, y: points[0].y },
|
|
18
|
+
];
|
|
19
|
+
const fillPoints = points
|
|
20
|
+
.concat(closePolyPoints)
|
|
21
|
+
.map(p => `${p.x},${p.y}`)
|
|
22
|
+
.join(' ');
|
|
23
|
+
const lineStyle = {
|
|
24
|
+
stroke: color || style.stroke || 'slategray',
|
|
25
|
+
strokeWidth: style.strokeWidth || '1.5',
|
|
26
|
+
strokeLinejoin: 'round',
|
|
27
|
+
strokeLinecap: 'round',
|
|
28
|
+
fill: 'none',
|
|
29
|
+
};
|
|
30
|
+
const fillStyle = {
|
|
31
|
+
stroke: 'none',
|
|
32
|
+
strokeWidth: '0',
|
|
33
|
+
fillOpacity: style.fillOpacity || '0.1',
|
|
34
|
+
fill: style.fill || color || 'slategray',
|
|
35
|
+
};
|
|
36
|
+
return (_jsxs("g", { children: [_jsx("polyline", { points: fillPoints, style: fillStyle }), _jsx("polyline", { points: linePoints, style: lineStyle })] }));
|
|
37
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Point } from './types';
|
|
2
|
+
export type { Point } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Get minimum value from array
|
|
5
|
+
*/
|
|
6
|
+
export declare const min: (data: number[]) => number;
|
|
7
|
+
/**
|
|
8
|
+
* Get maximum value from array
|
|
9
|
+
*/
|
|
10
|
+
export declare const max: (data: number[]) => number;
|
|
11
|
+
/**
|
|
12
|
+
* Convert data array to SVG points
|
|
13
|
+
*/
|
|
14
|
+
export interface DataToPointsOptions {
|
|
15
|
+
data: number[];
|
|
16
|
+
limit?: number;
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
margin?: number;
|
|
20
|
+
max?: number;
|
|
21
|
+
min?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const dataToPoints: ({ data, limit, width, height, margin, max: maxVal, min: minVal, }: DataToPointsOptions) => Point[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Get minimum value from array
|
|
7
|
+
*/
|
|
8
|
+
export const min = (data) => {
|
|
9
|
+
return Math.min(...data);
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Get maximum value from array
|
|
13
|
+
*/
|
|
14
|
+
export const max = (data) => {
|
|
15
|
+
return Math.max(...data);
|
|
16
|
+
};
|
|
17
|
+
export const dataToPoints = ({ data, limit, width = 1, height = 1, margin = 0, max: maxVal, min: minVal, }) => {
|
|
18
|
+
let processedData = [...data];
|
|
19
|
+
const len = processedData.length;
|
|
20
|
+
// Limit data if specified
|
|
21
|
+
if (limit && limit < len) {
|
|
22
|
+
processedData = processedData.slice(len - limit);
|
|
23
|
+
}
|
|
24
|
+
// Calculate min/max if not provided
|
|
25
|
+
const dataMax = maxVal ?? max(processedData);
|
|
26
|
+
const dataMin = minVal ?? min(processedData);
|
|
27
|
+
// Calculate scaling factors
|
|
28
|
+
const vfactor = (height - margin * 2) / (dataMax - dataMin || 2);
|
|
29
|
+
const hfactor = (width - margin * 2) / ((limit || len) - (len > 1 ? 1 : 0));
|
|
30
|
+
// Map data to points
|
|
31
|
+
return processedData.map((d, i) => ({
|
|
32
|
+
x: i * hfactor + margin,
|
|
33
|
+
y: (dataMax === dataMin ? 1 : dataMax - d) * vfactor + margin,
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Sparklines } from './Sparklines';
|
|
2
|
+
export { SparklinesLine } from './SparklinesLine';
|
|
3
|
+
export type { SparklinesProps, SparklinesLineProps, Point } from './types';
|
|
4
|
+
export { dataToPoints, min, max } from './dataProcessing';
|
|
5
|
+
export type { DataToPointsOptions } from './dataProcessing';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
export { Sparklines } from './Sparklines';
|
|
6
|
+
export { SparklinesLine } from './SparklinesLine';
|
|
7
|
+
export { dataToPoints, min, max } from './dataProcessing';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Point interface for sparkline coordinates
|
|
3
|
+
*/
|
|
4
|
+
export interface Point {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Sparklines component props
|
|
10
|
+
*/
|
|
11
|
+
export interface SparklinesProps {
|
|
12
|
+
data: number[];
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
svgWidth?: number;
|
|
16
|
+
svgHeight?: number;
|
|
17
|
+
preserveAspectRatio?: string;
|
|
18
|
+
margin?: number;
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
min?: number;
|
|
21
|
+
max?: number;
|
|
22
|
+
limit?: number;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Sparklines Line component props
|
|
27
|
+
*/
|
|
28
|
+
export interface SparklinesLineProps {
|
|
29
|
+
data?: number[];
|
|
30
|
+
points?: Point[];
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: number;
|
|
33
|
+
margin?: number;
|
|
34
|
+
color?: string;
|
|
35
|
+
style?: React.CSSProperties;
|
|
36
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tabs of a view, one look and one behaviour everywhere (the user, 13
|
|
3
|
+
* November 2026: "create a component for those tabs and use it in all views"):
|
|
4
|
+
* small buttons, the open one primary, the others invisible, as on /evals and
|
|
5
|
+
* /admin/cluster.
|
|
6
|
+
*
|
|
7
|
+
* - A `tablist` of `tab`s, `aria-selected` on the open one, for assistive
|
|
8
|
+
* technology; ← → Home End move between the enabled tabs and open them.
|
|
9
|
+
* - A tab may be `disabled`, its `title` saying why; it may carry a `count`.
|
|
10
|
+
* - A tab may carry a `leadingVisual`, an icon before its label (the user,
|
|
11
|
+
* 21 November 2026: the application page's Build, Try, Validate and Ship).
|
|
12
|
+
* - `useTabParam` (./useTabParam) keeps the open tab in the address (`?tab=`).
|
|
13
|
+
*
|
|
14
|
+
* @module components/tabs/ViewTabs
|
|
15
|
+
*/
|
|
16
|
+
import type { ElementType, JSX, ReactNode } from 'react';
|
|
17
|
+
export type ViewTab<T extends string = string> = {
|
|
18
|
+
id: T;
|
|
19
|
+
label: ReactNode;
|
|
20
|
+
/** Shown beside the label, as a counter: a number, or words such as `24+` when more are not counted. */
|
|
21
|
+
count?: number | string;
|
|
22
|
+
/** Not openable now; `title` says why. */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** A tooltip: why a tab is disabled, or what it shows. */
|
|
25
|
+
title?: string;
|
|
26
|
+
/** An icon before the label, as Primer's Button draws a leading visual. */
|
|
27
|
+
leadingVisual?: ElementType;
|
|
28
|
+
/**
|
|
29
|
+
* A rule after this tab, setting it apart from those after it (an *All*
|
|
30
|
+
* before the kinds it gathers; the user, 28 November 2026).
|
|
31
|
+
*/
|
|
32
|
+
separatorAfter?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type ViewTabsProps<T extends string> = {
|
|
35
|
+
tabs: ReadonlyArray<ViewTab<T>>;
|
|
36
|
+
/** The open tab. */
|
|
37
|
+
value: T;
|
|
38
|
+
onChange: (id: T) => void;
|
|
39
|
+
/** What the tabs are of, said to assistive technology. */
|
|
40
|
+
label: string;
|
|
41
|
+
'data-testid'?: string;
|
|
42
|
+
/** The space under the tabs, in Primer's scale; 3 by default, as the views had it. */
|
|
43
|
+
mb?: number;
|
|
44
|
+
/** Beside the tabs, at the right: a toggle, a filter. */
|
|
45
|
+
trailing?: ReactNode;
|
|
46
|
+
};
|
|
47
|
+
export declare function ViewTabs<T extends string>({ tabs, value, onChange, label, 'data-testid': testId, mb, trailing, }: ViewTabsProps<T>): JSX.Element;
|
|
48
|
+
export default ViewTabs;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, useCallback, useRef } from 'react';
|
|
3
|
+
import { Button } from '@primer/react';
|
|
4
|
+
import { Box } from '../box/Box';
|
|
5
|
+
export function ViewTabs({ tabs, value, onChange, label, 'data-testid': testId, mb = 3, trailing, }) {
|
|
6
|
+
const refs = useRef(new Map());
|
|
7
|
+
const onKeyDown = useCallback((event, at) => {
|
|
8
|
+
const enabled = tabs.filter(tab => !tab.disabled).map(tab => tab.id);
|
|
9
|
+
const index = enabled.indexOf(at);
|
|
10
|
+
if (index < 0 || enabled.length < 2) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const next = event.key === 'ArrowRight'
|
|
14
|
+
? enabled[(index + 1) % enabled.length]
|
|
15
|
+
: event.key === 'ArrowLeft'
|
|
16
|
+
? enabled[(index - 1 + enabled.length) % enabled.length]
|
|
17
|
+
: event.key === 'Home'
|
|
18
|
+
? enabled[0]
|
|
19
|
+
: event.key === 'End'
|
|
20
|
+
? enabled[enabled.length - 1]
|
|
21
|
+
: undefined;
|
|
22
|
+
if (next === undefined) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
onChange(next);
|
|
27
|
+
refs.current.get(next)?.focus();
|
|
28
|
+
}, [tabs, onChange]);
|
|
29
|
+
const list = (_jsx(Box, { display: "flex", gap: 1, flexWrap: "wrap", role: "tablist", "aria-label": label, "data-testid": trailing ? undefined : testId, children: tabs.map(tab => {
|
|
30
|
+
const selected = tab.id === value;
|
|
31
|
+
return (_jsxs(Fragment, { children: [_jsx(Button, { ref: (node) => {
|
|
32
|
+
refs.current.set(tab.id, node);
|
|
33
|
+
}, size: "small", role: "tab", "aria-selected": selected, tabIndex: selected ? 0 : -1, variant: selected ? 'primary' : 'invisible', disabled: tab.disabled, title: tab.title, leadingVisual: tab.leadingVisual,
|
|
34
|
+
// Primer's own counter: its colours follow the button's variant, so it reads on the
|
|
35
|
+
// open tab's primary background in every theme (a CounterLabel child stayed dark on it).
|
|
36
|
+
count: tab.count, "data-tab": tab.id, onClick: tab.disabled ? undefined : () => onChange(tab.id), onKeyDown: (event) => onKeyDown(event, tab.id), children: tab.label }), tab.separatorAfter ? (_jsx(Box, { as: "span", role: "separator", "aria-orientation": "vertical", alignSelf: "stretch", width: "1px", mx: 1, my: 1, bg: "border.default", "data-tab-separator": "" })) : null] }, tab.id));
|
|
37
|
+
}) }));
|
|
38
|
+
return trailing ? (_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, flexWrap: "wrap", mb: mb, "data-testid": testId, children: [list, trailing] })) : (_jsx(Box, { mb: mb, children: list }));
|
|
39
|
+
}
|
|
40
|
+
export default ViewTabs;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { ViewTabs } from './ViewTabs';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ViewTabs;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021-2026 Datalayer, Inc.
|
|
4
|
+
* Distributed under the terms of the Modified BSD License.
|
|
5
|
+
*/
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { PlayIcon, ToolsIcon } from '@primer/octicons-react';
|
|
8
|
+
import { Box } from '../box/Box';
|
|
9
|
+
import { ViewTabs } from './ViewTabs';
|
|
10
|
+
const meta = {
|
|
11
|
+
title: 'Components/ViewTabs',
|
|
12
|
+
component: ViewTabs,
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
parameters: { layout: 'fullscreen' },
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
const TABS = [
|
|
18
|
+
{ id: 'all', label: 'All', separatorAfter: true },
|
|
19
|
+
{ id: 'runs', label: 'Runs', leadingVisual: PlayIcon, count: 12 },
|
|
20
|
+
{ id: 'tools', label: 'Tools', leadingVisual: ToolsIcon, count: '24+' },
|
|
21
|
+
{ id: 'docs', label: 'Docs', disabled: true, title: 'Coming soon' },
|
|
22
|
+
];
|
|
23
|
+
const Stateful = (props) => {
|
|
24
|
+
const [open, setOpen] = useState(props.tabs[0].id);
|
|
25
|
+
return (_jsx(Box, { p: 3, bg: "canvas.default", children: _jsx(ViewTabs, { label: "Sections", tabs: props.tabs, value: open, onChange: setOpen }) }));
|
|
26
|
+
};
|
|
27
|
+
export const Default = {
|
|
28
|
+
args: { label: 'Sections', tabs: TABS, value: 'all', onChange: () => undefined },
|
|
29
|
+
render: args => _jsx(Stateful, { tabs: args.tabs }),
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ViewTabs';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type TimelineStatus = 'done' | 'current' | 'pending' | 'failed' | 'neutral';
|
|
3
|
+
export type TimelineItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
timestamp?: string;
|
|
7
|
+
status?: TimelineStatus;
|
|
8
|
+
subtitle?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export type TimelineProps = {
|
|
11
|
+
items: TimelineItem[];
|
|
12
|
+
renderTimestamp?: (value?: string) => ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Horizontal metro-style timeline with connected markers and labels.
|
|
16
|
+
*
|
|
17
|
+
* The first item is rendered on the left. Pass items in the desired order
|
|
18
|
+
* (for example: newest to oldest).
|
|
19
|
+
*/
|
|
20
|
+
export declare const Timeline: ({ items, renderTimestamp }: TimelineProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../box/Box';
|
|
3
|
+
import { Text } from '@primer/react';
|
|
4
|
+
const statusStyles = {
|
|
5
|
+
done: {
|
|
6
|
+
dotBackground: 'success.emphasis',
|
|
7
|
+
dotBorder: 'success.emphasis',
|
|
8
|
+
lineColor: 'success.muted',
|
|
9
|
+
titleColor: 'fg.default',
|
|
10
|
+
},
|
|
11
|
+
current: {
|
|
12
|
+
dotBackground: 'attention.emphasis',
|
|
13
|
+
dotBorder: 'attention.emphasis',
|
|
14
|
+
lineColor: 'attention.muted',
|
|
15
|
+
titleColor: 'fg.default',
|
|
16
|
+
},
|
|
17
|
+
pending: {
|
|
18
|
+
dotBackground: 'canvas.default',
|
|
19
|
+
dotBorder: 'border.default',
|
|
20
|
+
lineColor: 'border.default',
|
|
21
|
+
titleColor: 'fg.muted',
|
|
22
|
+
},
|
|
23
|
+
failed: {
|
|
24
|
+
dotBackground: 'danger.emphasis',
|
|
25
|
+
dotBorder: 'danger.emphasis',
|
|
26
|
+
lineColor: 'danger.muted',
|
|
27
|
+
titleColor: 'danger.fg',
|
|
28
|
+
},
|
|
29
|
+
neutral: {
|
|
30
|
+
dotBackground: 'accent.emphasis',
|
|
31
|
+
dotBorder: 'accent.emphasis',
|
|
32
|
+
lineColor: 'accent.muted',
|
|
33
|
+
titleColor: 'fg.default',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Horizontal metro-style timeline with connected markers and labels.
|
|
38
|
+
*
|
|
39
|
+
* The first item is rendered on the left. Pass items in the desired order
|
|
40
|
+
* (for example: newest to oldest).
|
|
41
|
+
*/
|
|
42
|
+
export const Timeline = ({ items, renderTimestamp }) => {
|
|
43
|
+
if (!items.length) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return (_jsx(Box, { overflowX: "auto", pb: 1, children: _jsx(Box, { display: "flex", alignItems: "stretch", minWidth: "max-content", children: items.map((item, index) => {
|
|
47
|
+
const status = item.status || 'neutral';
|
|
48
|
+
const style = statusStyles[status];
|
|
49
|
+
const hasNext = index < items.length - 1;
|
|
50
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", minWidth: 220, flex: hasNext ? '0 0 220px' : '0 0 auto', pr: hasNext ? 0 : 1, children: [_jsxs(Box, { display: "flex", alignItems: "center", minHeight: 28, mb: 2, children: [_jsx(Box, { width: 16, height: 16, borderRadius: "50%", border: "2px solid", borderColor: style.dotBorder, bg: style.dotBackground, boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.2)" }), hasNext ? (_jsx(Box, { flex: 1, height: 4, ml: 2, mr: 2, borderRadius: 999, bg: style.lineColor })) : null] }), _jsx(Text, { as: "p", sx: { fontWeight: 600, color: style.titleColor, mb: 1 }, children: item.title }), _jsx(Text, { as: "p", sx: {
|
|
51
|
+
fontSize: 0,
|
|
52
|
+
color: 'fg.muted',
|
|
53
|
+
mb: item.subtitle ? 1 : 0,
|
|
54
|
+
}, children: renderTimestamp
|
|
55
|
+
? renderTimestamp(item.timestamp)
|
|
56
|
+
: item.timestamp || 'n/a' }), item.subtitle ? (_jsx(Text, { as: "p", sx: { fontSize: 0, color: 'fg.subtle' }, children: item.subtitle })) : null] }, item.id));
|
|
57
|
+
}) }) }));
|
|
58
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ items, renderTimestamp }: import("./Timeline").TimelineProps) => import("react").JSX.Element | null;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Steps: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../box/Box';
|
|
3
|
+
import { Timeline } from './Timeline';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Timeline',
|
|
6
|
+
component: Timeline,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: { layout: 'fullscreen' },
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
export const Steps = {
|
|
12
|
+
args: {
|
|
13
|
+
items: [
|
|
14
|
+
{ id: '1', title: 'Requested', status: 'done', timestamp: '09:00' },
|
|
15
|
+
{ id: '2', title: 'Approved', status: 'done', timestamp: '09:12', subtitle: 'By the owner' },
|
|
16
|
+
{ id: '3', title: 'Deploying', status: 'current', timestamp: '09:15' },
|
|
17
|
+
{ id: '4', title: 'Tests', status: 'failed' },
|
|
18
|
+
{ id: '5', title: 'Live', status: 'pending' },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
render: args => (_jsx(Box, { p: 3, bg: "canvas.default", children: _jsx(Timeline, { ...args }) })),
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Timeline';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where `useToast` shows its toasts outside JupyterLab: primer-addons'
|
|
3
|
+
* sliding panel, one toast at a time, the next once it is gone. Mount it
|
|
4
|
+
* once, inside the application's theme. JupyterLab keeps its own
|
|
5
|
+
* notifications.
|
|
6
|
+
*
|
|
7
|
+
* @module components/toast/ToastPanel
|
|
8
|
+
*/
|
|
9
|
+
import type { JSX } from 'react';
|
|
10
|
+
export declare const ToastPanel: () => JSX.Element;
|
|
11
|
+
export default ToastPanel;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, useSyncExternalStore } from 'react';
|
|
3
|
+
import { Button } from '@primer/react';
|
|
4
|
+
import { Box } from '../box/Box';
|
|
5
|
+
import { SlidingPanel } from '../sliding-panel/SlidingPanel';
|
|
6
|
+
import { toastQueue } from './toastQueue';
|
|
7
|
+
const BUTTON_VARIANTS = {
|
|
8
|
+
accent: 'primary',
|
|
9
|
+
link: 'invisible',
|
|
10
|
+
warn: 'danger',
|
|
11
|
+
default: 'default',
|
|
12
|
+
};
|
|
13
|
+
export const ToastPanel = () => {
|
|
14
|
+
const toasts = useSyncExternalStore(toastQueue.subscribe, toastQueue.snapshot, toastQueue.snapshot);
|
|
15
|
+
const shown = toasts[0];
|
|
16
|
+
const close = () => {
|
|
17
|
+
if (shown) {
|
|
18
|
+
toastQueue.dismiss(shown.id);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return (_jsx(SlidingPanel
|
|
22
|
+
// A new toast is a new panel: it slides in, and its own clock runs.
|
|
23
|
+
, { isOpen: Boolean(shown),
|
|
24
|
+
// A toast of several lines (a failed request's message and exception) says each on its own line.
|
|
25
|
+
message: (shown?.message ?? '').split('\n').map((line, index) => (_jsxs(Fragment, { children: [index > 0 ? _jsx("br", {}) : null, line] }, index))), variant: shown?.variant ?? 'default', position: "north", durationMs: shown && shown.autoClose !== false ? shown.autoClose : undefined, onDismiss: close, details: shown?.detail || shown?.actions?.length ? (_jsxs(_Fragment, { children: [shown?.detail ? (
|
|
26
|
+
// The technical detail: small, in monospace, whole, wrapped (never the message's type).
|
|
27
|
+
_jsx(Box, { as: "pre", "data-toast-detail": true, sx: {
|
|
28
|
+
m: 0,
|
|
29
|
+
mt: 1,
|
|
30
|
+
fontFamily: 'mono',
|
|
31
|
+
fontSize: 0,
|
|
32
|
+
whiteSpace: 'pre-wrap',
|
|
33
|
+
overflowWrap: 'anywhere',
|
|
34
|
+
maxHeight: '12rem',
|
|
35
|
+
overflowY: 'auto',
|
|
36
|
+
}, children: shown.detail })) : null, shown?.actions?.length ? (_jsx(Box, { display: "flex", gap: 2, flexWrap: "wrap", mt: 2, children: shown.actions.map(action => (_jsx(Button, { size: "small", title: action.caption ?? action.label, variant: BUTTON_VARIANTS[action.displayType ?? 'default'], onClick: (event) => {
|
|
37
|
+
action.callback(event.nativeEvent);
|
|
38
|
+
if (!event.nativeEvent.defaultPrevented) {
|
|
39
|
+
close();
|
|
40
|
+
}
|
|
41
|
+
}, children: action.label }, action.label))) })) : null] })) : undefined }, shown?.id ?? 'none'));
|
|
42
|
+
};
|
|
43
|
+
export default ToastPanel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: () => import("react").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Toasts: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@primer/react';
|
|
3
|
+
import { Box } from '../box/Box';
|
|
4
|
+
import { ToastPanel } from './ToastPanel';
|
|
5
|
+
import { defaultAutoClose, toastQueue } from './toastQueue';
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Components/ToastPanel',
|
|
8
|
+
component: ToastPanel,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
parameters: { layout: 'fullscreen' },
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
const push = (variant, message) => toastQueue.push({ variant, message, autoClose: defaultAutoClose(variant) });
|
|
14
|
+
export const Toasts = {
|
|
15
|
+
render: () => (_jsxs(Box, { p: 3, bg: "canvas.default", display: "flex", gap: 2, children: [_jsx(Button, { onClick: () => push('info', 'The runtime is starting.'), children: "Info" }), _jsx(Button, { onClick: () => push('success', 'Saved.'), children: "Success" }), _jsx(Button, { onClick: () => push('warning', 'Credits are running low.'), children: "Warning" }), _jsx(Button, { variant: "danger", onClick: () => push('error', 'The request failed.'), children: "Error" }), _jsx(ToastPanel, {})] })),
|
|
16
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The toasts waiting to be shown outside JupyterLab, in the order they were
|
|
3
|
+
* asked for: `useToast` puts them here, `ToastPanel` shows the first in a
|
|
4
|
+
* sliding panel, and taking it away shows the next.
|
|
5
|
+
*
|
|
6
|
+
* @module components/toast/toastQueue
|
|
7
|
+
*/
|
|
8
|
+
export type ToastVariant = 'info' | 'success' | 'warning' | 'error';
|
|
9
|
+
/** A button on a toast, as JupyterLab's notifications name one. */
|
|
10
|
+
export type ToastAction = {
|
|
11
|
+
label: string;
|
|
12
|
+
caption?: string;
|
|
13
|
+
displayType?: 'default' | 'accent' | 'warn' | 'link';
|
|
14
|
+
callback: (event: MouseEvent) => void;
|
|
15
|
+
};
|
|
16
|
+
export type QueuedToast = {
|
|
17
|
+
id: string;
|
|
18
|
+
variant: ToastVariant;
|
|
19
|
+
message: string;
|
|
20
|
+
/** A technical detail drawn under the message, small and in monospace (a request's status, a server's words). */
|
|
21
|
+
detail?: string;
|
|
22
|
+
actions?: ToastAction[];
|
|
23
|
+
/** Milliseconds before it goes on its own; `false` stays until dismissed. */
|
|
24
|
+
autoClose: number | false;
|
|
25
|
+
};
|
|
26
|
+
/** Info and success go on their own after five seconds; a warning or an error stays. */
|
|
27
|
+
export declare const defaultAutoClose: (variant: ToastVariant) => number | false;
|
|
28
|
+
export declare const toastQueue: {
|
|
29
|
+
subscribe(listener: () => void): () => void;
|
|
30
|
+
snapshot(): readonly QueuedToast[];
|
|
31
|
+
push(toast: Omit<QueuedToast, "id">): string;
|
|
32
|
+
update(id: string, patch: Partial<Omit<QueuedToast, "id">>): void;
|
|
33
|
+
/** Take one toast away, or every toast without an id. */
|
|
34
|
+
dismiss(id?: string): void;
|
|
35
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2023-2025 Datalayer, Inc.
|
|
3
|
+
* Distributed under the terms of the Modified BSD License.
|
|
4
|
+
*/
|
|
5
|
+
let toasts = [];
|
|
6
|
+
const listeners = new Set();
|
|
7
|
+
let next = 0;
|
|
8
|
+
const emit = () => {
|
|
9
|
+
for (const listener of listeners) {
|
|
10
|
+
listener();
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
/** Info and success go on their own after five seconds; a warning or an error stays. */
|
|
14
|
+
export const defaultAutoClose = (variant) => variant === 'info' || variant === 'success' ? 5000 : false;
|
|
15
|
+
export const toastQueue = {
|
|
16
|
+
subscribe(listener) {
|
|
17
|
+
listeners.add(listener);
|
|
18
|
+
return () => {
|
|
19
|
+
listeners.delete(listener);
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
snapshot() {
|
|
23
|
+
return toasts;
|
|
24
|
+
},
|
|
25
|
+
push(toast) {
|
|
26
|
+
// The same toast already waiting is not said twice: a page that asks
|
|
27
|
+
// twice, or two requests that fail alike, show it once.
|
|
28
|
+
const same = toasts.find(queued => queued.variant === toast.variant && queued.message === toast.message);
|
|
29
|
+
if (same) {
|
|
30
|
+
return same.id;
|
|
31
|
+
}
|
|
32
|
+
next += 1;
|
|
33
|
+
const id = `toast-${next}`;
|
|
34
|
+
toasts = [...toasts, { ...toast, id }];
|
|
35
|
+
emit();
|
|
36
|
+
return id;
|
|
37
|
+
},
|
|
38
|
+
update(id, patch) {
|
|
39
|
+
toasts = toasts.map(toast => toast.id === id ? { ...toast, ...patch } : toast);
|
|
40
|
+
emit();
|
|
41
|
+
},
|
|
42
|
+
/** Take one toast away, or every toast without an id. */
|
|
43
|
+
dismiss(id) {
|
|
44
|
+
toasts = id === undefined ? [] : toasts.filter(toast => toast.id !== id);
|
|
45
|
+
emit();
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -7,6 +7,18 @@ import type { ToolbarProps, ToolbarItem } from "./types";
|
|
|
7
7
|
* line first among equals — with every priority equal, the tail of the
|
|
8
8
|
* line, as a reader expects.
|
|
9
9
|
*/
|
|
10
|
-
export declare function overflowKeys(ordered: ToolbarItem[], widthOf: (key: string) => number, available: number, gap?: number, triggerWidth?: number
|
|
11
|
-
|
|
10
|
+
export declare function overflowKeys(ordered: ToolbarItem[], widthOf: (key: string) => number, available: number, gap?: number, triggerWidth?: number,
|
|
11
|
+
/**
|
|
12
|
+
* Whether an item is laid out on the line: one that draws nothing yet
|
|
13
|
+
* (a chip waiting for its data) is 0px wide and still takes its gap.
|
|
14
|
+
* Unsaid, an item 0px wide takes none.
|
|
15
|
+
*/
|
|
16
|
+
laidOut?: (key: string) => boolean): Set<string>;
|
|
17
|
+
/**
|
|
18
|
+
* The least room a line needs: the items that never leave it — pinned, spacers at their minimum, and those laid
|
|
19
|
+
* out empty, which still take their gap — and, when any item can leave, the menu's button with its gap.
|
|
20
|
+
* Exported for tests.
|
|
21
|
+
*/
|
|
22
|
+
export declare function minimumWidthOf(ordered: ToolbarItem[], widthOf: (key: string) => number, gap?: number, triggerWidth?: number, laidOut?: (key: string) => boolean): number;
|
|
23
|
+
export declare function Toolbar({ items, extraItems, className, disabled, ariaLabel, overflow, variant, gap, overflowAriaLabel, keyboardNavigation, onMinimumWidth, }: ToolbarProps): import("react").JSX.Element;
|
|
12
24
|
export default Toolbar;
|